From ef9f4df0451e4c9f6bd82c00c4dfef4170a7229e Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Mon, 6 Apr 2015 02:28:16 +0100 Subject: [PATCH 01/19] updated to Babel 5.0.8, added browser polyfill and external-helpers --- .gitignore | 4 +- babel-4.6.6.min.js | 26 - babel.js | 49829 +++++++++++++++++++++++++++++++++++ babel.min.js | 55 + demo/.gitignore | 1 + demo/build.config.js | 2 +- demo/index-optimized.html | 2 +- demo/index.html | 4 +- demo/libs/requirejs.js | 2087 ++ demo/libs/requirejs.min.js | 36 - demo/main-built.js | 18 +- external-helpers.js | 0 package.json | 2 +- polyfill.js | 3009 +++ polyfill.min.js | 3 + 15 files changed, 55001 insertions(+), 77 deletions(-) delete mode 100644 babel-4.6.6.min.js create mode 100644 babel.js create mode 100644 babel.min.js create mode 100644 demo/.gitignore create mode 100644 demo/libs/requirejs.js delete mode 100644 demo/libs/requirejs.min.js create mode 100644 external-helpers.js create mode 100644 polyfill.js create mode 100644 polyfill.min.js diff --git a/.gitignore b/.gitignore index b512c09..f7e8d45 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +*.DS_Store +/.idea/ diff --git a/babel-4.6.6.min.js b/babel-4.6.6.min.js deleted file mode 100644 index 6501665..0000000 --- a/babel-4.6.6.min.js +++ /dev/null @@ -1,26 +0,0 @@ -(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.babel=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o=0)scripts.push(_script)}for(i in scripts){run(scripts[i],i)}exec()};if(global.addEventListener){global.addEventListener("DOMContentLoaded",runScripts,false)}else if(global.attachEvent){global.attachEvent("onload",runScripts)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../../../package":347,"../transformation":43}],2:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var repeating=_interopRequire(require("repeating"));var trimRight=_interopRequire(require("trim-right"));var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var includes=_interopRequire(require("lodash/collection/includes"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var Buffer=function(){function Buffer(position,format){_classCallCheck(this,Buffer);this.position=position;this._indent=format.indent.base;this.format=format;this.buf=""}Buffer.prototype.get=function get(){return trimRight(this.buf)};Buffer.prototype.getIndent=function getIndent(){if(this.format.compact||this.format.concise){return""}else{return repeating(this.format.indent.style,this._indent)}};Buffer.prototype.indentSize=function indentSize(){return this.getIndent().length};Buffer.prototype.indent=function indent(){this._indent++};Buffer.prototype.dedent=function dedent(){this._indent--};Buffer.prototype.semicolon=function semicolon(){this.push(";")};Buffer.prototype.ensureSemicolon=function ensureSemicolon(){if(!this.isLast(";"))this.semicolon()};Buffer.prototype.rightBrace=function rightBrace(){this.newline(true);this.push("}")};Buffer.prototype.keyword=function keyword(name){this.push(name);this.space()};Buffer.prototype.space=function space(){if(this.format.compact)return;if(this.buf&&!this.isLast(" ")&&!this.isLast("\n")){this.push(" ")}};Buffer.prototype.removeLast=function removeLast(cha){if(this.format.compact)return;if(!this.isLast(cha))return;this.buf=this.buf.substr(0,this.buf.length-1);this.position.unshift(cha)};Buffer.prototype.newline=function newline(i,removeLast){if(this.format.compact)return;if(this.format.concise){this.space();return}if(!removeLast)removeLast=false;if(isNumber(i)){i=Math.min(2,i);if(this.endsWith("{\n")||this.endsWith(":\n"))i--;if(i<=0)return;while(i>0){this._newline(removeLast);i--}return}if(isBoolean(i)){removeLast=i}this._newline(removeLast)};Buffer.prototype._newline=function _newline(removeLast){if(this.endsWith("\n\n"))return;if(removeLast&&this.isLast("\n"))this.removeLast("\n");this.removeLast(" ");this._removeSpacesAfterLastNewline();this._push("\n")};Buffer.prototype._removeSpacesAfterLastNewline=function _removeSpacesAfterLastNewline(){var lastNewlineIndex=this.buf.lastIndexOf("\n");if(lastNewlineIndex===-1)return;var index=this.buf.length-1;while(index>lastNewlineIndex){if(this.buf[index]!==" "){break}index--}if(index===lastNewlineIndex){this.buf=this.buf.substring(0,index+1)}};Buffer.prototype.push=function push(str,noIndent){if(!this.format.compact&&this._indent&&!noIndent&&str!=="\n"){var indent=this.getIndent();str=str.replace(/\n/g,"\n"+indent);if(this.isLast("\n"))this._push(indent)}this._push(str)};Buffer.prototype._push=function _push(str){this.position.push(str);this.buf+=str};Buffer.prototype.endsWith=function endsWith(str){return this.buf.slice(-str.length)===str};Buffer.prototype.isLast=function isLast(cha){if(this.format.compact)return false;var buf=this.buf;var last=buf[buf.length-1];if(Array.isArray(cha)){return includes(cha,last)}else{return cha===last}};return Buffer}();module.exports=Buffer},{"lodash/collection/includes":206,"lodash/lang/isBoolean":292,"lodash/lang/isNumber":296,repeating:330,"trim-right":346}],3:[function(require,module,exports){"use strict";exports.File=File;exports.Program=Program;exports.BlockStatement=BlockStatement;function File(node,print){print(node.program)}function Program(node,print){print.sequence(node.body)}function BlockStatement(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();print.sequence(node.body,{indent:true});this.removeLast("\n");this.rightBrace()}}exports.__esModule=true},{}],4:[function(require,module,exports){"use strict";exports.ClassDeclaration=ClassDeclaration;exports.ClassBody=ClassBody;exports.MethodDefinition=MethodDefinition;function ClassDeclaration(node,print){this.push("class");if(node.id){this.space();print(node.id)}print(node.typeParameters);if(node.superClass){this.push(" extends ");print(node.superClass);print(node.superTypeParameters)}if(node["implements"]){this.push(" implements ");print.join(node["implements"],{separator:", "})}this.space();print(node.body)}exports.ClassExpression=ClassDeclaration;function ClassBody(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();this.indent();print.sequence(node.body);this.dedent();this.rightBrace()}}function MethodDefinition(node,print){if(node["static"]){this.push("static ")}this._method(node,print)}exports.__esModule=true},{}],5:[function(require,module,exports){"use strict";exports.ComprehensionBlock=ComprehensionBlock;exports.ComprehensionExpression=ComprehensionExpression;function ComprehensionBlock(node,print){this.keyword("for");this.push("(");print(node.left);this.push(" of ");print(node.right);this.push(")")}function ComprehensionExpression(node,print){this.push(node.generator?"(":"[");print.join(node.blocks,{separator:" "});this.space();if(node.filter){this.keyword("if");this.push("(");print(node.filter);this.push(")");this.space()}print(node.body);this.push(node.generator?")":"]")}exports.__esModule=true},{}],6:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.UnaryExpression=UnaryExpression;exports.UpdateExpression=UpdateExpression;exports.ConditionalExpression=ConditionalExpression;exports.NewExpression=NewExpression;exports.SequenceExpression=SequenceExpression;exports.ThisExpression=ThisExpression;exports.CallExpression=CallExpression;exports.EmptyStatement=EmptyStatement;exports.ExpressionStatement=ExpressionStatement;exports.AssignmentExpression=AssignmentExpression;exports.MemberExpression=MemberExpression;var isInteger=_interopRequire(require("is-integer"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var t=_interopRequire(require("../../types"));function UnaryExpression(node,print){var hasSpace=/[a-z]$/.test(node.operator);var arg=node.argument;if(t.isUpdateExpression(arg)||t.isUnaryExpression(arg)){hasSpace=true}if(t.isUnaryExpression(arg)&&arg.operator==="!"){hasSpace=false}this.push(node.operator);if(hasSpace)this.push(" ");print(node.argument)}function UpdateExpression(node,print){if(node.prefix){this.push(node.operator);print(node.argument)}else{print(node.argument);this.push(node.operator)}}function ConditionalExpression(node,print){print(node.test);this.space();this.push("?");this.space();print(node.consequent);this.space();this.push(":");this.space();print(node.alternate)}function NewExpression(node,print){this.push("new ");print(node.callee);this.push("(");print.list(node.arguments);this.push(")")}function SequenceExpression(node,print){print.list(node.expressions)}function ThisExpression(){this.push("this")}function CallExpression(node,print){print(node.callee);this.push("(");var separator=",";if(node._prettyCall){separator+="\n";this.newline();this.indent()}else{separator+=" "}print.list(node.arguments,{separator:separator});if(node._prettyCall){this.newline();this.dedent()}this.push(")")}var buildYieldAwait=function buildYieldAwait(keyword){return function(node,print){this.push(keyword);if(node.delegate||node.all){this.push("*")}if(node.argument){this.space();print(node.argument)}}};var YieldExpression=exports.YieldExpression=buildYieldAwait("yield");var AwaitExpression=exports.AwaitExpression=buildYieldAwait("await");function EmptyStatement(){this.semicolon()}function ExpressionStatement(node,print){print(node.expression);this.semicolon()}function AssignmentExpression(node,print){print(node.left);this.push(" ");this.push(node.operator);this.push(" ");print(node.right)}exports.BinaryExpression=AssignmentExpression;exports.LogicalExpression=AssignmentExpression;exports.AssignmentPattern=AssignmentExpression;var SCIENTIFIC_NOTATION=/e/i;function MemberExpression(node,print){var obj=node.object;print(obj);if(!node.computed&&t.isMemberExpression(node.property)){throw new TypeError("Got a MemberExpression for MemberExpression property")}var computed=node.computed;if(t.isLiteral(node.property)&&isNumber(node.property.value)){computed=true}if(computed){this.push("[");print(node.property);this.push("]")}else{if(t.isLiteral(obj)&&isInteger(obj.value)&&!SCIENTIFIC_NOTATION.test(obj.value.toString())){this.push(".")}this.push(".");print(node.property)}}exports.__esModule=true},{"../../types":124,"is-integer":190,"lodash/lang/isNumber":296}],7:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.AnyTypeAnnotation=AnyTypeAnnotation;exports.ArrayTypeAnnotation=ArrayTypeAnnotation;exports.BooleanTypeAnnotation=BooleanTypeAnnotation;exports.ClassProperty=ClassProperty;exports.DeclareClass=DeclareClass;exports.DeclareFunction=DeclareFunction;exports.DeclareModule=DeclareModule;exports.DeclareVariable=DeclareVariable;exports.FunctionTypeAnnotation=FunctionTypeAnnotation;exports.FunctionTypeParam=FunctionTypeParam;exports.InterfaceExtends=InterfaceExtends;exports._interfaceish=_interfaceish;exports.InterfaceDeclaration=InterfaceDeclaration;exports.IntersectionTypeAnnotation=IntersectionTypeAnnotation;exports.NullableTypeAnnotation=NullableTypeAnnotation;exports.NumberTypeAnnotation=NumberTypeAnnotation;exports.StringLiteralTypeAnnotation=StringLiteralTypeAnnotation;exports.StringTypeAnnotation=StringTypeAnnotation;exports.TupleTypeAnnotation=TupleTypeAnnotation;exports.TypeofTypeAnnotation=TypeofTypeAnnotation;exports.TypeAlias=TypeAlias;exports.TypeAnnotation=TypeAnnotation;exports.TypeParameterInstantiation=TypeParameterInstantiation;exports.ObjectTypeAnnotation=ObjectTypeAnnotation;exports.ObjectTypeCallProperty=ObjectTypeCallProperty;exports.ObjectTypeIndexer=ObjectTypeIndexer;exports.ObjectTypeProperty=ObjectTypeProperty;exports.QualifiedTypeIdentifier=QualifiedTypeIdentifier;exports.UnionTypeAnnotation=UnionTypeAnnotation;exports.TypeCastExpression=TypeCastExpression;exports.VoidTypeAnnotation=VoidTypeAnnotation;var t=_interopRequire(require("../../types"));function AnyTypeAnnotation(){this.push("any")}function ArrayTypeAnnotation(node,print){print(node.elementType);this.push("[");this.push("]")}function BooleanTypeAnnotation(node){this.push("bool")}function ClassProperty(node,print){if(node["static"])this.push("static ");print(node.key);print(node.typeAnnotation);this.semicolon()}function DeclareClass(node,print){this.push("declare class ");this._interfaceish(node,print)}function DeclareFunction(node,print){this.push("declare function ");print(node.id);print(node.id.typeAnnotation.typeAnnotation);this.semicolon()}function DeclareModule(node,print){this.push("declare module ");print(node.id);this.space();print(node.body)}function DeclareVariable(node,print){this.push("declare var ");print(node.id);print(node.id.typeAnnotation);this.semicolon()}function FunctionTypeAnnotation(node,print,parent){print(node.typeParameters);this.push("(");print.list(node.params);if(node.rest){if(node.params.length){this.push(",");this.space()}this.push("...");print(node.rest)}this.push(")");if(parent.type==="ObjectTypeProperty"||parent.type==="ObjectTypeCallProperty"||parent.type==="DeclareFunction"){this.push(":")}else{this.space();this.push("=>")}this.space();print(node.returnType)}function FunctionTypeParam(node,print){print(node.name);if(node.optional)this.push("?");this.push(":");this.space();print(node.typeAnnotation)}function InterfaceExtends(node,print){print(node.id);print(node.typeParameters)}exports.ClassImplements=InterfaceExtends;exports.GenericTypeAnnotation=InterfaceExtends;function _interfaceish(node,print){print(node.id);print(node.typeParameters);if(node["extends"].length){this.push(" extends ");print.join(node["extends"],{separator:", "})}this.space();print(node.body)}function InterfaceDeclaration(node,print){this.push("interface ");this._interfaceish(node,print)}function IntersectionTypeAnnotation(node,print){print.join(node.types,{separator:" & "})}function NullableTypeAnnotation(node,print){this.push("?");print(node.typeAnnotation)}function NumberTypeAnnotation(){this.push("number")}function StringLiteralTypeAnnotation(node){this._stringLiteral(node.value)}function StringTypeAnnotation(){this.push("string")}function TupleTypeAnnotation(node,print){this.push("[");print.join(node.types,{separator:", "});this.push("]")}function TypeofTypeAnnotation(node,print){this.push("typeof ");print(node.argument)}function TypeAlias(node,print){this.push("type ");print(node.id);print(node.typeParameters);this.space();this.push("=");this.space();print(node.right);this.semicolon()}function TypeAnnotation(node,print){this.push(":");this.space();if(node.optional)this.push("?");print(node.typeAnnotation)}function TypeParameterInstantiation(node,print){this.push("<");print.join(node.params,{separator:", "});this.push(">")}exports.TypeParameterDeclaration=TypeParameterInstantiation;function ObjectTypeAnnotation(node,print){this.push("{");var props=node.properties.concat(node.callProperties,node.indexers);if(props.length){this.space();print.list(props,{indent:true,separator:"; "});this.space()}this.push("}")}function ObjectTypeCallProperty(node,print){if(node["static"])this.push("static ");print(node.value)}function ObjectTypeIndexer(node,print){if(node["static"])this.push("static ");this.push("[");print(node.id);this.push(":");this.space();print(node.key);this.push("]");this.push(":");this.space();print(node.value)}function ObjectTypeProperty(node,print){if(node["static"])this.push("static ");print(node.key);if(node.optional)this.push("?");if(!t.isFunctionTypeAnnotation(node.value)){this.push(":");this.space()}print(node.value)}function QualifiedTypeIdentifier(node,print){print(node.qualification);this.push(".");print(node.id)}function UnionTypeAnnotation(node,print){print.join(node.types,{separator:" | "})}function TypeCastExpression(node,print){this.push("(");print(node.expression);print(node.typeAnnotation);this.push(")")}function VoidTypeAnnotation(node){this.push("void")}exports.__esModule=true},{"../../types":124}],8:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.JSXAttribute=JSXAttribute;exports.JSXIdentifier=JSXIdentifier;exports.JSXNamespacedName=JSXNamespacedName;exports.JSXMemberExpression=JSXMemberExpression;exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXExpressionContainer=JSXExpressionContainer;exports.JSXElement=JSXElement;exports.JSXOpeningElement=JSXOpeningElement;exports.JSXClosingElement=JSXClosingElement;exports.JSXEmptyExpression=JSXEmptyExpression;var each=_interopRequire(require("lodash/collection/each"));var t=_interopRequire(require("../../types"));function JSXAttribute(node,print){print(node.name);if(node.value){this.push("=");print(node.value)}}function JSXIdentifier(node){this.push(node.name)}function JSXNamespacedName(node,print){print(node.namespace);this.push(":");print(node.name)}function JSXMemberExpression(node,print){print(node.object);this.push(".");print(node.property)}function JSXSpreadAttribute(node,print){this.push("{...");print(node.argument);this.push("}")}function JSXExpressionContainer(node,print){this.push("{");print(node.expression);this.push("}")}function JSXElement(node,print){var _this=this;var open=node.openingElement;print(open);if(open.selfClosing)return;this.indent();each(node.children,function(child){if(t.isLiteral(child)){_this.push(child.value)}else{print(child)}});this.dedent();print(node.closingElement)}function JSXOpeningElement(node,print){this.push("<");print(node.name);if(node.attributes.length>0){this.push(" ");print.join(node.attributes,{separator:" "})}this.push(node.selfClosing?" />":">")}function JSXClosingElement(node,print){this.push("")}function JSXEmptyExpression(){}exports.__esModule=true},{"../../types":124,"lodash/collection/each":203}],9:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports._params=_params;exports._method=_method;exports.FunctionExpression=FunctionExpression;exports.ArrowFunctionExpression=ArrowFunctionExpression;var t=_interopRequire(require("../../types"));function _params(node,print){var _this=this;print(node.typeParameters);this.push("(");print.list(node.params,{iterator:function(node){if(node.optional)_this.push("?");print(node.typeAnnotation)}});this.push(")");if(node.returnType){print(node.returnType)}}function _method(node,print){var value=node.value;var kind=node.kind;var key=node.key;if(!kind||kind==="init"){if(value.generator){this.push("*")}}else{this.push(kind+" ")}if(value.async)this.push("async ");if(node.computed){this.push("[");print(key);this.push("]")}else{print(key)}this._params(value,print);this.push(" ");print(value.body)}function FunctionExpression(node,print){if(node.async)this.push("async ");this.push("function");if(node.generator)this.push("*");if(node.id){this.push(" ");print(node.id)}else{this.space()}this._params(node,print);this.space();print(node.body)}exports.FunctionDeclaration=FunctionExpression;function ArrowFunctionExpression(node,print){if(node.async)this.push("async ");if(node.params.length===1&&t.isIdentifier(node.params[0])){print(node.params[0])}else{this._params(node,print)}this.push(" => ");print(node.body)}exports.__esModule=true},{"../../types":124}],10:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.ImportSpecifier=ImportSpecifier;exports.ExportSpecifier=ExportSpecifier;exports.ExportBatchSpecifier=ExportBatchSpecifier;exports.ExportDeclaration=ExportDeclaration;exports.ImportDeclaration=ImportDeclaration;exports.ImportBatchSpecifier=ImportBatchSpecifier;var each=_interopRequire(require("lodash/collection/each"));var t=_interopRequire(require("../../types"));function ImportSpecifier(node,print){if(t.isSpecifierDefault(node)){print(t.getSpecifierName(node))}else{return ExportSpecifier.apply(this,arguments)}}function ExportSpecifier(node,print){print(node.id);if(node.name){this.push(" as ");print(node.name)}}function ExportBatchSpecifier(){this.push("*")}function ExportDeclaration(node,print){this.push("export ");var specifiers=node.specifiers;if(node["default"]){this.push("default ")}if(node.declaration){print(node.declaration);if(t.isStatement(node.declaration))return}else{if(specifiers.length===1&&t.isExportBatchSpecifier(specifiers[0])){print(specifiers[0])}else{this.push("{");if(specifiers.length){this.space();print.join(specifiers,{separator:", "});this.space()}this.push("}")}if(node.source){this.push(" from ");print(node.source)}}this.ensureSemicolon()}function ImportDeclaration(node,print){var _this=this;this.push("import ");if(node.isType){this.push("type ")}var specfiers=node.specifiers;if(specfiers&&specfiers.length){var foundImportSpecifier=false;each(node.specifiers,function(spec,i){if(+i>0){_this.push(", ")}var isDefault=t.isSpecifierDefault(spec);if(!isDefault&&spec.type!=="ImportBatchSpecifier"&&!foundImportSpecifier){foundImportSpecifier=true;_this.push("{ ")}print(spec)});if(foundImportSpecifier){this.push(" }")}this.push(" from ")}print(node.source);this.semicolon()}function ImportBatchSpecifier(node,print){this.push("* as ");print(node.name)}exports.__esModule=true},{"../../types":124,"lodash/collection/each":203}],11:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var each=_interopRequire(require("lodash/collection/each"));each(["BindMemberExpression","BindFunctionExpression"],function(type){exports[type]=function(){throw new ReferenceError("Trying to render non-standard playground node "+JSON.stringify(type))}})},{"lodash/collection/each":203}],12:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.WithStatement=WithStatement;exports.IfStatement=IfStatement;exports.ForStatement=ForStatement;exports.WhileStatement=WhileStatement;exports.DoWhileStatement=DoWhileStatement;exports.LabeledStatement=LabeledStatement;exports.TryStatement=TryStatement;exports.CatchClause=CatchClause;exports.ThrowStatement=ThrowStatement;exports.SwitchStatement=SwitchStatement;exports.SwitchCase=SwitchCase;exports.DebuggerStatement=DebuggerStatement;exports.VariableDeclaration=VariableDeclaration;exports.PrivateDeclaration=PrivateDeclaration;exports.VariableDeclarator=VariableDeclarator;var repeating=_interopRequire(require("repeating"));var t=_interopRequire(require("../../types"));function WithStatement(node,print){this.keyword("with");this.push("(");print(node.object);this.push(")");print.block(node.body)}function IfStatement(node,print){this.keyword("if");this.push("(");print(node.test);this.push(")");this.space();print.indentOnComments(node.consequent);if(node.alternate){if(this.isLast("}"))this.space();this.push("else ");print.indentOnComments(node.alternate)}}function ForStatement(node,print){this.keyword("for");this.push("(");print(node.init);this.push(";");if(node.test){this.push(" ");print(node.test)}this.push(";");if(node.update){this.push(" ");print(node.update)}this.push(")");print.block(node.body)}function WhileStatement(node,print){this.keyword("while");this.push("(");print(node.test);this.push(")");print.block(node.body)}var buildForXStatement=function buildForXStatement(op){return function(node,print){this.keyword("for");this.push("(");print(node.left);this.push(" "+op+" ");print(node.right);this.push(")");print.block(node.body)}};var ForInStatement=exports.ForInStatement=buildForXStatement("in");var ForOfStatement=exports.ForOfStatement=buildForXStatement("of");function DoWhileStatement(node,print){this.keyword("do");print(node.body);this.space();this.keyword("while");this.push("(");print(node.test);this.push(");")}var buildLabelStatement=function buildLabelStatement(prefix,key){return function(node,print){this.push(prefix);var label=node[key||"label"];if(label){this.push(" ");print(label)}this.semicolon()}};var ContinueStatement=exports.ContinueStatement=buildLabelStatement("continue");var ReturnStatement=exports.ReturnStatement=buildLabelStatement("return","argument");var BreakStatement=exports.BreakStatement=buildLabelStatement("break");function LabeledStatement(node,print){print(node.label);this.push(": ");print(node.body)}function TryStatement(node,print){this.keyword("try");print(node.block);this.space();if(node.handlers){print(node.handlers[0])}else{print(node.handler)}if(node.finalizer){this.space();this.push("finally ");print(node.finalizer)}}function CatchClause(node,print){this.keyword("catch");this.push("(");print(node.param);this.push(") ");print(node.body)}function ThrowStatement(node,print){this.push("throw ");print(node.argument);this.semicolon()}function SwitchStatement(node,print){this.keyword("switch");this.push("(");print(node.discriminant);this.push(")");this.space();this.push("{");print.sequence(node.cases,{indent:true,addNewlines:function addNewlines(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}});this.push("}")}function SwitchCase(node,print){if(node.test){this.push("case ");print(node.test);this.push(":")}else{this.push("default:")}if(node.consequent.length){this.newline();print.sequence(node.consequent,{indent:true})}}function DebuggerStatement(){this.push("debugger;")}function VariableDeclaration(node,print,parent){this.push(node.kind+" ");var hasInits=false;if(!t.isFor(parent)){for(var i=0;i0)_this.push(" ");print(elem);if(i1e5;if(format.compact){console.error(messages.get("codeGeneratorDeopt",opts.filename,"100KB"))}}return format};CodeGenerator.generators={templateLiterals:require("./generators/template-literals"),comprehensions:require("./generators/comprehensions"),expressions:require("./generators/expressions"),statements:require("./generators/statements"),playground:require("./generators/playground"),classes:require("./generators/classes"),methods:require("./generators/methods"),modules:require("./generators/modules"),types:require("./generators/types"),flow:require("./generators/flow"),base:require("./generators/base"),jsx:require("./generators/jsx")};CodeGenerator.prototype.generate=function generate(){var ast=this.ast;this.print(ast);var comments=[];each(ast.comments,function(comment){if(!comment._displayed)comments.push(comment)});this._printComments(comments);return{map:this.map.get(),code:this.buffer.get()}};CodeGenerator.prototype.buildPrint=function buildPrint(parent){var _this=this;var print=function(node,opts){return _this.print(node,parent,opts)};print.sequence=function(nodes){var opts=arguments[1]===undefined?{}:arguments[1];opts.statement=true;return _this.printJoin(print,nodes,opts)};print.join=function(nodes,opts){return _this.printJoin(print,nodes,opts)};print.list=function(items){var opts=arguments[1]===undefined?{}:arguments[1];var _opts=opts;if(!_opts.separator)_opts.separator=", ";print.join(items,opts)};print.block=function(node){return _this.printBlock(print,node)};print.indentOnComments=function(node){return _this.printAndIndentOnComments(print,node)};return print};CodeGenerator.prototype.print=function print(node,parent){var _this=this;var opts=arguments[2]===undefined?{}:arguments[2];if(!node)return;if(parent&&parent._compact){node._compact=true}var oldConcise=this.format.concise;if(node._compact){this.format.concise=true}var newline=function(leading){if(!opts.statement&&!n.isUserWhitespacable(node,parent)){return}var lines=0;if(node.start!=null&&!node._ignoreUserWhitespace){if(leading){lines=_this.whitespace.getNewlinesBefore(node)}else{lines=_this.whitespace.getNewlinesAfter(node)}}else{if(!leading)lines++;if(opts.addNewlines)lines+=opts.addNewlines(leading,node)||0;var needs=n.needsWhitespaceAfter;if(leading)needs=n.needsWhitespaceBefore;if(needs(node,parent))lines++;if(!_this.buffer.buf)lines=0}_this.newline(lines)};if(this[node.type]){var needsNoLineTermParens=n.needsParensNoLineTerminator(node,parent);var needsParens=needsNoLineTermParens||n.needsParens(node,parent);if(needsParens)this.push("(");if(needsNoLineTermParens)this.indent();this.printLeadingComments(node,parent);newline(true);if(opts.before)opts.before();this.map.mark(node,"start");this[node.type](node,this.buildPrint(node),parent);if(needsNoLineTermParens){this.newline();this.dedent()}if(needsParens)this.push(")");this.map.mark(node,"end");if(opts.after)opts.after();newline(false);this.printTrailingComments(node,parent)}else{throw new ReferenceError("unknown node of type "+JSON.stringify(node.type)+" with constructor "+JSON.stringify(node&&node.constructor.name))}this.format.concise=oldConcise};CodeGenerator.prototype.printJoin=function printJoin(print,nodes){var _this=this;var opts=arguments[2]===undefined?{}:arguments[2];if(!nodes||!nodes.length)return;var len=nodes.length;if(opts.indent)this.indent();each(nodes,function(node,i){print(node,{statement:opts.statement,addNewlines:opts.addNewlines,after:function(){if(opts.iterator){opts.iterator(node,i)}if(opts.separator&&i","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(tier,i){each(tier,function(op){PRECEDENCE[op]=i})});function NullableTypeAnnotation(node,parent){return t.isArrayTypeAnnotation(parent)}exports.FunctionTypeAnnotation=NullableTypeAnnotation;function UpdateExpression(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}}function ObjectExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function Binary(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node){return true}}}function BinaryExpression(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}}function SequenceExpression(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}return true}function YieldExpression(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)||t.isConditionalExpression(parent)||t.isYieldExpression(parent)}function ClassExpression(node,parent){return t.isExpressionStatement(parent)}function UnaryLike(node,parent){return t.isMemberExpression(parent)&&parent.object===node}function FunctionExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isCallExpression(parent)&&parent.callee===node){return true}}function ConditionalExpression(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isCallExpression(parent)||t.isNewExpression(parent)){if(parent.callee===node){return true}}if(t.isConditionalExpression(parent)&&parent.test===node){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}exports.AssignmentExpression=ConditionalExpression;exports.__esModule=true},{"../../types":124,"lodash/collection/each":203}],18:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var each=_interopRequire(require("lodash/collection/each"));var map=_interopRequire(require("lodash/collection/map"));var t=_interopRequire(require("../../types"));function crawl(node){var state=arguments[1]===undefined?{}:arguments[1];if(t.isMemberExpression(node)){crawl(node.object,state);if(node.computed)crawl(node.property,state)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){crawl(node.left,state);crawl(node.right,state)}else if(t.isCallExpression(node)){state.hasCall=true;crawl(node.callee,state)}else if(t.isFunction(node)){state.hasFunction=true}else if(t.isIdentifier(node)){var _state=state;if(!_state.hasHelper)_state.hasHelper=isHelper(node.callee)}return state}function isHelper(node){if(t.isMemberExpression(node)){return isHelper(node.object)||isHelper(node.property)}else if(t.isIdentifier(node)){return node.name==="require"||node.name[0]==="_"}else if(t.isCallExpression(node)){return isHelper(node.callee)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){return t.isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)}else{return false}}function isType(node){return t.isLiteral(node)||t.isObjectExpression(node)||t.isArrayExpression(node)||t.isIdentifier(node)||t.isMemberExpression(node)}exports.nodes={AssignmentExpression:function AssignmentExpression(node){var state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction){return{before:state.hasFunction,after:true}}},SwitchCase:function SwitchCase(node,parent){return{before:node.consequent.length||parent.cases[0]===node}},LogicalExpression:function LogicalExpression(node){if(t.isFunction(node.left)||t.isFunction(node.right)){return{after:true}}},Literal:function Literal(node){if(node.value==="use strict"){return{after:true}}},CallExpression:function CallExpression(node){if(t.isFunction(node.callee)||isHelper(node)){return{before:true,after:true}}},VariableDeclaration:function VariableDeclaration(node){for(var i=0;i=max){i-=max}return i}var Whitespace=function(){function Whitespace(tokens,comments){_classCallCheck(this,Whitespace);this.tokens=sortBy(tokens.concat(comments),"start");this.used={};this._lastFoundIndex=0}Whitespace.prototype.getNewlinesBefore=function getNewlinesBefore(node){var startToken;var endToken;var tokens=this.tokens;var token;for(var j=0;j")}}).join("\n")}},{chalk:170,esutils:187,"js-tokens":193,"line-numbers":195,"lodash/function/ary":212,repeating:330}],23:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var t=_interopRequire(require("../types"));module.exports=function(ast,comments,tokens){if(ast&&ast.type==="Program"){return t.file(ast,comments||[],tokens||[])}else{throw new Error("Not a valid ast?")}}},{"../types":124}],24:[function(require,module,exports){"use strict";module.exports=function(){return Object.create(null)}},{}],25:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var normalizeAst=_interopRequire(require("./normalize-ast"));var estraverse=_interopRequire(require("estraverse"));var codeFrame=_interopRequire(require("./code-frame"));var acorn=_interopRequire(require("acorn-babel"));module.exports=function(opts,code,callback){try{var comments=[];var tokens=[];var ast=acorn.parse(code,{allowImportExportEverywhere:opts.allowImportExportEverywhere,allowReturnOutsideFunction:!opts._anal,ecmaVersion:opts.experimental?7:6,playground:opts.playground,strictMode:opts.strictMode,onComment:comments,locations:true,onToken:tokens,ranges:true});estraverse.attachComments(ast,comments,tokens);ast=normalizeAst(ast,comments,tokens);if(callback){return callback(ast)}else{return ast}}catch(err){if(!err._babel){err._babel=true;var message=""+opts.filename+": "+err.message;var loc=err.loc;if(loc){var frame=codeFrame(code,loc.line,loc.column+1);message+=frame}if(err.stack)err.stack=err.stack.replace(err.message,message);err.message=message}throw err}}},{"./code-frame":22,"./normalize-ast":23,"acorn-babel":127,estraverse:183}],26:[function(require,module,exports){"use strict";module.exports=function toFastProperties(obj){function f(){}f.prototype=obj;return f;eval(obj)}},{}],27:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.get=get;exports.parseArgs=parseArgs;var util=_interopRequireWildcard(require("util"));var messages=exports.messages={tailCallReassignmentDeopt:"Function reference has been reassigned so it's probably be dereferenced so we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",classesIllegalConstructorKind:"Illegal kind for constructor method",scopeDuplicateDeclaration:"Duplicate declaration $1",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",settersInvalidParamLength:"Setters must have exactly one parameter",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemeberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",modulesIllegalExportName:"Illegal export $1",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",evalInStrictMode:"eval is not allowed in strict mode",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2."};function get(key){var msg=messages[key];if(!msg)throw new ReferenceError("Unknown message "+JSON.stringify(key));var args=[];for(var i=1;i=0};File.prototype.attachAuxiliaryComment=function attachAuxiliaryComment(node){var comment=this.opts.auxiliaryComment;if(comment){var _node=node;if(!_node.leadingComments)_node.leadingComments=[];node.leadingComments.push({type:"Line",value:" "+comment})}return node};File.prototype.addHelper=function addHelper(name){if(!includes(File.helpers,name)){throw new ReferenceError("Unknown helper "+name)}var program=this.ast.program;var declar=program._declarations&&program._declarations[name];if(declar)return declar.id;this.usedHelpers[name]=true;var runtime=this.get("helpersNamespace");if(runtime){name=t.identifier(t.toIdentifier(name));return t.memberExpression(runtime,name)}else{var ref=util.template(name);ref._compact=true;var uid=this.scope.generateUidIdentifier(name);this.scope.push({key:name,id:uid,init:ref});return uid}};File.prototype.logDeopt=function logDeopt(){};File.prototype.errorWithNode=function errorWithNode(node,msg){var Error=arguments[2]===undefined?SyntaxError:arguments[2];var loc=node.loc.start;var err=new Error("Line "+loc.line+": "+msg);err.loc=loc;return err};File.prototype.addCode=function addCode(code){code=(code||"")+"";this.code=code;return this.parseShebang(code)};File.prototype.parse=function(_parse){var _parseWrapper=function parse(_x){return _parse.apply(this,arguments)};_parseWrapper.toString=function(){return _parse.toString()};return _parseWrapper}(function(code){var _this=this;code=this.addCode(code);var opts=this.opts;opts.allowImportExportEverywhere=this.isLoose("es6.modules");opts.strictMode=this.transformers.strict.canRun();return parse(opts,code,function(tree){_this.transform(tree);return _this.generate()})});File.prototype.transform=function transform(ast){this.debug();this.ast=ast;this.lastStatements=t.getLastStatements(ast.program);this.scope=new Scope(ast.program,ast,null,this);var modFormatter=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);if(modFormatter.init&&this.transformers["es6.modules"].canRun()){modFormatter.init()}this.checkNode(ast);this.call("pre");each(this.transformerStack,function(pass){pass.transform()});this.call("post")};File.prototype.call=function call(key){var stack=this.transformerStack;for(var i=0;i=3){callExpr._prettyCall=true}return t.inherits(callExpr,node)}};var isStringLiteral=function isStringLiteral(node){return t.isLiteral(node)&&isString(node.value)};var flatten=function flatten(args){var flattened=[];var last;for(var i=0;i=0}function pullFlag(node,flag){var flags=node.regex.flags.split("");if(node.regex.flags.indexOf("u")<0)return;pull(flags,"u");node.regex.flags=flags.join("")}exports.__esModule=true},{"../../types":124,"lodash/array/pull":200}],40:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var t=_interopRequire(require("../../types"));var visitor={enter:function enter(node){if(t.isFunction(node))this.skip();if(t.isAwaitExpression(node)){node.type="YieldExpression";if(node.all){node.all=false;node.argument=t.callExpression(t.memberExpression(t.identifier("Promise"),t.identifier("all")),[node.argument])}}}};module.exports=function(node,callId,scope){node.async=false;node.generator=true;scope.traverse(node,visitor);var call=t.callExpression(callId,[node]);var id=node.id;delete node.id;if(t.isFunctionDeclaration(node)){var declar=t.variableDeclaration("let",[t.variableDeclarator(id,call)]);declar._blockHoist=true;return declar}else{return call}}},{"../../types":124}],41:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _toConsumableArray=function(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i1){var uid=this.scope.generateUidIdentifier(source);nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,call)]));return uid}else{return call}};return CommonJSFormatter}(DefaultFormatter);module.exports=CommonJSFormatter},{"../../types":124,"../../util":126,"./_default":44,"lodash/collection/includes":206}],50:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var t=_interopRequire(require("../../types"));var IgnoreFormatter=function(){function IgnoreFormatter(){_classCallCheck(this,IgnoreFormatter)}IgnoreFormatter.prototype.exportDeclaration=function exportDeclaration(node,nodes){var declar=t.toStatement(node.declaration,true);if(declar)nodes.push(t.inherits(declar,node))};IgnoreFormatter.prototype.importDeclaration=function importDeclaration(){};IgnoreFormatter.prototype.importSpecifier=function importSpecifier(){};IgnoreFormatter.prototype.exportSpecifier=function exportSpecifier(){};return IgnoreFormatter}();module.exports=IgnoreFormatter},{"../../types":124}],51:[function(require,module,exports){"use strict";module.exports={commonStrict:require("./common-strict"),amdStrict:require("./amd-strict"),umdStrict:require("./umd-strict"),common:require("./common"),system:require("./system"),ignore:require("./ignore"),amd:require("./amd"),umd:require("./umd")}},{"./amd":47,"./amd-strict":46,"./common":49,"./common-strict":48,"./ignore":50,"./system":52,"./umd":54,"./umd-strict":53}],52:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _inherits=function(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)subClass.__proto__=superClass};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var DefaultFormatter=_interopRequire(require("./_default"));var AMDFormatter=_interopRequire(require("./amd"));var util=_interopRequireWildcard(require("../../util"));var last=_interopRequire(require("lodash/array/last"));var each=_interopRequire(require("lodash/collection/each"));var map=_interopRequire(require("lodash/collection/map"));var t=_interopRequire(require("../../types"));var hoistVariablesVisitor={enter:function enter(node,parent,scope,hoistDeclarators){if(t.isFunction(node)){return this.skip()}if(t.isVariableDeclaration(node)){if(node.kind!=="var"&&!t.isProgram(parent)){return}if(node._blockHoist)return;var nodes=[];for(var i=0;i=0){return}loopText=""+loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(t.isReturnStatement(node)){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);return t.inherits(replace,node)}}};var BlockScoping=function(){function BlockScoping(loopParent,block,parent,scope,file){_classCallCheck(this,BlockScoping);this.loopParent=loopParent;this.parent=parent;this.scope=scope;this.block=block;this.file=file;this.outsideLetReferences=object();this.hasLetReferences=false;this.letReferences=block._letReferences=object();this.body=[]}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}};BlockScoping.prototype.remap=function remap(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=object();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loopParent=this.loopParent;if(loopParent){traverseReplace(loopParent.right,loopParent,scope,remaps);traverseReplace(loopParent.test,loopParent,scope,remaps);traverseReplace(loopParent.update,loopParent,scope,remaps)}scope.traverse(this.block,replaceVisitor,remaps)};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loopParent){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=values(outsideRefs);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn._aliasFunction=true;block.body=this.body;var call=t.callExpression(fn,params);var ret=this.scope.generateUidIdentifier("ret");var hasYield=traverse.hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=traverse.hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call,true)}this.build(ret,call)};BlockScoping.prototype.getLetReferences=function getLetReferences(){var block=this.block;var declarators=block._letDeclarators||[];var declar;for(var i=0;i=spreadPropIndex)break;if(t.isSpreadProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key))key=t.literal(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef)}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[objRef])))}if(pattern.properties.length>1&&t.isMemberExpression(objRef)){var temp=this.scope.generateUidBasedOnNode(objRef,this.file);this.nodes.push(this.buildVariableDeclaration(temp,objRef));objRef=temp}for(var i=0;iarr.elements.length)return;if(pattern.elements.length0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.literal(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)&&!t.isIdentifier(ref)){var key=this.scope.generateUidBasedOnNode(ref);this.nodes.push(this.buildVariableDeclaration(key,ref));ref=key}this.push(pattern,ref)};return DestructuringTransformer}();exports.__esModule=true},{"../../../messages":27,"../../../types":124}],68:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ForOfStatement=ForOfStatement;var messages=_interopRequireWildcard(require("../../../messages"));var util=_interopRequireWildcard(require("../../../util"));var t=_interopRequire(require("../../../types"));var check=exports.check=t.isForOfStatement;function ForOfStatement(node,parent,scope,file){var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,file);var declar=build.declar;var loop=build.loop;var block=loop.body;t.inheritsComments(loop,node);t.ensureBlock(node);if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);loop._scopeInfo=node._scopeInfo;if(build.replaceParent){this.parentPath.node=build.node}else{return build.node}}var breakVisitor={enter:function enter(node,parent,scope,state){if(t.isLoop(node)){state.ignoreLabeless=true;scope.traverse(node,breakVisitor,state);state.ignoreLabeless=false;return this.skip()}if(t.isBreakStatement(node)){if(!node.label&&state.ignoreLabeless)return;if(node.label&&node.label.name!==state.label)return;var ret=t.expressionStatement(t.callExpression(t.memberExpression(state.iteratorKey,t.identifier("return")),[]));ret=state.wrapReturn(ret);this.skip();return[ret,node]}}};var loose=function loose(node,parent,scope,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=util.template("for-of-loose",{LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}scope.traverse(node,breakVisitor,{iteratorKey:iteratorKey,label:t.isLabeledStatement(parent)&&parent.label.name,wrapReturn:function wrapReturn(node){return t.ifStatement(t.logicalExpression("&&",t.unaryExpression("!",isArrayKey,true),t.memberExpression(iteratorKey,t.identifier("return"))),node)}});return{declar:declar,node:loop,loop:loop}};var spec=function spec(node,parent,scope,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=util.template("for-of",{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}scope.traverse(node,breakVisitor,{iteratorKey:iteratorKey,label:isLabeledParent&&parent.label.name,wrapReturn:function wrapReturn(node){return t.ifStatement(t.memberExpression(iteratorKey,t.identifier("return")),node)}});return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}};exports.__esModule=true},{"../../../messages":27,"../../../types":124,"../../../util":126}],69:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj -};exports.ImportDeclaration=ImportDeclaration;exports.ExportDeclaration=ExportDeclaration;var t=_interopRequire(require("../../../types"));exports.check=require("../internal/modules").check;function ImportDeclaration(node,parent,scope,file){if(node.isType)return;var nodes=[];if(node.specifiers.length){for(var i=0;i",len,start),t.binaryExpression("-",len,start),t.literal(0))}scope.assignTypeGeneric(rest.name,"Array");var loop=util.template("rest",{ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)};exports.__esModule=true},{"../../../types":124,"../../../util":126,"lodash/lang/isNumber":296}],73:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.check=check;exports.ObjectExpression=ObjectExpression;var t=_interopRequire(require("../../../types"));function loose(node,body,objId){for(var i=0;i0){var declarations=flatten(map(this.vars,function(decl){return decl.declarations},this));var statement=reduceRight(declarations,function(expr,decl){return t.assignmentExpression("=",decl.id,expr)},t.identifier("undefined"));body.unshift(t.expressionStatement(statement))}var paramDecls=this.paramDecls;if(paramDecls.length>0){body.unshift(t.variableDeclaration("var",paramDecls))}body.unshift(t.expressionStatement(t.assignmentExpression("=",this.getAgainId(),t.literal(false))));node.body=util.template("tail-call-body",{AGAIN_ID:this.getAgainId(),THIS_ID:this.thisId,ARGUMENTS_ID:this.argumentsId,FUNCTION_ID:this.getFunctionId(),BLOCK:node.body});var topVars=[];if(this.needsThis){topVars.push(t.variableDeclarator(this.getThisId(),t.thisExpression()))}if(this.needsArguments||this.setsArguments){var decl=t.variableDeclarator(this.getArgumentsId());if(this.needsArguments){decl.init=t.identifier("arguments")}topVars.push(decl)}var leftId=this.leftId;if(leftId){topVars.push(t.variableDeclarator(leftId))}if(topVars.length>0){node.body.body.unshift(t.variableDeclaration("var",topVars))}};TailCallTransformer.prototype.subTransform=function subTransform(node){if(!node)return;var handler=this["subTransform"+node.type];if(handler)return handler.call(this,node)};TailCallTransformer.prototype.subTransformConditionalExpression=function subTransformConditionalExpression(node){var callConsequent=this.subTransform(node.consequent);var callAlternate=this.subTransform(node.alternate);if(!callConsequent&&!callAlternate){return}node.type="IfStatement";node.consequent=callConsequent?t.toBlock(callConsequent):returnBlock(node.consequent);if(callAlternate){node.alternate=t.isIfStatement(callAlternate)?callAlternate:t.toBlock(callAlternate)}else{node.alternate=returnBlock(node.alternate)}return[node]};TailCallTransformer.prototype.subTransformLogicalExpression=function subTransformLogicalExpression(node){var callRight=this.subTransform(node.right);if(!callRight)return;var leftId=this.getLeftId();var testExpr=t.assignmentExpression("=",leftId,node.left);if(node.operator==="&&"){testExpr=t.unaryExpression("!",testExpr)}return[t.ifStatement(testExpr,returnBlock(leftId))].concat(callRight)};TailCallTransformer.prototype.subTransformSequenceExpression=function subTransformSequenceExpression(node){var seq=node.expressions;var lastCall=this.subTransform(seq[seq.length-1]);if(!lastCall){return}if(--seq.length===1){node=seq[0]}return[t.expressionStatement(node)].concat(lastCall)};TailCallTransformer.prototype.subTransformCallExpression=function subTransformCallExpression(node){var callee=node.callee,thisBinding,args;if(t.isMemberExpression(callee,{computed:false})&&t.isIdentifier(callee.property)){switch(callee.property.name){case"call":args=t.arrayExpression(node.arguments.slice(1));break;case"apply":args=node.arguments[1]||t.identifier("undefined");break;default:return}thisBinding=node.arguments[0];callee=callee.object}if(!t.isIdentifier(callee)||!this.scope.bindingIdentifierEquals(callee.name,this.ownerId)){return}this.hasTailRecursion=true;if(this.hasDeopt())return;var body=[];if(!t.isThisExpression(thisBinding)){body.push(t.expressionStatement(t.assignmentExpression("=",this.getThisId(),thisBinding||t.identifier("undefined"))))}if(!args){args=t.arrayExpression(node.arguments)}var argumentsId=this.getArgumentsId();var params=this.getParams();body.push(t.expressionStatement(t.assignmentExpression("=",argumentsId,args)));var i,param;if(t.isArrayExpression(args)){var elems=args.elements;for(i=0;i1){var last=nodes[nodes.length-1];if(t.isLiteral(last,{value:""}))nodes.pop();var root=buildBinaryExpression(nodes.shift(),nodes.shift());for(i=0;i3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}var msg; -if(closest){msg=messages.get("undeclaredVariableSuggestion",node.name,closest)}else{msg=messages.get("undeclaredVariable",node.name)}throw file.errorWithNode(node,msg,ReferenceError)}exports.__esModule=true},{"../../../messages":27,"../../../types":124,leven:194}],118:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var TraversalPath=_interopRequire(require("./path"));var flatten=_interopRequire(require("lodash/array/flatten"));var compact=_interopRequire(require("lodash/array/compact"));var TraversalConext=function(){function TraversalConext(scope,opts,state,parentPath){_classCallCheck(this,TraversalConext);this.shouldFlatten=false;this.parentPath=parentPath;this.scope=scope;this.state=state;this.opts=opts}TraversalConext.prototype.flatten=function flatten(){this.shouldFlatten=true};TraversalConext.prototype.visitNode=function visitNode(node,obj,key){var iteration=new TraversalPath(this,node,obj,key);return iteration.visit()};TraversalConext.prototype.visit=function visit(node,key){var nodes=node[key];if(!nodes)return;if(!Array.isArray(nodes)){return this.visitNode(node,node,key)}if(nodes.length===0){return}for(var i=0;i-1){return false}this.call("enter");if(this.shouldSkip){return this.shouldStop}node=this.node;if(Array.isArray(node)){for(var i=0;i1)id+=i;return"_"+id};Scope.prototype.generateUidBasedOnNode=function generateUidBasedOnNode(parent){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function(_add){var _addWrapper=function add(_x){return _add.apply(this,arguments)};_addWrapper.toString=function(){return _add.toString()};return _addWrapper}(function(node){if(t.isMemberExpression(node)){add(node.object);add(node.property)}else if(t.isIdentifier(node)){parts.push(node.name)}else if(t.isLiteral(node)){parts.push(node.value)}else if(t.isCallExpression(node)){add(node.callee)}});add(node);var id=parts.join("$");id=id.replace(/^_/,"")||"ref";return this.generateUidIdentifier(id)};Scope.prototype.generateTempBasedOnNode=function generateTempBasedOnNode(node){if(t.isIdentifier(node)&&this.hasBinding(node.name)){return null}var id=this.generateUidBasedOnNode(node);this.push({key:id.name,id:id});return id};Scope.prototype.checkBlockScopedCollisions=function checkBlockScopedCollisions(kind,name,id){var local=this.getOwnBindingInfo(name);if(!local)return;if(kind==="param")return;if(kind==="hoisted"&&local.kind==="let")return;if(local.kind==="let"||local.kind==="const"||local.kind==="module"){throw this.file.errorWithNode(id,messages.get("scopeDuplicateDeclaration",name),TypeError)}};Scope.prototype.rename=function rename(oldName,newName){if(!newName)newName=this.generateUidIdentifier(oldName).name;var info=this.getBindingInfo(oldName);if(!info)return;var binding=info.identifier;var scope=info.scope;scope.traverse(scope.block,{enter:function enter(node,parent,scope){if(t.isReferencedIdentifier(node,parent)&&node.name===oldName){node.name=newName}else if(t.isDeclaration(node)){var ids=t.getBindingIdentifiers(node);for(var name in ids){if(name===oldName)ids[name].name=newName}}else if(t.isScope(node,parent)){if(!scope.bindingIdentifierEquals(oldName,binding)){this.skip()}}}});this.clearOwnBinding(oldName);scope.bindings[newName]=info;binding.name=newName};Scope.prototype.inferType=function inferType(node){var target;if(t.isVariableDeclarator(node)){target=node.init}if(t.isArrayExpression(target)){return t.genericTypeAnnotation(t.identifier("Array"))}if(t.isObjectExpression(target)){return}if(t.isLiteral(target)){return}if(t.isCallExpression(target)&&t.isIdentifier(target.callee)){var funcInfo=this.getBindingInfo(target.callee.name);if(funcInfo){var funcNode=funcInfo.node;return!funcInfo.reassigned&&t.isFunction(funcNode)&&node.returnType}}if(t.isIdentifier(target)){return}};Scope.prototype.isTypeGeneric=function isTypeGeneric(name,genericName){var info=this.getBindingInfo(name);if(!info)return false;var type=info.typeAnnotation;return t.isGenericTypeAnnotation(type)&&t.isIdentifier(type.id,{name:genericName})};Scope.prototype.assignTypeGeneric=function assignTypeGeneric(name,type){this.assignType(name,t.genericTypeAnnotation(t.identifier(type)))};Scope.prototype.assignType=function assignType(name,type){var info=this.getBindingInfo(name);if(!info)return;info.typeAnnotation=type};Scope.prototype.getTypeAnnotation=function getTypeAnnotation(name,id,node){var info={annotation:null,inferred:false};var type;if(id.typeAnnotation){type=id.typeAnnotation}if(!type){info.inferred=true;type=this.inferType(node)}if(type){if(t.isTypeAnnotation(type))type=type.typeAnnotation;info.annotation=type}return info};Scope.prototype.toArray=function toArray(node,i){var file=this.file;if(t.isIdentifier(node)&&this.isTypeGeneric(node.name,"Array")){return node}if(t.isArrayExpression(node)){return node}if(t.isIdentifier(node,{name:"arguments"})){return t.callExpression(t.memberExpression(file.addHelper("slice"),t.identifier("call")),[node])}var helperName="to-array";var args=[node];if(i===true){helperName="to-consumable-array"}else if(i){args.push(t.literal(i));helperName="sliced-to-array"}return t.callExpression(file.addHelper(helperName),args)};Scope.prototype.clearOwnBinding=function clearOwnBinding(name){delete this.bindings[name]};Scope.prototype.registerDeclaration=function registerDeclaration(node){if(t.isFunctionDeclaration(node)){this.registerBinding("hoisted",node)}else if(t.isVariableDeclaration(node)){for(var i=0;i-1}}if(!typeMatches){return false}if(typeof opts!=="undefined"){return t.shallowEqual(node,opts)}return true};t.BUILDER_KEYS=require("./builder-keys");each(t.VISITOR_KEYS,function(keys,type){if(t.BUILDER_KEYS[type])return;var defs={};each(keys,function(key){defs[key]=null});t.BUILDER_KEYS[type]=defs});each(t.BUILDER_KEYS,function(keys,type){t[type[0].toLowerCase()+type.slice(1)]=function(){var node={};node.start=null;node.type=type;var i=0;for(var key in keys){var arg=arguments[i++];if(arg===undefined)arg=keys[key];node[key]=arg}return node}});t.toComputedKey=function(node,key){if(!node.computed){if(t.isIdentifier(key))key=t.literal(key.name)}return key};t.isFalsyExpression=function(node){if(t.isLiteral(node)){return!node.value}else if(t.isIdentifier(node)){return node.name==="undefined"}return false};t.toSequenceExpression=function(nodes,scope){var exprs=[];each(nodes,function(node){if(t.isExpression(node)){exprs.push(node)}if(t.isExpressionStatement(node)){exprs.push(node.expression)}else if(t.isVariableDeclaration(node)){each(node.declarations,function(declar){scope.push({kind:node.kind,key:declar.id.name,id:declar.id});exprs.push(t.assignmentExpression("=",declar.id,declar.init))})}});if(exprs.length===1){return exprs[0]}else{return t.sequenceExpression(exprs)}};t.shallowEqual=function(actual,expected){var keys=Object.keys(expected);for(var i=0;iparts.length){return false}}return true}};t.toStatement=function(node,ignore){if(t.isStatement(node)){return node}var mustHaveId=false;var newType;if(t.isClass(node)){mustHaveId=true;newType="ClassDeclaration"}else if(t.isFunction(node)){mustHaveId=true;newType="FunctionDeclaration"}else if(t.isAssignmentExpression(node)){return t.expressionStatement(node)}if(mustHaveId&&!node.id){newType=false}if(!newType){if(ignore){return false}else{throw new Error("cannot turn "+node.type+" to a statement") -}}node.type=newType;return node};t.toExpression=function(node){if(t.isExpressionStatement(node)){node=node.expression}if(t.isClass(node)){node.type="ClassExpression"}else if(t.isFunction(node)){node.type="FunctionExpression"}if(t.isExpression(node)){return node}else{throw new Error("cannot turn "+node.type+" to an expression")}};t.toBlock=function(node,parent){if(t.isBlockStatement(node)){return node}if(t.isEmptyStatement(node)){node=[]}if(!Array.isArray(node)){if(!t.isStatement(node)){if(t.isFunction(parent)){node=t.returnStatement(node)}else{node=t.expressionStatement(node)}}node=[node]}return t.blockStatement(node)};t.getBindingIdentifiers=function(node){var search=[].concat(node);var ids=object();while(search.length){var id=search.shift();if(!id)continue;var keys=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){ids[id.name]=id}else if(t.isImportSpecifier(id)){search.push(id.name||id.id)}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(keys){for(var i=0;i":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right}}confident=false}};t.valueToNode=function(value){if(value===undefined){return t.identifier("undefined")}if(value===true||value===false||value===null||isString(value)||isNumber(value)||isRegExp(value)){return t.literal(value)}if(Array.isArray(value)){return t.arrayExpression(value.map(t.valueToNode))}if(isPlainObject(value)){var props=[];for(var key in value){var nodeKey;if(t.isValidIdentifier(key)){nodeKey=t.identifier(key)}else{nodeKey=t.literal(key)}props.push(t.property("init",nodeKey,t.valueToNode(value[key])))}return t.objectExpression(props)}throw new Error("don't know how to turn this value into a node")};toFastProperties(t);toFastProperties(t.VISITOR_KEYS)},{"../helpers/object":24,"../helpers/to-fast-properties":26,"./alias-keys":122,"./builder-keys":123,"./visitor-keys":125,esutils:187,"lodash/array/compact":197,"lodash/array/uniq":201,"lodash/collection/each":203,"lodash/lang/isNumber":296,"lodash/lang/isPlainObject":298,"lodash/lang/isRegExp":299,"lodash/lang/isString":300}],125:[function(require,module,exports){module.exports={ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation"],ArrowFunctionExpression:["params","defaults","rest","body","returnType"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BindFunctionExpression:["callee","arguments"],BindMemberExpression:["object","property","arguments"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass","typeParameters","superTypeParameters","implements"],ClassExpression:["id","body","superClass","typeParameters","superTypeParameters","implements"],ComprehensionBlock:["left","right","body"],ComprehensionExpression:["filter","blocks","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportBatchSpecifier:[],ExportDeclaration:["declaration","specifiers","source"],ExportSpecifier:["id","name"],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","defaults","rest","body","returnType","typeParameters"],FunctionExpression:["id","params","defaults","rest","body","returnType","typeParameters"],Identifier:["typeAnnotation"],IfStatement:["test","consequent","alternate"],ImportBatchSpecifier:["id"],ImportDeclaration:["specifiers","source"],ImportSpecifier:["id","name"],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties","typeAnnotation"],PrivateDeclaration:["declarations"],Program:["body"],Property:["key","value"],RestElement:["argument","typeAnnotation"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SpreadProperty:["argument"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],VirtualPropertyExpression:["object","property"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],ClassImplements:["id","typeParameters"],ClassProperty:["key","value","typeAnnotation"],DeclareClass:["id","typeParameters","extends","body"],DeclareFunction:["id"],DeclareModule:["id","body"],DeclareVariable:["id"],FunctionTypeAnnotation:["typeParameters","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],IntersectionTypeAnnotation:["types"],NullableTypeAnnotation:["typeAnnotation"],NumberTypeAnnotation:[],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],TupleTypeAnnotation:["types"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],ObjectTypeAnnotation:["key","value"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value"],ObjectTypeProperty:["key","value"],QualifiedTypeIdentifier:["id","qualification"],UnionTypeAnnotation:["types"],VoidTypeAnnotation:[],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","closingElement","children"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXSpreadAttribute:["argument"]}},{}],126:[function(require,module,exports){(function(__dirname){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.canCompile=canCompile;exports.resolve=resolve;exports.list=list;exports.regexify=regexify;exports.arrayify=arrayify;exports.booleanify=booleanify;exports.template=template;exports.parseTemplate=parseTemplate;require("./patch");var buildDebug=_interopRequire(require("debug/node"));var cloneDeep=_interopRequire(require("lodash/lang/cloneDeep"));var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var contains=_interopRequire(require("lodash/collection/contains"));var traverse=_interopRequire(require("./traversal"));var isString=_interopRequire(require("lodash/lang/isString"));var isRegExp=_interopRequire(require("lodash/lang/isRegExp"));var isEmpty=_interopRequire(require("lodash/lang/isEmpty"));var parse=_interopRequire(require("./helpers/parse"));var path=_interopRequire(require("path"));var each=_interopRequire(require("lodash/collection/each"));var has=_interopRequire(require("lodash/object/has"));var fs=_interopRequire(require("fs"));var t=_interopRequire(require("./types"));var _util=require("util");exports.inherits=_util.inherits;exports.inspect=_util.inspect;var debug=exports.debug=buildDebug("babel");function canCompile(filename,altExts){var exts=altExts||canCompile.EXTENSIONS;var ext=path.extname(filename);return contains(exts,ext)}canCompile.EXTENSIONS=[".js",".jsx",".es6",".es"];function resolve(loc){try{return require.resolve(loc)}catch(err){return null}}function list(val){return val?val.split(","):[]}function regexify(val){if(!val)return new RegExp(/.^/);if(Array.isArray(val))val=val.join("|");if(isString(val))return new RegExp(val);if(isRegExp(val))return val;throw new TypeError("illegal type for regexify")}function arrayify(val){if(!val)return[];if(isBoolean(val))return[val];if(isString(val))return list(val);if(Array.isArray(val))return val;throw new TypeError("illegal type for arrayify")}function booleanify(val){if(val==="true")return true;if(val==="false")return false;return val}var templateVisitor={enter:function enter(node,parent,scope,nodes){if(t.isExpressionStatement(node)){node=node.expression}if(t.isIdentifier(node)&&has(nodes,node.name)){this.skip();return nodes[node.name]}}};function template(name,nodes,keepExpression){var ast=exports.templates[name];if(!ast)throw new ReferenceError("unknown template "+name);if(nodes===true){keepExpression=true;nodes=null}ast=cloneDeep(ast);if(!isEmpty(nodes)){traverse(ast,templateVisitor,null,nodes)}if(ast.body.length>1)return ast.body;var node=ast.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}}function parseTemplate(loc,code){var ast=parse({filename:loc},code).program;return traverse.removeProperties(ast)}function loadTemplates(){var templates={};var templatesLoc=path.join(__dirname,"transformation/templates");if(!fs.existsSync(templatesLoc)){throw new Error("no templates directory - this is most likely the "+"result of a broken `npm publish`. Please report to "+"https://github.com/babel/babel/issues")}each(fs.readdirSync(templatesLoc),function(name){if(name[0]===".")return;var key=path.basename(name,path.extname(name));var loc=path.join(templatesLoc,name);var code=fs.readFileSync(loc,"utf8");templates[key]=parseTemplate(loc,code)});return templates}try{exports.templates=require("../../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}exports.__esModule=true}).call(this,"/lib/babel")},{"../../templates.json":348,"./helpers/parse":25,"./patch":28,"./traversal":119,"./types":124,"debug/node":180,fs:142,"lodash/collection/contains":202,"lodash/collection/each":203,"lodash/lang/cloneDeep":289,"lodash/lang/isBoolean":292,"lodash/lang/isEmpty":293,"lodash/lang/isRegExp":299,"lodash/lang/isString":300,"lodash/object/has":305,path:152,util:169}],127:[function(require,module,exports){(function(root,mod){if(typeof exports=="object"&&typeof module=="object")return mod(exports);if(typeof define=="function"&&define.amd)return define(["exports"],mod);mod(root.acorn||(root.acorn={}))})(this,function(exports){"use strict";exports.version="0.11.1";var options,input,inputLen,sourceFile;exports.parse=function(inpt,opts){input=String(inpt);inputLen=input.length;setOptions(opts);initTokenState();var startPos=options.locations?[tokPos,curPosition()]:tokPos;initParserState();if(options.strictMode){strict=true}return parseTopLevel(options.program||startNodeAt(startPos))};var defaultOptions=exports.defaultOptions={strictMode:false,playground:false,ecmaVersion:5,strictSemicolons:false,allowTrailingCommas:true,forbidReserved:false,allowReturnOutsideFunction:false,allowImportExportEverywhere:false,allowHashBang:false,locations:false,onToken:null,onComment:null,ranges:false,program:null,sourceFile:null,directSourceFile:null,preserveParens:false};exports.parseExpressionAt=function(inpt,pos,opts){input=String(inpt);inputLen=input.length;setOptions(opts);initTokenState(pos);initParserState();return parseExpression()};var isArray=function(obj){return Object.prototype.toString.call(obj)==="[object Array]"};function setOptions(opts){options={};for(var opt in defaultOptions)options[opt]=opts&&has(opts,opt)?opts[opt]:defaultOptions[opt];sourceFile=options.sourceFile||null;if(isArray(options.onToken)){var tokens=options.onToken;options.onToken=function(token){tokens.push(token)}}if(isArray(options.onComment)){var comments=options.onComment;options.onComment=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 SourceLocation;comment.loc.start=startLoc;comment.loc.end=endLoc}if(options.ranges)comment.range=[start,end];comments.push(comment)}}if(options.ecmaVersion>=6){isKeyword=isEcma6Keyword}else{isKeyword=isEcma5AndLessKeyword}}var getLineInfo=exports.getLineInfo=function(input,offset){for(var line=1,cur=0;;){lineBreak.lastIndex=cur;var match=lineBreak.exec(input);if(match&&match.index",beforeExpr:true},_template={type:"template"};var _ellipsis={type:"...",beforeExpr:true};var _backQuote={type:"`"},_dollarBraceL={type:"${",beforeExpr:true};var _jsxText={type:"jsxText"};var _paamayimNekudotayim={type:"::",beforeExpr:true};var _hash={type:"#"};var _slash={binop:10,beforeExpr:true},_eq={isAssign:true,beforeExpr:true};var _assign={isAssign:true,beforeExpr:true};var _incDec={postfix:true,prefix:true,isUpdate:true},_prefix={prefix:true,beforeExpr:true};var _logicalOR={binop:1,beforeExpr:true};var _logicalAND={binop:2,beforeExpr:true};var _bitwiseOR={binop:3,beforeExpr:true};var _bitwiseXOR={binop:4,beforeExpr:true};var _bitwiseAND={binop:5,beforeExpr:true};var _equality={binop:6,beforeExpr:true};var _relational={binop:7,beforeExpr:true};var _bitShift={binop:8,beforeExpr:true};var _plusMin={binop:9,prefix:true,beforeExpr:true};var _modulo={binop:10,beforeExpr:true};var _star={binop:10,beforeExpr:true};var _exponent={binop:11,beforeExpr:true,rightAssociative:true};var _jsxTagStart={type:"jsxTagStart"},_jsxTagEnd={type:"jsxTagEnd"};exports.tokTypes={bracketL:_bracketL,bracketR:_bracketR,braceL:_braceL,braceR:_braceR,parenL:_parenL,parenR:_parenR,comma:_comma,semi:_semi,colon:_colon,dot:_dot,ellipsis:_ellipsis,question:_question,slash:_slash,eq:_eq,name:_name,eof:_eof,num:_num,regexp:_regexp,string:_string,paamayimNekudotayim:_paamayimNekudotayim,exponent:_exponent,hash:_hash,arrow:_arrow,template:_template,star:_star,assign:_assign,backQuote:_backQuote,dollarBraceL:_dollarBraceL,jsxName:_jsxName,jsxText:_jsxText,jsxTagStart:_jsxTagStart,jsxTagEnd:_jsxTagEnd};for(var kw in keywordTypes)exports.tokTypes["_"+kw]=keywordTypes[kw];var isReservedWord3=function anonymous(str){switch(str.length){case 6:switch(str){case"double":case"export":case"import":case"native":case"public":case"static":case"throws":return true}return false;case 4:switch(str){case"byte":case"char":case"enum":case"goto":case"long":return true}return false;case 5:switch(str){case"class":case"final":case"float":case"short":case"super":return true}return false;case 7:switch(str){case"boolean":case"extends":case"package":case"private":return true}return false;case 9:switch(str){case"interface":case"protected":case"transient":return true}return false;case 8:switch(str){case"abstract":case"volatile":return true}return false;case 10:return str==="implements";case 3:return str==="int";case 12:return str==="synchronized"}};var isReservedWord5=function anonymous(str){switch(str.length){case 5:switch(str){case"class":case"super":case"const":return true}return false;case 6:switch(str){case"export":case"import":return true}return false;case 4:return str==="enum";case 7:return str==="extends"}};var isStrictReservedWord=function anonymous(str){switch(str.length){case 9:switch(str){case"interface":case"protected":return true}return false;case 7:switch(str){case"package":case"private":return true}return false;case 6:switch(str){case"public":case"static":return true}return false;case 10:return str==="implements";case 3:return str==="let";case 5:return str==="yield"}};var isStrictBadIdWord=function anonymous(str){switch(str){case"eval":case"arguments":return true}return false};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 isEcma5AndLessKeyword=function anonymous(str){switch(str.length){case 4:switch(str){case"case":case"else":case"with":case"null":case"true":case"void":case"this":return true}return false;case 5:switch(str){case"break":case"catch":case"throw":case"while":case"false":return true}return false;case 3:switch(str){case"for":case"try":case"var":case"new":return true}return false;case 6:switch(str){case"return":case"switch":case"typeof":case"delete":return true}return false;case 8:switch(str){case"continue":case"debugger":case"function":return true}return false;case 2:switch(str){case"do":case"if":case"in":return true}return false;case 7:switch(str){case"default":case"finally":return true}return false;case 10:return str==="instanceof"}};var ecma6AndLessKeywords=ecma5AndLessKeywords+" let const class extends export import yield";var isEcma6Keyword=function anonymous(str){switch(str.length){case 5:switch(str){case"break":case"catch":case"throw":case"while":case"false":case"const":case"class":case"yield":return true}return false;case 4:switch(str){case"case":case"else":case"with":case"null":case"true":case"void":case"this":return true}return false;case 6:switch(str){case"return":case"switch":case"typeof":case"delete":case"export":case"import":return true}return false;case 3:switch(str){case"for":case"try":case"var":case"new":case"let":return true}return false;case 8:switch(str){case"continue":case"debugger":case"function":return true}return false;case 7:switch(str){case"default":case"finally":case"extends":return true}return false;case 2:switch(str){case"do":case"if":case"in":return true}return false;case 10:return str==="instanceof"}};var isKeyword=isEcma5AndLessKeyword;var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;var nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var nonASCIIidentifierChars="̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧙ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_";var nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]");var nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");var decimalNumber=/^\d+$/;var hexNumber=/^[\da-fA-F]+$/;var newline=/[\n\r\u2028\u2029]/;function isNewLine(code){return code===10||code===13||code===8232||code==8233}var lineBreak=/\r\n|[\n\r\u2028\u2029]/g;var isIdentifierStart=exports.isIdentifierStart=function(code){if(code<65)return code===36;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code))};var isIdentifierChar=exports.isIdentifierChar=function(code){if(code<48)return code===36;if(code<58)return true;if(code<65)return false;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code))};function Position(line,col){this.line=line;this.column=col}Position.prototype.offset=function(n){return new Position(this.line,this.column+n)};function curPosition(){return new Position(tokCurLine,tokPos-tokLineStart)}function initTokenState(pos){if(pos){tokPos=pos;tokLineStart=Math.max(0,input.lastIndexOf("\n",pos));tokCurLine=input.slice(0,tokLineStart).split(newline).length}else{tokCurLine=1;tokPos=tokLineStart=0}tokType=_eof;tokContext=[b_stat];tokExprAllowed=true;inType=strict=false;if(tokPos===0&&options.allowHashBang&&input.slice(0,2)==="#!"){skipLineComment(2)}}var b_stat={token:"{",isExpr:false},b_expr={token:"{",isExpr:true},b_tmpl={token:"${",isExpr:true};var p_stat={token:"(",isExpr:false},p_expr={token:"(",isExpr:true};var q_tmpl={token:"`",isExpr:true},f_expr={token:"function",isExpr:true};var j_oTag={token:"...",isExpr:true};function curTokContext(){return tokContext[tokContext.length-1]}function braceIsBlock(prevType){var parent;if(prevType===_colon&&(parent=curTokContext()).token=="{")return!parent.isExpr;if(prevType===_return)return newline.test(input.slice(lastEnd,tokStart));if(prevType===_else||prevType===_semi||prevType===_eof)return true;if(prevType==_braceL)return curTokContext()===b_stat;return!tokExprAllowed}function finishToken(type,val){tokEnd=tokPos;if(options.locations)tokEndLoc=curPosition();var prevType=tokType,preserveSpace=false;tokType=type;tokVal=val;if(type===_parenR||type===_braceR){var out=tokContext.pop();if(out===b_tmpl){preserveSpace=tokExprAllowed=true}else if(out===b_stat&&curTokContext()===f_expr){tokContext.pop();tokExprAllowed=false}else{tokExprAllowed=!(out&&out.isExpr)}}else if(type===_braceL){switch(curTokContext()){case j_oTag:tokContext.push(b_expr);break;case j_expr:tokContext.push(b_tmpl);break;default:tokContext.push(braceIsBlock(prevType)?b_stat:b_expr)}tokExprAllowed=true}else if(type===_dollarBraceL){tokContext.push(b_tmpl);tokExprAllowed=true}else if(type==_parenL){var statementParens=prevType===_if||prevType===_for||prevType===_with||prevType===_while;tokContext.push(statementParens?p_stat:p_expr);tokExprAllowed=true}else if(type==_incDec){}else if(type.keyword&&prevType==_dot){tokExprAllowed=false}else if(type==_function){if(curTokContext()!==b_stat){tokContext.push(f_expr)}tokExprAllowed=false}else if(type===_backQuote){if(curTokContext()===q_tmpl){tokContext.pop()}else{tokContext.push(q_tmpl);preserveSpace=true}tokExprAllowed=false}else if(type===_jsxTagStart){tokContext.push(j_expr);tokContext.push(j_oTag);tokExprAllowed=false}else if(type===_jsxTagEnd){var out=tokContext.pop();if(out===j_oTag&&prevType===_slash||out===j_cTag){tokContext.pop();preserveSpace=tokExprAllowed=curTokContext()===j_expr}else{preserveSpace=tokExprAllowed=true}}else if(type===_jsxText){preserveSpace=tokExprAllowed=true}else if(type===_slash&&prevType===_jsxTagStart){tokContext.length-=2;tokContext.push(j_cTag);tokExprAllowed=false}else{tokExprAllowed=type.beforeExpr}if(!preserveSpace)skipSpace()}function skipBlockComment(){var startLoc=options.onComment&&options.locations&&curPosition();var start=tokPos,end=input.indexOf("*/",tokPos+=2);if(end===-1)raise(tokPos-2,"Unterminated comment");tokPos=end+2;if(options.locations){lineBreak.lastIndex=start;var match;while((match=lineBreak.exec(input))&&match.index8&&ch<14){++tokPos}else if(ch===47){var next=input.charCodeAt(tokPos+1);if(next===42){skipBlockComment()}else if(next===47){skipLineComment(2)}else break}else if(ch===160){++tokPos}else if(ch>=5760&&nonASCIIwhitespace.test(String.fromCharCode(ch))){++tokPos}else{break}}}function readToken_dot(){var next=input.charCodeAt(tokPos+1);if(next>=48&&next<=57)return readNumber(true);var next2=input.charCodeAt(tokPos+2);if(options.ecmaVersion>=6&&next===46&&next2===46){tokPos+=3;return finishToken(_ellipsis)}else{++tokPos;return finishToken(_dot)}}function readToken_slash(){var next=input.charCodeAt(tokPos+1);if(tokExprAllowed){++tokPos;return readRegexp()}if(next===61)return finishOp(_assign,2);return finishOp(_slash,1)}function readToken_modulo(){var next=input.charCodeAt(tokPos+1);if(next===61)return finishOp(_assign,2);return finishOp(_modulo,1)}function readToken_mult(){var type=_star;var width=1;var next=input.charCodeAt(tokPos+1);if(options.ecmaVersion>=7&&next===42){width++;next=input.charCodeAt(tokPos+2);type=_exponent}if(next===61){width++;type=_assign}return finishOp(type,width)}function readToken_pipe_amp(code){var next=input.charCodeAt(tokPos+1);if(next===code){if(options.playground&&input.charCodeAt(tokPos+2)===61)return finishOp(_assign,3);return finishOp(code===124?_logicalOR:_logicalAND,2)}if(next===61)return finishOp(_assign,2);return finishOp(code===124?_bitwiseOR:_bitwiseAND,1)}function readToken_caret(){var next=input.charCodeAt(tokPos+1);if(next===61)return finishOp(_assign,2);return finishOp(_bitwiseXOR,1)}function readToken_plus_min(code){var next=input.charCodeAt(tokPos+1);if(next===code){if(next==45&&input.charCodeAt(tokPos+2)==62&&newline.test(input.slice(lastEnd,tokPos))){skipLineComment(3);skipSpace();return readToken()}return finishOp(_incDec,2)}if(next===61)return finishOp(_assign,2);return finishOp(_plusMin,1)}function readToken_lt_gt(code){var next=input.charCodeAt(tokPos+1);var size=1;if(!inType&&next===code){size=code===62&&input.charCodeAt(tokPos+2)===62?3:2;if(input.charCodeAt(tokPos+size)===61)return finishOp(_assign,size+1);return finishOp(_bitShift,size)}if(next==33&&code==60&&input.charCodeAt(tokPos+2)==45&&input.charCodeAt(tokPos+3)==45){skipLineComment(4);skipSpace();return readToken()}if(!inType){if(tokExprAllowed&&code===60){++tokPos;return finishToken(_jsxTagStart)}if(code===62){var context=curTokContext();if(context===j_oTag||context===j_cTag){++tokPos;return finishToken(_jsxTagEnd)}}}if(next===61)size=input.charCodeAt(tokPos+2)===61?3:2;return finishOp(_relational,size)}function readToken_eq_excl(code){var next=input.charCodeAt(tokPos+1);if(next===61)return finishOp(_equality,input.charCodeAt(tokPos+2)===61?3:2);if(code===61&&next===62&&options.ecmaVersion>=6){tokPos+=2;return finishToken(_arrow)}return finishOp(code===61?_eq:_prefix,1)}function getTemplateToken(code){if(tokType===_string){if(code===96){++tokPos;return finishToken(_bquote)}else if(code===36&&input.charCodeAt(tokPos+1)===123){tokPos+=2;return finishToken(_dollarBraceL)}}return readTmplString()}function getTokenFromCode(code){switch(code){case 46:return readToken_dot();case 40:++tokPos;return finishToken(_parenL);case 41:++tokPos;return finishToken(_parenR);case 59:++tokPos;return finishToken(_semi);case 44:++tokPos;return finishToken(_comma);case 91:++tokPos;return finishToken(_bracketL);case 93:++tokPos;return finishToken(_bracketR);case 123:++tokPos;return finishToken(_braceL);case 125:++tokPos;return finishToken(_braceR);case 63:++tokPos;return finishToken(_question);case 35:if(options.playground){++tokPos;return finishToken(_hash)}case 58:++tokPos;if(options.ecmaVersion>=7){var next=input.charCodeAt(tokPos);if(next===58){++tokPos;return finishToken(_paamayimNekudotayim)}}return finishToken(_colon);case 96:if(options.ecmaVersion>=6){++tokPos;return finishToken(_backQuote)}else{return false}case 48:var next=input.charCodeAt(tokPos+1);if(next===120||next===88)return readRadixNumber(16);if(options.ecmaVersion>=6){if(next===111||next===79)return readRadixNumber(8);if(next===98||next===66)return readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return readNumber(false);case 34:case 39:return inXJSTag?readXJSStringLiteral():readString(code);case 47:return readToken_slash();case 37:return readToken_modulo();case 42:return readToken_mult();case 124:case 38:return readToken_pipe_amp(code);case 94:return readToken_caret();case 43:case 45:return readToken_plus_min(code);case 60:case 62:return readToken_lt_gt(code);case 61:case 33:return readToken_eq_excl(code);case 126:return finishOp(_prefix,1)}return false}function readToken(){tokStart=tokPos;if(options.locations)tokStartLoc=curPosition();if(tokPos>=inputLen)return finishToken(_eof);var context=curTokContext();if(context===q_tmpl){return readTmplToken()}if(context===j_expr){return readJSXToken()}var code=input.charCodeAt(tokPos);if(context===j_oTag||context===j_cTag){if(isIdentifierStart(code))return readJSXWord()}else if(context===j_expr){return readJSXToken()}else{if(isIdentifierStart(code)||code===92)return readWord()}var tok=getTokenFromCode(code);if(tok===false){var ch=String.fromCharCode(code);if(ch==="\\"||nonASCIIidentifierStart.test(ch))return readWord();raise(tokPos,"Unexpected character '"+ch+"'")}return tok}function finishOp(type,size,shouldSkipSpace){var str=input.slice(tokPos,tokPos+size);tokPos+=size;finishToken(type,str,shouldSkipSpace)}var regexpUnicodeSupport=false;try{new RegExp("￿","u");regexpUnicodeSupport=true}catch(e){}function readRegexp(){var content="",escaped,inClass,start=tokPos;for(;;){if(tokPos>=inputLen)raise(start,"Unterminated regular expression");var ch=nextChar();if(newline.test(ch))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;++tokPos}var content=input.slice(start,tokPos);++tokPos;var mods=readWord1();var tmp=content;if(mods){var validFlags=/^[gmsiy]*$/;if(options.ecmaVersion>=6)validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))raise(start,"Invalid regular expression flag");if(mods.indexOf("u")>=0&&!regexpUnicodeSupport){tmp=tmp.replace(/\\u\{([0-9a-fA-F]{5,6})\}/g,"x").replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x")}}try{new RegExp(tmp)}catch(e){if(e instanceof SyntaxError)raise(start,"Error parsing regular expression: "+e.message);raise(e)}try{var value=new RegExp(content,mods)}catch(err){value=null}return finishToken(_regexp,{pattern:content,flags:mods,value:value})}function readInt(radix,len){var start=tokPos,total=0;for(var i=0,e=len==null?Infinity:len;i=97)val=code-97+10;else if(code>=65)val=code-65+10;else if(code>=48&&code<=57)val=code-48;else val=Infinity;if(val>=radix)break;++tokPos;total=total*radix+val}if(tokPos===start||len!=null&&tokPos-start!==len)return null;return total}function readRadixNumber(radix){tokPos+=2;var val=readInt(radix);if(val==null)raise(tokStart+2,"Expected number in radix "+radix);if(isIdentifierStart(input.charCodeAt(tokPos)))raise(tokPos,"Identifier directly after number");return finishToken(_num,val)}function readNumber(startsWithDot){var start=tokPos,isFloat=false,octal=input.charCodeAt(tokPos)===48;if(!startsWithDot&&readInt(10)===null)raise(start,"Invalid number");if(input.charCodeAt(tokPos)===46){++tokPos;readInt(10);isFloat=true}var next=input.charCodeAt(tokPos);if(next===69||next===101){next=input.charCodeAt(++tokPos);if(next===43||next===45)++tokPos;if(readInt(10)===null)raise(start,"Invalid number");isFloat=true}if(isIdentifierStart(input.charCodeAt(tokPos)))raise(tokPos,"Identifier directly after number");var str=input.slice(start,tokPos),val;if(isFloat)val=parseFloat(str);else if(!octal||str.length===1)val=parseInt(str,10);else if(/[89]/.test(str)||strict)raise(start,"Invalid number");else val=parseInt(str,8);return finishToken(_num,val)}function readCodePoint(){var ch=input.charCodeAt(tokPos),code;if(ch===123){if(options.ecmaVersion<6)unexpected();++tokPos;code=readHexChar(input.indexOf("}",tokPos)-tokPos);++tokPos;if(code>1114111)unexpected()}else{code=readHexChar(4)}if(code<=65535){return String.fromCharCode(code)}var cu1=(code-65536>>10)+55296;var cu2=(code-65536&1023)+56320;return String.fromCharCode(cu1,cu2)}function readString(quote){var isJSX=curTokContext()===j_oTag;var out="",chunkStart=++tokPos;for(;;){if(tokPos>=inputLen)raise(tokStart,"Unterminated string constant");var ch=input.charCodeAt(tokPos);if(ch===quote)break;if(ch===92&&!isJSX){out+=input.slice(chunkStart,tokPos);out+=readEscapedChar();chunkStart=tokPos}else if(ch===38&&isJSX){out+=input.slice(chunkStart,tokPos);out+=readJSXEntity();chunkStart=tokPos}else{if(isNewLine(ch)&&!isJSX)raise(tokStart,"Unterminated string constant");++tokPos}}out+=input.slice(chunkStart,tokPos++);return finishToken(_string,out)}function readTmplToken(){var out="",chunkStart=tokPos;for(;;){if(tokPos>=inputLen)raise(tokStart,"Unterminated template");var ch=input.charCodeAt(tokPos);if(ch===96||ch===36&&input.charCodeAt(tokPos+1)===123){if(tokPos===tokStart&&tokType===_template){if(ch===36){tokPos+=2;return finishToken(_dollarBraceL)}else{++tokPos;return finishToken(_backQuote)}}out+=input.slice(chunkStart,tokPos);return finishToken(_template,out)}if(ch===92){out+=input.slice(chunkStart,tokPos);out+=readEscapedChar();chunkStart=tokPos}else if(isNewLine(ch)){out+=input.slice(chunkStart,tokPos);++tokPos;if(ch===13&&input.charCodeAt(tokPos)===10){++tokPos;out+="\n"}else{out+=String.fromCharCode(ch)}if(options.locations){++tokCurLine;tokLineStart=tokPos}chunkStart=tokPos}else{++tokPos}}}var XHTMLEntities={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};function readJSXEntity(){var str="",count=0,entity;var ch=input[tokPos];if(ch!=="&")raise(tokPos,"Entity must start with an ampersand");var startPos=++tokPos;while(tokPos=inputLen)raise(tokStart,"Unterminated JSX contents");var ch=input.charCodeAt(tokPos);switch(ch){case 123:case 60:if(tokPos===tokStart){return getTokenFromCode(ch)}out+=input.slice(chunkStart,tokPos);return finishToken(_jsxText,out);case 38:out+=input.slice(chunkStart,tokPos);out+=readJSXEntity();chunkStart=tokPos;break;default:if(isNewLine(ch)){out+=input.slice(chunkStart,tokPos);++tokPos;if(ch===13&&input.charCodeAt(tokPos)===10){++tokPos;out+="\n"}else{out+=String.fromCharCode(ch)}if(options.locations){++tokCurLine;tokLineStart=tokPos}chunkStart=tokPos}else{++tokPos}}}}function readEscapedChar(){var ch=input.charCodeAt(++tokPos);var octal=/^[0-7]+/.exec(input.slice(tokPos,tokPos+3));if(octal)octal=octal[0];while(octal&&parseInt(octal,8)>255)octal=octal.slice(0,-1);if(octal==="0")octal=null;++tokPos;if(octal){if(strict)raise(tokPos-2,"Octal literal in strict mode");tokPos+=octal.length-1;return String.fromCharCode(parseInt(octal,8))}else{switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(readHexChar(2));case 117:return readCodePoint();case 116:return" ";case 98:return"\b";case 118:return" ";case 102:return"\f";case 48:return"\x00";case 13:if(input.charCodeAt(tokPos)===10)++tokPos;case 10:if(options.locations){tokLineStart=tokPos;++tokCurLine}return"";default:return String.fromCharCode(ch)}}}var XHTMLEntities={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};function readXJSEntity(){var str="",count=0,entity;var ch=nextChar();if(ch!=="&")raise(tokPos,"Entity must start with an ampersand");var startPos=++tokPos;while(tokPos=5&&stmt.type==="ExpressionStatement"&&stmt.expression.type==="Literal"&&stmt.expression.value==="use strict"}function eat(type){if(tokType===type){next();return true}else{return false}}function isContextual(name){return tokType===_name&&tokVal===name}function eatContextual(name){return tokVal===name&&eat(_name)}function expectContextual(name){if(!eatContextual(name))unexpected()}function canInsertSemicolon(){return!options.strictSemicolons&&(tokType===_eof||tokType===_braceR||newline.test(input.slice(lastEnd,tokStart)))}function semicolon(){if(!eat(_semi)&&!canInsertSemicolon())unexpected()}function expect(type){eat(type)||unexpected()}function nextChar(){return input.charAt(tokPos)}function unexpected(pos){raise(pos!=null?pos:tokStart,"Unexpected token")}function has(obj,propName){return Object.prototype.hasOwnProperty.call(obj,propName)}function toAssignable(node,isBinding){if(options.ecmaVersion>=6&&node){switch(node.type){case"Identifier":case"VirtualPropertyExpression":case"MemberExpression":case"SpreadProperty":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var i=0;i=6)return;var key=prop.key,name;switch(key.type){case"Identifier":name=key.name;break;case"Literal":name=String(key.value);break;default:return}var kind=prop.kind||"init",other;if(has(propHash,name)){other=propHash[name];var isGetSet=kind!=="init";if((strict||isGetSet)&&other[kind]||!(isGetSet^other.init))raise(key.start,"Redefinition of property")}else{other=propHash[name]={init:false,get:false,set:false}}other[kind]=true}function checkLVal(expr,isBinding){switch(expr.type){case"Identifier":if(strict&&(isStrictBadIdWord(expr.name)||isStrictReservedWord(expr.name)))raise(expr.start,(isBinding?"Binding ":"Assigning to ")+expr.name+" in strict mode");break;case"MemberExpression":if(isBinding)raise(expr.start,"Binding to member expression");break;case"ObjectPattern":for(var i=0;i=6)unexpected();return parseFunctionStatement(node);case _class:if(!declaration)unexpected();return parseClass(node,true);case _if:return parseIfStatement(node);case _return:return parseReturnStatement(node);case _switch:return parseSwitchStatement(node);case _throw:return parseThrowStatement(node);case _try:return parseTryStatement(node);case _let:case _const:if(!declaration)unexpected();case _var:return parseVarStatement(node,starttype.keyword);case _while:return parseWhileStatement(node);case _with:return parseWithStatement(node);case _braceL:return parseBlock();case _semi:return parseEmptyStatement(node);case _export:case _import:if(!topLevel&&!options.allowImportExportEverywhere)raise(tokStart,"'import' and 'export' may only appear at the top level");return starttype===_import?parseImport(node):parseExport(node);case _name:if(options.ecmaVersion>=7&&tokType===_name){if(tokVal==="private"){next();return parsePrivate(node)}if(tokVal==="async"){if(input.slice(tokEnd+1,tokEnd+10)==="function "){next();expect(_function);return parseFunction(node,true,true)}}}default:var maybeName=tokVal,expr=parseExpression();if(starttype===_name&&expr.type==="Identifier"){if(eat(_colon)){return parseLabeledStatement(node,maybeName,expr)}if(expr.name==="declare"){if(tokType===_class||tokType===_name||tokType===_function||tokType===_var){return parseDeclare(node)}}else if(tokType===_name){if(expr.name==="interface"){return parseInterface(node)}else if(expr.name==="type"){return parseTypeAlias(node)}}}return parseExpressionStatement(node,expr)}}function parseBreakContinueStatement(node,keyword){var isBreak=keyword=="break";next();if(eat(_semi)||canInsertSemicolon())node.label=null;else if(tokType!==_name)unexpected();else{node.label=parseIdent();semicolon()}for(var i=0;i=6)eat(_semi);else semicolon();return finishNode(node,"DoWhileStatement")}function parseForStatement(node){next();labels.push(loopLabel);expect(_parenL);if(tokType===_semi)return parseFor(node,null);if(tokType===_var||tokType===_let){var init=startNode(),varKind=tokType.keyword,isLet=tokType===_let;next();parseVar(init,true,varKind);finishNode(init,"VariableDeclaration");if((tokType===_in||options.ecmaVersion>=6&&isContextual("of"))&&init.declarations.length===1&&!(isLet&&init.declarations[0].init))return parseForIn(node,init);return parseFor(node,init)}var refShorthandDefaultPos={start:0};var init=parseExpression(true,refShorthandDefaultPos);if(tokType===_in||options.ecmaVersion>=6&&isContextual("of")){toAssignable(init);checkLVal(init);return parseForIn(node,init)}else if(refShorthandDefaultPos.start){unexpected(refShorthandDefaultPos.start)}return parseFor(node,init)}function parseFunctionStatement(node){next();return parseFunction(node,true,false)}function parseIfStatement(node){next();node.test=parseParenExpression();node.consequent=parseStatement(false);node.alternate=eat(_else)?parseStatement(false):null;return finishNode(node,"IfStatement")}function parseReturnStatement(node){if(!inFunction&&!options.allowReturnOutsideFunction)raise(tokStart,"'return' outside of function");next();if(eat(_semi)||canInsertSemicolon())node.argument=null;else{node.argument=parseExpression();semicolon()}return finishNode(node,"ReturnStatement")}function parseSwitchStatement(node){next();node.discriminant=parseParenExpression();node.cases=[];expect(_braceL);labels.push(switchLabel);for(var cur,sawDefault;tokType!=_braceR;){if(tokType===_case||tokType===_default){var isCase=tokType===_case;if(cur)finishNode(cur,"SwitchCase");node.cases.push(cur=startNode());cur.consequent=[];next();if(isCase)cur.test=parseExpression();else{if(sawDefault)raise(lastStart,"Multiple default clauses");sawDefault=true;cur.test=null}expect(_colon)}else{if(!cur)unexpected();cur.consequent.push(parseStatement(true))}}if(cur)finishNode(cur,"SwitchCase");next();labels.pop();return finishNode(node,"SwitchStatement")}function parseThrowStatement(node){next(); -if(newline.test(input.slice(lastEnd,tokStart)))raise(lastEnd,"Illegal newline after throw");node.argument=parseExpression();semicolon();return finishNode(node,"ThrowStatement")}function parseTryStatement(node){next();node.block=parseBlock();node.handler=null;if(tokType===_catch){var clause=startNode();next();expect(_parenL);clause.param=parseBindingAtom();checkLVal(clause.param,true);expect(_parenR);clause.guard=null;clause.body=parseBlock();node.handler=finishNode(clause,"CatchClause")}node.guardedHandlers=empty;node.finalizer=eat(_finally)?parseBlock():null;if(!node.handler&&!node.finalizer)raise(node.start,"Missing catch or finally clause");return finishNode(node,"TryStatement")}function parseVarStatement(node,kind){next();parseVar(node,false,kind);semicolon();return finishNode(node,"VariableDeclaration")}function parseWhileStatement(node){next();node.test=parseParenExpression();labels.push(loopLabel);node.body=parseStatement(false);labels.pop();return finishNode(node,"WhileStatement")}function parseWithStatement(node){if(strict)raise(tokStart,"'with' in strict mode");next();node.object=parseParenExpression();node.body=parseStatement(false);return finishNode(node,"WithStatement")}function parseEmptyStatement(node){next();return finishNode(node,"EmptyStatement")}function parseLabeledStatement(node,maybeName,expr){for(var i=0;iminPrec){var node=startNodeAt(leftStart);node.left=left;node.operator=tokVal;var op=tokType;next();var start=storeCurrentPos();node.right=parseExprOp(parseMaybeUnary(),start,op.rightAssociative?prec-1:prec,noIn);finishNode(node,op===_logicalOR||op===_logicalAND?"LogicalExpression":"BinaryExpression");return parseExprOp(node,leftStart,minPrec,noIn)}}return left}function parseMaybeUnary(refShorthandDefaultPos){if(tokType.prefix){var node=startNode(),update=tokType.isUpdate;node.operator=tokVal;node.prefix=true;next();node.argument=parseMaybeUnary();if(refShorthandDefaultPos&&refShorthandDefaultPos.start)unexpected(refShorthandDefaultPos.start);if(update)checkLVal(node.argument);else if(strict&&node.operator==="delete"&&node.argument.type==="Identifier")raise(node.start,"Deleting local variable in strict mode");return finishNode(node,update?"UpdateExpression":"UnaryExpression")}var start=storeCurrentPos();var expr=parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(tokType.postfix&&!canInsertSemicolon()){var node=startNodeAt(start);node.operator=tokVal;node.prefix=false;node.argument=expr;checkLVal(expr);next();expr=finishNode(node,"UpdateExpression")}return expr}function parseExprSubscripts(refShorthandDefaultPos){var start=storeCurrentPos();var expr=parseExprAtom(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return parseSubscripts(expr,start)}function parseSubscripts(base,start,noCalls){if(options.playground&&eat(_hash)){var node=startNodeAt(start);node.object=base;node.property=parseIdent(true);if(eat(_parenL)){node.arguments=parseExprList(_parenR,false)}else{node.arguments=[]}return parseSubscripts(finishNode(node,"BindMemberExpression"),start,noCalls)}else if(eat(_paamayimNekudotayim)){var node=startNodeAt(start);node.object=base;node.property=parseIdent(true);return parseSubscripts(finishNode(node,"VirtualPropertyExpression"),start,noCalls)}else if(eat(_dot)){var node=startNodeAt(start);node.object=base;node.property=parseIdent(true);node.computed=false;return parseSubscripts(finishNode(node,"MemberExpression"),start,noCalls)}else if(eat(_bracketL)){var node=startNodeAt(start);node.object=base;node.property=parseExpression();node.computed=true;expect(_bracketR);return parseSubscripts(finishNode(node,"MemberExpression"),start,noCalls)}else if(!noCalls&&eat(_parenL)){var node=startNodeAt(start);node.callee=base;node.arguments=parseExprList(_parenR,false);return parseSubscripts(finishNode(node,"CallExpression"),start,noCalls)}else if(tokType===_backQuote){var node=startNodeAt(start);node.tag=base;node.quasi=parseTemplate();return parseSubscripts(finishNode(node,"TaggedTemplateExpression"),start,noCalls)}return base}function parseExprAtom(refShorthandDefaultPos){switch(tokType){case _this:var node=startNode();next();return finishNode(node,"ThisExpression");case _yield:if(inGenerator)return parseYield();case _name:var start=storeCurrentPos();var node=startNode();var id=parseIdent(tokType!==_name);if(options.ecmaVersion>=7){if(id.name==="async"){if(tokType===_parenL){var expr=parseParenAndDistinguishExpression(start,true);if(expr.type==="ArrowFunctionExpression"){return expr}else{node.callee=id;if(expr.type==="SequenceExpression"){node.arguments=expr.expressions}else{node.arguments=[expr]}return parseSubscripts(finishNode(node,"CallExpression"),start)}}else if(tokType===_name){id=parseIdent();expect(_arrow);return parseArrowExpression(node,[id],true)}if(tokType===_function&&!canInsertSemicolon()){next();return parseFunction(node,false,true)}}else if(id.name==="await"){if(inAsync)return parseAwait(node)}}if(!canInsertSemicolon()&&eat(_arrow)){return parseArrowExpression(startNodeAt(start),[id])}return id;case _regexp:var node=startNode();node.regex={pattern:tokVal.pattern,flags:tokVal.flags};node.value=tokVal.value;node.raw=input.slice(tokStart,tokEnd);next();return finishNode(node,"Literal");case _num:case _string:case _jsxText:var node=startNode();node.value=tokVal;node.raw=input.slice(tokStart,tokEnd);next();return finishNode(node,"Literal");case _null:case _true:case _false:var node=startNode();node.value=tokType.atomValue;node.raw=tokType.keyword;next();return finishNode(node,"Literal");case _parenL:return parseParenAndDistinguishExpression();case _bracketL:var node=startNode();next();if(options.ecmaVersion>=7&&tokType===_for){return parseComprehension(node,false)}node.elements=parseExprList(_bracketR,true,true,refShorthandDefaultPos);return finishNode(node,"ArrayExpression");case _braceL:return parseObj(false,refShorthandDefaultPos);case _function:var node=startNode();next();return parseFunction(node,false,false);case _class:return parseClass(startNode(),false);case _new:return parseNew();case _backQuote:return parseTemplate();case _hash:return parseBindFunctionExpression();case _jsxTagStart:return parseJSXElement();default:unexpected()}}function parseBindFunctionExpression(){var node=startNode();next();var start=storeCurrentPos();node.callee=parseSubscripts(parseExprAtom(),start,true);if(eat(_parenL)){node.arguments=parseExprList(_parenR,false)}else{node.arguments=[]}return finishNode(node,"BindFunctionExpression")}function parseParenAndDistinguishExpression(start,isAsync){start=start||storeCurrentPos();var val;if(options.ecmaVersion>=6){next();if(options.ecmaVersion>=7&&tokType===_for){return parseComprehension(startNodeAt(start),true)}var innerStart=storeCurrentPos(),exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart,innerParenStart,typeStart;var parseParenItem=function(node,start){if(tokType===_colon){var typeCastNode=startNodeAt(start);typeCastNode.expression=node;typeCastNode.typeAnnotation=parseTypeAnnotation();return finishNode(typeCastNode,"TypeCastExpression")}else{return node}};while(tokType!==_parenR){first?first=false:expect(_comma);if(tokType===_ellipsis){var spreadNodeStart=storeCurrentPos();spreadStart=tokStart;exprList.push(parseParenItem(parseRest(),spreadNodeStart));break}else{if(tokType===_parenL&&!innerParenStart){innerParenStart=tokStart}exprList.push(parseMaybeAssign(false,refShorthandDefaultPos,parseParenItem))}}var innerEnd=storeCurrentPos();expect(_parenR);if(!canInsertSemicolon()&&eat(_arrow)){if(innerParenStart)unexpected(innerParenStart);for(var i=0;i1){val=startNodeAt(innerStart);val.expressions=exprList;finishNodeAt(val,"SequenceExpression",innerEnd)}else{val=exprList[0]}}else{val=parseParenExpression()}if(options.preserveParens){var par=startNodeAt(start);par.expression=val;return finishNode(par,"ParenthesizedExpression")}else{return val}}function parseNew(){var node=startNode();next();var start=storeCurrentPos();node.callee=parseSubscripts(parseExprAtom(),start,true);if(eat(_parenL))node.arguments=parseExprList(_parenR,false);else node.arguments=empty;return finishNode(node,"NewExpression")}function parseTemplateElement(){var elem=startNode();elem.value={raw:input.slice(tokStart,tokEnd),cooked:tokVal};next();elem.tail=tokType===_backQuote;return finishNode(elem,"TemplateElement")}function parseTemplate(){var node=startNode();next();node.expressions=[];var curElt=parseTemplateElement();node.quasis=[curElt];while(!curElt.tail){expect(_dollarBraceL);node.expressions.push(parseExpression());expect(_braceR);node.quasis.push(curElt=parseTemplateElement())}next();return finishNode(node,"TemplateLiteral")}function parseObj(isPattern,refShorthandDefaultPos){var node=startNode(),first=true,propHash={};node.properties=[];next();while(!eat(_braceR)){if(!first){expect(_comma);if(options.allowTrailingCommas&&eat(_braceR))break}else first=false;var prop=startNode(),start,isGenerator=false,isAsync=false;if(options.ecmaVersion>=7&&tokType===_ellipsis){prop=parseSpread();prop.type="SpreadProperty";node.properties.push(prop);continue}if(options.ecmaVersion>=6){prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos){start=storeCurrentPos()}if(!isPattern){isGenerator=eat(_star)}}if(options.ecmaVersion>=7&&isContextual("async")){var asyncId=parseIdent();if(tokType===_colon||tokType===_parenL){prop.key=asyncId}else{isAsync=true;parsePropertyName(prop)}}else{parsePropertyName(prop)}var typeParameters;if(isRelational("<")){typeParameters=parseTypeParameterDeclaration();if(tokType!==_parenL)unexpected()}if(eat(_colon)){prop.value=isPattern?parseMaybeDefault():parseMaybeAssign(false,refShorthandDefaultPos);prop.kind="init"}else if(options.ecmaVersion>=6&&tokType===_parenL){if(isPattern)unexpected();prop.kind="init";prop.method=true;prop.value=parseMethod(isGenerator,isAsync)}else if(options.ecmaVersion>=5&&!prop.computed&&prop.key.type==="Identifier"&&(prop.key.name==="get"||prop.key.name==="set"||options.playground&&prop.key.name==="memo")&&(tokType!=_comma&&tokType!=_braceR)){if(isGenerator||isAsync||isPattern)unexpected();prop.kind=prop.key.name;parsePropertyName(prop);prop.value=parseMethod(false,false)}else if(options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"){prop.kind="init";if(isPattern){prop.value=parseMaybeDefault(start,prop.key)}else if(tokType===_eq&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start)refShorthandDefaultPos.start=tokStart;prop.value=parseMaybeDefault(start,prop.key)}else{prop.value=prop.key}prop.shorthand=true}else unexpected();prop.value.typeParameters=typeParameters;checkPropClash(prop,propHash);node.properties.push(finishNode(prop,"Property"))}return finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")}function parsePropertyName(prop){if(options.ecmaVersion>=6){if(eat(_bracketL)){prop.computed=true;prop.key=parseExpression();expect(_bracketR);return}else{prop.computed=false}}prop.key=tokType===_num||tokType===_string?parseExprAtom():parseIdent(true)}function initFunction(node,isAsync){node.id=null;if(options.ecmaVersion>=6){node.generator=false;node.expression=false}if(options.ecmaVersion>=7){node.async=isAsync}}function parseFunction(node,isStatement,isAsync,allowExpressionBody){initFunction(node,isAsync);if(options.ecmaVersion>=6){node.generator=eat(_star)}if(isStatement||tokType===_name){node.id=parseIdent()}if(isRelational("<")){node.typeParameters=parseTypeParameterDeclaration()}parseFunctionParams(node);parseFunctionBody(node,allowExpressionBody);return finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")}function parseMethod(isGenerator,isAsync){var node=startNode();initFunction(node,isAsync);parseFunctionParams(node);var allowExpressionBody;if(options.ecmaVersion>=6){node.generator=isGenerator;allowExpressionBody=true}else{allowExpressionBody=false}parseFunctionBody(node,allowExpressionBody);return finishNode(node,"FunctionExpression")}function parseFunctionParams(node){expect(_parenL);node.params=parseBindingList(_parenR,false);if(tokType===_colon){node.returnType=parseTypeAnnotation()}}function parseArrowExpression(node,params,isAsync){initFunction(node,isAsync);node.params=toAssignableList(params,true);parseFunctionBody(node,true);return finishNode(node,"ArrowFunctionExpression")}function parseFunctionBody(node,allowExpression){var isExpression=allowExpression&&tokType!==_braceL;var oldInAsync=inAsync;inAsync=node.async;if(isExpression){node.body=parseMaybeAssign();node.expression=true}else{var oldInFunc=inFunction,oldInGen=inGenerator,oldLabels=labels;inFunction=true;inGenerator=node.generator;labels=[];node.body=parseBlock(true);node.expression=false;inFunction=oldInFunc;inGenerator=oldInGen;labels=oldLabels}inAsync=oldInAsync;if(strict||!isExpression&&node.body.body.length&&isUseStrict(node.body.body[0])){var nameHash={};if(node.id)checkFunctionParam(node.id,{});for(var i=0;i=7&&isContextual("private")){next();classBody.body.push(parsePrivate(method));continue}var isGenerator=eat(_star);var isAsync=false;parsePropertyName(method);if(tokType!==_parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="static"){if(isGenerator||isAsync)unexpected();method["static"]=true;isGenerator=eat(_star);parsePropertyName(method)}else{method["static"]=false}if(tokType!==_parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async"){isAsync=true;parsePropertyName(method)}if(tokType!==_parenL&&!method.computed&&method.key.type==="Identifier"&&(method.key.name==="get"||method.key.name==="set")||options.playground&&method.key.name==="memo"){if(isGenerator||isAsync)unexpected();method.kind=method.key.name;parsePropertyName(method)}else{method.kind=""}var classProperty=false;if(tokType===_colon){method.typeAnnotation=parseTypeAnnotation();classProperty=true}if(options.playground&&eat(_eq)){method.value=parseMaybeAssign();classProperty=true}if(classProperty){semicolon();classBody.body.push(finishNode(method,"ClassProperty"))}else{var typeParameters;if(isRelational("<")){typeParameters=parseTypeParameterDeclaration()}method.value=parseMethod(isGenerator,isAsync);method.value.typeParameters=typeParameters;classBody.body.push(finishNode(method,"MethodDefinition"));eat(_semi)}}node.body=finishNode(classBody,"ClassBody");return finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")}function parseClassImplements(){var implemented=[];do{var node=startNode();node.id=parseIdent();if(isRelational("<")){node.typeParameters=parseTypeParameterInstantiation()}else{node.typeParameters=null}implemented.push(finishNode(node,"ClassImplements"))}while(eat(_comma));return implemented}function parseExprList(close,allowTrailingComma,allowEmpty,refShorthandDefaultPos){var elts=[],first=true;while(!eat(close)){if(!first){expect(_comma);if(allowTrailingComma&&options.allowTrailingCommas&&eat(close))break}else first=false;if(allowEmpty&&tokType===_comma){elts.push(null)}else{if(tokType===_ellipsis)elts.push(parseSpread(refShorthandDefaultPos));else elts.push(parseMaybeAssign(false,refShorthandDefaultPos))}}return elts}function parseIdent(liberal){var node=startNode();if(liberal&&options.forbidReserved=="everywhere")liberal=false;if(tokType===_name){if(!liberal&&(options.forbidReserved&&(options.ecmaVersion===3?isReservedWord3:isReservedWord5)(tokVal)||strict&&isStrictReservedWord(tokVal))&&input.slice(tokStart,tokEnd).indexOf("\\")==-1)raise(tokStart,"The keyword '"+tokVal+"' is reserved");node.name=tokVal}else if(liberal&&tokType.keyword){node.name=tokType.keyword}else{unexpected()}next();return finishNode(node,"Identifier")}function parseExport(node){next();if(tokType===_var||tokType===_const||tokType===_let||tokType===_function||tokType===_class||isContextual("async")||isContextual("type")){node.declaration=parseStatement(true);node["default"]=false;node.specifiers=null;node.source=null}else if(eat(_default)){var expr=parseMaybeAssign();if(expr.id){switch(expr.type){case"FunctionExpression":expr.type="FunctionDeclaration";break;case"ClassExpression":expr.type="ClassDeclaration";break}}node.declaration=expr;node["default"]=true;node.specifiers=null;node.source=null;semicolon()}else{var isBatch=tokType===_star;node.declaration=null;node["default"]=false;node.specifiers=parseExportSpecifiers();if(eatContextual("from")){node.source=tokType===_string?parseExprAtom():unexpected()}else{if(isBatch)unexpected();node.source=null}semicolon()}return finishNode(node,"ExportDeclaration")}function parseExportSpecifiers(){var nodes=[],first=true;if(tokType===_star){var node=startNode();next();nodes.push(finishNode(node,"ExportBatchSpecifier"))}else{expect(_braceL);while(!eat(_braceR)){if(!first){expect(_comma);if(options.allowTrailingCommas&&eat(_braceR))break}else first=false;var node=startNode();node.id=parseIdent(tokType===_default);node.name=eatContextual("as")?parseIdent(true):null;nodes.push(finishNode(node,"ExportSpecifier"))}}return nodes}function parseImport(node){next();node.isType=false;node.specifiers=[];var typeId;if(isContextual("type")){var start=storeCurrentPos();typeId=parseIdent();if(tokType===_name&&tokVal!=="from"||tokType===_braceL||tokType===_star){node.isType=true}else{node.specifiers.push(parseImportSpecifierDefault(typeId,start));eat(_comma)}}if(tokType===_string){if(typeId)unexpected(typeId.start);node.source=parseExprAtom()}else{if(!isContextual("from"))parseImportSpecifiers(node.specifiers);expectContextual("from");node.source=tokType===_string?parseExprAtom():unexpected()}semicolon();return finishNode(node,"ImportDeclaration")}function parseImportSpecifiers(nodes){var first=true;if(tokType===_name){var start=storeCurrentPos();var id=parseIdent();nodes.push(parseImportSpecifierDefault(id,start));if(!eat(_comma))return nodes}if(tokType===_star){var node=startNode();next();expectContextual("as");node.name=parseIdent();checkLVal(node.name,true);nodes.push(finishNode(node,"ImportBatchSpecifier"));return nodes}expect(_braceL);while(!eat(_braceR)){if(!first){expect(_comma);if(options.allowTrailingCommas&&eat(_braceR))break}else first=false;var node=startNode();node.id=parseIdent(true);node.name=eatContextual("as")?parseIdent():null;checkLVal(node.name||node.id,true);node["default"]=false;nodes.push(finishNode(node,"ImportSpecifier"))}return nodes}function parseImportSpecifierDefault(id,start){var node=startNodeAt(start);node.id=id;checkLVal(node.id,true);node.name=null;node["default"]=true;return finishNode(node,"ImportSpecifier")}function parseYield(){var node=startNode();next();if(eat(_semi)||canInsertSemicolon()){node.delegate=false;node.argument=null}else{node.delegate=eat(_star);node.argument=parseMaybeAssign()}return finishNode(node,"YieldExpression")}function parseAwait(node){if(eat(_semi)||canInsertSemicolon()){unexpected()}node.all=eat(_star);node.argument=parseMaybeAssign(true);return finishNode(node,"AwaitExpression")}function parseComprehension(node,isGenerator){node.blocks=[];while(tokType===_for){var block=startNode();next();expect(_parenL);block.left=parseBindingAtom();checkLVal(block.left,true);expectContextual("of");block.right=parseExpression();expect(_parenR);node.blocks.push(finishNode(block,"ComprehensionBlock"))}node.filter=eat(_if)?parseParenExpression():null;node.body=parseExpression();expect(isGenerator?_parenR:_bracketR);node.generator=isGenerator;return finishNode(node,"ComprehensionExpression")}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)}}function parseJSXIdentifier(){var node=startNode();if(tokType===_jsxName){node.name=tokVal}else if(tokType.keyword){node.name=tokType.keyword}else{unexpected()}next();return finishNode(node,"JSXIdentifier")}function parseJSXNamespacedName(){var start=storeCurrentPos();var name=parseJSXIdentifier();if(!eat(_colon))return name;var node=startNodeAt(start);node.namespace=name;node.name=parseJSXIdentifier();return finishNode(node,"JSXNamespacedName")}function parseJSXElementName(){var start=storeCurrentPos();var node=parseJSXNamespacedName();while(eat(_dot)){var newNode=startNodeAt(start);newNode.object=node;newNode.property=parseJSXIdentifier();node=finishNode(newNode,"JSXMemberExpression")}return node}function parseJSXAttributeValue(){switch(tokType){case _braceL:var node=parseJSXExpressionContainer();if(node.expression.type==="JSXEmptyExpression"){raise(node.start,"JSX attributes must only be assigned a non-empty "+"expression")}return node;case _jsxTagStart:return parseJSXElement();case _jsxText:case _string:return parseExprAtom();default:raise(tokStart,"JSX value should be either an expression or a quoted JSX text")}}function parseJSXEmptyExpression(){if(tokType!==_braceR){unexpected()}var tmp;tmp=tokStart;tokStart=lastEnd;lastEnd=tmp;tmp=tokStartLoc;tokStartLoc=lastEndLoc;lastEndLoc=tmp;return finishNode(startNode(),"JSXEmptyExpression")}function parseJSXExpressionContainer(){var node=startNode();next();node.expression=tokType===_braceR?parseJSXEmptyExpression():parseExpression();expect(_braceR);return finishNode(node,"JSXExpressionContainer")}function parseJSXAttribute(){var node=startNode();if(eat(_braceL)){expect(_ellipsis);node.argument=parseMaybeAssign();expect(_braceR);return finishNode(node,"JSXSpreadAttribute")}node.name=parseJSXNamespacedName();node.value=eat(_eq)?parseJSXAttributeValue():null;return finishNode(node,"JSXAttribute")}function parseJSXOpeningElementAt(start){var node=startNodeAt(start);node.attributes=[];node.name=parseJSXElementName();while(tokType!==_slash&&tokType!==_jsxTagEnd){node.attributes.push(parseJSXAttribute())}node.selfClosing=eat(_slash);expect(_jsxTagEnd);return finishNode(node,"JSXOpeningElement")}function parseJSXClosingElementAt(start){var node=startNodeAt(start);node.name=parseJSXElementName();expect(_jsxTagEnd);return finishNode(node,"JSXClosingElement")}function parseJSXElementAt(start){var node=startNodeAt(start);var children=[];var openingElement=parseJSXOpeningElementAt(start);var closingElement=null;if(!openingElement.selfClosing){contents:for(;;){switch(tokType){case _jsxTagStart:start=storeCurrentPos();next();if(eat(_slash)){closingElement=parseJSXClosingElementAt(start);break contents}children.push(parseJSXElementAt(start));break;case _jsxText:children.push(parseExprAtom());break;case _braceL:children.push(parseJSXExpressionContainer());break;default:unexpected()}}if(getQualifiedJSXName(closingElement.name)!==getQualifiedJSXName(openingElement.name)){raise(closingElement.start,"Expected corresponding JSX closing tag for <"+getQualifiedJSXName(openingElement.name)+">")}}node.openingElement=openingElement;node.closingElement=closingElement;node.children=children;return finishNode(node,"JSXElement")}function isRelational(op){return tokType===_relational&&tokVal===op}function expectRelational(op){if(isRelational(op)){next()}else{unexpected()}}function parseJSXElement(){var start=storeCurrentPos();next();return parseJSXElementAt(start)}function parseDeclareClass(node){next();parseInterfaceish(node,true);return finishNode(node,"DeclareClass")}function parseDeclareFunction(node){next();var id=node.id=parseIdent();var typeNode=startNode();var typeContainer=startNode();if(isRelational("<")){typeNode.typeParameters=parseTypeParameterDeclaration()}else{typeNode.typeParameters=null}expect(_parenL);var tmp=parseFunctionTypeParams();typeNode.params=tmp.params;typeNode.rest=tmp.rest;expect(_parenR);expect(_colon);typeNode.returnType=parseType();typeContainer.typeAnnotation=finishNode(typeNode,"FunctionTypeAnnotation");id.typeAnnotation=finishNode(typeContainer,"TypeAnnotation");finishNode(id,id.type);semicolon();return finishNode(node,"DeclareFunction")}function parseDeclare(node){if(tokType===_class){return parseDeclareClass(node)}else if(tokType===_function){return parseDeclareFunction(node)}else if(tokType===_var){return parseDeclareVariable(node)}else if(isContextual("module")){return parseDeclareModule(node)}else{unexpected()}}function parseDeclareVariable(node){next();node.id=parseTypeAnnotatableIdentifier();semicolon();return finishNode(node,"DeclareVariable")}function parseDeclareModule(node){next();if(tokType===_string){node.id=parseExprAtom()}else{node.id=parseIdent()}var bodyNode=node.body=startNode();var body=bodyNode.body=[];expect(_braceL);while(tokType!==_braceR){var node2=startNode();next();body.push(parseDeclare(node2))}expect(_braceR);finishNode(bodyNode,"BlockStatement");return finishNode(node,"DeclareModule")}function parseInterfaceish(node,allowStatic){node.id=parseIdent();if(isRelational("<")){node.typeParameters=parseTypeParameterDeclaration()}else{node.typeParameters=null}node.extends=[];if(eat(_extends)){do{node.extends.push(parseInterfaceExtends())}while(eat(_comma))}node.body=parseObjectType(allowStatic)}function parseInterfaceExtends(){var node=startNode();node.id=parseIdent();if(isRelational("<")){node.typeParameters=parseTypeParameterInstantiation()}else{node.typeParameters=null}return finishNode(node,"InterfaceExtends")}function parseInterface(node){parseInterfaceish(node,false);return finishNode(node,"InterfaceDeclaration")}function parseTypeAlias(node){node.id=parseIdent();if(isRelational("<")){node.typeParameters=parseTypeParameterDeclaration()}else{node.typeParameters=null}expect(_eq);node.right=parseType();semicolon();return finishNode(node,"TypeAlias")}function parseTypeParameterDeclaration(){var node=startNode();node.params=[];expectRelational("<");while(!isRelational(">")){node.params.push(parseIdent());if(!isRelational(">")){expect(_comma)}}expectRelational(">");return finishNode(node,"TypeParameterDeclaration")}function parseTypeParameterInstantiation(){var node=startNode(),oldInType=inType;node.params=[];inType=true;expectRelational("<");while(!isRelational(">")){node.params.push(parseType());if(!isRelational(">")){expect(_comma)}}expectRelational(">");inType=oldInType;return finishNode(node,"TypeParameterInstantiation")}function parseObjectPropertyKey(){return tokType===_num||tokType===_string?parseExprAtom():parseIdent(true)}function parseObjectTypeIndexer(node,isStatic){node.static=isStatic;expect(_bracketL);node.id=parseObjectPropertyKey();expect(_colon);node.key=parseType();expect(_bracketR);expect(_colon);node.value=parseType();return finishNode(node,"ObjectTypeIndexer")}function parseObjectTypeMethodish(node){node.params=[];node.rest=null;node.typeParameters=null;if(isRelational("<")){node.typeParameters=parseTypeParameterDeclaration()}expect(_parenL);while(tokType===_name){node.params.push(parseFunctionTypeParam()); -if(tokType!==_parenR){expect(_comma)}}if(eat(_ellipsis)){node.rest=parseFunctionTypeParam()}expect(_parenR);expect(_colon);node.returnType=parseType();return finishNode(node,"FunctionTypeAnnotation")}function parseObjectTypeMethod(start,isStatic,key){var node=startNodeAt(start);node.value=parseObjectTypeMethodish(startNodeAt(start));node.static=isStatic;node.key=key;node.optional=false;return finishNode(node,"ObjectTypeProperty")}function parseObjectTypeCallProperty(node,isStatic){var valueNode=startNode();node.static=isStatic;node.value=parseObjectTypeMethodish(valueNode);return finishNode(node,"ObjectTypeCallProperty")}function parseObjectType(allowStatic){var nodeStart=startNode();var node;var optional=false;var property;var propertyKey;var propertyTypeAnnotation;var token;var isStatic;nodeStart.callProperties=[];nodeStart.properties=[];nodeStart.indexers=[];expect(_braceL);while(tokType!==_braceR){var start=storeCurrentPos();node=startNode();if(allowStatic&&isContextual("static")){next();isStatic=true}if(tokType===_bracketL){nodeStart.indexers.push(parseObjectTypeIndexer(node,isStatic))}else if(tokType===_parenL||isRelational("<")){nodeStart.callProperties.push(parseObjectTypeCallProperty(node,allowStatic))}else{if(isStatic&&tokType===_colon){propertyKey=parseIdent()}else{propertyKey=parseObjectPropertyKey()}if(isRelational("<")||tokType===_parenL){nodeStart.properties.push(parseObjectTypeMethod(start,isStatic,propertyKey))}else{if(eat(_question)){optional=true}expect(_colon);node.key=propertyKey;node.value=parseType();node.optional=optional;node.static=isStatic;nodeStart.properties.push(finishNode(node,"ObjectTypeProperty"))}}if(!eat(_semi)&&tokType!==_braceR){unexpected()}}expect(_braceR);return finishNode(nodeStart,"ObjectTypeAnnotation")}function parseGenericType(start,id){var node=startNodeAt(start);node.typeParameters=null;node.id=id;while(eat(_dot)){var node2=startNodeAt(start);node2.qualification=node.id;node2.id=parseIdent();node.id=finishNode(node2,"QualifiedTypeIdentifier")}if(isRelational("<")){node.typeParameters=parseTypeParameterInstantiation()}return finishNode(node,"GenericTypeAnnotation")}function parseVoidType(){var node=startNode();expect(keywordTypes["void"]);return finishNode(node,"VoidTypeAnnotation")}function parseTypeofType(){var node=startNode();expect(keywordTypes["typeof"]);node.argument=parsePrimaryType();return finishNode(node,"TypeofTypeAnnotation")}function parseTupleType(){var node=startNode();node.types=[];expect(_bracketL);while(tokPos. It looks like "+"you are trying to write a function type, but you ended up "+"writing a grouped type followed by an =>, which is a syntax "+"error. Remember, function type parameters are named so function "+"types look like (name1: type1, name2: type2) => returnType. You "+"probably wrote (type1) => returnType")}return type}tmp=parseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;expect(_parenR);expect(_arrow);node.returnType=parseType();node.typeParameters=null;return finishNode(node,"FunctionTypeAnnotation");case _string:node.value=tokVal;node.raw=input.slice(tokStart,tokEnd);next();return finishNode(node,"StringLiteralTypeAnnotation");default:if(tokType.keyword){switch(tokType.keyword){case"void":return parseVoidType();case"typeof":return parseTypeofType()}}}unexpected()}function parsePostfixType(){var node=startNode();var type=node.elementType=parsePrimaryType();if(tokType===_bracketL){expect(_bracketL);expect(_bracketR);return finishNode(node,"ArrayTypeAnnotation")}return type}function parsePrefixType(){var node=startNode();if(eat(_question)){node.typeAnnotation=parsePrefixType();return finishNode(node,"NullableTypeAnnotation")}return parsePostfixType()}function parseIntersectionType(){var node=startNode();var type=parsePrefixType();node.types=[type];while(eat(_bitwiseAND)){node.types.push(parsePrefixType())}return node.types.length===1?type:finishNode(node,"IntersectionTypeAnnotation")}function parseUnionType(){var node=startNode();var type=parseIntersectionType();node.types=[type];while(eat(_bitwiseOR)){node.types.push(parseIntersectionType())}return node.types.length===1?type:finishNode(node,"UnionTypeAnnotation")}function parseType(){var oldInType=inType;inType=true;var type=parseUnionType();inType=oldInType;return type}function parseTypeAnnotation(){var node=startNode();var oldInType=inType;inType=true;expect(_colon);node.typeAnnotation=parseType();inType=oldInType;return finishNode(node,"TypeAnnotation")}function parseTypeAnnotatableIdentifier(requireTypeAnnotation,canBeOptionalParam){var node=startNode();var ident=parseIdent();var isOptionalParam=false;if(canBeOptionalParam&&eat(_question)){expect(_question);isOptionalParam=true}if(requireTypeAnnotation||tokType===_colon){ident.typeAnnotation=parseTypeAnnotation();finishNode(ident,ident.type)}if(isOptionalParam){ident.optional=true;finishNode(ident,ident.type)}return ident}})},{}],128:[function(require,module,exports){var types=require("../lib/types");var Type=types.Type;var def=Type.def;var or=Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var isRegExp=builtin.RegExp;var shared=require("../lib/shared");var defaults=shared.defaults;var geq=shared.geq;def("Printable").field("loc",or(def("SourceLocation"),null),defaults["null"],true);def("Node").bases("Printable").field("type",isString).field("comments",or([def("Comment")],null),defaults["null"],true);def("SourceLocation").build("start","end","source").field("start",def("Position")).field("end",def("Position")).field("source",or(isString,null),defaults["null"]);def("Position").build("line","column").field("line",geq(1)).field("column",geq(0));def("Program").bases("Node").build("body").field("body",[def("Statement")]);def("Function").bases("Node").field("id",or(def("Identifier"),null),defaults["null"]).field("params",[def("Pattern")]).field("body",or(def("BlockStatement"),def("Expression")));def("Statement").bases("Node");def("EmptyStatement").bases("Statement").build();def("BlockStatement").bases("Statement").build("body").field("body",[def("Statement")]);def("ExpressionStatement").bases("Statement").build("expression").field("expression",def("Expression"));def("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Statement")).field("alternate",or(def("Statement"),null),defaults["null"]);def("LabeledStatement").bases("Statement").build("label","body").field("label",def("Identifier")).field("body",def("Statement"));def("BreakStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("ContinueStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("WithStatement").bases("Statement").build("object","body").field("object",def("Expression")).field("body",def("Statement"));def("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",def("Expression")).field("cases",[def("SwitchCase")]).field("lexical",isBoolean,defaults["false"]);def("ReturnStatement").bases("Statement").build("argument").field("argument",or(def("Expression"),null));def("ThrowStatement").bases("Statement").build("argument").field("argument",def("Expression"));def("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",def("BlockStatement")).field("handler",or(def("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[def("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[def("CatchClause")],defaults.emptyArray).field("finalizer",or(def("BlockStatement"),null),defaults["null"]);def("CatchClause").bases("Node").build("param","guard","body").field("param",def("Pattern")).field("guard",or(def("Expression"),null),defaults["null"]).field("body",def("BlockStatement"));def("WhileStatement").bases("Statement").build("test","body").field("test",def("Expression")).field("body",def("Statement"));def("DoWhileStatement").bases("Statement").build("body","test").field("body",def("Statement")).field("test",def("Expression"));def("ForStatement").bases("Statement").build("init","test","update","body").field("init",or(def("VariableDeclaration"),def("Expression"),null)).field("test",or(def("Expression"),null)).field("update",or(def("Expression"),null)).field("body",def("Statement"));def("ForInStatement").bases("Statement").build("left","right","body","each").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement")).field("each",isBoolean);def("DebuggerStatement").bases("Statement").build();def("Declaration").bases("Statement");def("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",def("Identifier"));def("FunctionExpression").bases("Function","Expression").build("id","params","body");def("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",or("var","let","const")).field("declarations",[or(def("VariableDeclarator"),def("Identifier"))]);def("VariableDeclarator").bases("Node").build("id","init").field("id",def("Pattern")).field("init",or(def("Expression"),null));def("Expression").bases("Node","Pattern");def("ThisExpression").bases("Expression").build();def("ArrayExpression").bases("Expression").build("elements").field("elements",[or(def("Expression"),null)]);def("ObjectExpression").bases("Expression").build("properties").field("properties",[def("Property")]);def("Property").bases("Node").build("kind","key","value").field("kind",or("init","get","set")).field("key",or(def("Literal"),def("Identifier"))).field("value",or(def("Expression"),def("Pattern")));def("SequenceExpression").bases("Expression").build("expressions").field("expressions",[def("Expression")]);var UnaryOperator=or("-","+","!","~","typeof","void","delete");def("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",UnaryOperator).field("argument",def("Expression")).field("prefix",isBoolean,defaults["true"]);var BinaryOperator=or("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");def("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",BinaryOperator).field("left",def("Expression")).field("right",def("Expression"));var AssignmentOperator=or("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");def("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",AssignmentOperator).field("left",def("Pattern")).field("right",def("Expression"));var UpdateOperator=or("++","--");def("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",UpdateOperator).field("argument",def("Expression")).field("prefix",isBoolean);var LogicalOperator=or("||","&&");def("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",LogicalOperator).field("left",def("Expression")).field("right",def("Expression"));def("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Expression")).field("alternate",def("Expression"));def("NewExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("CallExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("MemberExpression").bases("Expression").build("object","property","computed").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("Pattern").bases("Node");def("ObjectPattern").bases("Pattern").build("properties").field("properties",[or(def("PropertyPattern"),def("Property"))]);def("PropertyPattern").bases("Pattern").build("key","pattern").field("key",or(def("Literal"),def("Identifier"))).field("pattern",def("Pattern"));def("ArrayPattern").bases("Pattern").build("elements").field("elements",[or(def("Pattern"),null)]);def("SwitchCase").bases("Node").build("test","consequent").field("test",or(def("Expression"),null)).field("consequent",[def("Statement")]);def("Identifier").bases("Node","Expression","Pattern").build("name").field("name",isString);def("Literal").bases("Node","Expression").build("value").field("value",or(isString,isBoolean,null,isNumber,isRegExp));def("Comment").bases("Printable").field("value",isString).field("leading",isBoolean,defaults["true"]).field("trailing",isBoolean,defaults["false"]);def("Block").bases("Comment").build("value","leading","trailing");def("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":139,"../lib/types":140}],129:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;def("XMLDefaultDeclaration").bases("Declaration").field("namespace",def("Expression"));def("XMLAnyName").bases("Expression");def("XMLQualifiedIdentifier").bases("Expression").field("left",or(def("Identifier"),def("XMLAnyName"))).field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLAttributeSelector").bases("Expression").field("attribute",def("Expression"));def("XMLFilterExpression").bases("Expression").field("left",def("Expression")).field("right",def("Expression"));def("XMLElement").bases("XML","Expression").field("contents",[def("XML")]);def("XMLList").bases("XML","Expression").field("contents",[def("XML")]);def("XML").bases("Node");def("XMLEscape").bases("XML").field("expression",def("Expression"));def("XMLText").bases("XML").field("text",isString);def("XMLStartTag").bases("XML").field("contents",[def("XML")]);def("XMLEndTag").bases("XML").field("contents",[def("XML")]);def("XMLPointTag").bases("XML").field("contents",[def("XML")]);def("XMLName").bases("XML").field("contents",or(isString,[def("XML")]));def("XMLAttribute").bases("XML").field("value",isString);def("XMLCdata").bases("XML").field("contents",isString);def("XMLComment").bases("XML").field("contents",isString);def("XMLProcessingInstruction").bases("XML").field("target",isString).field("contents",or(isString,null))},{"../lib/types":140,"./core":128}],130:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var isObject=builtin.object;var isString=builtin.string;var defaults=require("../lib/shared").defaults;def("Function").field("generator",isBoolean,defaults["false"]).field("expression",isBoolean,defaults["false"]).field("defaults",[or(def("Expression"),null)],defaults.emptyArray).field("rest",or(def("Identifier"),null),defaults["null"]);def("FunctionDeclaration").build("id","params","body","generator","expression");def("FunctionExpression").build("id","params","body","generator","expression");def("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,defaults["null"]).field("generator",false);def("YieldExpression").bases("Expression").build("argument","delegate").field("argument",or(def("Expression"),null)).field("delegate",isBoolean,defaults["false"]);def("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionBlock").bases("Node").build("left","right","each").field("left",def("Pattern")).field("right",def("Expression")).field("each",isBoolean);def("ModuleSpecifier").bases("Literal").build("value").field("value",isString);def("Property").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("method",isBoolean,defaults["false"]).field("shorthand",isBoolean,defaults["false"]).field("computed",isBoolean,defaults["false"]);def("PropertyPattern").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("MethodDefinition").bases("Declaration").build("kind","key","value").field("kind",or("init","get","set","")).field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("value",def("Function")).field("computed",isBoolean,defaults["false"]);def("SpreadElement").bases("Node").build("argument").field("argument",def("Expression"));def("ArrayExpression").field("elements",[or(def("Expression"),def("SpreadElement"),null)]);def("NewExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("CallExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("SpreadElementPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ArrayPattern").field("elements",[or(def("Pattern"),null,def("SpreadElement"))]);var ClassBodyElement=or(def("MethodDefinition"),def("VariableDeclarator"),def("ClassPropertyDefinition"),def("ClassProperty"));def("ClassProperty").bases("Declaration").build("key").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",ClassBodyElement);def("ClassBody").bases("Declaration").build("body").field("body",[ClassBodyElement]);def("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",def("Identifier")).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]);def("ClassExpression").bases("Expression").build("id","body","superClass").field("id",or(def("Identifier"),null),defaults["null"]).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]).field("implements",[def("ClassImplements")],defaults.emptyArray);def("ClassImplements").bases("Node").build("id").field("id",def("Identifier")).field("superClass",or(def("Expression"),null),defaults["null"]);def("Specifier").bases("Node");def("NamedSpecifier").bases("Specifier").field("id",def("Identifier")).field("name",or(def("Identifier"),null),defaults["null"]);def("ExportSpecifier").bases("NamedSpecifier").build("id","name");def("ExportBatchSpecifier").bases("Specifier").build();def("ImportSpecifier").bases("NamedSpecifier").build("id","name");def("ImportNamespaceSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ImportDefaultSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",isBoolean).field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"),def("ExportBatchSpecifier"))],defaults.emptyArray).field("source",or(def("ModuleSpecifier"),null),defaults["null"]);def("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[or(def("ImportSpecifier"),def("ImportNamespaceSpecifier"),def("ImportDefaultSpecifier"))],defaults.emptyArray).field("source",def("ModuleSpecifier"));def("TaggedTemplateExpression").bases("Expression").field("tag",def("Expression")).field("quasi",def("TemplateLiteral"));def("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[def("TemplateElement")]).field("expressions",[def("Expression")]);def("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:isString,raw:isString}).field("tail",isBoolean)},{"../lib/shared":139,"../lib/types":140,"./core":128}],131:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("Function").field("async",isBoolean,defaults["false"]);def("SpreadProperty").bases("Node").build("argument").field("argument",def("Expression"));def("ObjectExpression").field("properties",[or(def("Property"),def("SpreadProperty"))]);def("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ObjectPattern").field("properties",[or(def("PropertyPattern"),def("SpreadPropertyPattern"),def("Property"),def("SpreadProperty"))]);def("AwaitExpression").bases("Expression").build("argument","all").field("argument",or(def("Expression"),null)).field("all",isBoolean,defaults["false"])},{"../lib/shared":139,"../lib/types":140,"./core":128}],132:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("XJSAttribute").bases("Node").build("name","value").field("name",or(def("XJSIdentifier"),def("XJSNamespacedName"))).field("value",or(def("Literal"),def("XJSExpressionContainer"),null),defaults["null"]);def("XJSIdentifier").bases("Node").build("name").field("name",isString);def("XJSNamespacedName").bases("Node").build("namespace","name").field("namespace",def("XJSIdentifier")).field("name",def("XJSIdentifier"));def("XJSMemberExpression").bases("MemberExpression").build("object","property").field("object",or(def("XJSIdentifier"),def("XJSMemberExpression"))).field("property",def("XJSIdentifier")).field("computed",isBoolean,defaults.false);var XJSElementName=or(def("XJSIdentifier"),def("XJSNamespacedName"),def("XJSMemberExpression"));def("XJSSpreadAttribute").bases("Node").build("argument").field("argument",def("Expression"));var XJSAttributes=[or(def("XJSAttribute"),def("XJSSpreadAttribute"))];def("XJSExpressionContainer").bases("Expression").build("expression").field("expression",def("Expression"));def("XJSElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",def("XJSOpeningElement")).field("closingElement",or(def("XJSClosingElement"),null),defaults["null"]).field("children",[or(def("XJSElement"),def("XJSExpressionContainer"),def("XJSText"),def("Literal"))],defaults.emptyArray).field("name",XJSElementName,function(){return this.openingElement.name}).field("selfClosing",isBoolean,function(){return this.openingElement.selfClosing}).field("attributes",XJSAttributes,function(){return this.openingElement.attributes});def("XJSOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",XJSElementName).field("attributes",XJSAttributes,defaults.emptyArray).field("selfClosing",isBoolean,defaults["false"]);def("XJSClosingElement").bases("Node").build("name").field("name",XJSElementName);def("XJSText").bases("Literal").build("value").field("value",isString);def("XJSEmptyExpression").bases("Expression").build();def("Type").bases("Node");def("AnyTypeAnnotation").bases("Type");def("VoidTypeAnnotation").bases("Type");def("NumberTypeAnnotation").bases("Type");def("StringTypeAnnotation").bases("Type");def("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",isString).field("raw",isString);def("BooleanTypeAnnotation").bases("Type");def("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",def("Type"));def("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",def("Type"));def("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[def("FunctionTypeParam")]).field("returnType",def("Type")).field("rest",or(def("FunctionTypeParam"),null)).field("typeParameters",or(def("TypeParameterDeclaration"),null));def("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",def("Identifier")).field("typeAnnotation",def("Type")).field("optional",isBoolean);def("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",def("Type"));def("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[def("ObjectTypeProperty")]).field("indexers",[def("ObjectTypeIndexer")],defaults.emptyArray).field("callProperties",[def("ObjectTypeCallProperty")],defaults.emptyArray);def("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",or(def("Literal"),def("Identifier"))).field("value",def("Type")).field("optional",isBoolean);def("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",def("Identifier")).field("key",def("Type")).field("value",def("Type"));def("ObjectTypeCallProperty").bases("Node").build("value").field("value",def("FunctionTypeAnnotation")).field("static",isBoolean,false);def("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("id",def("Identifier"));def("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("MemberTypeAnnotation").bases("Type").build("object","property").field("object",def("Identifier")).field("property",or(def("MemberTypeAnnotation"),def("GenericTypeAnnotation")));def("UnionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",def("Type"));def("Identifier").field("typeAnnotation",or(def("TypeAnnotation"),null),defaults["null"]);def("TypeParameterDeclaration").bases("Node").build("params").field("params",[def("Identifier")]);def("TypeParameterInstantiation").bases("Node").build("params").field("params",[def("Type")]);def("Function").field("returnType",or(def("TypeAnnotation"),null),defaults["null"]).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]);def("ClassProperty").build("key","typeAnnotation").field("typeAnnotation",def("TypeAnnotation")).field("static",isBoolean,false);def("ClassImplements").field("typeParameters",or(def("TypeParameterInstantiation"),null),defaults["null"]);def("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]).field("body",def("ObjectTypeAnnotation")).field("extends",[def("InterfaceExtends")]);def("InterfaceExtends").bases("Node").build("id").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null)).field("right",def("Type"));def("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",def("Expression")).field("typeAnnotation",def("TypeAnnotation"));def("TupleTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("DeclareVariable").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareFunction").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareClass").bases("InterfaceDeclaration").build("id");def("DeclareModule").bases("Statement").build("id","body").field("id",or(def("Identifier"),def("Literal"))).field("body",def("BlockStatement"))},{"../lib/shared":139,"../lib/types":140,"./core":128}],133:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var geq=require("../lib/shared").geq;def("ForOfStatement").bases("Statement").build("left","right","body").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement"));def("LetStatement").bases("Statement").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Statement"));def("LetExpression").bases("Expression").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Expression"));def("GraphExpression").bases("Expression").build("index","expression").field("index",geq(0)).field("expression",def("Literal"));def("GraphIndexExpression").bases("Expression").build("index").field("index",geq(0))},{"../lib/shared":139,"../lib/types":140,"./core":128}],134:[function(require,module,exports){var assert=require("assert");var types=require("../main");var getFieldNames=types.getFieldNames;var getFieldValue=types.getFieldValue;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isDate=types.builtInTypes.Date;var isRegExp=types.builtInTypes.RegExp;var hasOwn=Object.prototype.hasOwnProperty;function astNodesAreEquivalent(a,b,problemPath){if(isArray.check(problemPath)){problemPath.length=0}else{problemPath=null}return areEquivalent(a,b,problemPath)}astNodesAreEquivalent.assert=function(a,b){var problemPath=[];if(!astNodesAreEquivalent(a,b,problemPath)){if(problemPath.length===0){assert.strictEqual(a,b)}else{assert.ok(false,"Nodes differ in the following path: "+problemPath.map(subscriptForProperty).join(""))}}};function subscriptForProperty(property){if(/[_$a-z][_$a-z0-9]*/i.test(property)){return"."+property}return"["+JSON.stringify(property)+"]"}function areEquivalent(a,b,problemPath){if(a===b){return true}if(isArray.check(a)){return arraysAreEquivalent(a,b,problemPath)}if(isObject.check(a)){return objectsAreEquivalent(a,b,problemPath)}if(isDate.check(a)){return isDate.check(b)&&+a===+b -}if(isRegExp.check(a)){return isRegExp.check(b)&&(a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.ignoreCase===b.ignoreCase)}return a==b}function arraysAreEquivalent(a,b,problemPath){isArray.assert(a);var aLength=a.length;if(!isArray.check(b)||b.length!==aLength){if(problemPath){problemPath.push("length")}return false}for(var i=0;inp){return true}if(pp===np&&this.name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&this.name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&parent.callee===node;case"ConditionalExpression":return this.name==="test"&&parent.test===node;case"MemberExpression":return this.name==="object"&&parent.object===node;default:return false}default:if(parent.type==="NewExpression"&&this.name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}NPp.canBeFirstInStatement=function(){var node=this.node;return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};NPp.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(path){for(var node,parent;path.parent;path=path.parent){node=path.node;parent=path.parent.node;if(n.BlockStatement.check(parent)&&path.parent.name==="body"&&path.name===0){assert.strictEqual(parent.body[0],node);return true}if(n.ExpressionStatement.check(parent)&&path.name==="expression"){assert.strictEqual(parent.expression,node);return true}if(n.SequenceExpression.check(parent)&&path.parent.name==="expressions"&&path.name===0){assert.strictEqual(parent.expressions[0],node);continue}if(n.CallExpression.check(parent)&&path.name==="callee"){assert.strictEqual(parent.callee,node);continue}if(n.MemberExpression.check(parent)&&path.name==="object"){assert.strictEqual(parent.object,node);continue}if(n.ConditionalExpression.check(parent)&&path.name==="test"){assert.strictEqual(parent.test,node);continue}if(isBinary(parent)&&path.name==="left"){assert.strictEqual(parent.left,node);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&path.name==="argument"){assert.strictEqual(parent.argument,node);continue}return false}return true}function cleanUpNodesAfterPrune(remainingNodePath){if(n.VariableDeclaration.check(remainingNodePath.node)){var declarations=remainingNodePath.get("declarations").value;if(!declarations||declarations.length===0){return remainingNodePath.prune()}}else if(n.ExpressionStatement.check(remainingNodePath.node)){if(!remainingNodePath.get("expression").value){return remainingNodePath.prune()}}else if(n.IfStatement.check(remainingNodePath.node)){cleanUpIfStatementAfterPrune(remainingNodePath)}return remainingNodePath}function cleanUpIfStatementAfterPrune(ifStatement){var testExpression=ifStatement.get("test").value;var alternate=ifStatement.get("alternate").value;var consequent=ifStatement.get("consequent").value;if(!consequent&&!alternate){var testExpressionStatement=b.expressionStatement(testExpression);ifStatement.replace(testExpressionStatement)}else if(!consequent&&alternate){var negatedTestExpression=b.unaryExpression("!",testExpression,true);if(n.UnaryExpression.check(testExpression)&&testExpression.operator==="!"){negatedTestExpression=testExpression.argument}ifStatement.get("test").replace(negatedTestExpression);ifStatement.get("consequent").replace(alternate);ifStatement.get("alternate").replace()}}module.exports=NodePath},{"./path":137,"./scope":138,"./types":140,assert:143,util:169}],136:[function(require,module,exports){var assert=require("assert");var types=require("./types");var NodePath=require("./node-path");var Printable=types.namedTypes.Printable;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isFunction=types.builtInTypes.function;var hasOwn=Object.prototype.hasOwnProperty;var undefined;function PathVisitor(){assert.ok(this instanceof PathVisitor);this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this._shouldVisitComments=hasOwn.call(this._methodNameTable,"Block")||hasOwn.call(this._methodNameTable,"Line");this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false}function computeMethodNameTable(visitor){var typeNames=Object.create(null);for(var methodName in visitor){if(/^visit[A-Z]/.test(methodName)){typeNames[methodName.slice("visit".length)]=true}}var supertypeTable=types.computeSupertypeLookupTable(typeNames);var methodNameTable=Object.create(null);var typeNames=Object.keys(supertypeTable);var typeNameCount=typeNames.length;for(var i=0;i=0){parentCache[path.name=i]=path}}else{parentValue[path.name]=path.value;parentCache[path.name]=path}assert.strictEqual(parentValue[path.name],path.value);assert.strictEqual(path.parentPath.get(path.name),path);return path}Pp.replace=function replace(replacement){var results=[];var parentValue=this.parentPath.value;var parentCache=getChildCache(this.parentPath);var count=arguments.length;repairRelationshipWithParent(this);if(isArray.check(parentValue)){var originalLength=parentValue.length;var move=getMoves(this.parentPath,count-1,this.name+1);var spliceArgs=[this.name,1];for(var i=0;i=than},isNumber+" >= "+than)};exports.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return false},"true":function(){return true},undefined:function(){}};var naiveIsPrimitive=Type.or(builtin.string,builtin.number,builtin.boolean,builtin.null,builtin.undefined);exports.isPrimitive=new Type(function(value){if(value===null)return true;var type=typeof value;return!(type==="object"||type==="function")},naiveIsPrimitive.toString())},{"../lib/types":140}],140:[function(require,module,exports){var assert=require("assert");var Ap=Array.prototype;var slice=Ap.slice;var map=Ap.map;var each=Ap.forEach;var Op=Object.prototype;var objToStr=Op.toString;var funObjStr=objToStr.call(function(){});var strObjStr=objToStr.call("");var hasOwn=Op.hasOwnProperty;function Type(check,name){var self=this;assert.ok(self instanceof Type,self);assert.strictEqual(objToStr.call(check),funObjStr,check+" is not a function");var nameObjStr=objToStr.call(name);assert.ok(nameObjStr===funObjStr||nameObjStr===strObjStr,name+" is neither a function nor a string");Object.defineProperties(self,{name:{value:name},check:{value:function(value,deep){var result=check.call(self,value,deep);if(!result&&deep&&objToStr.call(deep)===funObjStr)deep(self,value);return result}}})}var Tp=Type.prototype;exports.Type=Type;Tp.assert=function(value,deep){if(!this.check(value,deep)){var str=shallowStringify(value);assert.ok(false,str+" does not match type "+this);return false}return true};function shallowStringify(value){if(isObject.check(value))return"{"+Object.keys(value).map(function(key){return key+": "+value[key]}).join(", ")+"}";if(isArray.check(value))return"["+value.map(shallowStringify).join(", ")+"]";return JSON.stringify(value)}Tp.toString=function(){var name=this.name;if(isString.check(name))return name;if(isFunction.check(name))return name.call(this)+"";return name+" type"};var builtInTypes={};exports.builtInTypes=builtInTypes;function defBuiltInType(example,name){var objStr=objToStr.call(example);Object.defineProperty(builtInTypes,name,{enumerable:true,value:new Type(function(value){return objToStr.call(value)===objStr},name)});return builtInTypes[name]}var isString=defBuiltInType("","string");var isFunction=defBuiltInType(function(){},"function");var isArray=defBuiltInType([],"array");var isObject=defBuiltInType({},"object");var isRegExp=defBuiltInType(/./,"RegExp");var isDate=defBuiltInType(new Date,"Date");var isNumber=defBuiltInType(3,"number");var isBoolean=defBuiltInType(true,"boolean");var isNull=defBuiltInType(null,"null");var isUndefined=defBuiltInType(void 0,"undefined");function toType(from,name){if(from instanceof Type)return from;if(from instanceof Def)return from.type;if(isArray.check(from))return Type.fromArray(from);if(isObject.check(from))return Type.fromObject(from);if(isFunction.check(from))return new Type(from,name);return new Type(function(value){return value===from},isUndefined.check(name)?function(){return from+""}:name)}Type.or=function(){var types=[];var len=arguments.length;for(var i=0;i=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};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=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};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}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,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/":169}],144:[function(require,module,exports){arguments[4][142][0].apply(exports,arguments)},{dup:142}],145:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var kMaxLength=1073741823;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return arr.foo()===42&&typeof arr.subarray==="function"&&new Uint8Array(1).subarray(1,1).byteLength===0}catch(e){return false}}();function Buffer(subject,encoding,noZero){if(!(this instanceof Buffer))return new Buffer(subject,encoding,noZero);var type=typeof subject;var length;if(type==="number"){length=+subject}else if(type==="string"){length=Buffer.byteLength(subject,encoding)}else if(type==="object"&&subject!==null){if(subject.type==="Buffer"&&isArray(subject.data))subject=subject.data;length=+subject.length}else{throw new TypeError("must start with number, buffer, array or string")}if(length>kMaxLength)throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength.toString(16)+" bytes");if(length<0)length=0;else length>>>=0;var self=this;if(Buffer.TYPED_ARRAY_SUPPORT){self=Buffer._augment(new Uint8Array(length))}else{self.length=length;self._isBuffer=true}var i;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof subject.byteLength==="number"){self._set(subject)}else if(isArrayish(subject)){if(Buffer.isBuffer(subject)){for(i=0;i0&&length<=Buffer.poolSize)self.parent=rootParent;return self}function SlowBuffer(subject,encoding,noZero){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding,noZero);var buf=new Buffer(subject,encoding,noZero);delete buf.parent;return buf}Buffer.isBuffer=function(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;break;case"utf8":case"utf-8":ret=utf8ToBytes(str).length;break;case"base64":ret=base64ToBytes(str).length;break;default:ret=str.length}return ret};Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined;Buffer.prototype.toString=function(encoding,start,end){var loweredCase=false;start=start>>>0;end=end===undefined||end===Infinity?this.length:end>>>0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}};Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.get=function(offset){console.log(".get() is deprecated. Access using array indexes instead.");return this.readUInt8(offset)};Buffer.prototype.set=function(v,offset){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(v,offset)};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;ithis.length)throw new RangeError("attempt to write outside buffer bounds");var remaining=this.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}encoding=String(encoding||"utf8").toLowerCase();var ret;switch(encoding){case"hex":ret=hexWrite(this,string,offset,length);break;case"utf8":case"utf-8":ret=utf8Write(this,string,offset,length);break;case"ascii":ret=asciiWrite(this,string,offset,length);break;case"binary":ret=binaryWrite(this,string,offset,length);break;case"base64":ret=base64Write(this,string,offset,length);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=utf16leWrite(this,string,offset,length);break;default:throw new TypeError("Unknown encoding: "+encoding)}return ret};Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end);for(var i=start;ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256))val+=this[offset+--byteLength]*mul;return val};Buffer.prototype.readUInt8=function(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256))val+=this[offset+--i]*mul;mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||valuebuf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i>>0&255;return offset+byteLength};Buffer.prototype.writeUIntBE=function(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256))this[offset+i]=value/mul>>>0&255;return offset+byteLength};Buffer.prototype.writeUInt8=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else objectWriteUInt16(this,value,offset,true);return offset+2};Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else objectWriteUInt16(this,value,offset,false);return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else objectWriteUInt32(this,value,offset,true);return offset+4};Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else objectWriteUInt32(this,value,offset,false);return offset+4};Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i>0)-sub&255;return offset+byteLength};Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256))this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength};Buffer.prototype.writeInt8=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else objectWriteUInt16(this,value,offset,true);return offset+2};Buffer.prototype.writeInt16BE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else objectWriteUInt16(this,value,offset,false);return offset+2};Buffer.prototype.writeInt32LE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else objectWriteUInt32(this,value,offset,true);return offset+4};Buffer.prototype.writeInt32BE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else objectWriteUInt32(this,value,offset,false);return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||valuebuf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert)checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38);ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert)checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308);ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function(target,target_start,start,end){var self=this; -if(!start)start=0;if(!end&&end!==0)end=this.length;if(target_start>=target.length)target_start=target.length;if(!target_start)target_start=0;if(end>0&&end=self.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-target_start=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":146,ieee754:147,"is-array":148}],146:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],147:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=nBytes*8-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8);m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8);if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=nBytes*8-mLen-1,eMax=(1<>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8);e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=s*128}},{}],148:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],149:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;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(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i0&&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"){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};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;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}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{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.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};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}},{}],150:[function(require,module,exports){if(typeof Object.create==="function"){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{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],151:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],152:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(isNaN(n)||util.isNull(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else return state.length}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(!util.isNumber(n)||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(util.isNull(ret)){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(!util.isNull(ret))this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(function(){maybeReadMore_(stream,state)})}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;process.nextTick(function(){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}})}}function forEach(xs,f){for(var i=0,l=xs.length;i1){var cbs=[];for(var c=0;c=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:145}],167:[function(require,module,exports){exports.isatty=function(){return false};function ReadStream(){throw new Error("tty.ReadStream is not implemented")}exports.ReadStream=ReadStream;function WriteStream(){throw new Error("tty.ReadStream is not implemented")}exports.WriteStream=WriteStream},{}],168:[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"}},{}],169:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;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=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}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;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]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+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){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}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=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}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");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-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]}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"||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"];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(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){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":168,_process:153,inherits:150}],170:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(process.platform==="win32"){ansiStyles.blue.open=""}function build(_styles){var builder=function builder(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;ai)if((args[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,i=0,j=0,_args;if(!holder&&!_length)return invoke(fn,args,that);_args=args.slice();if(holder)for(;length>i;i++)if(_args[i]===_)_args[i]=arguments[j++];while(_length>j)_args.push(arguments[j++]);return invoke(fn,_args,that)}}function ctx(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}function invoke(fn,args,that){var un=that===undefined;switch(args.length|0){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}var create=Object.create,getPrototypeOf=Object.getPrototypeOf,setPrototypeOf=Object.setPrototypeOf,defineProperty=Object.defineProperty,defineProperties=Object.defineProperties,getOwnDescriptor=Object.getOwnPropertyDescriptor,getKeys=Object.keys,getNames=Object.getOwnPropertyNames,getSymbols=Object.getOwnPropertySymbols,isFrozen=Object.isFrozen,has=ctx(call,ObjectProto[HAS_OWN],2),ES5Object=Object,Dict;function toObject(it){return ES5Object(assertDefined(it))}function returnIt(it){return it}function returnThis(){return this}function get(object,key){if(has(object,key))return object[key]}function ownKeys(it){assertObject(it);return getSymbols?getNames(it).concat(getSymbols(it)):getNames(it)}var assign=Object.assign||function(target,source){var T=Object(assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=ES5Object(arguments[i++]),keys=getKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T};function keyOf(object,el){var O=toObject(object),keys=getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}function array(it){return String(it).split(",")}var push=ArrayProto.push,unshift=ArrayProto.unshift,slice=ArrayProto.slice,splice=ArrayProto.splice,indexOf=ArrayProto.indexOf,forEach=ArrayProto[FOR_EACH];function createArrayMethod(type){var isMap=type==1,isFilter=type==2,isSome=type==3,isEvery=type==4,isFindIndex=type==6,noholes=type==5||isFindIndex;return function(callbackfn){var O=Object(assertDefined(this)),that=arguments[1],self=ES5Object(O),f=ctx(callbackfn,that,3),length=toLength(self.length),index=0,result=isMap?Array(length):isFilter?[]:undefined,val,res;for(;length>index;index++)if(noholes||index in self){val=self[index];res=f(val,index,O);if(type){if(isMap)result[index]=res;else if(res)switch(type){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(isEvery)return false}}return isFindIndex?-1:isSome||isEvery?isEvery:result}}function createArrayContains(isContains){return function(el){var O=toObject(this),length=toLength(O.length),index=toIndex(arguments[1],length);if(isContains&&el!=el){for(;length>index;index++)if(sameNaN(O[index]))return isContains||index}else for(;length>index;index++)if(isContains||index in O){if(O[index]===el)return isContains||index}return!isContains&&-1}}function generic(A,B){return typeof A=="function"?A:B}var MAX_SAFE_INTEGER=9007199254740991,pow=Math.pow,abs=Math.abs,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min,random=Math.random,trunc=Math.trunc||function(it){return(it>0?floor:ceil)(it)};function sameNaN(number){return number!=number}function toInteger(it){return isNaN(it)?0:trunc(it)}function toLength(it){return it>0?min(toInteger(it),MAX_SAFE_INTEGER):0}function toIndex(index,length){var index=toInteger(index);return index<0?max(index+length,0):min(index,length)}function lz(num){return num>9?num:"0"+num}function createReplacer(regExp,replace,isStatic){var replacer=isObject(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}function createPointAt(toString){return function(pos){var s=String(assertDefined(this)),i=toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return toString?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?toString?s.charAt(i):a:toString?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}var REDUCE_ERROR="Reduce of empty object with no initial value";function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}function assertDefined(it){if(it==undefined)throw TypeError("Function called on null or undefined");return it}function assertFunction(it){assert(isFunction(it),it," is not a function!");return it}function assertObject(it){assert(isObject(it),it," is not an object!");return it}function assertInstance(it,Constructor,name){assert(it instanceof Constructor,name,": use the 'new' operator!")}function descriptor(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return defineProperty(object,key,descriptor(bitmap,value))}:simpleSet}function uid(key){return SYMBOL+"("+key+")_"+(++sid+random())[TO_STRING](36)}function getWellKnownSymbol(name,setter){return Symbol&&Symbol[name]||(setter?Symbol:safeSymbol)(SYMBOL+DOT+name)}var DESC=!!function(){try{return defineProperty({},"a",{get:function(){return 2}}).a==2}catch(e){}}(),sid=0,hidden=createDefiner(1),set=Symbol?simpleSet:hidden,safeSymbol=Symbol||uid;function assignHidden(target,src){for(var key in src)hidden(target,key,src[key]);return target}var SYMBOL_UNSCOPABLES=getWellKnownSymbol("unscopables"),ArrayUnscopables=ArrayProto[SYMBOL_UNSCOPABLES]||{},SYMBOL_TAG=getWellKnownSymbol(TO_STRING_TAG),SYMBOL_SPECIES=getWellKnownSymbol("species"),SYMBOL_ITERATOR;function setSpecies(C){if(DESC&&(framework||!isNative(C)))defineProperty(C,SYMBOL_SPECIES,{configurable:true,get:returnThis})}var NODE=cof(process)==PROCESS,core={},path=framework?global:core,old=global.core,exportGlobal,FORCED=1,GLOBAL=2,STATIC=4,PROTO=8,BIND=16,WRAP=32;function $define(type,name,source){var key,own,out,exp,isGlobal=type&GLOBAL,target=isGlobal?global:type&STATIC?global[name]:(global[name]||ObjectProto)[PROTOTYPE],exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&FORCED)&&target&&key in target&&(!isFunction(target[key])||isNative(target[key]));out=(own?target:source)[key];if(!framework&&isGlobal&&!isFunction(target[key]))exp=source[key];else if(type&BIND&&own)exp=ctx(out,global);else if(type&WRAP&&!framework&&target[key]==out){exp=function(param){return this instanceof out?new out(param):out(param)};exp[PROTOTYPE]=out[PROTOTYPE]}else exp=type&PROTO&&isFunction(out)?ctx(call,out):out;if(framework&&target&&!own){if(isGlobal)target[key]=out;else delete target[key]&&hidden(target,key,out)}if(exports[key]!=out)hidden(exports,key,exp)}}if(typeof module!="undefined"&&module.exports)module.exports=core;else if(isFunction(define)&&define.amd)define(function(){return core});else exportGlobal=true;if(exportGlobal||framework){core.noConflict=function(){global.core=old;return core};global.core=core}SYMBOL_ITERATOR=getWellKnownSymbol(ITERATOR);var ITER=safeSymbol("iter"),KEY=1,VALUE=2,Iterators={},IteratorPrototype={},BUGGY_ITERATORS="keys"in ArrayProto&&!("next"in[].keys());setIterator(IteratorPrototype,returnThis);function setIterator(O,value){hidden(O,SYMBOL_ITERATOR,value);FF_ITERATOR in ArrayProto&&hidden(O,FF_ITERATOR,value)}function createIterator(Constructor,NAME,next,proto){Constructor[PROTOTYPE]=create(proto||IteratorPrototype,{next:descriptor(1,next)});setToStringTag(Constructor,NAME+" Iterator")}function defineIterator(Constructor,NAME,value,DEFAULT){var proto=Constructor[PROTOTYPE],iter=get(proto,SYMBOL_ITERATOR)||get(proto,FF_ITERATOR)||DEFAULT&&get(proto,DEFAULT)||value;if(framework){setIterator(proto,iter);if(iter!==value){var iterProto=getPrototypeOf(iter.call(new Constructor));setToStringTag(iterProto,NAME+" Iterator",true);has(proto,FF_ITERATOR)&&setIterator(iterProto,returnThis)}}Iterators[NAME]=iter;Iterators[NAME+" Iterator"]=returnThis;return iter}function defineStdIterators(Base,NAME,Constructor,next,DEFAULT,IS_SET){function createIter(kind){return function(){return new Constructor(this,kind)}}createIterator(Constructor,NAME,next);var entries=createIter(KEY+VALUE),values=createIter(VALUE);if(DEFAULT==VALUE)values=defineIterator(Base,NAME,values,"values");else entries=defineIterator(Base,NAME,entries,"entries");if(DEFAULT){$define(PROTO+FORCED*BUGGY_ITERATORS,NAME,{entries:entries,keys:IS_SET?values:createIter(KEY),values:values})}}function iterResult(done,value){return{value:value,done:!!done}}function isIterable(it){var O=Object(it),Symbol=global[SYMBOL],hasExt=(Symbol&&Symbol[ITERATOR]||FF_ITERATOR)in O;return hasExt||SYMBOL_ITERATOR in O||has(Iterators,classof(O))}function getIterator(it){var Symbol=global[SYMBOL],ext=it[Symbol&&Symbol[ITERATOR]||FF_ITERATOR],getIter=ext||it[SYMBOL_ITERATOR]||Iterators[classof(it)];return assertObject(getIter.call(it))}function stepCall(fn,value,entries){return entries?invoke(fn,value):fn(value)}function checkDangerIterClosing(fn){var danger=true;var O={next:function(){throw 1},"return":function(){danger=false}};O[SYMBOL_ITERATOR]=returnThis;try{fn(O)}catch(e){}return danger}function closeIterator(iterator){var ret=iterator["return"];if(ret!==undefined)ret.call(iterator)}function safeIterClose(exec,iterator){try{exec(iterator)}catch(e){closeIterator(iterator);throw e}}function forOf(iterable,entries,fn,that){safeIterClose(function(iterator){var f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done)if(stepCall(f,step.value,entries)===false){return closeIterator(iterator)}},getIterator(iterable))}!function(TAG,SymbolRegistry,AllSymbols,setter){if(!isNative(Symbol)){Symbol=function(description){assert(!(this instanceof Symbol),SYMBOL+" is not a "+CONSTRUCTOR);var tag=uid(description),sym=set(create(Symbol[PROTOTYPE]),TAG,tag);AllSymbols[tag]=sym;DESC&&setter&&defineProperty(ObjectProto,tag,{configurable:true,set:function(value){hidden(this,tag,value)}});return sym};hidden(Symbol[PROTOTYPE],TO_STRING,function(){return this[TAG]})}$define(GLOBAL+WRAP,{Symbol:Symbol});var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=Symbol(key)},iterator:SYMBOL_ITERATOR||getWellKnownSymbol(ITERATOR),keyFor:part.call(keyOf,SymbolRegistry),species:SYMBOL_SPECIES,toStringTag:SYMBOL_TAG=getWellKnownSymbol(TO_STRING_TAG,true),unscopables:SYMBOL_UNSCOPABLES,pure:safeSymbol,set:set,useSetter:function(){setter=true},useSimple:function(){setter=false}};forEach.call(array("hasInstance,isConcatSpreadable,match,replace,search,split,toPrimitive"),function(it){symbolStatics[it]=getWellKnownSymbol(it)});$define(STATIC,SYMBOL,symbolStatics);setToStringTag(Symbol,SYMBOL);$define(STATIC+FORCED*!isNative(Symbol),OBJECT,{getOwnPropertyNames:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])||result.push(key);return result},getOwnPropertySymbols:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])&&result.push(AllSymbols[key]);return result}});setToStringTag(Math,MATH,true);setToStringTag(global.JSON,"JSON",true)}(safeSymbol("tag"),{},{},true);!function(){var objectStatic={assign:assign,is:function(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}};"__proto__"in ObjectProto&&function(buggy,set){try{set=ctx(call,getOwnDescriptor(ObjectProto,"__proto__").set,2);set({},ArrayProto)}catch(e){buggy=true}objectStatic.setPrototypeOf=setPrototypeOf=setPrototypeOf||function(O,proto){assertObject(O);assert(proto===null||isObject(proto),proto,": can't set as prototype!");if(buggy)O.__proto__=proto;else set(O,proto);return O}}();$define(STATIC,OBJECT,objectStatic)}();!function(){function wrapObjectMethod(key,MODE){var fn=Object[key],exp=core[OBJECT][key],f=0,o={};if(!exp||isNative(exp)){o[key]=MODE==1?function(it){return isObject(it)?fn(it):it}:MODE==2?function(it){return isObject(it)?fn(it):true}:MODE==3?function(it){return isObject(it)?fn(it):false}:MODE==4?function(it,key){return fn(toObject(it),key)}:function(it){return fn(toObject(it))};try{fn(DOT)}catch(e){f=1}$define(STATIC+FORCED*f,OBJECT,o)}}wrapObjectMethod("freeze",1);wrapObjectMethod("seal",1);wrapObjectMethod("preventExtensions",1);wrapObjectMethod("isFrozen",2);wrapObjectMethod("isSealed",2);wrapObjectMethod("isExtensible",3);wrapObjectMethod("getOwnPropertyDescriptor",4);wrapObjectMethod("getPrototypeOf");wrapObjectMethod("keys");wrapObjectMethod("getOwnPropertyNames")}();!function(isInteger){$define(STATIC,NUMBER,{EPSILON:pow(2,-52),isFinite:function(it){return typeof it=="number"&&isFinite(it)},isInteger:isInteger,isNaN:sameNaN,isSafeInteger:function(number){return isInteger(number)&&abs(number)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MIN_SAFE_INTEGER:-MAX_SAFE_INTEGER,parseFloat:parseFloat,parseInt:parseInt})}(Number.isInteger||function(it){return!isObject(it)&&isFinite(it)&&floor(it)===it});!function(){var E=Math.E,exp=Math.exp,log=Math.log,sqrt=Math.sqrt,sign=Math.sign||function(x){return(x=+x)==0||x!=x?x:x<0?-1:1};function asinh(x){return!isFinite(x=+x)||x==0?x:x<0?-asinh(-x):log(x+sqrt(x*x+1))}function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:exp(x)-1}$define(STATIC,MATH,{acosh:function(x){return(x=+x)<1?NaN:isFinite(x)?log(x/E+sqrt(x+1)*sqrt(x-1)/E)+1:x},asinh:asinh,atanh:function(x){return(x=+x)==0?x:log((1+x)/(1-x))/2},cbrt:function(x){return sign(x=+x)*pow(abs(x),1/3)},clz32:function(x){return(x>>>=0)?32-x[TO_STRING](2).length:32},cosh:function(x){return(exp(x=+x)+exp(-x))/2},expm1:expm1,fround:function(x){return new Float32Array([x])[0]},hypot:function(value1,value2){var sum=0,len1=arguments.length,len2=len1,args=Array(len1),larg=-Infinity,arg;while(len1--){arg=args[len1]=+arguments[len1];if(arg==Infinity||arg==-Infinity)return Infinity;if(arg>larg)larg=arg}larg=arg||1;while(len2--)sum+=pow(args[len2]/larg,2);return larg*sqrt(sum)},imul:function(x,y){var UInt16=65535,xn=+x,yn=+y,xl=UInt16&xn,yl=UInt16&yn;return 0|xl*yl+((UInt16&xn>>>16)*yl+xl*(UInt16&yn>>>16)<<16>>>0)},log1p:function(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:log(1+x)},log10:function(x){return log(x)/Math.LN10},log2:function(x){return log(x)/Math.LN2},sign:sign,sinh:function(x){return abs(x=+x)<1?(expm1(x)-expm1(-x))/2:(exp(x-1)-exp(-x-1))*(E/2)},tanh:function(x){var a=expm1(x=+x),b=expm1(-x);return a==Infinity?1:b==Infinity?-1:(a-b)/(exp(x)+exp(-x))},trunc:trunc})}();!function(fromCharCode){function assertNotRegExp(it){if(cof(it)==REGEXP)throw TypeError()}$define(STATIC,STRING,{fromCodePoint:function(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")},raw:function(callSite){var raw=toObject(callSite.raw),len=toLength(raw.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(raw[i++]));if(in||n==Infinity)throw RangeError("Count can't be negative");for(;n>0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res},startsWith:function(searchString){assertNotRegExp(searchString);var that=String(assertDefined(this)),index=toLength(min(arguments[1],that.length));searchString+="";return that.slice(index,index+searchString.length)===searchString}})}(String.fromCharCode);!function(){$define(STATIC+FORCED*checkDangerIterClosing(Array.from),ARRAY,{from:function(arrayLike){var O=Object(assertDefined(arrayLike)),mapfn=arguments[1],mapping=mapfn!==undefined,f=mapping?ctx(mapfn,arguments[2],2):undefined,index=0,length,result,step;if(isIterable(O)){result=new(generic(this,Array));safeIterClose(function(iterator){for(;!(step=iterator.next()).done;index++){result[index]=mapping?f(step.value,index):step.value}},getIterator(O))}else{result=new(generic(this,Array))(length=toLength(O.length));for(;length>index;index++){result[index]=mapping?f(O[index],index):O[index]}}result.length=index;return result}});$define(STATIC,ARRAY,{of:function(){var index=0,length=arguments.length,result=new(generic(this,Array))(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}});setSpecies(Array)}();!function(){$define(PROTO,ARRAY,{copyWithin:function(target,start){var O=Object(assertDefined(this)),len=toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],fin=end===undefined?len:toIndex(end,len),count=min(fin-from,len-to),inc=1;if(from0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O},fill:function(value){var O=Object(assertDefined(this)),length=toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O},find:createArrayMethod(5),findIndex:createArrayMethod(6)});if(framework){forEach.call(array("find,findIndex,fill,copyWithin,entries,keys,values"),function(it){ArrayUnscopables[it]=true});SYMBOL_UNSCOPABLES in ArrayProto||hidden(ArrayProto,SYMBOL_UNSCOPABLES,ArrayUnscopables)}}();!function(at){defineStdIterators(Array,ARRAY,function(iterated,kind){set(this,ITER,{o:toObject(iterated),i:0,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,index=iter.i++;if(!O||index>=O.length){iter.o=undefined;return iterResult(1)}if(kind==KEY)return iterResult(0,index);if(kind==VALUE)return iterResult(0,O[index]);return iterResult(0,[index,O[index]])},VALUE);Iterators[ARGUMENTS]=Iterators[ARRAY];defineStdIterators(String,STRING,function(iterated){set(this,ITER,{o:String(iterated),i:0})},function(){var iter=this[ITER],O=iter.o,index=iter.i,point;if(index>=O.length)return iterResult(1);point=at.call(O,index);iter.i+=point.length;return iterResult(0,point)})}(createPointAt(true));isFunction(setImmediate)&&isFunction(clearImmediate)||function(ONREADYSTATECHANGE){var postMessage=global.postMessage,addEventListener=global.addEventListener,MessageChannel=global.MessageChannel,counter=0,queue={},defer,channel,port;setImmediate=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearImmediate=function(id){delete queue[id]};function run(id){if(has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run(event.data)}if(NODE){defer=function(id){nextTick(part.call(run,id))}}else if(addEventListener&&isFunction(postMessage)&&!global.importScripts){defer=function(id){postMessage(id,"*")};addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if(document&&ONREADYSTATECHANGE in document[CREATE_ELEMENT]("script")){defer=function(id){html.appendChild(document[CREATE_ELEMENT]("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run(id)}}}else{defer=function(id){setTimeout(run,0,id)}}}("onreadystatechange");$define(GLOBAL+BIND,{setImmediate:setImmediate,clearImmediate:clearImmediate});!function(Promise,test){isFunction(Promise)&&isFunction(Promise.resolve)&&Promise.resolve(test=new Promise(function(){}))==test||function(asap,RECORD){function isThenable(it){var then;if(isObject(it))then=it.then;return isFunction(then)?then:false}function handledRejectionOrHasOnRejected(promise){var record=promise[RECORD],chain=record.c,i=0,react;if(record.h)return true;while(chain.length>i){react=chain[i++];if(react.fail||handledRejectionOrHasOnRejected(react.P))return true}}function notify(record,reject){var chain=record.c;if(reject||chain.length)asap(function(){var promise=record.p,value=record.v,ok=record.s==1,i=0;if(reject&&!handledRejectionOrHasOnRejected(promise)){setTimeout(function(){if(!handledRejectionOrHasOnRejected(promise)){if(NODE){if(!process.emit("unhandledRejection",value,promise)){}}else if(isFunction(console.error)){console.error("Unhandled promise rejection",value)}}},1e3)}else while(chain.length>i)!function(react){var cb=ok?react.ok:react.fail,ret,then;try{if(cb){if(!ok)record.h=true;ret=cb===true?value:cb(value);if(ret===react.P){react.rej(TypeError(PROMISE+"-chain cycle"))}else if(then=isThenable(ret)){then.call(ret,react.res,react.rej)}else react.res(ret)}else react.rej(value)}catch(err){react.rej(err)}}(chain[i++]);chain.length=0})}function resolve(value){var record=this,then,wrapper;if(record.d)return;record.d=true;record=record.r||record;try{if(then=isThenable(value)){wrapper={r:record,d:false};then.call(value,ctx(resolve,wrapper,1),ctx(reject,wrapper,1))}else{record.v=value;record.s=1;notify(record)}}catch(err){reject.call(wrapper||{r:record,d:false},err)}}function reject(value){var record=this;if(record.d)return;record.d=true;record=record.r||record;record.v=value;record.s=2;notify(record,true)}function getConstructor(C){var S=assertObject(C)[SYMBOL_SPECIES];return S!=undefined?S:C}Promise=function(executor){assertFunction(executor);assertInstance(this,Promise,PROMISE);var record={p:this,c:[],s:0,d:false,v:undefined,h:false};hidden(this,RECORD,record);try{executor(ctx(resolve,record,1),ctx(reject,record,1))}catch(err){reject.call(record,err)}};assignHidden(Promise[PROTOTYPE],{then:function(onFulfilled,onRejected){var S=assertObject(assertObject(this)[CONSTRUCTOR])[SYMBOL_SPECIES];var react={ok:isFunction(onFulfilled)?onFulfilled:true,fail:isFunction(onRejected)?onRejected:false},P=react.P=new(S!=undefined?S:Promise)(function(resolve,reject){react.res=assertFunction(resolve);react.rej=assertFunction(reject)}),record=this[RECORD];record.c.push(react);record.s&¬ify(record);return P},"catch":function(onRejected){return this.then(undefined,onRejected)}});assignHidden(Promise,{all:function(iterable){var Promise=getConstructor(this),values=[];return new Promise(function(resolve,reject){forOf(iterable,false,push,values);var remaining=values.length,results=Array(remaining);if(remaining)forEach.call(values,function(promise,index){Promise.resolve(promise).then(function(value){results[index]=value;--remaining||resolve(results)},reject)});else resolve(results)})},race:function(iterable){var Promise=getConstructor(this);return new Promise(function(resolve,reject){forOf(iterable,false,function(promise){Promise.resolve(promise).then(resolve,reject)})})},reject:function(r){return new(getConstructor(this))(function(resolve,reject){reject(r)})},resolve:function(x){return isObject(x)&&RECORD in x&&getPrototypeOf(x)===this[PROTOTYPE]?x:new(getConstructor(this))(function(resolve,reject){resolve(x)})}})}(nextTick||setImmediate,safeSymbol("record"));setToStringTag(Promise,PROMISE);setSpecies(Promise);$define(GLOBAL+FORCED*!isNative(Promise),{Promise:Promise})}(global[PROMISE]);!function(){var UID=safeSymbol("uid"),O1=safeSymbol("O1"),WEAK=safeSymbol("weak"),LEAK=safeSymbol("leak"),LAST=safeSymbol("last"),FIRST=safeSymbol("first"),SIZE=DESC?safeSymbol("size"):"size",uid=0,tmp={};function getCollection(C,NAME,methods,commonMethods,isMap,isWeak){var ADDER=isMap?"set":"add",proto=C&&C[PROTOTYPE],O={};function initFromIterable(that,iterable){if(iterable!=undefined)forOf(iterable,isMap,that[ADDER],that);return that}function fixSVZ(key,chain){var method=proto[key];if(framework)proto[key]=function(a,b){var result=method.call(this,a===0?0:a,b);return chain?this:result}}if(!isNative(C)||!(isWeak||!BUGGY_ITERATORS&&has(proto,FOR_EACH)&&has(proto,"entries"))){C=isWeak?function(iterable){assertInstance(this,C,NAME);set(this,UID,uid++);initFromIterable(this,iterable)}:function(iterable){var that=this;assertInstance(that,C,NAME);set(that,O1,create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);initFromIterable(that,iterable)};assignHidden(assignHidden(C[PROTOTYPE],methods),commonMethods);isWeak||!DESC||defineProperty(C[PROTOTYPE],"size",{get:function(){return assertDefined(this[SIZE])}})}else{var Native=C,inst=new C,chain=inst[ADDER](isWeak?{}:-0,1),buggyZero;if(checkDangerIterClosing(function(O){new C(O)})){C=function(iterable){assertInstance(this,C,NAME);return initFromIterable(new Native,iterable)};C[PROTOTYPE]=proto;if(framework)proto[CONSTRUCTOR]=C}isWeak||inst[FOR_EACH](function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixSVZ("delete");fixSVZ("has");isMap&&fixSVZ("get")}if(buggyZero||chain!==inst)fixSVZ(ADDER,true)}setToStringTag(C,NAME);setSpecies(C);O[NAME]=C;$define(GLOBAL+WRAP+FORCED*!isNative(C),O);isWeak||defineStdIterators(C,NAME,function(iterated,kind){set(this,ITER,{o:iterated,k:kind})},function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){iter.o=undefined;return iterResult(1)}if(kind==KEY)return iterResult(0,entry.k);if(kind==VALUE)return iterResult(0,entry.v);return iterResult(0,[entry.k,entry.v])},isMap?KEY+VALUE:VALUE,!isMap);return C}function fastKey(it,create){if(!isObject(it))return(typeof it=="string"?"S":"P")+it;if(isFrozen(it))return"F";if(!has(it,UID)){if(!create)return"E";hidden(it,UID,++uid)}return"O"+it[UID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}function def(that,key,value){var entry=getEntry(that,key),prev,index;if(entry)entry.v=value;else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!="F")that[O1][index]=entry}return that}var collectionMethods={clear:function(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function(key){return!!getEntry(this,key)}};Map=getCollection(Map,MAP,{get:function(key){var entry=getEntry(this,key);return entry&&entry.v},set:function(key,value){return def(this,key===0?0:key,value)}},collectionMethods,true);Set=getCollection(Set,SET,{add:function(value){return def(this,value=value===0?0:value,value)}},collectionMethods);function defWeak(that,key,value){if(isFrozen(assertObject(key)))leakStore(that).set(key,value);else{has(key,WEAK)||hidden(key,WEAK,{});key[WEAK][that[UID]]=value}return that}function leakStore(that){return that[LEAK]||hidden(that,LEAK,new Map)[LEAK]}var weakMethods={"delete":function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this)["delete"](key);return has(key,WEAK)&&has(key[WEAK],this[UID])&&delete key[WEAK][this[UID]]},has:function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this).has(key);return has(key,WEAK)&&has(key[WEAK],this[UID])}};WeakMap=getCollection(WeakMap,WEAKMAP,{get:function(key){if(isObject(key)){if(isFrozen(key))return leakStore(this).get(key);if(has(key,WEAK))return key[WEAK][this[UID]]}},set:function(key,value){return defWeak(this,key,value)}},weakMethods,true,true);if(framework&&(new WeakMap).set(Object.freeze(tmp),7).get(tmp)!=7){forEach.call(array("delete,has,get,set"),function(key){var method=WeakMap[PROTOTYPE][key];WeakMap[PROTOTYPE][key]=function(a,b){if(isObject(a)&&isFrozen(a)){var result=leakStore(this)[key](a,b);return key=="set"?this:result}return method.call(this,a,b)}})}WeakSet=getCollection(WeakSet,WEAKSET,{add:function(value){return defWeak(this,value,true)}},weakMethods,false,true)}();!function(){function Enumerate(iterated){var keys=[],key;for(key in iterated)keys.push(key);set(this,ITER,{o:iterated,a:keys,i:0})}createIterator(Enumerate,OBJECT,function(){var iter=this[ITER],keys=iter.a,key;do{if(iter.i>=keys.length)return iterResult(1)}while(!((key=keys[iter.i++])in iter.o));return iterResult(0,key)});function wrap(fn){return function(it){assertObject(it);try{return fn.apply(undefined,arguments),true}catch(e){return false}}}function reflectGet(target,propertyKey){var receiver=arguments.length<3?target:arguments[2],desc=getOwnDescriptor(assertObject(target),propertyKey),proto;if(desc)return has(desc,"value")?desc.value:desc.get===undefined?undefined:desc.get.call(receiver); -return isObject(proto=getPrototypeOf(target))?reflectGet(proto,propertyKey,receiver):undefined}function reflectSet(target,propertyKey,V){var receiver=arguments.length<4?target:arguments[3],ownDesc=getOwnDescriptor(assertObject(target),propertyKey),existingDescriptor,proto;if(!ownDesc){if(isObject(proto=getPrototypeOf(target))){return reflectSet(proto,propertyKey,V,receiver)}ownDesc=descriptor(0)}if(has(ownDesc,"value")){if(ownDesc.writable===false||!isObject(receiver))return false;existingDescriptor=getOwnDescriptor(receiver,propertyKey)||descriptor(0);existingDescriptor.value=V;return defineProperty(receiver,propertyKey,existingDescriptor),true}return ownDesc.set===undefined?false:(ownDesc.set.call(receiver,V),true)}var isExtensible=Object.isExtensible||returnIt;var reflect={apply:ctx(call,apply,3),construct:function(target,argumentsList){var proto=assertFunction(arguments.length<3?target:arguments[2])[PROTOTYPE],instance=create(isObject(proto)?proto:ObjectProto),result=apply.call(target,instance,argumentsList);return isObject(result)?result:instance},defineProperty:wrap(defineProperty),deleteProperty:function(target,propertyKey){var desc=getOwnDescriptor(assertObject(target),propertyKey);return desc&&!desc.configurable?false:delete target[propertyKey]},enumerate:function(target){return new Enumerate(assertObject(target))},get:reflectGet,getOwnPropertyDescriptor:function(target,propertyKey){return getOwnDescriptor(assertObject(target),propertyKey)},getPrototypeOf:function(target){return getPrototypeOf(assertObject(target))},has:function(target,propertyKey){return propertyKey in target},isExtensible:function(target){return!!isExtensible(assertObject(target))},ownKeys:ownKeys,preventExtensions:wrap(Object.preventExtensions||returnIt),set:reflectSet};if(setPrototypeOf)reflect.setPrototypeOf=function(target,proto){return setPrototypeOf(assertObject(target),proto),true};$define(GLOBAL,{Reflect:{}});$define(STATIC,"Reflect",reflect)}();!function(){$define(PROTO,ARRAY,{includes:createArrayContains(true)});$define(PROTO,STRING,{at:createPointAt(true)});function createObjectToArray(isEntries){return function(object){var O=toObject(object),keys=getKeys(object),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}$define(STATIC,OBJECT,{getOwnPropertyDescriptors:function(object){var O=toObject(object),result={};forEach.call(ownKeys(O),function(key){defineProperty(result,key,descriptor(0,getOwnDescriptor(O,key)))});return result},values:createObjectToArray(false),entries:createObjectToArray(true)});$define(STATIC,REGEXP,{escape:createReplacer(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",true)})}();!function(REFERENCE){REFERENCE_GET=getWellKnownSymbol(REFERENCE+"Get",true);var REFERENCE_SET=getWellKnownSymbol(REFERENCE+SET,true),REFERENCE_DELETE=getWellKnownSymbol(REFERENCE+"Delete",true);$define(STATIC,SYMBOL,{referenceGet:REFERENCE_GET,referenceSet:REFERENCE_SET,referenceDelete:REFERENCE_DELETE});hidden(FunctionProto,REFERENCE_GET,returnThis);function setMapMethods(Constructor){if(Constructor){var MapProto=Constructor[PROTOTYPE];hidden(MapProto,REFERENCE_GET,MapProto.get);hidden(MapProto,REFERENCE_SET,MapProto.set);hidden(MapProto,REFERENCE_DELETE,MapProto["delete"])}}setMapMethods(Map);setMapMethods(WeakMap)}("reference");!function(DICT){Dict=function(iterable){var dict=create(null);if(iterable!=undefined){if(isIterable(iterable)){forOf(iterable,true,function(key,value){dict[key]=value})}else assign(dict,iterable)}return dict};Dict[PROTOTYPE]=null;function DictIterator(iterated,kind){set(this,ITER,{o:toObject(iterated),a:getKeys(iterated),i:0,k:kind})}createIterator(DictIterator,DICT,function(){var iter=this[ITER],O=iter.o,keys=iter.a,kind=iter.k,key;do{if(iter.i>=keys.length){iter.o=undefined;return iterResult(1)}}while(!has(O,key=keys[iter.i++]));if(kind==KEY)return iterResult(0,key);if(kind==VALUE)return iterResult(0,O[key]);return iterResult(0,[key,O[key]])});function createDictIter(kind){return function(it){return new DictIterator(it,kind)}}function createDictMethod(type){var isMap=type==1,isEvery=type==4;return function(object,callbackfn,that){var f=ctx(callbackfn,that,3),O=toObject(object),result=isMap||type==7||type==2?new(generic(this,Dict)):undefined,key,val,res;for(key in O)if(has(O,key)){val=O[key];res=f(val,key,object);if(type){if(isMap)result[key]=res;else if(res)switch(type){case 2:result[key]=val;break;case 3:return true;case 5:return val;case 6:return key;case 7:result[res[0]]=res[1]}else if(isEvery)return false}}return type==3||isEvery?isEvery:result}}function createDictReduce(isTurn){return function(object,mapfn,init){assertFunction(mapfn);var O=toObject(object),keys=getKeys(O),length=keys.length,i=0,memo,key,result;if(isTurn)memo=init==undefined?new(generic(this,Dict)):Object(init);else if(arguments.length<3){assert(length,REDUCE_ERROR);memo=O[keys[i++]]}else memo=Object(init);while(length>i)if(has(O,key=keys[i++])){result=mapfn(memo,O[key],key,object);if(isTurn){if(result===false)break}else memo=result}return memo}}var findKey=createDictMethod(6);function includes(object,el){return(el==el?keyOf(object,el):findKey(object,sameNaN))!==undefined}var dictMethods={keys:createDictIter(KEY),values:createDictIter(VALUE),entries:createDictIter(KEY+VALUE),forEach:createDictMethod(0),map:createDictMethod(1),filter:createDictMethod(2),some:createDictMethod(3),every:createDictMethod(4),find:createDictMethod(5),findKey:findKey,mapPairs:createDictMethod(7),reduce:createDictReduce(false),turn:createDictReduce(true),keyOf:keyOf,includes:includes,has:has,get:get,set:createDefiner(0),isDict:function(it){return isObject(it)&&getPrototypeOf(it)===Dict[PROTOTYPE]}};if(REFERENCE_GET)for(var key in dictMethods)!function(fn){function method(){for(var args=[this],i=0;i1;return function(){var length=min(n,arguments.length),args=Array(length),i=0;while(length>i)args[i]=arguments[i++];return invoke(fn,args,isThat?that:this)}}});function tie(key){var that=this,bound={};return hidden(that,_,function(key){if(key===undefined||!(key in that))return toLocaleString.call(that);return has(bound,key)?bound[key]:bound[key]=ctx(that[key],that,-1)})[_](key)}hidden(path._,TO_STRING,function(){return _});hidden(ObjectProto,_,tie);DESC||hidden(ArrayProto,_,tie)}(DESC?uid("tie"):TO_LOCALE,ObjectProto[TO_LOCALE]);!function(){function define(target,mixin){var keys=ownKeys(toObject(mixin)),length=keys.length,i=0,key;while(length>i)defineProperty(target,key=keys[i++],getOwnDescriptor(mixin,key));return target}$define(STATIC+FORCED,OBJECT,{isObject:isObject,classof:classof,define:define,make:function(proto,mixin){return define(create(proto),mixin)}})}();$define(PROTO+FORCED,ARRAY,{turn:function(fn,target){assertFunction(fn);var memo=target==undefined?[]:Object(target),O=ES5Object(this),length=toLength(O.length),index=0;while(length>index)if(fn(memo,O[index],index++,this)===false)break;return memo}});if(framework)ArrayUnscopables.turn=true;!function(numberMethods){function NumberIterator(iterated){set(this,ITER,{l:toLength(iterated),i:0})}createIterator(NumberIterator,NUMBER,function(){var iter=this[ITER],i=iter.i++;return ii)args.push(arguments[i++]);return invoke(fn,args)}});$define(PROTO+FORCED,NUMBER,numberMethods)}({});!function(){var escapeHTMLDict={"&":"&","<":"<",">":">",'"':""","'":"'"},unescapeHTMLDict={},key;for(key in escapeHTMLDict)unescapeHTMLDict[escapeHTMLDict[key]]=key;$define(PROTO+FORCED,STRING,{escapeHTML:createReplacer(/[&<>"']/g,escapeHTMLDict),unescapeHTML:createReplacer(/&(?:amp|lt|gt|quot|apos);/g,unescapeHTMLDict)})}();!function(formatRegExp,flexioRegExp,locales,current,SECONDS,MINUTES,HOURS,MONTH,YEAR){function createFormat(prefix){return function(template,locale){var that=this,dict=locales[has(locales,locale)?locale:current];function get(unit){return that[prefix+unit]()}return String(template).replace(formatRegExp,function(part){switch(part){case"s":return get(SECONDS);case"ss":return lz(get(SECONDS));case"m":return get(MINUTES);case"mm":return lz(get(MINUTES));case"h":return get(HOURS);case"hh":return lz(get(HOURS));case"D":return get(DATE);case"DD":return lz(get(DATE));case"W":return dict[0][get("Day")];case"N":return get(MONTH)+1;case"NN":return lz(get(MONTH)+1);case"M":return dict[2][get(MONTH)];case"MM":return dict[1][get(MONTH)];case"Y":return get(YEAR);case"YY":return lz(get(YEAR)%100)}return part})}}function addLocale(lang,locale){function split(index){var result=[];forEach.call(array(locale.months),function(it){result.push(it.replace(flexioRegExp,"$"+index))});return result}locales[lang]=[array(locale.weekdays),split(1),split(2)];return core}$define(PROTO+FORCED,DATE,{format:createFormat("get"),formatUTC:createFormat("getUTC")});addLocale(current,{weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",months:"January,February,March,April,May,June,July,August,September,October,November,December"});addLocale("ru",{weekdays:"Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота",months:"Январ:я|ь,Феврал:я|ь,Март:а|,Апрел:я|ь,Ма:я|й,Июн:я|ь,"+"Июл:я|ь,Август:а|,Сентябр:я|ь,Октябр:я|ь,Ноябр:я|ь,Декабр:я|ь"});core.locale=function(locale){return has(locales,locale)?current=locale:current};core.addLocale=addLocale}(/\b\w\w?\b/g,/:(.*)\|(.*)$/,{},"en","Seconds","Minutes","Hours","Month","FullYear");$define(GLOBAL+FORCED,{global:global});!function(arrayStatics){function setArrayStatics(keys,length){forEach.call(array(keys),function(key){if(key in ArrayProto)arrayStatics[key]=ctx(call,ArrayProto[key],length)})}setArrayStatics("pop,reverse,shift,keys,values,entries",1);setArrayStatics("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);setArrayStatics("join,slice,concat,push,splice,unshift,sort,lastIndexOf,"+"reduce,reduceRight,copyWithin,fill,turn");$define(STATIC,ARRAY,arrayStatics)}({});!function(NodeList){if(framework&&NodeList&&!(SYMBOL_ITERATOR in NodeList[PROTOTYPE])){hidden(NodeList[PROTOTYPE],SYMBOL_ITERATOR,Iterators[ARRAY])}Iterators.NodeList=Iterators[ARRAY]}(global.NodeList);!function(log,enabled){forEach.call(array("assert,clear,count,debug,dir,dirxml,error,exception,"+"group,groupCollapsed,groupEnd,info,isIndependentlyComposed,log,"+"markTimeline,profile,profileEnd,table,time,timeEnd,timeline,"+"timelineEnd,timeStamp,trace,warn"),function(key){log[key]=function(){if(enabled&&key in console)return apply.call(console[key],console,arguments)}});$define(GLOBAL+FORCED,{log:assign(log.log,log,{enable:function(){enabled=true},disable:function(){enabled=false}})})}({},true)}(typeof self!="undefined"&&self.Math===Math?self:Function("return this")(),false)},{}],179:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;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]){args=["%o"].concat(args)}var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);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}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(msmaxUsed||u===maxUsed&&w>maxWeight){maxUsed=u;maxWeight=w;result=+n}}return result}module.exports=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}var tabs=0;var spaces=0;var prev=0;var indents={};var current;var isIndent;str.split(/\n/g).forEach(function(line){if(!line){return}var indent;var matches=line.match(INDENT_RE);if(!matches){indent=0}else{indent=matches[0].length;if(matches[1]){spaces++}else{tabs++}}var diff=indent-prev;prev=indent;if(diff){isIndent=diff>0;current=indents[isIndent?diff:-diff];if(current){current[0]++}else{current=indents[diff]=[1,0]}}else if(current){current[1]+=+isIndent}});var amount=getMostUsed(indents);var type;var actual;if(!amount){type=null;actual=""}else if(spaces>=tabs){type="space";actual=repeating(" ",amount)}else{type="tab";actual=repeating(" ",amount)}return{amount:amount,type:type,indent:actual}}},{repeating:330}],183:[function(require,module,exports){(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(["exports"],factory)}else if(typeof exports!=="undefined"){factory(exports)}else{factory(root.estraverse={})}})(this,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);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){objectKeys(from).forEach(function(key){to[key]=from[key]});return to}Syntax={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportBatchSpecifier:"ExportBatchSpecifier",ExportDeclaration:"ExportDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",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"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","defaults","rest","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass"],ClassExpression:["id","body","superClass"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportBatchSpecifier:[],ExportDeclaration:["declaration","specifiers","source"],ExportSpecifier:["id","name"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","defaults","rest","body"],FunctionExpression:["id","params","defaults","rest","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["id"],ImportNamespaceSpecifier:["id"],ImportSpecifier:["id","name"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]};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(){}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=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()){key=element.ref.key;parent=element.ref.parent;i=worklist.length;while(i--){nextElem=worklist[i];if(nextElem.ref&&nextElem.ref.parent===parent){if(nextElem.ref.key=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){var comments=[],comment,len,i,cursor;if(!tree.range){throw new Error("attachComments needs range information")}if(!tokens.length){if(providedComments.length){for(i=0,len=providedComments.length;inode.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}}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(cursornode.range[1]){return VisitorOption.Skip}}});return tree}exports.version="1.8.1-dev";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})},{}],184:[function(require,module,exports){(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}})()},{}],185:[function(require,module,exports){(function(){"use strict";var Regex,NON_ASCII_WHITESPACES;Regex={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function isDecimalDigit(ch){return ch>=48&&ch<=57}function isHexDigit(ch){return isDecimalDigit(ch)||97<=ch&&ch<=102||65<=ch&&ch<=70}function isOctalDigit(ch){return ch>=48&&ch<=55}NON_ASCII_WHITESPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&NON_ASCII_WHITESPACES.indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function isIdentifierStart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))}function isIdentifierPart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch>=48&&ch<=57||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))}module.exports={isDecimalDigit:isDecimalDigit,isHexDigit:isHexDigit,isOctalDigit:isOctalDigit,isWhiteSpace:isWhiteSpace,isLineTerminator:isLineTerminator,isIdentifierStart:isIdentifierStart,isIdentifierPart:isIdentifierPart}})()},{}],186:[function(require,module,exports){(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){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){return false}for(i=1,iz=id.length;i!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g;module.exports.matchToToken=function(match){token={type:"invalid",value:match[0]};if(match[1])token.type="string",token.closed=!!(match[3]||match[4]);else if(match[5])token.type="comment";else if(match[6])token.type="comment",token.closed=!!match[7];else if(match[8])token.type="regex";else if(match[9])token.type="number";else if(match[10])token.type="name";else if(match[11])token.type="punctuator";else if(match[12])token.type="whitespace";return token}},{}],194:[function(require,module,exports){var arr=[];var charCodeCache=[];module.exports=function(a,b){if(a===b){return 0}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen}if(bLen===0){return aLen}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(iret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2}}return ret}},{}],195:[function(require,module,exports){var leftPad=require("left-pad");function get(options,key,defaultValue){return key in options?options[key]:defaultValue}function lineNumbers(code,options){var getOption=get.bind(null,options||{});var transform=getOption("transform",Function.prototype);var padding=getOption("padding"," ");var before=getOption("before"," ");var after=getOption("after"," | ");var start=getOption("start",1);var isArray=Array.isArray(code);var lines=isArray?code:code.split("\n");var end=start+lines.length-1;var width=String(end).length;var numbered=lines.map(function(line,index){var number=start+index;var params={before:before,number:number,width:width,after:after,line:line};transform(params);return params.before+leftPad(params.number,width,padding)+params.after+params.line});return isArray?numbered:numbered.join("\n")}module.exports=lineNumbers},{"left-pad":196}],196:[function(require,module,exports){module.exports=leftpad;function leftpad(str,len,ch){str=String(str);var i=-1;ch||(ch=" ");len=len-str.length;while(++i-1){splice.call(array,fromIndex,1)}}return array}module.exports=pull},{"../internal/baseIndexOf":234}],201:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseUniq=require("../internal/baseUniq"),isIterateeCall=require("../internal/isIterateeCall"),sortedUniq=require("../internal/sortedUniq");function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(isSorted!=null&&typeof isSorted!="boolean"){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?null:isSorted;isSorted=false}iteratee=iteratee==null?iteratee:baseCallback(iteratee,thisArg,3);return isSorted?sortedUniq(array,iteratee):baseUniq(array,iteratee)}module.exports=uniq},{"../internal/baseCallback":221,"../internal/baseUniq":248,"../internal/isIterateeCall":275,"../internal/sortedUniq":286}],202:[function(require,module,exports){module.exports=require("./includes")},{"./includes":206}],203:[function(require,module,exports){module.exports=require("./forEach")},{"./forEach":204}],204:[function(require,module,exports){var arrayEach=require("../internal/arrayEach"),baseEach=require("../internal/baseEach"),bindCallback=require("../internal/bindCallback"),isArray=require("../lang/isArray");function forEach(collection,iteratee,thisArg){return typeof iteratee=="function"&&typeof thisArg=="undefined"&&isArray(collection)?arrayEach(collection,iteratee):baseEach(collection,bindCallback(iteratee,thisArg,3))}module.exports=forEach},{"../internal/arrayEach":215,"../internal/baseEach":226,"../internal/bindCallback":250,"../lang/isArray":291}],205:[function(require,module,exports){var createAggregator=require("../internal/createAggregator");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value)}else{result[key]=[value]}});module.exports=groupBy},{"../internal/createAggregator":257}],206:[function(require,module,exports){var baseIndexOf=require("../internal/baseIndexOf"),isArray=require("../lang/isArray"),isLength=require("../internal/isLength"),isString=require("../lang/isString"),values=require("../object/values");var nativeMax=Math.max;function includes(collection,target,fromIndex){var length=collection?collection.length:0;if(!isLength(length)){collection=values(collection);length=collection.length}if(!length){return false}if(typeof fromIndex=="number"){fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}else{fromIndex=0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex-1:baseIndexOf(collection,target,fromIndex)>-1}module.exports=includes},{"../internal/baseIndexOf":234,"../internal/isLength":276,"../lang/isArray":291,"../lang/isString":300,"../object/values":308}],207:[function(require,module,exports){var arrayMap=require("../internal/arrayMap"),baseCallback=require("../internal/baseCallback"),baseMap=require("../internal/baseMap"),isArray=require("../lang/isArray");function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=baseCallback(iteratee,thisArg,3);return func(collection,iteratee)}module.exports=map},{"../internal/arrayMap":216,"../internal/baseCallback":221,"../internal/baseMap":239,"../lang/isArray":291}],208:[function(require,module,exports){var arrayReduceRight=require("../internal/arrayReduceRight"),baseCallback=require("../internal/baseCallback"),baseEachRight=require("../internal/baseEachRight"),baseReduce=require("../internal/baseReduce"),isArray=require("../lang/isArray");function reduceRight(collection,iteratee,accumulator,thisArg){var func=isArray(collection)?arrayReduceRight:baseReduce;return func(collection,baseCallback(iteratee,thisArg,4),accumulator,arguments.length<3,baseEachRight)}module.exports=reduceRight},{"../internal/arrayReduceRight":217,"../internal/baseCallback":221,"../internal/baseEachRight":227,"../internal/baseReduce":243,"../lang/isArray":291}],209:[function(require,module,exports){var arraySome=require("../internal/arraySome"),baseCallback=require("../internal/baseCallback"),baseSome=require("../internal/baseSome"),isArray=require("../lang/isArray");function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;if(typeof predicate!="function"||typeof thisArg!="undefined"){predicate=baseCallback(predicate,thisArg,3)}return func(collection,predicate) -}module.exports=some},{"../internal/arraySome":218,"../internal/baseCallback":221,"../internal/baseSome":245,"../lang/isArray":291}],210:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseEach=require("../internal/baseEach"),baseSortBy=require("../internal/baseSortBy"),compareAscending=require("../internal/compareAscending"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength");function sortBy(collection,iteratee,thisArg){var index=-1,length=collection?collection.length:0,result=isLength(length)?Array(length):[];if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=null}iteratee=baseCallback(iteratee,thisArg,3);baseEach(collection,function(value,key,collection){result[++index]={criteria:iteratee(value,key,collection),index:index,value:value}});return baseSortBy(result,compareAscending)}module.exports=sortBy},{"../internal/baseCallback":221,"../internal/baseEach":226,"../internal/baseSortBy":246,"../internal/compareAscending":254,"../internal/isIterateeCall":275,"../internal/isLength":276}],211:[function(require,module,exports){var isNative=require("../lang/isNative");var nativeNow=isNative(nativeNow=Date.now)&&nativeNow;var now=nativeNow||function(){return(new Date).getTime()};module.exports=now},{"../lang/isNative":295}],212:[function(require,module,exports){var createWrapper=require("../internal/createWrapper"),isIterateeCall=require("../internal/isIterateeCall");var ARY_FLAG=256;var nativeMax=Math.max;function ary(func,n,guard){if(guard&&isIterateeCall(func,n,guard)){n=null}n=func&&n==null?func.length:nativeMax(+n||0,0);return createWrapper(func,ARY_FLAG,null,null,null,null,n)}module.exports=ary},{"../internal/createWrapper":264,"../internal/isIterateeCall":275}],213:[function(require,module,exports){(function(global){var cachePush=require("./cachePush"),isNative=require("../lang/isNative");var Set=isNative(Set=global.Set)&&Set;var nativeCreate=isNative(nativeCreate=Object.create)&&nativeCreate;function SetCache(values){var length=values?values.length:0;this.data={hash:nativeCreate(null),set:new Set};while(length--){this.push(values[length])}}SetCache.prototype.push=cachePush;module.exports=SetCache}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../lang/isNative":295,"./cachePush":253}],214:[function(require,module,exports){function arrayCopy(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++indexother||!valIsReflexive||typeof value=="undefined"&&othIsReflexive){return 1}if(value=200,seen=isLarge?createCache():null,result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index3&&isIterateeCall(arguments[1],arguments[2],arguments[3])){length=2}if(length>3&&typeof arguments[length-2]=="function"){var customizer=bindCallback(arguments[--length-1],arguments[length--],5)}else if(length>2&&typeof arguments[length-1]=="function"){customizer=arguments[--length]}var index=0;while(++indexarrLength)){return false -}while(result&&++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}module.exports=isLength},{}],277:[function(require,module,exports){function isObjectLike(value){return value&&typeof value=="object"||false}module.exports=isObjectLike},{}],278:[function(require,module,exports){var isObject=require("../lang/isObject");function isStrictComparable(value){return value===value&&(value===0?1/value>0:!isObject(value))}module.exports=isStrictComparable},{"../lang/isObject":297}],279:[function(require,module,exports){var arrayCopy=require("./arrayCopy"),composeArgs=require("./composeArgs"),composeArgsRight=require("./composeArgsRight"),replaceHolders=require("./replaceHolders");var BIND_FLAG=1,BIND_KEY_FLAG=2,CURRY_BOUND_FLAG=4,CURRY_RIGHT_FLAG=16,REARG_FLAG=128,ARY_FLAG=256;var PLACEHOLDER="__lodash_placeholder__";var nativeMin=Math.min;function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask;var arityFlags=ARY_FLAG|REARG_FLAG,bindFlags=BIND_FLAG|BIND_KEY_FLAG,comboFlags=arityFlags|bindFlags|CURRY_BOUND_FLAG|CURRY_RIGHT_FLAG;var isAry=bitmask&ARY_FLAG&&!(srcBitmask&ARY_FLAG),isRearg=bitmask&REARG_FLAG&&!(srcBitmask&REARG_FLAG),argPos=(isRearg?data:source)[7],ary=(isAry?data:source)[8];var isCommon=!(bitmask>=REARG_FLAG&&srcBitmask>bindFlags)&&!(bitmask>bindFlags&&srcBitmask>=REARG_FLAG);var isCombo=newBitmask>=arityFlags&&newBitmask<=comboFlags&&(bitmask0){if(++count>=HOT_COUNT){return key}}else{count=0}return baseSetData(key,value)}}();module.exports=setData},{"../date/now":211,"./baseSetData":244}],284:[function(require,module,exports){var baseForIn=require("./baseForIn"),isObjectLike=require("./isObjectLike");var objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;function shimIsPlainObject(value){var Ctor;if(!(isObjectLike(value)&&objToString.call(value)==objectTag)||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;baseForIn(value,function(subValue,key){result=key});return typeof result=="undefined"||hasOwnProperty.call(value,result)}module.exports=shimIsPlainObject},{"./baseForIn":230,"./isObjectLike":277}],285:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isIndex=require("./isIndex"),isLength=require("./isLength"),keysIn=require("../object/keysIn"),support=require("../support");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length;var allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object));var index=-1,result=[];while(++index0;while(++indexdst){names[dst]=names[src]}++dst}}names.length=dst;return names};function defaultCreatorFn(object){return create(null)}function makeAccessor(secretCreatorFn){var brand=makeUniqueKey();var passkey=create(null);secretCreatorFn=secretCreatorFn||defaultCreatorFn;function register(object){var secret;function vault(key,forget){if(key===passkey){return forget?secret=null:secret||(secret=secretCreatorFn(object))}}defProp(object,brand,vault)}function accessor(object){if(!hasOwn.call(object,brand))register(object);return object[brand](passkey)}accessor.forget=function(object){if(hasOwn.call(object,brand))object[brand](passkey,true)};return accessor}defProp(exports,"makeAccessor",makeAccessor)},{}],315:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var isArray=types.builtInTypes.array;var b=types.builders;var n=types.namedTypes;var leap=require("./leap");var meta=require("./meta");var util=require("./util");var hasOwn=Object.prototype.hasOwnProperty;function Emitter(contextId){assert.ok(this instanceof Emitter);n.Identifier.assert(contextId);Object.defineProperties(this,{contextId:{value:contextId},listing:{value:[]},marked:{value:[true]},finalLoc:{value:loc()},tryEntries:{value:[]}});Object.defineProperties(this,{leapManager:{value:new leap.LeapManager(this)}})}var Ep=Emitter.prototype;exports.Emitter=Emitter;function loc(){return b.literal(-1)}Ep.mark=function(loc){n.Literal.assert(loc);var index=this.listing.length;if(loc.value===-1){loc.value=index}else{assert.strictEqual(loc.value,index)}this.marked[index]=true;return loc};Ep.emit=function(node){if(n.Expression.check(node))node=b.expressionStatement(node);n.Statement.assert(node);this.listing.push(node)};Ep.emitAssign=function(lhs,rhs){this.emit(this.assign(lhs,rhs));return lhs};Ep.assign=function(lhs,rhs){return b.expressionStatement(b.assignmentExpression("=",lhs,rhs))};Ep.contextProperty=function(name,computed){return b.memberExpression(this.contextId,computed?b.literal(name):b.identifier(name),!!computed)};var volatileContextPropertyNames={prev:true,next:true,sent:true,rval:true};Ep.isVolatileContextProperty=function(expr){if(n.MemberExpression.check(expr)){if(expr.computed){return true}if(n.Identifier.check(expr.object)&&n.Identifier.check(expr.property)&&expr.object.name===this.contextId.name&&hasOwn.call(volatileContextPropertyNames,expr.property.name)){return true}}return false};Ep.stop=function(rval){if(rval){this.setReturnValue(rval)}this.jump(this.finalLoc)};Ep.setReturnValue=function(valuePath){n.Expression.assert(valuePath.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(valuePath))};Ep.clearPendingException=function(tryLoc,assignee){n.Literal.assert(tryLoc);var catchCall=b.callExpression(this.contextProperty("catch",true),[tryLoc]);if(assignee){this.emitAssign(assignee,catchCall)}else{this.emit(catchCall)}};Ep.jump=function(toLoc){this.emitAssign(this.contextProperty("next"),toLoc);this.emit(b.breakStatement())};Ep.jumpIf=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);this.emit(b.ifStatement(test,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};Ep.jumpIfNot=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);var negatedTest;if(n.UnaryExpression.check(test)&&test.operator==="!"){negatedTest=test.argument}else{negatedTest=b.unaryExpression("!",test)}this.emit(b.ifStatement(negatedTest,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};var nextTempId=0;Ep.makeTempVar=function(){return this.contextProperty("t"+nextTempId++)};Ep.getContextFunction=function(id){var func=b.functionExpression(id||null,[this.contextId],b.blockStatement([this.getDispatchLoop()]),false,false);func._aliasFunction=true;return func};Ep.getDispatchLoop=function(){var self=this;var cases=[];var current;var alreadyEnded=false;self.listing.forEach(function(stmt,i){if(self.marked.hasOwnProperty(i)){cases.push(b.switchCase(b.literal(i),current=[]));alreadyEnded=false}if(!alreadyEnded){current.push(stmt);if(isSwitchCaseEnder(stmt))alreadyEnded=true}});this.finalLoc.value=this.listing.length;cases.push(b.switchCase(this.finalLoc,[]),b.switchCase(b.literal("end"),[b.returnStatement(b.callExpression(this.contextProperty("stop"),[]))]));return b.whileStatement(b.literal(1),b.switchStatement(b.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),cases))};function isSwitchCaseEnder(stmt){return n.BreakStatement.check(stmt)||n.ContinueStatement.check(stmt)||n.ReturnStatement.check(stmt)||n.ThrowStatement.check(stmt)}Ep.getTryLocsList=function(){if(this.tryEntries.length===0){return null}var lastLocValue=0;return b.arrayExpression(this.tryEntries.map(function(tryEntry){var thisLocValue=tryEntry.firstLoc.value;assert.ok(thisLocValue>=lastLocValue,"try entries out of order");lastLocValue=thisLocValue;var ce=tryEntry.catchEntry;var fe=tryEntry.finallyEntry;var locs=[tryEntry.firstLoc,ce?ce.firstLoc:null];if(fe){locs[2]=fe.firstLoc;locs[3]=fe.afterLoc}return b.arrayExpression(locs)}))};Ep.explode=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var node=path.value;var self=this;n.Node.assert(node);if(n.Statement.check(node))return self.explodeStatement(path);if(n.Expression.check(node))return self.explodeExpression(path,ignoreResult);if(n.Declaration.check(node))throw getDeclError(node);switch(node.type){case"Program":return path.get("body").map(self.explodeStatement,self);case"VariableDeclarator":throw getDeclError(node); -case"Property":case"SwitchCase":case"CatchClause":throw new Error(node.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(node.type))}};function getDeclError(node){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+JSON.stringify(node))}Ep.explodeStatement=function(path,labelId){assert.ok(path instanceof types.NodePath);var stmt=path.value;var self=this;n.Statement.assert(stmt);if(labelId){n.Identifier.assert(labelId)}else{labelId=null}if(n.BlockStatement.check(stmt)){return path.get("body").each(self.explodeStatement,self)}if(!meta.containsLeap(stmt)){self.emit(stmt);return}switch(stmt.type){case"ExpressionStatement":self.explodeExpression(path.get("expression"),true);break;case"LabeledStatement":var after=loc();self.leapManager.withEntry(new leap.LabeledEntry(after,stmt.label),function(){self.explodeStatement(path.get("body"),stmt.label)});self.mark(after);break;case"WhileStatement":var before=loc();var after=loc();self.mark(before);self.jumpIfNot(self.explodeExpression(path.get("test")),after);self.leapManager.withEntry(new leap.LoopEntry(after,before,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(before);self.mark(after);break;case"DoWhileStatement":var first=loc();var test=loc();var after=loc();self.mark(first);self.leapManager.withEntry(new leap.LoopEntry(after,test,labelId),function(){self.explode(path.get("body"))});self.mark(test);self.jumpIf(self.explodeExpression(path.get("test")),first);self.mark(after);break;case"ForStatement":var head=loc();var update=loc();var after=loc();if(stmt.init){self.explode(path.get("init"),true)}self.mark(head);if(stmt.test){self.jumpIfNot(self.explodeExpression(path.get("test")),after)}else{}self.leapManager.withEntry(new leap.LoopEntry(after,update,labelId),function(){self.explodeStatement(path.get("body"))});self.mark(update);if(stmt.update){self.explode(path.get("update"),true)}self.jump(head);self.mark(after);break;case"ForInStatement":n.Identifier.assert(stmt.left);var head=loc();var after=loc();var keyIterNextFn=self.makeTempVar();self.emitAssign(keyIterNextFn,b.callExpression(util.runtimeProperty("keys"),[self.explodeExpression(path.get("right"))]));self.mark(head);var keyInfoTmpVar=self.makeTempVar();self.jumpIf(b.memberExpression(b.assignmentExpression("=",keyInfoTmpVar,b.callExpression(keyIterNextFn,[])),b.identifier("done"),false),after);self.emitAssign(stmt.left,b.memberExpression(keyInfoTmpVar,b.identifier("value"),false));self.leapManager.withEntry(new leap.LoopEntry(after,head,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(head);self.mark(after);break;case"BreakStatement":self.emitAbruptCompletion({type:"break",target:self.leapManager.getBreakLoc(stmt.label)});break;case"ContinueStatement":self.emitAbruptCompletion({type:"continue",target:self.leapManager.getContinueLoc(stmt.label)});break;case"SwitchStatement":var disc=self.emitAssign(self.makeTempVar(),self.explodeExpression(path.get("discriminant")));var after=loc();var defaultLoc=loc();var condition=defaultLoc;var caseLocs=[];var cases=stmt.cases||[];for(var i=cases.length-1;i>=0;--i){var c=cases[i];n.SwitchCase.assert(c);if(c.test){condition=b.conditionalExpression(b.binaryExpression("===",disc,c.test),caseLocs[i]=loc(),condition)}else{caseLocs[i]=defaultLoc}}self.jump(self.explodeExpression(new types.NodePath(condition,path,"discriminant")));self.leapManager.withEntry(new leap.SwitchEntry(after),function(){path.get("cases").each(function(casePath){var c=casePath.value;var i=casePath.name;self.mark(caseLocs[i]);casePath.get("consequent").each(self.explodeStatement,self)})});self.mark(after);if(defaultLoc.value===-1){self.mark(defaultLoc);assert.strictEqual(after.value,defaultLoc.value)}break;case"IfStatement":var elseLoc=stmt.alternate&&loc();var after=loc();self.jumpIfNot(self.explodeExpression(path.get("test")),elseLoc||after);self.explodeStatement(path.get("consequent"));if(elseLoc){self.jump(after);self.mark(elseLoc);self.explodeStatement(path.get("alternate"))}self.mark(after);break;case"ReturnStatement":self.emitAbruptCompletion({type:"return",value:self.explodeExpression(path.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var after=loc();var handler=stmt.handler;if(!handler&&stmt.handlers){handler=stmt.handlers[0]||null}var catchLoc=handler&&loc();var catchEntry=catchLoc&&new leap.CatchEntry(catchLoc,handler.param);var finallyLoc=stmt.finalizer&&loc();var finallyEntry=finallyLoc&&new leap.FinallyEntry(finallyLoc,after);var tryEntry=new leap.TryEntry(self.getUnmarkedCurrentLoc(),catchEntry,finallyEntry);self.tryEntries.push(tryEntry);self.updateContextPrevLoc(tryEntry.firstLoc);self.leapManager.withEntry(tryEntry,function(){self.explodeStatement(path.get("block"));if(catchLoc){if(finallyLoc){self.jump(finallyLoc)}else{self.jump(after)}self.updateContextPrevLoc(self.mark(catchLoc));var bodyPath=path.get("handler","body");var safeParam=self.makeTempVar();self.clearPendingException(tryEntry.firstLoc,safeParam);var catchScope=bodyPath.scope;var catchParamName=handler.param.name;n.CatchClause.assert(catchScope.node);assert.strictEqual(catchScope.lookup(catchParamName),catchScope);types.visit(bodyPath,{visitIdentifier:function(path){if(util.isReference(path,catchParamName)&&path.scope.lookup(catchParamName)===catchScope){return safeParam}this.traverse(path)},visitFunction:function(path){if(path.scope.declares(catchParamName)){return false}this.traverse(path)}});self.leapManager.withEntry(catchEntry,function(){self.explodeStatement(bodyPath)})}if(finallyLoc){self.updateContextPrevLoc(self.mark(finallyLoc));self.leapManager.withEntry(finallyEntry,function(){self.explodeStatement(path.get("finalizer"))});self.emit(b.returnStatement(b.callExpression(self.contextProperty("finish"),[finallyEntry.firstLoc])))}});self.mark(after);break;case"ThrowStatement":self.emit(b.throwStatement(self.explodeExpression(path.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(stmt.type))}};Ep.emitAbruptCompletion=function(record){if(!isValidCompletion(record)){assert.ok(false,"invalid completion record: "+JSON.stringify(record))}assert.notStrictEqual(record.type,"normal","normal completions are not abrupt");var abruptArgs=[b.literal(record.type)];if(record.type==="break"||record.type==="continue"){n.Literal.assert(record.target);abruptArgs[1]=record.target}else if(record.type==="return"||record.type==="throw"){if(record.value){n.Expression.assert(record.value);abruptArgs[1]=record.value}}this.emit(b.returnStatement(b.callExpression(this.contextProperty("abrupt"),abruptArgs)))};function isValidCompletion(record){var type=record.type;if(type==="normal"){return!hasOwn.call(record,"target")}if(type==="break"||type==="continue"){return!hasOwn.call(record,"value")&&n.Literal.check(record.target)}if(type==="return"||type==="throw"){return hasOwn.call(record,"value")&&!hasOwn.call(record,"target")}return false}Ep.getUnmarkedCurrentLoc=function(){return b.literal(this.listing.length)};Ep.updateContextPrevLoc=function(loc){if(loc){n.Literal.assert(loc);if(loc.value===-1){loc.value=this.listing.length}else{assert.strictEqual(loc.value,this.listing.length)}}else{loc=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),loc)};Ep.explodeExpression=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var expr=path.value;if(expr){n.Expression.assert(expr)}else{return expr}var self=this;var result;function finish(expr){n.Expression.assert(expr);if(ignoreResult){self.emit(expr)}else{return expr}}if(!meta.containsLeap(expr)){return finish(expr)}var hasLeapingChildren=meta.containsLeap.onlyChildren(expr);function explodeViaTempVar(tempVar,childPath,ignoreChildResult){assert.ok(childPath instanceof types.NodePath);assert.ok(!ignoreChildResult||!tempVar,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var result=self.explodeExpression(childPath,ignoreChildResult);if(ignoreChildResult){}else if(tempVar||hasLeapingChildren&&(self.isVolatileContextProperty(result)||meta.hasSideEffects(result))){result=self.emitAssign(tempVar||self.makeTempVar(),result)}return result}switch(expr.type){case"MemberExpression":return finish(b.memberExpression(self.explodeExpression(path.get("object")),expr.computed?explodeViaTempVar(null,path.get("property")):expr.property,expr.computed));case"CallExpression":var oldCalleePath=path.get("callee");var newCallee=self.explodeExpression(oldCalleePath);if(!n.MemberExpression.check(oldCalleePath.node)&&n.MemberExpression.check(newCallee)){newCallee=b.sequenceExpression([b.literal(0),newCallee])}return finish(b.callExpression(newCallee,path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"NewExpression":return finish(b.newExpression(explodeViaTempVar(null,path.get("callee")),path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"ObjectExpression":return finish(b.objectExpression(path.get("properties").map(function(propPath){return b.property(propPath.value.kind,propPath.value.key,explodeViaTempVar(null,propPath.get("value")))})));case"ArrayExpression":return finish(b.arrayExpression(path.get("elements").map(function(elemPath){return explodeViaTempVar(null,elemPath)})));case"SequenceExpression":var lastIndex=expr.expressions.length-1;path.get("expressions").each(function(exprPath){if(exprPath.name===lastIndex){result=self.explodeExpression(exprPath,ignoreResult)}else{self.explodeExpression(exprPath,true)}});return result;case"LogicalExpression":var after=loc();if(!ignoreResult){result=self.makeTempVar()}var left=explodeViaTempVar(result,path.get("left"));if(expr.operator==="&&"){self.jumpIfNot(left,after)}else{assert.strictEqual(expr.operator,"||");self.jumpIf(left,after)}explodeViaTempVar(result,path.get("right"),ignoreResult);self.mark(after);return result;case"ConditionalExpression":var elseLoc=loc();var after=loc();var test=self.explodeExpression(path.get("test"));self.jumpIfNot(test,elseLoc);if(!ignoreResult){result=self.makeTempVar()}explodeViaTempVar(result,path.get("consequent"),ignoreResult);self.jump(after);self.mark(elseLoc);explodeViaTempVar(result,path.get("alternate"),ignoreResult);self.mark(after);return result;case"UnaryExpression":return finish(b.unaryExpression(expr.operator,self.explodeExpression(path.get("argument")),!!expr.prefix));case"BinaryExpression":return finish(b.binaryExpression(expr.operator,explodeViaTempVar(null,path.get("left")),explodeViaTempVar(null,path.get("right"))));case"AssignmentExpression":return finish(b.assignmentExpression(expr.operator,self.explodeExpression(path.get("left")),self.explodeExpression(path.get("right"))));case"UpdateExpression":return finish(b.updateExpression(expr.operator,self.explodeExpression(path.get("argument")),expr.prefix));case"YieldExpression":var after=loc();var arg=expr.argument&&self.explodeExpression(path.get("argument"));if(arg&&expr.delegate){var result=self.makeTempVar();self.emit(b.returnStatement(b.callExpression(self.contextProperty("delegateYield"),[arg,b.literal(result.property.name),after])));self.mark(after);return result}self.emitAssign(self.contextProperty("next"),after);self.emit(b.returnStatement(arg||null));self.mark(after);return self.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(expr.type))}}},{"./leap":317,"./meta":318,"./util":319,assert:143,"ast-types":141}],316:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.hoist=function(funPath){assert.ok(funPath instanceof types.NodePath);n.Function.assert(funPath.value);var vars={};function varDeclToExpr(vdec,includeIdentifiers){n.VariableDeclaration.assert(vdec);var exprs=[];vdec.declarations.forEach(function(dec){vars[dec.id.name]=dec.id;if(dec.init){exprs.push(b.assignmentExpression("=",dec.id,dec.init))}else if(includeIdentifiers){exprs.push(dec.id)}});if(exprs.length===0)return null;if(exprs.length===1)return exprs[0];return b.sequenceExpression(exprs)}types.visit(funPath.get("body"),{visitVariableDeclaration:function(path){var expr=varDeclToExpr(path.value,false);if(expr===null){path.replace()}else{return b.expressionStatement(expr)}return false},visitForStatement:function(path){var init=path.value.init;if(n.VariableDeclaration.check(init)){path.get("init").replace(varDeclToExpr(init,false))}this.traverse(path)},visitForInStatement:function(path){var left=path.value.left;if(n.VariableDeclaration.check(left)){path.get("left").replace(varDeclToExpr(left,true))}this.traverse(path)},visitFunctionDeclaration:function(path){var node=path.value;vars[node.id.name]=node.id;var parentNode=path.parent.node;var assignment=b.expressionStatement(b.assignmentExpression("=",node.id,b.functionExpression(node.id,node.params,node.body,node.generator,node.expression)));if(n.BlockStatement.check(path.parent.node)){path.parent.get("body").unshift(assignment);path.replace()}else{path.replace(assignment)}return false},visitFunctionExpression:function(path){return false}});var paramNames={};funPath.get("params").each(function(paramPath){var param=paramPath.value;if(n.Identifier.check(param)){paramNames[param.name]=param}else{}});var declarations=[];Object.keys(vars).forEach(function(name){if(!hasOwn.call(paramNames,name)){declarations.push(b.variableDeclarator(vars[name],null))}});if(declarations.length===0){return null}return b.variableDeclaration("var",declarations)}},{assert:143,"ast-types":141}],317:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var inherits=require("util").inherits;var hasOwn=Object.prototype.hasOwnProperty;function Entry(){assert.ok(this instanceof Entry)}function FunctionEntry(returnLoc){Entry.call(this);n.Literal.assert(returnLoc);this.returnLoc=returnLoc}inherits(FunctionEntry,Entry);exports.FunctionEntry=FunctionEntry;function LoopEntry(breakLoc,continueLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Literal.assert(continueLoc);if(label){n.Identifier.assert(label)}else{label=null}this.breakLoc=breakLoc;this.continueLoc=continueLoc;this.label=label}inherits(LoopEntry,Entry);exports.LoopEntry=LoopEntry;function SwitchEntry(breakLoc){Entry.call(this);n.Literal.assert(breakLoc);this.breakLoc=breakLoc}inherits(SwitchEntry,Entry);exports.SwitchEntry=SwitchEntry;function TryEntry(firstLoc,catchEntry,finallyEntry){Entry.call(this);n.Literal.assert(firstLoc);if(catchEntry){assert.ok(catchEntry instanceof CatchEntry)}else{catchEntry=null}if(finallyEntry){assert.ok(finallyEntry instanceof FinallyEntry)}else{finallyEntry=null}assert.ok(catchEntry||finallyEntry);this.firstLoc=firstLoc;this.catchEntry=catchEntry;this.finallyEntry=finallyEntry}inherits(TryEntry,Entry);exports.TryEntry=TryEntry;function CatchEntry(firstLoc,paramId){Entry.call(this);n.Literal.assert(firstLoc);n.Identifier.assert(paramId);this.firstLoc=firstLoc;this.paramId=paramId}inherits(CatchEntry,Entry);exports.CatchEntry=CatchEntry;function FinallyEntry(firstLoc,afterLoc){Entry.call(this);n.Literal.assert(firstLoc);n.Literal.assert(afterLoc);this.firstLoc=firstLoc;this.afterLoc=afterLoc}inherits(FinallyEntry,Entry);exports.FinallyEntry=FinallyEntry;function LabeledEntry(breakLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Identifier.assert(label);this.breakLoc=breakLoc;this.label=label}inherits(LabeledEntry,Entry);exports.LabeledEntry=LabeledEntry;function LeapManager(emitter){assert.ok(this instanceof LeapManager);var Emitter=require("./emit").Emitter;assert.ok(emitter instanceof Emitter);this.emitter=emitter;this.entryStack=[new FunctionEntry(emitter.finalLoc)]}var LMp=LeapManager.prototype;exports.LeapManager=LeapManager;LMp.withEntry=function(entry,callback){assert.ok(entry instanceof Entry);this.entryStack.push(entry);try{callback.call(this.emitter)}finally{var popped=this.entryStack.pop();assert.strictEqual(popped,entry)}};LMp._findLeapLocation=function(property,label){for(var i=this.entryStack.length-1;i>=0;--i){var entry=this.entryStack[i];var loc=entry[property];if(loc){if(label){if(entry.label&&entry.label.name===label.name){return loc}}else if(entry instanceof LabeledEntry){}else{return loc}}}return null};LMp.getBreakLoc=function(label){return this._findLeapLocation("breakLoc",label)};LMp.getContinueLoc=function(label){return this._findLeapLocation("continueLoc",label)}},{"./emit":315,assert:143,"ast-types":141,util:169}],318:[function(require,module,exports){var assert=require("assert");var m=require("private").makeAccessor();var types=require("ast-types");var isArray=types.builtInTypes.array;var n=types.namedTypes;var hasOwn=Object.prototype.hasOwnProperty;function makePredicate(propertyName,knownTypes){function onlyChildren(node){n.Node.assert(node);var result=false;function check(child){if(result){}else if(isArray.check(child)){child.some(check)}else if(n.Node.check(child)){assert.strictEqual(result,false);result=predicate(child)}return result}types.eachField(node,function(name,child){check(child)});return result}function predicate(node){n.Node.assert(node);var meta=m(node);if(hasOwn.call(meta,propertyName))return meta[propertyName];if(hasOwn.call(opaqueTypes,node.type))return meta[propertyName]=false;if(hasOwn.call(knownTypes,node.type))return meta[propertyName]=true;return meta[propertyName]=onlyChildren(node)}predicate.onlyChildren=onlyChildren;return predicate}var opaqueTypes={FunctionExpression:true};var sideEffectTypes={CallExpression:true,ForInStatement:true,UnaryExpression:true,BinaryExpression:true,AssignmentExpression:true,UpdateExpression:true,NewExpression:true};var leapTypes={YieldExpression:true,BreakStatement:true,ContinueStatement:true,ReturnStatement:true,ThrowStatement:true};for(var type in leapTypes){if(hasOwn.call(leapTypes,type)){sideEffectTypes[type]=leapTypes[type]}}exports.hasSideEffects=makePredicate("hasSideEffects",sideEffectTypes);exports.containsLeap=makePredicate("containsLeap",leapTypes)},{assert:143,"ast-types":141,"private":314}],319:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.defaults=function(obj){var len=arguments.length;var extension;for(var i=1;i0){outerBody.push(vars)}var wrapArgs=[emitter.getContextFunction(innerFnId),shouldTransformAsync?b.literal(null):outerFnId,b.thisExpression()];var tryLocsList=emitter.getTryLocsList();if(tryLocsList){wrapArgs.push(tryLocsList)}var wrapCall=b.callExpression(shouldTransformAsync?runtimeProperty("async"):runtimeProperty("wrap"),wrapArgs);outerBody.push(b.returnStatement(wrapCall));node.body=b.blockStatement(outerBody);node.body._declarations=bodyBlock._declarations;if(shouldTransformAsync){node.async=false;return}if(n.FunctionDeclaration.check(node)){var pp=path.parent;while(pp&&!(n.BlockStatement.check(pp.value)||n.Program.check(pp.value))){pp=pp.parent}if(!pp){return}path.replace();node.type="FunctionExpression";var varDecl=b.variableDeclaration("var",[b.variableDeclarator(node.id,b.callExpression(runtimeProperty("mark"),[node]))]);if(node.comments){varDecl.leadingComments=node.leadingComments;varDecl.trailingComments=node.trailingComments;node.leadingComments=null;node.trailingComments=null}varDecl._blockHoist=3;var bodyPath=pp.get("body");var bodyLen=bodyPath.value.length;bodyPath.push(varDecl)}else{n.FunctionExpression.assert(node);return b.callExpression(runtimeProperty("mark"),[node])}}});function shouldNotHoistAbove(stmtPath){var value=stmtPath.value;n.Statement.assert(value);if(n.ExpressionStatement.check(value)&&n.Literal.check(value.expression)&&value.expression.value==="use strict"){return true}if(n.VariableDeclaration.check(value)){for(var i=0;i=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc){return this.complete(entry.completion,entry.afterLoc)}}},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}(typeof global==="object"?global:typeof window==="object"?window:this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],324:[function(require,module,exports){var regenerate=require("regenerate");exports.REGULAR={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,65535),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)};exports.UNICODE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)};exports.UNICODE_IGNORE_CASE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},{regenerate:326}],325:[function(require,module,exports){module.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}},{}],326:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports;var freeModule=typeof module=="object"&&module&&module.exports==freeExports&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal){root=freeGlobal}var ERRORS={rangeOrder:"A range’s `stop` value must be greater than or equal "+"to the `start` value.",codePointRange:"Invalid code point value. Code points range from "+"U+000000 to U+10FFFF."};var HIGH_SURROGATE_MIN=55296;var HIGH_SURROGATE_MAX=56319;var LOW_SURROGATE_MIN=56320;var LOW_SURROGATE_MAX=57343;var regexNull=/\\x00([^0123456789]|$)/g;var object={};var hasOwnProperty=object.hasOwnProperty;var extend=function(destination,source){var key;for(key in source){if(hasOwnProperty.call(source,key)){destination[key]=source[key]}}return destination};var forEach=function(array,callback){var index=-1;var length=array.length;while(++index=start&&codePointrangeEnd){return data}if(rangeStart<=start&&rangeEnd>=end){data.splice(index,2);continue}if(rangeStart>=start&&rangeEnd=start&&rangeStart<=end){data[index+1]=rangeStart}else if(rangeEnd>=start&&rangeEnd<=end){data[index]=rangeEnd+1;return data}index+=2}return data};var dataAdd=function(data,codePoint){var index=0;var start;var end;var lastIndex=null;var length=data.length;if(codePoint<0||codePoint>1114111){throw RangeError(ERRORS.codePointRange)}while(index=start&&codePointcodePoint){data.splice(lastIndex!=null?lastIndex+2:0,0,codePoint,codePoint+1);return data}if(codePoint==end){if(codePoint+1==data[index+2]){data.splice(index,4,start,data[index+3]);return data}data[index+1]=codePoint+1;return data}lastIndex=index;index+=2}data.push(codePoint,codePoint+1);return data};var dataAddData=function(dataA,dataB){var index=0;var start;var end;var data=dataA.slice();var length=dataB.length;while(index1114111||rangeEnd<0||rangeEnd>1114111){throw RangeError(ERRORS.codePointRange)}var index=0;var start;var end;var added=false;var length=data.length;while(indexrangeEnd){return data}if(start>=rangeStart&&start<=rangeEnd){if(end>rangeStart&&end-1<=rangeEnd){data.splice(index,2);index-=2}else{data.splice(index-1,2);index-=2}}}else if(start==rangeEnd+1){data[index]=rangeStart;return data}else if(start>rangeEnd){data.splice(index,0,rangeStart,rangeEnd+1);return data}else if(rangeStart>=start&&rangeStart=start&&rangeStart=end){data[index]=rangeStart;data[index+1]=rangeEnd+1;added=true}index+=2}if(!added){data.push(rangeStart,rangeEnd+1)}return data};var dataContains=function(data,codePoint){var index=0;var length=data.length;var start=data[index];var end=data[length-1];if(length>=2){if(codePointend){return false}}while(index=start&&codePoint=40&&codePoint<=43||codePoint==45||codePoint==46||codePoint==63||codePoint>=91&&codePoint<=94||codePoint>=123&&codePoint<=125){string="\\"+stringFromCharCode(codePoint)}else if(codePoint>=32&&codePoint<=126){string=stringFromCharCode(codePoint)}else if(codePoint<=255){string="\\x"+pad(hex(codePoint),2)}else{string="\\u"+pad(hex(codePoint),4)}return string};var symbolToCodePoint=function(symbol){var length=symbol.length;var first=symbol.charCodeAt(0);var second;if(first>=HIGH_SURROGATE_MIN&&first<=HIGH_SURROGATE_MAX&&length>1){second=symbol.charCodeAt(1);return(first-HIGH_SURROGATE_MIN)*1024+second-LOW_SURROGATE_MIN+65536}return first};var createBMPCharacterClasses=function(data){var result="";var index=0;var start;var end;var length=data.length;if(dataIsSingleton(data)){return codePointToString(data[0])}while(index=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=HIGH_SURROGATE_MIN&&start<=HIGH_SURROGATE_MAX){if(end>=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){loneHighSurrogates.push(start,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=LOW_SURROGATE_MIN&&start<=LOW_SURROGATE_MAX){if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneLowSurrogates.push(start,end+1)}if(end>LOW_SURROGATE_MAX){loneLowSurrogates.push(start,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>LOW_SURROGATE_MAX&&start<=65535){if(end<=65535){bmp.push(start,end+1)}else{bmp.push(start,65535+1);astral.push(65535+1,end+1)}}else{astral.push(start,end+1)}index+=2}return{loneHighSurrogates:loneHighSurrogates,loneLowSurrogates:loneLowSurrogates,bmp:bmp,astral:astral}};var optimizeSurrogateMappings=function(surrogateMappings){var result=[];var tmpLow=[];var addLow=false;var mapping;var nextMapping;var highSurrogates;var lowSurrogates;var nextHighSurrogates;var nextLowSurrogates;var index=-1;var length=surrogateMappings.length;while(++index1){value=slice.call(arguments)}if(this instanceof regenerate){this.data=[];return value?this.add(value):this}return(new regenerate).add(value)};regenerate.version="1.2.0";var proto=regenerate.prototype;extend(proto,{add:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataAddData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.add(item)});return $this}$this.data=dataAdd($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},remove:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataRemoveData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.remove(item)});return $this}$this.data=dataRemove($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},addRange:function(start,end){var $this=this;$this.data=dataAddRange($this.data,isNumber(start)?start:symbolToCodePoint(start),isNumber(end)?end:symbolToCodePoint(end));return $this},removeRange:function(start,end){var $this=this;var startCodePoint=isNumber(start)?start:symbolToCodePoint(start);var endCodePoint=isNumber(end)?end:symbolToCodePoint(end);$this.data=dataRemoveRange($this.data,startCodePoint,endCodePoint);return $this},intersection:function(argument){var $this=this;var array=argument instanceof regenerate?dataToArray(argument.data):argument;$this.data=dataIntersection($this.data,array);return $this},contains:function(codePoint){return dataContains(this.data,isNumber(codePoint)?codePoint:symbolToCodePoint(codePoint))},clone:function(){var set=new regenerate;set.data=this.data.slice(0);return set},toString:function(options){var result=createCharacterClassesFromData(this.data,options?options.bmpOnly:false);return result.replace(regexNull,"\\0$1")},toRegExp:function(flags){return RegExp(this.toString(),flags||"")},valueOf:function(){return dataToArray(this.data)}});proto.toArray=proto.valueOf;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define(function(){return regenerate})}else if(freeExports&&!freeExports.nodeType){if(freeModule){freeModule.exports=regenerate}else{freeExports.regenerate=regenerate}}else{root.regenerate=regenerate}})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],327:[function(require,module,exports){(function(global){(function(){"use strict";var objectTypes={"function":true,object:true};var root=objectTypes[typeof window]&&window||this;var oldRoot=root;var freeExports=objectTypes[typeof exports]&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal}var stringFromCharCode=String.fromCharCode;var floor=Math.floor;function fromCodePoint(){var MAX_SIZE=16384;var codeUnits=[];var highSurrogate;var lowSurrogate;var index=-1;var length=arguments.length;if(!length){return""}var result="";while(++index1114111||floor(codePoint)!=codePoint){throw RangeError("Invalid code point: "+codePoint)}if(codePoint<=65535){codeUnits.push(codePoint)}else{codePoint-=65536;highSurrogate=(codePoint>>10)+55296;lowSurrogate=codePoint%1024+56320;codeUnits.push(highSurrogate,lowSurrogate)}if(index+1==length||codeUnits.length>MAX_SIZE){result+=stringFromCharCode.apply(null,codeUnits);codeUnits.length=0}}return result}function assertType(type,expected){if(expected.indexOf("|")==-1){if(type==expected){return}throw Error("Invalid node type: "+type)}expected=assertType.hasOwnProperty(expected)?assertType[expected]:assertType[expected]=RegExp("^(?:"+expected+")$");if(expected.test(type)){return}throw Error("Invalid node type: "+type)}function generate(node){var type=node.type;if(generate.hasOwnProperty(type)&&typeof generate[type]=="function"){return generate[type](node)}throw Error("Invalid node type: "+type)}function generateAlternative(node){assertType(node.type,"alternative");var terms=node.body,length=terms?terms.length:0;if(length==1){return generateTerm(terms[0])}else{var i=-1,result="";while(++i=55296&&first<=56319){second=lookahead().charCodeAt(0);if(second>=56320&&second<=57343){pos++;return createValue("symbol",(first-55296)*1024+second-56320+65536,pos-2,pos)}}}return createValue("symbol",first,pos-1,pos)}function createDisjunction(alternatives,from,to){return addRaw({type:"disjunction",body:alternatives,range:[from,to]})}function createDot(){return addRaw({type:"dot",range:[pos-1,pos]})}function createCharacterClassEscape(value){return addRaw({type:"characterClassEscape",value:value,range:[pos-2,pos]})}function createReference(matchIndex){return addRaw({type:"reference",matchIndex:parseInt(matchIndex,10),range:[pos-1-matchIndex.length,pos]})}function createGroup(behavior,disjunction,from,to){return addRaw({type:"group",behavior:behavior,body:disjunction,range:[from,to]})}function createQuantifier(min,max,from,to){if(to==null){from=pos-1;to=pos}return addRaw({type:"quantifier",min:min,max:max,greedy:true,body:null,range:[from,to]})}function createAlternative(terms,from,to){return addRaw({type:"alternative",body:terms,range:[from,to]})}function createCharacterClass(classRanges,negative,from,to){return addRaw({type:"characterClass",body:classRanges,negative:negative,range:[from,to]})}function createClassRange(min,max,from,to){if(min.codePoint>max.codePoint){throw SyntaxError("invalid range in character class")}return addRaw({type:"characterClassRange",min:min,max:max,range:[from,to]})}function flattenBody(body){if(body.type==="alternative"){return body.body}else{return[body]}}function isEmpty(obj){return obj.type==="empty"}function incr(amount){amount=amount||1; -var res=str.substring(pos,pos+amount);pos+=amount||1;return res}function skip(value){if(!match(value)){throw SyntaxError("character: "+value)}}function match(value){if(str.indexOf(value,pos)===pos){return incr(value.length)}}function lookahead(){return str[pos]}function current(value){return str.indexOf(value,pos)===pos}function next(value){return str[pos+1]===value}function matchReg(regExp){var subStr=str.substring(pos);var res=subStr.match(regExp);if(res){res.range=[];res.range[0]=pos;incr(res[0].length);res.range[1]=pos}return res}function parseDisjunction(){var res=[],from=pos;res.push(parseAlternative());while(match("|")){res.push(parseAlternative())}if(res.length===1){return res[0]}return createDisjunction(res,from,pos)}function parseAlternative(){var res=[],from=pos;var term;while(term=parseTerm()){res.push(term)}if(res.length===1){return res[0]}return createAlternative(res,from,pos)}function parseTerm(){if(pos>=str.length||current("|")||current(")")){return null}var anchor=parseAnchor();if(anchor){return anchor}var atom=parseAtom();if(!atom){throw SyntaxError("Expected atom")}var quantifier=parseQuantifier()||false;if(quantifier){quantifier.body=flattenBody(atom);updateRawStart(quantifier,atom.range[0]);return quantifier}return atom}function parseGroup(matchA,typeA,matchB,typeB){var type=null,from=pos;if(match(matchA)){type=typeA}else if(match(matchB)){type=typeB}else{return false}var body=parseDisjunction();if(!body){throw SyntaxError("Expected disjunction")}skip(")");var group=createGroup(type,flattenBody(body),from,pos);if(type=="normal"){if(firstIteration){closedCaptureCounter++}}return group}function parseAnchor(){var res,from=pos;if(match("^")){return createAnchor("start",1)}else if(match("$")){return createAnchor("end",1)}else if(match("\\b")){return createAnchor("boundary",2)}else if(match("\\B")){return createAnchor("not-boundary",2)}else{return parseGroup("(?=","lookahead","(?!","negativeLookahead")}}function parseQuantifier(){var res;var quantifier;var min,max;if(match("*")){quantifier=createQuantifier(0)}else if(match("+")){quantifier=createQuantifier(1)}else if(match("?")){quantifier=createQuantifier(0,1)}else if(res=matchReg(/^\{([0-9]+)\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,min,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,undefined,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),([0-9]+)\}/)){min=parseInt(res[1],10);max=parseInt(res[2],10);if(min>max){throw SyntaxError("numbers out of order in {} quantifier")}quantifier=createQuantifier(min,max,res.range[0],res.range[1])}if(quantifier){if(match("?")){quantifier.greedy=false;quantifier.range[1]+=1}}return quantifier}function parseAtom(){var res;if(res=matchReg(/^[^^$\\.*+?(){[|]/)){return createCharacter(res)}else if(match(".")){return createDot()}else if(match("\\")){res=parseAtomEscape();if(!res){throw SyntaxError("atomEscape")}return res}else if(res=parseCharacterClass()){return res}else{return parseGroup("(?:","ignore","(","normal")}}function parseUnicodeSurrogatePairEscape(firstEscape){if(hasUnicodeFlag){var first,second;if(firstEscape.kind=="unicodeEscape"&&(first=firstEscape.codePoint)>=55296&&first<=56319&¤t("\\")&&next("u")){var prevPos=pos;pos++;var secondEscape=parseClassEscape();if(secondEscape.kind=="unicodeEscape"&&(second=secondEscape.codePoint)>=56320&&second<=57343){firstEscape.range[1]=secondEscape.range[1];firstEscape.codePoint=(first-55296)*1024+second-56320+65536;firstEscape.type="value";firstEscape.kind="unicodeCodePointEscape";addRaw(firstEscape)}else{pos=prevPos}}}return firstEscape}function parseClassEscape(){return parseAtomEscape(true)}function parseAtomEscape(insideCharacterClass){var res;res=parseDecimalEscape();if(res){return res}if(insideCharacterClass){if(match("b")){return createEscaped("singleEscape",8,"\\b")}else if(match("B")){throw SyntaxError("\\B not possible inside of CharacterClass")}}res=parseCharacterEscape();return res}function parseDecimalEscape(){var res,match;if(res=matchReg(/^(?!0)\d+/)){match=res[0];var refIdx=parseInt(res[0],10);if(refIdx<=closedCaptureCounter){return createReference(res[0])}else{backrefDenied.push(refIdx);incr(-res[0].length);if(res=matchReg(/^[0-7]{1,3}/)){return createEscaped("octal",parseInt(res[0],8),res[0],1)}else{res=createCharacter(matchReg(/^[89]/));return updateRawStart(res,res.range[0]-1)}}}else if(res=matchReg(/^[0-7]{1,3}/)){match=res[0];if(/^0{1,3}$/.test(match)){return createEscaped("null",0,"0",match.length+1)}else{return createEscaped("octal",parseInt(match,8),match,1)}}else if(res=matchReg(/^[dDsSwW]/)){return createCharacterClassEscape(res[0])}return false}function parseCharacterEscape(){var res;if(res=matchReg(/^[fnrtv]/)){var codePoint=0;switch(res[0]){case"t":codePoint=9;break;case"n":codePoint=10;break;case"v":codePoint=11;break;case"f":codePoint=12;break;case"r":codePoint=13;break}return createEscaped("singleEscape",codePoint,"\\"+res[0])}else if(res=matchReg(/^c([a-zA-Z])/)){return createEscaped("controlLetter",res[1].charCodeAt(0)%32,res[1],2)}else if(res=matchReg(/^x([0-9a-fA-F]{2})/)){return createEscaped("hexadecimalEscape",parseInt(res[1],16),res[1],2)}else if(res=matchReg(/^u([0-9a-fA-F]{4})/)){return parseUnicodeSurrogatePairEscape(createEscaped("unicodeEscape",parseInt(res[1],16),res[1],2))}else if(hasUnicodeFlag&&(res=matchReg(/^u\{([0-9a-fA-F]+)\}/))){return createEscaped("unicodeCodePointEscape",parseInt(res[1],16),res[1],4)}else{return parseIdentityEscape()}}function isIdentifierPart(ch){var NonAsciiIdentifierPart=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&NonAsciiIdentifierPart.test(String.fromCharCode(ch))}function parseIdentityEscape(){var ZWJ="‌";var ZWNJ="‍";var res;var tmp;if(!isIdentifierPart(lookahead())){tmp=incr();return createEscaped("identifier",tmp.charCodeAt(0),tmp,1)}if(match(ZWJ)){return createEscaped("identifier",8204,ZWJ)}else if(match(ZWNJ)){return createEscaped("identifier",8205,ZWNJ)}return null}function parseCharacterClass(){var res,from=pos;if(res=matchReg(/^\[\^/)){res=parseClassRanges();skip("]");return createCharacterClass(res,true,from,pos)}else if(match("[")){res=parseClassRanges();skip("]");return createCharacterClass(res,false,from,pos)}return null}function parseClassRanges(){var res;if(current("]")){return[]}else{res=parseNonemptyClassRanges();if(!res){throw SyntaxError("nonEmptyClassRanges")}return res}}function parseHelperClassRanges(atom){var from,to,res;if(current("-")&&!next("]")){skip("-");res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}to=pos;var classRanges=parseClassRanges();if(!classRanges){throw SyntaxError("classRanges")}from=atom.range[0];if(classRanges.type==="empty"){return[createClassRange(atom,res,from,to)]}return[createClassRange(atom,res,from,to)].concat(classRanges)}res=parseNonemptyClassRangesNoDash();if(!res){throw SyntaxError("nonEmptyClassRangesNoDash")}return[atom].concat(res)}function parseNonemptyClassRanges(){var atom=parseClassAtom();if(!atom){throw SyntaxError("classAtom")}if(current("]")){return[atom]}return parseHelperClassRanges(atom)}function parseNonemptyClassRangesNoDash(){var res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}if(current("]")){return res}return parseHelperClassRanges(res)}function parseClassAtom(){if(match("-")){return createCharacter("-")}else{return parseClassAtomNoDash()}}function parseClassAtomNoDash(){var res;if(res=matchReg(/^[^\\\]-]/)){return createCharacter(res[0])}else if(match("\\")){res=parseClassEscape();if(!res){throw SyntaxError("classEscape")}return parseUnicodeSurrogatePairEscape(res)}}var backrefDenied=[];var closedCaptureCounter=0;var firstIteration=true;var hasUnicodeFlag=(flags||"").indexOf("u")!==-1;var pos=0;str=String(str);if(str===""){str="(?:)"}var result=parseDisjunction();if(result.range[1]!==str.length){throw SyntaxError("Could not parse entire input - got stuck: "+str)}for(var i=0;i-1:false;unicode=flags?flags.indexOf("u")>-1:false;assign(tree,processTerm(tree));return generate(tree)}},{"./data/character-class-escape-sets.js":324,"./data/iu-mappings.json":325,regenerate:326,regjsgen:327,regjsparser:328}],330:[function(require,module,exports){"use strict";var isFinite=require("is-finite");module.exports=function(str,n){if(typeof str!=="string"){throw new TypeError("Expected a string as the first argument")}if(n<0||!isFinite(n)){throw new TypeError("Expected a finite positive number")}var ret="";do{if(n&1){ret+=str}str+=str}while(n=n>>1);return ret}},{"is-finite":331}],331:[function(require,module,exports){arguments[4][191][0].apply(exports,arguments)},{dup:191}],332:[function(require,module,exports){"use strict";module.exports=/^#!.*/},{}],333:[function(require,module,exports){"use strict";module.exports=function(str){var isExtendedLengthPath=/^\\\\\?\\/.test(str);var hasNonAscii=/[^\x00-\x80]+/.test(str);if(isExtendedLengthPath||hasNonAscii){return str}return str.replace(/\\/g,"/")}},{}],334:[function(require,module,exports){(function(Buffer){"use strict";module.exports=function(val){var base64=new Buffer(JSON.stringify(val)).toString("base64");return"//# sourceMappingURL=data:application/json;base64,"+base64}}).call(this,require("buffer").Buffer)},{buffer:145}],335:[function(require,module,exports){exports.SourceMapGenerator=require("./source-map/source-map-generator").SourceMapGenerator;exports.SourceMapConsumer=require("./source-map/source-map-consumer").SourceMapConsumer;exports.SourceNode=require("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":341,"./source-map/source-map-generator":342,"./source-map/source-node":343}],336:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function ArraySet(){this._array=[];this._set={}}ArraySet.fromArray=function ArraySet_fromArray(aArray,aAllowDuplicates){var set=new ArraySet;for(var i=0,len=aArray.length;i=0&&aIdx>1;return isNegative?-shifted:shifted}exports.encode=function base64VLQ_encode(aValue){var encoded="";var digit;var vlq=toVLQSigned(aValue);do{digit=vlq&VLQ_BASE_MASK;vlq>>>=VLQ_BASE_SHIFT;if(vlq>0){digit|=VLQ_CONTINUATION_BIT}encoded+=base64.encode(digit)}while(vlq>0);return encoded};exports.decode=function base64VLQ_decode(aStr,aIndex,aOutParam){var strLen=aStr.length;var result=0;var shift=0;var continuation,digit;do{if(aIndex>=strLen){throw new Error("Expected more digits in base 64 VLQ value.")}digit=base64.decode(aStr.charAt(aIndex++));continuation=!!(digit&VLQ_CONTINUATION_BIT);digit&=VLQ_BASE_MASK;result=result+(digit<0){if(aHigh-mid>1){return recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return aHigh1){return recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return mid}else{return aLow<0?-1:aLow}}}exports.search=function search(aNeedle,aHaystack,aCompare,aBias){if(aHaystack.length===0){return-1}return recursiveSearch(-1,aHaystack.length,aNeedle,aHaystack,aCompare,aBias||exports.GREATEST_LOWER_BOUND)}})},{amdefine:345}],340:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function generatedPositionAfter(mappingA,mappingB){var lineA=mappingA.generatedLine;var lineB=mappingB.generatedLine;var columnA=mappingA.generatedColumn;var columnB=mappingB.generatedColumn;return lineB>lineA||lineB==lineA&&columnB>=columnA||util.compareByGeneratedPositions(mappingA,mappingB)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(aCallback,aThisArg){this._array.forEach(aCallback,aThisArg)};MappingList.prototype.add=function MappingList_add(aMapping){var mapping;if(generatedPositionAfter(this._last,aMapping)){this._last=aMapping;this._array.push(aMapping)}else{this._sorted=false;this._array.push(aMapping)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(util.compareByGeneratedPositions);this._sorted=true}return this._array};exports.MappingList=MappingList})},{"./util":344,amdefine:345}],341:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");var binarySearch=require("./binary-search");var ArraySet=require("./array-set").ArraySet;var base64VLQ=require("./base64-vlq");function SourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}return sourceMap.sections!=null?new IndexedSourceMapConsumer(sourceMap):new BasicSourceMapConsumer(sourceMap)}SourceMapConsumer.fromSourceMap=function(aSourceMap){return BasicSourceMapConsumer.fromSourceMap(aSourceMap)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{get:function(){if(!this.__generatedMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{get:function(){if(!this.__originalMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._nextCharIsMappingSeparator=function SourceMapConsumer_nextCharIsMappingSeparator(aStr,index){var c=aStr.charAt(index);return c===";"||c===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(aCallback,aContext,aOrder){var context=aContext||null;var order=aOrder||SourceMapConsumer.GENERATED_ORDER;var mappings;switch(order){case SourceMapConsumer.GENERATED_ORDER:mappings=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:mappings=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var sourceRoot=this.sourceRoot;mappings.map(function(mapping){var source=mapping.source;if(source!=null&&sourceRoot!=null){source=util.join(sourceRoot,source)}return{source:source,generatedLine:mapping.generatedLine,generatedColumn:mapping.generatedColumn,originalLine:mapping.originalLine,originalColumn:mapping.originalColumn,name:mapping.name}}).forEach(aCallback,context)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:0};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var mappings=[];var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,binarySearch.LEAST_UPPER_BOUND);if(index>=0){var mapping=this._originalMappings[index];while(mapping&&mapping.originalLine===needle.originalLine){mappings.push({line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)});mapping=this._originalMappings[++index]}}return mappings};exports.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sources=util.getArg(sourceMap,"sources");var names=util.getArg(sourceMap,"names",[]);var sourceRoot=util.getArg(sourceMap,"sourceRoot",null);var sourcesContent=util.getArg(sourceMap,"sourcesContent",null);var mappings=util.getArg(sourceMap,"mappings");var file=util.getArg(sourceMap,"file",null);if(version!=this._version){throw new Error("Unsupported version: "+version)}sources=sources.map(util.normalize);this._names=ArraySet.fromArray(names,true);this._sources=ArraySet.fromArray(sources,true);this.sourceRoot=sourceRoot;this.sourcesContent=sourcesContent;this._mappings=mappings;this.file=file}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.fromSourceMap=function SourceMapConsumer_fromSourceMap(aSourceMap){var smc=Object.create(BasicSourceMapConsumer.prototype);smc._names=ArraySet.fromArray(aSourceMap._names.toArray(),true);smc._sources=ArraySet.fromArray(aSourceMap._sources.toArray(),true);smc.sourceRoot=aSourceMap._sourceRoot;smc.sourcesContent=aSourceMap._generateSourcesContent(smc._sources.toArray(),smc.sourceRoot);smc.file=aSourceMap._file;smc.__generatedMappings=aSourceMap._mappings.toArray().slice();smc.__originalMappings=aSourceMap._mappings.toArray().slice().sort(util.compareByOriginalPositions);return smc};BasicSourceMapConsumer.prototype._version=3;Object.defineProperty(BasicSourceMapConsumer.prototype,"sources",{get:function(){return this._sources.toArray().map(function(s){return this.sourceRoot!=null?util.join(this.sourceRoot,s):s},this)}});BasicSourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){var generatedLine=1;var previousGeneratedColumn=0;var previousOriginalLine=0;var previousOriginalColumn=0;var previousSource=0;var previousName=0;var length=aStr.length;var index=0;var cachedValues={};var temp={};var mapping,str,values,end;while(index1){mapping.source=this._sources.at(previousSource+values[1]);previousSource+=values[1];if(values.length===2){throw new Error("Found a source, but no line and column")}mapping.originalLine=previousOriginalLine+values[2];previousOriginalLine=mapping.originalLine;mapping.originalLine+=1;if(values.length===3){throw new Error("Found a source and line, but no column")}mapping.originalColumn=previousOriginalColumn+values[3];previousOriginalColumn=mapping.originalColumn;if(values.length>4){mapping.name=this._names.at(previousName+values[4]);previousName+=values[4]}}this.__generatedMappings.push(mapping);if(typeof mapping.originalLine==="number"){this.__originalMappings.push(mapping)}}}this.__generatedMappings.sort(util.compareByGeneratedPositions);this.__originalMappings.sort(util.compareByOriginalPositions)};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(aNeedle,aMappings,aLineName,aColumnName,aComparator,aBias){if(aNeedle[aLineName]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+aNeedle[aLineName])}if(aNeedle[aColumnName]<0){throw new TypeError("Column must be greater than or equal to 0, got "+aNeedle[aColumnName])}return binarySearch.search(aNeedle,aMappings,aComparator,aBias)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var index=0;index=0){var mapping=this._generatedMappings[index];if(mapping.generatedLine===needle.generatedLine){var source=util.getArg(mapping,"source",null);if(source!=null&&this.sourceRoot!=null){source=util.join(this.sourceRoot,source)}return{source:source,line:util.getArg(mapping,"originalLine",null),column:util.getArg(mapping,"originalColumn",null),name:util.getArg(mapping,"name",null)}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(aSource,nullOnMissing){if(!this.sourcesContent){return null}if(this.sourceRoot!=null){aSource=util.relative(this.sourceRoot,aSource)}if(this._sources.has(aSource)){return this.sourcesContent[this._sources.indexOf(aSource)]}var url;if(this.sourceRoot!=null&&(url=util.urlParse(this.sourceRoot))){var fileUriAbsPath=aSource.replace(/^file:\/\//,"");if(url.scheme=="file"&&this._sources.has(fileUriAbsPath)){return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]}if((!url.path||url.path=="/")&&this._sources.has("/"+aSource)){return this.sourcesContent[this._sources.indexOf("/"+aSource)]}}if(nullOnMissing){return null}else{throw new Error('"'+aSource+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column")};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,util.getArg(aArgs,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(index>=0){var mapping=this._originalMappings[index];return{line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};exports.BasicSourceMapConsumer=BasicSourceMapConsumer;function IndexedSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sections=util.getArg(sourceMap,"sections");if(version!=this._version){throw new Error("Unsupported version: "+version)}var lastOffset={line:-1,column:0};this._sections=sections.map(function(s){if(s.url){throw new Error("Support for url field in sections not implemented.")}var offset=util.getArg(s,"offset");var offsetLine=util.getArg(offset,"line");var offsetColumn=util.getArg(offset,"column");if(offsetLine0&&aGenerated.column>=0&&!aOriginal&&!aSource&&!aName){return}else if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aOriginal&&"line"in aOriginal&&"column"in aOriginal&&aGenerated.line>0&&aGenerated.column>=0&&aOriginal.line>0&&aOriginal.column>=0&&aSource){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:aGenerated,source:aSource,original:aOriginal,name:aName}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var previousGeneratedColumn=0;var previousGeneratedLine=1;var previousOriginalColumn=0;var previousOriginalLine=0;var previousName=0;var previousSource=0;var result="";var mapping;var mappings=this._mappings.toArray();for(var i=0,len=mappings.length;i0){if(!util.compareByGeneratedPositions(mapping,mappings[i-1])){continue}result+=","}}result+=base64VLQ.encode(mapping.generatedColumn-previousGeneratedColumn);previousGeneratedColumn=mapping.generatedColumn;if(mapping.source!=null){result+=base64VLQ.encode(this._sources.indexOf(mapping.source)-previousSource);previousSource=this._sources.indexOf(mapping.source);result+=base64VLQ.encode(mapping.originalLine-1-previousOriginalLine);previousOriginalLine=mapping.originalLine-1;result+=base64VLQ.encode(mapping.originalColumn-previousOriginalColumn);previousOriginalColumn=mapping.originalColumn;if(mapping.name!=null){result+=base64VLQ.encode(this._names.indexOf(mapping.name)-previousName);previousName=this._names.indexOf(mapping.name)}}}return result};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(aSources,aSourceRoot){return aSources.map(function(source){if(!this._sourcesContents){return null}if(aSourceRoot!=null){source=util.relative(aSourceRoot,source)}var key=util.toSetString(source);return Object.prototype.hasOwnProperty.call(this._sourcesContents,key)?this._sourcesContents[key]:null},this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var map={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){map.file=this._file}if(this._sourceRoot!=null){map.sourceRoot=this._sourceRoot}if(this._sourcesContents){map.sourcesContent=this._generateSourcesContent(map.sources,map.sourceRoot)}return map};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};exports.SourceMapGenerator=SourceMapGenerator})},{"./array-set":336,"./base64-vlq":337,"./mapping-list":340,"./util":344,amdefine:345}],343:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var SourceMapGenerator=require("./source-map-generator").SourceMapGenerator;var util=require("./util");var REGEX_NEWLINE=/(\r?\n)/;var NEWLINE_CODE=10;var isSourceNode="$$$isSourceNode$$$";function SourceNode(aLine,aColumn,aSource,aChunks,aName){this.children=[];this.sourceContents={};this.line=aLine==null?null:aLine;this.column=aColumn==null?null:aColumn;this.source=aSource==null?null:aSource;this.name=aName==null?null:aName;this[isSourceNode]=true;if(aChunks!=null)this.add(aChunks)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(aGeneratedCode,aSourceMapConsumer,aRelativePath){var node=new SourceNode;var remainingLines=aGeneratedCode.split(REGEX_NEWLINE);var shiftNextLine=function(){var lineContents=remainingLines.shift();var newLine=remainingLines.shift()||"";return lineContents+newLine};var lastGeneratedLine=1,lastGeneratedColumn=0;var lastMapping=null;aSourceMapConsumer.eachMapping(function(mapping){if(lastMapping!==null){if(lastGeneratedLine0){if(lastMapping){addMappingWithCode(lastMapping,shiftNextLine())}node.add(remainingLines.join(""))}aSourceMapConsumer.sources.forEach(function(sourceFile){var content=aSourceMapConsumer.sourceContentFor(sourceFile);if(content!=null){if(aRelativePath!=null){sourceFile=util.join(aRelativePath,sourceFile)}node.setSourceContent(sourceFile,content)}});return node;function addMappingWithCode(mapping,code){if(mapping===null||mapping.source===undefined){node.add(code)}else{var source=aRelativePath?util.join(aRelativePath,mapping.source):mapping.source;node.add(new SourceNode(mapping.originalLine,mapping.originalColumn,source,code,mapping.name))}}};SourceNode.prototype.add=function SourceNode_add(aChunk){if(Array.isArray(aChunk)){aChunk.forEach(function(chunk){this.add(chunk)},this)}else if(aChunk[isSourceNode]||typeof aChunk==="string"){if(aChunk){this.children.push(aChunk)}}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.prepend=function SourceNode_prepend(aChunk){if(Array.isArray(aChunk)){for(var i=aChunk.length-1;i>=0;i--){this.prepend(aChunk[i])}}else if(aChunk[isSourceNode]||typeof aChunk==="string"){this.children.unshift(aChunk)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.walk=function SourceNode_walk(aFn){var chunk;for(var i=0,len=this.children.length;i0){newChildren=[];for(i=0;i=0;i--){part=parts[i];if(part==="."){parts.splice(i,1)}else if(part===".."){up++}else if(up>0){if(part===""){parts.splice(i+1,up);up=0}else{parts.splice(i,2);up--}}}path=parts.join("/");if(path===""){path=isAbsolute?"/":"."}if(url){url.path=path;return urlGenerate(url)}return path}exports.normalize=normalize;function join(aRoot,aPath){if(aRoot===""){aRoot="."}if(aPath===""){aPath="."}var aPathUrl=urlParse(aPath);var aRootUrl=urlParse(aRoot);if(aRootUrl){aRoot=aRootUrl.path||"/"}if(aPathUrl&&!aPathUrl.scheme){if(aRootUrl){aPathUrl.scheme=aRootUrl.scheme}return urlGenerate(aPathUrl)}if(aPathUrl||aPath.match(dataUrlRegexp)){return aPath}if(aRootUrl&&!aRootUrl.host&&!aRootUrl.path){aRootUrl.host=aPath;return urlGenerate(aRootUrl)}var joined=aPath.charAt(0)==="/"?aPath:normalize(aRoot.replace(/\/+$/,"")+"/"+aPath);if(aRootUrl){aRootUrl.path=joined;return urlGenerate(aRootUrl)}return joined}exports.join=join;function relative(aRoot,aPath){if(aRoot===""){aRoot="."}aRoot=aRoot.replace(/\/$/,"");var url=urlParse(aRoot);if(aPath.charAt(0)=="/"&&url&&url.path=="/"){return aPath.slice(1)}return aPath.indexOf(aRoot+"/")===0?aPath.substr(aRoot.length+1):aPath}exports.relative=relative;function toSetString(aStr){return"$"+aStr}exports.toSetString=toSetString;function fromSetString(aStr){return aStr.substr(1)}exports.fromSetString=fromSetString;function strcmp(aStr1,aStr2){var s1=aStr1||"";var s2=aStr2||"";return(s1>s2)-(s10){ary.splice(i-1,2);i-=2}}}}function normalize(name,baseName){var baseParts;if(name&&name.charAt(0)==="."){if(baseName){baseParts=baseName.split("/");baseParts=baseParts.slice(0,baseParts.length-1);baseParts=baseParts.concat(name.split("/"));trimDots(baseParts);name=baseParts.join("/")}}return name}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(id){function load(value){loaderCache[id]=value}load.fromText=function(id,text){throw new Error("amdefine does not implement load.fromText")};return load}makeRequire=function(systemRequire,exports,module,relId){function amdRequire(deps,callback){if(typeof deps==="string"){return stringRequire(systemRequire,exports,module,deps,relId)}else{deps=deps.map(function(depName){return stringRequire(systemRequire,exports,module,depName,relId)});process.nextTick(function(){callback.apply(null,deps)})}}amdRequire.toUrl=function(filePath){if(filePath.indexOf(".")===0){return normalize(filePath,path.dirname(module.filename))}else{return filePath}};return amdRequire};requireFn=requireFn||function req(){return module.require.apply(module,arguments)};function runFactory(id,deps,factory){var r,e,m,result;if(id){e=loaderCache[id]={};m={id:id,uri:__filename,exports:e};r=makeRequire(requireFn,e,m,id)}else{if(alreadyCalled){throw new Error("amdefine with no module ID cannot be called more than once per file.")}alreadyCalled=true;e=module.exports;m=module;r=makeRequire(requireFn,e,m,module.id)}if(deps){deps=deps.map(function(depName){return r(depName)})}if(typeof factory==="function"){result=factory.apply(m.exports,deps)}else{result=factory}if(result!==undefined){m.exports=result;if(id){loaderCache[id]=m.exports}}}stringRequire=function(systemRequire,exports,module,id,relId){var index=id.indexOf("!"),originalId=id,prefix,plugin;if(index===-1){id=normalize(id,relId);if(id==="require"){return makeRequire(systemRequire,exports,module,relId)}else if(id==="exports"){return exports}else if(id==="module"){return module}else if(loaderCache.hasOwnProperty(id)){return loaderCache[id]}else if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}else{if(systemRequire){return systemRequire(originalId)}else{throw new Error("No module with ID: "+id)}}}else{prefix=id.substring(0,index);id=id.substring(index+1,id.length);plugin=stringRequire(systemRequire,exports,module,prefix,relId);if(plugin.normalize){id=plugin.normalize(id,makeNormalize(relId))}else{id=normalize(id,relId)}if(loaderCache[id]){return loaderCache[id]}else{plugin.load(id,makeRequire(systemRequire,exports,module,relId),makeLoad(id),{});return loaderCache[id]}}};function define(id,deps,factory){if(Array.isArray(id)){factory=deps;deps=id;id=undefined}else if(typeof id!=="string"){factory=id;id=deps=undefined}if(deps&&!Array.isArray(deps)){factory=deps;deps=undefined}if(!deps){deps=["require","exports","module"]}if(id){defineCache[id]=[id,deps,factory]}else{runFactory(id,deps,factory)}}define.require=function(id){if(loaderCache[id]){return loaderCache[id]}if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}};define.amd={};return define}module.exports=amdefine}).call(this,require("_process"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{_process:153,path:152}],346:[function(require,module,exports){"use strict";module.exports=function(str){return str.replace(/[\s\uFEFF\xA0]+$/g,"")}},{}],347:[function(require,module,exports){module.exports={name:"babel",description:"Turn ES6 code into readable vanilla ES5 with source maps",version:"4.6.6",author:"Sebastian McKenzie ",homepage:"https://babeljs.io/",repository:"babel/babel",preferGlobal:true,main:"lib/babel/api/node.js",browser:{"./lib/babel/api/register/node.js":"./lib/babel/api/register/browser.js"},bin:{"6to5":"./bin/deprecated/6to5","6to5-node":"./bin/deprecated/6to5-node","6to5-runtime":"./bin/deprecated/6to5-runtime",babel:"./bin/babel/index.js","babel-node":"./bin/babel-node","babel-external-helpers":"./bin/babel-external-helpers"},keywords:["harmony","classes","modules","let","const","var","es6","transpile","transpiler","6to5","babel"],scripts:{bench:"make bench",test:"make test"},dependencies:{"acorn-babel":"0.11.1-37","ast-types":"~0.6.1",chalk:"^1.0.0",chokidar:"^0.12.6",commander:"^2.6.0","core-js":"^0.6.1",debug:"^2.1.1","detect-indent":"^3.0.0",estraverse:"^1.9.1",esutils:"^1.1.6","fs-readdir-recursive":"^0.1.0",globals:"^6.2.0","is-integer":"^1.0.4","js-tokens":"1.0.0",leven:"^1.0.1","line-numbers":"0.2.0",lodash:"^3.2.0","output-file-sync":"^1.1.0","path-is-absolute":"^1.0.0","private":"^0.1.6","regenerator-babel":"0.8.13-1",regexpu:"^1.1.2",repeating:"^1.1.2","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.4.0","source-map-support":"^0.2.9","source-map-to-comment":"^1.0.0","trim-right":"^1.0.0"},devDependencies:{babel:"4.6.0",browserify:"^9.0.3",chai:"^2.0.0",eslint:"^0.15.1","babel-eslint":"^1.0.1",esvalid:"^1.1.0",istanbul:"^0.3.5",matcha:"^0.6.0",mocha:"^2.1.0",rimraf:"^2.2.8","uglify-js":"^2.4.16"}}},{}],348:[function(require,module,exports){module.exports={"abstract-expression-call":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceGet",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"abstract-expression-delete":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceDelete",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"abstract-expression-get":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceGet",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"abstract-expression-set":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceSet",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"apply-constructor":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"args",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"create",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"args",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"object",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"||",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"array-comprehension-container":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ArrayExpression",start:null,end:null,loc:null,range:null,elements:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"array-from":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"from",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"array-push":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"push",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"STATEMENT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"async-to-generator":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"fn",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"gen",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"fn",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Promise",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"resolve",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"reject",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callNext",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"bind",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},{type:"Literal",start:null,end:null,loc:null,range:null,value:"next",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callThrow",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"bind",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},{type:"Literal",start:null,end:null,loc:null,range:null,value:"throw",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"FunctionDeclaration",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arg",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"TryStatement",start:null,end:null,loc:null,range:null,block:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"info",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"gen",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arg",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"info",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},handler:{type:"CatchClause",start:null,end:null,loc:null,range:null,param:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"error",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},guard:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"reject",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"error",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},guardedHandlers:[],finalizer:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"info",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"resolve",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Promise",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"resolve",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"then",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callNext",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callThrow",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callNext",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},bind:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Function",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"bind",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},call:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"CONTEXT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"class-call-check":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:true,argument:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"instanceof",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"TypeError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:"Cannot call a class as a function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"class-super-constructor-call-loose":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"class-super-constructor-call":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"corejs-is-iterator":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"CORE_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"$for",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isIterable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"corejs-iterator":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"CORE_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"$for",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getIterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"default-parameter":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VARIABLE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENT_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"DEFAULT_VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENT_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"let",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},defaults:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defaults",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getOwnPropertyNames",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defaults",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"<",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:false,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getOwnPropertyDescriptor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defaults",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"configurable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"define-property":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"enumerable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"configurable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"exports-assign":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"exports-default-assign":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"module",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"exports-module-declaration-loose":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__esModule",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"exports-module-declaration":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Literal",start:null,end:null,loc:null,range:null,value:"__esModule",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"extends":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"assign",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"||",right:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:1,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"<",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:false,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ForInStatement",start:null,end:null,loc:null,range:null,left:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"hasOwnProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"for-of-loose":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"IS_ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isArray",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"IS_ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:null,update:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"IS_ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:">=",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BreakStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:false,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"next",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BreakStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"for-of":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_COMPLETION",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:false,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"TryStatement",start:null,end:null,loc:null,range:null,block:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"STEP_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:true,argument:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_COMPLETION",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"STEP_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"next",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_COMPLETION",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},handler:{type:"CatchClause",start:null,end:null,loc:null,range:null,param:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"err",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},guard:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"err",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},guardedHandlers:[],finalizer:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"TryStatement",start:null,end:null,loc:null,range:null,block:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_COMPLETION",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Literal",start:null,end:null,loc:null,range:null,value:"return",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Literal",start:null,end:null,loc:null,range:null,value:"return",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},handler:null,guardedHandlers:[],finalizer:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},get:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"get",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getOwnPropertyDescriptor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getPrototypeOf",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"get",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Literal",start:null,end:null,loc:null,range:null,value:"value",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},operator:"in",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"get",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"has-own":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"hasOwnProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},inherits:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"TypeError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Literal",start:null,end:null,loc:null,range:null,value:"Super expression must either be null or a function, not ",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},operator:"+",right:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"create",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"enumerable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:false,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"configurable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__proto__",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"interop-require-wildcard":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__esModule",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Literal",start:null,end:null,loc:null,range:null,value:"default",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"interop-require":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__esModule",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Literal",start:null,end:null,loc:null,range:null,value:"default",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"let-scoping-return":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"RETURN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"object",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"RETURN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"v",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"named-function":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"FunctionDeclaration",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"GET_OUTER_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:false,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"object-destructuring-empty":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"TypeError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:"Cannot destructure undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"object-without-properties":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ForInStatement",start:null,end:null,loc:null,range:null,left:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"indexOf",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:">=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ContinueStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:true,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"hasOwnProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ContinueStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"property-method-assignment-wrapper-generator":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:true,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"YieldExpression",start:null,end:null,loc:null,range:null,delegate:true,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"toString",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"toString",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"property-method-assignment-wrapper":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:false,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"toString",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"toString",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"prototype-identifier":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"CLASS_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"prototype-properties":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"child",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"staticProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instanceProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"staticProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperties",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"child",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"staticProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instanceProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperties",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"child",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instanceProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"require-assign-key":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VARIABLE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"require",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},require:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"require",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},rest:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LEN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY_LEN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"START",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"<",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LEN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:false,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"self-contained-helpers-head":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"helpers",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Literal",start:null,end:null,loc:null,range:null,value:"default",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__esModule",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"self-global":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"global",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"self",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"global",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},set:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"set",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getOwnPropertyDescriptor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getPrototypeOf",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"set",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Literal",start:null,end:null,loc:null,range:null,value:"value",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},operator:"in",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"set",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},slice:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"slice",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"sliced-to-array":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isArray",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"in",right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ArrayExpression",start:null,end:null,loc:null,range:null,elements:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:true,argument:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"next",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"push",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BreakStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"TypeError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},system:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"System",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"register",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_DEPENDENCIES",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"EXPORT_IDENTIFIER",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setters",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SETTERS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"execute",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"EXECUTE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"tagged-template-literal-loose":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"tagged-template-literal":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"freeze",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperties",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"freeze",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"tail-call-body":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"AGAIN_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"LabeledStatement",start:null,end:null,loc:null,range:null,body:{type:"WhileStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"AGAIN_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"BLOCK",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},label:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"temporal-assert-defined":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"val",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"name",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undef",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"val",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undef",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ReferenceError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"name",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"+",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:" is not defined - temporal dead zone",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"temporal-undefined":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"test-exports":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"test-module":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"module",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"to-array":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isArray",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"from",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"to-consumable-array":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isArray",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr2",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"<",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:false,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr2",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr2",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"from",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"typeof":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Literal",start:null,end:null,loc:null,range:null,value:"symbol",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},alternate:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"umd-runner-body":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"factory",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"define",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"define",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"amd",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"define",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"AMD_ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"factory",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"COMMON_TEST",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"factory",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"COMMON_ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}} -},{}]},{},[1])(1)}); \ No newline at end of file diff --git a/babel.js b/babel.js new file mode 100644 index 0000000..fcf8015 --- /dev/null +++ b/babel.js @@ -0,0 +1,49829 @@ +(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.babel = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o")) { + node.params.push(this.flow_parseTypeAnnotatableIdentifier()); + if (!this.isRelational(">")) { + this.expect(tt.comma); + } + } + this.expectRelational(">"); + + return this.finishNode(node, "TypeParameterDeclaration"); +}; + +pp.flow_parseTypeParameterInstantiation = function () { + var node = this.startNode(), + oldInType = this.inType; + node.params = []; + + this.inType = true; + + this.expectRelational("<"); + while (!this.isRelational(">")) { + node.params.push(this.flow_parseType()); + if (!this.isRelational(">")) { + this.expect(tt.comma); + } + } + this.expectRelational(">"); + + this.inType = oldInType; + + return this.finishNode(node, "TypeParameterInstantiation"); +}; + +pp.flow_parseObjectPropertyKey = function () { + return this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); +}; + +pp.flow_parseObjectTypeIndexer = function (node, isStatic) { + node["static"] = isStatic; + + this.expect(tt.bracketL); + node.id = this.flow_parseObjectPropertyKey(); + this.expect(tt.colon); + node.key = this.flow_parseType(); + this.expect(tt.bracketR); + this.expect(tt.colon); + node.value = this.flow_parseType(); + + this.flow_objectTypeSemicolon(); + return this.finishNode(node, "ObjectTypeIndexer"); +}; + +pp.flow_parseObjectTypeMethodish = function (node) { + node.params = []; + node.rest = null; + node.typeParameters = null; + + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + } + + this.expect(tt.parenL); + while (this.type === tt.name) { + node.params.push(this.flow_parseFunctionTypeParam()); + if (this.type !== tt.parenR) { + this.expect(tt.comma); + } + } + + if (this.eat(tt.ellipsis)) { + node.rest = this.flow_parseFunctionTypeParam(); + } + this.expect(tt.parenR); + this.expect(tt.colon); + node.returnType = this.flow_parseType(); + + return this.finishNode(node, "FunctionTypeAnnotation"); +}; + +pp.flow_parseObjectTypeMethod = function (start, isStatic, key) { + var node = this.startNodeAt(start); + node.value = this.flow_parseObjectTypeMethodish(this.startNodeAt(start)); + node["static"] = isStatic; + node.key = key; + node.optional = false; + this.flow_objectTypeSemicolon(); + return this.finishNode(node, "ObjectTypeProperty"); +}; + +pp.flow_parseObjectTypeCallProperty = function (node, isStatic) { + var valueNode = this.startNode(); + node["static"] = isStatic; + node.value = this.flow_parseObjectTypeMethodish(valueNode); + this.flow_objectTypeSemicolon(); + return this.finishNode(node, "ObjectTypeCallProperty"); +}; + +pp.flow_parseObjectType = function (allowStatic) { + var nodeStart = this.startNode(); + var node; + var optional = false; + var property; + var propertyKey; + var propertyTypeAnnotation; + var token; + var isStatic; + + nodeStart.callProperties = []; + nodeStart.properties = []; + nodeStart.indexers = []; + + this.expect(tt.braceL); + + while (this.type !== tt.braceR) { + var start = this.markPosition(); + node = this.startNode(); + if (allowStatic && this.isContextual("static")) { + this.next(); + isStatic = true; + } + + if (this.type === tt.bracketL) { + nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node, isStatic)); + } else if (this.type === tt.parenL || this.isRelational("<")) { + nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node, allowStatic)); + } else { + if (isStatic && this.type === tt.colon) { + propertyKey = this.parseIdent(); + } else { + propertyKey = this.flow_parseObjectPropertyKey(); + } + if (this.isRelational("<") || this.type === tt.parenL) { + // This is a method property + nodeStart.properties.push(this.flow_parseObjectTypeMethod(start, isStatic, propertyKey)); + } else { + if (this.eat(tt.question)) { + optional = true; + } + this.expect(tt.colon); + node.key = propertyKey; + node.value = this.flow_parseType(); + node.optional = optional; + node["static"] = isStatic; + this.flow_objectTypeSemicolon(); + nodeStart.properties.push(this.finishNode(node, "ObjectTypeProperty")); + } + } + } + + this.expect(tt.braceR); + + return this.finishNode(nodeStart, "ObjectTypeAnnotation"); +}; + +pp.flow_objectTypeSemicolon = function () { + if (!this.eat(tt.semi) && this.type !== tt.braceR) { + this.unexpected(); + } +}; + +pp.flow_parseGenericType = function (start, id) { + var node = this.startNodeAt(start); + + node.typeParameters = null; + node.id = id; + + while (this.eat(tt.dot)) { + var node2 = this.startNodeAt(start); + node2.qualification = node.id; + node2.id = this.parseIdent(); + node.id = this.finishNode(node2, "QualifiedTypeIdentifier"); + } + + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterInstantiation(); + } + + return this.finishNode(node, "GenericTypeAnnotation"); +}; + +pp.flow_parseVoidType = function () { + var node = this.startNode(); + this.expect(tt._void); + return this.finishNode(node, "VoidTypeAnnotation"); +}; + +pp.flow_parseTypeofType = function () { + var node = this.startNode(); + this.expect(tt._typeof); + node.argument = this.flow_parsePrimaryType(); + return this.finishNode(node, "TypeofTypeAnnotation"); +}; + +pp.flow_parseTupleType = function () { + var node = this.startNode(); + node.types = []; + this.expect(tt.bracketL); + // We allow trailing commas + while (this.pos < this.input.length && this.type !== tt.bracketR) { + node.types.push(this.flow_parseType()); + if (this.type === tt.bracketR) break; + this.expect(tt.comma); + } + this.expect(tt.bracketR); + return this.finishNode(node, "TupleTypeAnnotation"); +}; + +pp.flow_parseFunctionTypeParam = function () { + var optional = false; + var node = this.startNode(); + node.name = this.parseIdent(); + if (this.eat(tt.question)) { + optional = true; + } + this.expect(tt.colon); + node.optional = optional; + node.typeAnnotation = this.flow_parseType(); + return this.finishNode(node, "FunctionTypeParam"); +}; + +pp.flow_parseFunctionTypeParams = function () { + var ret = { params: [], rest: null }; + while (this.type === tt.name) { + ret.params.push(this.flow_parseFunctionTypeParam()); + if (this.type !== tt.parenR) { + this.expect(tt.comma); + } + } + if (this.eat(tt.ellipsis)) { + ret.rest = this.flow_parseFunctionTypeParam(); + } + return ret; +}; + +pp.flow_identToTypeAnnotation = function (start, node, id) { + switch (id.name) { + case "any": + return this.finishNode(node, "AnyTypeAnnotation"); + + case "bool": + case "boolean": + return this.finishNode(node, "BooleanTypeAnnotation"); + + case "number": + return this.finishNode(node, "NumberTypeAnnotation"); + + case "string": + return this.finishNode(node, "StringTypeAnnotation"); + + default: + return this.flow_parseGenericType(start, id); + } +}; + +// The parsing of types roughly parallels the parsing of expressions, and +// primary types are kind of like primary expressions...they're the +// primitives with which other types are constructed. +pp.flow_parsePrimaryType = function () { + var typeIdentifier = null; + var params = null; + var returnType = null; + var start = this.markPosition(); + var node = this.startNode(); + var rest = null; + var tmp; + var typeParameters; + var token; + var type; + var isGroupedType = false; + + switch (this.type) { + case tt.name: + return this.flow_identToTypeAnnotation(start, node, this.parseIdent()); + + case tt.braceL: + return this.flow_parseObjectType(); + + case tt.bracketL: + return this.flow_parseTupleType(); + + case tt.relational: + if (this.value === "<") { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + this.expect(tt.parenL); + tmp = this.flow_parseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; + this.expect(tt.parenR); + + this.expect(tt.arrow); + + node.returnType = this.flow_parseType(); + + return this.finishNode(node, "FunctionTypeAnnotation"); + } + + case tt.parenL: + this.next(); + + // Check to see if this is actually a grouped type + if (this.type !== tt.parenR && this.type !== tt.ellipsis) { + if (this.type === tt.name) { + var token = this.lookahead().type; + isGroupedType = token !== tt.question && token !== tt.colon; + } else { + isGroupedType = true; + } + } + + if (isGroupedType) { + type = this.flow_parseType(); + this.expect(tt.parenR); + + // If we see a => next then someone was probably confused about + // function types, so we can provide a better error message + if (this.eat(tt.arrow)) { + this.raise(node, "Unexpected token =>. It looks like " + "you are trying to write a function type, but you ended up " + "writing a grouped type followed by an =>, which is a syntax " + "error. Remember, function type parameters are named so function " + "types look like (name1: type1, name2: type2) => returnType. You " + "probably wrote (type1) => returnType"); + } + + return type; + } + + tmp = this.flow_parseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; + + this.expect(tt.parenR); + + this.expect(tt.arrow); + + node.returnType = this.flow_parseType(); + node.typeParameters = null; + + return this.finishNode(node, "FunctionTypeAnnotation"); + + case tt.string: + node.value = this.value; + node.raw = this.input.slice(this.start, this.end); + this.next(); + return this.finishNode(node, "StringLiteralTypeAnnotation"); + + default: + if (this.type.keyword) { + switch (this.type.keyword) { + case "void": + return this.flow_parseVoidType(); + + case "typeof": + return this.flow_parseTypeofType(); + } + } + } + + this.unexpected(); +}; + +pp.flow_parsePostfixType = function () { + var node = this.startNode(); + var type = node.elementType = this.flow_parsePrimaryType(); + if (this.type === tt.bracketL) { + this.expect(tt.bracketL); + this.expect(tt.bracketR); + return this.finishNode(node, "ArrayTypeAnnotation"); + } + return type; +}; + +pp.flow_parsePrefixType = function () { + var node = this.startNode(); + if (this.eat(tt.question)) { + node.typeAnnotation = this.flow_parsePrefixType(); + return this.finishNode(node, "NullableTypeAnnotation"); + } + return this.flow_parsePostfixType(); +}; + +pp.flow_parseIntersectionType = function () { + var node = this.startNode(); + var type = this.flow_parsePrefixType(); + node.types = [type]; + while (this.eat(tt.bitwiseAND)) { + node.types.push(this.flow_parsePrefixType()); + } + return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); +}; + +pp.flow_parseUnionType = function () { + var node = this.startNode(); + var type = this.flow_parseIntersectionType(); + node.types = [type]; + while (this.eat(tt.bitwiseOR)) { + node.types.push(this.flow_parseIntersectionType()); + } + return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); +}; + +pp.flow_parseType = function () { + var oldInType = this.inType; + this.inType = true; + var type = this.flow_parseUnionType(); + this.inType = oldInType; + return type; +}; + +pp.flow_parseTypeAnnotation = function () { + var node = this.startNode(); + + var oldInType = this.inType; + this.inType = true; + this.expect(tt.colon); + node.typeAnnotation = this.flow_parseType(); + this.inType = oldInType; + + return this.finishNode(node, "TypeAnnotation"); +}; + +pp.flow_parseTypeAnnotatableIdentifier = function (requireTypeAnnotation, canBeOptionalParam) { + var node = this.startNode(); + var ident = this.parseIdent(); + var isOptionalParam = false; + + if (canBeOptionalParam && this.eat(tt.question)) { + this.expect(tt.question); + isOptionalParam = true; + } + + if (requireTypeAnnotation || this.type === tt.colon) { + ident.typeAnnotation = this.flow_parseTypeAnnotation(); + this.finishNode(ident, ident.type); + } + + if (isOptionalParam) { + ident.optional = true; + this.finishNode(ident, ident.type); + } + + return ident; +}; + +acorn.plugins.flow = function (instance) { + // function name(): string {} + instance.extend("parseFunctionBody", function (inner) { + return function (node, allowExpression) { + if (this.type === tt.colon) { + node.returnType = this.flow_parseTypeAnnotation(); + } + + return inner.call(this, node, allowExpression); + }; + }); + + instance.extend("parseStatement", function (inner) { + return function (declaration, topLevel) { + // strict mode handling of `interface` since it's a reserved word + if (this.strict && this.type === tt.name && this.value === "interface") { + var node = this.startNode(); + this.next(); + return this.flow_parseInterface(node); + } else { + return inner.call(this, declaration, topLevel); + } + }; + }); + + instance.extend("parseExpressionStatement", function (inner) { + return function (node, expr) { + if (expr.type === "Identifier") { + if (expr.name === "declare") { + if (this.type === tt._class || this.type === tt.name || this.type === tt._function || this.type === tt._var) { + return this.flow_parseDeclare(node); + } + } else if (this.type === tt.name) { + if (expr.name === "interface") { + return this.flow_parseInterface(node); + } else if (expr.name === "type") { + return this.flow_parseTypeAlias(node); + } + } + } + + return inner.call(this, node, expr); + }; + }); + + instance.extend("shouldParseExportDeclaration", function (inner) { + return function () { + return this.isContextual("type") || inner.call(this); + }; + }); + + instance.extend("parseParenItem", function (inner) { + return function (node, start) { + if (this.type === tt.colon) { + var typeCastNode = this.startNodeAt(start); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.flow_parseTypeAnnotation(); + return this.finishNode(typeCastNode, "TypeCastExpression"); + } else { + return node; + } + }; + }); + + instance.extend("parseClassId", function (inner) { + return function (node, isStatement) { + inner.call(this, node, isStatement); + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + } + }; + }); + + instance.extend("readToken", function (inner) { + return function (code) { + if (this.inType && (code === 62 || code === 60)) { + return this.finishOp(tt.relational, 1); + } else { + return inner.call(this, code); + } + }; + }); + + instance.extend("jsx_readToken", function (inner) { + return function () { + if (!this.inType) return inner.call(this); + }; + }); + + instance.extend("parseParenArrowList", function (inner) { + return function (start, exprList, isAsync) { + for (var i = 0; i < exprList.length; i++) { + var listItem = exprList[i]; + if (listItem.type === "TypeCastExpression") { + var expr = listItem.expression; + expr.typeAnnotation = listItem.typeAnnotation; + exprList[i] = expr; + } + } + return inner.call(this, start, exprList, isAsync); + }; + }); + + instance.extend("parseClassProperty", function (inner) { + return function (node) { + if (this.type === tt.colon) { + node.typeAnnotation = this.flow_parseTypeAnnotation(); + } + return inner.call(this, node); + }; + }); + instance.extend("isClassProperty", function (inner) { + return function () { + return this.type === tt.colon || inner.call(this); + }; + }); + + instance.extend("parseClassMethod", function (inner) { + return function (classBody, method, isGenerator, isAsync) { + var typeParameters; + if (this.isRelational("<")) { + typeParameters = this.flow_parseTypeParameterDeclaration(); + } + method.value = this.parseMethod(isGenerator, isAsync); + method.value.typeParameters = typeParameters; + classBody.body.push(this.finishNode(method, "MethodDefinition")); + }; + }); + + instance.extend("parseClassSuper", function (inner) { + return function (node, isStatement) { + inner.call(this, node, isStatement); + if (node.superClass && this.isRelational("<")) { + node.superTypeParameters = this.flow_parseTypeParameterInstantiation(); + } + if (this.isContextual("implements")) { + this.next(); + var implemented = node["implements"] = []; + do { + var node = this.startNode(); + node.id = this.parseIdent(); + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + implemented.push(this.finishNode(node, "ClassImplements")); + } while (this.eat(tt.comma)); + } + }; + }); + + instance.extend("parseObjPropValue", function (inner) { + return function (prop) { + var typeParameters; + if (this.isRelational("<")) { + typeParameters = this.flow_parseTypeParameterDeclaration(); + if (this.type !== tt.parenL) this.unexpected(); + } + inner.apply(this, arguments); + prop.value.typeParameters = typeParameters; + }; + }); + + instance.extend("parseAssignableListItemTypes", function (inner) { + return function (param) { + if (this.eat(tt.question)) { + param.optional = true; + } + if (this.type === tt.colon) { + param.typeAnnotation = this.flow_parseTypeAnnotation(); + } + this.finishNode(param, param.type); + return param; + }; + }); + + instance.extend("parseImportSpecifiers", function (inner) { + return function (node) { + node.isType = false; + if (this.isContextual("type")) { + var start = this.markPosition(); + var typeId = this.parseIdent(); + if (this.type === tt.name && this.value !== "from" || this.type === tt.braceL || this.type === tt.star) { + node.isType = true; + } else { + node.specifiers.push(this.parseImportSpecifierDefault(typeId, start)); + if (this.isContextual("from")) return; + this.eat(tt.comma); + } + } + inner.call(this, node); + }; + }); + + // function foo() {} + instance.extend("parseFunctionParams", function (inner) { + return function (node) { + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + } + inner.call(this, node); + }; + }); + + // var foo: string = bar + instance.extend("parseVarHead", function (inner) { + return function (decl) { + inner.call(this, decl); + if (this.type === tt.colon) { + decl.id.typeAnnotation = this.flow_parseTypeAnnotation(); + this.finishNode(decl.id, decl.id.type); + } + }; + }); +}; +},{"..":5}],2:[function(require,module,exports){ +"use strict"; + +var acorn = require(".."); + +var tt = acorn.tokTypes; +var tc = acorn.tokContexts; + +tc.j_oTag = new acorn.TokContext("...", 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); + ++this.pos; + if (ch === 13 && this.input.charCodeAt(this.pos) === 10) { + ++this.pos; + out += "\n"; + } else { + out += String.fromCharCode(ch); + } + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + chunkStart = this.pos; + } else { + ++this.pos; + } + } + } +}; + +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 { + ++this.pos; + } + } + out += this.input.slice(chunkStart, this.pos++); + return this.finishToken(tt.string, out); +}; + +var XHTMLEntities = { + quot: "\"", + amp: "&", + apos: "'", + lt: "<", + gt: ">", + nbsp: " ", + iexcl: "¡", + cent: "¢", + pound: "£", + curren: "¤", + yen: "¥", + brvbar: "¦", + sect: "§", + uml: "¨", + copy: "©", + ordf: "ª", + laquo: "«", + not: "¬", + shy: "­", + reg: "®", + macr: "¯", + deg: "°", + plusmn: "±", + sup2: "²", + sup3: "³", + acute: "´", + micro: "µ", + para: "¶", + middot: "·", + cedil: "¸", + sup1: "¹", + ordm: "º", + raquo: "»", + frac14: "¼", + frac12: "½", + frac34: "¾", + iquest: "¿", + Agrave: "À", + Aacute: "Á", + Acirc: "Â", + Atilde: "Ã", + Auml: "Ä", + Aring: "Å", + AElig: "Æ", + Ccedil: "Ç", + Egrave: "È", + Eacute: "É", + Ecirc: "Ê", + Euml: "Ë", + Igrave: "Ì", + Iacute: "Í", + Icirc: "Î", + Iuml: "Ï", + ETH: "Ð", + Ntilde: "Ñ", + Ograve: "Ò", + Oacute: "Ó", + Ocirc: "Ô", + Otilde: "Õ", + Ouml: "Ö", + times: "×", + Oslash: "Ø", + Ugrave: "Ù", + Uacute: "Ú", + Ucirc: "Û", + Uuml: "Ü", + Yacute: "Ý", + THORN: "Þ", + szlig: "ß", + agrave: "à", + aacute: "á", + acirc: "â", + atilde: "ã", + auml: "ä", + aring: "å", + aelig: "æ", + ccedil: "ç", + egrave: "è", + eacute: "é", + ecirc: "ê", + euml: "ë", + igrave: "ì", + iacute: "í", + icirc: "î", + iuml: "ï", + eth: "ð", + ntilde: "ñ", + ograve: "ò", + oacute: "ó", + ocirc: "ô", + otilde: "õ", + ouml: "ö", + divide: "÷", + oslash: "ø", + ugrave: "ù", + uacute: "ú", + ucirc: "û", + uuml: "ü", + yacute: "ý", + thorn: "þ", + yuml: "ÿ", + OElig: "Œ", + oelig: "œ", + Scaron: "Š", + scaron: "š", + Yuml: "Ÿ", + fnof: "ƒ", + circ: "ˆ", + tilde: "˜", + Alpha: "Α", + Beta: "Β", + Gamma: "Γ", + Delta: "Δ", + Epsilon: "Ε", + Zeta: "Ζ", + Eta: "Η", + Theta: "Θ", + Iota: "Ι", + Kappa: "Κ", + Lambda: "Λ", + Mu: "Μ", + Nu: "Ν", + Xi: "Ξ", + Omicron: "Ο", + Pi: "Π", + Rho: "Ρ", + Sigma: "Σ", + Tau: "Τ", + Upsilon: "Υ", + Phi: "Φ", + Chi: "Χ", + Psi: "Ψ", + Omega: "Ω", + alpha: "α", + beta: "β", + gamma: "γ", + delta: "δ", + epsilon: "ε", + zeta: "ζ", + eta: "η", + theta: "θ", + iota: "ι", + kappa: "κ", + lambda: "λ", + mu: "μ", + nu: "ν", + xi: "ξ", + omicron: "ο", + pi: "π", + rho: "ρ", + sigmaf: "ς", + sigma: "σ", + tau: "τ", + upsilon: "υ", + phi: "φ", + chi: "χ", + psi: "ψ", + omega: "ω", + thetasym: "ϑ", + upsih: "ϒ", + piv: "ϖ", + ensp: " ", + emsp: " ", + thinsp: " ", + zwnj: "‌", + zwj: "‍", + lrm: "‎", + rlm: "‏", + ndash: "–", + mdash: "—", + lsquo: "‘", + rsquo: "’", + sbquo: "‚", + ldquo: "“", + rdquo: "”", + bdquo: "„", + dagger: "†", + Dagger: "‡", + bull: "•", + hellip: "…", + permil: "‰", + prime: "′", + Prime: "″", + lsaquo: "‹", + rsaquo: "›", + oline: "‾", + frasl: "⁄", + euro: "€", + image: "ℑ", + weierp: "℘", + real: "ℜ", + trade: "™", + alefsym: "ℵ", + larr: "←", + uarr: "↑", + rarr: "→", + darr: "↓", + harr: "↔", + crarr: "↵", + lArr: "⇐", + uArr: "⇑", + rArr: "⇒", + dArr: "⇓", + hArr: "⇔", + forall: "∀", + part: "∂", + exist: "∃", + empty: "∅", + nabla: "∇", + isin: "∈", + notin: "∉", + ni: "∋", + prod: "∏", + sum: "∑", + minus: "−", + lowast: "∗", + radic: "√", + prop: "∝", + infin: "∞", + ang: "∠", + and: "∧", + or: "∨", + cap: "∩", + cup: "∪", + int: "∫", + there4: "∴", + sim: "∼", + cong: "≅", + asymp: "≈", + ne: "≠", + equiv: "≡", + le: "≤", + ge: "≥", + sub: "⊂", + sup: "⊃", + nsub: "⊄", + sube: "⊆", + supe: "⊇", + oplus: "⊕", + otimes: "⊗", + perp: "⊥", + sdot: "⋅", + lceil: "⌈", + rceil: "⌉", + lfloor: "⌊", + rfloor: "⌋", + lang: "〈", + rang: "〉", + loz: "◊", + spades: "♠", + clubs: "♣", + hearts: "♥", + diams: "♦" +}; + +var hexNumber = /^[\da-fA-F]+$/; +var decimalNumber = /^\d+$/; + +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 start = this.markPosition(); + var name = this.jsx_parseIdentifier(); + if (!this.eat(tt.colon)) return name; + var node = this.startNodeAt(start); + 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 start = this.markPosition(); + var node = this.jsx_parseNamespacedName(); + while (this.eat(tt.dot)) { + var newNode = this.startNodeAt(start); + 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 tmp = this.start; + this.start = this.lastTokEnd; + this.lastTokEnd = tmp; + + tmp = this.startLoc; + this.startLoc = this.lastTokEndLoc; + this.lastTokEndLoc = tmp; + + return this.finishNode(this.startNode(), "JSXEmptyExpression"); +}; + +// 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 (start) { + var node = this.startNodeAt(start); + 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 '"); + } + + node.openingElement = openingElement; + node.closingElement = closingElement; + node.children = children; + return this.finishNode(node, "JSXElement"); +}; + +// Parses entire JSX element from current position. + +pp.jsx_parseElement = function () { + var start = this.markPosition(); + this.next(); + return this.jsx_parseElementAt(start); +}; + +acorn.plugins.jsx = function (instance) { + 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); + } + }; + }); +}; +},{"..":5}],3:[function(require,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[1]` means `!(x[1])` +// instead of `(!x)[1]` is handled by the fact that the parser +// function that parses unary prefix operators is called first, and +// in turn calls the function that parses `[]` subscripts — that +// way, it'll receive the node for `x[1]` already parsed, and wraps +// *that* in the unary operator node. +// +// Acorn uses an [operator precedence parser][opp] to handle binary +// operator precedence, because it is much more compact than using +// the technique outlined above, which uses different, nesting +// functions to specify precedence, for all of the ten binary +// precedence levels that JavaScript defines. +// +// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser + +"use strict"; + +var tt = require("./tokentype").types; + +var Parser = require("./state").Parser; + +var reservedWords = require("./identifier").reservedWords; + +var has = require("./util").has; + +var pp = 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) return; + var key = prop.key, + name = undefined; + switch (key.type) { + case "Identifier": + name = key.name;break; + case "Literal": + name = String(key.value);break; + default: + return; + } + var kind = prop.kind || "init", + other = undefined; + if (has(propHash, name)) { + other = propHash[name]; + var isGetSet = kind !== "init"; + if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(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, refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); + if (this.type === tt.comma) { + var node = this.startNodeAt(start); + node.expressions = [expr]; + while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); + return this.finishNode(node, "SequenceExpression"); + } + return expr; +}; + +// Parse an assignment expression. This includes applications of +// operators like `+=`. + +pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { + if (this.type == tt._yield && this.inGenerator) return this.parseYield(); + + var failOnShorthandAssign = undefined; + if (!refShorthandDefaultPos) { + refShorthandDefaultPos = { start: 0 }; + failOnShorthandAssign = true; + } else { + failOnShorthandAssign = false; + } + var start = this.markPosition(); + var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); + if (afterLeftParse) left = afterLeftParse.call(this, left, start); + if (this.type.isAssign) { + var node = this.startNodeAt(start); + node.operator = this.value; + node.left = this.type === tt.eq ? this.toAssignable(left) : left; + refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly + this.checkLVal(left); + if (left.parenthesizedExpression) { + if (left.type === "ObjectPattern") { + this.raise(left.start, "You're trying to assign to a parenthesized expression, instead of `({ foo }) = {}` use `({ foo } = {})`"); + } else { + this.raise(left.start, "Parenthesized left hand expressions are illegal"); + } + } + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression"); + } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + return left; +}; + +// Parse a ternary conditional (`?:`) operator. + +pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseExprOps(noIn, refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + if (this.eat(tt.question)) { + var node = this.startNodeAt(start); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(tt.colon); + node.alternate = this.parseMaybeAssign(noIn); + return this.finishNode(node, "ConditionalExpression"); + } + return expr; +}; + +// Start the precedence parser. + +pp.parseExprOps = function (noIn, refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseMaybeUnary(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + return this.parseExprOp(expr, start, -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, leftStart, minPrec, noIn) { + var prec = this.type.binop; + if (prec != null && (!noIn || this.type !== tt._in)) { + if (prec > minPrec) { + var node = this.startNodeAt(leftStart); + node.left = left; + node.operator = this.value; + var op = this.type; + this.next(); + var start = this.markPosition(); + node.right = this.parseExprOp(this.parseMaybeUnary(), start, op.rightAssociative ? prec - 1 : prec, noIn); + this.finishNode(node, op === tt.logicalOR || op === tt.logicalAND ? "LogicalExpression" : "BinaryExpression"); + return this.parseExprOp(node, leftStart, minPrec, noIn); + } + } + return left; +}; + +// Parse unary operators, both prefix and postfix. + +pp.parseMaybeUnary = function (refShorthandDefaultPos) { + if (this.type.prefix) { + var node = this.startNode(), + update = this.type === tt.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); + if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); + return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } + var start = this.markPosition(); + var expr = this.parseExprSubscripts(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + while (this.type.postfix && !this.canInsertSemicolon()) { + var node = this.startNodeAt(start); + node.operator = this.value; + node.prefix = false; + node.argument = expr; + this.checkLVal(expr); + this.next(); + expr = this.finishNode(node, "UpdateExpression"); + } + return expr; +}; + +// Parse call, dot, and `[]`-subscript expressions. + +pp.parseExprSubscripts = function (refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseExprAtom(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + return this.parseSubscripts(expr, start); +}; + +pp.parseSubscripts = function (base, start, noCalls) { + if (this.eat(tt.dot)) { + var node = this.startNodeAt(start); + node.object = base; + node.property = this.parseIdent(true); + node.computed = false; + return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); + } else if (this.eat(tt.bracketL)) { + var node = this.startNodeAt(start); + node.object = base; + node.property = this.parseExpression(); + node.computed = true; + this.expect(tt.bracketR); + return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); + } else if (!noCalls && this.eat(tt.parenL)) { + var node = this.startNodeAt(start); + node.callee = base; + node.arguments = this.parseExprList(tt.parenR, false); + return this.parseSubscripts(this.finishNode(node, "CallExpression"), start, noCalls); + } else if (this.type === tt.backQuote) { + var node = this.startNodeAt(start); + node.tag = base; + node.quasi = this.parseTemplate(); + return this.parseSubscripts(this.finishNode(node, "TaggedTemplateExpression"), start, noCalls); + }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 (refShorthandDefaultPos) { + var node = undefined; + switch (this.type) { + case tt._this: + case tt._super: + var type = this.type === tt._this ? "ThisExpression" : "Super"; + node = this.startNode(); + this.next(); + return this.finishNode(node, type); + + case tt._yield: + if (this.inGenerator) this.unexpected(); + + case tt._do: + if (this.options.features["es7.doExpressions"]) { + var _node = this.startNode(); + this.next(); + _node.body = this.parseBlock(); + return this.finishNode(_node, "DoExpression"); + } + + case tt.name: + var start = this.markPosition(); + node = this.startNode(); + var id = this.parseIdent(this.type !== tt.name); + + // + if (this.options.features["es7.asyncFunctions"]) { + // async functions! + if (id.name === "async") { + // arrow functions + if (this.type === tt.parenL) { + var expr = this.parseParenAndDistinguishExpression(start, true); + if (expr && expr.type === "ArrowFunctionExpression") { + return expr; + } else { + node.callee = id; + if (!expr) { + node.arguments = []; + } else if (expr.type === "SequenceExpression") { + node.arguments = expr.expressions; + } else { + node.arguments = [expr]; + } + return this.parseSubscripts(this.finishNode(node, "CallExpression"), start); + } + } else if (this.type === tt.name) { + id = this.parseIdent(); + this.expect(tt.arrow); + return this.parseArrowExpression(node, [id], true); + } + + // normal functions + if (this.type === tt._function && !this.canInsertSemicolon()) { + this.next(); + return this.parseFunction(node, false, false, true); + } + } else if (id.name === "await") { + if (this.inAsync) return this.parseAwait(node); + } + } + // + + if (!this.canInsertSemicolon() && this.eat(tt.arrow)) { + return this.parseArrowExpression(this.startNodeAt(start), [id]); + } + return id; + + case tt.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = { pattern: value.pattern, flags: value.flags }; + return node; + + case tt.num:case tt.string: + return this.parseLiteral(this.value); + + case tt._null:case tt._true:case tt._false: + node = this.startNode(); + node.value = this.type === tt._null ? null : this.type === tt._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal"); + + case tt.parenL: + return this.parseParenAndDistinguishExpression(); + + case tt.bracketL: + node = this.startNode(); + this.next(); + // check whether this is array comprehension or regular array + if ((this.options.ecmaVersion >= 7 || this.options.features["es7.comprehensions"]) && this.type === tt._for) { + return this.parseComprehension(node, false); + } + node.elements = this.parseExprList(tt.bracketR, true, true, refShorthandDefaultPos); + return this.finishNode(node, "ArrayExpression"); + + case tt.braceL: + return this.parseObj(false, refShorthandDefaultPos); + + case tt._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, false); + + case tt.at: + this.parseDecorators(); + + case tt._class: + node = this.startNode(); + this.takeDecorators(node); + return this.parseClass(node, false); + + case tt._new: + return this.parseNew(); + + case tt.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(tt.parenL); + var val = this.parseExpression(); + this.expect(tt.parenR); + return val; +}; + +pp.parseParenAndDistinguishExpression = function (start, isAsync) { + start = start || this.markPosition(); + var val = undefined; + if (this.options.ecmaVersion >= 6) { + this.next(); + + if ((this.options.features["es7.comprehensions"] || this.options.ecmaVersion >= 7) && this.type === tt._for) { + return this.parseComprehension(this.startNodeAt(start), true); + } + + var innerStart = this.markPosition(), + exprList = [], + first = true; + var refShorthandDefaultPos = { start: 0 }, + spreadStart = undefined, + innerParenStart = undefined; + while (this.type !== tt.parenR) { + first ? first = false : this.expect(tt.comma); + if (this.type === tt.ellipsis) { + var spreadNodeStart = this.markPosition(); + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStart)); + break; + } else { + if (this.type === tt.parenL && !innerParenStart) { + innerParenStart = this.start; + } + exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); + } + } + var innerEnd = this.markPosition(); + this.expect(tt.parenR); + + if (!this.canInsertSemicolon() && this.eat(tt.arrow)) { + if (innerParenStart) this.unexpected(innerParenStart); + return this.parseParenArrowList(start, exprList, isAsync); + } + + if (!exprList.length) { + if (isAsync) { + return; + } else { + this.unexpected(this.lastTokStart); + } + } + if (spreadStart) this.unexpected(spreadStart); + if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); + + if (exprList.length > 1) { + val = this.startNodeAt(innerStart); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEnd); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(start); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression"); + } else { + val.parenthesizedExpression = true; + return val; + } +}; + +pp.parseParenArrowList = function (start, exprList, isAsync) { + return this.parseArrowExpression(this.startNodeAt(start), exprList, isAsync); +}; + +pp.parseParenItem = function (node, start) { + return node; +}; + +// New's precedence is slightly tricky. It must allow its argument +// to be a `[]` or dot subscript expression, but not a call — at +// least, not without wrapping it in parentheses. Thus, it uses the + +var empty = []; + +pp.parseNew = function () { + var node = this.startNode(); + var meta = this.parseIdent(true); + if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { + node.meta = meta; + node.property = this.parseIdent(true); + if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target"); + return this.finishNode(node, "MetaProperty"); + } + var start = this.markPosition(); + node.callee = this.parseSubscripts(this.parseExprAtom(), start, true); + if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.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), + cooked: this.value + }; + this.next(); + elem.tail = this.type === tt.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(tt.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(tt.braceR); + node.quasis.push(curElt = this.parseTemplateElement()); + } + this.next(); + return this.finishNode(node, "TemplateLiteral"); +}; + +// Parse an object literal or binding pattern. + +pp.parseObj = function (isPattern, refShorthandDefaultPos) { + var 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 = false, + isAsync = false, + start = undefined; + if (this.options.features["es7.objectRestSpread"] && this.type === tt.ellipsis) { + prop = this.parseSpread(); + prop.type = "SpreadProperty"; + node.properties.push(prop); + continue; + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refShorthandDefaultPos) start = this.markPosition(); + if (!isPattern) isGenerator = this.eat(tt.star); + } + if (this.options.features["es7.asyncFunctions"] && this.isContextual("async")) { + if (isGenerator || isPattern) this.unexpected(); + var asyncId = this.parseIdent(); + if (this.type === tt.colon || this.type === tt.parenL) { + prop.key = asyncId; + } else { + isAsync = true; + this.parsePropertyName(prop); + } + } else { + this.parsePropertyName(prop); + } + this.parseObjPropValue(prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos); + this.checkPropClash(prop, propHash); + node.properties.push(this.finishNode(prop, "Property")); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); +}; + +pp.parseObjPropValue = function (prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos) { + if (this.eat(tt.colon)) { + prop.value = isPattern ? this.parseMaybeDefault() : this.parseMaybeAssign(false, refShorthandDefaultPos); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { + if (isPattern) this.unexpected(); + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator, isAsync); + } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != tt.comma && this.type != tt.braceR)) { + if (isGenerator || isAsync || isPattern) this.unexpected(); + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + prop.kind = "init"; + if (isPattern) { + if (this.isKeyword(prop.key.name) || this.strict && (reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); + prop.value = this.parseMaybeDefault(start, prop.key); + } else if (this.type === tt.eq && refShorthandDefaultPos) { + if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start; + prop.value = this.parseMaybeDefault(start, 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(tt.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(tt.bracketR); + return; + } else { + prop.computed = false; + } + } + prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); +}; + +// Initialize empty function node. + +pp.initFunction = function (node, isAsync) { + node.id = null; + if (this.options.ecmaVersion >= 6) { + node.generator = false; + node.expression = false; + } + if (this.options.features["es7.asyncFunctions"]) { + node.async = !!isAsync; + } +}; + +// Parse object or class method. + +pp.parseMethod = function (isGenerator, isAsync) { + var node = this.startNode(); + this.initFunction(node, isAsync); + this.expect(tt.parenL); + node.params = this.parseBindingList(tt.parenR, false, false); + if (this.options.ecmaVersion >= 6) { + node.generator = isGenerator; + } + this.parseFunctionBody(node); + return this.finishNode(node, "FunctionExpression"); +}; + +// Parse arrow function expression with given parameters. + +pp.parseArrowExpression = function (node, params, isAsync) { + this.initFunction(node, isAsync); + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true); + return this.finishNode(node, "ArrowFunctionExpression"); +}; + +// Parse function body and check parameters. + +pp.parseFunctionBody = function (node, allowExpression) { + var isExpression = allowExpression && this.type !== tt.braceL; + + var oldInAsync = this.inAsync; + this.inAsync = node.async; + if (isExpression) { + node.body = this.parseMaybeAssign(); + node.expression = true; + } else { + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldInFunc = this.inFunction, + oldInGen = this.inGenerator, + oldLabels = this.labels; + this.inFunction = true;this.inGenerator = node.generator;this.labels = []; + node.body = this.parseBlock(true); + node.expression = false; + this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; + } + this.inAsync = oldInAsync; + + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { + var nameHash = {}, + oldStrict = this.strict; + this.strict = true; + if (node.id) this.checkLVal(node.id, true); + for (var i = 0; i < node.params.length; i++) { + this.checkLVal(node.params[i], true, nameHash); + }this.strict = oldStrict; + } +}; + +// Parses a comma-separated list of expressions, and returns them as +// an array. `close` is the token type that ends the list, and +// `allowEmpty` can be turned on to allow subsequent commas with +// nothing in between them to be parsed as `null` (which is needed +// for array literals). + +pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) { + var elts = [], + first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(tt.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) break; + } else first = false; + + if (allowEmpty && this.type === tt.comma) { + elts.push(null); + } else { + if (this.type === tt.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos)); + } + } + 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 === tt.name) { + if (!liberal && (!this.options.allowReserved && this.isReservedWord(this.value) || this.strict && reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); + 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 await expression inside async function. + +pp.parseAwait = function (node) { + if (this.eat(tt.semi) || this.canInsertSemicolon()) { + this.unexpected(); + } + node.all = this.eat(tt.star); + node.argument = this.parseMaybeAssign(true); + return this.finishNode(node, "AwaitExpression"); +}; + +// Parses yield expression inside generator. + +pp.parseYield = function () { + var node = this.startNode(); + this.next(); + if (this.type == tt.semi || this.canInsertSemicolon() || this.type != tt.star && !this.type.startsExpr) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(tt.star); + node.argument = this.parseMaybeAssign(); + } + return this.finishNode(node, "YieldExpression"); +}; + +// Parses array and generator comprehensions. + +pp.parseComprehension = function (node, isGenerator) { + node.blocks = []; + while (this.type === tt._for) { + var block = this.startNode(); + this.next(); + this.expect(tt.parenL); + block.left = this.parseBindingAtom(); + this.checkLVal(block.left, true); + this.expectContextual("of"); + block.right = this.parseExpression(); + this.expect(tt.parenR); + node.blocks.push(this.finishNode(block, "ComprehensionBlock")); + } + node.filter = this.eat(tt._if) ? this.parseParenExpression() : null; + node.body = this.parseExpression(); + this.expect(isGenerator ? tt.parenR : tt.bracketR); + node.generator = isGenerator; + return this.finishNode(node, "ComprehensionExpression"); +}; +},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){ + + +// Test whether a given character code starts an identifier. + +"use strict"; + +exports.isIdentifierStart = isIdentifierStart; + +// Test whether a given character is part of an identifier. + +exports.isIdentifierChar = isIdentifierChar; +exports.__esModule = true; +// This is a trick taken from Esprima. It turns out that, on +// non-Chrome browsers, to check whether a string is in a set, a +// predicate containing a big ugly `switch` statement is faster than +// a regular expression, and on Chrome the two are about on par. +// This function uses `eval` (non-lexical) to produce such a +// predicate from a space-separated string of words. +// +// It starts by sorting the words by length. + +function makePredicate(words) { + words = words.split(" "); + var f = "", + cats = []; + out: for (var i = 0; i < words.length; ++i) { + for (var j = 0; j < cats.length; ++j) { + if (cats[j][0].length == words[i].length) { + cats[j].push(words[i]); + continue out; + } + }cats.push([words[i]]); + } + function compareTo(arr) { + if (arr.length == 1) return f += "return str === " + JSON.stringify(arr[0]) + ";"; + f += "switch(str){"; + for (var i = 0; i < arr.length; ++i) { + f += "case " + JSON.stringify(arr[i]) + ":"; + }f += "return true}return false;"; + } + + // When there are more than three length categories, an outer + // switch first dispatches on the lengths, to save on comparisons. + + if (cats.length > 3) { + cats.sort(function (a, b) { + return b.length - a.length; + }); + f += "switch(str.length){"; + for (var i = 0; i < cats.length; ++i) { + var cat = cats[i]; + f += "case " + cat[0].length + ":"; + compareTo(cat); + } + f += "}" + + // Otherwise, simply generate a flat `switch` statement. + + ; + } else { + compareTo(words); + } + return new Function("str", f); +} + +// Reserved word lists for various dialects of the language + +var reservedWords = { + 3: makePredicate("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: makePredicate("class enum extends super const export import"), + 6: makePredicate("enum await"), + strict: makePredicate("implements interface let package private protected public static yield"), + strictBind: makePredicate("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: makePredicate(ecma5AndLessKeywords), + 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield 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 `tools/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 tools/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, 98, 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, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 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, 16355, 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, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 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, 4305, 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 = 65536; + 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; + } +} +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 <= 65535) return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); + if (astral === false) return false; + return isInAstralSet(code, astralIdentifierStartCodes); +} + +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 <= 65535) return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + if (astral === false) return false; + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} +},{}],5:[function(require,module,exports){ + + +// 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]. +// +// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API + +"use strict"; + +exports.parse = 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. + +exports.parseExpressionAt = parseExpressionAt; + +// Acorn is organized as a tokenizer and a recursive-descent parser. +// The `tokenize` export provides an interface to the tokenizer. +// Because the tokenizer is optimized for being efficiently used by +// the Acorn parser itself, this interface is somewhat crude and not +// very modular. + +exports.tokenizer = tokenizer; +exports.__esModule = true; +// 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 +// +// http://marijnhaverbeke.nl/git/acorn +// https://github.com/marijnh/acorn.git +// +// Please use the [github bug tracker][ghbt] to report issues. +// +// [ghbt]: https://github.com/marijnh/acorn/issues +// +// This file defines the main parser interface. The library also comes +// with a [error-tolerant parser][dammit] and an +// [abstract syntax tree walker][walk], defined in other files. +// +// [dammit]: acorn_loose.js +// [walk]: util/walk.js + +var _state = require("./state"); + +var Parser = _state.Parser; + +var _options = require("./options"); + +var getOptions = _options.getOptions; + +require("./parseutil"); + +require("./statement"); + +require("./lval"); + +require("./expression"); + +require("./lookahead"); + +exports.Parser = _state.Parser; +exports.plugins = _state.plugins; +exports.defaultOptions = _options.defaultOptions; + +var _location = require("./location"); + +exports.SourceLocation = _location.SourceLocation; +exports.getLineInfo = _location.getLineInfo; +exports.Node = require("./node").Node; + +var _tokentype = require("./tokentype"); + +exports.TokenType = _tokentype.TokenType; +exports.tokTypes = _tokentype.types; + +var _tokencontext = require("./tokencontext"); + +exports.TokContext = _tokencontext.TokContext; +exports.tokContexts = _tokencontext.types; + +var _identifier = require("./identifier"); + +exports.isIdentifierChar = _identifier.isIdentifierChar; +exports.isIdentifierStart = _identifier.isIdentifierStart; +exports.Token = require("./tokenize").Token; + +var _whitespace = require("./whitespace"); + +exports.isNewLine = _whitespace.isNewLine; +exports.lineBreak = _whitespace.lineBreak; +exports.lineBreakG = _whitespace.lineBreakG; + +require("../plugins/flow"); + +require("../plugins/jsx"); + +var version = "1.0.0";exports.version = version; + +function parse(input, options) { + var p = parser(options, input); + var startPos = p.options.locations ? [p.pos, p.curPosition()] : p.pos; + p.nextToken(); + return p.parseTopLevel(p.options.program || p.startNodeAt(startPos)); +} + +function parseExpressionAt(input, pos, options) { + var p = parser(options, input, pos); + p.nextToken(); + return p.parseExpression(); +} + +function tokenizer(input, options) { + return parser(options, input); +} + +function parser(options, input) { + return new Parser(getOptions(options), String(input)); +} +},{"../plugins/flow":1,"../plugins/jsx":2,"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){ +"use strict"; + +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + +// 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.getLineInfo = getLineInfo; +exports.__esModule = true; + +var Parser = require("./state").Parser; + +var lineBreakG = require("./whitespace").lineBreakG; + +// These are used when `options.locations` is on, for the +// `startLoc` and `endLoc` properties. + +var Position = exports.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; +})(); + +var SourceLocation = exports.SourceLocation = function SourceLocation(p, start, end) { + _classCallCheck(this, SourceLocation); + + this.start = start; + this.end = end; + if (p.sourceFile !== null) this.source = p.sourceFile; +}; + +function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur; + var match = lineBreakG.exec(input); + if (match && match.index < offset) { + ++line; + cur = match.index + match[0].length; + } else { + return new Position(line, offset - cur); + } + } +} + +var pp = 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 = 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.curPosition = function () { + return new Position(this.curLine, this.pos - this.lineStart); +}; + +pp.markPosition = function () { + return this.options.locations ? [this.start, this.startLoc] : this.start; +}; +},{"./state":12,"./whitespace":18}],7:[function(require,module,exports){ +"use strict"; + +var Parser = require("./state").Parser; + +var pp = Parser.prototype; + +var STATE_KEYS = ["lastTokStartLoc", "lastTokEndLoc", "lastTokStart", "lastTokEnd", "lineStart", "startLoc", "endLoc", "start", "pos", "end", "type", "value"]; + +pp.getState = function () { + var state = {}; + for (var i = 0; i < STATE_KEYS.length; i++) { + var key = STATE_KEYS[i]; + state[key] = this[key]; + } + return state; +}; + +pp.lookahead = function () { + var old = this.getState(); + this.next(); + var curr = this.getState(); + for (var key in old) this[key] = old[key]; + return curr; +}; +},{"./state":12}],8:[function(require,module,exports){ +"use strict"; + +var tt = require("./tokentype").types; + +var Parser = require("./state").Parser; + +var reservedWords = require("./identifier").reservedWords; + +var has = require("./util").has; + +var pp = 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": + case "AssignmentPattern": + 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"; + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); + } + break; + + case "MemberExpression": + if (!isBinding) break; + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } + return node; +}; + +// Convert list of expression atoms to binding list. + +pp.toAssignableList = function (exprList, isBinding) { + var end = exprList.length; + if (end) { + var last = exprList[end - 1]; + if (last && last.type == "RestElement") { + --end; + } else if (last && last.type == "SpreadElement") { + last.type = "RestElement"; + var arg = last.argument; + this.toAssignable(arg, isBinding); + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start); + --end; + } + } + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) this.toAssignable(elt, isBinding); + } + return exprList; +}; + +// Parses spread element. + +pp.parseSpread = function (refShorthandDefaultPos) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(refShorthandDefaultPos); + return this.finishNode(node, "SpreadElement"); +}; + +pp.parseRest = function () { + var node = this.startNode(); + this.next(); + node.argument = this.type === tt.name || this.type === tt.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 tt.name: + return this.parseIdent(); + + case tt.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(tt.bracketR, true, true); + return this.finishNode(node, "ArrayPattern"); + + case tt.braceL: + return this.parseObj(true); + + default: + this.unexpected(); + } +}; + +pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { + var elts = [], + first = true; + while (!this.eat(close)) { + if (first) first = false;else this.expect(tt.comma); + if (allowEmpty && this.type === tt.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break; + } else if (this.type === tt.ellipsis) { + elts.push(this.parseAssignableListItemTypes(this.parseRest())); + this.expect(close); + break; + } else { + elts.push(this.parseAssignableListItemTypes(this.parseMaybeDefault())); + } + } + return elts; +}; + +pp.parseAssignableListItemTypes = function (param) { + return param; +}; + +// Parses assignment pattern around given atom if possible. + +pp.parseMaybeDefault = function (startPos, left) { + startPos = startPos || this.markPosition(); + left = left || this.parseBindingAtom(); + if (!this.eat(tt.eq)) return left; + var node = this.startNodeAt(startPos); + node.operator = "="; + 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 && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); + if (checkClashes) { + if (has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); + checkClashes[expr.name] = true; + } + break; + + case "MemberExpression": + if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); + break; + + case "ObjectPattern": + for (var i = 0; i < expr.properties.length; i++) { + var prop = expr.properties[i]; + if (prop.type === "Property") prop = prop.value; + this.checkLVal(prop, 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 "SpreadProperty": + case "RestElement": + this.checkLVal(expr.argument, isBinding, checkClashes); + break; + + default: + this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); + } +}; +},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],9:[function(require,module,exports){ +"use strict"; + +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + +exports.__esModule = true; + +var Parser = require("./state").Parser; + +var SourceLocation = require("./location").SourceLocation; + +// Start an AST node, attaching a start offset. + +var pp = Parser.prototype; + +var Node = exports.Node = function Node() { + _classCallCheck(this, Node); +}; + +pp.startNode = function () { + var node = new Node(); + node.start = this.start; + if (this.options.locations) node.loc = new SourceLocation(this, this.startLoc); + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [this.start, 0]; + return node; +}; + +pp.startNodeAt = function (pos) { + var node = new Node(), + start = pos; + if (this.options.locations) { + node.loc = new SourceLocation(this, start[1]); + start = pos[0]; + } + node.start = start; + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [start, 0]; + return node; +}; + +// Finish an AST node, adding `type` and `end` properties. + +pp.finishNode = function (node, type) { + node.type = type; + node.end = this.lastTokEnd; + if (this.options.locations) node.loc.end = this.lastTokEndLoc; + if (this.options.ranges) node.range[1] = this.lastTokEnd; + return node; +}; + +// Finish node at given position + +pp.finishNodeAt = function (node, type, pos) { + if (this.options.locations) { + node.loc.end = pos[1];pos = pos[0]; + } + node.type = type; + node.end = pos; + if (this.options.ranges) node.range[1] = pos; + return node; +}; +},{"./location":6,"./state":12}],10:[function(require,module,exports){ + + +// Interpret and default an options object + +"use strict"; + +exports.getOptions = getOptions; +exports.__esModule = true; + +var _util = require("./util"); + +var has = _util.has; +var isArray = _util.isArray; + +var SourceLocation = require("./location").SourceLocation; + +// 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. + ecmaVersion: 5, + // 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 not enforced. Disable + // `allowReserved` to enforce them. When this option has the + // value "never", reserved words and keywords can also not be + // used as property names. + allowReserved: true, + // 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 tokenize() returns. 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: {}, + // Babel-specific options + features: {}, + strictMode: null +};exports.defaultOptions = defaultOptions; + +function getOptions(opts) { + var options = {}; + for (var opt in defaultOptions) { + options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; + }if (isArray(options.onToken)) { + (function () { + var tokens = options.onToken; + options.onToken = function (token) { + return tokens.push(token); + }; + })(); + } + if (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 SourceLocation(this, startLoc, endLoc); + if (options.ranges) comment.range = [start, end]; + array.push(comment); + }; +} +},{"./location":6,"./util":17}],11:[function(require,module,exports){ +"use strict"; + +var tt = require("./tokentype").types; + +var Parser = require("./state").Parser; + +var lineBreak = require("./whitespace").lineBreak; + +var pp = 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.value === "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 === tt.name && this.value === name; +}; + +// Consumes contextual keyword if possible. + +pp.eatContextual = function (name) { + return this.value === name && this.eat(tt.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 === tt.eof || this.type === tt.braceR || 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(tt.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"); +}; +},{"./state":12,"./tokentype":16,"./whitespace":18}],12:[function(require,module,exports){ +"use strict"; + +exports.Parser = Parser; +exports.__esModule = true; + +var _identifier = require("./identifier"); + +var reservedWords = _identifier.reservedWords; +var keywords = _identifier.keywords; + +var _tokentype = require("./tokentype"); + +var tt = _tokentype.types; +var lineBreak = _tokentype.lineBreak; + +function Parser(options, input, startPos) { + this.options = options; + this.loadPlugins(this.options.plugins); + this.sourceFile = this.options.sourceFile || null; + this.isKeyword = keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; + this.isReservedWord = reservedWords[this.options.ecmaVersion]; + this.input = input; + + // 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(lineBreak).length; + } else { + this.pos = this.lineStart = 0; + this.curLine = 1; + } + + // Properties of the current token: + // Its type + this.type = tt.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 = null; + + // 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.inModule = this.options.sourceType === "module"; + this.strict = this.options.strictMode === false ? false : this.inModule; + + // Flags to track whether we are in a function, a generator. + this.inFunction = this.inGenerator = false; + // Labels in scope. + this.labels = []; + + this.decorators = []; + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); +} + +Parser.prototype.extend = function (name, f) { + this[name] = f(this[name]); +}; + +// Registered plugins + +var plugins = {}; + +exports.plugins = plugins; +Parser.prototype.loadPlugins = function (plugins) { + for (var _name in plugins) { + var plugin = exports.plugins[_name]; + if (!plugin) throw new Error("Plugin '" + _name + "' not found"); + plugin(this, plugins[_name]); + } +}; +},{"./identifier":4,"./tokentype":16}],13:[function(require,module,exports){ +"use strict"; + +var tt = require("./tokentype").types; + +var Parser = require("./state").Parser; + +var lineBreak = require("./whitespace").lineBreak; + +var pp = 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 !== tt.eof) { + var stmt = this.parseStatement(true, true); + node.body.push(stmt); + if (first && 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" }; + +// Parse a single statement. +// +// If expecting a statement and finding a slash operator, parse a +// regular expression literal. This is to handle cases like +// `if (foo) /blah/.exec(foo)`, where looking at the previous token +// does not help. + +pp.parseStatement = function (declaration, topLevel) { + if (this.type === tt.at) { + this.parseDecorators(true); + } + + var starttype = this.type, + node = this.startNode(); + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case tt._break:case tt._continue: + return this.parseBreakContinueStatement(node, starttype.keyword); + case tt._debugger: + return this.parseDebuggerStatement(node); + case tt._do: + return this.parseDoStatement(node); + case tt._for: + return this.parseForStatement(node); + case tt._function: + if (!declaration && this.options.ecmaVersion >= 6) this.unexpected(); + return this.parseFunctionStatement(node); + + case tt._class: + if (!declaration) this.unexpected(); + this.takeDecorators(node); + return this.parseClass(node, true); + + case tt._if: + return this.parseIfStatement(node); + case tt._return: + return this.parseReturnStatement(node); + case tt._switch: + return this.parseSwitchStatement(node); + case tt._throw: + return this.parseThrowStatement(node); + case tt._try: + return this.parseTryStatement(node); + case tt._let:case tt._const: + if (!declaration) this.unexpected(); // NOTE: falls through to _var + case tt._var: + return this.parseVarStatement(node, starttype); + case tt._while: + return this.parseWhileStatement(node); + case tt._with: + return this.parseWithStatement(node); + case tt.braceL: + return this.parseBlock(); + case tt.semi: + return this.parseEmptyStatement(node); + case tt._export: + case tt._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 === tt._import ? this.parseImport(node) : this.parseExport(node); + + case tt.name: + if (this.options.features["es7.asyncFunctions"] && this.value === "async" && this.lookahead().type === tt._function) { + this.next(); + this.expect(tt._function); + return this.parseFunction(node, true, false, true); + } + + // 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 === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr); + } +}; + +pp.takeDecorators = function (node) { + if (this.decorators.length) { + node.decorators = this.decorators; + this.decorators = []; + } +}; + +pp.parseDecorators = function (allowExport) { + while (this.type === tt.at) { + this.decorators.push(this.parseDecorator()); + } + + if (allowExport && this.type === tt._export) { + return; + } + + if (this.type !== tt._class) { + this.raise(this.start, "Leading decorators must be attached to a class declaration"); + } +}; + +pp.parseDecorator = function (allowExport) { + if (!this.options.features["es7.decorators"]) { + this.unexpected(); + } + var node = this.startNode(); + this.next(); + node.expression = this.parseMaybeAssign(); + return this.finishNode(node, "Decorator"); +}; + +pp.parseBreakContinueStatement = function (node, keyword) { + var isBreak = keyword == "break"; + this.next(); + if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== tt.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) { + var start = this.markPosition(); + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement(false); + this.labels.pop(); + if (this.options.features["es7.doExpressions"] && this.type !== tt._while) { + var container = this.startNodeAt(start); + container.expression = this.finishNode(node, "DoExpression"); + this.semicolon(); + return this.finishNode(container, "ExpressionStatement"); + } + this.expect(tt._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) this.eat(tt.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(tt.parenL); + if (this.type === tt.semi) return this.parseFor(node, null); + if (this.type === tt._var || this.type === tt._let || this.type === tt._const) { + var _init = this.startNode(), + varKind = this.type; + this.next(); + this.parseVar(_init, true, varKind); + this.finishNode(_init, "VariableDeclaration"); + if ((this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== tt._var && _init.declarations[0].init)) return this.parseForIn(node, _init); + return this.parseFor(node, _init); + } + var refShorthandDefaultPos = { start: 0 }; + var init = this.parseExpression(true, refShorthandDefaultPos); + if (this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { + this.toAssignable(init); + this.checkLVal(init); + return this.parseForIn(node, init); + } else if (refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + 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(tt._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(tt.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(tt.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; this.type != tt.braceR;) { + if (this.type === tt._case || this.type === tt._default) { + var isCase = this.type === tt._case; + if (cur) this.finishNode(cur, "SwitchCase"); + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses"); + sawDefault = true; + cur.test = null; + } + this.expect(tt.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 (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 === tt._catch) { + var clause = this.startNode(); + this.next(); + this.expect(tt.parenL); + clause.param = this.parseBindingAtom(); + this.checkLVal(clause.param, true); + this.expect(tt.parenR); + clause.guard = null; + clause.body = this.parseBlock(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.guardedHandlers = empty; + node.finalizer = this.eat(tt._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 === tt._switch ? "switch" : null; + this.labels.push({ name: maybeName, kind: kind }); + 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(tt.braceL); + while (!this.eat(tt.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(tt.semi); + node.test = this.type === tt.semi ? null : this.parseExpression(); + this.expect(tt.semi); + node.update = this.type === tt.parenR ? null : this.parseExpression(); + this.expect(tt.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 === tt._in ? "ForInStatement" : "ForOfStatement"; + this.next(); + node.left = init; + node.right = this.parseExpression(); + this.expect(tt.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.keyword; + for (;;) { + var decl = this.startNode(); + this.parseVarHead(decl); + if (this.eat(tt.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (kind === tt._const && !(this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + this.unexpected(); + } else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._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(tt.comma)) break; + } + return node; +}; + +pp.parseVarHead = function (decl) { + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, true); +}; + +// Parse a function declaration or literal (depending on the +// `isStatement` parameter). + +pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync) { + this.initFunction(node, isAsync); + if (this.options.ecmaVersion >= 6) node.generator = this.eat(tt.star); + if (isStatement || this.type === tt.name) node.id = this.parseIdent(); + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody); + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); +}; + +pp.parseFunctionParams = function (node) { + this.expect(tt.parenL); + node.params = this.parseBindingList(tt.parenR, false, false); +}; + +// 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(); + classBody.body = []; + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { + if (this.eat(tt.semi)) continue; + if (this.type === tt.at) { + this.decorators.push(this.parseDecorator()); + continue; + } + var method = this.startNode(); + this.takeDecorators(method); + var isGenerator = this.eat(tt.star), + isAsync = false; + this.parsePropertyName(method); + if (this.type !== tt.parenL && !method.computed && method.key.type === "Identifier" && method.key.name === "static") { + if (isGenerator) this.unexpected(); + method["static"] = true; + isGenerator = this.eat(tt.star); + this.parsePropertyName(method); + } else { + method["static"] = false; + } + if (!isGenerator && method.key.type === "Identifier" && !method.computed && this.isClassProperty()) { + classBody.body.push(this.parseClassProperty(method)); + continue; + } + if (this.options.features["es7.asyncFunctions"] && this.type !== tt.parenL && !method.computed && method.key.type === "Identifier" && method.key.name === "async") { + isAsync = true; + this.parsePropertyName(method); + } + method.kind = "method"; + if (!method.computed && !isGenerator) { + if (method.key.type === "Identifier") { + if (this.type !== tt.parenL && (method.key.name === "get" || method.key.name === "set")) { + method.kind = method.key.name; + this.parsePropertyName(method); + } else if (!method["static"] && method.key.name === "constructor") { + method.kind = "constructor"; + } + } else if (!method["static"] && method.key.type === "Literal" && method.key.value === "constructor") { + method.kind = "constructor"; + } + } + if (method.kind === "constructor" && method.decorators) { + this.raise(method.start, "You can't attach decorators to a class constructor"); + } + this.parseClassMethod(classBody, method, isGenerator, isAsync); + } + if (this.decorators.length) { + this.raise(this.start, "You have trailing decorators with no method"); + } + node.body = this.finishNode(classBody, "ClassBody"); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); +}; + +pp.isClassProperty = function () { + return this.type === tt.eq || (this.type === tt.semi || this.canInsertSemicolon()); +}; + +pp.parseClassProperty = function (node) { + if (this.type === tt.eq) { + if (!this.options.features["es7.classProperties"]) this.unexpected(); + this.next(); + node.value = this.parseMaybeAssign(); + } else { + node.value = null; + } + this.semicolon(); + return this.finishNode(node, "ClassProperty"); +}; + +pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) { + method.value = this.parseMethod(isGenerator, isAsync); + classBody.body.push(this.finishNode(method, "MethodDefinition")); +}; + +pp.parseClassId = function (node, isStatement) { + node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null; +}; + +pp.parseClassSuper = function (node) { + node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null; +}; + +// Parses module export declaration. + +pp.parseExport = function (node) { + this.next(); + // export * from '...' + if (this.type === tt.star) { + var specifier = this.startNode(); + this.next(); + if (this.options.features["es7.exportExtensions"] && this.eatContextual("as")) { + specifier.exported = this.parseIdent(); + node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; + this.parseExportSpecifiersMaybe(node); + this.parseExportFrom(node); + } else { + this.parseExportFrom(node); + return this.finishNode(node, "ExportAllDeclaration"); + } + } else if (this.isExportDefaultSpecifier()) { + var specifier = this.startNode(); + specifier.exported = this.parseIdent(true); + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + if (this.type === tt.comma && this.lookahead().type === tt.star) { + this.expect(tt.comma); + var _specifier = this.startNode(); + this.expect(tt.star); + this.expectContextual("as"); + _specifier.exported = this.parseIdent(); + node.specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier")); + } else { + this.parseExportSpecifiersMaybe(node); + } + this.parseExportFrom(node); + } else if (this.eat(tt._default)) { + // export default ... + var expr = this.parseMaybeAssign(); + var needsSemi = true; + if (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(); + this.checkExport(node); + return this.finishNode(node, "ExportDefaultDeclaration"); + } else if (this.type.keyword || this.shouldParseExportDeclaration()) { + 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 === tt.string ? this.parseExprAtom() : this.unexpected(); + } else { + node.source = null; + } + this.semicolon(); + } + this.checkExport(node); + return this.finishNode(node, "ExportNamedDeclaration"); +}; + +pp.isExportDefaultSpecifier = function () { + if (this.type === tt.name) { + return this.value !== "type" && this.value !== "async"; + } + + if (this.type !== tt._default) { + return false; + } + + var lookahead = this.lookahead(); + return lookahead.type === tt.comma || lookahead.type === tt.name && lookahead.value === "from"; +}; + +pp.parseExportSpecifiersMaybe = function (node) { + if (this.eat(tt.comma)) { + node.specifiers = node.specifiers.concat(this.parseExportSpecifiers()); + } +}; + +pp.parseExportFrom = function (node) { + this.expectContextual("from"); + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); + this.semicolon(); + this.checkExport(node); +}; + +pp.shouldParseExportDeclaration = function () { + return this.options.features["es7.asyncFunctions"] && this.isContextual("async"); +}; + +pp.checkExport = function (node) { + if (this.decorators.length) { + var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); + if (!node.declaration || !isClass) { + this.raise(node.start, "You can only use decorators on an export when exporting a class"); + } + this.takeDecorators(node.declaration); + } +}; + +// Parses a comma-separated list of module exports. + +pp.parseExportSpecifiers = function () { + var nodes = [], + first = true; + // export { x, y as z } [from '...'] + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { + if (!first) { + this.expect(tt.comma); + if (this.afterTrailingComma(tt.braceR)) break; + } else first = false; + + var node = this.startNode(); + node.local = this.parseIdent(this.type === tt._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 === tt.string) { + node.specifiers = empty; + node.source = this.parseExprAtom(); + node.kind = ""; + } else { + node.specifiers = []; + this.parseImportSpecifiers(node); + this.expectContextual("from"); + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); + } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); +}; + +// Parses a comma-separated list of module imports. + +pp.parseImportSpecifiers = function (node) { + var first = true; + if (this.type === tt.name) { + // import defaultObj, { x, y as z } from '...' + var start = this.markPosition(); + node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(), start)); + if (!this.eat(tt.comma)) return; + } + if (this.type === tt.star) { + var specifier = this.startNode(); + this.next(); + this.expectContextual("as"); + specifier.local = this.parseIdent(); + this.checkLVal(specifier.local, true); + node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier")); + return; + } + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { + if (!first) { + this.expect(tt.comma); + if (this.afterTrailingComma(tt.braceR)) break; + } else first = false; + + var specifier = this.startNode(); + specifier.imported = this.parseIdent(true); + specifier.local = this.eatContextual("as") ? this.parseIdent() : specifier.imported; + this.checkLVal(specifier.local, true); + node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); + } +}; + +pp.parseImportSpecifierDefault = function (id, start) { + var node = this.startNodeAt(start); + node.local = id; + this.checkLVal(node.local, true); + return this.finishNode(node, "ImportDefaultSpecifier"); +}; +},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,module,exports){ +"use strict"; + +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + +exports.__esModule = true; +// The algorithm used to determine whether a regexp can appear at a +// given point in the program is loosely based on sweet.js' approach. +// See https://github.com/mozilla/sweet.js/wiki/design + +var Parser = require("./state").Parser; + +var tt = require("./tokentype").types; + +var lineBreak = require("./whitespace").lineBreak; + +var TokContext = exports.TokContext = function TokContext(token, isExpr, preserveSpace, override) { + _classCallCheck(this, TokContext); + + this.token = token; + this.isExpr = isExpr; + this.preserveSpace = preserveSpace; + this.override = override; +}; + +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 = Parser.prototype; + +pp.initialContext = function () { + return [types.b_stat]; +}; + +pp.braceIsBlock = function (prevType) { + var parent = undefined; + if (prevType === tt.colon && (parent = this.curContext()).token == "{") return !parent.isExpr; + if (prevType === tt._return) return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); + if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof) return true; + if (prevType == tt.braceL) return this.curContext() === types.b_stat; + return !this.exprAllowed; +}; + +pp.updateContext = function (prevType) { + var update = undefined, + type = this.type; + if (type.keyword && prevType == tt.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr; +}; + +// Token-specific context update code + +tt.parenR.updateContext = tt.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; + } +}; + +tt.braceL.updateContext = function (prevType) { + this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); + this.exprAllowed = true; +}; + +tt.dollarBraceL.updateContext = function () { + this.context.push(types.b_tmpl); + this.exprAllowed = true; +}; + +tt.parenL.updateContext = function (prevType) { + var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while; + this.context.push(statementParens ? types.p_stat : types.p_expr); + this.exprAllowed = true; +}; + +tt.incDec.updateContext = function () {}; + +tt._function.updateContext = function () { + if (this.curContext() !== types.b_stat) this.context.push(types.f_expr); + this.exprAllowed = false; +}; + +tt.backQuote.updateContext = function () { + if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); + this.exprAllowed = false; +}; + +// tokExprAllowed stays unchanged +},{"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,module,exports){ +"use strict"; + +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + +exports.__esModule = true; + +var _identifier = require("./identifier"); + +var isIdentifierStart = _identifier.isIdentifierStart; +var isIdentifierChar = _identifier.isIdentifierChar; + +var _tokentype = require("./tokentype"); + +var tt = _tokentype.types; +var keywordTypes = _tokentype.keywords; + +var Parser = require("./state").Parser; + +var SourceLocation = require("./location").SourceLocation; + +var _whitespace = require("./whitespace"); + +var lineBreak = _whitespace.lineBreak; +var lineBreakG = _whitespace.lineBreakG; +var isNewLine = _whitespace.isNewLine; +var nonASCIIwhitespace = _whitespace.nonASCIIwhitespace; + +// Object type used to represent tokens. Note that normally, tokens +// simply exist as properties on the parser object. This is only +// used for the onToken callback and the external tokenizer. + +var Token = exports.Token = function Token(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 SourceLocation(p, p.startLoc, p.endLoc); + if (p.options.ranges) this.range = [p.start, p.end]; +}; + +// ## Tokenizer + +var pp = Parser.prototype; + +// 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[Symbol.iterator] = function () { + var self = this; + return { next: function next() { + var token = self.getToken(); + return { + done: token.type === tt.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 !== tt.num && this.type !== tt.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(tt.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 (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 <= 55295 || code >= 57344) return code; + var next = this.input.charCodeAt(this.pos + 1); + return (code << 10) + next - 56613888; +}; + +pp.skipBlockComment = function () { + var startLoc = this.options.onComment && this.options.locations && 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) { + lineBreakG.lastIndex = start; + var match = undefined; + while ((match = 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.options.locations && this.curPosition()); +}; + +pp.skipLineComment = function (startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.options.locations && 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.options.locations && this.curPosition()); +}; + +// Called at the start of the parse and after every token. Skips +// whitespace and comments, and. + +pp.skipSpace = function () { + while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + if (ch === 32) { + // ' ' + ++this.pos; + } else if (ch === 13) { + ++this.pos; + var next = this.input.charCodeAt(this.pos); + if (next === 10) { + ++this.pos; + } + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + } else if (ch === 10 || ch === 8232 || ch === 8233) { + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + } else if (ch > 8 && ch < 14) { + ++this.pos; + } else if (ch === 47) { + // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 42) { + // '*' + this.skipBlockComment(); + } else if (next === 47) { + // '/' + this.skipLineComment(2); + } else break; + } else if (ch === 160) { + // '\xa0' + ++this.pos; + } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break; + } + } +}; + +// 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(tt.ellipsis); + } else { + ++this.pos; + return this.finishToken(tt.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(tt.assign, 2); + return this.finishOp(tt.slash, 1); +}; + +pp.readToken_mult_modulo = function (code) { + // '%*' + var type = code === 42 ? tt.star : tt.modulo; + var width = 1; + var next = this.input.charCodeAt(this.pos + 1); + + if (next === 42) { + // '*' + width++; + next = this.input.charCodeAt(this.pos + 2); + type = tt.exponent; + } + + if (next === 61) { + width++; + type = tt.assign; + } + + return this.finishOp(type, width); +}; + +pp.readToken_pipe_amp = function (code) { + // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2); + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1); +}; + +pp.readToken_caret = function () { + // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(tt.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 && lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken(); + } + return this.finishOp(tt.incDec, 2); + } + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(tt.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(tt.assign, size + 1); + return this.finishOp(tt.bitShift, size); + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) unexpected(); + // ` regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return -1 === s.indexOf(false) + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + , negate = false + , options = this.options + , negateOffset = 0 + + if (options.nonegate) return + + for ( var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === "!" + ; i ++) { + negate = !negate + negateOffset ++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) + options = this.options + else + options = {} + } + + pattern = typeof pattern === "undefined" + ? this.pattern : pattern + + if (typeof pattern === "undefined") { + throw new Error("undefined pattern") + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === "**") return GLOBSTAR + if (pattern === "") return "" + + var re = "" + , hasMagic = !!options.nocase + , escaping = false + // ? => one single character + , patternListStack = [] + , plType + , stateChar + , inClass = false + , reClassStart = -1 + , classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + , patternStart = pattern.charAt(0) === "." ? "" // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" + : "(?!\\.)" + , self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case "*": + re += star + hasMagic = true + break + case "?": + re += qmark + hasMagic = true + break + default: + re += "\\"+stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for ( var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i ++ ) { + + this.debug("%s\t%s %s %j", pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += "\\" + c + escaping = false + continue + } + + SWITCH: switch (c) { + case "/": + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case "\\": + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === "!" && i === classStart + 1) c = "^" + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case "(": + if (inClass) { + re += "(" + continue + } + + if (!stateChar) { + re += "\\(" + continue + } + + plType = stateChar + patternListStack.push({ type: plType + , start: i - 1 + , reStart: re.length }) + // negation is (?:(?!js)[^/]*) + re += stateChar === "!" ? "(?:(?!" : "(?:" + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ")": + if (inClass || !patternListStack.length) { + re += "\\)" + continue + } + + clearStateChar() + hasMagic = true + re += ")" + plType = patternListStack.pop().type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case "!": + re += "[^/]*?)" + break + case "?": + case "+": + case "*": re += plType + case "@": break // the default anyway + } + continue + + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|" + escaping = false + continue + } + + clearStateChar() + re += "|" + continue + + // these are mostly the same in regexp and glob + case "[": + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += "\\" + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case "]": + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += "\\" + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + new RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + "\\[" + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === "^" && inClass)) { + re += "\\" + } + + re += c + + } // switch + } // for + + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + var cs = pattern.substr(classStart + 1) + , sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + "\\[" + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + var pl + while (pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = "\\" + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + "|" + }) + + this.debug("tail=%j\n %s", tail, tail) + var t = pl.type === "*" ? star + : pl.type === "?" ? qmark + : "\\" + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + + t + "\\(" + + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += "\\\\" + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case ".": + case "[": + case "(": addPatternStart = true + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== "" && hasMagic) re = "(?=.)" + re + + if (addPatternStart) re = patternStart + re + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [ re, hasMagic ] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? "i" : "" + , regExp = new RegExp("^" + re + "$", flags) + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) return this.regexp = false + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + , flags = options.nocase ? "i" : "" + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === "string") ? regExpEscape(p) + : p._src + }).join("\\\/") + }).join("|") + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = "^(?:" + re + ")$" + + // can match anything, as long as it's not this. + if (this.negate) re = "^(?!" + re + ").*$" + + try { + return this.regexp = new RegExp(re, flags) + } catch (ex) { + return this.regexp = false + } +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug("match", f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === "" + + if (f === "/" && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (isWindows) + f = f.split("\\").join("/") + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, "split", f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, "set", set) + + // Find the basename of the path by looking for the last non-empty segment + var filename; + for (var i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (var i = 0, l = set.length; i < l; i ++) { + var pattern = set[i], file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug("matchOne", + { "this": this + , file: file + , pattern: pattern }) + + this.debug("matchOne", file.length, pattern.length) + + for ( var fi = 0 + , pi = 0 + , fl = file.length + , pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi ++, pi ++ ) { + + this.debug("matchOne loop") + var p = pattern[pi] + , f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + , pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for ( ; fi < fl; fi ++) { + if (file[fi] === "." || file[fi] === ".." || + (!options.dot && file[fi].charAt(0) === ".")) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + WHILE: while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', + file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === "." || swallowee === ".." || + (!options.dot && swallowee.charAt(0) === ".")) { + this.debug("dot detected!", file, fr, pattern, pr) + break WHILE + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr ++ + } + } + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug("\n>>> no match, partial?", file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === "string") { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug("string match", p, f, hit) + } else { + hit = f.match(p) + this.debug("pattern match", p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") + return emptyFileEnd + } + + // should be unreachable. + throw new Error("wtf?") +} + + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, "$1") +} + + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") +} + +}).call(this,require('_process')) +},{"_process":183,"brace-expansion":417}],417:[function(require,module,exports){ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = /^(.*,)+(.+)?$/.test(m.body); + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + + +},{"balanced-match":418,"concat-map":419}],418:[function(require,module,exports){ +module.exports = balanced; +function balanced(a, b, str) { + var bal = 0; + var m = {}; + var ended = false; + + for (var i = 0; i < str.length; i++) { + if (a == str.substr(i, a.length)) { + if (!('start' in m)) m.start = i; + bal++; + } + else if (b == str.substr(i, b.length) && 'start' in m) { + ended = true; + bal--; + if (!bal) { + m.end = i; + m.pre = str.substr(0, m.start); + m.body = (m.end - m.start > 1) + ? str.substring(m.start + a.length, m.end) + : ''; + m.post = str.slice(m.end + b.length); + return m; + } + } + } + + // if we opened more than we closed, find the one we closed + if (bal && ended) { + var start = m.start + a.length; + m = balanced(a, b, str.substr(start)); + if (m) { + m.start += start; + m.end += start; + m.pre = str.slice(0, start) + m.pre; + } + return m; + } +} + +},{}],419:[function(require,module,exports){ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +},{}],420:[function(require,module,exports){ +(function (process){ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +}; + +function win32(path) { + // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = !!device && device.charAt(1) !== ':'; + + // UNC paths are always absolute + return !!result[2] || isUnc; +}; + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; + +}).call(this,require('_process')) +},{"_process":183}],421:[function(require,module,exports){ +"use strict"; + +var originalObject = Object; +var originalDefProp = Object.defineProperty; +var originalCreate = Object.create; + +function defProp(obj, name, value) { + if (originalDefProp) try { + originalDefProp.call(originalObject, obj, name, { value: value }); + } catch (definePropertyIsBrokenInIE8) { + obj[name] = value; + } else { + obj[name] = value; + } +} + +// For functions that will be invoked using .call or .apply, we need to +// define those methods on the function objects themselves, rather than +// inheriting them from Function.prototype, so that a malicious or clumsy +// third party cannot interfere with the functionality of this module by +// redefining Function.prototype.call or .apply. +function makeSafeToCall(fun) { + if (fun) { + defProp(fun, "call", fun.call); + defProp(fun, "apply", fun.apply); + } + return fun; +} + +makeSafeToCall(originalDefProp); +makeSafeToCall(originalCreate); + +var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty); +var numToStr = makeSafeToCall(Number.prototype.toString); +var strSlice = makeSafeToCall(String.prototype.slice); + +var cloner = function(){}; +function create(prototype) { + if (originalCreate) { + return originalCreate.call(originalObject, prototype); + } + cloner.prototype = prototype || null; + return new cloner; +} + +var rand = Math.random; +var uniqueKeys = create(null); + +function makeUniqueKey() { + // Collisions are highly unlikely, but this module is in the business of + // making guarantees rather than safe bets. + do var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2)); + while (hasOwn.call(uniqueKeys, uniqueKey)); + return uniqueKeys[uniqueKey] = uniqueKey; +} + +function internString(str) { + var obj = {}; + obj[str] = true; + return Object.keys(obj)[0]; +} + +// External users might find this function useful, but it is not necessary +// for the typical use of this module. +defProp(exports, "makeUniqueKey", makeUniqueKey); + +// Object.getOwnPropertyNames is the only way to enumerate non-enumerable +// properties, so if we wrap it to ignore our secret keys, there should be +// no way (except guessing) to access those properties. +var originalGetOPNs = Object.getOwnPropertyNames; +Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + for (var names = originalGetOPNs(object), + src = 0, + dst = 0, + len = names.length; + src < len; + ++src) { + if (!hasOwn.call(uniqueKeys, names[src])) { + if (src > dst) { + names[dst] = names[src]; + } + ++dst; + } + } + names.length = dst; + return names; +}; + +function defaultCreatorFn(object) { + return create(null); +} + +function makeAccessor(secretCreatorFn) { + var brand = makeUniqueKey(); + var passkey = create(null); + + secretCreatorFn = secretCreatorFn || defaultCreatorFn; + + function register(object) { + var secret; // Created lazily. + + function vault(key, forget) { + // Only code that has access to the passkey can retrieve (or forget) + // the secret object. + if (key === passkey) { + return forget + ? secret = null + : secret || (secret = secretCreatorFn(object)); + } + } + + defProp(object, brand, vault); + } + + function accessor(object) { + if (!hasOwn.call(object, brand)) + register(object); + return object[brand](passkey); + } + + accessor.forget = function(object) { + if (hasOwn.call(object, brand)) + object[brand](passkey, true); + }; + + return accessor; +} + +defProp(exports, "makeAccessor", makeAccessor); + +},{}],422:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var types = require("ast-types"); +var isArray = types.builtInTypes.array; +var b = types.builders; +var n = types.namedTypes; +var leap = require("./leap"); +var meta = require("./meta"); +var util = require("./util"); +var hasOwn = Object.prototype.hasOwnProperty; + +function Emitter(contextId) { + assert.ok(this instanceof Emitter); + n.Identifier.assert(contextId); + + Object.defineProperties(this, { + // In order to make sure the context object does not collide with + // anything in the local scope, we might have to rename it, so we + // refer to it symbolically instead of just assuming that it will be + // called "context". + contextId: { value: contextId }, + + // An append-only list of Statements that grows each time this.emit is + // called. + listing: { value: [] }, + + // A sparse array whose keys correspond to locations in this.listing + // that have been marked as branch/jump targets. + marked: { value: [true] }, + + // The last location will be marked when this.getDispatchLoop is + // called. + finalLoc: { value: loc() }, + + // A list of all leap.TryEntry statements emitted. + tryEntries: { value: [] } + }); + + // The .leapManager property needs to be defined by a separate + // defineProperties call so that .finalLoc will be visible to the + // leap.LeapManager constructor. + Object.defineProperties(this, { + // Each time we evaluate the body of a loop, we tell this.leapManager + // to enter a nested loop context that determines the meaning of break + // and continue statements therein. + leapManager: { value: new leap.LeapManager(this) } + }); +} + +var Ep = Emitter.prototype; +exports.Emitter = Emitter; + +// Offsets into this.listing that could be used as targets for branches or +// jumps are represented as numeric Literal nodes. This representation has +// the amazingly convenient benefit of allowing the exact value of the +// location to be determined at any time, even after generating code that +// refers to the location. +function loc() { + return b.literal(-1); +} + +// Sets the exact value of the given location to the offset of the next +// Statement emitted. +Ep.mark = function(loc) { + n.Literal.assert(loc); + var index = this.listing.length; + if (loc.value === -1) { + loc.value = index; + } else { + // Locations can be marked redundantly, but their values cannot change + // once set the first time. + assert.strictEqual(loc.value, index); + } + this.marked[index] = true; + return loc; +}; + +Ep.emit = function(node) { + if (n.Expression.check(node)) + node = b.expressionStatement(node); + n.Statement.assert(node); + this.listing.push(node); +}; + +// Shorthand for emitting assignment statements. This will come in handy +// for assignments to temporary variables. +Ep.emitAssign = function(lhs, rhs) { + this.emit(this.assign(lhs, rhs)); + return lhs; +}; + +// Shorthand for an assignment statement. +Ep.assign = function(lhs, rhs) { + return b.expressionStatement( + b.assignmentExpression("=", lhs, rhs)); +}; + +// Convenience function for generating expressions like context.next, +// context.sent, and context.rval. +Ep.contextProperty = function(name, computed) { + return b.memberExpression( + this.contextId, + computed ? b.literal(name) : b.identifier(name), + !!computed + ); +}; + +var volatileContextPropertyNames = { + prev: true, + next: true, + sent: true, + rval: true +}; + +// A "volatile" context property is a MemberExpression like context.sent +// that should probably be stored in a temporary variable when there's a +// possibility the property will get overwritten. +Ep.isVolatileContextProperty = function(expr) { + if (n.MemberExpression.check(expr)) { + if (expr.computed) { + // If it's a computed property such as context[couldBeAnything], + // assume the worst in terms of volatility. + return true; + } + + if (n.Identifier.check(expr.object) && + n.Identifier.check(expr.property) && + expr.object.name === this.contextId.name && + hasOwn.call(volatileContextPropertyNames, + expr.property.name)) { + return true; + } + } + + return false; +}; + +// Shorthand for setting context.rval and jumping to `context.stop()`. +Ep.stop = function(rval) { + if (rval) { + this.setReturnValue(rval); + } + + this.jump(this.finalLoc); +}; + +Ep.setReturnValue = function(valuePath) { + n.Expression.assert(valuePath.value); + + this.emitAssign( + this.contextProperty("rval"), + this.explodeExpression(valuePath) + ); +}; + +Ep.clearPendingException = function(tryLoc, assignee) { + n.Literal.assert(tryLoc); + + var catchCall = b.callExpression( + this.contextProperty("catch", true), + [tryLoc] + ); + + if (assignee) { + this.emitAssign(assignee, catchCall); + } else { + this.emit(catchCall); + } +}; + +// Emits code for an unconditional jump to the given location, even if the +// exact value of the location is not yet known. +Ep.jump = function(toLoc) { + this.emitAssign(this.contextProperty("next"), toLoc); + this.emit(b.breakStatement()); +}; + +// Conditional jump. +Ep.jumpIf = function(test, toLoc) { + n.Expression.assert(test); + n.Literal.assert(toLoc); + + this.emit(b.ifStatement( + test, + b.blockStatement([ + this.assign(this.contextProperty("next"), toLoc), + b.breakStatement() + ]) + )); +}; + +// Conditional jump, with the condition negated. +Ep.jumpIfNot = function(test, toLoc) { + n.Expression.assert(test); + n.Literal.assert(toLoc); + + var negatedTest; + if (n.UnaryExpression.check(test) && + test.operator === "!") { + // Avoid double negation. + negatedTest = test.argument; + } else { + negatedTest = b.unaryExpression("!", test); + } + + this.emit(b.ifStatement( + negatedTest, + b.blockStatement([ + this.assign(this.contextProperty("next"), toLoc), + b.breakStatement() + ]) + )); +}; + +// Returns a unique MemberExpression that can be used to store and +// retrieve temporary values. Since the object of the member expression is +// the context object, which is presumed to coexist peacefully with all +// other local variables, and since we just increment `nextTempId` +// monotonically, uniqueness is assured. +var nextTempId = 0; +Ep.makeTempVar = function() { + return this.contextProperty("t" + nextTempId++); +}; + +Ep.getContextFunction = function(id) { + var func = b.functionExpression( + id || null/*Anonymous*/, + [this.contextId], + b.blockStatement([this.getDispatchLoop()]), + false, // Not a generator anymore! + false // Nor an expression. + ); + func._aliasFunction = true; + return func; +}; + +// Turns this.listing into a loop of the form +// +// while (1) switch (context.next) { +// case 0: +// ... +// case n: +// return context.stop(); +// } +// +// Each marked location in this.listing will correspond to one generated +// case statement. +Ep.getDispatchLoop = function() { + var self = this; + var cases = []; + var current; + + // If we encounter a break, continue, or return statement in a switch + // case, we can skip the rest of the statements until the next case. + var alreadyEnded = false; + + self.listing.forEach(function(stmt, i) { + if (self.marked.hasOwnProperty(i)) { + cases.push(b.switchCase( + b.literal(i), + current = [])); + alreadyEnded = false; + } + + if (!alreadyEnded) { + current.push(stmt); + if (isSwitchCaseEnder(stmt)) + alreadyEnded = true; + } + }); + + // Now that we know how many statements there will be in this.listing, + // we can finally resolve this.finalLoc.value. + this.finalLoc.value = this.listing.length; + + cases.push( + b.switchCase(this.finalLoc, [ + // Intentionally fall through to the "end" case... + ]), + + // So that the runtime can jump to the final location without having + // to know its offset, we provide the "end" case as a synonym. + b.switchCase(b.literal("end"), [ + // This will check/clear both context.thrown and context.rval. + b.returnStatement( + b.callExpression(this.contextProperty("stop"), []) + ) + ]) + ); + + return b.whileStatement( + b.literal(1), + b.switchStatement( + b.assignmentExpression( + "=", + this.contextProperty("prev"), + this.contextProperty("next") + ), + cases + ) + ); +}; + +// See comment above re: alreadyEnded. +function isSwitchCaseEnder(stmt) { + return n.BreakStatement.check(stmt) + || n.ContinueStatement.check(stmt) + || n.ReturnStatement.check(stmt) + || n.ThrowStatement.check(stmt); +} + +Ep.getTryLocsList = function() { + if (this.tryEntries.length === 0) { + // To avoid adding a needless [] to the majority of runtime.wrap + // argument lists, force the caller to handle this case specially. + return null; + } + + var lastLocValue = 0; + + return b.arrayExpression( + this.tryEntries.map(function(tryEntry) { + var thisLocValue = tryEntry.firstLoc.value; + assert.ok(thisLocValue >= lastLocValue, "try entries out of order"); + lastLocValue = thisLocValue; + + var ce = tryEntry.catchEntry; + var fe = tryEntry.finallyEntry; + + var locs = [ + tryEntry.firstLoc, + // The null here makes a hole in the array. + ce ? ce.firstLoc : null + ]; + + if (fe) { + locs[2] = fe.firstLoc; + locs[3] = fe.afterLoc; + } + + return b.arrayExpression(locs); + }) + ); +}; + +// All side effects must be realized in order. + +// If any subexpression harbors a leap, all subexpressions must be +// neutered of side effects. + +// No destructive modification of AST nodes. + +Ep.explode = function(path, ignoreResult) { + assert.ok(path instanceof types.NodePath); + + var node = path.value; + var self = this; + + n.Node.assert(node); + + if (n.Statement.check(node)) + return self.explodeStatement(path); + + if (n.Expression.check(node)) + return self.explodeExpression(path, ignoreResult); + + if (n.Declaration.check(node)) + throw getDeclError(node); + + switch (node.type) { + case "Program": + return path.get("body").map( + self.explodeStatement, + self + ); + + case "VariableDeclarator": + throw getDeclError(node); + + // These node types should be handled by their parent nodes + // (ObjectExpression, SwitchStatement, and TryStatement, respectively). + case "Property": + case "SwitchCase": + case "CatchClause": + throw new Error( + node.type + " nodes should be handled by their parents"); + + default: + throw new Error( + "unknown Node of type " + + JSON.stringify(node.type)); + } +}; + +function getDeclError(node) { + return new Error( + "all declarations should have been transformed into " + + "assignments before the Exploder began its work: " + + JSON.stringify(node)); +} + +Ep.explodeStatement = function(path, labelId) { + assert.ok(path instanceof types.NodePath); + + var stmt = path.value; + var self = this; + + n.Statement.assert(stmt); + + if (labelId) { + n.Identifier.assert(labelId); + } else { + labelId = null; + } + + // Explode BlockStatement nodes even if they do not contain a yield, + // because we don't want or need the curly braces. + if (n.BlockStatement.check(stmt)) { + return path.get("body").each( + self.explodeStatement, + self + ); + } + + if (!meta.containsLeap(stmt)) { + // Technically we should be able to avoid emitting the statement + // altogether if !meta.hasSideEffects(stmt), but that leads to + // confusing generated code (for instance, `while (true) {}` just + // disappears) and is probably a more appropriate job for a dedicated + // dead code elimination pass. + self.emit(stmt); + return; + } + + switch (stmt.type) { + case "ExpressionStatement": + self.explodeExpression(path.get("expression"), true); + break; + + case "LabeledStatement": + var after = loc(); + + // Did you know you can break from any labeled block statement or + // control structure? Well, you can! Note: when a labeled loop is + // encountered, the leap.LabeledEntry created here will immediately + // enclose a leap.LoopEntry on the leap manager's stack, and both + // entries will have the same label. Though this works just fine, it + // may seem a bit redundant. In theory, we could check here to + // determine if stmt knows how to handle its own label; for example, + // stmt happens to be a WhileStatement and so we know it's going to + // establish its own LoopEntry when we explode it (below). Then this + // LabeledEntry would be unnecessary. Alternatively, we might be + // tempted not to pass stmt.label down into self.explodeStatement, + // because we've handled the label here, but that's a mistake because + // labeled loops may contain labeled continue statements, which is not + // something we can handle in this generic case. All in all, I think a + // little redundancy greatly simplifies the logic of this case, since + // it's clear that we handle all possible LabeledStatements correctly + // here, regardless of whether they interact with the leap manager + // themselves. Also remember that labels and break/continue-to-label + // statements are rare, and all of this logic happens at transform + // time, so it has no additional runtime cost. + self.leapManager.withEntry( + new leap.LabeledEntry(after, stmt.label), + function() { + self.explodeStatement(path.get("body"), stmt.label); + } + ); + + self.mark(after); + + break; + + case "WhileStatement": + var before = loc(); + var after = loc(); + + self.mark(before); + self.jumpIfNot(self.explodeExpression(path.get("test")), after); + self.leapManager.withEntry( + new leap.LoopEntry(after, before, labelId), + function() { self.explodeStatement(path.get("body")); } + ); + self.jump(before); + self.mark(after); + + break; + + case "DoWhileStatement": + var first = loc(); + var test = loc(); + var after = loc(); + + self.mark(first); + self.leapManager.withEntry( + new leap.LoopEntry(after, test, labelId), + function() { self.explode(path.get("body")); } + ); + self.mark(test); + self.jumpIf(self.explodeExpression(path.get("test")), first); + self.mark(after); + + break; + + case "ForStatement": + var head = loc(); + var update = loc(); + var after = loc(); + + if (stmt.init) { + // We pass true here to indicate that if stmt.init is an expression + // then we do not care about its result. + self.explode(path.get("init"), true); + } + + self.mark(head); + + if (stmt.test) { + self.jumpIfNot(self.explodeExpression(path.get("test")), after); + } else { + // No test means continue unconditionally. + } + + self.leapManager.withEntry( + new leap.LoopEntry(after, update, labelId), + function() { self.explodeStatement(path.get("body")); } + ); + + self.mark(update); + + if (stmt.update) { + // We pass true here to indicate that if stmt.update is an + // expression then we do not care about its result. + self.explode(path.get("update"), true); + } + + self.jump(head); + + self.mark(after); + + break; + + case "ForInStatement": + n.Identifier.assert(stmt.left); + + var head = loc(); + var after = loc(); + + var keyIterNextFn = self.makeTempVar(); + self.emitAssign( + keyIterNextFn, + b.callExpression( + util.runtimeProperty("keys"), + [self.explodeExpression(path.get("right"))] + ) + ); + + self.mark(head); + + var keyInfoTmpVar = self.makeTempVar(); + self.jumpIf( + b.memberExpression( + b.assignmentExpression( + "=", + keyInfoTmpVar, + b.callExpression(keyIterNextFn, []) + ), + b.identifier("done"), + false + ), + after + ); + + self.emitAssign( + stmt.left, + b.memberExpression( + keyInfoTmpVar, + b.identifier("value"), + false + ) + ); + + self.leapManager.withEntry( + new leap.LoopEntry(after, head, labelId), + function() { self.explodeStatement(path.get("body")); } + ); + + self.jump(head); + + self.mark(after); + + break; + + case "BreakStatement": + self.emitAbruptCompletion({ + type: "break", + target: self.leapManager.getBreakLoc(stmt.label) + }); + + break; + + case "ContinueStatement": + self.emitAbruptCompletion({ + type: "continue", + target: self.leapManager.getContinueLoc(stmt.label) + }); + + break; + + case "SwitchStatement": + // Always save the discriminant into a temporary variable in case the + // test expressions overwrite values like context.sent. + var disc = self.emitAssign( + self.makeTempVar(), + self.explodeExpression(path.get("discriminant")) + ); + + var after = loc(); + var defaultLoc = loc(); + var condition = defaultLoc; + var caseLocs = []; + + // If there are no cases, .cases might be undefined. + var cases = stmt.cases || []; + + for (var i = cases.length - 1; i >= 0; --i) { + var c = cases[i]; + n.SwitchCase.assert(c); + + if (c.test) { + condition = b.conditionalExpression( + b.binaryExpression("===", disc, c.test), + caseLocs[i] = loc(), + condition + ); + } else { + caseLocs[i] = defaultLoc; + } + } + + self.jump(self.explodeExpression( + new types.NodePath(condition, path, "discriminant") + )); + + self.leapManager.withEntry( + new leap.SwitchEntry(after), + function() { + path.get("cases").each(function(casePath) { + var c = casePath.value; + var i = casePath.name; + + self.mark(caseLocs[i]); + + casePath.get("consequent").each( + self.explodeStatement, + self + ); + }); + } + ); + + self.mark(after); + if (defaultLoc.value === -1) { + self.mark(defaultLoc); + assert.strictEqual(after.value, defaultLoc.value); + } + + break; + + case "IfStatement": + var elseLoc = stmt.alternate && loc(); + var after = loc(); + + self.jumpIfNot( + self.explodeExpression(path.get("test")), + elseLoc || after + ); + + self.explodeStatement(path.get("consequent")); + + if (elseLoc) { + self.jump(after); + self.mark(elseLoc); + self.explodeStatement(path.get("alternate")); + } + + self.mark(after); + + break; + + case "ReturnStatement": + self.emitAbruptCompletion({ + type: "return", + value: self.explodeExpression(path.get("argument")) + }); + + break; + + case "WithStatement": + throw new Error( + node.type + " not supported in generator functions."); + + case "TryStatement": + var after = loc(); + + var handler = stmt.handler; + if (!handler && stmt.handlers) { + handler = stmt.handlers[0] || null; + } + + var catchLoc = handler && loc(); + var catchEntry = catchLoc && new leap.CatchEntry( + catchLoc, + handler.param + ); + + var finallyLoc = stmt.finalizer && loc(); + var finallyEntry = finallyLoc && + new leap.FinallyEntry(finallyLoc, after); + + var tryEntry = new leap.TryEntry( + self.getUnmarkedCurrentLoc(), + catchEntry, + finallyEntry + ); + + self.tryEntries.push(tryEntry); + self.updateContextPrevLoc(tryEntry.firstLoc); + + self.leapManager.withEntry(tryEntry, function() { + self.explodeStatement(path.get("block")); + + if (catchLoc) { + if (finallyLoc) { + // If we have both a catch block and a finally block, then + // because we emit the catch block first, we need to jump over + // it to the finally block. + self.jump(finallyLoc); + + } else { + // If there is no finally block, then we need to jump over the + // catch block to the fall-through location. + self.jump(after); + } + + self.updateContextPrevLoc(self.mark(catchLoc)); + + var bodyPath = path.get("handler", "body"); + var safeParam = self.makeTempVar(); + self.clearPendingException(tryEntry.firstLoc, safeParam); + + var catchScope = bodyPath.scope; + var catchParamName = handler.param.name; + n.CatchClause.assert(catchScope.node); + assert.strictEqual(catchScope.lookup(catchParamName), catchScope); + + types.visit(bodyPath, { + visitIdentifier: function(path) { + if (util.isReference(path, catchParamName) && + path.scope.lookup(catchParamName) === catchScope) { + return safeParam; + } + + this.traverse(path); + }, + + visitFunction: function(path) { + if (path.scope.declares(catchParamName)) { + // Don't descend into nested scopes that shadow the catch + // parameter with their own declarations. This isn't + // logically necessary because of the path.scope.lookup we + // do in visitIdentifier, but it saves time. + return false; + } + + this.traverse(path); + } + }); + + self.leapManager.withEntry(catchEntry, function() { + self.explodeStatement(bodyPath); + }); + } + + if (finallyLoc) { + self.updateContextPrevLoc(self.mark(finallyLoc)); + + self.leapManager.withEntry(finallyEntry, function() { + self.explodeStatement(path.get("finalizer")); + }); + + self.emit(b.returnStatement(b.callExpression( + self.contextProperty("finish"), + [finallyEntry.firstLoc] + ))); + } + }); + + self.mark(after); + + break; + + case "ThrowStatement": + self.emit(b.throwStatement( + self.explodeExpression(path.get("argument")) + )); + + break; + + default: + throw new Error( + "unknown Statement of type " + + JSON.stringify(stmt.type)); + } +}; + +Ep.emitAbruptCompletion = function(record) { + if (!isValidCompletion(record)) { + assert.ok( + false, + "invalid completion record: " + + JSON.stringify(record) + ); + } + + assert.notStrictEqual( + record.type, "normal", + "normal completions are not abrupt" + ); + + var abruptArgs = [b.literal(record.type)]; + + if (record.type === "break" || + record.type === "continue") { + n.Literal.assert(record.target); + abruptArgs[1] = record.target; + } else if (record.type === "return" || + record.type === "throw") { + if (record.value) { + n.Expression.assert(record.value); + abruptArgs[1] = record.value; + } + } + + this.emit( + b.returnStatement( + b.callExpression( + this.contextProperty("abrupt"), + abruptArgs + ) + ) + ); +}; + +function isValidCompletion(record) { + var type = record.type; + + if (type === "normal") { + return !hasOwn.call(record, "target"); + } + + if (type === "break" || + type === "continue") { + return !hasOwn.call(record, "value") + && n.Literal.check(record.target); + } + + if (type === "return" || + type === "throw") { + return hasOwn.call(record, "value") + && !hasOwn.call(record, "target"); + } + + return false; +} + + +// Not all offsets into emitter.listing are potential jump targets. For +// example, execution typically falls into the beginning of a try block +// without jumping directly there. This method returns the current offset +// without marking it, so that a switch case will not necessarily be +// generated for this offset (I say "not necessarily" because the same +// location might end up being marked in the process of emitting other +// statements). There's no logical harm in marking such locations as jump +// targets, but minimizing the number of switch cases keeps the generated +// code shorter. +Ep.getUnmarkedCurrentLoc = function() { + return b.literal(this.listing.length); +}; + +// The context.prev property takes the value of context.next whenever we +// evaluate the switch statement discriminant, which is generally good +// enough for tracking the last location we jumped to, but sometimes +// context.prev needs to be more precise, such as when we fall +// successfully out of a try block and into a finally block without +// jumping. This method exists to update context.prev to the freshest +// available location. If we were implementing a full interpreter, we +// would know the location of the current instruction with complete +// precision at all times, but we don't have that luxury here, as it would +// be costly and verbose to set context.prev before every statement. +Ep.updateContextPrevLoc = function(loc) { + if (loc) { + n.Literal.assert(loc); + + if (loc.value === -1) { + // If an uninitialized location literal was passed in, set its value + // to the current this.listing.length. + loc.value = this.listing.length; + } else { + // Otherwise assert that the location matches the current offset. + assert.strictEqual(loc.value, this.listing.length); + } + + } else { + loc = this.getUnmarkedCurrentLoc(); + } + + // Make sure context.prev is up to date in case we fell into this try + // statement without jumping to it. TODO Consider avoiding this + // assignment when we know control must have jumped here. + this.emitAssign(this.contextProperty("prev"), loc); +}; + +Ep.explodeExpression = function(path, ignoreResult) { + assert.ok(path instanceof types.NodePath); + + var expr = path.value; + if (expr) { + n.Expression.assert(expr); + } else { + return expr; + } + + var self = this; + var result; // Used optionally by several cases below. + + function finish(expr) { + n.Expression.assert(expr); + if (ignoreResult) { + self.emit(expr); + } else { + return expr; + } + } + + // If the expression does not contain a leap, then we either emit the + // expression as a standalone statement or return it whole. + if (!meta.containsLeap(expr)) { + return finish(expr); + } + + // If any child contains a leap (such as a yield or labeled continue or + // break statement), then any sibling subexpressions will almost + // certainly have to be exploded in order to maintain the order of their + // side effects relative to the leaping child(ren). + var hasLeapingChildren = meta.containsLeap.onlyChildren(expr); + + // In order to save the rest of explodeExpression from a combinatorial + // trainwreck of special cases, explodeViaTempVar is responsible for + // deciding when a subexpression needs to be "exploded," which is my + // very technical term for emitting the subexpression as an assignment + // to a temporary variable and the substituting the temporary variable + // for the original subexpression. Think of exploded view diagrams, not + // Michael Bay movies. The point of exploding subexpressions is to + // control the precise order in which the generated code realizes the + // side effects of those subexpressions. + function explodeViaTempVar(tempVar, childPath, ignoreChildResult) { + assert.ok(childPath instanceof types.NodePath); + + assert.ok( + !ignoreChildResult || !tempVar, + "Ignoring the result of a child expression but forcing it to " + + "be assigned to a temporary variable?" + ); + + var result = self.explodeExpression(childPath, ignoreChildResult); + + if (ignoreChildResult) { + // Side effects already emitted above. + + } else if (tempVar || (hasLeapingChildren && + (self.isVolatileContextProperty(result) || + meta.hasSideEffects(result)))) { + // If tempVar was provided, then the result will always be assigned + // to it, even if the result does not otherwise need to be assigned + // to a temporary variable. When no tempVar is provided, we have + // the flexibility to decide whether a temporary variable is really + // necessary. In general, temporary assignment is required only + // when some other child contains a leap and the child in question + // is a context property like $ctx.sent that might get overwritten + // or an expression with side effects that need to occur in proper + // sequence relative to the leap. + result = self.emitAssign( + tempVar || self.makeTempVar(), + result + ); + } + return result; + } + + // If ignoreResult is true, then we must take full responsibility for + // emitting the expression with all its side effects, and we should not + // return a result. + + switch (expr.type) { + case "MemberExpression": + return finish(b.memberExpression( + self.explodeExpression(path.get("object")), + expr.computed + ? explodeViaTempVar(null, path.get("property")) + : expr.property, + expr.computed + )); + + case "CallExpression": + var oldCalleePath = path.get("callee"); + var newCallee = self.explodeExpression(oldCalleePath); + + // If the callee was not previously a MemberExpression, then the + // CallExpression was "unqualified," meaning its `this` object should + // be the global object. If the exploded expression has become a + // MemberExpression, then we need to force it to be unqualified by + // using the (0, object.property)(...) trick; otherwise, it will + // receive the object of the MemberExpression as its `this` object. + if (!n.MemberExpression.check(oldCalleePath.node) && + n.MemberExpression.check(newCallee)) { + newCallee = b.sequenceExpression([ + b.literal(0), + newCallee + ]); + } + + return finish(b.callExpression( + newCallee, + path.get("arguments").map(function(argPath) { + return explodeViaTempVar(null, argPath); + }) + )); + + case "NewExpression": + return finish(b.newExpression( + explodeViaTempVar(null, path.get("callee")), + path.get("arguments").map(function(argPath) { + return explodeViaTempVar(null, argPath); + }) + )); + + case "ObjectExpression": + return finish(b.objectExpression( + path.get("properties").map(function(propPath) { + return b.property( + propPath.value.kind, + propPath.value.key, + explodeViaTempVar(null, propPath.get("value")) + ); + }) + )); + + case "ArrayExpression": + return finish(b.arrayExpression( + path.get("elements").map(function(elemPath) { + return explodeViaTempVar(null, elemPath); + }) + )); + + case "SequenceExpression": + var lastIndex = expr.expressions.length - 1; + + path.get("expressions").each(function(exprPath) { + if (exprPath.name === lastIndex) { + result = self.explodeExpression(exprPath, ignoreResult); + } else { + self.explodeExpression(exprPath, true); + } + }); + + return result; + + case "LogicalExpression": + var after = loc(); + + if (!ignoreResult) { + result = self.makeTempVar(); + } + + var left = explodeViaTempVar(result, path.get("left")); + + if (expr.operator === "&&") { + self.jumpIfNot(left, after); + } else { + assert.strictEqual(expr.operator, "||"); + self.jumpIf(left, after); + } + + explodeViaTempVar(result, path.get("right"), ignoreResult); + + self.mark(after); + + return result; + + case "ConditionalExpression": + var elseLoc = loc(); + var after = loc(); + var test = self.explodeExpression(path.get("test")); + + self.jumpIfNot(test, elseLoc); + + if (!ignoreResult) { + result = self.makeTempVar(); + } + + explodeViaTempVar(result, path.get("consequent"), ignoreResult); + self.jump(after); + + self.mark(elseLoc); + explodeViaTempVar(result, path.get("alternate"), ignoreResult); + + self.mark(after); + + return result; + + case "UnaryExpression": + return finish(b.unaryExpression( + expr.operator, + // Can't (and don't need to) break up the syntax of the argument. + // Think about delete a[b]. + self.explodeExpression(path.get("argument")), + !!expr.prefix + )); + + case "BinaryExpression": + return finish(b.binaryExpression( + expr.operator, + explodeViaTempVar(null, path.get("left")), + explodeViaTempVar(null, path.get("right")) + )); + + case "AssignmentExpression": + return finish(b.assignmentExpression( + expr.operator, + self.explodeExpression(path.get("left")), + self.explodeExpression(path.get("right")) + )); + + case "UpdateExpression": + return finish(b.updateExpression( + expr.operator, + self.explodeExpression(path.get("argument")), + expr.prefix + )); + + case "YieldExpression": + var after = loc(); + var arg = expr.argument && self.explodeExpression(path.get("argument")); + + if (arg && expr.delegate) { + var result = self.makeTempVar(); + + self.emit(b.returnStatement(b.callExpression( + self.contextProperty("delegateYield"), [ + arg, + b.literal(result.property.name), + after + ] + ))); + + self.mark(after); + + return result; + } + + self.emitAssign(self.contextProperty("next"), after); + self.emit(b.returnStatement(arg || null)); + self.mark(after); + + return self.contextProperty("sent"); + + default: + throw new Error( + "unknown Expression of type " + + JSON.stringify(expr.type)); + } +}; + +},{"./leap":424,"./meta":425,"./util":426,"assert":173,"ast-types":171}],423:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var types = require("ast-types"); +var n = types.namedTypes; +var b = types.builders; +var hasOwn = Object.prototype.hasOwnProperty; + +// The hoist function takes a FunctionExpression or FunctionDeclaration +// and replaces any Declaration nodes in its body with assignments, then +// returns a VariableDeclaration containing just the names of the removed +// declarations. +exports.hoist = function(funPath) { + assert.ok(funPath instanceof types.NodePath); + n.Function.assert(funPath.value); + + var vars = {}; + + function varDeclToExpr(vdec, includeIdentifiers) { + n.VariableDeclaration.assert(vdec); + var exprs = []; + + vdec.declarations.forEach(function(dec) { + vars[dec.id.name] = dec.id; + + if (dec.init) { + exprs.push(b.assignmentExpression( + "=", dec.id, dec.init + )); + } else if (includeIdentifiers) { + exprs.push(dec.id); + } + }); + + if (exprs.length === 0) + return null; + + if (exprs.length === 1) + return exprs[0]; + + return b.sequenceExpression(exprs); + } + + types.visit(funPath.get("body"), { + visitVariableDeclaration: function(path) { + var expr = varDeclToExpr(path.value, false); + if (expr === null) { + path.replace(); + } else { + // We don't need to traverse this expression any further because + // there can't be any new declarations inside an expression. + return b.expressionStatement(expr); + } + + // Since the original node has been either removed or replaced, + // avoid traversing it any further. + return false; + }, + + visitForStatement: function(path) { + var init = path.value.init; + if (n.VariableDeclaration.check(init)) { + path.get("init").replace(varDeclToExpr(init, false)); + } + this.traverse(path); + }, + + visitForInStatement: function(path) { + var left = path.value.left; + if (n.VariableDeclaration.check(left)) { + path.get("left").replace(varDeclToExpr(left, true)); + } + this.traverse(path); + }, + + visitFunctionDeclaration: function(path) { + var node = path.value; + vars[node.id.name] = node.id; + + var parentNode = path.parent.node; + var assignment = b.expressionStatement( + b.assignmentExpression( + "=", + node.id, + b.functionExpression( + node.id, + node.params, + node.body, + node.generator, + node.expression + ) + ) + ); + + if (n.BlockStatement.check(path.parent.node)) { + // Insert the assignment form before the first statement in the + // enclosing block. + path.parent.get("body").unshift(assignment); + + // Remove the function declaration now that we've inserted the + // equivalent assignment form at the beginning of the block. + path.replace(); + + } else { + // If the parent node is not a block statement, then we can just + // replace the declaration with the equivalent assignment form + // without worrying about hoisting it. + path.replace(assignment); + } + + // Don't hoist variables out of inner functions. + return false; + }, + + visitFunctionExpression: function(path) { + // Don't descend into nested function expressions. + return false; + } + }); + + var paramNames = {}; + funPath.get("params").each(function(paramPath) { + var param = paramPath.value; + if (n.Identifier.check(param)) { + paramNames[param.name] = param; + } else { + // Variables declared by destructuring parameter patterns will be + // harmlessly re-declared. + } + }); + + var declarations = []; + + Object.keys(vars).forEach(function(name) { + if (!hasOwn.call(paramNames, name)) { + declarations.push(b.variableDeclarator(vars[name], null)); + } + }); + + if (declarations.length === 0) { + return null; // Be sure to handle this case! + } + + return b.variableDeclaration("var", declarations); +}; + +},{"assert":173,"ast-types":171}],424:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var types = require("ast-types"); +var n = types.namedTypes; +var b = types.builders; +var inherits = require("util").inherits; +var hasOwn = Object.prototype.hasOwnProperty; + +function Entry() { + assert.ok(this instanceof Entry); +} + +function FunctionEntry(returnLoc) { + Entry.call(this); + n.Literal.assert(returnLoc); + this.returnLoc = returnLoc; +} + +inherits(FunctionEntry, Entry); +exports.FunctionEntry = FunctionEntry; + +function LoopEntry(breakLoc, continueLoc, label) { + Entry.call(this); + + n.Literal.assert(breakLoc); + n.Literal.assert(continueLoc); + + if (label) { + n.Identifier.assert(label); + } else { + label = null; + } + + this.breakLoc = breakLoc; + this.continueLoc = continueLoc; + this.label = label; +} + +inherits(LoopEntry, Entry); +exports.LoopEntry = LoopEntry; + +function SwitchEntry(breakLoc) { + Entry.call(this); + n.Literal.assert(breakLoc); + this.breakLoc = breakLoc; +} + +inherits(SwitchEntry, Entry); +exports.SwitchEntry = SwitchEntry; + +function TryEntry(firstLoc, catchEntry, finallyEntry) { + Entry.call(this); + + n.Literal.assert(firstLoc); + + if (catchEntry) { + assert.ok(catchEntry instanceof CatchEntry); + } else { + catchEntry = null; + } + + if (finallyEntry) { + assert.ok(finallyEntry instanceof FinallyEntry); + } else { + finallyEntry = null; + } + + // Have to have one or the other (or both). + assert.ok(catchEntry || finallyEntry); + + this.firstLoc = firstLoc; + this.catchEntry = catchEntry; + this.finallyEntry = finallyEntry; +} + +inherits(TryEntry, Entry); +exports.TryEntry = TryEntry; + +function CatchEntry(firstLoc, paramId) { + Entry.call(this); + + n.Literal.assert(firstLoc); + n.Identifier.assert(paramId); + + this.firstLoc = firstLoc; + this.paramId = paramId; +} + +inherits(CatchEntry, Entry); +exports.CatchEntry = CatchEntry; + +function FinallyEntry(firstLoc, afterLoc) { + Entry.call(this); + n.Literal.assert(firstLoc); + n.Literal.assert(afterLoc); + this.firstLoc = firstLoc; + this.afterLoc = afterLoc; +} + +inherits(FinallyEntry, Entry); +exports.FinallyEntry = FinallyEntry; + +function LabeledEntry(breakLoc, label) { + Entry.call(this); + + n.Literal.assert(breakLoc); + n.Identifier.assert(label); + + this.breakLoc = breakLoc; + this.label = label; +} + +inherits(LabeledEntry, Entry); +exports.LabeledEntry = LabeledEntry; + +function LeapManager(emitter) { + assert.ok(this instanceof LeapManager); + + var Emitter = require("./emit").Emitter; + assert.ok(emitter instanceof Emitter); + + this.emitter = emitter; + this.entryStack = [new FunctionEntry(emitter.finalLoc)]; +} + +var LMp = LeapManager.prototype; +exports.LeapManager = LeapManager; + +LMp.withEntry = function(entry, callback) { + assert.ok(entry instanceof Entry); + this.entryStack.push(entry); + try { + callback.call(this.emitter); + } finally { + var popped = this.entryStack.pop(); + assert.strictEqual(popped, entry); + } +}; + +LMp._findLeapLocation = function(property, label) { + for (var i = this.entryStack.length - 1; i >= 0; --i) { + var entry = this.entryStack[i]; + var loc = entry[property]; + if (loc) { + if (label) { + if (entry.label && + entry.label.name === label.name) { + return loc; + } + } else if (entry instanceof LabeledEntry) { + // Ignore LabeledEntry entries unless we are actually breaking to + // a label. + } else { + return loc; + } + } + } + + return null; +}; + +LMp.getBreakLoc = function(label) { + return this._findLeapLocation("breakLoc", label); +}; + +LMp.getContinueLoc = function(label) { + return this._findLeapLocation("continueLoc", label); +}; + +},{"./emit":422,"assert":173,"ast-types":171,"util":199}],425:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var m = require("private").makeAccessor(); +var types = require("ast-types"); +var isArray = types.builtInTypes.array; +var n = types.namedTypes; +var hasOwn = Object.prototype.hasOwnProperty; + +function makePredicate(propertyName, knownTypes) { + function onlyChildren(node) { + n.Node.assert(node); + + // Assume no side effects until we find out otherwise. + var result = false; + + function check(child) { + if (result) { + // Do nothing. + } else if (isArray.check(child)) { + child.some(check); + } else if (n.Node.check(child)) { + assert.strictEqual(result, false); + result = predicate(child); + } + return result; + } + + types.eachField(node, function(name, child) { + check(child); + }); + + return result; + } + + function predicate(node) { + n.Node.assert(node); + + var meta = m(node); + if (hasOwn.call(meta, propertyName)) + return meta[propertyName]; + + // Certain types are "opaque," which means they have no side + // effects or leaps and we don't care about their subexpressions. + if (hasOwn.call(opaqueTypes, node.type)) + return meta[propertyName] = false; + + if (hasOwn.call(knownTypes, node.type)) + return meta[propertyName] = true; + + return meta[propertyName] = onlyChildren(node); + } + + predicate.onlyChildren = onlyChildren; + + return predicate; +} + +var opaqueTypes = { + FunctionExpression: true +}; + +// These types potentially have side effects regardless of what side +// effects their subexpressions have. +var sideEffectTypes = { + CallExpression: true, // Anything could happen! + ForInStatement: true, // Modifies the key variable. + UnaryExpression: true, // Think delete. + BinaryExpression: true, // Might invoke .toString() or .valueOf(). + AssignmentExpression: true, // Side-effecting by definition. + UpdateExpression: true, // Updates are essentially assignments. + NewExpression: true // Similar to CallExpression. +}; + +// These types are the direct cause of all leaps in control flow. +var leapTypes = { + YieldExpression: true, + BreakStatement: true, + ContinueStatement: true, + ReturnStatement: true, + ThrowStatement: true +}; + +// All leap types are also side effect types. +for (var type in leapTypes) { + if (hasOwn.call(leapTypes, type)) { + sideEffectTypes[type] = leapTypes[type]; + } +} + +exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes); +exports.containsLeap = makePredicate("containsLeap", leapTypes); + +},{"assert":173,"ast-types":171,"private":421}],426:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var types = require("ast-types"); +var n = types.namedTypes; +var b = types.builders; +var hasOwn = Object.prototype.hasOwnProperty; + +exports.defaults = function(obj) { + var len = arguments.length; + var extension; + + for (var i = 1; i < len; ++i) { + if ((extension = arguments[i])) { + for (var key in extension) { + if (hasOwn.call(extension, key) && !hasOwn.call(obj, key)) { + obj[key] = extension[key]; + } + } + } + } + + return obj; +}; + +exports.runtimeProperty = function(name) { + return b.memberExpression( + b.identifier("regeneratorRuntime"), + b.identifier(name), + false + ); +}; + +// Inspired by the isReference function from ast-util: +// https://github.com/eventualbuddha/ast-util/blob/9bf91c5ce8/lib/index.js#L466-L506 +exports.isReference = function(path, name) { + var node = path.value; + + if (!n.Identifier.check(node)) { + return false; + } + + if (name && node.name !== name) { + return false; + } + + var parent = path.parent.value; + + switch (parent.type) { + case "VariableDeclarator": + return path.name === "init"; + + case "MemberExpression": + return path.name === "object" || ( + parent.computed && path.name === "property" + ); + + case "FunctionExpression": + case "FunctionDeclaration": + case "ArrowFunctionExpression": + if (path.name === "id") { + return false; + } + + if (parent.params === path.parentPath && + parent.params[path.name] === node) { + return false; + } + + return true; + + case "ClassDeclaration": + case "ClassExpression": + return path.name !== "id"; + + case "CatchClause": + return path.name !== "param"; + + case "Property": + case "MethodDefinition": + return path.name !== "key"; + + case "ImportSpecifier": + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "LabeledStatement": + return false; + + default: + return true; + } +}; + +},{"assert":173,"ast-types":171}],427:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var fs = require("fs"); +var types = require("ast-types"); +var n = types.namedTypes; +var b = types.builders; +var isArray = types.builtInTypes.array; +var isObject = types.builtInTypes.object; +var NodePath = types.NodePath; +var hoist = require("./hoist").hoist; +var Emitter = require("./emit").Emitter; +var runtimeProperty = require("./util").runtimeProperty; + +exports.transform = function transform(node, options) { + options = options || {}; + + var path = node instanceof NodePath ? node : new NodePath(node); + visitor.visit(path, options); + node = path.value; + + options.madeChanges = visitor.wasChangeReported(); + + return node; +}; + +var visitor = types.PathVisitor.fromMethodsObject({ + reset: function(node, options) { + this.options = options; + }, + + visitFunction: function(path) { + // Calling this.traverse(path) first makes for a post-order traversal. + this.traverse(path); + + var node = path.value; + var shouldTransformAsync = node.async && !this.options.disableAsync; + + if (!node.generator && !shouldTransformAsync) { + return; + } + + this.reportChanged(); + + node.generator = false; + + if (node.expression) { + // Transform expression lambdas into normal functions. + node.expression = false; + node.body = b.blockStatement([ + b.returnStatement(node.body) + ]); + } + + if (shouldTransformAsync) { + awaitVisitor.visit(path.get("body")); + } + + var outerFnId = node.id || ( + node.id = path.scope.parent.declareTemporary("callee$") + ); + + var outerBody = []; + var bodyBlock = path.value.body; + bodyBlock.body = bodyBlock.body.filter(function (node) { + if (node && node._blockHoist != null) { + outerBody.push(node); + return false; + } else { + return true; + } + }); + + var innerFnId = b.identifier(node.id.name + "$"); + var contextId = path.scope.declareTemporary("context$"); + var vars = hoist(path); + + var emitter = new Emitter(contextId); + emitter.explode(path.get("body")); + + if (vars && vars.declarations.length > 0) { + outerBody.push(vars); + } + + var wrapArgs = [ + emitter.getContextFunction(innerFnId), + // Async functions don't care about the outer function because they + // don't need it to be marked and don't inherit from its .prototype. + shouldTransformAsync ? b.literal(null) : outerFnId, + b.thisExpression() + ]; + + var tryLocsList = emitter.getTryLocsList(); + if (tryLocsList) { + wrapArgs.push(tryLocsList); + } + + var wrapCall = b.callExpression( + shouldTransformAsync ? runtimeProperty("async") : runtimeProperty("wrap"), + wrapArgs + ); + + outerBody.push(b.returnStatement(wrapCall)); + node.body = b.blockStatement(outerBody); + node.body._declarations = bodyBlock._declarations; + + if (shouldTransformAsync) { + node.async = false; + return; + } + + if (n.FunctionDeclaration.check(node)) { + var pp = path.parent; + + while (pp && !(n.BlockStatement.check(pp.value) || + n.Program.check(pp.value))) { + pp = pp.parent; + } + + if (!pp) { + return; + } + + // Here we turn the FunctionDeclaration into a named + // FunctionExpression that will be assigned to a variable of the + // same name at the top of the enclosing block. This is important + // for a very subtle reason: named function expressions can refer to + // themselves by name without fear that the binding may change due + // to code executing outside the function, whereas function + // declarations are vulnerable to the following rebinding: + // + // function f() { return f } + // var g = f; + // f = "asdf"; + // g(); // "asdf" + // + // One way to prevent the problem illustrated above is to transform + // the function declaration thus: + // + // var f = function f() { return f }; + // var g = f; + // f = "asdf"; + // g(); // f + // g()()()()(); // f + // + // In the code below, we transform generator function declarations + // in the following way: + // + // gen().next(); // { value: gen, done: true } + // function *gen() { + // return gen; + // } + // + // becomes something like + // + // var gen = runtime.mark(function *gen() { + // return gen; + // }); + // gen().next(); // { value: gen, done: true } + // + // which ensures that the generator body can always reliably refer + // to gen by name. + + // Remove the FunctionDeclaration so that we can add it back as a + // FunctionExpression passed to runtime.mark. + path.replace(); + + // Change the type of the function to be an expression instead of a + // declaration. Note that all the other fields are the same. + node.type = "FunctionExpression"; + + var varDecl = b.variableDeclaration("var", [ + b.variableDeclarator( + node.id, + b.callExpression(runtimeProperty("mark"), [node]) + ) + ]); + + if (node.comments) { + // Copy any comments preceding the function declaration to the + // variable declaration, to avoid weird formatting consequences. + varDecl.leadingComments = node.leadingComments; + varDecl.trailingComments = node.trailingComments; + node.leadingComments = null; + node.trailingComments = null; + } + + varDecl._blockHoist = 3; + + var bodyPath = pp.get("body"); + var bodyLen = bodyPath.value.length; + + bodyPath.push(varDecl); + + } else { + n.FunctionExpression.assert(node); + return b.callExpression(runtimeProperty("mark"), [node]); + } + } +}); + +function shouldNotHoistAbove(stmtPath) { + var value = stmtPath.value; + n.Statement.assert(value); + + // If the first statement is a "use strict" declaration, make sure to + // insert hoisted declarations afterwards. + if (n.ExpressionStatement.check(value) && + n.Literal.check(value.expression) && + value.expression.value === "use strict") { + return true; + } + + if (n.VariableDeclaration.check(value)) { + for (var i = 0; i < value.declarations.length; ++i) { + var decl = value.declarations[i]; + if (n.CallExpression.check(decl.init) && + types.astNodesAreEquivalent(decl.init.callee, + runtimeProperty("mark"))) { + return true; + } + } + } + + return false; +} + +var awaitVisitor = types.PathVisitor.fromMethodsObject({ + visitFunction: function(path) { + return false; // Don't descend into nested function scopes. + }, + + visitAwaitExpression: function(path) { + // Convert await and await* expressions to yield expressions. + var argument = path.value.argument; + + // If the parser supports await* syntax using a boolean .all property + // (#171), desugar that syntax to yield Promise.all(argument). + if (path.value.all) { + argument = b.callExpression( + b.memberExpression( + b.identifier("Promise"), + b.identifier("all"), + false + ), + [argument] + ); + } + + return b.yieldExpression(argument, false); + } +}); + +},{"./emit":422,"./hoist":423,"./util":426,"assert":173,"ast-types":171,"fs":172}],428:[function(require,module,exports){ +(function (__dirname){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var path = require("path"); +var fs = require("fs"); +var through = require("through"); +var transform = require("./lib/visit").transform; +var utils = require("./lib/util"); +var types = require("ast-types"); +var genOrAsyncFunExp = /\bfunction\s*\*|\basync\b/; +var blockBindingExp = /\b(let|const)\s+/; + +function exports(file, options) { + var data = []; + return through(write, end); + + function write(buf) { + data.push(buf); + } + + function end() { + this.queue(compile(data.join(""), options).code); + this.queue(null); + } +} + +// To get a writable stream for use as a browserify transform, call +// require("regenerator")(). +module.exports = exports; + +// To include the runtime globally in the current node process, call +// require("regenerator").runtime(). +function runtime() { + require("./runtime"); +} +exports.runtime = runtime; +runtime.path = path.join(__dirname, "runtime.js"); + +// To modify an AST directly, call require("regenerator").transform(ast). +exports.transform = transform; + +}).call(this,"/node_modules/regenerator-babel") +},{"./lib/util":426,"./lib/visit":427,"./runtime":430,"assert":173,"ast-types":171,"fs":172,"path":182,"through":429}],429:[function(require,module,exports){ +(function (process){ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end, opts) { + write = write || function (data) { this.queue(data) } + end = end || function () { this.queue(null) } + + var ended = false, destroyed = false, buffer = [], _ended = false + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false + +// stream.autoPause = !(opts && opts.autoPause === false) + stream.autoDestroy = !(opts && opts.autoDestroy === false) + + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = stream.push = function (data) { +// console.error(ended) + if(_ended) return stream + if(data == null) _ended = true + buffer.push(data) + drain() + return stream + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable && stream.autoDestroy) + process.nextTick(function () { + stream.destroy() + }) + }) + + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable && stream.autoDestroy) + stream.destroy() + } + + stream.end = function (data) { + if(ended) return + ended = true + if(arguments.length) stream.write(data) + _end() // will emit or queue + return stream + } + + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + return stream + } + + stream.pause = function () { + if(stream.paused) return + stream.paused = true + return stream + } + + stream.resume = function () { + if(stream.paused) { + stream.paused = false + stream.emit('resume') + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + return stream + } + return stream +} + + +}).call(this,require('_process')) +},{"_process":183,"stream":195}],430:[function(require,module,exports){ +(function (global){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +!(function(global) { + "use strict"; + + var hasOwn = Object.prototype.hasOwnProperty; + var undefined; // More compressible than void 0. + var iteratorSymbol = + typeof Symbol === "function" && Symbol.iterator || "@@iterator"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + return new Generator(innerFn, outerFn, self || null, tryLocsList || []); + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunction.displayName = "GeneratorFunction"; + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + genFun.__proto__ = GeneratorFunctionPrototype; + genFun.prototype = Object.create(Gp); + return genFun; + }; + + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + return new Promise(function(resolve, reject) { + var generator = wrap(innerFn, outerFn, self, tryLocsList); + var callNext = step.bind(generator.next); + var callThrow = step.bind(generator["throw"]); + + function step(arg) { + var record = tryCatch(this, null, arg); + if (record.type === "throw") { + reject(record.arg); + return; + } + + var info = record.arg; + if (info.done) { + resolve(info.value); + } else { + Promise.resolve(info.value).then(callNext, callThrow); + } + } + + callNext(); + }); + }; + + function Generator(innerFn, outerFn, self, tryLocsList) { + var generator = outerFn ? Object.create(outerFn.prototype) : this; + var context = new Context(tryLocsList); + var state = GenStateSuspendedStart; + + function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + while (true) { + var delegate = context.delegate; + if (delegate) { + var record = tryCatch( + delegate.iterator[method], + delegate.iterator, + arg + ); + + if (record.type === "throw") { + context.delegate = null; + + // Like returning generator.throw(uncaught), but without the + // overhead of an extra function call. + method = "throw"; + arg = record.arg; + + continue; + } + + // Delegate generator ran and handled its own exceptions so + // regardless of what the method was, we continue as if it is + // "next" with an undefined arg. + method = "next"; + arg = undefined; + + var info = record.arg; + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + } else { + state = GenStateSuspendedYield; + return info; + } + + context.delegate = null; + } + + if (method === "next") { + if (state === GenStateSuspendedStart && + typeof arg !== "undefined") { + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + throw new TypeError( + "attempt to send " + JSON.stringify(arg) + " to newborn generator" + ); + } + + if (state === GenStateSuspendedYield) { + context.sent = arg; + } else { + delete context.sent; + } + + } else if (method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw arg; + } + + if (context.dispatchException(arg)) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + method = "next"; + arg = undefined; + } + + } else if (method === "return") { + context.abrupt("return", arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + var info = { + value: record.arg, + done: context.done + }; + + if (record.arg === ContinueSentinel) { + if (context.delegate && method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + arg = undefined; + } + } else { + return info; + } + + } else if (record.type === "throw") { + state = GenStateCompleted; + + if (method === "next") { + context.dispatchException(record.arg); + } else { + arg = record.arg; + } + } + } + } + + generator.next = invoke.bind(generator, "next"); + generator["throw"] = invoke.bind(generator, "throw"); + generator["return"] = invoke.bind(generator, "return"); + + return generator; + } + + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function() { + this.prev = 0; + this.next = 0; + this.sent = undefined; + this.done = false; + this.delegate = null; + + this.tryEntries.forEach(resetTryEntry); + + // Pre-initialize at least 20 temporary variables to enable hidden + // class optimizations for simple generators. + for (var tempIndex = 0, tempName; + hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20; + ++tempIndex) { + this[tempName] = null; + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg < finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.next = finallyEntry.finallyLoc; + } else { + this.complete(record); + } + + return ContinueSentinel; + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = record.arg; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + return this.complete(entry.completion, entry.afterLoc); + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + return ContinueSentinel; + } + }; +})( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === "object" ? global : + typeof window === "object" ? window : this +); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],431:[function(require,module,exports){ +// Generated by `/scripts/character-class-escape-sets.js`. Do not edit. +var regenerate = require('regenerate'); + +exports.REGULAR = { + 'd': regenerate() + .addRange(0x30, 0x39), + 'D': regenerate() + .addRange(0x0, 0x2F) + .addRange(0x3A, 0xFFFF), + 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) + .addRange(0x9, 0xD) + .addRange(0x2000, 0x200A) + .addRange(0x2028, 0x2029), + 'S': regenerate() + .addRange(0x0, 0x8) + .addRange(0xE, 0x1F) + .addRange(0x21, 0x9F) + .addRange(0xA1, 0x167F) + .addRange(0x1681, 0x180D) + .addRange(0x180F, 0x1FFF) + .addRange(0x200B, 0x2027) + .addRange(0x202A, 0x202E) + .addRange(0x2030, 0x205E) + .addRange(0x2060, 0x2FFF) + .addRange(0x3001, 0xFEFE) + .addRange(0xFF00, 0xFFFF), + 'w': regenerate(0x5F) + .addRange(0x30, 0x39) + .addRange(0x41, 0x5A) + .addRange(0x61, 0x7A), + 'W': regenerate(0x60) + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x40) + .addRange(0x5B, 0x5E) + .addRange(0x7B, 0xFFFF) +}; + +exports.UNICODE = { + 'd': regenerate() + .addRange(0x30, 0x39), + 'D': regenerate() + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x10FFFF), + 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) + .addRange(0x9, 0xD) + .addRange(0x2000, 0x200A) + .addRange(0x2028, 0x2029), + 'S': regenerate() + .addRange(0x0, 0x8) + .addRange(0xE, 0x1F) + .addRange(0x21, 0x9F) + .addRange(0xA1, 0x167F) + .addRange(0x1681, 0x180D) + .addRange(0x180F, 0x1FFF) + .addRange(0x200B, 0x2027) + .addRange(0x202A, 0x202E) + .addRange(0x2030, 0x205E) + .addRange(0x2060, 0x2FFF) + .addRange(0x3001, 0xFEFE) + .addRange(0xFF00, 0x10FFFF), + 'w': regenerate(0x5F) + .addRange(0x30, 0x39) + .addRange(0x41, 0x5A) + .addRange(0x61, 0x7A), + 'W': regenerate(0x60) + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x40) + .addRange(0x5B, 0x5E) + .addRange(0x7B, 0x10FFFF) +}; + +exports.UNICODE_IGNORE_CASE = { + 'd': regenerate() + .addRange(0x30, 0x39), + 'D': regenerate() + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x10FFFF), + 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) + .addRange(0x9, 0xD) + .addRange(0x2000, 0x200A) + .addRange(0x2028, 0x2029), + 'S': regenerate() + .addRange(0x0, 0x8) + .addRange(0xE, 0x1F) + .addRange(0x21, 0x9F) + .addRange(0xA1, 0x167F) + .addRange(0x1681, 0x180D) + .addRange(0x180F, 0x1FFF) + .addRange(0x200B, 0x2027) + .addRange(0x202A, 0x202E) + .addRange(0x2030, 0x205E) + .addRange(0x2060, 0x2FFF) + .addRange(0x3001, 0xFEFE) + .addRange(0xFF00, 0x10FFFF), + 'w': regenerate(0x5F, 0x17F, 0x212A) + .addRange(0x30, 0x39) + .addRange(0x41, 0x5A) + .addRange(0x61, 0x7A), + 'W': regenerate(0x4B, 0x53, 0x60) + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x40) + .addRange(0x5B, 0x5E) + .addRange(0x7B, 0x10FFFF) +}; + +},{"regenerate":433}],432:[function(require,module,exports){ +module.exports={ + "75": 8490, + "83": 383, + "107": 8490, + "115": 383, + "181": 924, + "197": 8491, + "383": 83, + "452": 453, + "453": 452, + "455": 456, + "456": 455, + "458": 459, + "459": 458, + "497": 498, + "498": 497, + "837": 8126, + "914": 976, + "917": 1013, + "920": 1012, + "921": 8126, + "922": 1008, + "924": 181, + "928": 982, + "929": 1009, + "931": 962, + "934": 981, + "937": 8486, + "962": 931, + "976": 914, + "977": 1012, + "981": 934, + "982": 928, + "1008": 922, + "1009": 929, + "1012": [ + 920, + 977 + ], + "1013": 917, + "7776": 7835, + "7835": 7776, + "8126": [ + 837, + 921 + ], + "8486": 937, + "8490": 75, + "8491": 197, + "66560": 66600, + "66561": 66601, + "66562": 66602, + "66563": 66603, + "66564": 66604, + "66565": 66605, + "66566": 66606, + "66567": 66607, + "66568": 66608, + "66569": 66609, + "66570": 66610, + "66571": 66611, + "66572": 66612, + "66573": 66613, + "66574": 66614, + "66575": 66615, + "66576": 66616, + "66577": 66617, + "66578": 66618, + "66579": 66619, + "66580": 66620, + "66581": 66621, + "66582": 66622, + "66583": 66623, + "66584": 66624, + "66585": 66625, + "66586": 66626, + "66587": 66627, + "66588": 66628, + "66589": 66629, + "66590": 66630, + "66591": 66631, + "66592": 66632, + "66593": 66633, + "66594": 66634, + "66595": 66635, + "66596": 66636, + "66597": 66637, + "66598": 66638, + "66599": 66639, + "66600": 66560, + "66601": 66561, + "66602": 66562, + "66603": 66563, + "66604": 66564, + "66605": 66565, + "66606": 66566, + "66607": 66567, + "66608": 66568, + "66609": 66569, + "66610": 66570, + "66611": 66571, + "66612": 66572, + "66613": 66573, + "66614": 66574, + "66615": 66575, + "66616": 66576, + "66617": 66577, + "66618": 66578, + "66619": 66579, + "66620": 66580, + "66621": 66581, + "66622": 66582, + "66623": 66583, + "66624": 66584, + "66625": 66585, + "66626": 66586, + "66627": 66587, + "66628": 66588, + "66629": 66589, + "66630": 66590, + "66631": 66591, + "66632": 66592, + "66633": 66593, + "66634": 66594, + "66635": 66595, + "66636": 66596, + "66637": 66597, + "66638": 66598, + "66639": 66599, + "71840": 71872, + "71841": 71873, + "71842": 71874, + "71843": 71875, + "71844": 71876, + "71845": 71877, + "71846": 71878, + "71847": 71879, + "71848": 71880, + "71849": 71881, + "71850": 71882, + "71851": 71883, + "71852": 71884, + "71853": 71885, + "71854": 71886, + "71855": 71887, + "71856": 71888, + "71857": 71889, + "71858": 71890, + "71859": 71891, + "71860": 71892, + "71861": 71893, + "71862": 71894, + "71863": 71895, + "71864": 71896, + "71865": 71897, + "71866": 71898, + "71867": 71899, + "71868": 71900, + "71869": 71901, + "71870": 71902, + "71871": 71903, + "71872": 71840, + "71873": 71841, + "71874": 71842, + "71875": 71843, + "71876": 71844, + "71877": 71845, + "71878": 71846, + "71879": 71847, + "71880": 71848, + "71881": 71849, + "71882": 71850, + "71883": 71851, + "71884": 71852, + "71885": 71853, + "71886": 71854, + "71887": 71855, + "71888": 71856, + "71889": 71857, + "71890": 71858, + "71891": 71859, + "71892": 71860, + "71893": 71861, + "71894": 71862, + "71895": 71863, + "71896": 71864, + "71897": 71865, + "71898": 71866, + "71899": 71867, + "71900": 71868, + "71901": 71869, + "71902": 71870, + "71903": 71871 +} + +},{}],433:[function(require,module,exports){ +(function (global){ +/*! https://mths.be/regenerate v1.2.0 by @mathias | MIT license */ +;(function(root) { + + // Detect free variables `exports`. + var freeExports = typeof exports == 'object' && exports; + + // Detect free variable `module`. + var freeModule = typeof module == 'object' && module && + module.exports == freeExports && module; + + // Detect free variable `global`, from Node.js or Browserified code, + // and use it as `root`. + var freeGlobal = typeof global == 'object' && global; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + var ERRORS = { + 'rangeOrder': 'A range\u2019s `stop` value must be greater than or equal ' + + 'to the `start` value.', + 'codePointRange': 'Invalid code point value. Code points range from ' + + 'U+000000 to U+10FFFF.' + }; + + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs + var HIGH_SURROGATE_MIN = 0xD800; + var HIGH_SURROGATE_MAX = 0xDBFF; + var LOW_SURROGATE_MIN = 0xDC00; + var LOW_SURROGATE_MAX = 0xDFFF; + + // In Regenerate output, `\0` will never be preceded by `\` because we sort + // by code point value, so let’s keep this regular expression simple. + var regexNull = /\\x00([^0123456789]|$)/g; + + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + var extend = function(destination, source) { + var key; + for (key in source) { + if (hasOwnProperty.call(source, key)) { + destination[key] = source[key]; + } + } + return destination; + }; + + var forEach = function(array, callback) { + var index = -1; + var length = array.length; + while (++index < length) { + callback(array[index], index); + } + }; + + var toString = object.toString; + var isArray = function(value) { + return toString.call(value) == '[object Array]'; + }; + var isNumber = function(value) { + return typeof value == 'number' || + toString.call(value) == '[object Number]'; + }; + + // This assumes that `number` is a positive integer that `toString()`s nicely + // (which is the case for all code point values). + var zeroes = '0000'; + var pad = function(number, totalCharacters) { + var string = String(number); + return string.length < totalCharacters + ? (zeroes + string).slice(-totalCharacters) + : string; + }; + + var hex = function(number) { + return Number(number).toString(16).toUpperCase(); + }; + + var slice = [].slice; + + /*--------------------------------------------------------------------------*/ + + var dataFromCodePoints = function(codePoints) { + var index = -1; + var length = codePoints.length; + var max = length - 1; + var result = []; + var isStart = true; + var tmp; + var previous = 0; + while (++index < length) { + tmp = codePoints[index]; + if (isStart) { + result.push(tmp); + previous = tmp; + isStart = false; + } else { + if (tmp == previous + 1) { + if (index != max) { + previous = tmp; + continue; + } else { + isStart = true; + result.push(tmp + 1); + } + } else { + // End the previous range and start a new one. + result.push(previous + 1, tmp); + previous = tmp; + } + } + } + if (!isStart) { + result.push(tmp + 1); + } + return result; + }; + + var dataRemove = function(data, codePoint) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1]; + if (codePoint >= start && codePoint < end) { + // Modify this pair. + if (codePoint == start) { + if (end == start + 1) { + // Just remove `start` and `end`. + data.splice(index, 2); + return data; + } else { + // Just replace `start` with a new value. + data[index] = codePoint + 1; + return data; + } + } else if (codePoint == end - 1) { + // Just replace `end` with a new value. + data[index + 1] = codePoint; + return data; + } else { + // Replace `[start, end]` with `[startA, endA, startB, endB]`. + data.splice(index, 2, start, codePoint, codePoint + 1, end); + return data; + } + } + index += 2; + } + return data; + }; + + var dataRemoveRange = function(data, rangeStart, rangeEnd) { + if (rangeEnd < rangeStart) { + throw Error(ERRORS.rangeOrder); + } + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + while (index < data.length) { + start = data[index]; + end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. + + // Exit as soon as no more matching pairs can be found. + if (start > rangeEnd) { + return data; + } + + // Check if this range pair is equal to, or forms a subset of, the range + // to be removed. + // E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`. + // E.g. we have `[40, 51]` and want to remove 0-100 → `[]`. + if (rangeStart <= start && rangeEnd >= end) { + // Remove this pair. + data.splice(index, 2); + continue; + } + + // Check if both `rangeStart` and `rangeEnd` are within the bounds of + // this pair. + // E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`. + if (rangeStart >= start && rangeEnd < end) { + if (rangeStart == start) { + // Replace `[start, end]` with `[startB, endB]`. + data[index] = rangeEnd + 1; + data[index + 1] = end + 1; + return data; + } + // Replace `[start, end]` with `[startA, endA, startB, endB]`. + data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1); + return data; + } + + // Check if only `rangeStart` is within the bounds of this pair. + // E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`. + if (rangeStart >= start && rangeStart <= end) { + // Replace `end` with `rangeStart`. + data[index + 1] = rangeStart; + // Note: we cannot `return` just yet, in case any following pairs still + // contain matching code points. + // E.g. we have `[0, 11, 14, 31]` and want to remove 4-20 + // → `[0, 4, 21, 31]`. + } + + // Check if only `rangeEnd` is within the bounds of this pair. + // E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`. + else if (rangeEnd >= start && rangeEnd <= end) { + // Just replace `start`. + data[index] = rangeEnd + 1; + return data; + } + + index += 2; + } + return data; + }; + + var dataAdd = function(data, codePoint) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var lastIndex = null; + var length = data.length; + if (codePoint < 0x0 || codePoint > 0x10FFFF) { + throw RangeError(ERRORS.codePointRange); + } + while (index < length) { + start = data[index]; + end = data[index + 1]; + + // Check if the code point is already in the set. + if (codePoint >= start && codePoint < end) { + return data; + } + + if (codePoint == start - 1) { + // Just replace `start` with a new value. + data[index] = codePoint; + return data; + } + + // At this point, if `start` is `greater` than `codePoint`, insert a new + // `[start, end]` pair before the current pair, or after the current pair + // if there is a known `lastIndex`. + if (start > codePoint) { + data.splice( + lastIndex != null ? lastIndex + 2 : 0, + 0, + codePoint, + codePoint + 1 + ); + return data; + } + + if (codePoint == end) { + // Check if adding this code point causes two separate ranges to become + // a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`. + if (codePoint + 1 == data[index + 2]) { + data.splice(index, 4, start, data[index + 3]); + return data; + } + // Else, just replace `end` with a new value. + data[index + 1] = codePoint + 1; + return data; + } + lastIndex = index; + index += 2; + } + // The loop has finished; add the new pair to the end of the data set. + data.push(codePoint, codePoint + 1); + return data; + }; + + var dataAddData = function(dataA, dataB) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var data = dataA.slice(); + var length = dataB.length; + while (index < length) { + start = dataB[index]; + end = dataB[index + 1] - 1; + if (start == end) { + data = dataAdd(data, start); + } else { + data = dataAddRange(data, start, end); + } + index += 2; + } + return data; + }; + + var dataRemoveData = function(dataA, dataB) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var data = dataA.slice(); + var length = dataB.length; + while (index < length) { + start = dataB[index]; + end = dataB[index + 1] - 1; + if (start == end) { + data = dataRemove(data, start); + } else { + data = dataRemoveRange(data, start, end); + } + index += 2; + } + return data; + }; + + var dataAddRange = function(data, rangeStart, rangeEnd) { + if (rangeEnd < rangeStart) { + throw Error(ERRORS.rangeOrder); + } + if ( + rangeStart < 0x0 || rangeStart > 0x10FFFF || + rangeEnd < 0x0 || rangeEnd > 0x10FFFF + ) { + throw RangeError(ERRORS.codePointRange); + } + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var added = false; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1]; + + if (added) { + // The range has already been added to the set; at this point, we just + // need to get rid of the following ranges in case they overlap. + + // Check if this range can be combined with the previous range. + if (start == rangeEnd + 1) { + data.splice(index - 1, 2); + return data; + } + + // Exit as soon as no more possibly overlapping pairs can be found. + if (start > rangeEnd) { + return data; + } + + // E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have + // `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the + // `0,16` range that was previously added. + if (start >= rangeStart && start <= rangeEnd) { + // `start` lies within the range that was previously added. + + if (end > rangeStart && end - 1 <= rangeEnd) { + // `end` lies within the range that was previously added as well, + // so remove this pair. + data.splice(index, 2); + index -= 2; + // Note: we cannot `return` just yet, as there may still be other + // overlapping pairs. + } else { + // `start` lies within the range that was previously added, but + // `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so + // now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`. + // Remove the previously added `end` and the current `start`. + data.splice(index - 1, 2); + index -= 2; + } + + // Note: we cannot return yet. + } + + } + + else if (start == rangeEnd + 1) { + data[index] = rangeStart; + return data; + } + + // Check if a new pair must be inserted *before* the current one. + else if (start > rangeEnd) { + data.splice(index, 0, rangeStart, rangeEnd + 1); + return data; + } + + else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) { + // The new range lies entirely within an existing range pair. No action + // needed. + return data; + } + + else if ( + // E.g. `[0, 11]` and you add 5-15 → `[0, 16]`. + (rangeStart >= start && rangeStart < end) || + // E.g. `[0, 3]` and you add 3-6 → `[0, 7]`. + end == rangeStart + ) { + // Replace `end` with the new value. + data[index + 1] = rangeEnd + 1; + // Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]` + // and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part. + added = true; + // Note: we cannot `return` just yet. + } + + else if (rangeStart <= start && rangeEnd + 1 >= end) { + // The new range is a superset of the old range. + data[index] = rangeStart; + data[index + 1] = rangeEnd + 1; + added = true; + } + + index += 2; + } + // The loop has finished without doing anything; add the new pair to the end + // of the data set. + if (!added) { + data.push(rangeStart, rangeEnd + 1); + } + return data; + }; + + var dataContains = function(data, codePoint) { + var index = 0; + var length = data.length; + // Exit early if `codePoint` is not within `data`’s overall range. + var start = data[index]; + var end = data[length - 1]; + if (length >= 2) { + if (codePoint < start || codePoint > end) { + return false; + } + } + // Iterate over the data per `(start, end)` pair. + while (index < length) { + start = data[index]; + end = data[index + 1]; + if (codePoint >= start && codePoint < end) { + return true; + } + index += 2; + } + return false; + }; + + var dataIntersection = function(data, codePoints) { + var index = 0; + var length = codePoints.length; + var codePoint; + var result = []; + while (index < length) { + codePoint = codePoints[index]; + if (dataContains(data, codePoint)) { + result.push(codePoint); + } + ++index; + } + return dataFromCodePoints(result); + }; + + var dataIsEmpty = function(data) { + return !data.length; + }; + + var dataIsSingleton = function(data) { + // Check if the set only represents a single code point. + return data.length == 2 && data[0] + 1 == data[1]; + }; + + var dataToArray = function(data) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var result = []; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1]; + while (start < end) { + result.push(start); + ++start; + } + index += 2; + } + return result; + }; + + /*--------------------------------------------------------------------------*/ + + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + var floor = Math.floor; + var highSurrogate = function(codePoint) { + return parseInt( + floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, + 10 + ); + }; + + var lowSurrogate = function(codePoint) { + return parseInt( + (codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, + 10 + ); + }; + + var stringFromCharCode = String.fromCharCode; + var codePointToString = function(codePoint) { + var string; + // https://mathiasbynens.be/notes/javascript-escapes#single + // Note: the `\b` escape sequence for U+0008 BACKSPACE in strings has a + // different meaning in regular expressions (word boundary), so it cannot + // be used here. + if (codePoint == 0x09) { + string = '\\t'; + } + // Note: IE < 9 treats `'\v'` as `'v'`, so avoid using it. + // else if (codePoint == 0x0B) { + // string = '\\v'; + // } + else if (codePoint == 0x0A) { + string = '\\n'; + } + else if (codePoint == 0x0C) { + string = '\\f'; + } + else if (codePoint == 0x0D) { + string = '\\r'; + } + else if (codePoint == 0x5C) { + string = '\\\\'; + } + else if ( + codePoint == 0x24 || + (codePoint >= 0x28 && codePoint <= 0x2B) || + codePoint == 0x2D || codePoint == 0x2E || codePoint == 0x3F || + (codePoint >= 0x5B && codePoint <= 0x5E) || + (codePoint >= 0x7B && codePoint <= 0x7D) + ) { + // The code point maps to an unsafe printable ASCII character; + // backslash-escape it. Here’s the list of those symbols: + // + // $()*+-.?[\]^{|} + // + // See #7 for more info. + string = '\\' + stringFromCharCode(codePoint); + } + else if (codePoint >= 0x20 && codePoint <= 0x7E) { + // The code point maps to one of these printable ASCII symbols + // (including the space character): + // + // !"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO + // PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~ + // + // These can safely be used directly. + string = stringFromCharCode(codePoint); + } + else if (codePoint <= 0xFF) { + // https://mathiasbynens.be/notes/javascript-escapes#hexadecimal + string = '\\x' + pad(hex(codePoint), 2); + } + else { // `codePoint <= 0xFFFF` holds true. + // https://mathiasbynens.be/notes/javascript-escapes#unicode + string = '\\u' + pad(hex(codePoint), 4); + } + + // There’s no need to account for astral symbols / surrogate pairs here, + // since `codePointToString` is private and only used for BMP code points. + // But if that’s what you need, just add an `else` block with this code: + // + // string = '\\u' + pad(hex(highSurrogate(codePoint)), 4) + // + '\\u' + pad(hex(lowSurrogate(codePoint)), 4); + + return string; + }; + + var symbolToCodePoint = function(symbol) { + var length = symbol.length; + var first = symbol.charCodeAt(0); + var second; + if ( + first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && + length > 1 // There is a next code unit. + ) { + // `first` is a high surrogate, and there is a next character. Assume + // it’s a low surrogate (else it’s invalid usage of Regenerate anyway). + second = symbol.charCodeAt(1); + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - HIGH_SURROGATE_MIN) * 0x400 + + second - LOW_SURROGATE_MIN + 0x10000; + } + return first; + }; + + var createBMPCharacterClasses = function(data) { + // Iterate over the data per `(start, end)` pair. + var result = ''; + var index = 0; + var start; + var end; + var length = data.length; + if (dataIsSingleton(data)) { + return codePointToString(data[0]); + } + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. + if (start == end) { + result += codePointToString(start); + } else if (start + 1 == end) { + result += codePointToString(start) + codePointToString(end); + } else { + result += codePointToString(start) + '-' + codePointToString(end); + } + index += 2; + } + return '[' + result + ']'; + }; + + var splitAtBMP = function(data) { + // Iterate over the data per `(start, end)` pair. + var loneHighSurrogates = []; + var loneLowSurrogates = []; + var bmp = []; + var astral = []; + var index = 0; + var start; + var end; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. + + if (start < HIGH_SURROGATE_MIN) { + + // The range starts and ends before the high surrogate range. + // E.g. (0, 0x10). + if (end < HIGH_SURROGATE_MIN) { + bmp.push(start, end + 1); + } + + // The range starts before the high surrogate range and ends within it. + // E.g. (0, 0xD855). + if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1); + } + + // The range starts before the high surrogate range and ends in the low + // surrogate range. E.g. (0, 0xDCFF). + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); + } + + // The range starts before the high surrogate range and ends after the + // low surrogate range. E.g. (0, 0x10FFFF). + if (end > LOW_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } + + } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) { + + // The range starts and ends in the high surrogate range. + // E.g. (0xD855, 0xD866). + if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { + loneHighSurrogates.push(start, end + 1); + } + + // The range starts in the high surrogate range and ends in the low + // surrogate range. E.g. (0xD855, 0xDCFF). + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); + } + + // The range starts in the high surrogate range and ends after the low + // surrogate range. E.g. (0xD855, 0x10FFFF). + if (end > LOW_SURROGATE_MAX) { + loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } + + } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) { + + // The range starts and ends in the low surrogate range. + // E.g. (0xDCFF, 0xDDFF). + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + loneLowSurrogates.push(start, end + 1); + } + + // The range starts in the low surrogate range and ends after the low + // surrogate range. E.g. (0xDCFF, 0x10FFFF). + if (end > LOW_SURROGATE_MAX) { + loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1); + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } + + } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) { + + // The range starts and ends after the low surrogate range. + // E.g. (0xFFAA, 0x10FFFF). + if (end <= 0xFFFF) { + bmp.push(start, end + 1); + } else { + bmp.push(start, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + + } else { + + // The range starts and ends in the astral range. + astral.push(start, end + 1); + + } + + index += 2; + } + return { + 'loneHighSurrogates': loneHighSurrogates, + 'loneLowSurrogates': loneLowSurrogates, + 'bmp': bmp, + 'astral': astral + }; + }; + + var optimizeSurrogateMappings = function(surrogateMappings) { + var result = []; + var tmpLow = []; + var addLow = false; + var mapping; + var nextMapping; + var highSurrogates; + var lowSurrogates; + var nextHighSurrogates; + var nextLowSurrogates; + var index = -1; + var length = surrogateMappings.length; + while (++index < length) { + mapping = surrogateMappings[index]; + nextMapping = surrogateMappings[index + 1]; + if (!nextMapping) { + result.push(mapping); + continue; + } + highSurrogates = mapping[0]; + lowSurrogates = mapping[1]; + nextHighSurrogates = nextMapping[0]; + nextLowSurrogates = nextMapping[1]; + + // Check for identical high surrogate ranges. + tmpLow = lowSurrogates; + while ( + nextHighSurrogates && + highSurrogates[0] == nextHighSurrogates[0] && + highSurrogates[1] == nextHighSurrogates[1] + ) { + // Merge with the next item. + if (dataIsSingleton(nextLowSurrogates)) { + tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]); + } else { + tmpLow = dataAddRange( + tmpLow, + nextLowSurrogates[0], + nextLowSurrogates[1] - 1 + ); + } + ++index; + mapping = surrogateMappings[index]; + highSurrogates = mapping[0]; + lowSurrogates = mapping[1]; + nextMapping = surrogateMappings[index + 1]; + nextHighSurrogates = nextMapping && nextMapping[0]; + nextLowSurrogates = nextMapping && nextMapping[1]; + addLow = true; + } + result.push([ + highSurrogates, + addLow ? tmpLow : lowSurrogates + ]); + addLow = false; + } + return optimizeByLowSurrogates(result); + }; + + var optimizeByLowSurrogates = function(surrogateMappings) { + if (surrogateMappings.length == 1) { + return surrogateMappings; + } + var index = -1; + var innerIndex = -1; + while (++index < surrogateMappings.length) { + var mapping = surrogateMappings[index]; + var lowSurrogates = mapping[1]; + var lowSurrogateStart = lowSurrogates[0]; + var lowSurrogateEnd = lowSurrogates[1]; + innerIndex = index; // Note: the loop starts at the next index. + while (++innerIndex < surrogateMappings.length) { + var otherMapping = surrogateMappings[innerIndex]; + var otherLowSurrogates = otherMapping[1]; + var otherLowSurrogateStart = otherLowSurrogates[0]; + var otherLowSurrogateEnd = otherLowSurrogates[1]; + if ( + lowSurrogateStart == otherLowSurrogateStart && + lowSurrogateEnd == otherLowSurrogateEnd + ) { + // Add the code points in the other item to this one. + if (dataIsSingleton(otherMapping[0])) { + mapping[0] = dataAdd(mapping[0], otherMapping[0][0]); + } else { + mapping[0] = dataAddRange( + mapping[0], + otherMapping[0][0], + otherMapping[0][1] - 1 + ); + } + // Remove the other, now redundant, item. + surrogateMappings.splice(innerIndex, 1); + --innerIndex; + } + } + } + return surrogateMappings; + }; + + var surrogateSet = function(data) { + // Exit early if `data` is an empty set. + if (!data.length) { + return []; + } + + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var startHigh; + var startLow; + var prevStartHigh = 0; + var prevEndHigh = 0; + var tmpLow = []; + var endHigh; + var endLow; + var surrogateMappings = []; + var length = data.length; + var dataHigh = []; + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; + + startHigh = highSurrogate(start); + startLow = lowSurrogate(start); + endHigh = highSurrogate(end); + endLow = lowSurrogate(end); + + var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN; + var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX; + var complete = false; + + // Append the previous high-surrogate-to-low-surrogate mappings. + // Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`. + if ( + startHigh == endHigh || + startsWithLowestLowSurrogate && endsWithHighestLowSurrogate + ) { + surrogateMappings.push([ + [startHigh, endHigh + 1], + [startLow, endLow + 1] + ]); + complete = true; + } else { + surrogateMappings.push([ + [startHigh, startHigh + 1], + [startLow, LOW_SURROGATE_MAX + 1] + ]); + } + + // Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to + // `(endHigh - 1, LOW_SURROGATE_MAX)`. + if (!complete && startHigh + 1 < endHigh) { + if (endsWithHighestLowSurrogate) { + // Combine step 2 and step 3. + surrogateMappings.push([ + [startHigh + 1, endHigh + 1], + [LOW_SURROGATE_MIN, endLow + 1] + ]); + complete = true; + } else { + surrogateMappings.push([ + [startHigh + 1, endHigh], + [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1] + ]); + } + } + + // Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`. + if (!complete) { + surrogateMappings.push([ + [endHigh, endHigh + 1], + [LOW_SURROGATE_MIN, endLow + 1] + ]); + } + + prevStartHigh = startHigh; + prevEndHigh = endHigh; + + index += 2; + } + + // The format of `surrogateMappings` is as follows: + // + // [ surrogateMapping1, surrogateMapping2 ] + // + // i.e.: + // + // [ + // [ highSurrogates1, lowSurrogates1 ], + // [ highSurrogates2, lowSurrogates2 ] + // ] + return optimizeSurrogateMappings(surrogateMappings); + }; + + var createSurrogateCharacterClasses = function(surrogateMappings) { + var result = []; + forEach(surrogateMappings, function(surrogateMapping) { + var highSurrogates = surrogateMapping[0]; + var lowSurrogates = surrogateMapping[1]; + result.push( + createBMPCharacterClasses(highSurrogates) + + createBMPCharacterClasses(lowSurrogates) + ); + }); + return result.join('|'); + }; + + var createCharacterClassesFromData = function(data, bmpOnly) { + var result = []; + + var parts = splitAtBMP(data); + var loneHighSurrogates = parts.loneHighSurrogates; + var loneLowSurrogates = parts.loneLowSurrogates; + var bmp = parts.bmp; + var astral = parts.astral; + var hasAstral = !dataIsEmpty(parts.astral); + var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates); + var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates); + + var surrogateMappings = surrogateSet(astral); + + if (bmpOnly) { + bmp = dataAddData(bmp, loneHighSurrogates); + hasLoneHighSurrogates = false; + bmp = dataAddData(bmp, loneLowSurrogates); + hasLoneLowSurrogates = false; + } + + if (!dataIsEmpty(bmp)) { + // The data set contains BMP code points that are not high surrogates + // needed for astral code points in the set. + result.push(createBMPCharacterClasses(bmp)); + } + if (surrogateMappings.length) { + // The data set contains astral code points; append character classes + // based on their surrogate pairs. + result.push(createSurrogateCharacterClasses(surrogateMappings)); + } + // https://gist.github.com/mathiasbynens/bbe7f870208abcfec860 + if (hasLoneHighSurrogates) { + result.push( + createBMPCharacterClasses(loneHighSurrogates) + + // Make sure the high surrogates aren’t part of a surrogate pair. + '(?![\\uDC00-\\uDFFF])' + ); + } + if (hasLoneLowSurrogates) { + result.push( + // Make sure the low surrogates aren’t part of a surrogate pair. + '(?:[^\\uD800-\\uDBFF]|^)' + + createBMPCharacterClasses(loneLowSurrogates) + ); + } + return result.join('|'); + }; + + /*--------------------------------------------------------------------------*/ + + // `regenerate` can be used as a constructor (and new methods can be added to + // its prototype) but also as a regular function, the latter of which is the + // documented and most common usage. For that reason, it’s not capitalized. + var regenerate = function(value) { + if (arguments.length > 1) { + value = slice.call(arguments); + } + if (this instanceof regenerate) { + this.data = []; + return value ? this.add(value) : this; + } + return (new regenerate).add(value); + }; + + regenerate.version = '1.2.0'; + + var proto = regenerate.prototype; + extend(proto, { + 'add': function(value) { + var $this = this; + if (value == null) { + return $this; + } + if (value instanceof regenerate) { + // Allow passing other Regenerate instances. + $this.data = dataAddData($this.data, value.data); + return $this; + } + if (arguments.length > 1) { + value = slice.call(arguments); + } + if (isArray(value)) { + forEach(value, function(item) { + $this.add(item); + }); + return $this; + } + $this.data = dataAdd( + $this.data, + isNumber(value) ? value : symbolToCodePoint(value) + ); + return $this; + }, + 'remove': function(value) { + var $this = this; + if (value == null) { + return $this; + } + if (value instanceof regenerate) { + // Allow passing other Regenerate instances. + $this.data = dataRemoveData($this.data, value.data); + return $this; + } + if (arguments.length > 1) { + value = slice.call(arguments); + } + if (isArray(value)) { + forEach(value, function(item) { + $this.remove(item); + }); + return $this; + } + $this.data = dataRemove( + $this.data, + isNumber(value) ? value : symbolToCodePoint(value) + ); + return $this; + }, + 'addRange': function(start, end) { + var $this = this; + $this.data = dataAddRange($this.data, + isNumber(start) ? start : symbolToCodePoint(start), + isNumber(end) ? end : symbolToCodePoint(end) + ); + return $this; + }, + 'removeRange': function(start, end) { + var $this = this; + var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start); + var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end); + $this.data = dataRemoveRange( + $this.data, + startCodePoint, + endCodePoint + ); + return $this; + }, + 'intersection': function(argument) { + var $this = this; + // Allow passing other Regenerate instances. + // TODO: Optimize this by writing and using `dataIntersectionData()`. + var array = argument instanceof regenerate ? + dataToArray(argument.data) : + argument; + $this.data = dataIntersection($this.data, array); + return $this; + }, + 'contains': function(codePoint) { + return dataContains( + this.data, + isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint) + ); + }, + 'clone': function() { + var set = new regenerate; + set.data = this.data.slice(0); + return set; + }, + 'toString': function(options) { + var result = createCharacterClassesFromData( + this.data, + options ? options.bmpOnly : false + ); + // Use `\0` instead of `\x00` where possible. + return result.replace(regexNull, '\\0$1'); + }, + 'toRegExp': function(flags) { + return RegExp(this.toString(), flags || ''); + }, + 'valueOf': function() { // Note: `valueOf` is aliased as `toArray`. + return dataToArray(this.data); + } + }); + + proto.toArray = proto.valueOf; + + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define(function() { + return regenerate; + }); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = regenerate; + } else { // in Narwhal or RingoJS v0.7.0- + freeExports.regenerate = regenerate; + } + } else { // in Rhino or a web browser + root.regenerate = regenerate; + } + +}(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],434:[function(require,module,exports){ +(function (global){ +/*! + * RegJSGen + * Copyright 2014 Benjamin Tan + * Available under MIT license + */ +;(function() { + 'use strict'; + + /** Used to determine if values are of the language type `Object` */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Used as a reference to the global object */ + var root = (objectTypes[typeof window] && window) || this; + + /** Backup possible global object */ + var oldRoot = root; + + /** Detect free variable `exports` */ + var freeExports = objectTypes[typeof exports] && exports; + + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ + var freeGlobal = freeExports && freeModule && typeof global == 'object' && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + /*! Based on https://mths.be/fromcodepoint v0.2.0 by @mathias */ + + var stringFromCharCode = String.fromCharCode; + var floor = Math.floor; + function fromCodePoint() { + var MAX_SIZE = 0x4000; + var codeUnits = []; + var highSurrogate; + var lowSurrogate; + var index = -1; + var length = arguments.length; + if (!length) { + return ''; + } + var result = ''; + while (++index < length) { + var codePoint = Number(arguments[index]); + if ( + !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity` + codePoint < 0 || // not a valid Unicode code point + codePoint > 0x10FFFF || // not a valid Unicode code point + floor(codePoint) != codePoint // not an integer + ) { + throw RangeError('Invalid code point: ' + codePoint); + } + if (codePoint <= 0xFFFF) { + // BMP code point + codeUnits.push(codePoint); + } else { + // Astral code point; split in surrogate halves + // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + codePoint -= 0x10000; + highSurrogate = (codePoint >> 10) + 0xD800; + lowSurrogate = (codePoint % 0x400) + 0xDC00; + codeUnits.push(highSurrogate, lowSurrogate); + } + if (index + 1 == length || codeUnits.length > MAX_SIZE) { + result += stringFromCharCode.apply(null, codeUnits); + codeUnits.length = 0; + } + } + return result; + } + + function assertType(type, expected) { + if (expected.indexOf('|') == -1) { + if (type == expected) { + return; + } + + throw Error('Invalid node type: ' + type); + } + + expected = assertType.hasOwnProperty(expected) + ? assertType[expected] + : (assertType[expected] = RegExp('^(?:' + expected + ')$')); + + if (expected.test(type)) { + return; + } + + throw Error('Invalid node type: ' + type); + } + + /*--------------------------------------------------------------------------*/ + + function generate(node) { + var type = node.type; + + if (generate.hasOwnProperty(type) && typeof generate[type] == 'function') { + return generate[type](node); + } + + throw Error('Invalid node type: ' + type); + } + + /*--------------------------------------------------------------------------*/ + + function generateAlternative(node) { + assertType(node.type, 'alternative'); + + var terms = node.body, + length = terms ? terms.length : 0; + + if (length == 1) { + return generateTerm(terms[0]); + } else { + var i = -1, + result = ''; + + while (++i < length) { + result += generateTerm(terms[i]); + } + + return result; + } + } + + function generateAnchor(node) { + assertType(node.type, 'anchor'); + + switch (node.kind) { + case 'start': + return '^'; + case 'end': + return '$'; + case 'boundary': + return '\\b'; + case 'not-boundary': + return '\\B'; + default: + throw Error('Invalid assertion'); + } + } + + function generateAtom(node) { + assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value'); + + return generate(node); + } + + function generateCharacterClass(node) { + assertType(node.type, 'characterClass'); + + var classRanges = node.body, + length = classRanges ? classRanges.length : 0; + + var i = -1, + result = '['; + + if (node.negative) { + result += '^'; + } + + while (++i < length) { + result += generateClassAtom(classRanges[i]); + } + + result += ']'; + + return result; + } + + function generateCharacterClassEscape(node) { + assertType(node.type, 'characterClassEscape'); + + return '\\' + node.value; + } + + function generateCharacterClassRange(node) { + assertType(node.type, 'characterClassRange'); + + var min = node.min, + max = node.max; + + if (min.type == 'characterClassRange' || max.type == 'characterClassRange') { + throw Error('Invalid character class range'); + } + + return generateClassAtom(min) + '-' + generateClassAtom(max); + } + + function generateClassAtom(node) { + assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value'); + + return generate(node); + } + + function generateDisjunction(node) { + assertType(node.type, 'disjunction'); + + var body = node.body, + length = body ? body.length : 0; + + if (length == 0) { + throw Error('No body'); + } else if (length == 1) { + return generate(body[0]); + } else { + var i = -1, + result = ''; + + while (++i < length) { + if (i != 0) { + result += '|'; + } + result += generate(body[i]); + } + + return result; + } + } + + function generateDot(node) { + assertType(node.type, 'dot'); + + return '.'; + } + + function generateGroup(node) { + assertType(node.type, 'group'); + + var result = '('; + + switch (node.behavior) { + case 'normal': + break; + case 'ignore': + result += '?:'; + break; + case 'lookahead': + result += '?='; + break; + case 'negativeLookahead': + result += '?!'; + break; + default: + throw Error('Invalid behaviour: ' + node.behaviour); + } + + var body = node.body, + length = body ? body.length : 0; + + if (length == 1) { + result += generate(body[0]); + } else { + var i = -1; + + while (++i < length) { + result += generate(body[i]); + } + } + + result += ')'; + + return result; + } + + function generateQuantifier(node) { + assertType(node.type, 'quantifier'); + + var quantifier = '', + min = node.min, + max = node.max; + + switch (max) { + case undefined: + case null: + switch (min) { + case 0: + quantifier = '*' + break; + case 1: + quantifier = '+'; + break; + default: + quantifier = '{' + min + ',}'; + break; + } + break; + default: + if (min == max) { + quantifier = '{' + min + '}'; + } + else if (min == 0 && max == 1) { + quantifier = '?'; + } else { + quantifier = '{' + min + ',' + max + '}'; + } + break; + } + + if (!node.greedy) { + quantifier += '?'; + } + + return generateAtom(node.body[0]) + quantifier; + } + + function generateReference(node) { + assertType(node.type, 'reference'); + + return '\\' + node.matchIndex; + } + + function generateTerm(node) { + assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value'); + + return generate(node); + } + + function generateValue(node) { + assertType(node.type, 'value'); + + var kind = node.kind, + codePoint = node.codePoint; + + switch (kind) { + case 'controlLetter': + return '\\c' + fromCodePoint(codePoint + 64); + case 'hexadecimalEscape': + return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2); + case 'identifier': + return '\\' + fromCodePoint(codePoint); + case 'null': + return '\\' + codePoint; + case 'octal': + return '\\' + codePoint.toString(8); + case 'singleEscape': + switch (codePoint) { + case 0x0008: + return '\\b'; + case 0x009: + return '\\t'; + case 0x00A: + return '\\n'; + case 0x00B: + return '\\v'; + case 0x00C: + return '\\f'; + case 0x00D: + return '\\r'; + default: + throw Error('Invalid codepoint: ' + codePoint); + } + case 'symbol': + return fromCodePoint(codePoint); + case 'unicodeEscape': + return '\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4); + case 'unicodeCodePointEscape': + return '\\u{' + codePoint.toString(16).toUpperCase() + '}'; + default: + throw Error('Unsupported node kind: ' + kind); + } + } + + /*--------------------------------------------------------------------------*/ + + generate.alternative = generateAlternative; + generate.anchor = generateAnchor; + generate.characterClass = generateCharacterClass; + generate.characterClassEscape = generateCharacterClassEscape; + generate.characterClassRange = generateCharacterClassRange; + generate.disjunction = generateDisjunction; + generate.dot = generateDot; + generate.group = generateGroup; + generate.quantifier = generateQuantifier; + generate.reference = generateReference; + generate.value = generateValue; + + /*--------------------------------------------------------------------------*/ + + // export regjsgen + // some AMD build optimizers, like r.js, check for condition patterns like the following: + if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // define as an anonymous module so, through path mapping, it can be aliased + define(function() { + return { + 'generate': generate + }; + }); + } + // check for `exports` after `define` in case a build optimizer adds an `exports` object + else if (freeExports && freeModule) { + // in Narwhal, Node.js, Rhino -require, or RingoJS + freeExports.generate = generate; + } + // in a browser or Rhino + else { + root.regjsgen = { + 'generate': generate + }; + } +}.call(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],435:[function(require,module,exports){ +// regjsparser +// +// ================================================================== +// +// See ECMA-262 Standard: 15.10.1 +// +// NOTE: The ECMA-262 standard uses the term "Assertion" for /^/. Here the +// term "Anchor" is used. +// +// Pattern :: +// Disjunction +// +// Disjunction :: +// Alternative +// Alternative | Disjunction +// +// Alternative :: +// [empty] +// Alternative Term +// +// Term :: +// Anchor +// Atom +// Atom Quantifier +// +// Anchor :: +// ^ +// $ +// \ b +// \ B +// ( ? = Disjunction ) +// ( ? ! Disjunction ) +// +// Quantifier :: +// QuantifierPrefix +// QuantifierPrefix ? +// +// QuantifierPrefix :: +// * +// + +// ? +// { DecimalDigits } +// { DecimalDigits , } +// { DecimalDigits , DecimalDigits } +// +// Atom :: +// PatternCharacter +// . +// \ AtomEscape +// CharacterClass +// ( Disjunction ) +// ( ? : Disjunction ) +// +// PatternCharacter :: +// SourceCharacter but not any of: ^ $ \ . * + ? ( ) [ ] { } | +// +// AtomEscape :: +// DecimalEscape +// CharacterEscape +// CharacterClassEscape +// +// CharacterEscape[U] :: +// ControlEscape +// c ControlLetter +// HexEscapeSequence +// RegExpUnicodeEscapeSequence[?U] (ES6) +// IdentityEscape[?U] +// +// ControlEscape :: +// one of f n r t v +// ControlLetter :: +// one of +// a b c d e f g h i j k l m n o p q r s t u v w x y z +// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z +// +// IdentityEscape :: +// SourceCharacter but not IdentifierPart +// +// +// +// DecimalEscape :: +// DecimalIntegerLiteral [lookahead ∉ DecimalDigit] +// +// CharacterClassEscape :: +// one of d D s S w W +// +// CharacterClass :: +// [ [lookahead ∉ {^}] ClassRanges ] +// [ ^ ClassRanges ] +// +// ClassRanges :: +// [empty] +// NonemptyClassRanges +// +// NonemptyClassRanges :: +// ClassAtom +// ClassAtom NonemptyClassRangesNoDash +// ClassAtom - ClassAtom ClassRanges +// +// NonemptyClassRangesNoDash :: +// ClassAtom +// ClassAtomNoDash NonemptyClassRangesNoDash +// ClassAtomNoDash - ClassAtom ClassRanges +// +// ClassAtom :: +// - +// ClassAtomNoDash +// +// ClassAtomNoDash :: +// SourceCharacter but not one of \ or ] or - +// \ ClassEscape +// +// ClassEscape :: +// DecimalEscape +// b +// CharacterEscape +// CharacterClassEscape + +(function() { + + function parse(str, flags) { + function addRaw(node) { + node.raw = str.substring(node.range[0], node.range[1]); + return node; + } + + function updateRawStart(node, start) { + node.range[0] = start; + return addRaw(node); + } + + function createAnchor(kind, rawLength) { + return addRaw({ + type: 'anchor', + kind: kind, + range: [ + pos - rawLength, + pos + ] + }); + } + + function createValue(kind, codePoint, from, to) { + return addRaw({ + type: 'value', + kind: kind, + codePoint: codePoint, + range: [from, to] + }); + } + + function createEscaped(kind, codePoint, value, fromOffset) { + fromOffset = fromOffset || 0; + return createValue(kind, codePoint, pos - (value.length + fromOffset), pos); + } + + function createCharacter(matches) { + var _char = matches[0]; + var first = _char.charCodeAt(0); + if (hasUnicodeFlag) { + var second; + if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) { + second = lookahead().charCodeAt(0); + if (second >= 0xDC00 && second <= 0xDFFF) { + // Unicode surrogate pair + pos++; + return createValue( + 'symbol', + (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000, + pos - 2, pos); + } + } + } + return createValue('symbol', first, pos - 1, pos); + } + + function createDisjunction(alternatives, from, to) { + return addRaw({ + type: 'disjunction', + body: alternatives, + range: [ + from, + to + ] + }); + } + + function createDot() { + return addRaw({ + type: 'dot', + range: [ + pos - 1, + pos + ] + }); + } + + function createCharacterClassEscape(value) { + return addRaw({ + type: 'characterClassEscape', + value: value, + range: [ + pos - 2, + pos + ] + }); + } + + function createReference(matchIndex) { + return addRaw({ + type: 'reference', + matchIndex: parseInt(matchIndex, 10), + range: [ + pos - 1 - matchIndex.length, + pos + ] + }); + } + + function createGroup(behavior, disjunction, from, to) { + return addRaw({ + type: 'group', + behavior: behavior, + body: disjunction, + range: [ + from, + to + ] + }); + } + + function createQuantifier(min, max, from, to) { + if (to == null) { + from = pos - 1; + to = pos; + } + + return addRaw({ + type: 'quantifier', + min: min, + max: max, + greedy: true, + body: null, // set later on, + range: [ + from, + to + ] + }); + } + + function createAlternative(terms, from, to) { + return addRaw({ + type: 'alternative', + body: terms, + range: [ + from, + to + ] + }); + } + + function createCharacterClass(classRanges, negative, from, to) { + return addRaw({ + type: 'characterClass', + body: classRanges, + negative: negative, + range: [ + from, + to + ] + }); + } + + function createClassRange(min, max, from, to) { + // See 15.10.2.15: + if (min.codePoint > max.codePoint) { + throw SyntaxError('invalid range in character class'); + } + + return addRaw({ + type: 'characterClassRange', + min: min, + max: max, + range: [ + from, + to + ] + }); + } + + function flattenBody(body) { + if (body.type === 'alternative') { + return body.body; + } else { + return [body]; + } + } + + function isEmpty(obj) { + return obj.type === 'empty'; + } + + function incr(amount) { + amount = (amount || 1); + var res = str.substring(pos, pos + amount); + pos += (amount || 1); + return res; + } + + function skip(value) { + if (!match(value)) { + throw SyntaxError('character: ' + value); + } + } + + function match(value) { + if (str.indexOf(value, pos) === pos) { + return incr(value.length); + } + } + + function lookahead() { + return str[pos]; + } + + function current(value) { + return str.indexOf(value, pos) === pos; + } + + function next(value) { + return str[pos + 1] === value; + } + + function matchReg(regExp) { + var subStr = str.substring(pos); + var res = subStr.match(regExp); + if (res) { + res.range = []; + res.range[0] = pos; + incr(res[0].length); + res.range[1] = pos; + } + return res; + } + + function parseDisjunction() { + // Disjunction :: + // Alternative + // Alternative | Disjunction + var res = [], from = pos; + res.push(parseAlternative()); + + while (match('|')) { + res.push(parseAlternative()); + } + + if (res.length === 1) { + return res[0]; + } + + return createDisjunction(res, from, pos); + } + + function parseAlternative() { + var res = [], from = pos; + var term; + + // Alternative :: + // [empty] + // Alternative Term + while (term = parseTerm()) { + res.push(term); + } + + if (res.length === 1) { + return res[0]; + } + + return createAlternative(res, from, pos); + } + + function parseTerm() { + // Term :: + // Anchor + // Atom + // Atom Quantifier + + if (pos >= str.length || current('|') || current(')')) { + return null; /* Means: The term is empty */ + } + + var anchor = parseAnchor(); + + if (anchor) { + return anchor; + } + + var atom = parseAtom(); + if (!atom) { + throw SyntaxError('Expected atom') + } + var quantifier = parseQuantifier() || false; + if (quantifier) { + quantifier.body = flattenBody(atom); + // The quantifier contains the atom. Therefore, the beginning of the + // quantifier range is given by the beginning of the atom. + updateRawStart(quantifier, atom.range[0]); + return quantifier; + } + return atom; + } + + function parseGroup(matchA, typeA, matchB, typeB) { + var type = null, from = pos; + + if (match(matchA)) { + type = typeA; + } else if (match(matchB)) { + type = typeB; + } else { + return false; + } + + var body = parseDisjunction(); + if (!body) { + throw SyntaxError('Expected disjunction'); + } + skip(')'); + var group = createGroup(type, flattenBody(body), from, pos); + + if (type == 'normal') { + // Keep track of the number of closed groups. This is required for + // parseDecimalEscape(). In case the string is parsed a second time the + // value already holds the total count and no incrementation is required. + if (firstIteration) { + closedCaptureCounter++; + } + } + return group; + } + + function parseAnchor() { + // Anchor :: + // ^ + // $ + // \ b + // \ B + // ( ? = Disjunction ) + // ( ? ! Disjunction ) + var res, from = pos; + + if (match('^')) { + return createAnchor('start', 1 /* rawLength */); + } else if (match('$')) { + return createAnchor('end', 1 /* rawLength */); + } else if (match('\\b')) { + return createAnchor('boundary', 2 /* rawLength */); + } else if (match('\\B')) { + return createAnchor('not-boundary', 2 /* rawLength */); + } else { + return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead'); + } + } + + function parseQuantifier() { + // Quantifier :: + // QuantifierPrefix + // QuantifierPrefix ? + // + // QuantifierPrefix :: + // * + // + + // ? + // { DecimalDigits } + // { DecimalDigits , } + // { DecimalDigits , DecimalDigits } + + var res; + var quantifier; + var min, max; + + if (match('*')) { + quantifier = createQuantifier(0); + } + else if (match('+')) { + quantifier = createQuantifier(1); + } + else if (match('?')) { + quantifier = createQuantifier(0, 1); + } + else if (res = matchReg(/^\{([0-9]+)\}/)) { + min = parseInt(res[1], 10); + quantifier = createQuantifier(min, min, res.range[0], res.range[1]); + } + else if (res = matchReg(/^\{([0-9]+),\}/)) { + min = parseInt(res[1], 10); + quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]); + } + else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) { + min = parseInt(res[1], 10); + max = parseInt(res[2], 10); + if (min > max) { + throw SyntaxError('numbers out of order in {} quantifier'); + } + quantifier = createQuantifier(min, max, res.range[0], res.range[1]); + } + + if (quantifier) { + if (match('?')) { + quantifier.greedy = false; + quantifier.range[1] += 1; + } + } + + return quantifier; + } + + function parseAtom() { + // Atom :: + // PatternCharacter + // . + // \ AtomEscape + // CharacterClass + // ( Disjunction ) + // ( ? : Disjunction ) + + var res; + + // jviereck: allow ']', '}' here as well to be compatible with browser's + // implementations: ']'.match(/]/); + // if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) { + if (res = matchReg(/^[^^$\\.*+?(){[|]/)) { + // PatternCharacter + return createCharacter(res); + } + else if (match('.')) { + // . + return createDot(); + } + else if (match('\\')) { + // \ AtomEscape + res = parseAtomEscape(); + if (!res) { + throw SyntaxError('atomEscape'); + } + return res; + } + else if (res = parseCharacterClass()) { + return res; + } + else { + // ( Disjunction ) + // ( ? : Disjunction ) + return parseGroup('(?:', 'ignore', '(', 'normal'); + } + } + + function parseUnicodeSurrogatePairEscape(firstEscape) { + if (hasUnicodeFlag) { + var first, second; + if (firstEscape.kind == 'unicodeEscape' && + (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF && + current('\\') && next('u') ) { + var prevPos = pos; + pos++; + var secondEscape = parseClassEscape(); + if (secondEscape.kind == 'unicodeEscape' && + (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) { + // Unicode surrogate pair + firstEscape.range[1] = secondEscape.range[1]; + firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + firstEscape.type = 'value'; + firstEscape.kind = 'unicodeCodePointEscape'; + addRaw(firstEscape); + } + else { + pos = prevPos; + } + } + } + return firstEscape; + } + + function parseClassEscape() { + return parseAtomEscape(true); + } + + function parseAtomEscape(insideCharacterClass) { + // AtomEscape :: + // DecimalEscape + // CharacterEscape + // CharacterClassEscape + + var res; + + res = parseDecimalEscape(); + if (res) { + return res; + } + + // For ClassEscape + if (insideCharacterClass) { + if (match('b')) { + // 15.10.2.19 + // The production ClassEscape :: b evaluates by returning the + // CharSet containing the one character (Unicode value 0008). + return createEscaped('singleEscape', 0x0008, '\\b'); + } else if (match('B')) { + throw SyntaxError('\\B not possible inside of CharacterClass'); + } + } + + res = parseCharacterEscape(); + + return res; + } + + + function parseDecimalEscape() { + // DecimalEscape :: + // DecimalIntegerLiteral [lookahead ∉ DecimalDigit] + // CharacterClassEscape :: one of d D s S w W + + var res, match; + + if (res = matchReg(/^(?!0)\d+/)) { + match = res[0]; + var refIdx = parseInt(res[0], 10); + if (refIdx <= closedCaptureCounter) { + // If the number is smaller than the normal-groups found so + // far, then it is a reference... + return createReference(res[0]); + } else { + // ... otherwise it needs to be interpreted as a octal (if the + // number is in an octal format). If it is NOT octal format, + // then the slash is ignored and the number is matched later + // as normal characters. + + // Recall the negative decision to decide if the input must be parsed + // a second time with the total normal-groups. + backrefDenied.push(refIdx); + + // Reset the position again, as maybe only parts of the previous + // matched numbers are actual octal numbers. E.g. in '019' only + // the '01' should be matched. + incr(-res[0].length); + if (res = matchReg(/^[0-7]{1,3}/)) { + return createEscaped('octal', parseInt(res[0], 8), res[0], 1); + } else { + // If we end up here, we have a case like /\91/. Then the + // first slash is to be ignored and the 9 & 1 to be treated + // like ordinary characters. Create a character for the + // first number only here - other number-characters + // (if available) will be matched later. + res = createCharacter(matchReg(/^[89]/)); + return updateRawStart(res, res.range[0] - 1); + } + } + } + // Only allow octal numbers in the following. All matched numbers start + // with a zero (if the do not, the previous if-branch is executed). + // If the number is not octal format and starts with zero (e.g. `091`) + // then only the zeros `0` is treated here and the `91` are ordinary + // characters. + // Example: + // /\091/.exec('\091')[0].length === 3 + else if (res = matchReg(/^[0-7]{1,3}/)) { + match = res[0]; + if (/^0{1,3}$/.test(match)) { + // If they are all zeros, then only take the first one. + return createEscaped('null', 0x0000, '0', match.length + 1); + } else { + return createEscaped('octal', parseInt(match, 8), match, 1); + } + } else if (res = matchReg(/^[dDsSwW]/)) { + return createCharacterClassEscape(res[0]); + } + return false; + } + + function parseCharacterEscape() { + // CharacterEscape :: + // ControlEscape + // c ControlLetter + // HexEscapeSequence + // UnicodeEscapeSequence + // IdentityEscape + + var res; + if (res = matchReg(/^[fnrtv]/)) { + // ControlEscape + var codePoint = 0; + switch (res[0]) { + case 't': codePoint = 0x009; break; + case 'n': codePoint = 0x00A; break; + case 'v': codePoint = 0x00B; break; + case 'f': codePoint = 0x00C; break; + case 'r': codePoint = 0x00D; break; + } + return createEscaped('singleEscape', codePoint, '\\' + res[0]); + } else if (res = matchReg(/^c([a-zA-Z])/)) { + // c ControlLetter + return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2); + } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) { + // HexEscapeSequence + return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2); + } else if (res = matchReg(/^u([0-9a-fA-F]{4})/)) { + // UnicodeEscapeSequence + return parseUnicodeSurrogatePairEscape( + createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2) + ); + } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) { + // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape) + return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4); + } else { + // IdentityEscape + return parseIdentityEscape(); + } + } + + // Taken from the Esprima parser. + function isIdentifierPart(ch) { + // Generated by `tools/generate-identifier-regex.js`. + var NonAsciiIdentifierPart = new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]'); + + return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) + (ch >= 65 && ch <= 90) || // A..Z + (ch >= 97 && ch <= 122) || // a..z + (ch >= 48 && ch <= 57) || // 0..9 + (ch === 92) || // \ (backslash) + ((ch >= 0x80) && NonAsciiIdentifierPart.test(String.fromCharCode(ch))); + } + + function parseIdentityEscape() { + // IdentityEscape :: + // SourceCharacter but not IdentifierPart + // + // + + var ZWJ = '\u200C'; + var ZWNJ = '\u200D'; + + var res; + var tmp; + + if (!isIdentifierPart(lookahead())) { + tmp = incr(); + return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1); + } + + if (match(ZWJ)) { + // + return createEscaped('identifier', 0x200C, ZWJ); + } else if (match(ZWNJ)) { + // + return createEscaped('identifier', 0x200D, ZWNJ); + } + + return null; + } + + function parseCharacterClass() { + // CharacterClass :: + // [ [lookahead ∉ {^}] ClassRanges ] + // [ ^ ClassRanges ] + + var res, from = pos; + if (res = matchReg(/^\[\^/)) { + res = parseClassRanges(); + skip(']'); + return createCharacterClass(res, true, from, pos); + } else if (match('[')) { + res = parseClassRanges(); + skip(']'); + return createCharacterClass(res, false, from, pos); + } + + return null; + } + + function parseClassRanges() { + // ClassRanges :: + // [empty] + // NonemptyClassRanges + + var res; + if (current(']')) { + // Empty array means nothing insinde of the ClassRange. + return []; + } else { + res = parseNonemptyClassRanges(); + if (!res) { + throw SyntaxError('nonEmptyClassRanges'); + } + return res; + } + } + + function parseHelperClassRanges(atom) { + var from, to, res; + if (current('-') && !next(']')) { + // ClassAtom - ClassAtom ClassRanges + skip('-'); + + res = parseClassAtom(); + if (!res) { + throw SyntaxError('classAtom'); + } + to = pos; + var classRanges = parseClassRanges(); + if (!classRanges) { + throw SyntaxError('classRanges'); + } + from = atom.range[0]; + if (classRanges.type === 'empty') { + return [createClassRange(atom, res, from, to)]; + } + return [createClassRange(atom, res, from, to)].concat(classRanges); + } + + res = parseNonemptyClassRangesNoDash(); + if (!res) { + throw SyntaxError('nonEmptyClassRangesNoDash'); + } + + return [atom].concat(res); + } + + function parseNonemptyClassRanges() { + // NonemptyClassRanges :: + // ClassAtom + // ClassAtom NonemptyClassRangesNoDash + // ClassAtom - ClassAtom ClassRanges + + var atom = parseClassAtom(); + if (!atom) { + throw SyntaxError('classAtom'); + } + + if (current(']')) { + // ClassAtom + return [atom]; + } + + // ClassAtom NonemptyClassRangesNoDash + // ClassAtom - ClassAtom ClassRanges + return parseHelperClassRanges(atom); + } + + function parseNonemptyClassRangesNoDash() { + // NonemptyClassRangesNoDash :: + // ClassAtom + // ClassAtomNoDash NonemptyClassRangesNoDash + // ClassAtomNoDash - ClassAtom ClassRanges + + var res = parseClassAtom(); + if (!res) { + throw SyntaxError('classAtom'); + } + if (current(']')) { + // ClassAtom + return res; + } + + // ClassAtomNoDash NonemptyClassRangesNoDash + // ClassAtomNoDash - ClassAtom ClassRanges + return parseHelperClassRanges(res); + } + + function parseClassAtom() { + // ClassAtom :: + // - + // ClassAtomNoDash + if (match('-')) { + return createCharacter('-'); + } else { + return parseClassAtomNoDash(); + } + } + + function parseClassAtomNoDash() { + // ClassAtomNoDash :: + // SourceCharacter but not one of \ or ] or - + // \ ClassEscape + + var res; + if (res = matchReg(/^[^\\\]-]/)) { + return createCharacter(res[0]); + } else if (match('\\')) { + res = parseClassEscape(); + if (!res) { + throw SyntaxError('classEscape'); + } + + return parseUnicodeSurrogatePairEscape(res); + } + } + + var backrefDenied = []; + var closedCaptureCounter = 0; + var firstIteration = true; + var hasUnicodeFlag = (flags || "").indexOf("u") !== -1; + var pos = 0; + + // Convert the input to a string and treat the empty string special. + str = String(str); + if (str === '') { + str = '(?:)'; + } + + var result = parseDisjunction(); + + if (result.range[1] !== str.length) { + throw SyntaxError('Could not parse entire input - got stuck: ' + str); + } + + // The spec requires to interpret the `\2` in `/\2()()/` as backreference. + // As the parser collects the number of capture groups as the string is + // parsed it is impossible to make these decisions at the point the `\2` is + // handled. In case the local decision turns out to be wrongq after the + // parsing has finished, the input string is parsed a second time with the + // total count of capture groups set. + // + // SEE: https://github.com/jviereck/regjsparser/issues/70 + for (var i = 0; i < backrefDenied.length; i++) { + if (backrefDenied[i] <= closedCaptureCounter) { + // Parse the input a second time. + pos = 0; + firstIteration = false; + return parseDisjunction(); + } + } + + return result; + }; + + var regjsparser = { + parse: parse + }; + + if (typeof module !== 'undefined' && module.exports) { + module.exports = regjsparser; + } else { + window.regjsparser = regjsparser; + } + +}()); + +},{}],436:[function(require,module,exports){ +var generate = require('regjsgen').generate; +var parse = require('regjsparser').parse; +var regenerate = require('regenerate'); +var iuMappings = require('./data/iu-mappings.json'); +var ESCAPE_SETS = require('./data/character-class-escape-sets.js'); + +function getCharacterClassEscapeSet(character) { + if (unicode) { + if (ignoreCase) { + return ESCAPE_SETS.UNICODE_IGNORE_CASE[character]; + } + return ESCAPE_SETS.UNICODE[character]; + } + return ESCAPE_SETS.REGULAR[character]; +} + +var object = {}; +var hasOwnProperty = object.hasOwnProperty; +function has(object, property) { + return hasOwnProperty.call(object, property); +} + +// Prepare a Regenerate set containing all code points, used for negative +// character classes (if any). +var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF); +// Without the `u` flag, the range stops at 0xFFFF. +// https://mths.be/es6#sec-pattern-semantics +var BMP_SET = regenerate().addRange(0x0, 0xFFFF); + +// Prepare a Regenerate set containing all code points that are supposed to be +// matched by `/./u`. https://mths.be/es6#sec-atom +var DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points + .remove( + // minus `LineTerminator`s (https://mths.be/es6#sec-line-terminators): + 0x000A, // Line Feed + 0x000D, // Carriage Return + 0x2028, // Line Separator + 0x2029 // Paragraph Separator + ); +// Prepare a Regenerate set containing all code points that are supposed to be +// matched by `/./` (only BMP code points). +var DOT_SET = DOT_SET_UNICODE.clone() + .intersection(BMP_SET); + +// Add a range of code points + any case-folded code points in that range to a +// set. +regenerate.prototype.iuAddRange = function(min, max) { + var $this = this; + do { + var folded = caseFold(min); + if (folded) { + $this.add(folded); + } + } while (++min <= max); + return $this; +}; + +function assign(target, source) { + for (var key in source) { + // Note: `hasOwnProperty` is not needed here. + target[key] = source[key]; + } +} + +function update(item, pattern) { + // TODO: Test if memoizing `pattern` here is worth the effort. + if (!pattern) { + return; + } + var tree = parse(pattern, ''); + switch (tree.type) { + case 'characterClass': + case 'group': + case 'value': + // No wrapping needed. + break; + default: + // Wrap the pattern in a non-capturing group. + tree = wrap(tree, pattern); + } + assign(item, tree); +} + +function wrap(tree, pattern) { + // Wrap the pattern in a non-capturing group. + return { + 'type': 'group', + 'behavior': 'ignore', + 'body': [tree], + 'raw': '(?:' + pattern + ')' + }; +} + +function caseFold(codePoint) { + return has(iuMappings, codePoint) ? iuMappings[codePoint] : false; +} + +var ignoreCase = false; +var unicode = false; +function processCharacterClass(characterClassItem) { + var set = regenerate(); + var body = characterClassItem.body.forEach(function(item) { + switch (item.type) { + case 'value': + set.add(item.codePoint); + if (ignoreCase && unicode) { + var folded = caseFold(item.codePoint); + if (folded) { + set.add(folded); + } + } + break; + case 'characterClassRange': + var min = item.min.codePoint; + var max = item.max.codePoint; + set.addRange(min, max); + if (ignoreCase && unicode) { + set.iuAddRange(min, max); + } + break; + case 'characterClassEscape': + set.add(getCharacterClassEscapeSet(item.value)); + break; + // The `default` clause is only here as a safeguard; it should never be + // reached. Code coverage tools should ignore it. + /* istanbul ignore next */ + default: + throw Error('Unknown term type: ' + item.type); + } + }); + if (characterClassItem.negative) { + set = (unicode ? UNICODE_SET : BMP_SET).clone().remove(set); + } + update(characterClassItem, set.toString()); + return characterClassItem; +} + +function processTerm(item) { + switch (item.type) { + case 'dot': + update( + item, + (unicode ? DOT_SET_UNICODE : DOT_SET).toString() + ); + break; + case 'characterClass': + item = processCharacterClass(item); + break; + case 'characterClassEscape': + update( + item, + getCharacterClassEscapeSet(item.value).toString() + ); + break; + case 'alternative': + case 'disjunction': + case 'group': + case 'quantifier': + item.body = item.body.map(processTerm); + break; + case 'value': + var codePoint = item.codePoint; + var set = regenerate(codePoint); + if (ignoreCase && unicode) { + var folded = caseFold(codePoint); + if (folded) { + set.add(folded); + } + } + update(item, set.toString()); + break; + case 'anchor': + case 'empty': + case 'group': + case 'reference': + // Nothing to do here. + break; + // The `default` clause is only here as a safeguard; it should never be + // reached. Code coverage tools should ignore it. + /* istanbul ignore next */ + default: + throw Error('Unknown term type: ' + item.type); + } + return item; +}; + +module.exports = function(pattern, flags) { + var tree = parse(pattern, flags); + ignoreCase = flags ? flags.indexOf('i') > -1 : false; + unicode = flags ? flags.indexOf('u') > -1 : false; + assign(tree, processTerm(tree)); + return generate(tree); +}; + +},{"./data/character-class-escape-sets.js":431,"./data/iu-mappings.json":432,"regenerate":433,"regjsgen":434,"regjsparser":435}],437:[function(require,module,exports){ +'use strict'; +var isFinite = require('is-finite'); + +module.exports = function (str, n) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string as the first argument'); + } + + if (n < 0 || !isFinite(n)) { + throw new TypeError('Expected a finite positive number'); + } + + var ret = ''; + + do { + if (n & 1) { + ret += str; + } + + str += str; + } while (n = n >> 1); + + return ret; +}; + +},{"is-finite":438}],438:[function(require,module,exports){ +arguments[4][304][0].apply(exports,arguments) +},{"dup":304}],439:[function(require,module,exports){ +'use strict'; +module.exports = /^#!.*/; + +},{}],440:[function(require,module,exports){ +'use strict'; +module.exports = function (str) { + var isExtendedLengthPath = /^\\\\\?\\/.test(str); + var hasNonAscii = /[^\x00-\x80]+/.test(str); + + if (isExtendedLengthPath || hasNonAscii) { + return str; + } + + return str.replace(/\\/g, '/'); +}; + +},{}],441:[function(require,module,exports){ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./source-map/source-node').SourceNode; + +},{"./source-map/source-map-consumer":447,"./source-map/source-map-generator":448,"./source-map/source-node":449}],442:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = {}; + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var isDuplicate = this.has(aStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[util.toSetString(aStr)] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + return Object.prototype.hasOwnProperty.call(this._set, + util.toSetString(aStr)); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (this.has(aStr)) { + return this._set[util.toSetString(aStr)]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + +}); + +},{"./util":450,"amdefine":451}],443:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. 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. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 THE COPYRIGHT + * OWNER OR CONTRIBUTORS 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. + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64 = require('./base64'); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charAt(aIndex++)); + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + +}); + +},{"./base64":444,"amdefine":451}],444:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var charToIntMap = {}; + var intToCharMap = {}; + + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + .split('') + .forEach(function (ch, index) { + charToIntMap[ch] = index; + intToCharMap[index] = ch; + }); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function base64_encode(aNumber) { + if (aNumber in intToCharMap) { + return intToCharMap[aNumber]; + } + throw new TypeError("Must be between 0 and 63: " + aNumber); + }; + + /** + * Decode a single base 64 digit to an integer. + */ + exports.decode = function base64_decode(aChar) { + if (aChar in charToIntMap) { + return charToIntMap[aChar]; + } + throw new TypeError("Not a valid base 64 digit: " + aChar); + }; + +}); + +},{"amdefine":451}],445:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + +}); + +},{"amdefine":451}],446:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositions(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + var mapping; + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositions); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + +}); + +},{"./util":450,"amdefine":451}],447:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + var binarySearch = require('./binary-search'); + var ArraySet = require('./array-set').ArraySet; + var base64VLQ = require('./base64-vlq'); + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._nextCharIsMappingSeparator = + function SourceMapConsumer_nextCharIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source; + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name + }; + }).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a single line. Otherwise, returns all mappings + * corresponding to a single line and column. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + var originalLine = mapping.originalLine; + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line. Since mappings are sorted, this is + // guaranteed to find all mappings for the line we are searching for. + while (mapping && mapping.originalLine === originalLine && + (aArgs.column === undefined || + mapping.originalColumn === originalColumn)) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + sources = sources.map(util.normalize); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names, true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + smc.__generatedMappings = aSourceMap._mappings.toArray().slice(); + smc.__originalMappings = aSourceMap._mappings.toArray().slice() + .sort(util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedValues = {}; + var temp = {}; + var mapping, str, values, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + ++index; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + ++index; + } + else { + mapping = {}; + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; ++end) { + if (this._nextCharIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + values = cachedValues[str]; + if (values) { + index += str.length; + } else { + values = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + values.push(value); + } + cachedValues[str] = values; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + values[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (values.length > 1) { + // Original source. + mapping.source = this._sources.at(previousSource + values[1]); + previousSource += values[1]; + if (values.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + // Original line. + mapping.originalLine = previousOriginalLine + values[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + if (values.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + // Original column. + mapping.originalColumn = previousOriginalColumn + values[3]; + previousOriginalColumn = mapping.originalColumn; + + if (values.length > 4) { + // Original name. + mapping.name = this._names.at(previousName + values[4]); + previousName += values[4]; + } + } + + this.__generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + this.__originalMappings.push(mapping); + } + } + } + + this.__generatedMappings.sort(util.compareByGeneratedPositions); + this.__originalMappings.sort(util.compareByOriginalPositions); + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source != null && this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: util.getArg(mapping, 'name', null) + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * availible. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + }; + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[i]; + + var source = mapping.source; + var sourceRoot = section.consumer.sourceRoot; + + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.column + + (section.generatedOffset.generatedLine === mapping.generatedLine) + ? section.generatedOffset.generatedColumn - 1 + : 0, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + }; + }; + + this.__generatedMappings.sort(util.compareByGeneratedPositions); + this.__originalMappings.sort(util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + +}); + +},{"./array-set":442,"./base64-vlq":443,"./binary-search":445,"./util":450,"amdefine":451}],448:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64VLQ = require('./base64-vlq'); + var util = require('./util'); + var ArraySet = require('./array-set').ArraySet; + var MappingList = require('./mapping-list').MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null && !this._sources.has(source)) { + this._sources.add(source); + } + + if (name != null && !this._names.has(name)) { + this._names.add(name); + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = {}; + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var mapping; + + var mappings = this._mappings.toArray(); + + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + result += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositions(mapping, mappings[i - 1])) { + continue; + } + result += ','; + } + } + + result += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + result += base64VLQ.encode(this._sources.indexOf(mapping.source) + - previousSource); + previousSource = this._sources.indexOf(mapping.source); + + // lines are stored 0-based in SourceMap spec version 3 + result += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + result += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + result += base64VLQ.encode(this._names.indexOf(mapping.name) + - previousName); + previousName = this._names.indexOf(mapping.name); + } + } + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, + key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + +}); + +},{"./array-set":442,"./base64-vlq":443,"./mapping-list":446,"./util":450,"amdefine":451}],449:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; + var util = require('./util'); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + var code = ""; + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + +}); + +},{"./source-map-generator":448,"./util":450,"amdefine":451}],450:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consequtive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = (path.charAt(0) === '/'); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // XXX: It is possible to remove this block, and the tests still pass! + var url = urlParse(aRoot); + if (aPath.charAt(0) == "/" && url && url.path == "/") { + return aPath.slice(1); + } + + return aPath.indexOf(aRoot + '/') === 0 + ? aPath.substr(aRoot.length + 1) + : aPath; + } + exports.relative = relative; + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + return '$' + aStr; + } + exports.toSetString = toSetString; + + function fromSetString(aStr) { + return aStr.substr(1); + } + exports.fromSetString = fromSetString; + + function strcmp(aStr1, aStr2) { + var s1 = aStr1 || ""; + var s2 = aStr2 || ""; + return (s1 > s2) - (s1 < s2); + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp; + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + }; + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings where the generated positions are + * compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { + var cmp; + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + }; + exports.compareByGeneratedPositions = compareByGeneratedPositions; + +}); + +},{"amdefine":451}],451:[function(require,module,exports){ +(function (process,__filename){ +/** vim: et:ts=4:sw=4:sts=4 + * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/amdefine for details + */ + +/*jslint node: true */ +/*global module, process */ +'use strict'; + +/** + * Creates a define for node. + * @param {Object} module the "module" object that is defined by Node for the + * current module. + * @param {Function} [requireFn]. Node's require function for the current module. + * It only needs to be passed in Node versions before 0.5, when module.require + * did not exist. + * @returns {Function} a define function that is usable for the current node + * module. + */ +function amdefine(module, requireFn) { + 'use strict'; + var defineCache = {}, + loaderCache = {}, + alreadyCalled = false, + path = require('path'), + makeRequire, stringRequire; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part; + for (i = 0; ary[i]; i+= 1) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { + //End of the line. Keep at least one non-dot + //path segment at the front so it can be mapped + //correctly to disk. Otherwise, there is likely + //no path mapping for a path starting with '..'. + //This can still fail, but catches the most reasonable + //uses of .. + break; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + function normalize(name, baseName) { + var baseParts; + + //Adjust any relative paths. + if (name && name.charAt(0) === '.') { + //If have a base name, try to normalize against it, + //otherwise, assume it is a top-level require that will + //be relative to baseUrl in the end. + if (baseName) { + baseParts = baseName.split('/'); + baseParts = baseParts.slice(0, baseParts.length - 1); + baseParts = baseParts.concat(name.split('/')); + trimDots(baseParts); + name = baseParts.join('/'); + } + } + + return name; + } + + /** + * Create the normalize() function passed to a loader plugin's + * normalize method. + */ + function makeNormalize(relName) { + return function (name) { + return normalize(name, relName); + }; + } + + function makeLoad(id) { + function load(value) { + loaderCache[id] = value; + } + + load.fromText = function (id, text) { + //This one is difficult because the text can/probably uses + //define, and any relative paths and requires should be relative + //to that id was it would be found on disk. But this would require + //bootstrapping a module/require fairly deeply from node core. + //Not sure how best to go about that yet. + throw new Error('amdefine does not implement load.fromText'); + }; + + return load; + } + + makeRequire = function (systemRequire, exports, module, relId) { + function amdRequire(deps, callback) { + if (typeof deps === 'string') { + //Synchronous, single module require('') + return stringRequire(systemRequire, exports, module, deps, relId); + } else { + //Array of dependencies with a callback. + + //Convert the dependencies to modules. + deps = deps.map(function (depName) { + return stringRequire(systemRequire, exports, module, depName, relId); + }); + + //Wait for next tick to call back the require call. + process.nextTick(function () { + callback.apply(null, deps); + }); + } + } + + amdRequire.toUrl = function (filePath) { + if (filePath.indexOf('.') === 0) { + return normalize(filePath, path.dirname(module.filename)); + } else { + return filePath; + } + }; + + return amdRequire; + }; + + //Favor explicit value, passed in if the module wants to support Node 0.4. + requireFn = requireFn || function req() { + return module.require.apply(module, arguments); + }; + + function runFactory(id, deps, factory) { + var r, e, m, result; + + if (id) { + e = loaderCache[id] = {}; + m = { + id: id, + uri: __filename, + exports: e + }; + r = makeRequire(requireFn, e, m, id); + } else { + //Only support one define call per file + if (alreadyCalled) { + throw new Error('amdefine with no module ID cannot be called more than once per file.'); + } + alreadyCalled = true; + + //Use the real variables from node + //Use module.exports for exports, since + //the exports in here is amdefine exports. + e = module.exports; + m = module; + r = makeRequire(requireFn, e, m, module.id); + } + + //If there are dependencies, they are strings, so need + //to convert them to dependency values. + if (deps) { + deps = deps.map(function (depName) { + return r(depName); + }); + } + + //Call the factory with the right dependencies. + if (typeof factory === 'function') { + result = factory.apply(m.exports, deps); + } else { + result = factory; + } + + if (result !== undefined) { + m.exports = result; + if (id) { + loaderCache[id] = m.exports; + } + } + } + + stringRequire = function (systemRequire, exports, module, id, relId) { + //Split the ID by a ! so that + var index = id.indexOf('!'), + originalId = id, + prefix, plugin; + + if (index === -1) { + id = normalize(id, relId); + + //Straight module lookup. If it is one of the special dependencies, + //deal with it, otherwise, delegate to node. + if (id === 'require') { + return makeRequire(systemRequire, exports, module, relId); + } else if (id === 'exports') { + return exports; + } else if (id === 'module') { + return module; + } else if (loaderCache.hasOwnProperty(id)) { + return loaderCache[id]; + } else if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } else { + if(systemRequire) { + return systemRequire(originalId); + } else { + throw new Error('No module with ID: ' + id); + } + } + } else { + //There is a plugin in play. + prefix = id.substring(0, index); + id = id.substring(index + 1, id.length); + + plugin = stringRequire(systemRequire, exports, module, prefix, relId); + + if (plugin.normalize) { + id = plugin.normalize(id, makeNormalize(relId)); + } else { + //Normalize the ID normally. + id = normalize(id, relId); + } + + if (loaderCache[id]) { + return loaderCache[id]; + } else { + plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); + + return loaderCache[id]; + } + } + }; + + //Create a define function specific to the module asking for amdefine. + function define(id, deps, factory) { + if (Array.isArray(id)) { + factory = deps; + deps = id; + id = undefined; + } else if (typeof id !== 'string') { + factory = id; + id = deps = undefined; + } + + if (deps && !Array.isArray(deps)) { + factory = deps; + deps = undefined; + } + + if (!deps) { + deps = ['require', 'exports', 'module']; + } + + //Set up properties for this module. If an ID, then use + //internal cache. If no ID, then use the external variables + //for this node module. + if (id) { + //Put the module in deep freeze until there is a + //require call for it. + defineCache[id] = [id, deps, factory]; + } else { + runFactory(id, deps, factory); + } + } + + //define.require, which has access to all the values in the + //cache. Useful for AMD modules that all have IDs in the file, + //but need to finally export a value to node based on one of those + //IDs. + define.require = function (id) { + if (loaderCache[id]) { + return loaderCache[id]; + } + + if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } + }; + + define.amd = {}; + + return define; +} + +module.exports = amdefine; + +}).call(this,require('_process'),"/node_modules/source-map/node_modules/amdefine/amdefine.js") +},{"_process":183,"path":182}],452:[function(require,module,exports){ +'use strict'; +module.exports = function toFastProperties(obj) { + /*jshint -W027*/ + function f() {} + f.prototype = obj; + new f(); + return; + eval(obj); +}; + +},{}],453:[function(require,module,exports){ +'use strict'; +module.exports = function (str) { + return str.replace(/[\s\uFEFF\xA0]+$/g, ''); +}; + +},{}],454:[function(require,module,exports){ +module.exports={ + "name": "babel-core", + "description": "Turn ES6 code into readable vanilla ES5 with source maps", + "version": "5.0.8", + "author": "Sebastian McKenzie ", + "homepage": "https://babeljs.io/", + "repository": "babel/babel", + "main": "lib/babel/api/node.js", + "browser": { + "./lib/babel/api/register/node.js": "./lib/babel/api/register/browser.js" + }, + "keywords": [ + "harmony", + "classes", + "modules", + "let", + "const", + "var", + "es6", + "transpile", + "transpiler", + "6to5", + "babel" + ], + "scripts": { + "bench": "make bench", + "test": "make test" + }, + "dependencies": { + "ast-types": "~0.7.0", + "chalk": "^1.0.0", + "convert-source-map": "^0.5.0", + "core-js": "^0.8.1", + "debug": "^2.1.1", + "detect-indent": "^3.0.0", + "estraverse": "^1.9.1", + "esutils": "^1.1.6", + "fs-readdir-recursive": "^0.1.0", + "globals": "^6.2.0", + "is-integer": "^1.0.4", + "js-tokens": "1.0.0", + "leven": "^1.0.1", + "line-numbers": "0.2.0", + "lodash": "^3.2.0", + "minimatch": "^2.0.3", + "output-file-sync": "^1.1.0", + "path-is-absolute": "^1.0.0", + "private": "^0.1.6", + "regenerator-babel": "0.8.13-2", + "regexpu": "^1.1.2", + "repeating": "^1.1.2", + "shebang-regex": "^1.0.0", + "slash": "^1.0.0", + "source-map": "^0.4.0", + "source-map-support": "^0.2.9", + "to-fast-properties": "^1.0.0", + "trim-right": "^1.0.0" + }, + "devDependencies": { + "babel": "4.7.13", + "browserify": "^9.0.3", + "chai": "^2.0.0", + "eslint": "^0.15.1", + "babel-eslint": "^1.0.1", + "esvalid": "^1.1.0", + "istanbul": "^0.3.5", + "matcha": "^0.6.0", + "mocha": "^2.1.0", + "rimraf": "^2.2.8", + "uglify-js": "^2.4.16" + } +} + +},{}],455:[function(require,module,exports){ +module.exports={"abstract-expression-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-delete":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceDelete","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceSet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-comprehension-container":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-from":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-push":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"STATEMENT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call-instance-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INITIALIZERS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call-static-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CONSTRUCTOR","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INITIALIZERS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CONSTRUCTOR","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CONTEXT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"DECORATOR","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-super-constructor-call-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-super-constructor-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"corejs-is-iterator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CORE_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isIterable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"corejs-iterator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CORE_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getIterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"default-parameter":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"DEFAULT_VALUE","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"let","type":"VariableDeclaration","end":null}],"type":"Program","end":null},"exports-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-default-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-from-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"INIT","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-module-declaration-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-module-declaration":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"value":"__esModule","raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"for-of-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARR","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"for-of-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":null,"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"operator":">=","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"for-of":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-async-to-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"next","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"throw","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":null,"type":"ReturnStatement","end":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":null,"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"then","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-bind":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Function","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-class-call-check":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},"operator":"instanceof","right":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot call a class as a function","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-create-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-create-decorated-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"The decorator for method ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is of the invalid type ","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-default-props":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-defaults":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyNames","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-define-property":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-extends":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"assign","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":1,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-has-own":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-inherits":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"Super expression must either be null or a function, not ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"create","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__proto__","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-interop-require-wildcard":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"value":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-interop-require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-object-destructuring-empty":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot destructure undefined","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-object-without-properties":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"indexOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":">=","right":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-self-global":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"self","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-slice":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"slice","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-sliced-to-array-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-sliced-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"leadingComments":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-tagged-template-literal-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-tagged-template-literal":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-temporal-assert-defined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"ReferenceError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is not defined - temporal dead zone","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-temporal-undefined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null,"parenthesizedExpression":true},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-to-consumable-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-typeof":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"value":"symbol","raw":null,"type":"Literal","end":null},"alternate":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"let-scoping-return":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"v","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"ludicrous-in":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"RIGHT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"LEFT","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"named-function":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"GET_OUTER_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"property-method-assignment-wrapper-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":true,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"delegate":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"YieldExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"property-method-assignment-wrapper":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"prototype-identifier":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CLASS_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"require-assign-key":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null}],"type":"Program","end":null},"require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"rest":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"ARRAY_LEN","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"START","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARRAY_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"self-contained-helpers-head":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"HELPER","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"system":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"System","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"register","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"MODULE_DEPENDENCIES","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"EXPORT_IDENTIFIER","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"setters","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"SETTERS","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"execute","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"EXECUTE","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"tail-call-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"body":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BLOCK","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"WhileStatement","end":null,"_scopeInfo":null,"_paths":null},"label":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"LabeledStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null}],"type":"Program","end":null},"test-exports":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"test-module":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"umd-commonjs-strict":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"root","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"UMD_ROOT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FACTORY_PARAMETERS","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"FACTORY_BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"umd-runner-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"COMMON_TEST","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"GLOBAL_ARG","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null}} +},{}]},{},[19])(19) +}); \ No newline at end of file diff --git a/babel.min.js b/babel.min.js new file mode 100644 index 0000000..e23da29 --- /dev/null +++ b/babel.min.js @@ -0,0 +1,55 @@ +(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.babel=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o")){node.params.push(this.flow_parseTypeAnnotatableIdentifier());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");return this.finishNode(node,"TypeParameterDeclaration")};pp.flow_parseTypeParameterInstantiation=function(){var node=this.startNode(),oldInType=this.inType;node.params=[];this.inType=true;this.expectRelational("<");while(!this.isRelational(">")){node.params.push(this.flow_parseType());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");this.inType=oldInType;return this.finishNode(node,"TypeParameterInstantiation")};pp.flow_parseObjectPropertyKey=function(){return this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.flow_parseObjectTypeIndexer=function(node,isStatic){node["static"]=isStatic;this.expect(tt.bracketL);node.id=this.flow_parseObjectPropertyKey();this.expect(tt.colon);node.key=this.flow_parseType();this.expect(tt.bracketR);this.expect(tt.colon);node.value=this.flow_parseType();this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeIndexer")};pp.flow_parseObjectTypeMethodish=function(node){node.params=[];node.rest=null;node.typeParameters=null;if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}this.expect(tt.parenL);while(this.type===tt.name){node.params.push(this.flow_parseFunctionTypeParam());if(this.type!==tt.parenR){this.expect(tt.comma)}}if(this.eat(tt.ellipsis)){node.rest=this.flow_parseFunctionTypeParam()}this.expect(tt.parenR);this.expect(tt.colon);node.returnType=this.flow_parseType();return this.finishNode(node,"FunctionTypeAnnotation")};pp.flow_parseObjectTypeMethod=function(start,isStatic,key){var node=this.startNodeAt(start);node.value=this.flow_parseObjectTypeMethodish(this.startNodeAt(start));node["static"]=isStatic;node.key=key;node.optional=false;this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeProperty")};pp.flow_parseObjectTypeCallProperty=function(node,isStatic){var valueNode=this.startNode();node["static"]=isStatic;node.value=this.flow_parseObjectTypeMethodish(valueNode);this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeCallProperty")};pp.flow_parseObjectType=function(allowStatic){var nodeStart=this.startNode();var node;var optional=false;var property;var propertyKey;var propertyTypeAnnotation;var token;var isStatic;nodeStart.callProperties=[];nodeStart.properties=[];nodeStart.indexers=[];this.expect(tt.braceL);while(this.type!==tt.braceR){var start=this.markPosition();node=this.startNode();if(allowStatic&&this.isContextual("static")){this.next();isStatic=true}if(this.type===tt.bracketL){nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node,isStatic))}else if(this.type===tt.parenL||this.isRelational("<")){nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node,allowStatic))}else{if(isStatic&&this.type===tt.colon){propertyKey=this.parseIdent()}else{propertyKey=this.flow_parseObjectPropertyKey()}if(this.isRelational("<")||this.type===tt.parenL){nodeStart.properties.push(this.flow_parseObjectTypeMethod(start,isStatic,propertyKey))}else{if(this.eat(tt.question)){optional=true}this.expect(tt.colon);node.key=propertyKey;node.value=this.flow_parseType();node.optional=optional;node["static"]=isStatic;this.flow_objectTypeSemicolon();nodeStart.properties.push(this.finishNode(node,"ObjectTypeProperty"))}}}this.expect(tt.braceR);return this.finishNode(nodeStart,"ObjectTypeAnnotation")};pp.flow_objectTypeSemicolon=function(){if(!this.eat(tt.semi)&&this.type!==tt.braceR){this.unexpected()}};pp.flow_parseGenericType=function(start,id){var node=this.startNodeAt(start);node.typeParameters=null;node.id=id;while(this.eat(tt.dot)){var node2=this.startNodeAt(start);node2.qualification=node.id;node2.id=this.parseIdent();node.id=this.finishNode(node2,"QualifiedTypeIdentifier")}if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterInstantiation()}return this.finishNode(node,"GenericTypeAnnotation")};pp.flow_parseVoidType=function(){var node=this.startNode();this.expect(tt._void);return this.finishNode(node,"VoidTypeAnnotation")};pp.flow_parseTypeofType=function(){var node=this.startNode();this.expect(tt._typeof);node.argument=this.flow_parsePrimaryType();return this.finishNode(node,"TypeofTypeAnnotation")};pp.flow_parseTupleType=function(){var node=this.startNode();node.types=[];this.expect(tt.bracketL);while(this.pos. It looks like "+"you are trying to write a function type, but you ended up "+"writing a grouped type followed by an =>, which is a syntax "+"error. Remember, function type parameters are named so function "+"types look like (name1: type1, name2: type2) => returnType. You "+"probably wrote (type1) => returnType")}return type}tmp=this.flow_parseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;this.expect(tt.parenR);this.expect(tt.arrow);node.returnType=this.flow_parseType();node.typeParameters=null;return this.finishNode(node,"FunctionTypeAnnotation");case tt.string:node.value=this.value;node.raw=this.input.slice(this.start,this.end);this.next();return this.finishNode(node,"StringLiteralTypeAnnotation");default:if(this.type.keyword){switch(this.type.keyword){case"void":return this.flow_parseVoidType();case"typeof":return this.flow_parseTypeofType()}}}this.unexpected()};pp.flow_parsePostfixType=function(){var node=this.startNode();var type=node.elementType=this.flow_parsePrimaryType();if(this.type===tt.bracketL){this.expect(tt.bracketL);this.expect(tt.bracketR);return this.finishNode(node,"ArrayTypeAnnotation")}return type};pp.flow_parsePrefixType=function(){var node=this.startNode();if(this.eat(tt.question)){node.typeAnnotation=this.flow_parsePrefixType();return this.finishNode(node,"NullableTypeAnnotation")}return this.flow_parsePostfixType()};pp.flow_parseIntersectionType=function(){var node=this.startNode();var type=this.flow_parsePrefixType();node.types=[type];while(this.eat(tt.bitwiseAND)){node.types.push(this.flow_parsePrefixType())}return node.types.length===1?type:this.finishNode(node,"IntersectionTypeAnnotation")};pp.flow_parseUnionType=function(){var node=this.startNode();var type=this.flow_parseIntersectionType();node.types=[type];while(this.eat(tt.bitwiseOR)){node.types.push(this.flow_parseIntersectionType())}return node.types.length===1?type:this.finishNode(node,"UnionTypeAnnotation")};pp.flow_parseType=function(){var oldInType=this.inType;this.inType=true;var type=this.flow_parseUnionType();this.inType=oldInType;return type};pp.flow_parseTypeAnnotation=function(){var node=this.startNode();var oldInType=this.inType;this.inType=true;this.expect(tt.colon);node.typeAnnotation=this.flow_parseType();this.inType=oldInType;return this.finishNode(node,"TypeAnnotation")};pp.flow_parseTypeAnnotatableIdentifier=function(requireTypeAnnotation,canBeOptionalParam){var node=this.startNode();var ident=this.parseIdent();var isOptionalParam=false;if(canBeOptionalParam&&this.eat(tt.question)){this.expect(tt.question);isOptionalParam=true}if(requireTypeAnnotation||this.type===tt.colon){ident.typeAnnotation=this.flow_parseTypeAnnotation();this.finishNode(ident,ident.type)}if(isOptionalParam){ident.optional=true;this.finishNode(ident,ident.type)}return ident};acorn.plugins.flow=function(instance){instance.extend("parseFunctionBody",function(inner){return function(node,allowExpression){if(this.type===tt.colon){node.returnType=this.flow_parseTypeAnnotation()}return inner.call(this,node,allowExpression)}});instance.extend("parseStatement",function(inner){return function(declaration,topLevel){if(this.strict&&this.type===tt.name&&this.value==="interface"){var node=this.startNode();this.next();return this.flow_parseInterface(node)}else{return inner.call(this,declaration,topLevel)}}});instance.extend("parseExpressionStatement",function(inner){return function(node,expr){if(expr.type==="Identifier"){if(expr.name==="declare"){if(this.type===tt._class||this.type===tt.name||this.type===tt._function||this.type===tt._var){return this.flow_parseDeclare(node)}}else if(this.type===tt.name){if(expr.name==="interface"){return this.flow_parseInterface(node)}else if(expr.name==="type"){return this.flow_parseTypeAlias(node)}}}return inner.call(this,node,expr)}});instance.extend("shouldParseExportDeclaration",function(inner){return function(){return this.isContextual("type")||inner.call(this)}});instance.extend("parseParenItem",function(inner){return function(node,start){if(this.type===tt.colon){var typeCastNode=this.startNodeAt(start);typeCastNode.expression=node;typeCastNode.typeAnnotation=this.flow_parseTypeAnnotation();return this.finishNode(typeCastNode,"TypeCastExpression")}else{return node}}});instance.extend("parseClassId",function(inner){return function(node,isStatement){inner.call(this,node,isStatement);if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}}});instance.extend("readToken",function(inner){return function(code){if(this.inType&&(code===62||code===60)){return this.finishOp(tt.relational,1)}else{return inner.call(this,code)}}});instance.extend("jsx_readToken",function(inner){return function(){if(!this.inType)return inner.call(this)}});instance.extend("parseParenArrowList",function(inner){return function(start,exprList,isAsync){for(var i=0;i...",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);this.context.push(tc.j_oTag);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;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);++this.pos;if(ch===13&&this.input.charCodeAt(this.pos)===10){++this.pos;out+="\n"}else{out+=String.fromCharCode(ch)}if(this.options.locations){++this.curLine;this.lineStart=this.pos}chunkStart=this.pos}else{++this.pos}}}};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{++this.pos}}out+=this.input.slice(chunkStart,this.pos++);return this.finishToken(tt.string,out)};var XHTMLEntities={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};var hexNumber=/^[\da-fA-F]+$/;var decimalNumber=/^\d+$/;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")}node.openingElement=openingElement;node.closingElement=closingElement;node.children=children;return this.finishNode(node,"JSXElement")};pp.jsx_parseElement=function(){var start=this.markPosition();this.next();return this.jsx_parseElementAt(start)};acorn.plugins.jsx=function(instance){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;this.context.push(tc.j_cTag);this.exprAllowed=false}else{return inner.call(this,prevType)}}})}},{"..":5}],3:[function(require,module,exports){"use strict";var tt=require("./tokentype").types;var Parser=require("./state").Parser;var reservedWords=require("./identifier").reservedWords;var has=require("./util").has;var pp=Parser.prototype;pp.checkPropClash=function(prop,propHash){if(this.options.ecmaVersion>=6)return;var key=prop.key,name=undefined;switch(key.type){case"Identifier":name=key.name;break;case"Literal":name=String(key.value);break;default:return}var kind=prop.kind||"init",other=undefined;if(has(propHash,name)){other=propHash[name];var isGetSet=kind!=="init";if((this.strict||isGetSet)&&other[kind]||!(isGetSet^other.init))this.raise(key.start,"Redefinition of property")}else{other=propHash[name]={init:false,get:false,set:false}}other[kind]=true};pp.parseExpression=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeAssign(noIn,refShorthandDefaultPos);if(this.type===tt.comma){var node=this.startNodeAt(start);node.expressions=[expr];while(this.eat(tt.comma))node.expressions.push(this.parseMaybeAssign(noIn,refShorthandDefaultPos));return this.finishNode(node,"SequenceExpression")}return expr};pp.parseMaybeAssign=function(noIn,refShorthandDefaultPos,afterLeftParse){if(this.type==tt._yield&&this.inGenerator)return this.parseYield();var failOnShorthandAssign=undefined;if(!refShorthandDefaultPos){refShorthandDefaultPos={start:0};failOnShorthandAssign=true}else{failOnShorthandAssign=false}var start=this.markPosition();var left=this.parseMaybeConditional(noIn,refShorthandDefaultPos);if(afterLeftParse)left=afterLeftParse.call(this,left,start);if(this.type.isAssign){var node=this.startNodeAt(start);node.operator=this.value;node.left=this.type===tt.eq?this.toAssignable(left):left;refShorthandDefaultPos.start=0;this.checkLVal(left);if(left.parenthesizedExpression){if(left.type==="ObjectPattern"){this.raise(left.start,"You're trying to assign to a parenthesized expression, instead of `({ foo }) = {}` use `({ foo } = {})`")}else{this.raise(left.start,"Parenthesized left hand expressions are illegal")}}this.next();node.right=this.parseMaybeAssign(noIn);return this.finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return left};pp.parseMaybeConditional=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;if(this.eat(tt.question)){var node=this.startNodeAt(start);node.test=expr;node.consequent=this.parseMaybeAssign();this.expect(tt.colon);node.alternate=this.parseMaybeAssign(noIn); + +return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseExprOp(expr,start,-1,noIn)};pp.parseExprOp=function(left,leftStart,minPrec,noIn){var prec=this.type.binop;if(prec!=null&&(!noIn||this.type!==tt._in)){if(prec>minPrec){var node=this.startNodeAt(leftStart);node.left=left;node.operator=this.value;var op=this.type;this.next();var start=this.markPosition();node.right=this.parseExprOp(this.parseMaybeUnary(),start,op.rightAssociative?prec-1:prec,noIn);this.finishNode(node,op===tt.logicalOR||op===tt.logicalAND?"LogicalExpression":"BinaryExpression");return this.parseExprOp(node,leftStart,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){if(this.type.prefix){var node=this.startNode(),update=this.type===tt.incDec;node.operator=this.value;node.prefix=true;this.next();node.argument=this.parseMaybeUnary();if(refShorthandDefaultPos&&refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(update)this.checkLVal(node.argument);else if(this.strict&&node.operator==="delete"&&node.argument.type==="Identifier")this.raise(node.start,"Deleting local variable in strict mode");return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var start=this.markPosition();var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.type.postfix&&!this.canInsertSemicolon()){var node=this.startNodeAt(start);node.operator=this.value;node.prefix=false;node.argument=expr;this.checkLVal(expr);this.next();expr=this.finishNode(node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprAtom(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseSubscripts(expr,start)};pp.parseSubscripts=function(base,start,noCalls){if(this.eat(tt.dot)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseIdent(true);node.computed=false;return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(this.eat(tt.bracketL)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseExpression();node.computed=true;this.expect(tt.bracketR);return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(!noCalls&&this.eat(tt.parenL)){var node=this.startNodeAt(start);node.callee=base;node.arguments=this.parseExprList(tt.parenR,false);return this.parseSubscripts(this.finishNode(node,"CallExpression"),start,noCalls)}else if(this.type===tt.backQuote){var node=this.startNodeAt(start);node.tag=base;node.quasi=this.parseTemplate();return this.parseSubscripts(this.finishNode(node,"TaggedTemplateExpression"),start,noCalls)}return base};pp.parseExprAtom=function(refShorthandDefaultPos){var node=undefined;switch(this.type){case tt._this:case tt._super:var type=this.type===tt._this?"ThisExpression":"Super";node=this.startNode();this.next();return this.finishNode(node,type);case tt._yield:if(this.inGenerator)this.unexpected();case tt._do:if(this.options.features["es7.doExpressions"]){var _node=this.startNode();this.next();_node.body=this.parseBlock();return this.finishNode(_node,"DoExpression")}case tt.name:var start=this.markPosition();node=this.startNode();var id=this.parseIdent(this.type!==tt.name);if(this.options.features["es7.asyncFunctions"]){if(id.name==="async"){if(this.type===tt.parenL){var expr=this.parseParenAndDistinguishExpression(start,true);if(expr&&expr.type==="ArrowFunctionExpression"){return expr}else{node.callee=id;if(!expr){node.arguments=[]}else if(expr.type==="SequenceExpression"){node.arguments=expr.expressions}else{node.arguments=[expr]}return this.parseSubscripts(this.finishNode(node,"CallExpression"),start)}}else if(this.type===tt.name){id=this.parseIdent();this.expect(tt.arrow);return this.parseArrowExpression(node,[id],true)}if(this.type===tt._function&&!this.canInsertSemicolon()){this.next();return this.parseFunction(node,false,false,true)}}else if(id.name==="await"){if(this.inAsync)return this.parseAwait(node)}}if(!this.canInsertSemicolon()&&this.eat(tt.arrow)){return this.parseArrowExpression(this.startNodeAt(start),[id])}return id;case tt.regexp:var value=this.value;node=this.parseLiteral(value.value);node.regex={pattern:value.pattern,flags:value.flags};return node;case tt.num:case tt.string:return this.parseLiteral(this.value);case tt._null:case tt._true:case tt._false:node=this.startNode();node.value=this.type===tt._null?null:this.type===tt._true;node.raw=this.type.keyword;this.next();return this.finishNode(node,"Literal");case tt.parenL:return this.parseParenAndDistinguishExpression();case tt.bracketL:node=this.startNode();this.next();if((this.options.ecmaVersion>=7||this.options.features["es7.comprehensions"])&&this.type===tt._for){return this.parseComprehension(node,false)}node.elements=this.parseExprList(tt.bracketR,true,true,refShorthandDefaultPos);return this.finishNode(node,"ArrayExpression");case tt.braceL:return this.parseObj(false,refShorthandDefaultPos);case tt._function:node=this.startNode();this.next();return this.parseFunction(node,false);case tt.at:this.parseDecorators();case tt._class:node=this.startNode();this.takeDecorators(node);return this.parseClass(node,false);case tt._new:return this.parseNew();case tt.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(tt.parenL);var val=this.parseExpression();this.expect(tt.parenR);return val};pp.parseParenAndDistinguishExpression=function(start,isAsync){start=start||this.markPosition();var val=undefined;if(this.options.ecmaVersion>=6){this.next();if((this.options.features["es7.comprehensions"]||this.options.ecmaVersion>=7)&&this.type===tt._for){return this.parseComprehension(this.startNodeAt(start),true)}var innerStart=this.markPosition(),exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=undefined,innerParenStart=undefined;while(this.type!==tt.parenR){first?first=false:this.expect(tt.comma);if(this.type===tt.ellipsis){var spreadNodeStart=this.markPosition();spreadStart=this.start;exprList.push(this.parseParenItem(this.parseRest(),spreadNodeStart));break}else{if(this.type===tt.parenL&&!innerParenStart){innerParenStart=this.start}exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem))}}var innerEnd=this.markPosition();this.expect(tt.parenR);if(!this.canInsertSemicolon()&&this.eat(tt.arrow)){if(innerParenStart)this.unexpected(innerParenStart);return this.parseParenArrowList(start,exprList,isAsync)}if(!exprList.length){if(isAsync){return}else{this.unexpected(this.lastTokStart)}}if(spreadStart)this.unexpected(spreadStart);if(refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(exprList.length>1){val=this.startNodeAt(innerStart);val.expressions=exprList;this.finishNodeAt(val,"SequenceExpression",innerEnd)}else{val=exprList[0]}}else{val=this.parseParenExpression()}if(this.options.preserveParens){var par=this.startNodeAt(start);par.expression=val;return this.finishNode(par,"ParenthesizedExpression")}else{val.parenthesizedExpression=true;return val}};pp.parseParenArrowList=function(start,exprList,isAsync){return this.parseArrowExpression(this.startNodeAt(start),exprList,isAsync)};pp.parseParenItem=function(node,start){return node};var empty=[];pp.parseNew=function(){var node=this.startNode();var meta=this.parseIdent(true);if(this.options.ecmaVersion>=6&&this.eat(tt.dot)){node.meta=meta;node.property=this.parseIdent(true);if(node.property.name!=="target")this.raise(node.property.start,"The only valid meta property for new is new.target");return this.finishNode(node,"MetaProperty")}var start=this.markPosition();node.callee=this.parseSubscripts(this.parseExprAtom(),start,true);if(this.eat(tt.parenL))node.arguments=this.parseExprList(tt.parenR,false);else node.arguments=empty;return this.finishNode(node,"NewExpression")};pp.parseTemplateElement=function(){var elem=this.startNode();elem.value={raw:this.input.slice(this.start,this.end),cooked:this.value};this.next();elem.tail=this.type===tt.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(tt.dollarBraceL);node.expressions.push(this.parseExpression());this.expect(tt.braceR);node.quasis.push(curElt=this.parseTemplateElement())}this.next();return this.finishNode(node,"TemplateLiteral")};pp.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=false,isAsync=false,start=undefined;if(this.options.features["es7.objectRestSpread"]&&this.type===tt.ellipsis){prop=this.parseSpread();prop.type="SpreadProperty";node.properties.push(prop);continue}if(this.options.ecmaVersion>=6){prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos)start=this.markPosition();if(!isPattern)isGenerator=this.eat(tt.star)}if(this.options.features["es7.asyncFunctions"]&&this.isContextual("async")){if(isGenerator||isPattern)this.unexpected();var asyncId=this.parseIdent();if(this.type===tt.colon||this.type===tt.parenL){prop.key=asyncId}else{isAsync=true;this.parsePropertyName(prop)}}else{this.parsePropertyName(prop)}this.parseObjPropValue(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos);this.checkPropClash(prop,propHash);node.properties.push(this.finishNode(prop,"Property"))}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")};pp.parseObjPropValue=function(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos){if(this.eat(tt.colon)){prop.value=isPattern?this.parseMaybeDefault():this.parseMaybeAssign(false,refShorthandDefaultPos);prop.kind="init"}else if(this.options.ecmaVersion>=6&&this.type===tt.parenL){if(isPattern)this.unexpected();prop.kind="init";prop.method=true;prop.value=this.parseMethod(isGenerator,isAsync)}else if(this.options.ecmaVersion>=5&&!prop.computed&&prop.key.type==="Identifier"&&(prop.key.name==="get"||prop.key.name==="set")&&(this.type!=tt.comma&&this.type!=tt.braceR)){if(isGenerator||isAsync||isPattern)this.unexpected();prop.kind=prop.key.name;this.parsePropertyName(prop);prop.value=this.parseMethod(false)}else if(this.options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"){prop.kind="init";if(isPattern){if(this.isKeyword(prop.key.name)||this.strict&&(reservedWords.strictBind(prop.key.name)||reservedWords.strict(prop.key.name))||!this.options.allowReserved&&this.isReservedWord(prop.key.name))this.raise(prop.key.start,"Binding "+prop.key.name);prop.value=this.parseMaybeDefault(start,prop.key)}else if(this.type===tt.eq&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start)refShorthandDefaultPos.start=this.start;prop.value=this.parseMaybeDefault(start,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(tt.bracketL)){prop.computed=true;prop.key=this.parseMaybeAssign();this.expect(tt.bracketR);return}else{prop.computed=false}}prop.key=this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.initFunction=function(node,isAsync){node.id=null;if(this.options.ecmaVersion>=6){node.generator=false;node.expression=false}if(this.options.features["es7.asyncFunctions"]){node.async=!!isAsync}};pp.parseMethod=function(isGenerator,isAsync){var node=this.startNode();this.initFunction(node,isAsync);this.expect(tt.parenL);node.params=this.parseBindingList(tt.parenR,false,false);if(this.options.ecmaVersion>=6){node.generator=isGenerator}this.parseFunctionBody(node);return this.finishNode(node,"FunctionExpression")};pp.parseArrowExpression=function(node,params,isAsync){this.initFunction(node,isAsync);node.params=this.toAssignableList(params,true);this.parseFunctionBody(node,true);return this.finishNode(node,"ArrowFunctionExpression")};pp.parseFunctionBody=function(node,allowExpression){var isExpression=allowExpression&&this.type!==tt.braceL;var oldInAsync=this.inAsync;this.inAsync=node.async;if(isExpression){node.body=this.parseMaybeAssign();node.expression=true}else{var oldInFunc=this.inFunction,oldInGen=this.inGenerator,oldLabels=this.labels;this.inFunction=true;this.inGenerator=node.generator;this.labels=[];node.body=this.parseBlock(true);node.expression=false;this.inFunction=oldInFunc;this.inGenerator=oldInGen;this.labels=oldLabels}this.inAsync=oldInAsync;if(this.strict||!isExpression&&node.body.body.length&&this.isUseStrict(node.body.body[0])){var nameHash={},oldStrict=this.strict;this.strict=true;if(node.id)this.checkLVal(node.id,true);for(var i=0;i=6||this.input.slice(this.start,this.end).indexOf("\\")==-1)))this.raise(this.start,"The keyword '"+this.value+"' is reserved");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")};pp.parseAwait=function(node){if(this.eat(tt.semi)||this.canInsertSemicolon()){this.unexpected()}node.all=this.eat(tt.star);node.argument=this.parseMaybeAssign(true);return this.finishNode(node,"AwaitExpression")};pp.parseYield=function(){var node=this.startNode();this.next();if(this.type==tt.semi||this.canInsertSemicolon()||this.type!=tt.star&&!this.type.startsExpr){node.delegate=false;node.argument=null}else{node.delegate=this.eat(tt.star);node.argument=this.parseMaybeAssign()}return this.finishNode(node,"YieldExpression")};pp.parseComprehension=function(node,isGenerator){node.blocks=[];while(this.type===tt._for){var block=this.startNode();this.next();this.expect(tt.parenL);block.left=this.parseBindingAtom();this.checkLVal(block.left,true);this.expectContextual("of");block.right=this.parseExpression();this.expect(tt.parenR);node.blocks.push(this.finishNode(block,"ComprehensionBlock"))}node.filter=this.eat(tt._if)?this.parseParenExpression():null;node.body=this.parseExpression();this.expect(isGenerator?tt.parenR:tt.bracketR);node.generator=isGenerator;return this.finishNode(node,"ComprehensionExpression")}},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){"use strict";exports.isIdentifierStart=isIdentifierStart;exports.isIdentifierChar=isIdentifierChar;exports.__esModule=true;function makePredicate(words){words=words.split(" ");var f="",cats=[];out:for(var i=0;i3){cats.sort(function(a,b){return b.length-a.length});f+="switch(str.length){";for(var i=0;icode)return false;pos+=set[i+1];if(pos>=code)return true}}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<=65535)return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)}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<=65535)return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}},{}],5:[function(require,module,exports){"use strict";exports.parse=parse;exports.parseExpressionAt=parseExpressionAt;exports.tokenizer=tokenizer;exports.__esModule=true;var _state=require("./state");var Parser=_state.Parser;var _options=require("./options");var getOptions=_options.getOptions;require("./parseutil");require("./statement");require("./lval");require("./expression");require("./lookahead");exports.Parser=_state.Parser;exports.plugins=_state.plugins;exports.defaultOptions=_options.defaultOptions;var _location=require("./location");exports.SourceLocation=_location.SourceLocation;exports.getLineInfo=_location.getLineInfo;exports.Node=require("./node").Node;var _tokentype=require("./tokentype");exports.TokenType=_tokentype.TokenType;exports.tokTypes=_tokentype.types;var _tokencontext=require("./tokencontext");exports.TokContext=_tokencontext.TokContext;exports.tokContexts=_tokencontext.types;var _identifier=require("./identifier");exports.isIdentifierChar=_identifier.isIdentifierChar;exports.isIdentifierStart=_identifier.isIdentifierStart;exports.Token=require("./tokenize").Token;var _whitespace=require("./whitespace");exports.isNewLine=_whitespace.isNewLine;exports.lineBreak=_whitespace.lineBreak;exports.lineBreakG=_whitespace.lineBreakG;require("../plugins/flow");require("../plugins/jsx");var version="1.0.0";exports.version=version;function parse(input,options){var p=parser(options,input);var startPos=p.options.locations?[p.pos,p.curPosition()]:p.pos;p.nextToken();return p.parseTopLevel(p.options.program||p.startNodeAt(startPos))}function parseExpressionAt(input,pos,options){var p=parser(options,input,pos);p.nextToken();return p.parseExpression()}function tokenizer(input,options){return parser(options,input)}function parser(options,input){return new Parser(getOptions(options),String(input))}},{"../plugins/flow":1,"../plugins/jsx":2,"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.getLineInfo=getLineInfo;exports.__esModule=true;var Parser=require("./state").Parser;var lineBreakG=require("./whitespace").lineBreakG;var Position=exports.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}();var SourceLocation=exports.SourceLocation=function SourceLocation(p,start,end){_classCallCheck(this,SourceLocation);this.start=start;this.end=end;if(p.sourceFile!==null)this.source=p.sourceFile};function getLineInfo(input,offset){for(var line=1,cur=0;;){lineBreakG.lastIndex=cur;var match=lineBreakG.exec(input);if(match&&match.index=6&&node){switch(node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var i=0;i=6){node.sourceType=this.options.sourceType}return this.finishNode(node,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp.parseStatement=function(declaration,topLevel){if(this.type===tt.at){this.parseDecorators(true)}var starttype=this.type,node=this.startNode();switch(starttype){case tt._break:case tt._continue:return this.parseBreakContinueStatement(node,starttype.keyword);case tt._debugger:return this.parseDebuggerStatement(node);case tt._do:return this.parseDoStatement(node);case tt._for:return this.parseForStatement(node);case tt._function:if(!declaration&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(node);case tt._class:if(!declaration)this.unexpected();this.takeDecorators(node);return this.parseClass(node,true);case tt._if:return this.parseIfStatement(node);case tt._return:return this.parseReturnStatement(node);case tt._switch:return this.parseSwitchStatement(node);case tt._throw:return this.parseThrowStatement(node);case tt._try:return this.parseTryStatement(node);case tt._let:case tt._const:if(!declaration)this.unexpected();case tt._var:return this.parseVarStatement(node,starttype);case tt._while:return this.parseWhileStatement(node);case tt._with:return this.parseWithStatement(node);case tt.braceL:return this.parseBlock();case tt.semi:return this.parseEmptyStatement(node);case tt._export:case tt._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===tt._import?this.parseImport(node):this.parseExport(node);case tt.name:if(this.options.features["es7.asyncFunctions"]&&this.value==="async"&&this.lookahead().type===tt._function){this.next();this.expect(tt._function);return this.parseFunction(node,true,false,true)}default:var maybeName=this.value,expr=this.parseExpression();if(starttype===tt.name&&expr.type==="Identifier"&&this.eat(tt.colon))return this.parseLabeledStatement(node,maybeName,expr);else return this.parseExpressionStatement(node,expr)}};pp.takeDecorators=function(node){if(this.decorators.length){node.decorators=this.decorators;this.decorators=[]}};pp.parseDecorators=function(allowExport){while(this.type===tt.at){this.decorators.push(this.parseDecorator())}if(allowExport&&this.type===tt._export){return}if(this.type!==tt._class){this.raise(this.start,"Leading decorators must be attached to a class declaration")}};pp.parseDecorator=function(allowExport){if(!this.options.features["es7.decorators"]){this.unexpected()}var node=this.startNode();this.next();node.expression=this.parseMaybeAssign();return this.finishNode(node,"Decorator")};pp.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword=="break";this.next();if(this.eat(tt.semi)||this.insertSemicolon())node.label=null;else if(this.type!==tt.name)this.unexpected();else{node.label=this.parseIdent();this.semicolon()}for(var i=0;i=6)this.eat(tt.semi);else this.semicolon();return this.finishNode(node,"DoWhileStatement")};pp.parseForStatement=function(node){this.next();this.labels.push(loopLabel);this.expect(tt.parenL);if(this.type===tt.semi)return this.parseFor(node,null);if(this.type===tt._var||this.type===tt._let||this.type===tt._const){var _init=this.startNode(),varKind=this.type;this.next();this.parseVar(_init,true,varKind);this.finishNode(_init,"VariableDeclaration");if((this.type===tt._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&_init.declarations.length===1&&!(varKind!==tt._var&&_init.declarations[0].init))return this.parseForIn(node,_init);return this.parseFor(node,_init)}var refShorthandDefaultPos={start:0};var init=this.parseExpression(true,refShorthandDefaultPos);if(this.type===tt._in||this.options.ecmaVersion>=6&&this.isContextual("of")){this.toAssignable(init);this.checkLVal(init);return this.parseForIn(node,init)}else if(refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}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(tt._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();if(this.eat(tt.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(tt.braceL);this.labels.push(switchLabel);for(var cur,sawDefault;this.type!=tt.braceR;){if(this.type===tt._case||this.type===tt._default){var isCase=this.type===tt._case;if(cur)this.finishNode(cur,"SwitchCase");node.cases.push(cur=this.startNode());cur.consequent=[];this.next();if(isCase){cur.test=this.parseExpression()}else{if(sawDefault)this.raise(this.lastTokStart,"Multiple default clauses");sawDefault=true;cur.test=null}this.expect(tt.colon)}else{if(!cur)this.unexpected();cur.consequent.push(this.parseStatement(true))}}if(cur)this.finishNode(cur,"SwitchCase");this.next();this.labels.pop();return this.finishNode(node,"SwitchStatement")};pp.parseThrowStatement=function(node){this.next();if(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")};var empty=[];pp.parseTryStatement=function(node){this.next();node.block=this.parseBlock();node.handler=null;if(this.type===tt._catch){var clause=this.startNode();this.next();this.expect(tt.parenL);clause.param=this.parseBindingAtom();this.checkLVal(clause.param,true);this.expect(tt.parenR);clause.guard=null;clause.body=this.parseBlock();node.handler=this.finishNode(clause,"CatchClause")}node.guardedHandlers=empty;node.finalizer=this.eat(tt._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=6&&this.isContextual("of"))){this.unexpected()}else if(decl.id.type!="Identifier"&&!(isFor&&(this.type===tt._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(tt.comma))break}return node};pp.parseVarHead=function(decl){decl.id=this.parseBindingAtom();this.checkLVal(decl.id,true)};pp.parseFunction=function(node,isStatement,allowExpressionBody,isAsync){this.initFunction(node,isAsync);if(this.options.ecmaVersion>=6)node.generator=this.eat(tt.star);if(isStatement||this.type===tt.name)node.id=this.parseIdent();this.parseFunctionParams(node);this.parseFunctionBody(node,allowExpressionBody);return this.finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")};pp.parseFunctionParams=function(node){this.expect(tt.parenL);node.params=this.parseBindingList(tt.parenR,false,false)};pp.parseClass=function(node,isStatement){this.next();this.parseClassId(node,isStatement);this.parseClassSuper(node);var classBody=this.startNode();classBody.body=[];this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(this.eat(tt.semi))continue;if(this.type===tt.at){this.decorators.push(this.parseDecorator());continue}var method=this.startNode();this.takeDecorators(method);var isGenerator=this.eat(tt.star),isAsync=false;this.parsePropertyName(method);if(this.type!==tt.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="static"){if(isGenerator)this.unexpected();method["static"]=true;isGenerator=this.eat(tt.star);this.parsePropertyName(method)}else{method["static"]=false}if(!isGenerator&&method.key.type==="Identifier"&&!method.computed&&this.isClassProperty()){classBody.body.push(this.parseClassProperty(method));continue}if(this.options.features["es7.asyncFunctions"]&&this.type!==tt.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async"){isAsync=true;this.parsePropertyName(method)}method.kind="method";if(!method.computed&&!isGenerator){if(method.key.type==="Identifier"){if(this.type!==tt.parenL&&(method.key.name==="get"||method.key.name==="set")){method.kind=method.key.name;this.parsePropertyName(method)}else if(!method["static"]&&method.key.name==="constructor"){method.kind="constructor"}}else if(!method["static"]&&method.key.type==="Literal"&&method.key.value==="constructor"){method.kind="constructor"}}if(method.kind==="constructor"&&method.decorators){this.raise(method.start,"You can't attach decorators to a class constructor")}this.parseClassMethod(classBody,method,isGenerator,isAsync)}if(this.decorators.length){this.raise(this.start,"You have trailing decorators with no method")}node.body=this.finishNode(classBody,"ClassBody");return this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")};pp.isClassProperty=function(){return this.type===tt.eq||(this.type===tt.semi||this.canInsertSemicolon())};pp.parseClassProperty=function(node){if(this.type===tt.eq){if(!this.options.features["es7.classProperties"])this.unexpected();this.next();node.value=this.parseMaybeAssign()}else{node.value=null}this.semicolon();return this.finishNode(node,"ClassProperty")};pp.parseClassMethod=function(classBody,method,isGenerator,isAsync){method.value=this.parseMethod(isGenerator,isAsync);classBody.body.push(this.finishNode(method,"MethodDefinition"))};pp.parseClassId=function(node,isStatement){node.id=this.type===tt.name?this.parseIdent():isStatement?this.unexpected():null};pp.parseClassSuper=function(node){node.superClass=this.eat(tt._extends)?this.parseExprSubscripts():null};pp.parseExport=function(node){this.next();if(this.type===tt.star){var specifier=this.startNode();this.next();if(this.options.features["es7.exportExtensions"]&&this.eatContextual("as")){specifier.exported=this.parseIdent();node.specifiers=[this.finishNode(specifier,"ExportNamespaceSpecifier")];this.parseExportSpecifiersMaybe(node);this.parseExportFrom(node)}else{this.parseExportFrom(node);return this.finishNode(node,"ExportAllDeclaration")}}else if(this.isExportDefaultSpecifier()){var specifier=this.startNode();specifier.exported=this.parseIdent(true);node.specifiers=[this.finishNode(specifier,"ExportDefaultSpecifier")];if(this.type===tt.comma&&this.lookahead().type===tt.star){this.expect(tt.comma);var _specifier=this.startNode();this.expect(tt.star);this.expectContextual("as");_specifier.exported=this.parseIdent();node.specifiers.push(this.finishNode(_specifier,"ExportNamespaceSpecifier"))}else{this.parseExportSpecifiersMaybe(node)}this.parseExportFrom(node)}else if(this.eat(tt._default)){var expr=this.parseMaybeAssign();var needsSemi=true;if(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();this.checkExport(node);return this.finishNode(node,"ExportDefaultDeclaration")}else if(this.type.keyword||this.shouldParseExportDeclaration()){node.declaration=this.parseStatement(true);node.specifiers=[];node.source=null}else{node.declaration=null;node.specifiers=this.parseExportSpecifiers();if(this.eatContextual("from")){node.source=this.type===tt.string?this.parseExprAtom():this.unexpected()}else{node.source=null}this.semicolon()}this.checkExport(node);return this.finishNode(node,"ExportNamedDeclaration")};pp.isExportDefaultSpecifier=function(){if(this.type===tt.name){return this.value!=="type"&&this.value!=="async"}if(this.type!==tt._default){return false}var lookahead=this.lookahead();return lookahead.type===tt.comma||lookahead.type===tt.name&&lookahead.value==="from"};pp.parseExportSpecifiersMaybe=function(node){if(this.eat(tt.comma)){node.specifiers=node.specifiers.concat(this.parseExportSpecifiers())}};pp.parseExportFrom=function(node){this.expectContextual("from");node.source=this.type===tt.string?this.parseExprAtom():this.unexpected();this.semicolon();this.checkExport(node)};pp.shouldParseExportDeclaration=function(){return this.options.features["es7.asyncFunctions"]&&this.isContextual("async")};pp.checkExport=function(node){if(this.decorators.length){var isClass=node.declaration&&(node.declaration.type==="ClassDeclaration"||node.declaration.type==="ClassExpression");if(!node.declaration||!isClass){this.raise(node.start,"You can only use decorators on an export when exporting a class")}this.takeDecorators(node.declaration)}};pp.parseExportSpecifiers=function(){var nodes=[],first=true;this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(!first){this.expect(tt.comma);if(this.afterTrailingComma(tt.braceR))break}else first=false;var node=this.startNode();node.local=this.parseIdent(this.type===tt._default);node.exported=this.eatContextual("as")?this.parseIdent(true):node.local;nodes.push(this.finishNode(node,"ExportSpecifier"))}return nodes};pp.parseImport=function(node){this.next();if(this.type===tt.string){node.specifiers=empty;node.source=this.parseExprAtom();node.kind=""}else{node.specifiers=[];this.parseImportSpecifiers(node);this.expectContextual("from");node.source=this.type===tt.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(node,"ImportDeclaration")};pp.parseImportSpecifiers=function(node){var first=true;if(this.type===tt.name){var start=this.markPosition();node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(),start));if(!this.eat(tt.comma))return}if(this.type===tt.star){var specifier=this.startNode();this.next();this.expectContextual("as");specifier.local=this.parseIdent();this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportNamespaceSpecifier"));return}this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(!first){this.expect(tt.comma);if(this.afterTrailingComma(tt.braceR))break}else first=false;var specifier=this.startNode();specifier.imported=this.parseIdent(true);specifier.local=this.eatContextual("as")?this.parseIdent():specifier.imported;this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportSpecifier"))}};pp.parseImportSpecifierDefault=function(id,start){var node=this.startNodeAt(start);node.local=id;this.checkLVal(node.local,true);return this.finishNode(node,"ImportDefaultSpecifier")}},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var Parser=require("./state").Parser;var tt=require("./tokentype").types;var lineBreak=require("./whitespace").lineBreak;var TokContext=exports.TokContext=function TokContext(token,isExpr,preserveSpace,override){_classCallCheck(this,TokContext);this.token=token;this.isExpr=isExpr;this.preserveSpace=preserveSpace;this.override=override};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=Parser.prototype;pp.initialContext=function(){return[types.b_stat]};pp.braceIsBlock=function(prevType){var parent=undefined;if(prevType===tt.colon&&(parent=this.curContext()).token=="{")return!parent.isExpr;if(prevType===tt._return)return lineBreak.test(this.input.slice(this.lastTokEnd,this.start));if(prevType===tt._else||prevType===tt.semi||prevType===tt.eof)return true;if(prevType==tt.braceL)return this.curContext()===types.b_stat;return!this.exprAllowed};pp.updateContext=function(prevType){var update=undefined,type=this.type;if(type.keyword&&prevType==tt.dot)this.exprAllowed=false;else if(update=type.updateContext)update.call(this,prevType);else this.exprAllowed=type.beforeExpr};tt.parenR.updateContext=tt.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}};tt.braceL.updateContext=function(prevType){this.context.push(this.braceIsBlock(prevType)?types.b_stat:types.b_expr);this.exprAllowed=true};tt.dollarBraceL.updateContext=function(){this.context.push(types.b_tmpl);this.exprAllowed=true};tt.parenL.updateContext=function(prevType){var statementParens=prevType===tt._if||prevType===tt._for||prevType===tt._with||prevType===tt._while;this.context.push(statementParens?types.p_stat:types.p_expr);this.exprAllowed=true};tt.incDec.updateContext=function(){};tt._function.updateContext=function(){if(this.curContext()!==types.b_stat)this.context.push(types.f_expr);this.exprAllowed=false};tt.backQuote.updateContext=function(){if(this.curContext()===types.q_tmpl)this.context.pop();else this.context.push(types.q_tmpl);this.exprAllowed=false}},{"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var _identifier=require("./identifier");var isIdentifierStart=_identifier.isIdentifierStart;var isIdentifierChar=_identifier.isIdentifierChar;var _tokentype=require("./tokentype");var tt=_tokentype.types;var keywordTypes=_tokentype.keywords;var Parser=require("./state").Parser;var SourceLocation=require("./location").SourceLocation;var _whitespace=require("./whitespace");var lineBreak=_whitespace.lineBreak;var lineBreakG=_whitespace.lineBreakG;var isNewLine=_whitespace.isNewLine;var nonASCIIwhitespace=_whitespace.nonASCIIwhitespace;var Token=exports.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 SourceLocation(p,p.startLoc,p.endLoc);if(p.options.ranges)this.range=[p.start,p.end]};var pp=Parser.prototype;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(typeof Symbol!=="undefined")pp[Symbol.iterator]=function(){var self=this;return{next:function next(){var token=self.getToken();return{done:token.type===tt.eof,value:token}}}};pp.setStrict=function(strict){this.strict=strict;if(this.type!==tt.num&&this.type!==tt.string)return;this.pos=this.start;if(this.options.locations){while(this.pos=this.input.length)return this.finishToken(tt.eof);if(curContext.override)return curContext.override(this);else this.readToken(this.fullCharCodeAtPos())};pp.readToken=function(code){if(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<=55295||code>=57344)return code;var next=this.input.charCodeAt(this.pos+1);return(code<<10)+next-56613888};pp.skipBlockComment=function(){var startLoc=this.options.onComment&&this.options.locations&&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){lineBreakG.lastIndex=start;var match=undefined;while((match=lineBreakG.exec(this.input))&&match.index8&&ch<14){++this.pos}else if(ch===47){var next=this.input.charCodeAt(this.pos+1);if(next===42){this.skipBlockComment()}else if(next===47){this.skipLineComment(2)}else break}else if(ch===160){++this.pos}else if(ch>=5760&&nonASCIIwhitespace.test(String.fromCharCode(ch))){++this.pos}else{break}}};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)};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){this.pos+=3;return this.finishToken(tt.ellipsis)}else{++this.pos;return this.finishToken(tt.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(tt.assign,2);return this.finishOp(tt.slash,1)};pp.readToken_mult_modulo=function(code){var type=code===42?tt.star:tt.modulo;var width=1;var next=this.input.charCodeAt(this.pos+1);if(next===42){width++;next=this.input.charCodeAt(this.pos+2);type=tt.exponent}if(next===61){width++;type=tt.assign}return this.finishOp(type,width)};pp.readToken_pipe_amp=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===code)return this.finishOp(code===124?tt.logicalOR:tt.logicalAND,2);if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(code===124?tt.bitwiseOR:tt.bitwiseAND,1)};pp.readToken_caret=function(){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(tt.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&&lineBreak.test(this.input.slice(this.lastTokEnd,this.pos))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(tt.incDec,2)}if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(tt.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(tt.assign,size+1);return this.finishOp(tt.bitShift,size)}if(next==33&&code==60&&this.input.charCodeAt(this.pos+2)==45&&this.input.charCodeAt(this.pos+3)==45){if(this.inModule)unexpected();this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(next===61)size=this.input.charCodeAt(this.pos+2)===61?3:2;return this.finishOp(tt.relational,size)};pp.readToken_eq_excl=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(tt.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(tt.arrow)}return this.finishOp(code===61?tt.eq:tt.prefix,1)};pp.getTokenFromCode=function(code){switch(code){case 46:return this.readToken_dot();case 40:++this.pos;return this.finishToken(tt.parenL);case 41:++this.pos;return this.finishToken(tt.parenR);case 59:++this.pos;return this.finishToken(tt.semi);case 44:++this.pos;return this.finishToken(tt.comma);case 91:++this.pos;return this.finishToken(tt.bracketL);case 93:++this.pos;return this.finishToken(tt.bracketR);case 123:++this.pos;return this.finishToken(tt.braceL);case 125:++this.pos;return this.finishToken(tt.braceR);case 58:++this.pos;return this.finishToken(tt.colon);case 63:++this.pos;return this.finishToken(tt.question);case 64:++this.pos;return this.finishToken(tt.at);case 96:if(this.options.ecmaVersion<6)break;++this.pos;return this.finishToken(tt.backQuote);case 48:var next=this.input.charCodeAt(this.pos+1);if(next===120||next===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(next===111||next===79)return this.readRadixNumber(8);if(next===98||next===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(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(tt.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)};var regexpUnicodeSupport=false;try{new RegExp("￿","u");regexpUnicodeSupport=true}catch(e){}pp.readRegexp=function(){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(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;var mods=this.readWord1();var tmp=content;if(mods){var validFlags=/^[gmsiy]*$/;if(this.options.ecmaVersion>=6)validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))this.raise(start,"Invalid regular expression flag");if(mods.indexOf("u")>=0&&!regexpUnicodeSupport){tmp=tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x")}}try{new RegExp(tmp)}catch(e){if(e instanceof SyntaxError)this.raise(start,"Error parsing regular expression: "+e.message);this.raise(e)}var value=undefined;try{value=new RegExp(content,mods)}catch(err){value=null}return this.finishToken(tt.regexp,{pattern:content,flags:mods,value:value})};pp.readInt=function(radix,len){var start=this.pos,total=0;for(var i=0,e=len==null?Infinity:len;i=97)val=code-97+10;else if(code>=65)val=code-65+10;else if(code>=48&&code<=57)val=code-48;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;var val=this.readInt(radix);if(val==null)this.raise(this.start+2,"Expected number in radix "+radix);if(isIdentifierStart(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(tt.num,val)};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");if(this.input.charCodeAt(this.pos)===46){++this.pos;this.readInt(10);isFloat=true}var next=this.input.charCodeAt(this.pos);if(next===69||next===101){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(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(tt.num,val)};pp.readCodePoint=function(){var ch=this.input.charCodeAt(this.pos),code=undefined;if(ch===123){if(this.options.ecmaVersion<6)this.unexpected();++this.pos;code=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(code>1114111)this.unexpected()}else{code=this.readHexChar(4)}return code};function codePointToString(code){if(code<=65535)return String.fromCharCode(code);return String.fromCharCode((code-65536>>10)+55296,(code-65536&1023)+56320)}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();chunkStart=this.pos}else{if(isNewLine(ch))this.raise(this.start,"Unterminated string constant");++this.pos}}out+=this.input.slice(chunkStart,this.pos++);return this.finishToken(tt.string,out)};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===tt.template){if(ch===36){this.pos+=2;return this.finishToken(tt.dollarBraceL)}else{++this.pos;return this.finishToken(tt.backQuote)}}out+=this.input.slice(chunkStart,this.pos);return this.finishToken(tt.template,out)}if(ch===92){out+=this.input.slice(chunkStart,this.pos);out+=this.readEscapedChar();chunkStart=this.pos}else if(isNewLine(ch)){out+=this.input.slice(chunkStart,this.pos);++this.pos;if(ch===13&&this.input.charCodeAt(this.pos)===10){++this.pos;out+="\n"}else{out+=String.fromCharCode(ch)}if(this.options.locations){++this.curLine;this.lineStart=this.pos}chunkStart=this.pos}else{++this.pos}}};pp.readEscapedChar=function(){var ch=this.input.charCodeAt(++this.pos);var octal=/^[0-7]+/.exec(this.input.slice(this.pos,this.pos+3));if(octal)octal=octal[0];while(octal&&parseInt(octal,8)>255)octal=octal.slice(0,-1);if(octal==="0")octal=null;++this.pos;if(octal){if(this.strict)this.raise(this.pos-2,"Octal literal in strict mode");this.pos+=octal.length-1;return String.fromCharCode(parseInt(octal,8))}else{switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return" ";case 102:return"\f";case 48:return"\x00";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations){this.lineStart=this.pos;++this.curLine}return"";default:return String.fromCharCode(ch)}}};pp.readHexChar=function(len){var n=this.readInt(16,len);if(n===null)this.raise(this.start,"Bad character escape sequence");return n};var containsEsc;pp.readWord1=function(){containsEsc=false;var word="",first=true,chunkStart=this.pos;var astral=this.options.ecmaVersion>=6;while(this.pos=6||!containsEsc)&&this.isKeyword(word))type=keywordTypes[word];return this.finishToken(type,word)}},{"./identifier":4,"./location":6,"./state":12,"./tokentype":16,"./whitespace":18}],16:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var TokenType=exports.TokenType=function TokenType(label){var conf=arguments[1]===undefined?{}:arguments[1];_classCallCheck(this,TokenType);this.label=label;this.keyword=conf.keyword;this.beforeExpr=!!conf.beforeExpr;this.startsExpr=!!conf.startsExpr;this.rightAssociative=!!conf.rightAssociative;this.isLoop=!!conf.isLoop;this.isAssign=!!conf.isAssign;this.prefix=!!conf.prefix;this.postfix=!!conf.postfix;this.binop=conf.binop||null;this.updateContext=null};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"),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}),at:new TokenType("@"),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),exponent:new TokenType("**",{beforeExpr:true,binop:11,rightAssociative:true})};exports.types=types;var keywords={};exports.keywords=keywords;function kw(name){var options=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");kw("do",{isLoop:true});kw("else",beforeExpr);kw("finally");kw("for",{isLoop:true});kw("function");kw("if");kw("return",beforeExpr);kw("switch");kw("throw",beforeExpr);kw("try");kw("var");kw("let");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("yield",{beforeExpr:true,startsExpr:true});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})},{}],17:[function(require,module,exports){"use strict";exports.isArray=isArray;exports.has=has;exports.__esModule=true;function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function has(obj,propName){return Object.prototype.hasOwnProperty.call(obj,propName)}},{}],18:[function(require,module,exports){"use strict";exports.isNewLine=isNewLine;exports.__esModule=true;var lineBreak=/\r\n?|\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===8232||code==8233}var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;exports.nonASCIIwhitespace=nonASCIIwhitespace},{}],19:[function(require,module,exports){(function(global){"use strict";var transform=module.exports=require("../transformation");transform.options=require("../transformation/file/options");transform.version=require("../../../package").version;transform.transform=transform;transform.run=function(code){var opts=arguments[1]===undefined?{}:arguments[1];opts.sourceMaps="inline";return new Function(transform(code,opts).code)()};transform.load=function(url,callback,_x,hold){var opts=arguments[2]===undefined?{}:arguments[2];var _opts=opts;if(!_opts.filename)_opts.filename=url;var xhr=global.ActiveXObject?new global.ActiveXObject("Microsoft.XMLHTTP"):new global.XMLHttpRequest;xhr.open("GET",url,true);if("overrideMimeType"in xhr)xhr.overrideMimeType("text/plain");xhr.onreadystatechange=function(){if(xhr.readyState!==4)return;var status=xhr.status;if(status===0||status===200){var param=[xhr.responseText,opts];if(!hold)transform.run.apply(transform,param);if(callback)callback(param)}else{throw new Error("Could not load "+url)}};xhr.send(null)};var runScripts=function runScripts(){var scripts=[];var types=["text/ecmascript-6","text/6to5","text/babel","module"];var index=0;var exec=function(_exec){var _execWrapper=function exec(){return _exec.apply(this,arguments)};_execWrapper.toString=function(){return _exec.toString()};return _execWrapper}(function(){var param=scripts[index];if(param instanceof Array){transform.run.apply(transform,param);index++;exec()}});var run=function run(script,i){var opts={};if(script.src){transform.load(script.src,function(param){scripts[i]=param;exec()},opts,true)}else{opts.filename="embedded";scripts[i]=[script.innerHTML,opts]}};var _scripts=global.document.getElementsByTagName("script");for(var i=0;i<_scripts.length;++i){var _script=_scripts[i];if(types.indexOf(_script.type)>=0)scripts.push(_script)}for(i in scripts){run(scripts[i],i)}exec()};if(global.addEventListener){global.addEventListener("DOMContentLoaded",runScripts,false)}else if(global.attachEvent){global.attachEvent("onload",runScripts)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../../../package":454,"../transformation":63,"../transformation/file/options":49}],20:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var repeating=_interopRequire(require("repeating"));var trimRight=_interopRequire(require("trim-right"));var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var includes=_interopRequire(require("lodash/collection/includes"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var Buffer=function(){function Buffer(position,format){_classCallCheck(this,Buffer);this.position=position;this._indent=format.indent.base;this.format=format;this.buf=""}Buffer.prototype.get=function get(){return trimRight(this.buf)};Buffer.prototype.getIndent=function getIndent(){if(this.format.compact||this.format.concise){return""}else{return repeating(this.format.indent.style,this._indent)}};Buffer.prototype.indentSize=function indentSize(){return this.getIndent().length};Buffer.prototype.indent=function indent(){this._indent++};Buffer.prototype.dedent=function dedent(){this._indent--};Buffer.prototype.semicolon=function semicolon(){this.push(";")};Buffer.prototype.ensureSemicolon=function ensureSemicolon(){if(!this.isLast(";"))this.semicolon()};Buffer.prototype.rightBrace=function rightBrace(){this.newline(true);this.push("}")};Buffer.prototype.keyword=function keyword(name){this.push(name);this.space()};Buffer.prototype.space=function space(){if(this.format.compact)return;if(this.buf&&!this.isLast(" ")&&!this.isLast("\n")){this.push(" ")}};Buffer.prototype.removeLast=function removeLast(cha){if(this.format.compact)return;if(!this.isLast(cha))return;this.buf=this.buf.substr(0,this.buf.length-1);this.position.unshift(cha)};Buffer.prototype.newline=function newline(i,removeLast){if(this.format.compact)return;if(this.format.concise){this.space();return}if(!removeLast)removeLast=false;if(isNumber(i)){i=Math.min(2,i);if(this.endsWith("{\n")||this.endsWith(":\n"))i--;if(i<=0)return;while(i>0){this._newline(removeLast);i--}return}if(isBoolean(i)){removeLast=i}this._newline(removeLast)};Buffer.prototype._newline=function _newline(removeLast){if(this.endsWith("\n\n"))return;if(removeLast&&this.isLast("\n"))this.removeLast("\n");this.removeLast(" ");this._removeSpacesAfterLastNewline();this._push("\n")};Buffer.prototype._removeSpacesAfterLastNewline=function _removeSpacesAfterLastNewline(){var lastNewlineIndex=this.buf.lastIndexOf("\n");if(lastNewlineIndex===-1)return;var index=this.buf.length-1;while(index>lastNewlineIndex){if(this.buf[index]!==" "){break}index--}if(index===lastNewlineIndex){this.buf=this.buf.substring(0,index+1)}};Buffer.prototype.push=function push(str,noIndent){if(!this.format.compact&&this._indent&&!noIndent&&str!=="\n"){var indent=this.getIndent();str=str.replace(/\n/g,"\n"+indent);if(this.isLast("\n"))this._push(indent)}this._push(str)};Buffer.prototype._push=function _push(str){this.position.push(str);this.buf+=str};Buffer.prototype.endsWith=function endsWith(str){return this.buf.slice(-str.length)===str};Buffer.prototype.isLast=function isLast(cha){if(this.format.compact)return false;var buf=this.buf;var last=buf[buf.length-1];if(Array.isArray(cha)){return includes(cha,last)}else{return cha===last}};return Buffer}();module.exports=Buffer},{"lodash/collection/includes":319,"lodash/lang/isBoolean":393,"lodash/lang/isNumber":397,repeating:437,"trim-right":453}],21:[function(require,module,exports){"use strict";exports.File=File;exports.Program=Program;exports.BlockStatement=BlockStatement;exports.__esModule=true;function File(node,print){print(node.program)}function Program(node,print){print.sequence(node.body)}function BlockStatement(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();print.sequence(node.body,{indent:true});this.removeLast("\n");this.rightBrace()}}},{}],22:[function(require,module,exports){"use strict";exports.ClassDeclaration=ClassDeclaration;exports.ClassBody=ClassBody;exports.ClassProperty=ClassProperty;exports.MethodDefinition=MethodDefinition;exports.__esModule=true;function ClassDeclaration(node,print){print.list(node.decorators);this.push("class");if(node.id){this.space();print(node.id)}print(node.typeParameters);if(node.superClass){this.push(" extends ");print(node.superClass);print(node.superTypeParameters)}if(node["implements"]){this.push(" implements ");print.join(node["implements"],{separator:", "})}this.space();print(node.body)}exports.ClassExpression=ClassDeclaration;function ClassBody(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();this.indent();print.sequence(node.body);this.dedent();this.rightBrace()}}function ClassProperty(node,print){print.list(node.decorators);if(node["static"])this.push("static ");print(node.key);print(node.typeAnnotation);if(node.value){this.space();this.push("=");this.space();print(node.value)}this.semicolon()}function MethodDefinition(node,print){print.list(node.decorators);if(node["static"]){this.push("static ")}this._method(node,print)}},{}],23:[function(require,module,exports){"use strict";exports.ComprehensionBlock=ComprehensionBlock;exports.ComprehensionExpression=ComprehensionExpression;exports.__esModule=true;function ComprehensionBlock(node,print){this.keyword("for");this.push("(");print(node.left);this.push(" of ");print(node.right);this.push(")")}function ComprehensionExpression(node,print){this.push(node.generator?"(":"[");print.join(node.blocks,{separator:" "});this.space();if(node.filter){this.keyword("if");this.push("(");print(node.filter);this.push(")");this.space()}print(node.body);this.push(node.generator?")":"]")}},{}],24:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.UnaryExpression=UnaryExpression;exports.DoExpression=DoExpression;exports.UpdateExpression=UpdateExpression;exports.ConditionalExpression=ConditionalExpression;exports.NewExpression=NewExpression;exports.SequenceExpression=SequenceExpression;exports.ThisExpression=ThisExpression;exports.Super=Super;exports.Decorator=Decorator;exports.CallExpression=CallExpression;exports.EmptyStatement=EmptyStatement;exports.ExpressionStatement=ExpressionStatement;exports.AssignmentExpression=AssignmentExpression;exports.MemberExpression=MemberExpression;exports.__esModule=true;var isInteger=_interopRequire(require("is-integer"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var t=_interopRequireWildcard(require("../../types"));function UnaryExpression(node,print){var hasSpace=/[a-z]$/.test(node.operator);var arg=node.argument;if(t.isUpdateExpression(arg)||t.isUnaryExpression(arg)){hasSpace=true}if(t.isUnaryExpression(arg)&&arg.operator==="!"){hasSpace=false}this.push(node.operator);if(hasSpace)this.push(" ");print(node.argument)}function DoExpression(node,print){this.push("do");this.space();print(node.body)}function UpdateExpression(node,print){if(node.prefix){this.push(node.operator);print(node.argument)}else{print(node.argument);this.push(node.operator)}}function ConditionalExpression(node,print){print(node.test);this.space();this.push("?");this.space();print(node.consequent);this.space();this.push(":");this.space();print(node.alternate)}function NewExpression(node,print){this.push("new ");print(node.callee);this.push("(");print.list(node.arguments);this.push(")")}function SequenceExpression(node,print){print.list(node.expressions)}function ThisExpression(){this.push("this")}function Super(){this.push("super")}function Decorator(node,print){this.push("@");print(node.expression)}function CallExpression(node,print){print(node.callee);this.push("(");var separator=",";if(node._prettyCall){separator+="\n";this.newline();this.indent()}else{separator+=" "}print.list(node.arguments,{separator:separator});if(node._prettyCall){this.newline();this.dedent()}this.push(")")}var buildYieldAwait=function buildYieldAwait(keyword){return function(node,print){this.push(keyword);if(node.delegate||node.all){this.push("*")}if(node.argument){this.space();print(node.argument)}}};var YieldExpression=buildYieldAwait("yield");exports.YieldExpression=YieldExpression;var AwaitExpression=buildYieldAwait("await");exports.AwaitExpression=AwaitExpression;function EmptyStatement(){this.semicolon()}function ExpressionStatement(node,print){print(node.expression);this.semicolon()}function AssignmentExpression(node,print){print(node.left);this.push(" ");this.push(node.operator);this.push(" ");print(node.right)}exports.BinaryExpression=AssignmentExpression;exports.LogicalExpression=AssignmentExpression;exports.AssignmentPattern=AssignmentExpression;var SCIENTIFIC_NOTATION=/e/i;function MemberExpression(node,print){var obj=node.object;print(obj);if(!node.computed&&t.isMemberExpression(node.property)){throw new TypeError("Got a MemberExpression for MemberExpression property")}var computed=node.computed;if(t.isLiteral(node.property)&&isNumber(node.property.value)){computed=true}if(computed){this.push("[");print(node.property);this.push("]")}else{if(t.isLiteral(obj)&&isInteger(obj.value)&&!SCIENTIFIC_NOTATION.test(obj.value.toString())){this.push(".")}this.push(".");print(node.property)}}exports.MetaProperty=MemberExpression},{"../../types":153,"is-integer":303,"lodash/lang/isNumber":397}],25:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.AnyTypeAnnotation=AnyTypeAnnotation;exports.ArrayTypeAnnotation=ArrayTypeAnnotation;exports.BooleanTypeAnnotation=BooleanTypeAnnotation;exports.DeclareClass=DeclareClass;exports.DeclareFunction=DeclareFunction;exports.DeclareModule=DeclareModule;exports.DeclareVariable=DeclareVariable;exports.FunctionTypeAnnotation=FunctionTypeAnnotation;exports.FunctionTypeParam=FunctionTypeParam;exports.InterfaceExtends=InterfaceExtends;exports._interfaceish=_interfaceish;exports.InterfaceDeclaration=InterfaceDeclaration;exports.IntersectionTypeAnnotation=IntersectionTypeAnnotation;exports.NullableTypeAnnotation=NullableTypeAnnotation;exports.NumberTypeAnnotation=NumberTypeAnnotation;exports.StringLiteralTypeAnnotation=StringLiteralTypeAnnotation;exports.StringTypeAnnotation=StringTypeAnnotation;exports.TupleTypeAnnotation=TupleTypeAnnotation;exports.TypeofTypeAnnotation=TypeofTypeAnnotation;exports.TypeAlias=TypeAlias;exports.TypeAnnotation=TypeAnnotation;exports.TypeParameterInstantiation=TypeParameterInstantiation;exports.ObjectTypeAnnotation=ObjectTypeAnnotation;exports.ObjectTypeCallProperty=ObjectTypeCallProperty;exports.ObjectTypeIndexer=ObjectTypeIndexer;exports.ObjectTypeProperty=ObjectTypeProperty;exports.QualifiedTypeIdentifier=QualifiedTypeIdentifier;exports.UnionTypeAnnotation=UnionTypeAnnotation;exports.TypeCastExpression=TypeCastExpression;exports.VoidTypeAnnotation=VoidTypeAnnotation;exports.__esModule=true;var t=_interopRequireWildcard(require("../../types"));function AnyTypeAnnotation(){this.push("any")}function ArrayTypeAnnotation(node,print){print(node.elementType);this.push("[");this.push("]")}function BooleanTypeAnnotation(node){this.push("bool")}function DeclareClass(node,print){this.push("declare class ");this._interfaceish(node,print)}function DeclareFunction(node,print){this.push("declare function ");print(node.id);print(node.id.typeAnnotation.typeAnnotation);this.semicolon()}function DeclareModule(node,print){this.push("declare module ");print(node.id);this.space();print(node.body)}function DeclareVariable(node,print){this.push("declare var ");print(node.id);print(node.id.typeAnnotation);this.semicolon()}function FunctionTypeAnnotation(node,print,parent){print(node.typeParameters);this.push("(");print.list(node.params);if(node.rest){if(node.params.length){this.push(",");this.space()}this.push("...");print(node.rest)}this.push(")");if(parent.type==="ObjectTypeProperty"||parent.type==="ObjectTypeCallProperty"||parent.type==="DeclareFunction"){this.push(":")}else{this.space();this.push("=>")}this.space();print(node.returnType)}function FunctionTypeParam(node,print){print(node.name);if(node.optional)this.push("?");this.push(":");this.space();print(node.typeAnnotation)}function InterfaceExtends(node,print){print(node.id);print(node.typeParameters)}exports.ClassImplements=InterfaceExtends;exports.GenericTypeAnnotation=InterfaceExtends;function _interfaceish(node,print){print(node.id);print(node.typeParameters);if(node["extends"].length){this.push(" extends ");print.join(node["extends"],{separator:", "})}this.space();print(node.body)}function InterfaceDeclaration(node,print){this.push("interface ");this._interfaceish(node,print)}function IntersectionTypeAnnotation(node,print){print.join(node.types,{separator:" & "})}function NullableTypeAnnotation(node,print){this.push("?");print(node.typeAnnotation)}function NumberTypeAnnotation(){this.push("number")}function StringLiteralTypeAnnotation(node){this._stringLiteral(node.value)}function StringTypeAnnotation(){this.push("string")}function TupleTypeAnnotation(node,print){this.push("[");print.join(node.types,{separator:", "});this.push("]")}function TypeofTypeAnnotation(node,print){this.push("typeof ");print(node.argument)}function TypeAlias(node,print){this.push("type ");print(node.id);print(node.typeParameters);this.space();this.push("=");this.space();print(node.right);this.semicolon()}function TypeAnnotation(node,print){this.push(":");this.space();if(node.optional)this.push("?");print(node.typeAnnotation)}function TypeParameterInstantiation(node,print){this.push("<");print.join(node.params,{separator:", "});this.push(">")}exports.TypeParameterDeclaration=TypeParameterInstantiation;function ObjectTypeAnnotation(node,print){var _this=this;this.push("{");var props=node.properties.concat(node.callProperties,node.indexers);if(props.length){this.space();print.list(props,{separator:false,indent:true,iterator:function(){if(props.length!==1){_this.semicolon();_this.space()}}});this.space()}this.push("}")}function ObjectTypeCallProperty(node,print){if(node["static"])this.push("static ");print(node.value)}function ObjectTypeIndexer(node,print){if(node["static"])this.push("static ");this.push("[");print(node.id);this.push(":");this.space();print(node.key);this.push("]");this.push(":");this.space();print(node.value)}function ObjectTypeProperty(node,print){if(node["static"])this.push("static ");print(node.key);if(node.optional)this.push("?");if(!t.isFunctionTypeAnnotation(node.value)){this.push(":");this.space()}print(node.value)}function QualifiedTypeIdentifier(node,print){print(node.qualification);this.push(".");print(node.id)}function UnionTypeAnnotation(node,print){print.join(node.types,{separator:" | "})}function TypeCastExpression(node,print){this.push("(");print(node.expression);print(node.typeAnnotation);this.push(")")}function VoidTypeAnnotation(node){this.push("void")}},{"../../types":153}],26:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.JSXAttribute=JSXAttribute;exports.JSXIdentifier=JSXIdentifier;exports.JSXNamespacedName=JSXNamespacedName;exports.JSXMemberExpression=JSXMemberExpression;exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXExpressionContainer=JSXExpressionContainer;exports.JSXElement=JSXElement;exports.JSXOpeningElement=JSXOpeningElement;exports.JSXClosingElement=JSXClosingElement;exports.JSXEmptyExpression=JSXEmptyExpression;exports.__esModule=true;var each=_interopRequire(require("lodash/collection/each"));var t=_interopRequireWildcard(require("../../types"));function JSXAttribute(node,print){print(node.name);if(node.value){this.push("=");print(node.value)}}function JSXIdentifier(node){this.push(node.name)}function JSXNamespacedName(node,print){print(node.namespace);this.push(":");print(node.name)}function JSXMemberExpression(node,print){print(node.object);this.push(".");print(node.property)}function JSXSpreadAttribute(node,print){this.push("{...");print(node.argument);this.push("}")}function JSXExpressionContainer(node,print){this.push("{");print(node.expression);this.push("}")}function JSXElement(node,print){var _this=this;var open=node.openingElement;print(open);if(open.selfClosing)return;this.indent();each(node.children,function(child){if(t.isLiteral(child)){_this.push(child.value)}else{print(child)}});this.dedent();print(node.closingElement)}function JSXOpeningElement(node,print){this.push("<");print(node.name);if(node.attributes.length>0){this.push(" ");print.join(node.attributes,{separator:" "})}this.push(node.selfClosing?" />":">")}function JSXClosingElement(node,print){this.push("")}function JSXEmptyExpression(){}},{"../../types":153, +"lodash/collection/each":316}],27:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports._params=_params;exports._method=_method;exports.FunctionExpression=FunctionExpression;exports.ArrowFunctionExpression=ArrowFunctionExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../types"));function _params(node,print){var _this=this;print(node.typeParameters);this.push("(");print.list(node.params,{iterator:function(node){if(node.optional)_this.push("?");print(node.typeAnnotation)}});this.push(")");if(node.returnType){print(node.returnType)}}function _method(node,print){var value=node.value;var kind=node.kind;var key=node.key;if(kind==="method"||kind==="init"){if(value.generator){this.push("*")}}if(kind==="get"||kind==="set"){this.push(kind+" ")}if(value.async)this.push("async ");if(node.computed){this.push("[");print(key);this.push("]")}else{print(key)}this._params(value,print);this.push(" ");print(value.body)}function FunctionExpression(node,print){if(node.async)this.push("async ");this.push("function");if(node.generator)this.push("*");if(node.id){this.push(" ");print(node.id)}else{this.space()}this._params(node,print);this.space();print(node.body)}exports.FunctionDeclaration=FunctionExpression;function ArrowFunctionExpression(node,print){if(node.async)this.push("async ");if(node.params.length===1&&t.isIdentifier(node.params[0])){print(node.params[0])}else{this._params(node,print)}this.push(" => ");print(node.body)}},{"../../types":153}],28:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.ImportSpecifier=ImportSpecifier;exports.ImportDefaultSpecifier=ImportDefaultSpecifier;exports.ExportDefaultSpecifier=ExportDefaultSpecifier;exports.ExportSpecifier=ExportSpecifier;exports.ExportNamespaceSpecifier=ExportNamespaceSpecifier;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ImportDeclaration=ImportDeclaration;exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier;exports.__esModule=true;var each=_interopRequire(require("lodash/collection/each"));var t=_interopRequireWildcard(require("../../types"));function ImportSpecifier(node,print){print(node.imported);if(node.local&&node.local!==node.imported){this.push(" as ");print(node.local)}}function ImportDefaultSpecifier(node,print){print(node.local)}function ExportDefaultSpecifier(node,print){print(node.exported)}function ExportSpecifier(node,print){print(node.local);if(node.exported&&node.local!==node.exported){this.push(" as ");print(node.exported)}}function ExportNamespaceSpecifier(node,print){this.push("* as ");print(node.exported)}function ExportAllDeclaration(node,print){this.push("export *");if(node.exported){this.push(" as ");print(node.exported)}this.push(" from ");print(node.source);this.semicolon()}function ExportNamedDeclaration(node,print){this.push("export ");ExportDeclaration.call(this,node,print)}function ExportDefaultDeclaration(node,print){this.push("export default ");ExportDeclaration.call(this,node,print)}function ExportDeclaration(node,print){var specifiers=node.specifiers;if(node.declaration){var declar=node.declaration;print(declar);if(t.isStatement(declar)||t.isFunction(declar)||t.isClass(declar))return}else{var first=specifiers[0];var hasSpecial=false;if(t.isExportDefaultSpecifier(first)||t.isExportNamespaceSpecifier(first)){hasSpecial=true;print(specifiers.shift());if(specifiers.length){this.push(", ")}}if(specifiers.length||!specifiers.length&&!hasSpecial){this.push("{");if(specifiers.length){this.space();print.join(specifiers,{separator:", "});this.space()}this.push("}")}if(node.source){this.push(" from ");print(node.source)}}this.ensureSemicolon()}function ImportDeclaration(node,print){this.push("import ");if(node.isType){this.push("type ")}var specfiers=node.specifiers;if(specfiers&&specfiers.length){var first=node.specifiers[0];if(t.isImportDefaultSpecifier(first)||t.isImportNamespaceSpecifier(first)){print(node.specifiers.shift());if(node.specifiers.length){this.push(", ")}}if(node.specifiers.length){this.push("{");this.space();print.join(node.specifiers,{separator:", "});this.space();this.push("}")}this.push(" from ")}print(node.source);this.semicolon()}function ImportNamespaceSpecifier(node,print){this.push("* as ");print(node.local)}},{"../../types":153,"lodash/collection/each":316}],29:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.WithStatement=WithStatement;exports.IfStatement=IfStatement;exports.ForStatement=ForStatement;exports.WhileStatement=WhileStatement;exports.DoWhileStatement=DoWhileStatement;exports.LabeledStatement=LabeledStatement;exports.TryStatement=TryStatement;exports.CatchClause=CatchClause;exports.ThrowStatement=ThrowStatement;exports.SwitchStatement=SwitchStatement;exports.SwitchCase=SwitchCase;exports.DebuggerStatement=DebuggerStatement;exports.VariableDeclaration=VariableDeclaration;exports.VariableDeclarator=VariableDeclarator;exports.__esModule=true;var repeating=_interopRequire(require("repeating"));var t=_interopRequireWildcard(require("../../types"));function WithStatement(node,print){this.keyword("with");this.push("(");print(node.object);this.push(")");print.block(node.body)}function IfStatement(node,print){this.keyword("if");this.push("(");print(node.test);this.push(")");this.space();print.indentOnComments(node.consequent);if(node.alternate){if(this.isLast("}"))this.space();this.push("else ");print.indentOnComments(node.alternate)}}function ForStatement(node,print){this.keyword("for");this.push("(");print(node.init);this.push(";");if(node.test){this.push(" ");print(node.test)}this.push(";");if(node.update){this.push(" ");print(node.update)}this.push(")");print.block(node.body)}function WhileStatement(node,print){this.keyword("while");this.push("(");print(node.test);this.push(")");print.block(node.body)}var buildForXStatement=function buildForXStatement(op){return function(node,print){this.keyword("for");this.push("(");print(node.left);this.push(" "+op+" ");print(node.right);this.push(")");print.block(node.body)}};var ForInStatement=buildForXStatement("in");exports.ForInStatement=ForInStatement;var ForOfStatement=buildForXStatement("of");exports.ForOfStatement=ForOfStatement;function DoWhileStatement(node,print){this.keyword("do");print(node.body);this.space();this.keyword("while");this.push("(");print(node.test);this.push(");")}var buildLabelStatement=function buildLabelStatement(prefix,key){return function(node,print){this.push(prefix);var label=node[key||"label"];if(label){this.push(" ");print(label)}this.semicolon()}};var ContinueStatement=buildLabelStatement("continue");exports.ContinueStatement=ContinueStatement;var ReturnStatement=buildLabelStatement("return","argument");exports.ReturnStatement=ReturnStatement;var BreakStatement=buildLabelStatement("break");exports.BreakStatement=BreakStatement;function LabeledStatement(node,print){print(node.label);this.push(": ");print(node.body)}function TryStatement(node,print){this.keyword("try");print(node.block);this.space();if(node.handlers){print(node.handlers[0])}else{print(node.handler)}if(node.finalizer){this.space();this.push("finally ");print(node.finalizer)}}function CatchClause(node,print){this.keyword("catch");this.push("(");print(node.param);this.push(") ");print(node.body)}function ThrowStatement(node,print){this.push("throw ");print(node.argument);this.semicolon()}function SwitchStatement(node,print){this.keyword("switch");this.push("(");print(node.discriminant);this.push(")");this.space();this.push("{");print.sequence(node.cases,{indent:true,addNewlines:function addNewlines(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}});this.push("}")}function SwitchCase(node,print){if(node.test){this.push("case ");print(node.test);this.push(":")}else{this.push("default:")}if(node.consequent.length){this.newline();print.sequence(node.consequent,{indent:true})}}function DebuggerStatement(){this.push("debugger;")}function VariableDeclaration(node,print,parent){this.push(node.kind+" ");var hasInits=false;if(!t.isFor(parent)){for(var i=0;i0)_this.push(" ");print(elem);if(i1e5;if(format.compact){console.error(messages.get("codeGeneratorDeopt",opts.filename,"100KB"))}}return format};CodeGenerator.findCommonStringDelimeter=function findCommonStringDelimeter(code,tokens){var occurences={single:0,"double":0};var checked=0;for(var i=0;i=3)continue;var raw=code.slice(token.start,token.end);if(raw[0]==="'"){occurences.single++}else{occurences.double++}checked++}if(occurences.single>occurences.double){return"single"}else{return"double"}};CodeGenerator.generators={templateLiterals:require("./generators/template-literals"),comprehensions:require("./generators/comprehensions"),expressions:require("./generators/expressions"),statements:require("./generators/statements"),classes:require("./generators/classes"),methods:require("./generators/methods"),modules:require("./generators/modules"),types:require("./generators/types"),flow:require("./generators/flow"),base:require("./generators/base"),jsx:require("./generators/jsx")};CodeGenerator.prototype.generate=function generate(){var ast=this.ast;this.print(ast);var comments=[];each(ast.comments,function(comment){if(!comment._displayed)comments.push(comment)});this._printComments(comments);return{map:this.map.get(),code:this.buffer.get()}};CodeGenerator.prototype.buildPrint=function buildPrint(parent){var _this=this;var print=function(node,opts){return _this.print(node,parent,opts)};print.sequence=function(nodes){var opts=arguments[1]===undefined?{}:arguments[1];opts.statement=true;return _this.printJoin(print,nodes,opts)};print.join=function(nodes,opts){return _this.printJoin(print,nodes,opts)};print.list=function(items){var opts=arguments[1]===undefined?{}:arguments[1];if(opts.separator==null)opts.separator=", ";print.join(items,opts)};print.block=function(node){return _this.printBlock(print,node)};print.indentOnComments=function(node){return _this.printAndIndentOnComments(print,node)};return print};CodeGenerator.prototype.print=function print(node,parent){var _this=this;var opts=arguments[2]===undefined?{}:arguments[2];if(!node)return;if(parent&&parent._compact){node._compact=true}var oldConcise=this.format.concise;if(node._compact){this.format.concise=true}var newline=function(leading){if(!opts.statement&&!n.isUserWhitespacable(node,parent)){return}var lines=0;if(node.start!=null&&!node._ignoreUserWhitespace){if(leading){lines=_this.whitespace.getNewlinesBefore(node)}else{lines=_this.whitespace.getNewlinesAfter(node)}}else{if(!leading)lines++;if(opts.addNewlines)lines+=opts.addNewlines(leading,node)||0;var needs=n.needsWhitespaceAfter;if(leading)needs=n.needsWhitespaceBefore;if(needs(node,parent))lines++;if(!_this.buffer.buf)lines=0}_this.newline(lines)};if(this[node.type]){var needsNoLineTermParens=n.needsParensNoLineTerminator(node,parent);var needsParens=needsNoLineTermParens||n.needsParens(node,parent);if(needsParens)this.push("(");if(needsNoLineTermParens)this.indent();this.printLeadingComments(node,parent);newline(true);if(opts.before)opts.before();this.map.mark(node,"start");this[node.type](node,this.buildPrint(node),parent);if(needsNoLineTermParens){this.newline();this.dedent()}if(needsParens)this.push(")");this.map.mark(node,"end");if(opts.after)opts.after();newline(false);this.printTrailingComments(node,parent)}else{throw new ReferenceError("unknown node of type "+JSON.stringify(node.type)+" with constructor "+JSON.stringify(node&&node.constructor.name))}this.format.concise=oldConcise};CodeGenerator.prototype.printJoin=function printJoin(print,nodes){var _this=this;var opts=arguments[2]===undefined?{}:arguments[2];if(!nodes||!nodes.length)return;var len=nodes.length;if(opts.indent)this.indent();each(nodes,function(node,i){print(node,{statement:opts.statement,addNewlines:opts.addNewlines,after:function(){if(opts.iterator){opts.iterator(node,i)}if(opts.separator&&i","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(tier,i){each(tier,function(op){PRECEDENCE[op]=i})});function NullableTypeAnnotation(node,parent){return t.isArrayTypeAnnotation(parent)}exports.FunctionTypeAnnotation=NullableTypeAnnotation;function UpdateExpression(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}}function ObjectExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function Binary(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node){return true}}}function BinaryExpression(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}}function SequenceExpression(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}return true}function YieldExpression(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)||t.isConditionalExpression(parent)||t.isYieldExpression(parent)}function ClassExpression(node,parent){return t.isExpressionStatement(parent)}function UnaryLike(node,parent){return t.isMemberExpression(parent)&&parent.object===node}function FunctionExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isCallExpression(parent)&&parent.callee===node){return true}}function ConditionalExpression(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isCallExpression(parent)||t.isNewExpression(parent)){if(parent.callee===node){return true}}if(t.isConditionalExpression(parent)&&parent.test===node){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}exports.AssignmentExpression=ConditionalExpression},{"../../types":153,"lodash/collection/each":316}],35:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var each=_interopRequire(require("lodash/collection/each"));var map=_interopRequire(require("lodash/collection/map"));var t=_interopRequireWildcard(require("../../types"));function crawl(node){var state=arguments[1]===undefined?{}:arguments[1];if(t.isMemberExpression(node)){crawl(node.object,state);if(node.computed)crawl(node.property,state)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){crawl(node.left,state);crawl(node.right,state)}else if(t.isCallExpression(node)){state.hasCall=true;crawl(node.callee,state)}else if(t.isFunction(node)){state.hasFunction=true}else if(t.isIdentifier(node)){var _state=state;if(!_state.hasHelper)_state.hasHelper=isHelper(node.callee)}return state}function isHelper(node){if(t.isMemberExpression(node)){return isHelper(node.object)||isHelper(node.property)}else if(t.isIdentifier(node)){return node.name==="require"||node.name[0]==="_"}else if(t.isCallExpression(node)){return isHelper(node.callee)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){return t.isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)}else{return false}}function isType(node){return t.isLiteral(node)||t.isObjectExpression(node)||t.isArrayExpression(node)||t.isIdentifier(node)||t.isMemberExpression(node)}exports.nodes={AssignmentExpression:function AssignmentExpression(node){var state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction){return{before:state.hasFunction,after:true}}},SwitchCase:function SwitchCase(node,parent){return{before:node.consequent.length||parent.cases[0]===node}},LogicalExpression:function LogicalExpression(node){if(t.isFunction(node.left)||t.isFunction(node.right)){return{after:true}}},Literal:function Literal(node){if(node.value==="use strict"){return{after:true}}},CallExpression:function CallExpression(node){if(t.isFunction(node.callee)||isHelper(node)){return{before:true,after:true}}},VariableDeclaration:function VariableDeclaration(node){for(var i=0;i=max){i-=max}return i}var Whitespace=function(){function Whitespace(tokens,comments){_classCallCheck(this,Whitespace);this.tokens=sortBy(tokens.concat(comments),"start");this.used={};this._lastFoundIndex=0}Whitespace.prototype.getNewlinesBefore=function getNewlinesBefore(node){var startToken;var endToken;var tokens=this.tokens;var token;for(var j=0;j")}}).join("\n")}},{chalk:200,esutils:300,"js-tokens":306,"line-numbers":308,repeating:437}],40:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var t=_interopRequireWildcard(require("../types"));module.exports=function(ast,comments,tokens){if(ast&&ast.type==="Program"){return t.file(ast,comments||[],tokens||[])}else{throw new Error("Not a valid ast?")}}},{"../types":153}],41:[function(require,module,exports){"use strict";module.exports=function(){return Object.create(null)}},{}],42:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var normalizeAst=_interopRequire(require("./normalize-ast"));var estraverse=_interopRequire(require("estraverse"));var codeFrame=_interopRequire(require("./code-frame"));var acorn=_interopRequireWildcard(require("../../acorn"));module.exports=function(opts,code,callback){try{var comments=[];var tokens=[];var parseOpts={allowImportExportEverywhere:opts.looseModules,allowReturnOutsideFunction:opts.looseModules,ecmaVersion:6,strictMode:opts.strictMode,sourceType:opts.sourceType,onComment:comments,locations:true,features:opts.features||{},plugins:opts.plugins||{},onToken:tokens,ranges:true};if(opts.nonStandard){parseOpts.plugins.jsx=true;parseOpts.plugins.flow=true}var ast=acorn.parse(code,parseOpts);estraverse.attachComments(ast,comments,tokens);ast=normalizeAst(ast,comments,tokens);if(callback){return callback(ast)}else{return ast}}catch(err){if(!err._babel){err._babel=true;var message=err.message=""+opts.filename+": "+err.message;var loc=err.loc;if(loc){err.codeFrame=codeFrame(code,loc.line,loc.column+1,opts);message+="\n"+err.codeFrame}if(err.stack){var newStack=err.stack.replace(err.message,message);try{err.stack=newStack}catch(e){}}}throw err}}},{"../../acorn":5,"./code-frame":39,"./normalize-ast":40,estraverse:296}],43:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.get=get;exports.parseArgs=parseArgs;exports.__esModule=true;var util=_interopRequireWildcard(require("util"));var MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned so it's probably be dereferenced so we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",classesIllegalConstructorKind:"Illegal kind for constructor method",scopeDuplicateDeclaration:"Duplicate declaration $1",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",settersInvalidParamLength:"Setters must have exactly one parameter",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemeberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",modulesIllegalExportName:"Illegal export $1",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",evalInStrictMode:"eval is not allowed in strict mode",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1"};exports.MESSAGES=MESSAGES;function get(key){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var msg=MESSAGES[key];if(!msg)throw new ReferenceError("Unknown message "+JSON.stringify(key));args=parseArgs(args);return msg.replace(/\$(\d+)/g,function(str,i){return args[--i]})}function parseArgs(args){return args.map(function(val){if(val!=null&&val.inspect){return val.inspect()}else{try{return JSON.stringify(val)||val+""}catch(e){return util.inspect(val)}}})}},{util:199}],44:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var estraverse=_interopRequire(require("estraverse"));var extend=_interopRequire(require("lodash/object/extend"));var types=_interopRequire(require("ast-types"));var t=_interopRequireWildcard(require("./types"));extend(estraverse.VisitorKeys,t.VISITOR_KEYS);var def=types.Type.def;var or=types.Type.or;def("File").bases("Node").build("program").field("program",def("Program"));def("AssignmentPattern").bases("Pattern").build("left","right").field("left",def("Pattern")).field("right",def("Expression"));def("RestElement").bases("Pattern").build("argument").field("argument",def("expression"));def("DoExpression").bases("Expression").build("body").field("body",[def("Statement")]);def("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null));def("ExportNamedDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"))]).field("source",or(def("ModuleSpecifier"),null));types.finalize()},{"./types":153,"ast-types":171,estraverse:296,"lodash/object/extend":406}],45:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var merge=_interopRequire(require("lodash/object/merge"));var path=_interopRequire(require("path"));var fs=_interopRequire(require("fs"));var cache={};var jsons={};function exists(filename){if(!fs.existsSync)return false;var cached=cache[filename];if(cached!=null)return cached;return cache[filename]=fs.existsSync(filename)}module.exports=function(loc){var opts=arguments[1]===undefined?{}:arguments[1];var rel=".babelrc";function find(start,rel){var file=path.join(start,rel);if(exists(file)){var content=fs.readFileSync(file,"utf8");var json;try{var _jsons,_content;json=(_jsons=jsons,_content=content,!_jsons[_content]&&(_jsons[_content]=JSON.parse(content)),_jsons[_content])}catch(err){err.message=""+file+": "+err.message;throw err}if(json.breakConfig)return;merge(opts,json,function(a,b){if(Array.isArray(a)){return a.concat(b)}})}var up=path.dirname(start);if(up!==start){find(up,rel)}}if(opts.breakConfig!==true){find(loc,rel)}return opts}},{fs:172,"lodash/object/merge":410,path:182}],46:[function(require,module,exports){(function(process){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _slicedToArray=function(arr,i){if(Array.isArray(arr)){return arr}else if(Symbol.iterator in Object(arr)){var _arr=[];for(var _iterator=arr[Symbol.iterator](),_step;!(_step=_iterator.next()).done;){_arr.push(_step.value);if(i&&_arr.length===i)break}return _arr}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var convertSourceMap=_interopRequire(require("convert-source-map"));var optionParsers=_interopRequireWildcard(require("./option-parsers"));var shebangRegex=_interopRequire(require("shebang-regex"));var TraversalPath=_interopRequire(require("../../traversal/path"));var isFunction=_interopRequire(require("lodash/lang/isFunction"));var isAbsolute=_interopRequire(require("path-is-absolute"));var resolveRc=_interopRequire(require("../../tools/resolve-rc"));var sourceMap=_interopRequire(require("source-map"));var transform=_interopRequire(require("./../index"));var generate=_interopRequire(require("../../generation"));var defaults=_interopRequire(require("lodash/object/defaults"));var includes=_interopRequire(require("lodash/collection/includes"));var traverse=_interopRequire(require("../../traversal"));var assign=_interopRequire(require("lodash/object/assign"));var Logger=_interopRequire(require("./logger"));var parse=_interopRequire(require("../../helpers/parse"));var Scope=_interopRequire(require("../../traversal/scope"));var slash=_interopRequire(require("slash"));var util=_interopRequireWildcard(require("../../util"));var path=_interopRequire(require("path"));var each=_interopRequire(require("lodash/collection/each"));var t=_interopRequireWildcard(require("../../types"));var checkTransformerVisitor={enter:function enter(node,parent,scope,state){checkNode(state.stack,node,scope)}};function checkNode(stack,node,scope){each(stack,function(pass){if(pass.shouldRun||pass.ran)return;pass.checkNode(node,scope)})}var File=function(){function File(){var opts=arguments[0]===undefined?{}:arguments[0];_classCallCheck(this,File);this.dynamicImportedNoDefault=[];this.dynamicImportIds={};this.dynamicImported=[];this.dynamicImports=[];this.usedHelpers={};this.dynamicData={};this.data={};this.uids={};this.lastStatements=[];this.log=new Logger(this,opts.filename||"unknown");this.opts=this.normalizeOptions(opts);this.ast={};this.buildTransformers()}File.helpers=["inherits","defaults","create-class","create-decorated-class","tagged-template-literal","tagged-template-literal-loose","interop-require","to-array","to-consumable-array","sliced-to-array","sliced-to-array-loose","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-require-wildcard","typeof","extends","get","set","class-call-check","object-destructuring-empty","temporal-undefined","temporal-assert-defined","self-global","default-props"];File.options=require("./options");File.prototype.normalizeOptions=function normalizeOptions(opts){opts=assign({},opts);if(opts.filename){var rcFilename=opts.filename;if(!isAbsolute(rcFilename))rcFilename=path.join(process.cwd(),rcFilename);opts=resolveRc(rcFilename,opts)}for(var key in opts){if(key[0]==="_")continue;var option=File.options[key];if(!option)this.log.error("Unknown option: "+key,ReferenceError)}for(var key in File.options){var option=File.options[key];var val=opts[key];if(!val&&option.optional)continue;if(val&&option.deprecated){throw new Error("Deprecated option "+key+": "+option.deprecated)}if(val==null)val=option["default"]||val;var optionParser=optionParsers[option.type];if(optionParser)val=optionParser(key,val);if(option.alias){var _opts=opts;var _option$alias=option.alias;if(!_opts[_option$alias])_opts[_option$alias]=val}else{opts[key]=val}}if(opts.inputSourceMap){opts.sourceMaps=true}opts.filename=slash(opts.filename);if(opts.sourceRoot){opts.sourceRoot=slash(opts.sourceRoot)}if(opts.moduleId){opts.moduleIds=true}opts.basename=path.basename(opts.filename,path.extname(opts.filename));opts.ignore=util.arrayify(opts.ignore,util.regexify);opts.only=util.arrayify(opts.only,util.regexify);defaults(opts,{moduleRoot:opts.sourceRoot});defaults(opts,{sourceRoot:opts.moduleRoot});defaults(opts,{filenameRelative:opts.filename});defaults(opts,{sourceFileName:opts.filenameRelative,sourceMapName:opts.filenameRelative});if(opts.externalHelpers){this.set("helpersNamespace",t.identifier("babelHelpers"))}return opts};File.prototype.isLoose=function isLoose(key){return includes(this.opts.loose,key)};File.prototype.buildTransformers=function buildTransformers(){var file=this;var transformers=this.transformers={};var secondaryStack=[];var stack=[];each(transform.transformers,function(transformer,key){var pass=transformers[key]=transformer.buildPass(file);if(pass.canTransform()){stack.push(pass);if(transformer.metadata.secondPass){secondaryStack.push(pass)}if(transformer.manipulateOptions){transformer.manipulateOptions(file.opts,file)}}});var beforePlugins=[];var afterPlugins=[];for(var i=0;i=0};File.prototype.attachAuxiliaryComment=function attachAuxiliaryComment(node){var comment=this.opts.auxiliaryComment;if(comment){var _node=node;if(!_node.leadingComments)_node.leadingComments=[];node.leadingComments.push({type:"Line",value:" "+comment})}return node};File.prototype.addHelper=function addHelper(name){if(!includes(File.helpers,name)){throw new ReferenceError("Unknown helper "+name)}var program=this.ast.program;var declar=program._declarations&&program._declarations[name];if(declar)return declar.id;this.usedHelpers[name]=true;var generator=this.get("helperGenerator");var runtime=this.get("helpersNamespace");if(generator){return generator(name)}else if(runtime){var id=t.identifier(t.toIdentifier(name));return t.memberExpression(runtime,id)}else{var ref=util.template("helper-"+name);ref._compact=true;var uid=this.scope.generateUidIdentifier(name);this.scope.push({key:name,id:uid,init:ref});return uid}};File.prototype.errorWithNode=function errorWithNode(node,msg){var Error=arguments[2]===undefined?SyntaxError:arguments[2];var loc=node.loc.start;var err=new Error("Line "+loc.line+": "+msg);err.loc=loc;return err};File.prototype.addCode=function addCode(code){code=(code||"")+"";code=this.parseInputSourceMap(code);this.code=code;return this.parseShebang(code)};File.prototype.shouldIgnore=function shouldIgnore(){var opts=this.opts;return util.shouldIgnore(opts.filename,opts.ignore,opts.only)};File.prototype.parse=function(_parse){var _parseWrapper=function parse(_x2){return _parse.apply(this,arguments)};_parseWrapper.toString=function(){return _parse.toString()};return _parseWrapper}(function(code){var _this=this;if(this.shouldIgnore()){return{metadata:{},code:code,map:null,ast:null}}code=this.addCode(code);var opts=this.opts;var parseOpts={highlightCode:opts.highlightCode,nonStandard:opts.nonStandard,filename:opts.filename,plugins:{}};var features=parseOpts.features={};for(var key in this.transformers){var transformer=this.transformers[key];features[key]=transformer.canTransform()}parseOpts.looseModules=this.isLoose("es6.modules");parseOpts.strictMode=features.strict;parseOpts.sourceType="module";return parse(parseOpts,code,function(tree){_this.transform(tree);return _this.generate()})});File.prototype.setAst=function setAst(ast){this.path=TraversalPath.get(null,null,ast,ast,"program",this);this.scope=this.path.scope;this.ast=ast;this.path.traverse({enter:function enter(node,parent,scope){if(this.isScope()){for(var key in scope.bindings){scope.bindings[key].setTypeAnnotation()}}}})};File.prototype.transform=function transform(ast){this.log.debug();this.setAst(ast);this.lastStatements=t.getLastStatements(ast.program);var modFormatter=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);if(modFormatter.init&&this.transformers["es6.modules"].canTransform()){modFormatter.init()}this.checkNode(ast);this.call("pre");each(this.transformerStack,function(pass){pass.transform()});this.call("post")};File.prototype.call=function call(key){var stack=this.transformerStack;for(var i=0;i=0||val.indexOf(true)>=0){val=Object.keys(transform.transformers)}return transform._ensureTransformerNames(key,val)}function number(key,val){return+val}function boolean(key,val){return!!val}function booleanString(key,val){return util.booleanify(val)}function list(key,val){return util.list(val)}},{"../../util":157,"./../index":63}],49:[function(require,module,exports){module.exports={filename:{type:"string",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:true,type:"string"},inputSourceMap:{hidden:true},moduleId:{description:"specify a custom name for module ids",type:"string"},nonStandard:{type:"boolean","default":true,description:"enable support for JSX and Flow"},experimental:{deprecated:"use `--stage 0`/`{ stage: 0 }` instead"},highlightCode:{description:"ANSI syntax highlight code frames",type:"boolean","default":true},suppressDeprecationMessages:{type:"boolean","default":false,hidden:true},resolveModuleSource:{hidden:true},stage:{description:"ECMAScript proposal stage version to allow [0-4]",shorthand:"e",type:"number","default":2},blacklist:{type:"transformerList",description:"blacklist of transformers to NOT use",shorthand:"b"},whitelist:{type:"transformerList",optional:true,description:"whitelist of transformers to ONLY use",shorthand:"l"},optional:{type:"transformerList",description:"list of optional transformers to enable"},modules:{type:"string",description:"module formatter type to use [common]","default":"common",shorthand:"m"},moduleIds:{type:"boolean","default":false,shorthand:"M",description:"insert an explicit id for modules"},loose:{type:"transformerList",description:"list of transformers to enable loose mode ON",shorthand:"L"},jsxPragma:{type:"string",description:"custom pragma to use with JSX (same functionality as @jsx comments)","default":"React.createElement",shorthand:"P"},plugins:{type:"list",description:""},ignore:{type:"list",description:"list of glob paths to **not** compile"},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:true,"default":true,type:"boolean"},ast:{hidden:true,"default":true,type:"boolean"},comments:{type:"boolean","default":true,description:"output comments in generated output"},compact:{type:"booleanString","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},keepModuleIdExtensions:{type:"boolean",description:"keep extensions when generating module ids","default":false,shorthand:"k"},auxiliaryComment:{type:"string","default":"",shorthand:"a",description:"attach a comment before all helper declarations and auxiliary code"},externalHelpers:{type:"string","default":false,shorthand:"r",description:"uses a reference to `babelHelpers` instead of placing helpers at the top of your code."},metadataUsedHelpers:{type:"boolean","default":false,hidden:true},sourceMap:{alias:"sourceMaps",hidden:true},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":false,shorthand:"s"},sourceMapName:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"string",description:"the root from which all sources are relative"},moduleRoot:{type:"string",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},breakConfig:{type:"boolean","default":false,hidden:true,description:"stop trying to load .babelrc files"}}},{}],50:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var explode=_interopRequire(require("./explode-assignable-expression"));var t=_interopRequireWildcard(require("../../types"));module.exports=function(exports,opts){var isAssignment=function isAssignment(node){return node.operator===opts.operator+"="};var buildAssignment=function buildAssignment(left,right){return t.assignmentExpression("=",left,right)};exports.ExpressionStatement=function(node,parent,scope,file){if(file.isConsequenceExpressionStatement(node))return;var expr=node.expression; + +if(!isAssignment(expr))return;var nodes=[];var exploded=explode(expr.left,nodes,file,scope,true);nodes.push(t.expressionStatement(buildAssignment(exploded.ref,opts.build(exploded.uid,expr.right))));return nodes};exports.AssignmentExpression=function(node,parent,scope,file){if(!isAssignment(node))return;var nodes=[];var exploded=explode(node.left,nodes,file,scope);nodes.push(buildAssignment(exploded.ref,opts.build(exploded.uid,node.right)));return nodes};exports.BinaryExpression=function(node){if(node.operator!==opts.operator)return;return opts.build(node.left,node.right)}}},{"../../types":153,"./explode-assignable-expression":55}],51:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};module.exports=build;var t=_interopRequireWildcard(require("../../types"));function build(node,buildBody){var self=node.blocks.shift();if(!self)return;var child=build(node,buildBody);if(!child){child=buildBody();if(node.filter){child=t.ifStatement(node.filter,t.blockStatement([child]))}}return t.forOfStatement(t.variableDeclaration("let",[t.variableDeclarator(self.left)]),self.right,t.blockStatement([child]))}},{"../../types":153}],52:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var isString=_interopRequire(require("lodash/lang/isString"));var messages=_interopRequireWildcard(require("../../messages"));var esutils=_interopRequire(require("esutils"));var react=_interopRequireWildcard(require("./react"));var t=_interopRequireWildcard(require("../../types"));module.exports=function(exports,opts){exports.check=function(node){if(t.isJSX(node))return true;if(react.isCreateClass(node))return true;return false};exports.JSXIdentifier=function(node,parent){if(node.name==="this"&&t.isReferenced(node,parent)){return t.thisExpression()}else if(esutils.keyword.isIdentifierName(node.name)){node.type="Identifier"}else{return t.literal(node.name)}};exports.JSXNamespacedName=function(node,parent,scope,file){throw this.errorWithNode(messages.get("JSXNamespacedTags"))};exports.JSXMemberExpression={exit:function exit(node){node.computed=t.isLiteral(node.property);node.type="MemberExpression"}};exports.JSXExpressionContainer=function(node){return node.expression};exports.JSXAttribute={enter:function enter(node){var value=node.value;if(t.isLiteral(value)&&isString(value.value)){value.value=value.value.replace(/\n\s+/g," ")}},exit:function exit(node){var value=node.value||t.literal(true);return t.inherits(t.property("init",node.name,value),node)}};exports.JSXOpeningElement={exit:function exit(node,parent,scope,file){var tagExpr=node.name;var args=[];var tagName;if(t.isIdentifier(tagExpr)){tagName=tagExpr.name}else if(t.isLiteral(tagExpr)){tagName=tagExpr.value}var state={tagExpr:tagExpr,tagName:tagName,args:args};if(opts.pre){opts.pre(state,file)}var attribs=node.attributes;if(attribs.length){attribs=buildJSXOpeningElementAttributes(attribs,file)}else{attribs=t.literal(null)}args.push(attribs);if(opts.post){opts.post(state,file)}return state.call||t.callExpression(state.callee,args)}};var buildJSXOpeningElementAttributes=function buildJSXOpeningElementAttributes(attribs,file){var _props=[];var objs=[];var pushProps=function pushProps(){if(!_props.length)return;objs.push(t.objectExpression(_props));_props=[]};while(attribs.length){var prop=attribs.shift();if(t.isJSXSpreadAttribute(prop)){pushProps();objs.push(prop.argument)}else{_props.push(prop)}}pushProps();if(objs.length===1){attribs=objs[0]}else{if(!t.isObjectExpression(objs[0])){objs.unshift(t.objectExpression([]))}attribs=t.callExpression(file.addHelper("extends"),objs)}return attribs};exports.JSXElement={enter:function enter(node){node.children=react.buildChildren(node)},exit:function exit(node){var callExpr=node.openingElement;callExpr.arguments=callExpr.arguments.concat(node.children);if(callExpr.arguments.length>=3){callExpr._prettyCall=true}return t.inherits(callExpr,node)}};var addDisplayName=function addDisplayName(id,call){var props=call.arguments[0].properties;var safe=true;for(var i=0;i=0}function pullFlag(node,flag){var flags=node.regex.flags.split("");if(node.regex.flags.indexOf(flag)<0)return;pull(flags,flag);node.regex.flags=flags.join("")}},{"../../types":153,"lodash/array/pull":313}],60:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var t=_interopRequireWildcard(require("../../types"));var awaitVisitor={enter:function enter(node,parent,scope,state){if(t.isFunction(node))this.skip();if(t.isAwaitExpression(node)){node.type="YieldExpression";if(node.all){node.all=false;node.argument=t.callExpression(t.memberExpression(t.identifier("Promise"),t.identifier("all")),[node.argument])}}}};var referenceVisitor={enter:function enter(node,parent,scope,state){var name=state.id.name;if(t.isReferencedIdentifier(node,parent,{name:name})&&scope.bindingIdentifierEquals(name,state.id)){var _state;return _state=state,!_state.ref&&(_state.ref=scope.generateUidIdentifier(name)),_state.ref}}};module.exports=function(node,callId,scope){node.async=false;node.generator=true;scope.traverse(node,awaitVisitor,state);var call=t.callExpression(callId,[node]);var id=node.id;node.id=null;if(t.isFunctionDeclaration(node)){var declar=t.variableDeclaration("let",[t.variableDeclarator(id,call)]);declar._blockHoist=true;return declar}else{if(id){var state={id:id};scope.traverse(node,referenceVisitor,state);if(state.ref){scope.parent.push({id:state.ref});return t.assignmentExpression("=",state.ref,call)}}return call}}},{"../../types":153}],61:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _toConsumableArray=function(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i=opts.stage)return true;if(transformer.metadata.optional&&!includes(opts.optional,key))return false;return true};TransformerPass.prototype.checkNode=function checkNode(node){var check=this.transformer.check;if(check){return this.shouldRun=check(node)}else{return true}};TransformerPass.prototype.transform=function transform(){if(!this.shouldRun)return;var file=this.file;file.log.debug("Running transformer "+this.transformer.key);traverse(file.ast,this.handlers,file.scope,file);this.ran=true};return TransformerPass}();module.exports=TransformerPass},{"../traversal":144,"lodash/collection/includes":319}],76:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var TransformerPass=_interopRequire(require("./transformer-pass"));var isFunction=_interopRequire(require("lodash/lang/isFunction"));var traverse=_interopRequire(require("../traversal"));var isObject=_interopRequire(require("lodash/lang/isObject"));var assign=_interopRequire(require("lodash/object/assign"));var acorn=_interopRequireWildcard(require("../../acorn"));var File=_interopRequire(require("./file"));var each=_interopRequire(require("lodash/collection/each"));var Transformer=function(){function Transformer(transformerKey,transformer,opts){_classCallCheck(this,Transformer);transformer=assign({},transformer);var take=function take(key){var val=transformer[key];delete transformer[key];return val};this.manipulateOptions=take("manipulateOptions");this.metadata=take("metadata")||{};this.parser=take("parser");this.check=take("check");this.post=take("post");this.pre=take("pre");if(this.metadata.stage!=null){this.metadata.optional=true}this.handlers=this.normalize(transformer);var _ref=this;if(!_ref.opts)_ref.opts={};this.key=transformerKey}Transformer.prototype.normalize=function normalize(transformer){var _this=this;if(isFunction(transformer)){transformer={ast:transformer}}traverse.explode(transformer);each(transformer,function(fns,type){if(type[0]==="_"){_this[type]=fns;return}if(type==="enter"||type==="exit")return;if(isFunction(fns))fns={enter:fns};if(!isObject(fns))return;if(!fns.enter)fns.enter=function(){};if(!fns.exit)fns.exit=function(){};transformer[type]=fns});return transformer};Transformer.prototype.buildPass=function buildPass(file){if(!(file instanceof File)){throw new TypeError("Transformer "+this.key+" is resolving to a different Babel version to what is doing the actual transformation...")}return new TransformerPass(file,this)};return Transformer}();module.exports=Transformer},{"../../acorn":5,"../traversal":144,"./file":46,"./transformer-pass":75,"lodash/collection/each":316,"lodash/lang/isFunction":395,"lodash/lang/isObject":398,"lodash/object/assign":404}],77:[function(require,module,exports){module.exports={useStrict:"strict","es5.runtime":"runtime","es6.runtime":"runtime"}},{}],78:[function(require,module,exports){module.exports={selfContained:"runtime","unicode-regex":"regex.unicode","spec.typeofSymbol":"es6.spec.symbols","es6.symbols":"es6.spec.symbols","es6.blockScopingTDZ":"es6.spec.blockScoping","minification.deadCodeElimination":"utility.deadCodeElimination","minification.removeConsoleCalls":"utility.removeConsole","minification.removeDebugger":"utility.removeDebugger"}},{}],79:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.MemberExpression=MemberExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function MemberExpression(node){var prop=node.property;if(node.computed&&t.isLiteral(prop)&&t.isValidIdentifier(prop.value)){node.property=t.identifier(prop.value);node.computed=false}else if(!node.computed&&t.isIdentifier(prop)&&!t.isValidIdentifier(prop.name)){node.property=t.literal(prop.name);node.computed=true}}},{"../../../types":153}],80:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.Property=Property;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function Property(node){var key=node.key;if(t.isLiteral(key)&&t.isValidIdentifier(key.value)){node.key=t.identifier(key.value);node.computed=false}else if(!node.computed&&t.isIdentifier(key)&&!t.isValidIdentifier(key.name)){node.key=t.literal(key.name)}}},{"../../../types":153}],81:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.check=check;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var defineMap=_interopRequireWildcard(require("../../helpers/define-map"));var t=_interopRequireWildcard(require("../../../types"));function check(node){return t.isProperty(node)&&(node.kind==="get"||node.kind==="set")}function ObjectExpression(node){var mutatorMap={};var hasAny=false;node.properties=node.properties.filter(function(prop){if(prop.kind==="get"||prop.kind==="set"){hasAny=true;defineMap.push(mutatorMap,prop.key,prop.kind,prop.computed,prop.value);return false}else{return true}});if(!hasAny)return;return t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("defineProperties")),[node,defineMap.toDefineObject(mutatorMap)])}},{"../../../types":153,"../../helpers/define-map":54}],82:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ArrowFunctionExpression=ArrowFunctionExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));var check=t.isArrowFunctionExpression;exports.check=check;function ArrowFunctionExpression(node){t.ensureBlock(node);node.expression=false;node.type="FunctionExpression";node.shadow=true;return node}},{"../../../types":153}],83:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.check=check;exports.VariableDeclaration=VariableDeclaration;exports.Loop=Loop;exports.BlockStatement=BlockStatement;exports.__esModule=true;var traverse=_interopRequire(require("../../../traversal"));var object=_interopRequire(require("../../../helpers/object"));var util=_interopRequireWildcard(require("../../../util"));var t=_interopRequireWildcard(require("../../../types"));var values=_interopRequire(require("lodash/object/values"));var extend=_interopRequire(require("lodash/object/extend"));function isLet(node,parent){if(!t.isVariableDeclaration(node))return false;if(node._let)return true;if(node.kind!=="let")return false;if(isLetInitable(node,parent)){for(var i=0;i=0){return}loopText=""+loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(this.isReturnStatement()){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);return t.inherits(replace,node)}}};var BlockScoping=function(){function BlockScoping(loopPath,blockPath,parent,scope,file){_classCallCheck(this,BlockScoping);this.parent=parent;this.scope=scope;this.file=file;this.blockPath=blockPath;this.block=blockPath.node;this.outsideLetReferences=object();this.hasLetReferences=false;this.letReferences=this.block._letReferences=object();this.body=[];if(loopPath){this.loopParent=loopPath.parent;this.loopLabel=t.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=loopPath;this.loop=loopPath.node}}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}if(this.loopLabel&&!t.isLabeledStatement(this.loopParent)){return t.labeledStatement(this.loopLabel,this.loop)}};BlockScoping.prototype.remap=function remap(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=object();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loop=this.loop;if(loop){traverseReplace(loop.right,loop,scope,remaps);traverseReplace(loop.test,loop,scope,remaps);traverseReplace(loop.update,loop,scope,remaps)}this.blockPath.traverse(replaceVisitor,remaps)};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loop){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=values(outsideRefs);var args=values(outsideRefs);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn.shadow=true;this.addContinuations(fn);block.body=this.body;var ref=fn;if(this.loop){ref=this.scope.generateUidIdentifier("loop");this.loopPath.insertBefore(t.variableDeclaration("var",[t.variableDeclarator(ref,fn)]))}var call=t.callExpression(ref,args);var ret=this.scope.generateUidIdentifier("ret");var hasYield=traverse.hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=traverse.hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call)}this.buildClosure(ret,call)};BlockScoping.prototype.buildClosure=function buildClosure(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.addContinuations=function addContinuations(fn){var state={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(fn,continuationVisitor,state);for(var i=0;i=spreadPropIndex)break;if(t.isSpreadProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key)&&!prop.computed)key=t.literal(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef)}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[objRef])))}if(pattern.properties.length>1&&t.isMemberExpression(objRef)){var temp=this.scope.generateUidBasedOnNode(objRef,this.file);this.nodes.push(this.buildVariableDeclaration(temp,objRef)); + +objRef=temp}for(var i=0;iarr.elements.length)return;if(pattern.elements.length0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.literal(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){var shouldMemoise=true;if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)){var memo=this.scope.generateMemoisedReference(ref,true);if(memo){this.nodes.push(this.buildVariableDeclaration(memo,ref));ref=memo}}this.push(pattern,ref);return this.nodes};return DestructuringTransformer}()},{"../../../messages":43,"../../../types":153}],87:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ForOfStatement=ForOfStatement;exports._ForOfStatementArray=_ForOfStatementArray;exports.__esModule=true;var messages=_interopRequireWildcard(require("../../../messages"));var util=_interopRequireWildcard(require("../../../util"));var t=_interopRequireWildcard(require("../../../types"));var check=t.isForOfStatement;exports.check=check;function ForOfStatement(node,parent,scope,file){if(this.get("right").isArrayExpression()){return _ForOfStatementArray.call(this,node,scope,file)}var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,file);var declar=build.declar;var loop=build.loop;var block=loop.body;t.inheritsComments(loop,node);t.ensureBlock(node);if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);if(build.replaceParent){this.parentPath.replaceWithMultiple(build.node);this.remove()}else{this.replaceWithMultiple(build.node)}}function _ForOfStatementArray(node,scope,file){var nodes=[];var right=node.right;if(!t.isIdentifier(right)||!scope.hasBinding(right.name)){var uid=scope.generateUidIdentifier("arr");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,right)]));right=uid}var iterationKey=scope.generateUidIdentifier("i");var loop=util.template("for-of-array",{BODY:node.body,KEY:iterationKey,ARR:right});t.inherits(loop,node);t.ensureBlock(loop);var iterationValue=t.memberExpression(right,iterationKey,true);var left=node.left;if(t.isVariableDeclaration(left)){left.declarations[0].init=iterationValue;loop.body.body.unshift(left)}else{loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=",left,iterationValue)))}nodes.push(loop);return nodes}var loose=function loose(node,parent,scope,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=util.template("for-of-loose",{LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,node:loop,loop:loop}};var spec=function spec(node,parent,scope,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=util.template("for-of",{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}}},{"../../../messages":43,"../../../types":153,"../../../util":157}],88:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ImportDeclaration=ImportDeclaration;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));exports.check=require("../internal/modules").check;function keepBlockHoist(node,nodes){if(node._blockHoist){for(var i=0;i",len,start),t.binaryExpression("-",len,start),t.literal(0))}var loop=util.template("rest",{ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}},{"../../../types":153,"../../../util":157,"lodash/lang/isNumber":397}],92:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.check=check;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function loose(node,body,objId){for(var i=0;i0){var declarations=flatten(map(this.vars,function(decl){return decl.declarations},this));var assignment=reduceRight(declarations,function(expr,decl){return t.assignmentExpression("=",decl.id,expr)},t.identifier("undefined"));var statement=t.expressionStatement(assignment);statement._blockHoist=Infinity;body.unshift(statement)}var paramDecls=this.paramDecls;if(paramDecls.length>0){body.unshift(t.variableDeclaration("var",paramDecls))}body.unshift(t.expressionStatement(t.assignmentExpression("=",this.getAgainId(),t.literal(false))));node.body=util.template("tail-call-body",{AGAIN_ID:this.getAgainId(),THIS_ID:this.thisId,ARGUMENTS_ID:this.argumentsId,FUNCTION_ID:this.getFunctionId(),BLOCK:node.body});var topVars=[];if(this.needsThis){topVars.push(t.variableDeclarator(this.getThisId(),t.thisExpression()))}if(this.needsArguments||this.setsArguments){var decl=t.variableDeclarator(this.getArgumentsId());if(this.needsArguments){decl.init=t.identifier("arguments")}topVars.push(decl)}var leftId=this.leftId;if(leftId){topVars.push(t.variableDeclarator(leftId))}if(topVars.length>0){node.body.body.unshift(t.variableDeclaration("var",topVars))}};TailCallTransformer.prototype.subTransform=function subTransform(node){if(!node)return;var handler=this["subTransform"+node.type];if(handler)return handler.call(this,node)};TailCallTransformer.prototype.subTransformConditionalExpression=function subTransformConditionalExpression(node){var callConsequent=this.subTransform(node.consequent);var callAlternate=this.subTransform(node.alternate);if(!callConsequent&&!callAlternate){return}node.type="IfStatement";node.consequent=callConsequent?t.toBlock(callConsequent):returnBlock(node.consequent);if(callAlternate){node.alternate=t.isIfStatement(callAlternate)?callAlternate:t.toBlock(callAlternate)}else{node.alternate=returnBlock(node.alternate)}return[node]};TailCallTransformer.prototype.subTransformLogicalExpression=function subTransformLogicalExpression(node){var callRight=this.subTransform(node.right);if(!callRight)return;var leftId=this.getLeftId();var testExpr=t.assignmentExpression("=",leftId,node.left);if(node.operator==="&&"){testExpr=t.unaryExpression("!",testExpr)}return[t.ifStatement(testExpr,returnBlock(leftId))].concat(callRight)};TailCallTransformer.prototype.subTransformSequenceExpression=function subTransformSequenceExpression(node){var seq=node.expressions;var lastCall=this.subTransform(seq[seq.length-1]);if(!lastCall){return}if(--seq.length===1){node=seq[0]}return[t.expressionStatement(node)].concat(lastCall)};TailCallTransformer.prototype.subTransformCallExpression=function subTransformCallExpression(node){var callee=node.callee,thisBinding,args;if(t.isMemberExpression(callee,{computed:false})&&t.isIdentifier(callee.property)){switch(callee.property.name){case"call":args=t.arrayExpression(node.arguments.slice(1));break;case"apply":args=node.arguments[1]||t.identifier("undefined");break;default:return}thisBinding=node.arguments[0];callee=callee.object}if(!t.isIdentifier(callee)||!this.scope.bindingIdentifierEquals(callee.name,this.ownerId)){return}this.hasTailRecursion=true;if(this.hasDeopt())return;var body=[];if(!t.isThisExpression(thisBinding)){body.push(t.expressionStatement(t.assignmentExpression("=",this.getThisId(),thisBinding||t.identifier("undefined"))))}if(!args){args=t.arrayExpression(node.arguments); + +}var argumentsId=this.getArgumentsId();var params=this.getParams();body.push(t.expressionStatement(t.assignmentExpression("=",argumentsId,args)));var i,param;if(t.isArrayExpression(args)){var elems=args.elements;for(i=0;i1){var last=nodes[nodes.length-1];if(t.isLiteral(last,{value:""}))nodes.pop();var root=buildBinaryExpression(nodes.shift(),nodes.shift());for(i=0;i=1){nodes.push(node)}return nodes}},{"../../../types":153}],109:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.manipulateOptions=manipulateOptions;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));var metadata={stage:1};exports.metadata=metadata;function manipulateOptions(opts){if(opts.whitelist)opts.whitelist.push("es6.destructuring")}var hasSpread=function hasSpread(node){for(var i=0;i3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}var msg;if(closest){msg=messages.get("undeclaredVariableSuggestion",node.name,closest)}else{msg=messages.get("undeclaredVariable",node.name)}throw file.errorWithNode(node,msg,ReferenceError)}},{"../../../messages":43,leven:307}],142:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var t=_interopRequireWildcard(require("../types"));var Binding=function(){function Binding(_ref){var identifier=_ref.identifier;var scope=_ref.scope;var path=_ref.path;var kind=_ref.kind;_classCallCheck(this,Binding);this.identifier=identifier;this.constant=true;this.scope=scope;this.path=path;this.kind=kind}Binding.prototype.setTypeAnnotation=function setTypeAnnotation(){var typeInfo=this.path.getTypeAnnotation();this.typeAnnotationInferred=typeInfo.inferred;this.typeAnnotation=typeInfo.annotation};Binding.prototype.isTypeGeneric=function isTypeGeneric(){var _path;return(_path=this.path).isTypeGeneric.apply(_path,arguments)};Binding.prototype.assignTypeGeneric=function assignTypeGeneric(type,params){var typeParams=null;if(params)params=t.typeParameterInstantiation(params);this.assignType(t.genericTypeAnnotation(t.identifier(type),typeParams))};Binding.prototype.assignType=function assignType(type){this.typeAnnotation=type};Binding.prototype.reassign=function reassign(){this.constant=false;if(this.typeAnnotationInferred){this.typeAnnotation=null}};Binding.prototype.isCompatibleWithType=function isCompatibleWithType(newType){return false};return Binding}();module.exports=Binding},{"../types":153}],143:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var TraversalPath=_interopRequire(require("./path"));var compact=_interopRequire(require("lodash/array/compact"));var t=_interopRequireWildcard(require("../types"));var TraversalContext=function(){function TraversalContext(scope,opts,state,parentPath){_classCallCheck(this,TraversalContext);this.parentPath=parentPath;this.scope=scope;this.state=state;this.opts=opts}TraversalContext.prototype.create=function create(node,obj,key){return TraversalPath.get(this.parentPath,this,node,obj,key)};TraversalContext.prototype.visitMultiple=function visitMultiple(nodes,node,key){if(nodes.length===0)return false;var visited=[];var queue=this.queue=[];var stop=false;for(var i=0;i=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}}for(var i=0;i":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right}}confident=false}}},{}],147:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var react=_interopRequireWildcard(require("../../transformation/helpers/react"));var t=_interopRequireWildcard(require("../../types"));var referenceVisitor={enter:function enter(node,parent,scope,state){if(this.isJSXIdentifier()&&react.isCompatTag(node.name)){return}if(this.isJSXIdentifier()||this.isIdentifier()){if(this.isReferenced()){var bindingInfo=scope.getBinding(node.name);if(bindingInfo!==state.scope.getBinding(node.name))return;if(bindingInfo&&bindingInfo.constant){state.bindings[node.name]=bindingInfo}else{scope.dump();state.foundIncompatible=true;this.stop()}}}}};var PathHoister=function(){function PathHoister(path,scope){_classCallCheck(this,PathHoister);this.foundIncompatible=false;this.bindings={};this.scope=scope;this.scopes=[];this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var checkScope=this.path.scope;do{if(this.isCompatibleScope(checkScope)){this.scopes.push(checkScope)}else{break}}while(checkScope=checkScope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(scope.path.isFunction()){if(this.hasNonParamBindings()){return this.getNextScopeStatementParent()}else{return scope.path.get("body").get("body")[0]}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasNonParamBindings=function hasNonParamBindings(){for(var name in this.bindings){var binding=this.bindings[name];if(binding.kind!=="param")return true}return false};PathHoister.prototype.run=function run(){this.path.traverse(referenceVisitor,this);if(this.foundIncompatible)return;this.getCompatibleScopes();var path=this.getAttachmentPath();if(!path)return;var uid=path.scope.generateUidIdentifier("ref");path.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);this.path.replaceWith(uid)};return PathHoister}();module.exports=PathHoister},{"../../transformation/helpers/react":58,"../../types":153}],148:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _createClass=function(){function defineProperties(target,props){for(var key in props){var prop=props[key];prop.configurable=true;if(prop.value)prop.writable=true}Object.defineProperties(target,props)}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var PathHoister=_interopRequire(require("./hoister"));var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var isRegExp=_interopRequire(require("lodash/lang/isRegExp"));var isString=_interopRequire(require("lodash/lang/isString"));var traverse=_interopRequire(require("../index"));var includes=_interopRequire(require("lodash/collection/includes"));var assign=_interopRequire(require("lodash/object/assign"));var extend=_interopRequire(require("lodash/object/extend"));var Scope=_interopRequire(require("../scope"));var t=_interopRequireWildcard(require("../../types"));var hoistVariablesVisitor={enter:function enter(node,parent,scope){if(this.isFunction()){return this.skip()}if(this.isVariableDeclaration()&&node.kind==="var"){var bindings=this.getBindingIdentifiers();for(var key in bindings){scope.push({id:bindings[key]})}var exprs=[];for(var i=0;i=fromIndex){path.key+=incrementBy}}};TraversalPath.prototype.setData=function setData(key,val){return this.data[key]=val};TraversalPath.prototype.getData=function getData(key,def){var val=this.data[key];if(!val&&def)val=this.data[key]=def;return val};TraversalPath.prototype.setScope=function setScope(file){this.scope=TraversalPath.getScope(this,this.context&&this.context.scope,file)};TraversalPath.prototype.clearContext=function clearContext(){this.context=null};TraversalPath.prototype.setContext=function setContext(parentPath,context,key,file){this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.parentPath=parentPath||this.parentPath;this.key=key;if(context){this.context=context;this.state=context.state;this.opts=context.opts}this.type=this.node&&this.node.type;this.setScope(file)};TraversalPath.prototype._remove=function _remove(){if(Array.isArray(this.container)){this.container.splice(this.key,1);this.updateSiblingKeys(this.key,-1)}else{this.container[this.key]=null}};TraversalPath.prototype.remove=function remove(){var removeParent=false;if(this.parentPath){if(!removeParent)removeParent=this.parentPath.isExpressionStatement();if(!removeParent)removeParent=this.parentPath.isSequenceExpression()&&this.parent.expressions.length===1;if(removeParent)return this.parentPath.remove()}this._remove();this.removed=true};TraversalPath.prototype.skip=function skip(){this.shouldSkip=true};TraversalPath.prototype.stop=function stop(){this.shouldStop=true;this.shouldSkip=true};TraversalPath.prototype.errorWithNode=function errorWithNode(msg){var Error=arguments[1]===undefined?SyntaxError:arguments[1];var loc=this.node.loc.start;var err=new Error("Line "+loc.line+": "+msg);err.loc=loc;return err};TraversalPath.prototype.replaceInline=function replaceInline(nodes){if(Array.isArray(nodes)){if(Array.isArray(this.container)){nodes=this._verifyNodeList(nodes);this._containerInsertAfter(nodes);return this.remove()}else{return this.replaceWithMultiple(nodes)}}else{return this.replaceWith(nodes)}};TraversalPath.prototype._verifyNodeList=function _verifyNodeList(nodes){if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;i-1};TraversalPath.prototype.visit=function visit(){if(this.isBlacklisted())return false;this.call("enter");if(this.shouldSkip){return this.shouldStop}var node=this.node;var opts=this.opts;if(node){if(Array.isArray(node)){for(var i=0;iparts.length;i++){var part=parts[i];if(part==="."){path=path.parentPath}else{path=path.get(parts[i])}}return path}};TraversalPath.prototype.has=function has(key){return!!this.node[key]};TraversalPath.prototype.is=function is(key){return this.has(key)};TraversalPath.prototype.isnt=function isnt(key){return!this.has(key)};TraversalPath.prototype.getTypeAnnotation=function getTypeAnnotation(){if(this.typeInfo){return this.typeInfo}var info=this.typeInfo={inferred:false,annotation:null};var type=this.node.typeAnnotation;if(!type){info.inferred=true;type=this.inferType(this)}if(type){if(t.isTypeAnnotation(type))type=type.typeAnnotation;info.annotation=type}return info};TraversalPath.prototype.resolve=function resolve(){if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve()}else{}}else if(this.isIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding||!binding.constant)return;return;if(binding.path===this){return this}else{return binding.path.resolve()}}else if(this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve();if(!target||!target.isObjectExpression())return;var props=target.get("properties");for(var i=0;iparts.length){return false}}return true};_createClass(TraversalPath,{node:{get:function(){if(this.removed){return null}else{return this.container[this.key]}},set:function(replacement){throw new Error("Don't use `path.node = newNode;`, use `path.replaceWith(newNode)` or `path.replaceWithMultiple([newNode])`")}}});return TraversalPath}();module.exports=TraversalPath;assign(TraversalPath.prototype,require("./evaluation"));assign(TraversalPath.prototype,require("./conversion"));for(var i=0;i1)id+=i;return"_"+id};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.file.uids[name])return true;scope=scope.parent}while(scope);return false};Scope.prototype.generateUidBasedOnNode=function generateUidBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function(_add){var _addWrapper=function add(_x){return _add.apply(this,arguments)};_addWrapper.toString=function(){return _add.toString()};return _addWrapper}(function(node){if(t.isModuleDeclaration(node)){if(node.specifiers&&node.specifiers.length){for(var i=0;i-1;return false}each(t.VISITOR_KEYS,function(keys,type){if(t.BUILDER_KEYS[type])return;var defs={};each(keys,function(key){defs[key]=null});t.BUILDER_KEYS[type]=defs});each(t.BUILDER_KEYS,function(keys,type){t[type[0].toLowerCase()+type.slice(1)]=function(){var node={};node.start=null;node.type=type;var i=0;for(var key in keys){var arg=arguments[i++];if(arg===undefined)arg=keys[key];node[key]=arg}return node}});function shallowEqual(actual,expected){var keys=Object.keys(expected);for(var i=0;iparts.length){return false}}return true}}function removeComments(child){each(COMMENT_KEYS,function(key){delete child[key]});return child}function inheritsComments(child,parent){if(child&&parent){each(COMMENT_KEYS,function(key){child[key]=uniq(compact([].concat(child[key],parent[key])))})}return child}function inherits(child,parent){if(!child||!parent)return child;child._declarations=parent._declarations;child._scopeInfo=parent._scopeInfo;child.range=parent.range;child.start=parent.start;child.loc=parent.loc;child.end=parent.end;child.typeAnnotation=parent.typeAnnotation;child.returnType=parent.returnType;t.inheritsComments(child,parent);return child}toFastProperties(t);toFastProperties(t.VISITOR_KEYS);exports.__esModule=true;assign(t,require("./retrievers"));assign(t,require("./validators"));assign(t,require("./converters"))},{"./alias-keys":150,"./builder-keys":151,"./converters":152,"./retrievers":154,"./validators":155,"./visitor-keys":156,"lodash/array/compact":310,"lodash/array/uniq":314,"lodash/collection/each":316,"lodash/object/assign":404,"to-fast-properties":452}],154:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.getBindingIdentifiers=getBindingIdentifiers;exports.getLastStatements=getLastStatements;exports.__esModule=true;var object=_interopRequire(require("../helpers/object"));var t=_interopRequireWildcard(require("./index"));function getBindingIdentifiers(node){var search=[].concat(node);var ids=object();while(search.length){var id=search.shift();if(!id)continue;var keys=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){ids[id.name]=id}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(keys){for(var i=0;i1)return ast.body;var node=ast.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}}function parseTemplate(loc,code){var ast=parse({filename:loc,looseModules:true},code).program;ast=traverse.removeProperties(ast);return ast}function loadTemplates(){var templates={};var templatesLoc=path.join(__dirname,"transformation/templates");if(!fs.existsSync(templatesLoc)){throw new ReferenceError(messages.get("missingTemplatesDirectory"))}each(fs.readdirSync(templatesLoc),function(name){if(name[0]===".")return;var key=path.basename(name,path.extname(name));var loc=path.join(templatesLoc,name);var code=fs.readFileSync(loc,"utf8");templates[key]=parseTemplate(loc,code)});return templates}try{exports.templates=require("../../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}}).call(this,require("_process"),"/lib/babel")},{"../../templates.json":455,"./helpers/parse":42,"./messages":43,"./patch":44,"./traversal":144,"./types":153,_process:183,"debug/node":293,fs:172,"lodash/collection/contains":315,"lodash/collection/each":316,"lodash/lang/cloneDeep":390,"lodash/lang/isBoolean":393,"lodash/lang/isEmpty":394,"lodash/lang/isRegExp":400,"lodash/lang/isString":401,"lodash/object/has":407,"lodash/string/escapeRegExp":412,minimatch:416,module:172,path:182,util:199}],158:[function(require,module,exports){var types=require("../lib/types");var Type=types.Type;var def=Type.def;var or=Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var isRegExp=builtin.RegExp;var shared=require("../lib/shared");var defaults=shared.defaults;var geq=shared.geq;def("Printable").field("loc",or(def("SourceLocation"),null),defaults["null"],true);def("Node").bases("Printable").field("type",isString).field("comments",or([def("Comment")],null),defaults["null"],true);def("SourceLocation").build("start","end","source").field("start",def("Position")).field("end",def("Position")).field("source",or(isString,null),defaults["null"]);def("Position").build("line","column").field("line",geq(1)).field("column",geq(0));def("Program").bases("Node").build("body").field("body",[def("Statement")]);def("Function").bases("Node").field("id",or(def("Identifier"),null),defaults["null"]).field("params",[def("Pattern")]).field("body",def("BlockStatement"));def("Statement").bases("Node");def("EmptyStatement").bases("Statement").build();def("BlockStatement").bases("Statement").build("body").field("body",[def("Statement")]);def("ExpressionStatement").bases("Statement").build("expression").field("expression",def("Expression"));def("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Statement")).field("alternate",or(def("Statement"),null),defaults["null"]);def("LabeledStatement").bases("Statement").build("label","body").field("label",def("Identifier")).field("body",def("Statement"));def("BreakStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("ContinueStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("WithStatement").bases("Statement").build("object","body").field("object",def("Expression")).field("body",def("Statement"));def("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",def("Expression")).field("cases",[def("SwitchCase")]).field("lexical",isBoolean,defaults["false"]);def("ReturnStatement").bases("Statement").build("argument").field("argument",or(def("Expression"),null));def("ThrowStatement").bases("Statement").build("argument").field("argument",def("Expression"));def("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",def("BlockStatement")).field("handler",or(def("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[def("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[def("CatchClause")],defaults.emptyArray).field("finalizer",or(def("BlockStatement"),null),defaults["null"]);def("CatchClause").bases("Node").build("param","guard","body").field("param",def("Pattern")).field("guard",or(def("Expression"),null),defaults["null"]).field("body",def("BlockStatement"));def("WhileStatement").bases("Statement").build("test","body").field("test",def("Expression")).field("body",def("Statement"));def("DoWhileStatement").bases("Statement").build("body","test").field("body",def("Statement")).field("test",def("Expression"));def("ForStatement").bases("Statement").build("init","test","update","body").field("init",or(def("VariableDeclaration"),def("Expression"),null)).field("test",or(def("Expression"),null)).field("update",or(def("Expression"),null)).field("body",def("Statement"));def("ForInStatement").bases("Statement").build("left","right","body","each").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement")).field("each",isBoolean);def("DebuggerStatement").bases("Statement").build();def("Declaration").bases("Statement");def("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",def("Identifier"));def("FunctionExpression").bases("Function","Expression").build("id","params","body");def("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",or("var","let","const")).field("declarations",[or(def("VariableDeclarator"),def("Identifier"))]);def("VariableDeclarator").bases("Node").build("id","init").field("id",def("Pattern")).field("init",or(def("Expression"),null));def("Expression").bases("Node","Pattern");def("ThisExpression").bases("Expression").build();def("ArrayExpression").bases("Expression").build("elements").field("elements",[or(def("Expression"),null)]);def("ObjectExpression").bases("Expression").build("properties").field("properties",[def("Property")]);def("Property").bases("Node").build("kind","key","value").field("kind",or("init","get","set")).field("key",or(def("Literal"),def("Identifier"))).field("value",or(def("Expression"),def("Pattern")));def("SequenceExpression").bases("Expression").build("expressions").field("expressions",[def("Expression")]);var UnaryOperator=or("-","+","!","~","typeof","void","delete");def("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",UnaryOperator).field("argument",def("Expression")).field("prefix",isBoolean,defaults["true"]);var BinaryOperator=or("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");def("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",BinaryOperator).field("left",def("Expression")).field("right",def("Expression"));var AssignmentOperator=or("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");def("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",AssignmentOperator).field("left",def("Pattern")).field("right",def("Expression"));var UpdateOperator=or("++","--");def("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",UpdateOperator).field("argument",def("Expression")).field("prefix",isBoolean);var LogicalOperator=or("||","&&");def("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",LogicalOperator).field("left",def("Expression")).field("right",def("Expression"));def("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Expression")).field("alternate",def("Expression"));def("NewExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("CallExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("MemberExpression").bases("Expression").build("object","property","computed").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("Pattern").bases("Node");def("ObjectPattern").bases("Pattern").build("properties").field("properties",[or(def("PropertyPattern"),def("Property"))]);def("PropertyPattern").bases("Pattern").build("key","pattern").field("key",or(def("Literal"),def("Identifier"))).field("pattern",def("Pattern"));def("ArrayPattern").bases("Pattern").build("elements").field("elements",[or(def("Pattern"),null)]);def("SwitchCase").bases("Node").build("test","consequent").field("test",or(def("Expression"),null)).field("consequent",[def("Statement")]);def("Identifier").bases("Node","Expression","Pattern").build("name").field("name",isString);def("Literal").bases("Node","Expression").build("value").field("value",or(isString,isBoolean,null,isNumber,isRegExp));def("Comment").bases("Printable").field("value",isString).field("leading",isBoolean,defaults["true"]).field("trailing",isBoolean,defaults["false"]);def("Block").bases("Comment").build("value","leading","trailing");def("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":169,"../lib/types":170}],159:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;def("XMLDefaultDeclaration").bases("Declaration").field("namespace",def("Expression"));def("XMLAnyName").bases("Expression");def("XMLQualifiedIdentifier").bases("Expression").field("left",or(def("Identifier"),def("XMLAnyName"))).field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLAttributeSelector").bases("Expression").field("attribute",def("Expression"));def("XMLFilterExpression").bases("Expression").field("left",def("Expression")).field("right",def("Expression"));def("XMLElement").bases("XML","Expression").field("contents",[def("XML")]);def("XMLList").bases("XML","Expression").field("contents",[def("XML")]);def("XML").bases("Node");def("XMLEscape").bases("XML").field("expression",def("Expression"));def("XMLText").bases("XML").field("text",isString);def("XMLStartTag").bases("XML").field("contents",[def("XML")]);def("XMLEndTag").bases("XML").field("contents",[def("XML")]);def("XMLPointTag").bases("XML").field("contents",[def("XML")]);def("XMLName").bases("XML").field("contents",or(isString,[def("XML")]));def("XMLAttribute").bases("XML").field("value",isString);def("XMLCdata").bases("XML").field("contents",isString);def("XMLComment").bases("XML").field("contents",isString);def("XMLProcessingInstruction").bases("XML").field("target",isString).field("contents",or(isString,null))},{"../lib/types":170,"./core":158}],160:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var isObject=builtin.object; + +var isString=builtin.string;var defaults=require("../lib/shared").defaults;def("Function").field("generator",isBoolean,defaults["false"]).field("expression",isBoolean,defaults["false"]).field("defaults",[or(def("Expression"),null)],defaults.emptyArray).field("rest",or(def("Identifier"),null),defaults["null"]);def("FunctionDeclaration").build("id","params","body","generator","expression");def("FunctionExpression").build("id","params","body","generator","expression");def("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,defaults["null"]).field("body",or(def("BlockStatement"),def("Expression"))).field("generator",false,defaults["false"]);def("YieldExpression").bases("Expression").build("argument","delegate").field("argument",or(def("Expression"),null)).field("delegate",isBoolean,defaults["false"]);def("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionBlock").bases("Node").build("left","right","each").field("left",def("Pattern")).field("right",def("Expression")).field("each",isBoolean);def("ModuleSpecifier").bases("Literal").build("value").field("value",isString);def("Property").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("method",isBoolean,defaults["false"]).field("shorthand",isBoolean,defaults["false"]).field("computed",isBoolean,defaults["false"]);def("PropertyPattern").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",or("init","get","set","")).field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("value",def("Function")).field("computed",isBoolean,defaults["false"]).field("static",isBoolean,defaults["false"]);def("SpreadElement").bases("Node").build("argument").field("argument",def("Expression"));def("ArrayExpression").field("elements",[or(def("Expression"),def("SpreadElement"),null)]);def("NewExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("CallExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("SpreadElementPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ArrayPattern").field("elements",[or(def("Pattern"),null,def("SpreadElement"))]);var ClassBodyElement=or(def("MethodDefinition"),def("VariableDeclarator"),def("ClassPropertyDefinition"),def("ClassProperty"));def("ClassProperty").bases("Declaration").build("key").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",ClassBodyElement);def("ClassBody").bases("Declaration").build("body").field("body",[ClassBodyElement]);def("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",or(def("Identifier"),null)).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]);def("ClassExpression").bases("Expression").build("id","body","superClass").field("id",or(def("Identifier"),null),defaults["null"]).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]).field("implements",[def("ClassImplements")],defaults.emptyArray);def("ClassImplements").bases("Node").build("id").field("id",def("Identifier")).field("superClass",or(def("Expression"),null),defaults["null"]);def("Specifier").bases("Node");def("NamedSpecifier").bases("Specifier").field("id",def("Identifier")).field("name",or(def("Identifier"),null),defaults["null"]);def("ExportSpecifier").bases("NamedSpecifier").build("id","name");def("ExportBatchSpecifier").bases("Specifier").build();def("ImportSpecifier").bases("NamedSpecifier").build("id","name");def("ImportNamespaceSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ImportDefaultSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",isBoolean).field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"),def("ExportBatchSpecifier"))],defaults.emptyArray).field("source",or(def("ModuleSpecifier"),null),defaults["null"]);def("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[or(def("ImportSpecifier"),def("ImportNamespaceSpecifier"),def("ImportDefaultSpecifier"))],defaults.emptyArray).field("source",def("ModuleSpecifier"));def("TaggedTemplateExpression").bases("Expression").field("tag",def("Expression")).field("quasi",def("TemplateLiteral"));def("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[def("TemplateElement")]).field("expressions",[def("Expression")]);def("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:isString,raw:isString}).field("tail",isBoolean)},{"../lib/shared":169,"../lib/types":170,"./core":158}],161:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("Function").field("async",isBoolean,defaults["false"]);def("SpreadProperty").bases("Node").build("argument").field("argument",def("Expression"));def("ObjectExpression").field("properties",[or(def("Property"),def("SpreadProperty"))]);def("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ObjectPattern").field("properties",[or(def("PropertyPattern"),def("SpreadPropertyPattern"),def("Property"),def("SpreadProperty"))]);def("AwaitExpression").bases("Expression").build("argument","all").field("argument",or(def("Expression"),null)).field("all",isBoolean,defaults["false"])},{"../lib/shared":169,"../lib/types":170,"./core":158}],162:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("JSXAttribute").bases("Node").build("name","value").field("name",or(def("JSXIdentifier"),def("JSXNamespacedName"))).field("value",or(def("Literal"),def("JSXExpressionContainer"),null),defaults["null"]);def("JSXIdentifier").bases("Identifier").build("name").field("name",isString);def("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",def("JSXIdentifier")).field("name",def("JSXIdentifier"));def("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",or(def("JSXIdentifier"),def("JSXMemberExpression"))).field("property",def("JSXIdentifier")).field("computed",isBoolean,defaults.false);var JSXElementName=or(def("JSXIdentifier"),def("JSXNamespacedName"),def("JSXMemberExpression"));def("JSXSpreadAttribute").bases("Node").build("argument").field("argument",def("Expression"));var JSXAttributes=[or(def("JSXAttribute"),def("JSXSpreadAttribute"))];def("JSXExpressionContainer").bases("Expression").build("expression").field("expression",def("Expression"));def("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",def("JSXOpeningElement")).field("closingElement",or(def("JSXClosingElement"),null),defaults["null"]).field("children",[or(def("JSXElement"),def("JSXExpressionContainer"),def("JSXText"),def("Literal"))],defaults.emptyArray).field("name",JSXElementName,function(){return this.openingElement.name}).field("selfClosing",isBoolean,function(){return this.openingElement.selfClosing}).field("attributes",JSXAttributes,function(){return this.openingElement.attributes});def("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",JSXElementName).field("attributes",JSXAttributes,defaults.emptyArray).field("selfClosing",isBoolean,defaults["false"]);def("JSXClosingElement").bases("Node").build("name").field("name",JSXElementName);def("JSXText").bases("Literal").build("value").field("value",isString);def("JSXEmptyExpression").bases("Expression").build();def("Type").bases("Node");def("AnyTypeAnnotation").bases("Type");def("VoidTypeAnnotation").bases("Type");def("NumberTypeAnnotation").bases("Type");def("StringTypeAnnotation").bases("Type");def("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",isString).field("raw",isString);def("BooleanTypeAnnotation").bases("Type");def("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",def("Type"));def("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",def("Type"));def("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[def("FunctionTypeParam")]).field("returnType",def("Type")).field("rest",or(def("FunctionTypeParam"),null)).field("typeParameters",or(def("TypeParameterDeclaration"),null));def("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",def("Identifier")).field("typeAnnotation",def("Type")).field("optional",isBoolean);def("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",def("Type"));def("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[def("ObjectTypeProperty")]).field("indexers",[def("ObjectTypeIndexer")],defaults.emptyArray).field("callProperties",[def("ObjectTypeCallProperty")],defaults.emptyArray);def("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",or(def("Literal"),def("Identifier"))).field("value",def("Type")).field("optional",isBoolean);def("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",def("Identifier")).field("key",def("Type")).field("value",def("Type"));def("ObjectTypeCallProperty").bases("Node").build("value").field("value",def("FunctionTypeAnnotation")).field("static",isBoolean,false);def("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("id",def("Identifier"));def("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("MemberTypeAnnotation").bases("Type").build("object","property").field("object",def("Identifier")).field("property",or(def("MemberTypeAnnotation"),def("GenericTypeAnnotation")));def("UnionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",def("Type"));def("Identifier").field("typeAnnotation",or(def("TypeAnnotation"),null),defaults["null"]);def("TypeParameterDeclaration").bases("Node").build("params").field("params",[def("Identifier")]);def("TypeParameterInstantiation").bases("Node").build("params").field("params",[def("Type")]);def("Function").field("returnType",or(def("TypeAnnotation"),null),defaults["null"]).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]);def("ClassProperty").build("key","typeAnnotation").field("typeAnnotation",def("TypeAnnotation")).field("static",isBoolean,false);def("ClassImplements").field("typeParameters",or(def("TypeParameterInstantiation"),null),defaults["null"]);def("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]).field("body",def("ObjectTypeAnnotation")).field("extends",[def("InterfaceExtends")]);def("InterfaceExtends").bases("Node").build("id").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null)).field("right",def("Type"));def("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",def("Expression")).field("typeAnnotation",def("TypeAnnotation"));def("TupleTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("DeclareVariable").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareFunction").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareClass").bases("InterfaceDeclaration").build("id");def("DeclareModule").bases("Statement").build("id","body").field("id",or(def("Identifier"),def("Literal"))).field("body",def("BlockStatement"))},{"../lib/shared":169,"../lib/types":170,"./core":158}],163:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var geq=require("../lib/shared").geq;def("Function").field("body",or(def("BlockStatement"),def("Expression")));def("ForOfStatement").bases("Statement").build("left","right","body").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement"));def("LetStatement").bases("Statement").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Statement"));def("LetExpression").bases("Expression").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Expression"));def("GraphExpression").bases("Expression").build("index","expression").field("index",geq(0)).field("expression",def("Literal"));def("GraphIndexExpression").bases("Expression").build("index").field("index",geq(0))},{"../lib/shared":169,"../lib/types":170,"./core":158}],164:[function(require,module,exports){var assert=require("assert");var types=require("../main");var getFieldNames=types.getFieldNames;var getFieldValue=types.getFieldValue;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isDate=types.builtInTypes.Date;var isRegExp=types.builtInTypes.RegExp;var hasOwn=Object.prototype.hasOwnProperty;function astNodesAreEquivalent(a,b,problemPath){if(isArray.check(problemPath)){problemPath.length=0}else{problemPath=null}return areEquivalent(a,b,problemPath)}astNodesAreEquivalent.assert=function(a,b){var problemPath=[];if(!astNodesAreEquivalent(a,b,problemPath)){if(problemPath.length===0){assert.strictEqual(a,b)}else{assert.ok(false,"Nodes differ in the following path: "+problemPath.map(subscriptForProperty).join(""))}}};function subscriptForProperty(property){if(/[_$a-z][_$a-z0-9]*/i.test(property)){return"."+property}return"["+JSON.stringify(property)+"]"}function areEquivalent(a,b,problemPath){if(a===b){return true}if(isArray.check(a)){return arraysAreEquivalent(a,b,problemPath)}if(isObject.check(a)){return objectsAreEquivalent(a,b,problemPath)}if(isDate.check(a)){return isDate.check(b)&&+a===+b}if(isRegExp.check(a)){return isRegExp.check(b)&&(a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.ignoreCase===b.ignoreCase)}return a==b}function arraysAreEquivalent(a,b,problemPath){isArray.assert(a);var aLength=a.length;if(!isArray.check(b)||b.length!==aLength){if(problemPath){problemPath.push("length")}return false}for(var i=0;inp){return true}if(pp===np&&this.name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&this.name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&parent.callee===node;case"ConditionalExpression":return this.name==="test"&&parent.test===node;case"MemberExpression":return this.name==="object"&&parent.object===node;default:return false}default:if(parent.type==="NewExpression"&&this.name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}NPp.canBeFirstInStatement=function(){var node=this.node;return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};NPp.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(path){for(var node,parent;path.parent;path=path.parent){node=path.node;parent=path.parent.node;if(n.BlockStatement.check(parent)&&path.parent.name==="body"&&path.name===0){assert.strictEqual(parent.body[0],node);return true}if(n.ExpressionStatement.check(parent)&&path.name==="expression"){assert.strictEqual(parent.expression,node);return true}if(n.SequenceExpression.check(parent)&&path.parent.name==="expressions"&&path.name===0){assert.strictEqual(parent.expressions[0],node);continue}if(n.CallExpression.check(parent)&&path.name==="callee"){assert.strictEqual(parent.callee,node);continue}if(n.MemberExpression.check(parent)&&path.name==="object"){assert.strictEqual(parent.object,node);continue}if(n.ConditionalExpression.check(parent)&&path.name==="test"){assert.strictEqual(parent.test,node);continue}if(isBinary(parent)&&path.name==="left"){assert.strictEqual(parent.left,node);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&path.name==="argument"){assert.strictEqual(parent.argument,node);continue}return false}return true}function cleanUpNodesAfterPrune(remainingNodePath){if(n.VariableDeclaration.check(remainingNodePath.node)){var declarations=remainingNodePath.get("declarations").value;if(!declarations||declarations.length===0){return remainingNodePath.prune()}}else if(n.ExpressionStatement.check(remainingNodePath.node)){if(!remainingNodePath.get("expression").value){return remainingNodePath.prune()}}else if(n.IfStatement.check(remainingNodePath.node)){cleanUpIfStatementAfterPrune(remainingNodePath)}return remainingNodePath}function cleanUpIfStatementAfterPrune(ifStatement){var testExpression=ifStatement.get("test").value;var alternate=ifStatement.get("alternate").value;var consequent=ifStatement.get("consequent").value;if(!consequent&&!alternate){var testExpressionStatement=b.expressionStatement(testExpression);ifStatement.replace(testExpressionStatement)}else if(!consequent&&alternate){var negatedTestExpression=b.unaryExpression("!",testExpression,true);if(n.UnaryExpression.check(testExpression)&&testExpression.operator==="!"){negatedTestExpression=testExpression.argument}ifStatement.get("test").replace(negatedTestExpression);ifStatement.get("consequent").replace(alternate);ifStatement.get("alternate").replace()}}module.exports=NodePath},{"./path":167,"./scope":168,"./types":170,assert:173,util:199}],166:[function(require,module,exports){var assert=require("assert");var types=require("./types");var NodePath=require("./node-path");var Printable=types.namedTypes.Printable;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isFunction=types.builtInTypes.function;var hasOwn=Object.prototype.hasOwnProperty;var undefined;function PathVisitor(){assert.ok(this instanceof PathVisitor);this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this._shouldVisitComments=hasOwn.call(this._methodNameTable,"Block")||hasOwn.call(this._methodNameTable,"Line");this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false}function computeMethodNameTable(visitor){var typeNames=Object.create(null);for(var methodName in visitor){if(/^visit[A-Z]/.test(methodName)){typeNames[methodName.slice("visit".length)]=true}}var supertypeTable=types.computeSupertypeLookupTable(typeNames);var methodNameTable=Object.create(null);var typeNames=Object.keys(supertypeTable);var typeNameCount=typeNames.length;for(var i=0;i=0){parentCache[path.name=i]=path}}else{parentValue[path.name]=path.value;parentCache[path.name]=path}assert.strictEqual(parentValue[path.name],path.value);assert.strictEqual(path.parentPath.get(path.name),path);return path}Pp.replace=function replace(replacement){var results=[];var parentValue=this.parentPath.value;var parentCache=getChildCache(this.parentPath);var count=arguments.length;repairRelationshipWithParent(this);if(isArray.check(parentValue)){var originalLength=parentValue.length;var move=getMoves(this.parentPath,count-1,this.name+1);var spliceArgs=[this.name,1];for(var i=0;i=than},isNumber+" >= "+than)};exports.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return false},"true":function(){return true},undefined:function(){}};var naiveIsPrimitive=Type.or(builtin.string,builtin.number,builtin.boolean,builtin.null,builtin.undefined);exports.isPrimitive=new Type(function(value){if(value===null)return true;var type=typeof value;return!(type==="object"||type==="function")},naiveIsPrimitive.toString())},{"../lib/types":170}],170:[function(require,module,exports){var assert=require("assert");var Ap=Array.prototype;var slice=Ap.slice;var map=Ap.map;var each=Ap.forEach;var Op=Object.prototype;var objToStr=Op.toString;var funObjStr=objToStr.call(function(){});var strObjStr=objToStr.call("");var hasOwn=Op.hasOwnProperty;function Type(check,name){var self=this;assert.ok(self instanceof Type,self);assert.strictEqual(objToStr.call(check),funObjStr,check+" is not a function");var nameObjStr=objToStr.call(name);assert.ok(nameObjStr===funObjStr||nameObjStr===strObjStr,name+" is neither a function nor a string");Object.defineProperties(self,{name:{value:name},check:{value:function(value,deep){var result=check.call(self,value,deep);if(!result&&deep&&objToStr.call(deep)===funObjStr)deep(self,value);return result}}})}var Tp=Type.prototype;exports.Type=Type;Tp.assert=function(value,deep){if(!this.check(value,deep)){var str=shallowStringify(value);assert.ok(false,str+" does not match type "+this);return false}return true};function shallowStringify(value){if(isObject.check(value))return"{"+Object.keys(value).map(function(key){return key+": "+value[key]}).join(", ")+"}";if(isArray.check(value))return"["+value.map(shallowStringify).join(", ")+"]";return JSON.stringify(value)}Tp.toString=function(){var name=this.name;if(isString.check(name))return name;if(isFunction.check(name))return name.call(this)+"";return name+" type"};var builtInTypes={};exports.builtInTypes=builtInTypes;function defBuiltInType(example,name){var objStr=objToStr.call(example);Object.defineProperty(builtInTypes,name,{enumerable:true,value:new Type(function(value){return objToStr.call(value)===objStr},name)});return builtInTypes[name]}var isString=defBuiltInType("","string");var isFunction=defBuiltInType(function(){},"function");var isArray=defBuiltInType([],"array");var isObject=defBuiltInType({},"object");var isRegExp=defBuiltInType(/./,"RegExp");var isDate=defBuiltInType(new Date,"Date");var isNumber=defBuiltInType(3,"number");var isBoolean=defBuiltInType(true,"boolean");var isNull=defBuiltInType(null,"null");var isUndefined=defBuiltInType(void 0,"undefined");function toType(from,name){if(from instanceof Type)return from;if(from instanceof Def)return from.type;if(isArray.check(from))return Type.fromArray(from);if(isObject.check(from))return Type.fromObject(from);if(isFunction.check(from))return new Type(from,name);return new Type(function(value){return value===from},isUndefined.check(name)?function(){return from+""}:name)}Type.or=function(){var types=[];var len=arguments.length;for(var i=0;i=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};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=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};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}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,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/":199}],174:[function(require,module,exports){arguments[4][172][0].apply(exports,arguments)},{dup:172}],175:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var kMaxLength=1073741823;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return arr.foo()===42&&typeof arr.subarray==="function"&&new Uint8Array(1).subarray(1,1).byteLength===0}catch(e){return false}}();function Buffer(subject,encoding){var self=this;if(!(self instanceof Buffer))return new Buffer(subject,encoding);var type=typeof subject;var length;if(type==="number"){length=+subject}else if(type==="string"){length=Buffer.byteLength(subject,encoding)}else if(type==="object"&&subject!==null){if(subject.type==="Buffer"&&isArray(subject.data))subject=subject.data;length=+subject.length}else{throw new TypeError("must start with number, buffer, array or string")}if(length>kMaxLength){throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength.toString(16)+" bytes")}if(length<0)length=0;else length>>>=0;if(Buffer.TYPED_ARRAY_SUPPORT){self=Buffer._augment(new Uint8Array(length))}else{self.length=length;self._isBuffer=true}var i;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof subject.byteLength==="number"){self._set(subject)}else if(isArrayish(subject)){if(Buffer.isBuffer(subject)){for(i=0;i0&&length<=Buffer.poolSize)self.parent=rootParent;return self}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;break;case"utf8":case"utf-8":ret=utf8ToBytes(str).length;break;case"base64":ret=base64ToBytes(str).length;break;default:ret=str.length}return ret};Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined;Buffer.prototype.toString=function toString(encoding,start,end){ +var loweredCase=false;start=start>>>0;end=end===undefined||end===Infinity?this.length:end>>>0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val)){return arrayIndexOf(this,val,byteOffset)}if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,val,byteOffset)}return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;for(var i=0;byteOffset+iremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;ithis.length){throw new RangeError("attempt to write outside buffer bounds")}var remaining=this.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}encoding=String(encoding||"utf8").toLowerCase();var ret;switch(encoding){case"hex":ret=hexWrite(this,string,offset,length);break;case"utf8":case"utf-8":ret=utf8Write(this,string,offset,length);break;case"ascii":ret=asciiWrite(this,string,offset,length);break;case"binary":ret=binaryWrite(this,string,offset,length);break;case"base64":ret=base64Write(this,string,offset,length);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=utf16leWrite(this,string,offset,length);break;default:throw new TypeError("Unknown encoding: "+encoding)}return ret};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end);for(var i=start;ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||valuebuf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i>>0&255}return offset+byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul>>>0&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||valuebuf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,target_start,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(target_start>=target.length)target_start=target.length;if(!target_start)target_start=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-target_start=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":176,ieee754:177,"is-array":178}],176:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],177:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=nBytes*8-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8);m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8);if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=nBytes*8-mLen-1,eMax=(1<>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8);e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=s*128}},{}],178:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],179:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;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(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i0&&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"){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};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;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}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{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.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};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}},{}],180:[function(require,module,exports){if(typeof Object.create==="function"){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{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],181:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],182:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--; + +}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(isNaN(n)||util.isNull(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else return state.length}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(!util.isNumber(n)||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(util.isNull(ret)){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(!util.isNull(ret))this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(function(){maybeReadMore_(stream,state)})}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;process.nextTick(function(){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}})}}function forEach(xs,f){for(var i=0,l=xs.length;i1){var cbs=[];for(var c=0;c=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:175}],197:[function(require,module,exports){exports.isatty=function(){return false};function ReadStream(){throw new Error("tty.ReadStream is not implemented")}exports.ReadStream=ReadStream;function WriteStream(){throw new Error("tty.ReadStream is not implemented")}exports.WriteStream=WriteStream},{}],198:[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"}},{}],199:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;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=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}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;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]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+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){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}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=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}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");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-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]}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"||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"];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(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){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":198,_process:183,inherits:180}],200:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(process.platform==="win32"){ansiStyles.blue.open=""}function build(_styles){var builder=function builder(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;aindex){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$":223}],211:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function(callbackfn){var O=Object($.assertDefined(this)),self=$.ES5Object(O),f=ctx(callbackfn,arguments[1],3),length=$.toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$":223,"./$.ctx":218}],212:[function(require,module,exports){var $=require("./$");function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}assert.def=$.assertDefined;assert.fn=function(it){if(!$.isFunction(it))throw TypeError(it+" is not a function!");return it};assert.obj=function(it){if(!$.isObject(it))throw TypeError(it+" is not an object!");return it};assert.inst=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it};module.exports=assert},{"./$":223}],213:[function(require,module,exports){var $=require("./$");module.exports=Object.assign||function(target,source){var T=Object($.assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=$.ES5Object(arguments[i++]),keys=$.getKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$":223}],214:[function(require,module,exports){var $=require("./$"),TAG=require("./$.wks")("toStringTag"),toString={}.toString;function cof(it){return toString.call(it).slice(8,-1)}cof.classof=function(it){var O,T;return it==undefined?it===undefined?"Undefined":"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:cof(O)};cof.set=function(it,tag,stat){if(it&&!$.has(it=stat?it:it.prototype,TAG))$.hide(it,TAG,tag)};module.exports=cof},{"./$":223,"./$.wks":234}],215:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,assert=require("./$.assert"),$iter=require("./$.iter"),has=$.has,set=$.set,isObject=$.isObject,hide=$.hide,step=$iter.step,isFrozen=Object.isFrozen||$.core.Object.isFrozen,ID=safe("id"),O1=safe("O1"),LAST=safe("last"),FIRST=safe("first"),ITER=safe("iter"),SIZE=$.DESC?safe("size"):"size",id=0;function fastKey(it,create){if(!isObject(it))return(typeof it=="string"?"S":"P")+it;if(isFrozen(it))return"F";if(!has(it,ID)){if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(iterable){var that=assert.inst(this,C,NAME);set(that,O1,$.create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);if(iterable!=undefined)$iter.forOf(iterable,IS_MAP,that[ADDER],that)}$.mix(C.prototype,{clear:function(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function(key){return!!getEntry(this,key)}});if($.DESC)$.setDesc(C.prototype,"size",{get:function(){return assert.def(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!="F")that[O1][index]=entry}return that},getEntry:getEntry,getIterConstructor:function(){return function(iterated,kind){set(this,ITER,{o:iterated,k:kind})}},next:function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){iter.o=undefined;return step(1)}if(kind=="key")return step(0,entry.k);if(kind=="value")return step(0,entry.v);return step(0,[entry.k,entry.v])}}},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.iter":222,"./$.uid":232}],216:[function(require,module,exports){"use strict";var $=require("./$"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.iter").forOf,has=$.has,isObject=$.isObject,hide=$.hide,isFrozen=Object.isFrozen||$.core.Object.isFrozen,id=0,ID=safe("id"),WEAK=safe("weak"),LEAK=safe("leak"),method=require("./$.array-methods"),find=method(5),findIndex=method(6);function findFrozen(store,key){return find.call(store.array,function(it){return it[0]===key})}function leakStore(that){return that[LEAK]||hide(that,LEAK,{array:[],get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.array.push([key,value])},"delete":function(key){var index=findIndex.call(this.array,function(it){return it[0]===key});if(~index)this.array.splice(index,1);return!!~index}})[LEAK]}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(iterable){$.set(assert.inst(this,C,NAME),ID,id++);if(iterable!=undefined)forOf(iterable,IS_MAP,this[ADDER],this)}$.mix(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this)["delete"](key);return has(key,WEAK)&&has(key[WEAK],this[ID])&&delete key[WEAK][this[ID]]},has:function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this).has(key);return has(key,WEAK)&&has(key[WEAK],this[ID])}});return C},def:function(that,key,value){if(isFrozen(assert.obj(key))){leakStore(that).set(key,value)}else{has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that[ID]]=value}return that},leakStore:leakStore,WEAK:WEAK,ID:ID}},{"./$":223,"./$.array-methods":211,"./$.assert":212,"./$.iter":222,"./$.uid":232}],217:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),$iter=require("./$.iter"),assertInstance=require("./$.assert").inst;module.exports=function(NAME,methods,common,IS_MAP,isWeak){var Base=$.g[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};function fixMethod(KEY,CHAIN){var method=proto[KEY];if($.FW)proto[KEY]=function(a,b){var result=method.call(this,a===0?0:a,b);return CHAIN?this:result}}if(!$.isFunction(C)||!(isWeak||!$iter.BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(NAME,IS_MAP,ADDER);$.mix(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](isWeak?{}:-0,1),buggyZero;if($iter.fail(function(iter){new C(iter)})||$iter.DANGER_CLOSING){C=function(iterable){assertInstance(this,C,NAME);var that=new Base;if(iterable!=undefined)$iter.forOf(iterable,IS_MAP,that[ADDER],that);return that};C.prototype=proto;if($.FW)proto.constructor=C}isWeak||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER,true)}require("./$.cof").set(C,NAME);require("./$.species")(C);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);if(!isWeak)$iter.std(C,NAME,common.getIterConstructor(),common.next,IS_MAP?"key+value":"value",!IS_MAP,true);return C}},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.def":219,"./$.iter":222,"./$.species":229}],218:[function(require,module,exports){var assertFunction=require("./$.assert").fn;module.exports=function(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.assert":212}],219:[function(require,module,exports){var $=require("./$"),global=$.g,core=$.core,isFunction=$.isFunction;function ctx(fn,that){return function(){return fn.apply(that,arguments)}}$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;function $def(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,target=isGlobal?global:type&$def.S?global[name]:(global[name]||{}).prototype,exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;if(own&&key in exports)continue;out=own?target[key]:source[key];if(isGlobal&&!isFunction(target[key]))exp=source[key];else if(type&$def.B&&own)exp=ctx(out,global);else if(type&$def.W&&target[key]==out)!function(C){exp=function(param){return this instanceof C?new C(param):C(param)};exp.prototype=C.prototype}(out);else exp=type&$def.P&&isFunction(out)?ctx(Function.call,out):out;$.hide(exports,key,exp)}}module.exports=$def},{"./$":223}],220:[function(require,module,exports){module.exports=function($){$.FW=false;$.path=$.core;return $}},{}],221:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}},{}],222:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),$def=require("./$.def"),assertObject=require("./$.assert").obj,SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",Iterators={},IteratorPrototype={};var BUGGY="keys"in[]&&!("next"in[].keys()); + +setIterator(IteratorPrototype,$.that);function setIterator(O,value){$.hide(O,SYMBOL_ITERATOR,value);if(FF_ITERATOR in[])$.hide(O,FF_ITERATOR,value)}function defineIterator(Constructor,NAME,value,DEFAULT){var proto=Constructor.prototype,iter=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT]||value;if($.FW)setIterator(proto,iter);if(iter!==value){var iterProto=$.getProto(iter.call(new Constructor));cof.set(iterProto,NAME+" Iterator",true);if($.FW)$.has(proto,FF_ITERATOR)&&setIterator(iterProto,$.that)}Iterators[NAME]=iter;Iterators[NAME+" Iterator"]=$.that;return iter}function getIterator(it){var Symbol=$.g.Symbol,ext=it[Symbol&&Symbol.iterator||FF_ITERATOR],getIter=ext||it[SYMBOL_ITERATOR]||Iterators[cof.classof(it)];return assertObject(getIter.call(it))}function closeIterator(iterator){var ret=iterator["return"];if(ret!==undefined)assertObject(ret.call(iterator))}function stepCall(iterator,fn,value,entries){try{return entries?fn(assertObject(value)[0],value[1]):fn(value)}catch(e){closeIterator(iterator);throw e}}var DANGER_CLOSING=true;!function(){try{var iter=[1].keys();iter["return"]=function(){DANGER_CLOSING=false};Array.from(iter,function(){throw 2})}catch(e){}}();var $iter=module.exports={BUGGY:BUGGY,DANGER_CLOSING:DANGER_CLOSING,fail:function(exec){var fail=true;try{var arr=[[{},1]],iter=arr[SYMBOL_ITERATOR](),next=iter.next;iter.next=function(){fail=false;return next.call(this)};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return fail},Iterators:Iterators,prototype:IteratorPrototype,step:function(done,value){return{value:value,done:!!done}},stepCall:stepCall,close:closeIterator,is:function(it){var O=Object(it),Symbol=$.g.Symbol,SYM=Symbol&&Symbol.iterator||FF_ITERATOR;return SYM in O||SYMBOL_ITERATOR in O||$.has(Iterators,cof.classof(O))},get:getIterator,set:setIterator,create:function(Constructor,NAME,next,proto){Constructor.prototype=$.create(proto||$iter.prototype,{next:$.desc(1,next)});cof.set(Constructor,NAME+" Iterator")},define:defineIterator,std:function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){function createIter(kind){return function(){return new Constructor(this,kind)}}$iter.create(Constructor,NAME,next);var entries=createIter("key+value"),values=createIter("value"),proto=Base.prototype,methods,key;if(DEFAULT=="value")values=defineIterator(Base,NAME,values,"values");else entries=defineIterator(Base,NAME,entries,"entries");if(DEFAULT){methods={entries:entries,keys:IS_SET?values:createIter("key"),values:values};$def($def.P+$def.F*BUGGY,NAME,methods);if(FORCE)for(key in methods){if(!(key in proto))$.hide(proto,key,methods[key])}}},forOf:function(iterable,entries,fn,that){var iterator=getIterator(iterable),f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done){if(stepCall(iterator,f,step.value,entries)===false){return closeIterator(iterator)}}}}},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.ctx":218,"./$.def":219,"./$.wks":234}],223:[function(require,module,exports){"use strict";var global=typeof self!="undefined"?self:Function("return this")(),core={},defineProperty=Object.defineProperty,hasOwnProperty={}.hasOwnProperty,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min;var DESC=!!function(){try{return defineProperty({},"a",{get:function(){return 2}}).a==2}catch(e){}}();var hide=createDefiner(1);function toInteger(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}function desc(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return $.setDesc(object,key,desc(bitmap,value))}:simpleSet}function isObject(it){return it!==null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}function assertDefined(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}var $=module.exports=require("./$.fw")({g:global,core:core,html:global.document&&document.documentElement,isObject:isObject,isFunction:isFunction,it:function(it){return it},that:function(){return this},toInteger:toInteger,toLength:function(it){return it>0?min(toInteger(it),9007199254740991):0},toIndex:function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)},has:function(it,key){return hasOwnProperty.call(it,key)},create:Object.create,getProto:Object.getPrototypeOf,DESC:DESC,desc:desc,getDesc:Object.getOwnPropertyDescriptor,setDesc:defineProperty,getKeys:Object.keys,getNames:Object.getOwnPropertyNames,getSymbols:Object.getOwnPropertySymbols,assertDefined:assertDefined,ES5Object:Object,toObject:function(it){return $.ES5Object(assertDefined(it))},hide:hide,def:createDefiner(0),set:global.Symbol?simpleSet:hide,mix:function(target,src){for(var key in src)hide(target,key,src[key]);return target},each:[].forEach});if(typeof __e!="undefined")__e=core;if(typeof __g!="undefined")__g=global},{"./$.fw":220}],224:[function(require,module,exports){var $=require("./$");module.exports=function(object,el){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":223}],225:[function(require,module,exports){var $=require("./$"),assertObject=require("./$.assert").obj;module.exports=function(it){assertObject(it);return $.getSymbols?$.getNames(it).concat($.getSymbols(it)):$.getNames(it)}},{"./$":223,"./$.assert":212}],226:[function(require,module,exports){"use strict";var $=require("./$"),invoke=require("./$.invoke"),assertFunction=require("./$.assert").fn;module.exports=function(){var fn=assertFunction(this),length=arguments.length,pargs=Array(length),i=0,_=$.path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$":223,"./$.assert":212,"./$.invoke":221}],227:[function(require,module,exports){"use strict";module.exports=function(regExp,replace,isStatic){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}},{}],228:[function(require,module,exports){var $=require("./$"),assert=require("./$.assert");module.exports=Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,$.getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function(O,proto){assert.obj(O);assert(proto===null||$.isObject(proto),proto,": can't set as prototype!");if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined)},{"./$":223,"./$.assert":212,"./$.ctx":218}],229:[function(require,module,exports){var $=require("./$");module.exports=function(C){if($.DESC&&$.FW)$.setDesc(C,require("./$.wks")("species"),{configurable:true,get:$.that})}},{"./$":223,"./$.wks":234}],230:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function(TO_STRING){return function(pos){var s=String($.assertDefined(this)),i=$.toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$":223}],231:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),invoke=require("./$.invoke"),global=$.g,isFunction=$.isFunction,setTask=global.setImmediate,clearTask=global.clearImmediate,postMessage=global.postMessage,addEventListener=global.addEventListener,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;function run(){var id=+this;if($.has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run.call(event.data)}if(!isFunction(setTask)||!isFunction(clearTask)){setTask=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearTask=function(id){delete queue[id]};if(cof(global.process)=="process"){defer=function(id){global.process.nextTick(ctx(run,id,1))}}else if(addEventListener&&isFunction(postMessage)&&!$.g.importScripts){defer=function(id){postMessage(id,"*")};addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if($.g.document&&ONREADYSTATECHANGE in document.createElement("script")){defer=function(id){$.html.appendChild(document.createElement("script"))[ONREADYSTATECHANGE]=function(){$.html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$":223,"./$.cof":214,"./$.ctx":218,"./$.invoke":221}],232:[function(require,module,exports){var sid=0;function uid(key){return"Symbol("+key+")_"+(++sid+Math.random()).toString(36)}uid.safe=require("./$").g.Symbol||uid;module.exports=uid},{"./$":223}],233:[function(require,module,exports){var $=require("./$"),UNSCOPABLES=require("./$.wks")("unscopables");if($.FW&&!(UNSCOPABLES in[]))$.hide(Array.prototype,UNSCOPABLES,{});module.exports=function(key){if($.FW)[][UNSCOPABLES][key]=true}},{"./$":223,"./$.wks":234}],234:[function(require,module,exports){var global=require("./$").g,store={};module.exports=function(name){return store[name]||(store[name]=global.Symbol&&global.Symbol[name]||require("./$.uid").safe("Symbol."+name))}},{"./$":223,"./$.uid":232}],235:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,$def=require("./$.def"),$iter=require("./$.iter"),ENTRIES=safe("entries"),FN=safe("fn"),ITER=safe("iter"),forOf=$iter.forOf,stepCall=$iter.stepCall,getIterator=$iter.get,setIterator=$iter.set,createIterator=$iter.create;function $for(iterable,entries){if(!(this instanceof $for))return new $for(iterable,entries);this[ITER]=getIterator(iterable);this[ENTRIES]=!!entries}createIterator($for,"Wrapper",function(){return this[ITER].next()});var $forProto=$for.prototype;setIterator($forProto,function(){return this[ITER]});function createChainIterator(next){function Iterator(iter,fn,that){this[ITER]=getIterator(iter);this[ENTRIES]=iter[ENTRIES];this[FN]=ctx(fn,that,iter[ENTRIES]?2:1)}createIterator(Iterator,"Chain",next,$forProto);setIterator(Iterator.prototype,$.that);return Iterator}var MapIter=createChainIterator(function(){var step=this[ITER].next();return step.done?step:$iter.step(0,stepCall(this[ITER],this[FN],step.value,this[ENTRIES]))});var FilterIter=createChainIterator(function(){for(;;){var step=this[ITER].next();if(step.done||stepCall(this[ITER],this[FN],step.value,this[ENTRIES]))return step}});$.mix($forProto,{of:function(fn,that){forOf(this,this[ENTRIES],fn,that)},array:function(fn,that){var result=[];forOf(fn!=undefined?this.map(fn,that):this,false,result.push,result);return result},filter:function(fn,that){return new FilterIter(this,fn,that)},map:function(fn,that){return new MapIter(this,fn,that)}});$for.isIterable=$iter.is;$for.getIterator=getIterator;$def($def.G+$def.F,{$for:$for})},{"./$":223,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.uid":232}],236:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),assertFunction=require("./$.assert").fn;$def($def.P+$def.F,"Array",{turn:function(fn,target){assertFunction(fn);var memo=target==undefined?[]:Object(target),O=$.ES5Object(this),length=$.toLength(O.length),index=0;while(length>index)if(fn(memo,O[index],index++,this)===false)break;return memo}});require("./$.unscope")("turn")},{"./$":223,"./$.assert":212,"./$.def":219,"./$.unscope":233}],237:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),invoke=require("./$.invoke"),hide=$.hide,assertFunction=require("./$.assert").fn,_=$.DESC?require("./$.uid")("tie"):"toLocaleString",toLocaleString={}.toLocaleString;$.core._=$.path._=$.path._||{};$def($def.P+$def.F,"Function",{part:require("./$.partial"),only:function(numberArguments,that){var fn=assertFunction(this),n=$.toLength(numberArguments),isThat=arguments.length>1;return function(){var length=Math.min(n,arguments.length),args=Array(length),i=0;while(length>i)args[i]=arguments[i++];return invoke(fn,args,isThat?that:this)}}});function tie(key){var that=this,bound={};return hide(that,_,function(key){if(key===undefined||!(key in that))return toLocaleString.call(that);return $.has(bound,key)?bound[key]:bound[key]=ctx(that[key],that,-1)})[_](key)}hide($.path._,"toString",function(){return _});hide(Object.prototype,_,tie);$.DESC||hide(Array.prototype,_,tie)},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.def":219,"./$.invoke":221,"./$.partial":226,"./$.uid":232}],238:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),core=$.core,formatRegExp=/\b\w\w?\b/g,flexioRegExp=/:(.*)\|(.*)$/,locales={},current="en",SECONDS="Seconds",MINUTES="Minutes",HOURS="Hours",DATE="Date",MONTH="Month",YEAR="FullYear";function lz(num){return num>9?num:"0"+num}function createFormat(prefix){return function(template,locale){var that=this,dict=locales[$.has(locales,locale)?locale:current];function get(unit){return that[prefix+unit]()}return String(template).replace(formatRegExp,function(part){switch(part){case"s":return get(SECONDS);case"ss":return lz(get(SECONDS));case"m":return get(MINUTES);case"mm":return lz(get(MINUTES));case"h":return get(HOURS);case"hh":return lz(get(HOURS));case"D":return get(DATE);case"DD":return lz(get(DATE));case"W":return dict[0][get("Day")];case"N":return get(MONTH)+1;case"NN":return lz(get(MONTH)+1);case"M":return dict[2][get(MONTH)];case"MM":return dict[1][get(MONTH)];case"Y":return get(YEAR);case"YY":return lz(get(YEAR)%100)}return part})}}function addLocale(lang,locale){function split(index){var result=[];$.each.call(locale.months.split(","),function(it){result.push(it.replace(flexioRegExp,"$"+index))});return result}locales[lang]=[locale.weekdays.split(","),split(1),split(2)];return core}$def($def.P+$def.F,DATE,{format:createFormat("get"),formatUTC:createFormat("getUTC")});addLocale(current,{weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",months:"January,February,March,April,May,June,July,August,September,October,November,December"});addLocale("ru",{weekdays:"Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота",months:"Январ:я|ь,Феврал:я|ь,Март:а|,Апрел:я|ь,Ма:я|й,Июн:я|ь,"+"Июл:я|ь,Август:а|,Сентябр:я|ь,Октябр:я|ь,Ноябр:я|ь,Декабр:я|ь"});core.locale=function(locale){return $.has(locales,locale)?current=locale:current};core.addLocale=addLocale},{"./$":223,"./$.def":219}],239:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),partial=require("./$.partial");$def($def.G+$def.F,{delay:function(time){return new($.core.Promise||$.g.Promise)(function(resolve){setTimeout(partial.call(resolve,true),time)})}})},{"./$":223,"./$.def":219,"./$.partial":226}],240:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),assign=require("./$.assign"),keyOf=require("./$.keyof"),ITER=require("./$.uid").safe("iter"),assert=require("./$.assert"),$iter=require("./$.iter"),step=$iter.step,getKeys=$.getKeys,toObject=$.toObject,has=$.has;function Dict(iterable){var dict=$.create(null);if(iterable!=undefined){if($iter.is(iterable)){$iter.forOf(iterable,true,function(key,value){dict[key]=value})}else assign(dict,iterable)}return dict}Dict.prototype=null;function DictIterator(iterated,kind){$.set(this,ITER,{o:toObject(iterated),a:getKeys(iterated),i:0,k:kind})}$iter.create(DictIterator,"Dict",function(){var iter=this[ITER],O=iter.o,keys=iter.a,kind=iter.k,key;do{if(iter.i>=keys.length){iter.o=undefined;return step(1)}}while(!has(O,key=keys[iter.i++]));if(kind=="key")return step(0,key);if(kind=="value")return step(0,O[key]);return step(0,[key,O[key]])});function createDictIter(kind){return function(it){return new DictIterator(it,kind)}}function generic(A,B){return typeof A=="function"?A:B}function createDictMethod(TYPE){var IS_MAP=TYPE==1,IS_EVERY=TYPE==4;return function(object,callbackfn,that){var f=ctx(callbackfn,that,3),O=toObject(object),result=IS_MAP||TYPE==7||TYPE==2?new(generic(this,Dict)):undefined,key,val,res;for(key in O)if(has(O,key)){val=O[key];res=f(val,key,object);if(TYPE){if(IS_MAP)result[key]=res;else if(res)switch(TYPE){case 2:result[key]=val;break;case 3:return true;case 5:return val;case 6:return key;case 7:result[res[0]]=res[1]}else if(IS_EVERY)return false}}return TYPE==3||IS_EVERY?IS_EVERY:result}}function createDictReduce(IS_TURN){return function(object,mapfn,init){assert.fn(mapfn);var O=toObject(object),keys=getKeys(O),length=keys.length,i=0,memo,key,result;if(IS_TURN){memo=init==undefined?new(generic(this,Dict)):Object(init)}else if(arguments.length<3){assert(length,"Reduce of empty object with no initial value");memo=O[keys[i++]]}else memo=Object(init);while(length>i)if(has(O,key=keys[i++])){result=mapfn(memo,O[key],key,object);if(IS_TURN){if(result===false)break}else memo=result}return memo}}var findKey=createDictMethod(6);$def($def.G+$def.F,{Dict:$.mix(Dict,{keys:createDictIter("key"),values:createDictIter("value"),entries:createDictIter("key+value"),forEach:createDictMethod(0),map:createDictMethod(1),filter:createDictMethod(2),some:createDictMethod(3),every:createDictMethod(4),find:createDictMethod(5),findKey:findKey,mapPairs:createDictMethod(7),reduce:createDictReduce(false),turn:createDictReduce(true),keyOf:keyOf,includes:function(object,el){return(el==el?keyOf(object,el):findKey(object,function(it){return it!=it}))!==undefined},has:has,get:function(object,key){if(has(object,key))return object[key]},set:$.def,isDict:function(it){return $.isObject(it)&&$.getProto(it)===Dict.prototype}})})},{"./$":223,"./$.assert":212,"./$.assign":213,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.keyof":224,"./$.uid":232}],241:[function(require,module,exports){var $def=require("./$.def");$def($def.G+$def.F,{global:require("./$").g})},{"./$":223,"./$.def":219}],242:[function(require,module,exports){var core=require("./$").core,$iter=require("./$.iter");core.isIterable=$iter.is;core.getIterator=$iter.get},{"./$":223,"./$.iter":222}],243:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),log={},enabled=true;$.each.call(("assert,clear,count,debug,dir,dirxml,error,exception,"+"group,groupCollapsed,groupEnd,info,isIndependentlyComposed,log,"+"markTimeline,profile,profileEnd,table,time,timeEnd,timeline,"+"timelineEnd,timeStamp,trace,warn").split(","),function(key){log[key]=function(){if(enabled&&$.g.console&&$.isFunction(console[key])){return Function.apply.call(console[key],console,arguments)}}});$def($def.G+$def.F,{log:require("./$.assign")(log.log,log,{enable:function(){enabled=true},disable:function(){enabled=false}})})},{"./$":223,"./$.assign":213,"./$.def":219}],244:[function(require,module,exports){"use strict";var $=require("./$"),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step,NUMBER="Number";function NumberIterator(iterated){$.set(this,ITER,{l:$.toLength(iterated),i:0})}$iter.create(NumberIterator,NUMBER,function(){var iter=this[ITER],i=iter.i++;return ii)args.push(arguments[i++]);return invoke(fn,args)}});$def($def.P+$def.F,"Number",methods)},{"./$":223,"./$.def":219,"./$.invoke":221}],246:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),ownKeys=require("./$.own-keys");function define(target,mixin){var keys=ownKeys($.toObject(mixin)),length=keys.length,i=0,key;while(length>i)$.setDesc(target,key=keys[i++],$.getDesc(mixin,key));return target}$def($def.S+$def.F,"Object",{isObject:$.isObject,classof:require("./$.cof").classof,define:define,make:function(proto,mixin){return define($.create(proto),mixin)}})},{"./$":223,"./$.cof":214,"./$.def":219,"./$.own-keys":225}],247:[function(require,module,exports){var $def=require("./$.def"),replacer=require("./$.replacer");var escapeHTMLDict={"&":"&","<":"<",">":">",'"':""","'":"'"},unescapeHTMLDict={},key;for(key in escapeHTMLDict)unescapeHTMLDict[escapeHTMLDict[key]]=key;$def($def.P+$def.F,"String",{escapeHTML:replacer(/[&<>"']/g,escapeHTMLDict),unescapeHTML:replacer(/&(?:amp|lt|gt|quot|apos);/g,unescapeHTMLDict)})},{"./$.def":219,"./$.replacer":227}],248:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid").safe("__proto__"),assert=require("./$.assert"),assertObject=assert.obj,ObjectProto=Object.prototype,A=[],slice=A.slice,indexOf=A.indexOf,classof=cof.classof,defineProperties=Object.defineProperties,has=$.has,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,isFunction=$.isFunction,toObject=$.toObject,toLength=$.toLength,IE8_DOM_DEFINE=false;if(!$.DESC){try{IE8_DOM_DEFINE=defineProperty(document.createElement("div"),"x",{get:function(){return 8}}).x==8}catch(e){}$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)assertObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};defineProperties=function(O,Properties){assertObject(O);var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!$.DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=document.createElement("iframe"),i=keysLen1,iframeDocument;iframe.style.display="none";$.html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write("");iframeDocument.close();createDict=iframeDocument.F;while(i--)delete createDict.prototype[keys1[i]];return createDict()};function createGetKeys(names,length){return function(object){var O=toObject(object),i=0,result=[],key;for(key in O)if(key!=IE_PROTO)has(O,key)&&result.push(key);while(length>i)if(has(O,key=names[i++])){~indexOf.call(result,key)||result.push(key)}return result}}function isPrimitive(it){return!$.isObject(it)}function Empty(){}$def($def.S,"Object",{getPrototypeOf:$.getProto=$.getProto||function(O){O=Object(assert.def(O));if(has(O,IE_PROTO))return O[IE_PROTO];if(isFunction(O.constructor)&&O instanceof O.constructor){return O.constructor.prototype}return O instanceof Object?ObjectProto:null},getOwnPropertyNames:$.getNames=$.getNames||createGetKeys(keys2,keys2.length,true),create:$.create=$.create||function(O,Properties){var result;if(O!==null){Empty.prototype=assertObject(O);result=new Empty;Empty.prototype=null;result[IE_PROTO]=O}else result=createDict();return Properties===undefined?result:defineProperties(result,Properties)},keys:$.getKeys=$.getKeys||createGetKeys(keys1,keysLen1,false),seal:$.it,freeze:$.it,preventExtensions:$.it,isSealed:isPrimitive,isFrozen:isPrimitive,isExtensible:$.isObject});$def($def.P,"Function",{bind:function(that){var fn=assert.fn(this),partArgs=slice.call(arguments,1);function bound(){var args=partArgs.concat(slice.call(arguments));return invoke(fn,args,this instanceof bound?$.create(fn.prototype):that)}if(fn.prototype)bound.prototype=fn.prototype;return bound}});function arrayMethodFix(fn){return function(){return fn.apply($.ES5Object(this),arguments)}}if(!(0 in Object("z")&&"z"[0]=="z")){$.ES5Object=function(it){return cof(it)=="String"?it.split(""):Object(it)}}$def($def.P+$def.F*($.ES5Object!=Object),"Array",{slice:arrayMethodFix(slice),join:arrayMethodFix(A.join)});$def($def.S,"Array",{isArray:function(arg){return cof(arg)=="Array"}});function createArrayReduce(isRight){return function(callbackfn,memo){assert.fn(callbackfn);var O=toObject(this),length=toLength(O.length),index=isRight?length-1:0,i=isRight?-1:1;if(arguments.length<2)for(;;){if(index in O){memo=O[index];index+=i;break}index+=i;assert(isRight?index>=0:length>index,"Reduce of empty array with no initial value")}for(;isRight?index>=0:length>index;index+=i)if(index in O){memo=callbackfn(memo,O[index],index,this)}return memo}}$def($def.P,"Array",{forEach:$.each=$.each||arrayMethod(0),map:arrayMethod(1),filter:arrayMethod(2),some:arrayMethod(3),every:arrayMethod(4),reduce:createArrayReduce(false),reduceRight:createArrayReduce(true),indexOf:indexOf=indexOf||require("./$.array-includes")(false),lastIndexOf:function(el,fromIndex){var O=toObject(this),length=toLength(O.length),index=length-1;if(arguments.length>1)index=Math.min(index,$.toInteger(fromIndex));if(index<0)index=toLength(length+index);for(;index>=0;index--)if(index in O)if(O[index]===el)return index;return-1}});$def($def.P,"String",{trim:require("./$.replacer")(/^\s*([\s\S]*\S)?\s*$/,"$1")});$def($def.S,"Date",{now:function(){return+new Date}});function lz(num){return num>9?num:"0"+num}$def($def.P,"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var d=this,y=d.getUTCFullYear(),m=d.getUTCMilliseconds(),s=y<0?"-":y>9999?"+":"";return s+("00000"+Math.abs(y)).slice(s?-6:-4)+"-"+lz(d.getUTCMonth()+1)+"-"+lz(d.getUTCDate())+"T"+lz(d.getUTCHours())+":"+lz(d.getUTCMinutes())+":"+lz(d.getUTCSeconds())+"."+(m>99?m:"0"+lz(m))+"Z"}});if(classof(function(){return arguments}())=="Object")cof.classof=function(it){var tag=classof(it);return tag=="Object"&&isFunction(it.callee)?"Arguments":tag}},{"./$":223,"./$.array-includes":210,"./$.array-methods":211,"./$.assert":212,"./$.cof":214,"./$.def":219,"./$.invoke":221,"./$.replacer":227,"./$.uid":232}],249:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{copyWithin:function(target,start){var O=Object($.assertDefined(this)),len=$.toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],fin=end===undefined?len:toIndex(end,len),count=Math.min(fin-from,len-to),inc=1;if(from0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O}});require("./$.unscope")("copyWithin")},{"./$":223,"./$.def":219,"./$.unscope":233}],250:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{fill:function(value){var O=Object($.assertDefined(this)),length=$.toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O}});require("./$.unscope")("fill")},{"./$":223,"./$.def":219,"./$.unscope":233}],251:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{findIndex:require("./$.array-methods")(6)});require("./$.unscope")("findIndex")},{"./$.array-methods":211,"./$.def":219,"./$.unscope":233}],252:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{find:require("./$.array-methods")(5)});require("./$.unscope")("find")},{"./$.array-methods":211,"./$.def":219,"./$.unscope":233}],253:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),$iter=require("./$.iter"),stepCall=$iter.stepCall;$def($def.S+$def.F*$iter.DANGER_CLOSING,"Array",{from:function(arrayLike){var O=Object($.assertDefined(arrayLike)),mapfn=arguments[1],mapping=mapfn!==undefined,f=mapping?ctx(mapfn,arguments[2],2):undefined,index=0,length,result,step,iterator;if($iter.is(O)){iterator=$iter.get(O);result=new(typeof this=="function"?this:Array);for(;!(step=iterator.next()).done;index++){result[index]=mapping?stepCall(iterator,f,[step.value,index],true):step.value}}else{result=new(typeof this=="function"?this:Array)(length=$.toLength(O.length));for(;length>index;index++){result[index]=mapping?f(O[index],index):O[index]}}result.length=index;return result}})},{"./$":223,"./$.ctx":218,"./$.def":219,"./$.iter":222}],254:[function(require,module,exports){var $=require("./$"),setUnscope=require("./$.unscope"),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step,Iterators=$iter.Iterators;$iter.std(Array,"Array",function(iterated,kind){$.set(this,ITER,{o:$.toObject(iterated),i:0,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,index=iter.i++;if(!O||index>=O.length){iter.o=undefined;return step(1)}if(kind=="key")return step(0,index);if(kind=="value")return step(0,O[index]);return step(0,[index,O[index]])},"value");Iterators.Arguments=Iterators.Array;setUnscope("keys");setUnscope("values");setUnscope("entries")},{"./$":223,"./$.iter":222,"./$.uid":232,"./$.unscope":233}],255:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Array",{of:function(){var index=0,length=arguments.length,result=new(typeof this=="function"?this:Array)(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}})},{"./$.def":219}],256:[function(require,module,exports){require("./$.species")(Array)},{"./$.species":229}],257:[function(require,module,exports){"use strict";var $=require("./$"),NAME="name",setDesc=$.setDesc,FunctionProto=Function.prototype;NAME in FunctionProto||$.FW&&$.DESC&&setDesc(FunctionProto,NAME,{configurable:true,get:function(){var match=String(this).match(/^\s*function ([^ (]*)/),name=match?match[1]:"";$.has(this,NAME)||setDesc(this,NAME,$.desc(5,name));return name},set:function(value){$.has(this,NAME)||setDesc(this,NAME,$.desc(0,value))}})},{"./$":223}],258:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Map",{get:function(key){var entry=strong.getEntry(this,key);return entry&&entry.v},set:function(key,value){return strong.def(this,key===0?0:key,value)}},strong,true)},{"./$.collection":217,"./$.collection-strong":215}],259:[function(require,module,exports){var Infinity=1/0,$def=require("./$.def"),E=Math.E,pow=Math.pow,abs=Math.abs,exp=Math.exp,log=Math.log,sqrt=Math.sqrt,ceil=Math.ceil,floor=Math.floor,sign=Math.sign||function(x){return(x=+x)==0||x!=x?x:x<0?-1:1};function asinh(x){return!isFinite(x=+x)||x==0?x:x<0?-asinh(-x):log(x+sqrt(x*x+1))}function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:exp(x)-1}$def($def.S,"Math",{acosh:function(x){return(x=+x)<1?NaN:isFinite(x)?log(x/E+sqrt(x+1)*sqrt(x-1)/E)+1:x},asinh:asinh,atanh:function(x){return(x=+x)==0?x:log((1+x)/(1-x))/2; + +},cbrt:function(x){return sign(x=+x)*pow(abs(x),1/3)},clz32:function(x){return(x>>>=0)?32-x.toString(2).length:32},cosh:function(x){return(exp(x=+x)+exp(-x))/2},expm1:expm1,fround:function(x){return new Float32Array([x])[0]},hypot:function(value1,value2){var sum=0,len1=arguments.length,len2=len1,args=Array(len1),larg=-Infinity,arg;while(len1--){arg=args[len1]=+arguments[len1];if(arg==Infinity||arg==-Infinity)return Infinity;if(arg>larg)larg=arg}larg=arg||1;while(len2--)sum+=pow(args[len2]/larg,2);return larg*sqrt(sum)},imul:function(x,y){var UInt16=65535,xn=+x,yn=+y,xl=UInt16&xn,yl=UInt16&yn;return 0|xl*yl+((UInt16&xn>>>16)*yl+xl*(UInt16&yn>>>16)<<16>>>0)},log1p:function(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:log(1+x)},log10:function(x){return log(x)/Math.LN10},log2:function(x){return log(x)/Math.LN2},sign:sign,sinh:function(x){return abs(x=+x)<1?(expm1(x)-expm1(-x))/2:(exp(x-1)-exp(-x-1))*(E/2)},tanh:function(x){var a=expm1(x=+x),b=expm1(-x);return a==Infinity?1:b==Infinity?-1:(a-b)/(exp(x)+exp(-x))},trunc:function(it){return(it>0?floor:ceil)(it)}})},{"./$.def":219}],260:[function(require,module,exports){"use strict";var $=require("./$"),isObject=$.isObject,isFunction=$.isFunction,NUMBER="Number",Number=$.g[NUMBER],Base=Number,proto=Number.prototype;function toPrimitive(it){var fn,val;if(isFunction(fn=it.valueOf)&&!isObject(val=fn.call(it)))return val;if(isFunction(fn=it.toString)&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to number")}function toNumber(it){if(isObject(it))it=toPrimitive(it);if(typeof it=="string"&&it.length>2&&it.charCodeAt(0)==48){var binary=false;switch(it.charCodeAt(1)){case 66:case 98:binary=true;case 79:case 111:return parseInt(it.slice(2),binary?2:8)}}return+it}if($.FW&&!(Number("0o1")&&Number("0b1"))){Number=function Number(it){return this instanceof Number?new Base(toNumber(it)):toNumber(it)};$.each.call($.DESC?$.getNames(Base):("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,"+"EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,"+"MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger").split(","),function(key){if($.has(Base,key)&&!$.has(Number,key)){$.setDesc(Number,key,$.getDesc(Base,key))}});Number.prototype=proto;proto.constructor=Number;$.hide($.g,NUMBER,Number)}},{"./$":223}],261:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),abs=Math.abs,floor=Math.floor,MAX_SAFE_INTEGER=9007199254740991;function isInteger(it){return!$.isObject(it)&&isFinite(it)&&floor(it)===it}$def($def.S,"Number",{EPSILON:Math.pow(2,-52),isFinite:function(it){return typeof it=="number"&&isFinite(it)},isInteger:isInteger,isNaN:function(number){return number!=number},isSafeInteger:function(number){return isInteger(number)&&abs(number)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MIN_SAFE_INTEGER:-MAX_SAFE_INTEGER,parseFloat:parseFloat,parseInt:parseInt})},{"./$":223,"./$.def":219}],262:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{assign:require("./$.assign")})},{"./$.assign":213,"./$.def":219}],263:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{is:function(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}})},{"./$.def":219}],264:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{setPrototypeOf:require("./$.set-proto")})},{"./$.def":219,"./$.set-proto":228}],265:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),isObject=$.isObject,toObject=$.toObject;function wrapObjectMethod(METHOD,MODE){var fn=($.core.Object||{})[METHOD]||Object[METHOD],f=0,o={};o[METHOD]=MODE==1?function(it){return isObject(it)?fn(it):it}:MODE==2?function(it){return isObject(it)?fn(it):true}:MODE==3?function(it){return isObject(it)?fn(it):false}:MODE==4?function(it,key){return fn(toObject(it),key)}:MODE==5?function(it){return fn(Object($.assertDefined(it)))}:function(it){return fn(toObject(it))};try{fn("z")}catch(e){f=1}$def($def.S+$def.F*f,"Object",o)}wrapObjectMethod("freeze",1);wrapObjectMethod("seal",1);wrapObjectMethod("preventExtensions",1);wrapObjectMethod("isFrozen",2);wrapObjectMethod("isSealed",2);wrapObjectMethod("isExtensible",3);wrapObjectMethod("getOwnPropertyDescriptor",4);wrapObjectMethod("getPrototypeOf",5);wrapObjectMethod("keys");wrapObjectMethod("getOwnPropertyNames")},{"./$":223,"./$.def":219}],266:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),tmp={};tmp[require("./$.wks")("toStringTag")]="z";if($.FW&&cof(tmp)!="z")$.hide(Object.prototype,"toString",function(){return"[object "+cof.classof(this)+"]"})},{"./$":223,"./$.cof":214,"./$.wks":234}],267:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),$def=require("./$.def"),assert=require("./$.assert"),$iter=require("./$.iter"),SPECIES=require("./$.wks")("species"),RECORD=require("./$.uid").safe("record"),forOf=$iter.forOf,PROMISE="Promise",global=$.g,process=global.process,asap=process&&process.nextTick||require("./$.task").set,Promise=global[PROMISE],Base=Promise,isFunction=$.isFunction,isObject=$.isObject,assertFunction=assert.fn,assertObject=assert.obj,test;function getConstructor(C){var S=assertObject(C)[SPECIES];return S!=undefined?S:C}isFunction(Promise)&&isFunction(Promise.resolve)&&Promise.resolve(test=new Promise(function(){}))==test||function(){function isThenable(it){var then;if(isObject(it))then=it.then;return isFunction(then)?then:false}function handledRejectionOrHasOnRejected(promise){var record=promise[RECORD],chain=record.c,i=0,react;if(record.h)return true;while(chain.length>i){react=chain[i++];if(react.fail||handledRejectionOrHasOnRejected(react.P))return true}}function notify(record,isReject){var chain=record.c;if(isReject||chain.length)asap(function(){var promise=record.p,value=record.v,ok=record.s==1,i=0;if(isReject&&!handledRejectionOrHasOnRejected(promise)){setTimeout(function(){if(!handledRejectionOrHasOnRejected(promise)){if(cof(process)=="process"){process.emit("unhandledRejection",value,promise)}else if(global.console&&isFunction(console.error)){console.error("Unhandled promise rejection",value)}}},1e3)}else while(chain.length>i)!function(react){var cb=ok?react.ok:react.fail,ret,then;try{if(cb){if(!ok)record.h=true;ret=cb===true?value:cb(value);if(ret===react.P){react.rej(TypeError(PROMISE+"-chain cycle"))}else if(then=isThenable(ret)){then.call(ret,react.res,react.rej)}else react.res(ret)}else react.rej(value)}catch(err){react.rej(err)}}(chain[i++]);chain.length=0})}function reject(value){var record=this;if(record.d)return;record.d=true;record=record.r||record;record.v=value;record.s=2;notify(record,true)}function resolve(value){var record=this,then,wrapper;if(record.d)return;record.d=true;record=record.r||record;try{if(then=isThenable(value)){wrapper={r:record,d:false};then.call(value,ctx(resolve,wrapper,1),ctx(reject,wrapper,1))}else{record.v=value;record.s=1;notify(record)}}catch(err){reject.call(wrapper||{r:record,d:false},err)}}Promise=function(executor){assertFunction(executor);var record={p:assert.inst(this,Promise,PROMISE),c:[],s:0,d:false,v:undefined,h:false};$.hide(this,RECORD,record);try{executor(ctx(resolve,record,1),ctx(reject,record,1))}catch(err){reject.call(record,err)}};$.mix(Promise.prototype,{then:function(onFulfilled,onRejected){var S=assertObject(assertObject(this).constructor)[SPECIES];var react={ok:isFunction(onFulfilled)?onFulfilled:true,fail:isFunction(onRejected)?onRejected:false};var P=react.P=new(S!=undefined?S:Promise)(function(res,rej){react.res=assertFunction(res);react.rej=assertFunction(rej)});var record=this[RECORD];record.c.push(react);record.s&¬ify(record);return P},"catch":function(onRejected){return this.then(undefined,onRejected)}})}();$def($def.G+$def.W+$def.F*(Promise!=Base),{Promise:Promise});$def($def.S,PROMISE,{reject:function(r){return new(getConstructor(this))(function(res,rej){rej(r)})},resolve:function(x){return isObject(x)&&RECORD in x&&$.getProto(x)===this.prototype?x:new(getConstructor(this))(function(res){res(x)})}});$def($def.S+$def.F*($iter.fail(function(iter){Promise.all(iter)["catch"](function(){})})||$iter.DANGER_CLOSING),PROMISE,{all:function(iterable){var C=getConstructor(this),values=[];return new C(function(resolve,reject){forOf(iterable,false,values.push,values);var remaining=values.length,results=Array(remaining);if(remaining)$.each.call(values,function(promise,index){C.resolve(promise).then(function(value){results[index]=value;--remaining||resolve(results)},reject)});else resolve(results)})},race:function(iterable){var C=getConstructor(this);return new C(function(resolve,reject){forOf(iterable,false,function(promise){C.resolve(promise).then(resolve,reject)})})}});cof.set(Promise,PROMISE);require("./$.species")(Promise)},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.species":229,"./$.task":231,"./$.uid":232,"./$.wks":234}],268:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),setProto=require("./$.set-proto"),$iter=require("./$.iter"),ITER=require("./$.uid").safe("iter"),step=$iter.step,assert=require("./$.assert"),isObject=$.isObject,getDesc=$.getDesc,setDesc=$.setDesc,getProto=$.getProto,apply=Function.apply,assertObject=assert.obj,isExtensible=Object.isExtensible||$.it;function Enumerate(iterated){var keys=[],key;for(key in iterated)keys.push(key);$.set(this,ITER,{o:iterated,a:keys,i:0})}$iter.create(Enumerate,"Object",function(){var iter=this[ITER],keys=iter.a,key;do{if(iter.i>=keys.length)return step(1)}while(!((key=keys[iter.i++])in iter.o));return step(0,key)});function wrap(fn){return function(it){assertObject(it);try{fn.apply(undefined,arguments);return true}catch(e){return false}}}function reflectGet(target,propertyKey){var receiver=arguments.length<3?target:arguments[2],desc=getDesc(assertObject(target),propertyKey),proto;if(desc)return $.has(desc,"value")?desc.value:desc.get===undefined?undefined:desc.get.call(receiver);return isObject(proto=getProto(target))?reflectGet(proto,propertyKey,receiver):undefined}function reflectSet(target,propertyKey,V){var receiver=arguments.length<4?target:arguments[3],ownDesc=getDesc(assertObject(target),propertyKey),existingDescriptor,proto;if(!ownDesc){if(isObject(proto=getProto(target))){return reflectSet(proto,propertyKey,V,receiver)}ownDesc=$.desc(0)}if($.has(ownDesc,"value")){if(ownDesc.writable===false||!isObject(receiver))return false;existingDescriptor=getDesc(receiver,propertyKey)||$.desc(0);existingDescriptor.value=V;setDesc(receiver,propertyKey,existingDescriptor);return true}return ownDesc.set===undefined?false:(ownDesc.set.call(receiver,V),true)}var reflect={apply:require("./$.ctx")(Function.call,apply,3),construct:function(target,argumentsList){var proto=assert.fn(arguments.length<3?target:arguments[2]).prototype,instance=$.create(isObject(proto)?proto:Object.prototype),result=apply.call(target,instance,argumentsList);return isObject(result)?result:instance},defineProperty:wrap(setDesc),deleteProperty:function(target,propertyKey){var desc=getDesc(assertObject(target),propertyKey);return desc&&!desc.configurable?false:delete target[propertyKey]},enumerate:function(target){return new Enumerate(assertObject(target))},get:reflectGet,getOwnPropertyDescriptor:function(target,propertyKey){return getDesc(assertObject(target),propertyKey)},getPrototypeOf:function(target){return getProto(assertObject(target))},has:function(target,propertyKey){return propertyKey in target},isExtensible:function(target){return!!isExtensible(assertObject(target))},ownKeys:require("./$.own-keys"),preventExtensions:wrap(Object.preventExtensions||$.it),set:reflectSet};if(setProto)reflect.setPrototypeOf=function(target,proto){setProto(assertObject(target),proto);return true};$def($def.G,{Reflect:{}});$def($def.S,"Reflect",reflect)},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.own-keys":225,"./$.set-proto":228,"./$.uid":232}],269:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),RegExp=$.g.RegExp,Base=RegExp,proto=RegExp.prototype;if($.FW&&$.DESC){if(!function(){try{return RegExp(/a/g,"i")=="/a/i"}catch(e){}}()){RegExp=function RegExp(pattern,flags){return new Base(cof(pattern)=="RegExp"&&flags!==undefined?pattern.source:pattern,flags)};$.each.call($.getNames(Base),function(key){key in RegExp||$.setDesc(RegExp,key,{configurable:true,get:function(){return Base[key]},set:function(it){Base[key]=it}})});proto.constructor=RegExp;RegExp.prototype=proto;$.hide($.g,"RegExp",RegExp)}if(/./g.flags!="g")$.setDesc(proto,"flags",{configurable:true,get:require("./$.replacer")(/^.*\/(\w*)$/,"$1")})}require("./$.species")(RegExp)},{"./$":223,"./$.cof":214,"./$.replacer":227,"./$.species":229}],270:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Set",{add:function(value){return strong.def(this,value=value===0?0:value,value)}},strong)},{"./$.collection":217,"./$.collection-strong":215}],271:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{codePointAt:require("./$.string-at")(false)})},{"./$.def":219,"./$.string-at":230}],272:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),toLength=$.toLength;$def($def.P,"String",{endsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),endPosition=arguments[1],len=toLength(that.length),end=endPosition===undefined?len:Math.min(toLength(endPosition),len);searchString+="";return that.slice(end-searchString.length,end)===searchString}})},{"./$":223,"./$.cof":214,"./$.def":219}],273:[function(require,module,exports){var $def=require("./$.def"),toIndex=require("./$").toIndex,fromCharCode=String.fromCharCode;$def($def.S,"String",{fromCodePoint:function(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")}})},{"./$":223,"./$.def":219}],274:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{includes:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();return!!~String($.assertDefined(this)).indexOf(searchString,arguments[1])}})},{"./$":223,"./$.cof":214,"./$.def":219}],275:[function(require,module,exports){var set=require("./$").set,at=require("./$.string-at")(true),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step;$iter.std(String,"String",function(iterated){set(this,ITER,{o:String(iterated),i:0})},function(){var iter=this[ITER],O=iter.o,index=iter.i,point;if(index>=O.length)return step(1);point=at.call(O,index);iter.i+=point.length;return step(0,point)})},{"./$":223,"./$.iter":222,"./$.string-at":230,"./$.uid":232}],276:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");$def($def.S,"String",{raw:function(callSite){var raw=$.toObject(callSite.raw),len=$.toLength(raw.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(raw[i++]));if(i0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}})},{"./$":223,"./$.def":219}],278:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{startsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),index=$.toLength(Math.min(arguments[1],that.length));searchString+="";return that.slice(index,index+searchString.length)===searchString}})},{"./$":223,"./$.cof":214,"./$.def":219}],279:[function(require,module,exports){"use strict";var $=require("./$"),setTag=require("./$.cof").set,uid=require("./$.uid"),$def=require("./$.def"),keyOf=require("./$.keyof"),has=$.has,hide=$.hide,getNames=$.getNames,toObject=$.toObject,Symbol=$.g.Symbol,Base=Symbol,setter=false,TAG=uid.safe("tag"),SymbolRegistry={},AllSymbols={};function wrap(tag){var sym=AllSymbols[tag]=$.set($.create(Symbol.prototype),TAG,tag);$.DESC&&setter&&$.setDesc(Object.prototype,tag,{configurable:true,set:function(value){hide(this,tag,value)}});return sym}if(!$.isFunction(Symbol)){Symbol=function(description){if(this instanceof Symbol)throw TypeError("Symbol is not a constructor");return wrap(uid(description))};hide(Symbol.prototype,"toString",function(){return this[TAG]})}$def($def.G+$def.W,{Symbol:Symbol});var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=Symbol(key)},keyFor:function(key){return keyOf(SymbolRegistry,key)},pure:uid.safe,set:$.set,useSetter:function(){setter=true},useSimple:function(){setter=false}};$.each.call(("hasInstance,isConcatSpreadable,iterator,match,replace,search,"+"species,split,toPrimitive,toStringTag,unscopables").split(","),function(it){var sym=require("./$.wks")(it);symbolStatics[it]=Symbol===Base?sym:wrap(sym)});setter=true;$def($def.S,"Symbol",symbolStatics);$def($def.S+$def.F*(Symbol!=Base),"Object",{getOwnPropertyNames:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])||result.push(key);return result},getOwnPropertySymbols:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])&&result.push(AllSymbols[key]);return result}});setTag(Symbol,"Symbol");setTag(Math,"Math",true);setTag($.g.JSON,"JSON",true)},{"./$":223,"./$.cof":214,"./$.def":219,"./$.keyof":224,"./$.uid":232,"./$.wks":234}],280:[function(require,module,exports){"use strict";var $=require("./$"),weak=require("./$.collection-weak"),leakStore=weak.leakStore,ID=weak.ID,WEAK=weak.WEAK,has=$.has,isObject=$.isObject,isFrozen=Object.isFrozen||$.core.Object.isFrozen,tmp={};var WeakMap=require("./$.collection")("WeakMap",{get:function(key){if(isObject(key)){if(isFrozen(key))return leakStore(this).get(key);if(has(key,WEAK))return key[WEAK][this[ID]]}},set:function(key,value){return weak.def(this,key,value)}},weak,true,true);if($.FW&&(new WeakMap).set((Object.freeze||Object)(tmp),7).get(tmp)!=7){$.each.call(["delete","has","get","set"],function(key){var method=WeakMap.prototype[key];WeakMap.prototype[key]=function(a,b){if(isObject(a)&&isFrozen(a)){var result=leakStore(this)[key](a,b);return key=="set"?this:result}return method.call(this,a,b)}})}},{"./$":223,"./$.collection":217,"./$.collection-weak":216}],281:[function(require,module,exports){"use strict";var weak=require("./$.collection-weak");require("./$.collection")("WeakSet",{add:function(value){return weak.def(this,value,true)}},weak,false,true)},{"./$.collection":217,"./$.collection-weak":216}],282:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{includes:require("./$.array-includes")(true)});require("./$.unscope")("includes")},{"./$.array-includes":210,"./$.def":219,"./$.unscope":233}],283:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),ownKeys=require("./$.own-keys");$def($def.S,"Object",{getOwnPropertyDescriptors:function(object){var O=$.toObject(object),result={};$.each.call(ownKeys(O),function(key){$.setDesc(result,key,$.desc(0,$.getDesc(O,key)))});return result}})},{"./$":223,"./$.def":219,"./$.own-keys":225}],284:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");function createObjectToArray(isEntries){return function(object){var O=$.toObject(object),keys=$.getKeys(object),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}$def($def.S,"Object",{values:createObjectToArray(false),entries:createObjectToArray(true)})},{"./$":223,"./$.def":219}],285:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"RegExp",{escape:require("./$.replacer")(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",true)})},{"./$.def":219,"./$.replacer":227}],286:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{at:require("./$.string-at")(true)})},{"./$.def":219,"./$.string-at":230}],287:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),core=$.core,statics={};function setStatics(keys,length){$.each.call(keys.split(","),function(key){if(length==undefined&&key in core.Array)statics[key]=core.Array[key];else if(key in[])statics[key]=require("./$.ctx")(Function.call,[][key],length)})}setStatics("pop,reverse,shift,keys,values,entries",1);setStatics("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);setStatics("join,slice,concat,push,splice,unshift,sort,lastIndexOf,"+"reduce,reduceRight,copyWithin,fill,turn");$def($def.S,"Array",statics)},{"./$":223,"./$.ctx":218,"./$.def":219}],288:[function(require,module,exports){require("./es6.array.iterator");var $=require("./$"),Iterators=require("./$.iter").Iterators,ITERATOR=require("./$.wks")("iterator"),NodeList=$.g.NodeList;if($.FW&&NodeList&&!(ITERATOR in NodeList.prototype)){$.hide(NodeList.prototype,ITERATOR,Iterators.Array)}Iterators.NodeList=Iterators.Array},{"./$":223,"./$.iter":222,"./$.wks":234,"./es6.array.iterator":254}],289:[function(require,module,exports){var $def=require("./$.def"),$task=require("./$.task");$def($def.G+$def.B,{setImmediate:$task.set,clearImmediate:$task.clear})},{"./$.def":219,"./$.task":231}],290:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),invoke=require("./$.invoke"),partial=require("./$.partial"),MSIE=!!$.g.navigator&&/MSIE .\./.test(navigator.userAgent);function wrap(set){return MSIE?function(fn,time){return set(invoke(partial,[].slice.call(arguments,2),$.isFunction(fn)?fn:Function(fn)),time)}:set}$def($def.G+$def.B+$def.F*MSIE,{setTimeout:wrap($.g.setTimeout),setInterval:wrap($.g.setInterval)})},{"./$":223,"./$.def":219,"./$.invoke":221,"./$.partial":226}],291:[function(require,module,exports){require("./modules/es5");require("./modules/es6.symbol");require("./modules/es6.object.assign");require("./modules/es6.object.is");require("./modules/es6.object.set-prototype-of");require("./modules/es6.object.to-string");require("./modules/es6.object.statics-accept-primitives");require("./modules/es6.function.name");require("./modules/es6.number.constructor");require("./modules/es6.number.statics");require("./modules/es6.math");require("./modules/es6.string.from-code-point");require("./modules/es6.string.raw");require("./modules/es6.string.iterator");require("./modules/es6.string.code-point-at");require("./modules/es6.string.ends-with");require("./modules/es6.string.includes");require("./modules/es6.string.repeat");require("./modules/es6.string.starts-with");require("./modules/es6.array.from");require("./modules/es6.array.of");require("./modules/es6.array.iterator");require("./modules/es6.array.species");require("./modules/es6.array.copy-within");require("./modules/es6.array.fill");require("./modules/es6.array.find");require("./modules/es6.array.find-index");require("./modules/es6.regexp");require("./modules/es6.promise");require("./modules/es6.map");require("./modules/es6.set");require("./modules/es6.weak-map");require("./modules/es6.weak-set");require("./modules/es6.reflect");require("./modules/es7.array.includes");require("./modules/es7.string.at");require("./modules/es7.regexp.escape");require("./modules/es7.object.get-own-property-descriptors");require("./modules/es7.object.to-array");require("./modules/js.array.statics");require("./modules/web.timers");require("./modules/web.immediate");require("./modules/web.dom.iterable");module.exports=require("./modules/$").core},{"./modules/$":223,"./modules/es5":248,"./modules/es6.array.copy-within":249,"./modules/es6.array.fill":250,"./modules/es6.array.find":252,"./modules/es6.array.find-index":251,"./modules/es6.array.from":253,"./modules/es6.array.iterator":254,"./modules/es6.array.of":255,"./modules/es6.array.species":256,"./modules/es6.function.name":257,"./modules/es6.map":258,"./modules/es6.math":259,"./modules/es6.number.constructor":260,"./modules/es6.number.statics":261,"./modules/es6.object.assign":262,"./modules/es6.object.is":263,"./modules/es6.object.set-prototype-of":264,"./modules/es6.object.statics-accept-primitives":265,"./modules/es6.object.to-string":266,"./modules/es6.promise":267,"./modules/es6.reflect":268,"./modules/es6.regexp":269,"./modules/es6.set":270,"./modules/es6.string.code-point-at":271,"./modules/es6.string.ends-with":272,"./modules/es6.string.from-code-point":273,"./modules/es6.string.includes":274,"./modules/es6.string.iterator":275,"./modules/es6.string.raw":276,"./modules/es6.string.repeat":277,"./modules/es6.string.starts-with":278,"./modules/es6.symbol":279,"./modules/es6.weak-map":280,"./modules/es6.weak-set":281,"./modules/es7.array.includes":282,"./modules/es7.object.get-own-property-descriptors":283,"./modules/es7.object.to-array":284,"./modules/es7.regexp.escape":285,"./modules/es7.string.at":286,"./modules/js.array.statics":287,"./modules/web.dom.iterable":288,"./modules/web.immediate":289,"./modules/web.timers":290}],292:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;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]){args=["%o"].concat(args)}var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);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}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(msmaxUsed||u===maxUsed&&w>maxWeight){maxUsed=u;maxWeight=w;result=+n}}return result}module.exports=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}var tabs=0;var spaces=0;var prev=0;var indents={};var current;var isIndent;str.split(/\n/g).forEach(function(line){if(!line){return}var indent;var matches=line.match(INDENT_RE);if(!matches){indent=0; + +}else{indent=matches[0].length;if(matches[1]){spaces++}else{tabs++}}var diff=indent-prev;prev=indent;if(diff){isIndent=diff>0;current=indents[isIndent?diff:-diff];if(current){current[0]++}else{current=indents[diff]=[1,0]}}else if(current){current[1]+=+isIndent}});var amount=getMostUsed(indents);var type;var actual;if(!amount){type=null;actual=""}else if(spaces>=tabs){type="space";actual=repeating(" ",amount)}else{type="tab";actual=repeating(" ",amount)}return{amount:amount,type:type,indent:actual}}},{repeating:437}],296:[function(require,module,exports){(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(["exports"],factory)}else if(typeof exports!=="undefined"){factory(exports)}else{factory(root.estraverse={})}})(this,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);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=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()){key=element.ref.key;parent=element.ref.parent;i=worklist.length;while(i--){nextElem=worklist[i];if(nextElem.ref&&nextElem.ref.parent===parent){if(nextElem.ref.key=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){var comments=[],comment,len,i,cursor;if(!tree.range){throw new Error("attachComments needs range information")}if(!tokens.length){if(providedComments.length){for(i=0,len=providedComments.length;inode.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}}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(cursornode.range[1]){return VisitorOption.Skip}}});return tree}exports.version="1.8.1-dev";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})},{}],297:[function(require,module,exports){(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}})()},{}],298:[function(require,module,exports){(function(){"use strict";var Regex,NON_ASCII_WHITESPACES;Regex={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function isDecimalDigit(ch){return ch>=48&&ch<=57}function isHexDigit(ch){return isDecimalDigit(ch)||97<=ch&&ch<=102||65<=ch&&ch<=70}function isOctalDigit(ch){return ch>=48&&ch<=55}NON_ASCII_WHITESPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&NON_ASCII_WHITESPACES.indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function isIdentifierStart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))}function isIdentifierPart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch>=48&&ch<=57||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))}module.exports={isDecimalDigit:isDecimalDigit,isHexDigit:isHexDigit,isOctalDigit:isOctalDigit,isWhiteSpace:isWhiteSpace,isLineTerminator:isLineTerminator,isIdentifierStart:isIdentifierStart,isIdentifierPart:isIdentifierPart}})()},{}],299:[function(require,module,exports){(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){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){return false}for(i=1,iz=id.length;i!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g;module.exports.matchToToken=function(match){token={type:"invalid",value:match[0]};if(match[1])token.type="string",token.closed=!!(match[3]||match[4]);else if(match[5])token.type="comment";else if(match[6])token.type="comment",token.closed=!!match[7];else if(match[8])token.type="regex";else if(match[9])token.type="number";else if(match[10])token.type="name";else if(match[11])token.type="punctuator";else if(match[12])token.type="whitespace";return token}},{}],307:[function(require,module,exports){var arr=[];var charCodeCache=[];module.exports=function(a,b){if(a===b){return 0}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen}if(bLen===0){return aLen}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(iret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2}}return ret}},{}],308:[function(require,module,exports){var leftPad=require("left-pad");function get(options,key,defaultValue){return key in options?options[key]:defaultValue}function lineNumbers(code,options){var getOption=get.bind(null,options||{});var transform=getOption("transform",Function.prototype);var padding=getOption("padding"," ");var before=getOption("before"," ");var after=getOption("after"," | ");var start=getOption("start",1);var isArray=Array.isArray(code);var lines=isArray?code:code.split("\n");var end=start+lines.length-1;var width=String(end).length;var numbered=lines.map(function(line,index){var number=start+index;var params={before:before,number:number,width:width,after:after,line:line};transform(params);return params.before+leftPad(params.number,width,padding)+params.after+params.line});return isArray?numbered:numbered.join("\n")}module.exports=lineNumbers},{"left-pad":309}],309:[function(require,module,exports){module.exports=leftpad;function leftpad(str,len,ch){str=String(str);var i=-1;ch||(ch=" ");len=len-str.length;while(++i-1){splice.call(array,fromIndex,1)}}return array}module.exports=pull},{"../internal/baseIndexOf":345}],314:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseUniq=require("../internal/baseUniq"),isIterateeCall=require("../internal/isIterateeCall"),sortedUniq=require("../internal/sortedUniq");function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(isSorted!=null&&typeof isSorted!="boolean"){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?null:isSorted;isSorted=false}iteratee=iteratee==null?iteratee:baseCallback(iteratee,thisArg,3);return isSorted?sortedUniq(array,iteratee):baseUniq(array,iteratee)}module.exports=uniq},{"../internal/baseCallback":333,"../internal/baseUniq":360,"../internal/isIterateeCall":382,"../internal/sortedUniq":388}],315:[function(require,module,exports){module.exports=require("./includes")},{"./includes":319}],316:[function(require,module,exports){module.exports=require("./forEach")},{"./forEach":317}],317:[function(require,module,exports){var arrayEach=require("../internal/arrayEach"),baseEach=require("../internal/baseEach"),createForEach=require("../internal/createForEach");var forEach=createForEach(arrayEach,baseEach);module.exports=forEach},{"../internal/arrayEach":327,"../internal/baseEach":337,"../internal/createForEach":372}],318:[function(require,module,exports){var createAggregator=require("../internal/createAggregator");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value)}else{result[key]=[value]}});module.exports=groupBy},{"../internal/createAggregator":367}],319:[function(require,module,exports){var baseIndexOf=require("../internal/baseIndexOf"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength"),isString=require("../lang/isString"),values=require("../object/values");var nativeMax=Math.max;function includes(collection,target,fromIndex,guard){var length=collection?collection.length:0;if(!isLength(length)){collection=values(collection);length=collection.length}if(!length){return false}if(typeof fromIndex!="number"||guard&&isIterateeCall(target,fromIndex,guard)){fromIndex=0}else{fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex-1:baseIndexOf(collection,target,fromIndex)>-1}module.exports=includes},{"../internal/baseIndexOf":345,"../internal/isIterateeCall":382,"../internal/isLength":383,"../lang/isArray":392,"../lang/isString":401,"../object/values":411}],320:[function(require,module,exports){var arrayMap=require("../internal/arrayMap"),baseCallback=require("../internal/baseCallback"),baseMap=require("../internal/baseMap"),isArray=require("../lang/isArray");function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=baseCallback(iteratee,thisArg,3);return func(collection,iteratee)}module.exports=map},{"../internal/arrayMap":328,"../internal/baseCallback":333,"../internal/baseMap":350,"../lang/isArray":392}],321:[function(require,module,exports){var arrayReduceRight=require("../internal/arrayReduceRight"),baseEachRight=require("../internal/baseEachRight"),createReduce=require("../internal/createReduce");var reduceRight=createReduce(arrayReduceRight,baseEachRight);module.exports=reduceRight},{"../internal/arrayReduceRight":329,"../internal/baseEachRight":338,"../internal/createReduce":373}],322:[function(require,module,exports){var arraySome=require("../internal/arraySome"),baseCallback=require("../internal/baseCallback"),baseSome=require("../internal/baseSome"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall");function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=null}if(typeof predicate!="function"||typeof thisArg!="undefined"){predicate=baseCallback(predicate,thisArg,3)}return func(collection,predicate)}module.exports=some},{"../internal/arraySome":330,"../internal/baseCallback":333,"../internal/baseSome":357,"../internal/isIterateeCall":382,"../lang/isArray":392}],323:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseEach=require("../internal/baseEach"),baseSortBy=require("../internal/baseSortBy"),compareAscending=require("../internal/compareAscending"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength");function sortBy(collection,iteratee,thisArg){if(collection==null){return[]}var index=-1,length=collection.length,result=isLength(length)?Array(length):[];if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=null}iteratee=baseCallback(iteratee,thisArg,3);baseEach(collection,function(value,key,collection){result[++index]={criteria:iteratee(value,key,collection),index:index,value:value}});return baseSortBy(result,compareAscending)}module.exports=sortBy},{"../internal/baseCallback":333,"../internal/baseEach":337,"../internal/baseSortBy":358,"../internal/compareAscending":366,"../internal/isIterateeCall":382,"../internal/isLength":383}],324:[function(require,module,exports){var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max;function restParam(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=nativeMax(typeof start=="undefined"?func.length-1:+start||0,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);while(++indexother||!valIsReflexive||typeof value=="undefined"&&othIsReflexive){return 1}if(value=200,seen=isLarge?createCache():null,result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index3&&typeof customizer=="function"){customizer=bindCallback(customizer,thisArg,5);length-=2}else{customizer=length>2&&typeof thisArg=="function"?thisArg:null;length-=customizer?1:0}if(guard&&isIterateeCall(args[1],args[2],guard)){customizer=length==3?null:customizer;length=2}var index=0;while(++indexarrLength)){return false}while(result&&++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}module.exports=isLength},{}],384:[function(require,module,exports){function isObjectLike(value){return!!value&&typeof value=="object"}module.exports=isObjectLike},{}],385:[function(require,module,exports){var isObject=require("../lang/isObject");function isStrictComparable(value){return value===value&&(value===0?1/value>0:!isObject(value))}module.exports=isStrictComparable},{"../lang/isObject":398}],386:[function(require,module,exports){var baseForIn=require("./baseForIn"),isObjectLike=require("./isObjectLike");var objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;function shimIsPlainObject(value){var Ctor;if(!(isObjectLike(value)&&objToString.call(value)==objectTag)||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;baseForIn(value,function(subValue,key){result=key});return typeof result=="undefined"||hasOwnProperty.call(value,result)}module.exports=shimIsPlainObject},{"./baseForIn":341,"./isObjectLike":384}],387:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isIndex=require("./isIndex"),isLength=require("./isLength"),keysIn=require("../object/keysIn"),support=require("../support");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length;var allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object));var index=-1,result=[];while(++index0;while(++index=0;i--){filename=f[i];if(filename)break}for(var i=0,l=set.length;i>> no match, partial?",file,fr,pattern,pr);if(fr===fl)return true}return false}var hit;if(typeof p==="string"){if(options.nocase){hit=f.toLowerCase()===p.toLowerCase()}else{hit=f===p}this.debug("string match",p,f,hit)}else{hit=f.match(p);this.debug("pattern match",p,f,hit)}if(!hit)return false}if(fi===fl&&pi===pl){return true}else if(fi===fl){return partial}else if(pi===pl){var emptyFileEnd=fi===fl-1&&file[fi]==="";return emptyFileEnd}throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}}).call(this,require("_process"))},{_process:183,"brace-expansion":417}],417:[function(require,module,exports){var concatMap=require("concat-map");var balanced=require("balanced-match");module.exports=expandTop;var escSlash="\x00SLASH"+Math.random()+"\x00";var escOpen="\x00OPEN"+Math.random()+"\x00";var escClose="\x00CLOSE"+Math.random()+"\x00";var escComma="\x00COMMA"+Math.random()+"\x00";var escPeriod="\x00PERIOD"+Math.random()+"\x00";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[];var m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre;var body=m.body;var post=m.post;var p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);if(post.length){p[p.length-1]+=postParts.shift();p.push.apply(p,postParts)}parts.push.apply(parts,p);return parts}function expandTop(str){if(!str)return[];return expand(escapeBraces(str),true).map(unescapeBraces)}function identity(e){return e}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,isTop){var expansions=[];var m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);var isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);var isSequence=isNumericSequence||isAlphaSequence;var isOptions=/^(.*,)+(.+)?$/.test(m.body);if(!isSequence&&!isOptions){if(m.post.match(/,.*}/)){str=m.pre+"{"+m.body+escClose+m.post;return expand(str)}return[str]}var n;if(isSequence){n=m.body.split(/\.\./)}else{n=parseCommaParts(m.body);if(n.length===1){n=expand(n[0],false).map(embrace);if(n.length===1){var post=m.post.length?expand(m.post,false):[""];return post.map(function(p){return m.pre+n[0]+p})}}}var pre=m.pre;var post=m.post.length?expand(m.post,false):[""];var N;if(isSequence){var x=numeric(n[0]);var y=numeric(n[1]);var width=Math.max(n[0].length,n[1].length);var incr=n.length==3?Math.abs(numeric(n[2])):1;var test=lte;var reverse=y0){var z=new Array(need+1).join("0");if(i<0)c="-"+z+c.slice(1);else c=z+c}}}N.push(c)}}else{N=concatMap(n,function(el){return expand(el,false)})}for(var j=0;j1?str.substring(m.start+a.length,m.end):"";m.post=str.slice(m.end+b.length);return m}}}if(bal&&ended){var start=m.start+a.length;m=balanced(a,b,str.substr(start));if(m){m.start+=start;m.end+=start;m.pre=str.slice(0,start)+m.pre}return m}}},{}],419:[function(require,module,exports){module.exports=function(xs,fn){var res=[];for(var i=0;idst){names[dst]=names[src]}++dst}}names.length=dst;return names};function defaultCreatorFn(object){return create(null)}function makeAccessor(secretCreatorFn){var brand=makeUniqueKey();var passkey=create(null);secretCreatorFn=secretCreatorFn||defaultCreatorFn;function register(object){var secret;function vault(key,forget){if(key===passkey){return forget?secret=null:secret||(secret=secretCreatorFn(object))}}defProp(object,brand,vault)}function accessor(object){if(!hasOwn.call(object,brand))register(object);return object[brand](passkey)}accessor.forget=function(object){if(hasOwn.call(object,brand))object[brand](passkey,true)};return accessor}defProp(exports,"makeAccessor",makeAccessor)},{}],422:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var isArray=types.builtInTypes.array;var b=types.builders;var n=types.namedTypes;var leap=require("./leap");var meta=require("./meta");var util=require("./util");var hasOwn=Object.prototype.hasOwnProperty;function Emitter(contextId){assert.ok(this instanceof Emitter);n.Identifier.assert(contextId);Object.defineProperties(this,{contextId:{value:contextId},listing:{value:[]},marked:{value:[true]},finalLoc:{value:loc()},tryEntries:{value:[]}});Object.defineProperties(this,{leapManager:{value:new leap.LeapManager(this)}})}var Ep=Emitter.prototype;exports.Emitter=Emitter;function loc(){return b.literal(-1)}Ep.mark=function(loc){n.Literal.assert(loc);var index=this.listing.length;if(loc.value===-1){loc.value=index}else{assert.strictEqual(loc.value,index)}this.marked[index]=true;return loc};Ep.emit=function(node){if(n.Expression.check(node))node=b.expressionStatement(node);n.Statement.assert(node);this.listing.push(node)};Ep.emitAssign=function(lhs,rhs){this.emit(this.assign(lhs,rhs));return lhs};Ep.assign=function(lhs,rhs){return b.expressionStatement(b.assignmentExpression("=",lhs,rhs))};Ep.contextProperty=function(name,computed){return b.memberExpression(this.contextId,computed?b.literal(name):b.identifier(name),!!computed)};var volatileContextPropertyNames={prev:true,next:true,sent:true,rval:true};Ep.isVolatileContextProperty=function(expr){if(n.MemberExpression.check(expr)){if(expr.computed){return true}if(n.Identifier.check(expr.object)&&n.Identifier.check(expr.property)&&expr.object.name===this.contextId.name&&hasOwn.call(volatileContextPropertyNames,expr.property.name)){return true}}return false};Ep.stop=function(rval){if(rval){this.setReturnValue(rval)}this.jump(this.finalLoc)};Ep.setReturnValue=function(valuePath){n.Expression.assert(valuePath.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(valuePath))};Ep.clearPendingException=function(tryLoc,assignee){n.Literal.assert(tryLoc);var catchCall=b.callExpression(this.contextProperty("catch",true),[tryLoc]);if(assignee){this.emitAssign(assignee,catchCall)}else{this.emit(catchCall)}};Ep.jump=function(toLoc){this.emitAssign(this.contextProperty("next"),toLoc);this.emit(b.breakStatement())};Ep.jumpIf=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);this.emit(b.ifStatement(test,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};Ep.jumpIfNot=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);var negatedTest;if(n.UnaryExpression.check(test)&&test.operator==="!"){negatedTest=test.argument}else{negatedTest=b.unaryExpression("!",test)}this.emit(b.ifStatement(negatedTest,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};var nextTempId=0;Ep.makeTempVar=function(){return this.contextProperty("t"+nextTempId++)};Ep.getContextFunction=function(id){var func=b.functionExpression(id||null,[this.contextId],b.blockStatement([this.getDispatchLoop()]),false,false);func._aliasFunction=true;return func};Ep.getDispatchLoop=function(){var self=this;var cases=[];var current;var alreadyEnded=false;self.listing.forEach(function(stmt,i){if(self.marked.hasOwnProperty(i)){cases.push(b.switchCase(b.literal(i),current=[]));alreadyEnded=false}if(!alreadyEnded){current.push(stmt);if(isSwitchCaseEnder(stmt))alreadyEnded=true}});this.finalLoc.value=this.listing.length;cases.push(b.switchCase(this.finalLoc,[]),b.switchCase(b.literal("end"),[b.returnStatement(b.callExpression(this.contextProperty("stop"),[]))]));return b.whileStatement(b.literal(1),b.switchStatement(b.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),cases))};function isSwitchCaseEnder(stmt){return n.BreakStatement.check(stmt)||n.ContinueStatement.check(stmt)||n.ReturnStatement.check(stmt)||n.ThrowStatement.check(stmt)}Ep.getTryLocsList=function(){if(this.tryEntries.length===0){return null}var lastLocValue=0;return b.arrayExpression(this.tryEntries.map(function(tryEntry){var thisLocValue=tryEntry.firstLoc.value;assert.ok(thisLocValue>=lastLocValue,"try entries out of order");lastLocValue=thisLocValue;var ce=tryEntry.catchEntry;var fe=tryEntry.finallyEntry;var locs=[tryEntry.firstLoc,ce?ce.firstLoc:null];if(fe){locs[2]=fe.firstLoc;locs[3]=fe.afterLoc}return b.arrayExpression(locs)}))};Ep.explode=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var node=path.value;var self=this;n.Node.assert(node);if(n.Statement.check(node))return self.explodeStatement(path);if(n.Expression.check(node))return self.explodeExpression(path,ignoreResult);if(n.Declaration.check(node))throw getDeclError(node);switch(node.type){case"Program":return path.get("body").map(self.explodeStatement,self);case"VariableDeclarator":throw getDeclError(node);case"Property":case"SwitchCase":case"CatchClause":throw new Error(node.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(node.type))}};function getDeclError(node){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+JSON.stringify(node))}Ep.explodeStatement=function(path,labelId){assert.ok(path instanceof types.NodePath);var stmt=path.value;var self=this;n.Statement.assert(stmt);if(labelId){n.Identifier.assert(labelId)}else{labelId=null}if(n.BlockStatement.check(stmt)){return path.get("body").each(self.explodeStatement,self)}if(!meta.containsLeap(stmt)){self.emit(stmt);return}switch(stmt.type){case"ExpressionStatement":self.explodeExpression(path.get("expression"),true);break;case"LabeledStatement":var after=loc();self.leapManager.withEntry(new leap.LabeledEntry(after,stmt.label),function(){self.explodeStatement(path.get("body"),stmt.label)});self.mark(after);break;case"WhileStatement":var before=loc();var after=loc();self.mark(before);self.jumpIfNot(self.explodeExpression(path.get("test")),after);self.leapManager.withEntry(new leap.LoopEntry(after,before,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(before);self.mark(after);break;case"DoWhileStatement":var first=loc();var test=loc();var after=loc();self.mark(first);self.leapManager.withEntry(new leap.LoopEntry(after,test,labelId),function(){self.explode(path.get("body"))});self.mark(test);self.jumpIf(self.explodeExpression(path.get("test")),first);self.mark(after);break;case"ForStatement":var head=loc();var update=loc();var after=loc();if(stmt.init){self.explode(path.get("init"),true)}self.mark(head);if(stmt.test){self.jumpIfNot(self.explodeExpression(path.get("test")),after)}else{}self.leapManager.withEntry(new leap.LoopEntry(after,update,labelId),function(){self.explodeStatement(path.get("body"))});self.mark(update);if(stmt.update){self.explode(path.get("update"),true)}self.jump(head);self.mark(after);break;case"ForInStatement":n.Identifier.assert(stmt.left);var head=loc();var after=loc();var keyIterNextFn=self.makeTempVar();self.emitAssign(keyIterNextFn,b.callExpression(util.runtimeProperty("keys"),[self.explodeExpression(path.get("right"))]));self.mark(head);var keyInfoTmpVar=self.makeTempVar();self.jumpIf(b.memberExpression(b.assignmentExpression("=",keyInfoTmpVar,b.callExpression(keyIterNextFn,[])),b.identifier("done"),false),after);self.emitAssign(stmt.left,b.memberExpression(keyInfoTmpVar,b.identifier("value"),false));self.leapManager.withEntry(new leap.LoopEntry(after,head,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(head);self.mark(after);break;case"BreakStatement":self.emitAbruptCompletion({type:"break",target:self.leapManager.getBreakLoc(stmt.label)});break;case"ContinueStatement":self.emitAbruptCompletion({type:"continue",target:self.leapManager.getContinueLoc(stmt.label)});break;case"SwitchStatement":var disc=self.emitAssign(self.makeTempVar(),self.explodeExpression(path.get("discriminant")));var after=loc();var defaultLoc=loc();var condition=defaultLoc;var caseLocs=[];var cases=stmt.cases||[];for(var i=cases.length-1;i>=0;--i){var c=cases[i];n.SwitchCase.assert(c);if(c.test){condition=b.conditionalExpression(b.binaryExpression("===",disc,c.test),caseLocs[i]=loc(),condition)}else{caseLocs[i]=defaultLoc}}self.jump(self.explodeExpression(new types.NodePath(condition,path,"discriminant")));self.leapManager.withEntry(new leap.SwitchEntry(after),function(){path.get("cases").each(function(casePath){var c=casePath.value;var i=casePath.name;self.mark(caseLocs[i]);casePath.get("consequent").each(self.explodeStatement,self)})});self.mark(after);if(defaultLoc.value===-1){self.mark(defaultLoc);assert.strictEqual(after.value,defaultLoc.value)}break;case"IfStatement":var elseLoc=stmt.alternate&&loc();var after=loc();self.jumpIfNot(self.explodeExpression(path.get("test")),elseLoc||after);self.explodeStatement(path.get("consequent"));if(elseLoc){self.jump(after);self.mark(elseLoc);self.explodeStatement(path.get("alternate"))}self.mark(after);break;case"ReturnStatement":self.emitAbruptCompletion({type:"return",value:self.explodeExpression(path.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var after=loc();var handler=stmt.handler;if(!handler&&stmt.handlers){handler=stmt.handlers[0]||null}var catchLoc=handler&&loc();var catchEntry=catchLoc&&new leap.CatchEntry(catchLoc,handler.param);var finallyLoc=stmt.finalizer&&loc();var finallyEntry=finallyLoc&&new leap.FinallyEntry(finallyLoc,after);var tryEntry=new leap.TryEntry(self.getUnmarkedCurrentLoc(),catchEntry,finallyEntry);self.tryEntries.push(tryEntry);self.updateContextPrevLoc(tryEntry.firstLoc);self.leapManager.withEntry(tryEntry,function(){self.explodeStatement(path.get("block"));if(catchLoc){if(finallyLoc){self.jump(finallyLoc)}else{self.jump(after)}self.updateContextPrevLoc(self.mark(catchLoc));var bodyPath=path.get("handler","body");var safeParam=self.makeTempVar();self.clearPendingException(tryEntry.firstLoc,safeParam);var catchScope=bodyPath.scope;var catchParamName=handler.param.name;n.CatchClause.assert(catchScope.node);assert.strictEqual(catchScope.lookup(catchParamName),catchScope);types.visit(bodyPath,{visitIdentifier:function(path){if(util.isReference(path,catchParamName)&&path.scope.lookup(catchParamName)===catchScope){return safeParam}this.traverse(path)},visitFunction:function(path){if(path.scope.declares(catchParamName)){return false}this.traverse(path)}});self.leapManager.withEntry(catchEntry,function(){self.explodeStatement(bodyPath)})}if(finallyLoc){self.updateContextPrevLoc(self.mark(finallyLoc));self.leapManager.withEntry(finallyEntry,function(){self.explodeStatement(path.get("finalizer"))});self.emit(b.returnStatement(b.callExpression(self.contextProperty("finish"),[finallyEntry.firstLoc])))}});self.mark(after);break;case"ThrowStatement":self.emit(b.throwStatement(self.explodeExpression(path.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(stmt.type))}};Ep.emitAbruptCompletion=function(record){if(!isValidCompletion(record)){assert.ok(false,"invalid completion record: "+JSON.stringify(record))}assert.notStrictEqual(record.type,"normal","normal completions are not abrupt");var abruptArgs=[b.literal(record.type)];if(record.type==="break"||record.type==="continue"){n.Literal.assert(record.target);abruptArgs[1]=record.target}else if(record.type==="return"||record.type==="throw"){if(record.value){n.Expression.assert(record.value);abruptArgs[1]=record.value}}this.emit(b.returnStatement(b.callExpression(this.contextProperty("abrupt"),abruptArgs)))};function isValidCompletion(record){var type=record.type;if(type==="normal"){return!hasOwn.call(record,"target")}if(type==="break"||type==="continue"){return!hasOwn.call(record,"value")&&n.Literal.check(record.target)}if(type==="return"||type==="throw"){return hasOwn.call(record,"value")&&!hasOwn.call(record,"target")}return false}Ep.getUnmarkedCurrentLoc=function(){return b.literal(this.listing.length)};Ep.updateContextPrevLoc=function(loc){if(loc){n.Literal.assert(loc);if(loc.value===-1){loc.value=this.listing.length}else{assert.strictEqual(loc.value,this.listing.length)}}else{loc=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),loc)};Ep.explodeExpression=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var expr=path.value;if(expr){n.Expression.assert(expr)}else{return expr}var self=this;var result;function finish(expr){n.Expression.assert(expr);if(ignoreResult){self.emit(expr)}else{return expr}}if(!meta.containsLeap(expr)){return finish(expr)}var hasLeapingChildren=meta.containsLeap.onlyChildren(expr);function explodeViaTempVar(tempVar,childPath,ignoreChildResult){assert.ok(childPath instanceof types.NodePath);assert.ok(!ignoreChildResult||!tempVar,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var result=self.explodeExpression(childPath,ignoreChildResult);if(ignoreChildResult){}else if(tempVar||hasLeapingChildren&&(self.isVolatileContextProperty(result)||meta.hasSideEffects(result))){result=self.emitAssign(tempVar||self.makeTempVar(),result)}return result}switch(expr.type){case"MemberExpression":return finish(b.memberExpression(self.explodeExpression(path.get("object")),expr.computed?explodeViaTempVar(null,path.get("property")):expr.property,expr.computed));case"CallExpression":var oldCalleePath=path.get("callee");var newCallee=self.explodeExpression(oldCalleePath);if(!n.MemberExpression.check(oldCalleePath.node)&&n.MemberExpression.check(newCallee)){newCallee=b.sequenceExpression([b.literal(0),newCallee])}return finish(b.callExpression(newCallee,path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"NewExpression":return finish(b.newExpression(explodeViaTempVar(null,path.get("callee")),path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"ObjectExpression":return finish(b.objectExpression(path.get("properties").map(function(propPath){return b.property(propPath.value.kind,propPath.value.key,explodeViaTempVar(null,propPath.get("value")))})));case"ArrayExpression":return finish(b.arrayExpression(path.get("elements").map(function(elemPath){return explodeViaTempVar(null,elemPath)})));case"SequenceExpression":var lastIndex=expr.expressions.length-1;path.get("expressions").each(function(exprPath){if(exprPath.name===lastIndex){result=self.explodeExpression(exprPath,ignoreResult)}else{self.explodeExpression(exprPath,true)}});return result;case"LogicalExpression":var after=loc();if(!ignoreResult){result=self.makeTempVar()}var left=explodeViaTempVar(result,path.get("left"));if(expr.operator==="&&"){self.jumpIfNot(left,after)}else{assert.strictEqual(expr.operator,"||");self.jumpIf(left,after)}explodeViaTempVar(result,path.get("right"),ignoreResult);self.mark(after);return result;case"ConditionalExpression":var elseLoc=loc();var after=loc();var test=self.explodeExpression(path.get("test"));self.jumpIfNot(test,elseLoc);if(!ignoreResult){result=self.makeTempVar()}explodeViaTempVar(result,path.get("consequent"),ignoreResult);self.jump(after);self.mark(elseLoc);explodeViaTempVar(result,path.get("alternate"),ignoreResult);self.mark(after);return result;case"UnaryExpression":return finish(b.unaryExpression(expr.operator,self.explodeExpression(path.get("argument")),!!expr.prefix));case"BinaryExpression":return finish(b.binaryExpression(expr.operator,explodeViaTempVar(null,path.get("left")),explodeViaTempVar(null,path.get("right"))));case"AssignmentExpression":return finish(b.assignmentExpression(expr.operator,self.explodeExpression(path.get("left")),self.explodeExpression(path.get("right"))));case"UpdateExpression":return finish(b.updateExpression(expr.operator,self.explodeExpression(path.get("argument")),expr.prefix));case"YieldExpression":var after=loc();var arg=expr.argument&&self.explodeExpression(path.get("argument"));if(arg&&expr.delegate){var result=self.makeTempVar();self.emit(b.returnStatement(b.callExpression(self.contextProperty("delegateYield"),[arg,b.literal(result.property.name),after])));self.mark(after);return result}self.emitAssign(self.contextProperty("next"),after);self.emit(b.returnStatement(arg||null));self.mark(after);return self.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(expr.type))}}},{"./leap":424,"./meta":425,"./util":426,assert:173,"ast-types":171}],423:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.hoist=function(funPath){assert.ok(funPath instanceof types.NodePath);n.Function.assert(funPath.value);var vars={};function varDeclToExpr(vdec,includeIdentifiers){n.VariableDeclaration.assert(vdec);var exprs=[];vdec.declarations.forEach(function(dec){vars[dec.id.name]=dec.id;if(dec.init){exprs.push(b.assignmentExpression("=",dec.id,dec.init))}else if(includeIdentifiers){exprs.push(dec.id)}});if(exprs.length===0)return null;if(exprs.length===1)return exprs[0]; + +return b.sequenceExpression(exprs)}types.visit(funPath.get("body"),{visitVariableDeclaration:function(path){var expr=varDeclToExpr(path.value,false);if(expr===null){path.replace()}else{return b.expressionStatement(expr)}return false},visitForStatement:function(path){var init=path.value.init;if(n.VariableDeclaration.check(init)){path.get("init").replace(varDeclToExpr(init,false))}this.traverse(path)},visitForInStatement:function(path){var left=path.value.left;if(n.VariableDeclaration.check(left)){path.get("left").replace(varDeclToExpr(left,true))}this.traverse(path)},visitFunctionDeclaration:function(path){var node=path.value;vars[node.id.name]=node.id;var parentNode=path.parent.node;var assignment=b.expressionStatement(b.assignmentExpression("=",node.id,b.functionExpression(node.id,node.params,node.body,node.generator,node.expression)));if(n.BlockStatement.check(path.parent.node)){path.parent.get("body").unshift(assignment);path.replace()}else{path.replace(assignment)}return false},visitFunctionExpression:function(path){return false}});var paramNames={};funPath.get("params").each(function(paramPath){var param=paramPath.value;if(n.Identifier.check(param)){paramNames[param.name]=param}else{}});var declarations=[];Object.keys(vars).forEach(function(name){if(!hasOwn.call(paramNames,name)){declarations.push(b.variableDeclarator(vars[name],null))}});if(declarations.length===0){return null}return b.variableDeclaration("var",declarations)}},{assert:173,"ast-types":171}],424:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var inherits=require("util").inherits;var hasOwn=Object.prototype.hasOwnProperty;function Entry(){assert.ok(this instanceof Entry)}function FunctionEntry(returnLoc){Entry.call(this);n.Literal.assert(returnLoc);this.returnLoc=returnLoc}inherits(FunctionEntry,Entry);exports.FunctionEntry=FunctionEntry;function LoopEntry(breakLoc,continueLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Literal.assert(continueLoc);if(label){n.Identifier.assert(label)}else{label=null}this.breakLoc=breakLoc;this.continueLoc=continueLoc;this.label=label}inherits(LoopEntry,Entry);exports.LoopEntry=LoopEntry;function SwitchEntry(breakLoc){Entry.call(this);n.Literal.assert(breakLoc);this.breakLoc=breakLoc}inherits(SwitchEntry,Entry);exports.SwitchEntry=SwitchEntry;function TryEntry(firstLoc,catchEntry,finallyEntry){Entry.call(this);n.Literal.assert(firstLoc);if(catchEntry){assert.ok(catchEntry instanceof CatchEntry)}else{catchEntry=null}if(finallyEntry){assert.ok(finallyEntry instanceof FinallyEntry)}else{finallyEntry=null}assert.ok(catchEntry||finallyEntry);this.firstLoc=firstLoc;this.catchEntry=catchEntry;this.finallyEntry=finallyEntry}inherits(TryEntry,Entry);exports.TryEntry=TryEntry;function CatchEntry(firstLoc,paramId){Entry.call(this);n.Literal.assert(firstLoc);n.Identifier.assert(paramId);this.firstLoc=firstLoc;this.paramId=paramId}inherits(CatchEntry,Entry);exports.CatchEntry=CatchEntry;function FinallyEntry(firstLoc,afterLoc){Entry.call(this);n.Literal.assert(firstLoc);n.Literal.assert(afterLoc);this.firstLoc=firstLoc;this.afterLoc=afterLoc}inherits(FinallyEntry,Entry);exports.FinallyEntry=FinallyEntry;function LabeledEntry(breakLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Identifier.assert(label);this.breakLoc=breakLoc;this.label=label}inherits(LabeledEntry,Entry);exports.LabeledEntry=LabeledEntry;function LeapManager(emitter){assert.ok(this instanceof LeapManager);var Emitter=require("./emit").Emitter;assert.ok(emitter instanceof Emitter);this.emitter=emitter;this.entryStack=[new FunctionEntry(emitter.finalLoc)]}var LMp=LeapManager.prototype;exports.LeapManager=LeapManager;LMp.withEntry=function(entry,callback){assert.ok(entry instanceof Entry);this.entryStack.push(entry);try{callback.call(this.emitter)}finally{var popped=this.entryStack.pop();assert.strictEqual(popped,entry)}};LMp._findLeapLocation=function(property,label){for(var i=this.entryStack.length-1;i>=0;--i){var entry=this.entryStack[i];var loc=entry[property];if(loc){if(label){if(entry.label&&entry.label.name===label.name){return loc}}else if(entry instanceof LabeledEntry){}else{return loc}}}return null};LMp.getBreakLoc=function(label){return this._findLeapLocation("breakLoc",label)};LMp.getContinueLoc=function(label){return this._findLeapLocation("continueLoc",label)}},{"./emit":422,assert:173,"ast-types":171,util:199}],425:[function(require,module,exports){var assert=require("assert");var m=require("private").makeAccessor();var types=require("ast-types");var isArray=types.builtInTypes.array;var n=types.namedTypes;var hasOwn=Object.prototype.hasOwnProperty;function makePredicate(propertyName,knownTypes){function onlyChildren(node){n.Node.assert(node);var result=false;function check(child){if(result){}else if(isArray.check(child)){child.some(check)}else if(n.Node.check(child)){assert.strictEqual(result,false);result=predicate(child)}return result}types.eachField(node,function(name,child){check(child)});return result}function predicate(node){n.Node.assert(node);var meta=m(node);if(hasOwn.call(meta,propertyName))return meta[propertyName];if(hasOwn.call(opaqueTypes,node.type))return meta[propertyName]=false;if(hasOwn.call(knownTypes,node.type))return meta[propertyName]=true;return meta[propertyName]=onlyChildren(node)}predicate.onlyChildren=onlyChildren;return predicate}var opaqueTypes={FunctionExpression:true};var sideEffectTypes={CallExpression:true,ForInStatement:true,UnaryExpression:true,BinaryExpression:true,AssignmentExpression:true,UpdateExpression:true,NewExpression:true};var leapTypes={YieldExpression:true,BreakStatement:true,ContinueStatement:true,ReturnStatement:true,ThrowStatement:true};for(var type in leapTypes){if(hasOwn.call(leapTypes,type)){sideEffectTypes[type]=leapTypes[type]}}exports.hasSideEffects=makePredicate("hasSideEffects",sideEffectTypes);exports.containsLeap=makePredicate("containsLeap",leapTypes)},{assert:173,"ast-types":171,"private":421}],426:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.defaults=function(obj){var len=arguments.length;var extension;for(var i=1;i0){outerBody.push(vars)}var wrapArgs=[emitter.getContextFunction(innerFnId),shouldTransformAsync?b.literal(null):outerFnId,b.thisExpression()];var tryLocsList=emitter.getTryLocsList();if(tryLocsList){wrapArgs.push(tryLocsList)}var wrapCall=b.callExpression(shouldTransformAsync?runtimeProperty("async"):runtimeProperty("wrap"),wrapArgs);outerBody.push(b.returnStatement(wrapCall));node.body=b.blockStatement(outerBody);node.body._declarations=bodyBlock._declarations;if(shouldTransformAsync){node.async=false;return}if(n.FunctionDeclaration.check(node)){var pp=path.parent;while(pp&&!(n.BlockStatement.check(pp.value)||n.Program.check(pp.value))){pp=pp.parent}if(!pp){return}path.replace();node.type="FunctionExpression";var varDecl=b.variableDeclaration("var",[b.variableDeclarator(node.id,b.callExpression(runtimeProperty("mark"),[node]))]);if(node.comments){varDecl.leadingComments=node.leadingComments;varDecl.trailingComments=node.trailingComments;node.leadingComments=null;node.trailingComments=null}varDecl._blockHoist=3;var bodyPath=pp.get("body");var bodyLen=bodyPath.value.length;bodyPath.push(varDecl)}else{n.FunctionExpression.assert(node);return b.callExpression(runtimeProperty("mark"),[node])}}});function shouldNotHoistAbove(stmtPath){var value=stmtPath.value;n.Statement.assert(value);if(n.ExpressionStatement.check(value)&&n.Literal.check(value.expression)&&value.expression.value==="use strict"){return true}if(n.VariableDeclaration.check(value)){for(var i=0;i=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc){return this.complete(entry.completion,entry.afterLoc)}}},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}(typeof global==="object"?global:typeof window==="object"?window:this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],431:[function(require,module,exports){var regenerate=require("regenerate");exports.REGULAR={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,65535),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)};exports.UNICODE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)};exports.UNICODE_IGNORE_CASE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},{regenerate:433}],432:[function(require,module,exports){module.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}},{}],433:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports;var freeModule=typeof module=="object"&&module&&module.exports==freeExports&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal){root=freeGlobal}var ERRORS={rangeOrder:"A range’s `stop` value must be greater than or equal "+"to the `start` value.",codePointRange:"Invalid code point value. Code points range from "+"U+000000 to U+10FFFF."};var HIGH_SURROGATE_MIN=55296;var HIGH_SURROGATE_MAX=56319;var LOW_SURROGATE_MIN=56320;var LOW_SURROGATE_MAX=57343;var regexNull=/\\x00([^0123456789]|$)/g;var object={};var hasOwnProperty=object.hasOwnProperty;var extend=function(destination,source){var key;for(key in source){if(hasOwnProperty.call(source,key)){destination[key]=source[key]}}return destination};var forEach=function(array,callback){var index=-1;var length=array.length;while(++index=start&&codePointrangeEnd){return data}if(rangeStart<=start&&rangeEnd>=end){data.splice(index,2);continue}if(rangeStart>=start&&rangeEnd=start&&rangeStart<=end){data[index+1]=rangeStart}else if(rangeEnd>=start&&rangeEnd<=end){data[index]=rangeEnd+1;return data}index+=2}return data};var dataAdd=function(data,codePoint){var index=0;var start;var end;var lastIndex=null;var length=data.length;if(codePoint<0||codePoint>1114111){throw RangeError(ERRORS.codePointRange)}while(index=start&&codePointcodePoint){data.splice(lastIndex!=null?lastIndex+2:0,0,codePoint,codePoint+1);return data}if(codePoint==end){if(codePoint+1==data[index+2]){data.splice(index,4,start,data[index+3]);return data}data[index+1]=codePoint+1;return data}lastIndex=index;index+=2}data.push(codePoint,codePoint+1);return data};var dataAddData=function(dataA,dataB){var index=0;var start;var end;var data=dataA.slice();var length=dataB.length;while(index1114111||rangeEnd<0||rangeEnd>1114111){throw RangeError(ERRORS.codePointRange)}var index=0;var start;var end;var added=false;var length=data.length;while(indexrangeEnd){return data}if(start>=rangeStart&&start<=rangeEnd){if(end>rangeStart&&end-1<=rangeEnd){data.splice(index,2);index-=2}else{data.splice(index-1,2);index-=2}}}else if(start==rangeEnd+1){data[index]=rangeStart;return data}else if(start>rangeEnd){data.splice(index,0,rangeStart,rangeEnd+1);return data}else if(rangeStart>=start&&rangeStart=start&&rangeStart=end){data[index]=rangeStart;data[index+1]=rangeEnd+1;added=true}index+=2}if(!added){data.push(rangeStart,rangeEnd+1)}return data};var dataContains=function(data,codePoint){var index=0;var length=data.length;var start=data[index];var end=data[length-1];if(length>=2){if(codePointend){return false}}while(index=start&&codePoint=40&&codePoint<=43||codePoint==45||codePoint==46||codePoint==63||codePoint>=91&&codePoint<=94||codePoint>=123&&codePoint<=125){string="\\"+stringFromCharCode(codePoint)}else if(codePoint>=32&&codePoint<=126){string=stringFromCharCode(codePoint)}else if(codePoint<=255){string="\\x"+pad(hex(codePoint),2)}else{string="\\u"+pad(hex(codePoint),4)}return string};var symbolToCodePoint=function(symbol){var length=symbol.length;var first=symbol.charCodeAt(0);var second;if(first>=HIGH_SURROGATE_MIN&&first<=HIGH_SURROGATE_MAX&&length>1){second=symbol.charCodeAt(1);return(first-HIGH_SURROGATE_MIN)*1024+second-LOW_SURROGATE_MIN+65536}return first};var createBMPCharacterClasses=function(data){var result="";var index=0;var start;var end;var length=data.length;if(dataIsSingleton(data)){return codePointToString(data[0])}while(index=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=HIGH_SURROGATE_MIN&&start<=HIGH_SURROGATE_MAX){if(end>=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){loneHighSurrogates.push(start,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=LOW_SURROGATE_MIN&&start<=LOW_SURROGATE_MAX){if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneLowSurrogates.push(start,end+1)}if(end>LOW_SURROGATE_MAX){loneLowSurrogates.push(start,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>LOW_SURROGATE_MAX&&start<=65535){if(end<=65535){bmp.push(start,end+1)}else{bmp.push(start,65535+1);astral.push(65535+1,end+1)}}else{astral.push(start,end+1)}index+=2}return{loneHighSurrogates:loneHighSurrogates,loneLowSurrogates:loneLowSurrogates,bmp:bmp,astral:astral}};var optimizeSurrogateMappings=function(surrogateMappings){var result=[];var tmpLow=[];var addLow=false;var mapping;var nextMapping;var highSurrogates;var lowSurrogates;var nextHighSurrogates;var nextLowSurrogates;var index=-1;var length=surrogateMappings.length;while(++index1){value=slice.call(arguments)}if(this instanceof regenerate){this.data=[];return value?this.add(value):this}return(new regenerate).add(value)};regenerate.version="1.2.0";var proto=regenerate.prototype;extend(proto,{add:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataAddData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.add(item)});return $this}$this.data=dataAdd($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},remove:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataRemoveData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.remove(item)});return $this}$this.data=dataRemove($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},addRange:function(start,end){var $this=this;$this.data=dataAddRange($this.data,isNumber(start)?start:symbolToCodePoint(start),isNumber(end)?end:symbolToCodePoint(end));return $this},removeRange:function(start,end){var $this=this;var startCodePoint=isNumber(start)?start:symbolToCodePoint(start);var endCodePoint=isNumber(end)?end:symbolToCodePoint(end);$this.data=dataRemoveRange($this.data,startCodePoint,endCodePoint);return $this},intersection:function(argument){var $this=this;var array=argument instanceof regenerate?dataToArray(argument.data):argument;$this.data=dataIntersection($this.data,array);return $this},contains:function(codePoint){return dataContains(this.data,isNumber(codePoint)?codePoint:symbolToCodePoint(codePoint))},clone:function(){var set=new regenerate;set.data=this.data.slice(0);return set},toString:function(options){var result=createCharacterClassesFromData(this.data,options?options.bmpOnly:false);return result.replace(regexNull,"\\0$1")},toRegExp:function(flags){return RegExp(this.toString(),flags||"")},valueOf:function(){return dataToArray(this.data)}});proto.toArray=proto.valueOf;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define(function(){return regenerate})}else if(freeExports&&!freeExports.nodeType){if(freeModule){freeModule.exports=regenerate}else{freeExports.regenerate=regenerate}}else{root.regenerate=regenerate}})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],434:[function(require,module,exports){(function(global){(function(){"use strict";var objectTypes={"function":true,object:true};var root=objectTypes[typeof window]&&window||this;var oldRoot=root;var freeExports=objectTypes[typeof exports]&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal}var stringFromCharCode=String.fromCharCode;var floor=Math.floor;function fromCodePoint(){var MAX_SIZE=16384;var codeUnits=[];var highSurrogate;var lowSurrogate;var index=-1;var length=arguments.length;if(!length){return""}var result="";while(++index1114111||floor(codePoint)!=codePoint){throw RangeError("Invalid code point: "+codePoint)}if(codePoint<=65535){codeUnits.push(codePoint)}else{codePoint-=65536;highSurrogate=(codePoint>>10)+55296;lowSurrogate=codePoint%1024+56320;codeUnits.push(highSurrogate,lowSurrogate)}if(index+1==length||codeUnits.length>MAX_SIZE){result+=stringFromCharCode.apply(null,codeUnits);codeUnits.length=0}}return result}function assertType(type,expected){if(expected.indexOf("|")==-1){if(type==expected){return}throw Error("Invalid node type: "+type)}expected=assertType.hasOwnProperty(expected)?assertType[expected]:assertType[expected]=RegExp("^(?:"+expected+")$");if(expected.test(type)){return}throw Error("Invalid node type: "+type)}function generate(node){var type=node.type;if(generate.hasOwnProperty(type)&&typeof generate[type]=="function"){return generate[type](node)}throw Error("Invalid node type: "+type)}function generateAlternative(node){assertType(node.type,"alternative");var terms=node.body,length=terms?terms.length:0;if(length==1){return generateTerm(terms[0])}else{var i=-1,result="";while(++i=55296&&first<=56319){second=lookahead().charCodeAt(0);if(second>=56320&&second<=57343){pos++;return createValue("symbol",(first-55296)*1024+second-56320+65536,pos-2,pos)}}}return createValue("symbol",first,pos-1,pos)}function createDisjunction(alternatives,from,to){return addRaw({type:"disjunction",body:alternatives,range:[from,to]})}function createDot(){return addRaw({type:"dot",range:[pos-1,pos]})}function createCharacterClassEscape(value){return addRaw({type:"characterClassEscape",value:value,range:[pos-2,pos]})}function createReference(matchIndex){return addRaw({type:"reference",matchIndex:parseInt(matchIndex,10),range:[pos-1-matchIndex.length,pos]})}function createGroup(behavior,disjunction,from,to){return addRaw({type:"group",behavior:behavior,body:disjunction,range:[from,to]})}function createQuantifier(min,max,from,to){if(to==null){from=pos-1;to=pos}return addRaw({type:"quantifier",min:min,max:max,greedy:true,body:null,range:[from,to]})}function createAlternative(terms,from,to){return addRaw({type:"alternative",body:terms,range:[from,to]})}function createCharacterClass(classRanges,negative,from,to){return addRaw({type:"characterClass",body:classRanges,negative:negative,range:[from,to]})}function createClassRange(min,max,from,to){if(min.codePoint>max.codePoint){throw SyntaxError("invalid range in character class")}return addRaw({type:"characterClassRange",min:min,max:max,range:[from,to]})}function flattenBody(body){if(body.type==="alternative"){return body.body}else{return[body]}}function isEmpty(obj){return obj.type==="empty"}function incr(amount){amount=amount||1;var res=str.substring(pos,pos+amount);pos+=amount||1;return res}function skip(value){if(!match(value)){throw SyntaxError("character: "+value)}}function match(value){if(str.indexOf(value,pos)===pos){return incr(value.length)}}function lookahead(){return str[pos]}function current(value){return str.indexOf(value,pos)===pos}function next(value){return str[pos+1]===value}function matchReg(regExp){var subStr=str.substring(pos);var res=subStr.match(regExp);if(res){res.range=[];res.range[0]=pos;incr(res[0].length);res.range[1]=pos}return res}function parseDisjunction(){var res=[],from=pos;res.push(parseAlternative());while(match("|")){res.push(parseAlternative())}if(res.length===1){return res[0]}return createDisjunction(res,from,pos)}function parseAlternative(){var res=[],from=pos;var term;while(term=parseTerm()){res.push(term)}if(res.length===1){return res[0]}return createAlternative(res,from,pos)}function parseTerm(){if(pos>=str.length||current("|")||current(")")){return null}var anchor=parseAnchor();if(anchor){return anchor}var atom=parseAtom();if(!atom){throw SyntaxError("Expected atom")}var quantifier=parseQuantifier()||false;if(quantifier){quantifier.body=flattenBody(atom);updateRawStart(quantifier,atom.range[0]);return quantifier}return atom}function parseGroup(matchA,typeA,matchB,typeB){var type=null,from=pos;if(match(matchA)){type=typeA}else if(match(matchB)){type=typeB}else{return false}var body=parseDisjunction();if(!body){throw SyntaxError("Expected disjunction")}skip(")");var group=createGroup(type,flattenBody(body),from,pos);if(type=="normal"){if(firstIteration){closedCaptureCounter++}}return group}function parseAnchor(){var res,from=pos;if(match("^")){return createAnchor("start",1)}else if(match("$")){return createAnchor("end",1)}else if(match("\\b")){return createAnchor("boundary",2)}else if(match("\\B")){return createAnchor("not-boundary",2)}else{return parseGroup("(?=","lookahead","(?!","negativeLookahead")}}function parseQuantifier(){var res;var quantifier;var min,max;if(match("*")){quantifier=createQuantifier(0)}else if(match("+")){quantifier=createQuantifier(1)}else if(match("?")){quantifier=createQuantifier(0,1)}else if(res=matchReg(/^\{([0-9]+)\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,min,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,undefined,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),([0-9]+)\}/)){min=parseInt(res[1],10);max=parseInt(res[2],10);if(min>max){throw SyntaxError("numbers out of order in {} quantifier")}quantifier=createQuantifier(min,max,res.range[0],res.range[1])}if(quantifier){if(match("?")){quantifier.greedy=false;quantifier.range[1]+=1}}return quantifier}function parseAtom(){var res;if(res=matchReg(/^[^^$\\.*+?(){[|]/)){return createCharacter(res)}else if(match(".")){return createDot()}else if(match("\\")){res=parseAtomEscape();if(!res){throw SyntaxError("atomEscape")}return res}else if(res=parseCharacterClass()){return res}else{return parseGroup("(?:","ignore","(","normal")}}function parseUnicodeSurrogatePairEscape(firstEscape){if(hasUnicodeFlag){var first,second;if(firstEscape.kind=="unicodeEscape"&&(first=firstEscape.codePoint)>=55296&&first<=56319&¤t("\\")&&next("u")){var prevPos=pos;pos++;var secondEscape=parseClassEscape();if(secondEscape.kind=="unicodeEscape"&&(second=secondEscape.codePoint)>=56320&&second<=57343){firstEscape.range[1]=secondEscape.range[1];firstEscape.codePoint=(first-55296)*1024+second-56320+65536;firstEscape.type="value";firstEscape.kind="unicodeCodePointEscape";addRaw(firstEscape)}else{pos=prevPos}}}return firstEscape}function parseClassEscape(){return parseAtomEscape(true)}function parseAtomEscape(insideCharacterClass){var res;res=parseDecimalEscape();if(res){return res}if(insideCharacterClass){if(match("b")){return createEscaped("singleEscape",8,"\\b")}else if(match("B")){throw SyntaxError("\\B not possible inside of CharacterClass")}}res=parseCharacterEscape();return res}function parseDecimalEscape(){var res,match;if(res=matchReg(/^(?!0)\d+/)){match=res[0];var refIdx=parseInt(res[0],10);if(refIdx<=closedCaptureCounter){return createReference(res[0])}else{backrefDenied.push(refIdx);incr(-res[0].length);if(res=matchReg(/^[0-7]{1,3}/)){return createEscaped("octal",parseInt(res[0],8),res[0],1)}else{res=createCharacter(matchReg(/^[89]/));return updateRawStart(res,res.range[0]-1)}}}else if(res=matchReg(/^[0-7]{1,3}/)){match=res[0];if(/^0{1,3}$/.test(match)){return createEscaped("null",0,"0",match.length+1)}else{return createEscaped("octal",parseInt(match,8),match,1)}}else if(res=matchReg(/^[dDsSwW]/)){return createCharacterClassEscape(res[0])}return false}function parseCharacterEscape(){var res;if(res=matchReg(/^[fnrtv]/)){var codePoint=0;switch(res[0]){case"t":codePoint=9;break;case"n":codePoint=10;break;case"v":codePoint=11;break;case"f":codePoint=12;break;case"r":codePoint=13;break}return createEscaped("singleEscape",codePoint,"\\"+res[0])}else if(res=matchReg(/^c([a-zA-Z])/)){return createEscaped("controlLetter",res[1].charCodeAt(0)%32,res[1],2)}else if(res=matchReg(/^x([0-9a-fA-F]{2})/)){return createEscaped("hexadecimalEscape",parseInt(res[1],16),res[1],2)}else if(res=matchReg(/^u([0-9a-fA-F]{4})/)){return parseUnicodeSurrogatePairEscape(createEscaped("unicodeEscape",parseInt(res[1],16),res[1],2))}else if(hasUnicodeFlag&&(res=matchReg(/^u\{([0-9a-fA-F]+)\}/))){return createEscaped("unicodeCodePointEscape",parseInt(res[1],16),res[1],4)}else{return parseIdentityEscape()}}function isIdentifierPart(ch){var NonAsciiIdentifierPart=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&NonAsciiIdentifierPart.test(String.fromCharCode(ch))}function parseIdentityEscape(){var ZWJ="‌";var ZWNJ="‍";var res;var tmp;if(!isIdentifierPart(lookahead())){tmp=incr();return createEscaped("identifier",tmp.charCodeAt(0),tmp,1)}if(match(ZWJ)){return createEscaped("identifier",8204,ZWJ)}else if(match(ZWNJ)){return createEscaped("identifier",8205,ZWNJ)}return null}function parseCharacterClass(){var res,from=pos;if(res=matchReg(/^\[\^/)){res=parseClassRanges();skip("]");return createCharacterClass(res,true,from,pos)}else if(match("[")){res=parseClassRanges();skip("]");return createCharacterClass(res,false,from,pos)}return null}function parseClassRanges(){var res;if(current("]")){return[]}else{res=parseNonemptyClassRanges();if(!res){throw SyntaxError("nonEmptyClassRanges")}return res}}function parseHelperClassRanges(atom){var from,to,res;if(current("-")&&!next("]")){skip("-");res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}to=pos;var classRanges=parseClassRanges();if(!classRanges){throw SyntaxError("classRanges")}from=atom.range[0];if(classRanges.type==="empty"){return[createClassRange(atom,res,from,to)]}return[createClassRange(atom,res,from,to)].concat(classRanges)}res=parseNonemptyClassRangesNoDash();if(!res){throw SyntaxError("nonEmptyClassRangesNoDash")}return[atom].concat(res)}function parseNonemptyClassRanges(){var atom=parseClassAtom();if(!atom){throw SyntaxError("classAtom")}if(current("]")){return[atom]}return parseHelperClassRanges(atom)}function parseNonemptyClassRangesNoDash(){var res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}if(current("]")){return res}return parseHelperClassRanges(res)}function parseClassAtom(){if(match("-")){return createCharacter("-")}else{return parseClassAtomNoDash()}}function parseClassAtomNoDash(){var res;if(res=matchReg(/^[^\\\]-]/)){return createCharacter(res[0])}else if(match("\\")){res=parseClassEscape();if(!res){throw SyntaxError("classEscape")}return parseUnicodeSurrogatePairEscape(res)}}var backrefDenied=[];var closedCaptureCounter=0;var firstIteration=true;var hasUnicodeFlag=(flags||"").indexOf("u")!==-1;var pos=0;str=String(str);if(str===""){str="(?:)"}var result=parseDisjunction();if(result.range[1]!==str.length){throw SyntaxError("Could not parse entire input - got stuck: "+str)}for(var i=0;i-1:false;unicode=flags?flags.indexOf("u")>-1:false;assign(tree,processTerm(tree));return generate(tree)}},{"./data/character-class-escape-sets.js":431,"./data/iu-mappings.json":432,regenerate:433,regjsgen:434,regjsparser:435}],437:[function(require,module,exports){"use strict";var isFinite=require("is-finite");module.exports=function(str,n){if(typeof str!=="string"){throw new TypeError("Expected a string as the first argument")}if(n<0||!isFinite(n)){throw new TypeError("Expected a finite positive number")}var ret="";do{if(n&1){ret+=str}str+=str}while(n=n>>1);return ret}},{"is-finite":438}],438:[function(require,module,exports){arguments[4][304][0].apply(exports,arguments)},{dup:304}],439:[function(require,module,exports){"use strict";module.exports=/^#!.*/},{}],440:[function(require,module,exports){"use strict";module.exports=function(str){var isExtendedLengthPath=/^\\\\\?\\/.test(str);var hasNonAscii=/[^\x00-\x80]+/.test(str);if(isExtendedLengthPath||hasNonAscii){return str}return str.replace(/\\/g,"/")}},{}],441:[function(require,module,exports){exports.SourceMapGenerator=require("./source-map/source-map-generator").SourceMapGenerator;exports.SourceMapConsumer=require("./source-map/source-map-consumer").SourceMapConsumer;exports.SourceNode=require("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":447,"./source-map/source-map-generator":448,"./source-map/source-node":449}],442:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function ArraySet(){this._array=[];this._set={}}ArraySet.fromArray=function ArraySet_fromArray(aArray,aAllowDuplicates){var set=new ArraySet;for(var i=0,len=aArray.length;i=0&&aIdx>1;return isNegative?-shifted:shifted}exports.encode=function base64VLQ_encode(aValue){var encoded="";var digit;var vlq=toVLQSigned(aValue);do{digit=vlq&VLQ_BASE_MASK;vlq>>>=VLQ_BASE_SHIFT;if(vlq>0){digit|=VLQ_CONTINUATION_BIT}encoded+=base64.encode(digit)}while(vlq>0);return encoded};exports.decode=function base64VLQ_decode(aStr,aIndex,aOutParam){var strLen=aStr.length;var result=0;var shift=0;var continuation,digit;do{if(aIndex>=strLen){throw new Error("Expected more digits in base 64 VLQ value.")}digit=base64.decode(aStr.charAt(aIndex++));continuation=!!(digit&VLQ_CONTINUATION_BIT);digit&=VLQ_BASE_MASK;result=result+(digit<0){if(aHigh-mid>1){return recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return aHigh1){return recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return mid}else{return aLow<0?-1:aLow}}}exports.search=function search(aNeedle,aHaystack,aCompare,aBias){if(aHaystack.length===0){return-1}var index=recursiveSearch(-1,aHaystack.length,aNeedle,aHaystack,aCompare,aBias||exports.GREATEST_LOWER_BOUND);if(index<0){return-1}while(index-1>=0){if(aCompare(aHaystack[index],aHaystack[index-1],true)!==0){break}--index}return index}})},{amdefine:451}],446:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function generatedPositionAfter(mappingA,mappingB){var lineA=mappingA.generatedLine;var lineB=mappingB.generatedLine;var columnA=mappingA.generatedColumn;var columnB=mappingB.generatedColumn;return lineB>lineA||lineB==lineA&&columnB>=columnA||util.compareByGeneratedPositions(mappingA,mappingB)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(aCallback,aThisArg){this._array.forEach(aCallback,aThisArg)};MappingList.prototype.add=function MappingList_add(aMapping){var mapping;if(generatedPositionAfter(this._last,aMapping)){this._last=aMapping;this._array.push(aMapping)}else{this._sorted=false;this._array.push(aMapping)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(util.compareByGeneratedPositions);this._sorted=true}return this._array};exports.MappingList=MappingList})},{"./util":450,amdefine:451}],447:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");var binarySearch=require("./binary-search");var ArraySet=require("./array-set").ArraySet;var base64VLQ=require("./base64-vlq");function SourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}return sourceMap.sections!=null?new IndexedSourceMapConsumer(sourceMap):new BasicSourceMapConsumer(sourceMap)}SourceMapConsumer.fromSourceMap=function(aSourceMap){return BasicSourceMapConsumer.fromSourceMap(aSourceMap)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{get:function(){if(!this.__generatedMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{get:function(){if(!this.__originalMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._nextCharIsMappingSeparator=function SourceMapConsumer_nextCharIsMappingSeparator(aStr,index){var c=aStr.charAt(index);return c===";"||c===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(aCallback,aContext,aOrder){var context=aContext||null;var order=aOrder||SourceMapConsumer.GENERATED_ORDER;var mappings;switch(order){case SourceMapConsumer.GENERATED_ORDER:mappings=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:mappings=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var sourceRoot=this.sourceRoot;mappings.map(function(mapping){var source=mapping.source;if(source!=null&&sourceRoot!=null){source=util.join(sourceRoot,source)}return{source:source,generatedLine:mapping.generatedLine,generatedColumn:mapping.generatedColumn,originalLine:mapping.originalLine,originalColumn:mapping.originalColumn,name:mapping.name}}).forEach(aCallback,context)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column",0)};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var mappings=[];var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,binarySearch.LEAST_UPPER_BOUND);if(index>=0){var mapping=this._originalMappings[index];var originalLine=mapping.originalLine;var originalColumn=mapping.originalColumn;while(mapping&&mapping.originalLine===originalLine&&(aArgs.column===undefined||mapping.originalColumn===originalColumn)){mappings.push({line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)});mapping=this._originalMappings[++index]}}return mappings};exports.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sources=util.getArg(sourceMap,"sources");var names=util.getArg(sourceMap,"names",[]);var sourceRoot=util.getArg(sourceMap,"sourceRoot",null);var sourcesContent=util.getArg(sourceMap,"sourcesContent",null);var mappings=util.getArg(sourceMap,"mappings");var file=util.getArg(sourceMap,"file",null);if(version!=this._version){throw new Error("Unsupported version: "+version)}sources=sources.map(util.normalize);this._names=ArraySet.fromArray(names,true);this._sources=ArraySet.fromArray(sources,true);this.sourceRoot=sourceRoot;this.sourcesContent=sourcesContent;this._mappings=mappings;this.file=file}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.fromSourceMap=function SourceMapConsumer_fromSourceMap(aSourceMap){var smc=Object.create(BasicSourceMapConsumer.prototype);smc._names=ArraySet.fromArray(aSourceMap._names.toArray(),true);smc._sources=ArraySet.fromArray(aSourceMap._sources.toArray(),true);smc.sourceRoot=aSourceMap._sourceRoot;smc.sourcesContent=aSourceMap._generateSourcesContent(smc._sources.toArray(),smc.sourceRoot);smc.file=aSourceMap._file;smc.__generatedMappings=aSourceMap._mappings.toArray().slice();smc.__originalMappings=aSourceMap._mappings.toArray().slice().sort(util.compareByOriginalPositions);return smc};BasicSourceMapConsumer.prototype._version=3;Object.defineProperty(BasicSourceMapConsumer.prototype,"sources",{get:function(){return this._sources.toArray().map(function(s){return this.sourceRoot!=null?util.join(this.sourceRoot,s):s},this)}});BasicSourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){var generatedLine=1;var previousGeneratedColumn=0;var previousOriginalLine=0;var previousOriginalColumn=0;var previousSource=0;var previousName=0;var length=aStr.length;var index=0;var cachedValues={};var temp={};var mapping,str,values,end,value;while(index1){mapping.source=this._sources.at(previousSource+values[1]);previousSource+=values[1];if(values.length===2){throw new Error("Found a source, but no line and column")}mapping.originalLine=previousOriginalLine+values[2];previousOriginalLine=mapping.originalLine;mapping.originalLine+=1;if(values.length===3){throw new Error("Found a source and line, but no column")}mapping.originalColumn=previousOriginalColumn+values[3];previousOriginalColumn=mapping.originalColumn;if(values.length>4){mapping.name=this._names.at(previousName+values[4]);previousName+=values[4]}}this.__generatedMappings.push(mapping);if(typeof mapping.originalLine==="number"){this.__originalMappings.push(mapping)}}}this.__generatedMappings.sort(util.compareByGeneratedPositions);this.__originalMappings.sort(util.compareByOriginalPositions)};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(aNeedle,aMappings,aLineName,aColumnName,aComparator,aBias){if(aNeedle[aLineName]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+aNeedle[aLineName])}if(aNeedle[aColumnName]<0){throw new TypeError("Column must be greater than or equal to 0, got "+aNeedle[aColumnName])}return binarySearch.search(aNeedle,aMappings,aComparator,aBias)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var index=0;index=0){var mapping=this._generatedMappings[index];if(mapping.generatedLine===needle.generatedLine){var source=util.getArg(mapping,"source",null);if(source!=null&&this.sourceRoot!=null){source=util.join(this.sourceRoot,source)}return{source:source,line:util.getArg(mapping,"originalLine",null),column:util.getArg(mapping,"originalColumn",null),name:util.getArg(mapping,"name",null)}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(aSource,nullOnMissing){if(!this.sourcesContent){return null}if(this.sourceRoot!=null){aSource=util.relative(this.sourceRoot,aSource)}if(this._sources.has(aSource)){return this.sourcesContent[this._sources.indexOf(aSource)]}var url;if(this.sourceRoot!=null&&(url=util.urlParse(this.sourceRoot))){var fileUriAbsPath=aSource.replace(/^file:\/\//,"");if(url.scheme=="file"&&this._sources.has(fileUriAbsPath)){return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]}if((!url.path||url.path=="/")&&this._sources.has("/"+aSource)){return this.sourcesContent[this._sources.indexOf("/"+aSource)]}}if(nullOnMissing){return null}else{throw new Error('"'+aSource+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column")};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,util.getArg(aArgs,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(index>=0){var mapping=this._originalMappings[index];if(mapping.source===needle.source){return{line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};exports.BasicSourceMapConsumer=BasicSourceMapConsumer;function IndexedSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sections=util.getArg(sourceMap,"sections");if(version!=this._version){throw new Error("Unsupported version: "+version)}var lastOffset={line:-1,column:0};this._sections=sections.map(function(s){if(s.url){throw new Error("Support for url field in sections not implemented.")}var offset=util.getArg(s,"offset");var offsetLine=util.getArg(offset,"line");var offsetColumn=util.getArg(offset,"column");if(offsetLine0&&aGenerated.column>=0&&!aOriginal&&!aSource&&!aName){return}else if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aOriginal&&"line"in aOriginal&&"column"in aOriginal&&aGenerated.line>0&&aGenerated.column>=0&&aOriginal.line>0&&aOriginal.column>=0&&aSource){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:aGenerated,source:aSource,original:aOriginal,name:aName}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var previousGeneratedColumn=0;var previousGeneratedLine=1;var previousOriginalColumn=0;var previousOriginalLine=0;var previousName=0;var previousSource=0;var result="";var mapping;var mappings=this._mappings.toArray();for(var i=0,len=mappings.length;i0){if(!util.compareByGeneratedPositions(mapping,mappings[i-1])){continue}result+=","}}result+=base64VLQ.encode(mapping.generatedColumn-previousGeneratedColumn);previousGeneratedColumn=mapping.generatedColumn;if(mapping.source!=null){result+=base64VLQ.encode(this._sources.indexOf(mapping.source)-previousSource);previousSource=this._sources.indexOf(mapping.source);result+=base64VLQ.encode(mapping.originalLine-1-previousOriginalLine);previousOriginalLine=mapping.originalLine-1;result+=base64VLQ.encode(mapping.originalColumn-previousOriginalColumn);previousOriginalColumn=mapping.originalColumn;if(mapping.name!=null){result+=base64VLQ.encode(this._names.indexOf(mapping.name)-previousName);previousName=this._names.indexOf(mapping.name)}}}return result};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(aSources,aSourceRoot){return aSources.map(function(source){if(!this._sourcesContents){return null}if(aSourceRoot!=null){source=util.relative(aSourceRoot,source)}var key=util.toSetString(source);return Object.prototype.hasOwnProperty.call(this._sourcesContents,key)?this._sourcesContents[key]:null},this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var map={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){map.file=this._file}if(this._sourceRoot!=null){map.sourceRoot=this._sourceRoot}if(this._sourcesContents){map.sourcesContent=this._generateSourcesContent(map.sources,map.sourceRoot)}return map};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};exports.SourceMapGenerator=SourceMapGenerator})},{"./array-set":442,"./base64-vlq":443,"./mapping-list":446,"./util":450,amdefine:451}],449:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var SourceMapGenerator=require("./source-map-generator").SourceMapGenerator;var util=require("./util");var REGEX_NEWLINE=/(\r?\n)/;var NEWLINE_CODE=10;var isSourceNode="$$$isSourceNode$$$";function SourceNode(aLine,aColumn,aSource,aChunks,aName){this.children=[];this.sourceContents={};this.line=aLine==null?null:aLine;this.column=aColumn==null?null:aColumn;this.source=aSource==null?null:aSource;this.name=aName==null?null:aName;this[isSourceNode]=true;if(aChunks!=null)this.add(aChunks)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(aGeneratedCode,aSourceMapConsumer,aRelativePath){var node=new SourceNode;var remainingLines=aGeneratedCode.split(REGEX_NEWLINE);var shiftNextLine=function(){var lineContents=remainingLines.shift();var newLine=remainingLines.shift()||"";return lineContents+newLine};var lastGeneratedLine=1,lastGeneratedColumn=0;var lastMapping=null;aSourceMapConsumer.eachMapping(function(mapping){if(lastMapping!==null){if(lastGeneratedLine0){if(lastMapping){addMappingWithCode(lastMapping,shiftNextLine())}node.add(remainingLines.join(""))}aSourceMapConsumer.sources.forEach(function(sourceFile){var content=aSourceMapConsumer.sourceContentFor(sourceFile);if(content!=null){if(aRelativePath!=null){sourceFile=util.join(aRelativePath,sourceFile)}node.setSourceContent(sourceFile,content)}});return node;function addMappingWithCode(mapping,code){if(mapping===null||mapping.source===undefined){node.add(code)}else{var source=aRelativePath?util.join(aRelativePath,mapping.source):mapping.source; + +node.add(new SourceNode(mapping.originalLine,mapping.originalColumn,source,code,mapping.name))}}};SourceNode.prototype.add=function SourceNode_add(aChunk){if(Array.isArray(aChunk)){aChunk.forEach(function(chunk){this.add(chunk)},this)}else if(aChunk[isSourceNode]||typeof aChunk==="string"){if(aChunk){this.children.push(aChunk)}}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.prepend=function SourceNode_prepend(aChunk){if(Array.isArray(aChunk)){for(var i=aChunk.length-1;i>=0;i--){this.prepend(aChunk[i])}}else if(aChunk[isSourceNode]||typeof aChunk==="string"){this.children.unshift(aChunk)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.walk=function SourceNode_walk(aFn){var chunk;for(var i=0,len=this.children.length;i0){newChildren=[];for(i=0;i=0;i--){part=parts[i];if(part==="."){parts.splice(i,1)}else if(part===".."){up++}else if(up>0){if(part===""){parts.splice(i+1,up);up=0}else{parts.splice(i,2);up--}}}path=parts.join("/");if(path===""){path=isAbsolute?"/":"."}if(url){url.path=path;return urlGenerate(url)}return path}exports.normalize=normalize;function join(aRoot,aPath){if(aRoot===""){aRoot="."}if(aPath===""){aPath="."}var aPathUrl=urlParse(aPath);var aRootUrl=urlParse(aRoot);if(aRootUrl){aRoot=aRootUrl.path||"/"}if(aPathUrl&&!aPathUrl.scheme){if(aRootUrl){aPathUrl.scheme=aRootUrl.scheme}return urlGenerate(aPathUrl)}if(aPathUrl||aPath.match(dataUrlRegexp)){return aPath}if(aRootUrl&&!aRootUrl.host&&!aRootUrl.path){aRootUrl.host=aPath;return urlGenerate(aRootUrl)}var joined=aPath.charAt(0)==="/"?aPath:normalize(aRoot.replace(/\/+$/,"")+"/"+aPath);if(aRootUrl){aRootUrl.path=joined;return urlGenerate(aRootUrl)}return joined}exports.join=join;function relative(aRoot,aPath){if(aRoot===""){aRoot="."}aRoot=aRoot.replace(/\/$/,"");var url=urlParse(aRoot);if(aPath.charAt(0)=="/"&&url&&url.path=="/"){return aPath.slice(1)}return aPath.indexOf(aRoot+"/")===0?aPath.substr(aRoot.length+1):aPath}exports.relative=relative;function toSetString(aStr){return"$"+aStr}exports.toSetString=toSetString;function fromSetString(aStr){return aStr.substr(1)}exports.fromSetString=fromSetString;function strcmp(aStr1,aStr2){var s1=aStr1||"";var s2=aStr2||"";return(s1>s2)-(s10){ary.splice(i-1,2);i-=2}}}}function normalize(name,baseName){var baseParts;if(name&&name.charAt(0)==="."){if(baseName){baseParts=baseName.split("/");baseParts=baseParts.slice(0,baseParts.length-1);baseParts=baseParts.concat(name.split("/"));trimDots(baseParts);name=baseParts.join("/")}}return name}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(id){function load(value){loaderCache[id]=value}load.fromText=function(id,text){throw new Error("amdefine does not implement load.fromText")};return load}makeRequire=function(systemRequire,exports,module,relId){function amdRequire(deps,callback){if(typeof deps==="string"){return stringRequire(systemRequire,exports,module,deps,relId)}else{deps=deps.map(function(depName){return stringRequire(systemRequire,exports,module,depName,relId)});process.nextTick(function(){callback.apply(null,deps)})}}amdRequire.toUrl=function(filePath){if(filePath.indexOf(".")===0){return normalize(filePath,path.dirname(module.filename))}else{return filePath}};return amdRequire};requireFn=requireFn||function req(){return module.require.apply(module,arguments)};function runFactory(id,deps,factory){var r,e,m,result;if(id){e=loaderCache[id]={};m={id:id,uri:__filename,exports:e};r=makeRequire(requireFn,e,m,id)}else{if(alreadyCalled){throw new Error("amdefine with no module ID cannot be called more than once per file.")}alreadyCalled=true;e=module.exports;m=module;r=makeRequire(requireFn,e,m,module.id)}if(deps){deps=deps.map(function(depName){return r(depName)})}if(typeof factory==="function"){result=factory.apply(m.exports,deps)}else{result=factory}if(result!==undefined){m.exports=result;if(id){loaderCache[id]=m.exports}}}stringRequire=function(systemRequire,exports,module,id,relId){var index=id.indexOf("!"),originalId=id,prefix,plugin;if(index===-1){id=normalize(id,relId);if(id==="require"){return makeRequire(systemRequire,exports,module,relId)}else if(id==="exports"){return exports}else if(id==="module"){return module}else if(loaderCache.hasOwnProperty(id)){return loaderCache[id]}else if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}else{if(systemRequire){return systemRequire(originalId)}else{throw new Error("No module with ID: "+id)}}}else{prefix=id.substring(0,index);id=id.substring(index+1,id.length);plugin=stringRequire(systemRequire,exports,module,prefix,relId);if(plugin.normalize){id=plugin.normalize(id,makeNormalize(relId))}else{id=normalize(id,relId)}if(loaderCache[id]){return loaderCache[id]}else{plugin.load(id,makeRequire(systemRequire,exports,module,relId),makeLoad(id),{});return loaderCache[id]}}};function define(id,deps,factory){if(Array.isArray(id)){factory=deps;deps=id;id=undefined}else if(typeof id!=="string"){factory=id;id=deps=undefined}if(deps&&!Array.isArray(deps)){factory=deps;deps=undefined}if(!deps){deps=["require","exports","module"]}if(id){defineCache[id]=[id,deps,factory]}else{runFactory(id,deps,factory)}}define.require=function(id){if(loaderCache[id]){return loaderCache[id]}if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}};define.amd={};return define}module.exports=amdefine}).call(this,require("_process"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{_process:183,path:182}],452:[function(require,module,exports){"use strict";module.exports=function toFastProperties(obj){function f(){}f.prototype=obj;new f;return;eval(obj)}},{}],453:[function(require,module,exports){"use strict";module.exports=function(str){return str.replace(/[\s\uFEFF\xA0]+$/g,"")}},{}],454:[function(require,module,exports){module.exports={name:"babel-core",description:"Turn ES6 code into readable vanilla ES5 with source maps",version:"5.0.8",author:"Sebastian McKenzie ",homepage:"https://babeljs.io/",repository:"babel/babel",main:"lib/babel/api/node.js",browser:{"./lib/babel/api/register/node.js":"./lib/babel/api/register/browser.js"},keywords:["harmony","classes","modules","let","const","var","es6","transpile","transpiler","6to5","babel"],scripts:{bench:"make bench",test:"make test"},dependencies:{"ast-types":"~0.7.0",chalk:"^1.0.0","convert-source-map":"^0.5.0","core-js":"^0.8.1",debug:"^2.1.1","detect-indent":"^3.0.0",estraverse:"^1.9.1",esutils:"^1.1.6","fs-readdir-recursive":"^0.1.0",globals:"^6.2.0","is-integer":"^1.0.4","js-tokens":"1.0.0",leven:"^1.0.1","line-numbers":"0.2.0",lodash:"^3.2.0",minimatch:"^2.0.3","output-file-sync":"^1.1.0","path-is-absolute":"^1.0.0","private":"^0.1.6","regenerator-babel":"0.8.13-2",regexpu:"^1.1.2",repeating:"^1.1.2","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.4.0","source-map-support":"^0.2.9","to-fast-properties":"^1.0.0","trim-right":"^1.0.0"},devDependencies:{babel:"4.7.13",browserify:"^9.0.3",chai:"^2.0.0",eslint:"^0.15.1","babel-eslint":"^1.0.1",esvalid:"^1.1.0",istanbul:"^0.3.5",matcha:"^0.6.0",mocha:"^2.1.0",rimraf:"^2.2.8","uglify-js":"^2.4.16"}}},{}],455:[function(require,module,exports){module.exports={"abstract-expression-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-delete":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceDelete",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceSet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-comprehension-container":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-from":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-push":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"STATEMENT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"call-instance-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,type:"ThisExpression",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INITIALIZERS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"call-static-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CONSTRUCTOR",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INITIALIZERS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"CONSTRUCTOR",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},call:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"CONTEXT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"class-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"DECORATOR",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"class-super-constructor-call-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"class-super-constructor-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"corejs-is-iterator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CORE_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isIterable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"corejs-iterator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CORE_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getIterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"default-parameter":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"DEFAULT_VALUE",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"let",type:"VariableDeclaration",end:null}],type:"Program",end:null},"exports-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-default-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-from-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},value:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"INIT",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-module-declaration-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-module-declaration":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},{start:null,loc:null,range:null,value:"__esModule",raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null, +type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"for-of-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARR",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"for-of-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:null,update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},operator:">=",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"for-of":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"Program",end:null},"helper-async-to-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"next",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"throw",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:null,type:"ReturnStatement",end:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:null,type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"then",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-bind":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Function",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-class-call-check":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},operator:"instanceof",right:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"BinaryExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot call a class as a function",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-create-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],type:"CallExpression",end:null, +_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-create-decorated-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,leadingComments:null,_paths:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"The decorator for method ",raw:null,type:"Literal",end:null},operator:"+",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,value:" is of the invalid type ",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-default-props":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-defaults":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyNames",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-define-property":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},operator:"==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-extends":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"assign",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:1,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier", +end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-has-own":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-inherits":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"Super expression must either be null or a function, not ",raw:null,type:"Literal",end:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"create",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__proto__",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-interop-require-wildcard":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},value:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-interop-require":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},alternate:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-object-destructuring-empty":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot destructure undefined",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-object-without-properties":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"indexOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:">=",right:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-self-global":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"self",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-slice":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"slice",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-sliced-to-array-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array", +type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-sliced-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,leadingComments:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-tagged-template-literal-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-tagged-template-literal":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-temporal-assert-defined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"ReferenceError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},operator:"+",right:{start:null,loc:null,range:null,value:" is not defined - temporal dead zone",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-temporal-undefined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null,parenthesizedExpression:true},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-to-consumable-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-typeof":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,value:"symbol",raw:null,type:"Literal",end:null},alternate:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"let-scoping-return":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"v",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"ludicrous-in":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"RIGHT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"LEFT",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"named-function":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{ +loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"GET_OUTER_ID",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"property-method-assignment-wrapper-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:true,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,delegate:true,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"YieldExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"property-method-assignment-wrapper":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"prototype-identifier":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CLASS_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"require-assign-key":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null}],type:"Program",end:null},require:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},rest:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"ARRAY_LEN",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"START",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARRAY_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"self-contained-helpers-head":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"HELPER",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},system:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"System",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"register",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"MODULE_DEPENDENCIES",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"EXPORT_IDENTIFIER",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"setters",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"SETTERS",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"execute",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"EXECUTE",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"tail-call-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,body:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BLOCK",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"WhileStatement",end:null,_scopeInfo:null,_paths:null},label:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"LabeledStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null}],type:"Program",end:null},"test-exports":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"test-module":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"umd-commonjs-strict":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"root",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"BROWSER_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"UMD_ROOT",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FACTORY_PARAMETERS",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"FACTORY_BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"umd-runner-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"COMMON_TEST",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"BROWSER_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"GLOBAL_ARG",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null}}},{}]},{},[19])(19)}); \ No newline at end of file diff --git a/demo/.gitignore b/demo/.gitignore new file mode 100644 index 0000000..5509140 --- /dev/null +++ b/demo/.gitignore @@ -0,0 +1 @@ +*.DS_Store diff --git a/demo/build.config.js b/demo/build.config.js index 0bc3bdd..9b8d186 100644 --- a/demo/build.config.js +++ b/demo/build.config.js @@ -5,7 +5,7 @@ 'out': 'main-built.js', 'paths': { - 'babel': '../babel-4.6.6.min', + 'babel': '../babel.min', 'es6': '../es6' }, diff --git a/demo/index-optimized.html b/demo/index-optimized.html index 443eea6..8f27b49 100644 --- a/demo/index-optimized.html +++ b/demo/index-optimized.html @@ -8,7 +8,7 @@ 1. Run `npm run optimize` 2. Open console tab in dev tools! - + \ No newline at end of file diff --git a/demo/index.html b/demo/index.html index 66b21a1..7a46b37 100644 --- a/demo/index.html +++ b/demo/index.html @@ -7,12 +7,12 @@ Open console tab in dev tools! - + diff --git a/demo/libs/requirejs.js b/demo/libs/requirejs.js new file mode 100644 index 0000000..b65b5ce --- /dev/null +++ b/demo/libs/requirejs.js @@ -0,0 +1,2087 @@ +/** vim: et:ts=4:sw=4:sts=4 + * @license RequireJS 2.1.17+ Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/requirejs for details + */ +//Not using strict: uneven strict support in browsers, #392, and causes +//problems with requirejs.exec()/transpiler plugins that may not be strict. +/*jslint regexp: true, nomen: true, sloppy: true */ +/*global window, navigator, document, importScripts, setTimeout, opera */ + +var requirejs, require, define; +(function (global) { + var req, s, head, baseElement, dataMain, src, + interactiveScript, currentlyAddingScript, mainScript, subPath, + version = '2.1.17+', + commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, + cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, + jsSuffixRegExp = /\.js$/, + currDirRegExp = /^\.\//, + op = Object.prototype, + ostring = op.toString, + hasOwn = op.hasOwnProperty, + ap = Array.prototype, + apsp = ap.splice, + isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), + isWebWorker = !isBrowser && typeof importScripts !== 'undefined', + //PS3 indicates loaded and complete, but need to wait for complete + //specifically. Sequence is 'loading', 'loaded', execution, + // then 'complete'. The UA check is unfortunate, but not sure how + //to feature test w/o causing perf issues. + readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? + /^complete$/ : /^(complete|loaded)$/, + defContextName = '_', + //Oh the tragedy, detecting opera. See the usage of isOpera for reason. + isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', + contexts = {}, + cfg = {}, + globalDefQueue = [], + useInteractive = false; + + function isFunction(it) { + return ostring.call(it) === '[object Function]'; + } + + function isArray(it) { + return ostring.call(it) === '[object Array]'; + } + + /** + * Helper function for iterating over an array. If the func returns + * a true value, it will break out of the loop. + */ + function each(ary, func) { + if (ary) { + var i; + for (i = 0; i < ary.length; i += 1) { + if (ary[i] && func(ary[i], i, ary)) { + break; + } + } + } + } + + /** + * Helper function for iterating over an array backwards. If the func + * returns a true value, it will break out of the loop. + */ + function eachReverse(ary, func) { + if (ary) { + var i; + for (i = ary.length - 1; i > -1; i -= 1) { + if (ary[i] && func(ary[i], i, ary)) { + break; + } + } + } + } + + function hasProp(obj, prop) { + return hasOwn.call(obj, prop); + } + + function getOwn(obj, prop) { + return hasProp(obj, prop) && obj[prop]; + } + + /** + * Cycles over properties in an object and calls a function for each + * property value. If the function returns a truthy value, then the + * iteration is stopped. + */ + function eachProp(obj, func) { + var prop; + for (prop in obj) { + if (hasProp(obj, prop)) { + if (func(obj[prop], prop)) { + break; + } + } + } + } + + /** + * Simple function to mix in properties from source into target, + * but only if target does not already have a property of the same name. + */ + function mixin(target, source, force, deepStringMixin) { + if (source) { + eachProp(source, function (value, prop) { + if (force || !hasProp(target, prop)) { + if (deepStringMixin && typeof value === 'object' && value && + !isArray(value) && !isFunction(value) && + !(value instanceof RegExp)) { + + if (!target[prop]) { + target[prop] = {}; + } + mixin(target[prop], value, force, deepStringMixin); + } else { + target[prop] = value; + } + } + }); + } + return target; + } + + //Similar to Function.prototype.bind, but the 'this' object is specified + //first, since it is easier to read/figure out what 'this' will be. + function bind(obj, fn) { + return function () { + return fn.apply(obj, arguments); + }; + } + + function scripts() { + return document.getElementsByTagName('script'); + } + + function defaultOnError(err) { + throw err; + } + + //Allow getting a global that is expressed in + //dot notation, like 'a.b.c'. + function getGlobal(value) { + if (!value) { + return value; + } + var g = global; + each(value.split('.'), function (part) { + g = g[part]; + }); + return g; + } + + /** + * Constructs an error with a pointer to an URL with more information. + * @param {String} id the error ID that maps to an ID on a web page. + * @param {String} message human readable error. + * @param {Error} [err] the original error, if there is one. + * + * @returns {Error} + */ + function makeError(id, msg, err, requireModules) { + var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); + e.requireType = id; + e.requireModules = requireModules; + if (err) { + e.originalError = err; + } + return e; + } + + if (typeof define !== 'undefined') { + //If a define is already in play via another AMD loader, + //do not overwrite. + return; + } + + if (typeof requirejs !== 'undefined') { + if (isFunction(requirejs)) { + //Do not overwrite an existing requirejs instance. + return; + } + cfg = requirejs; + requirejs = undefined; + } + + //Allow for a require config object + if (typeof require !== 'undefined' && !isFunction(require)) { + //assume it is a config object. + cfg = require; + require = undefined; + } + + function newContext(contextName) { + var inCheckLoaded, Module, context, handlers, + checkLoadedTimeoutId, + config = { + //Defaults. Do not set a default for map + //config to speed up normalize(), which + //will run faster if there is no default. + waitSeconds: 7, + baseUrl: './', + paths: {}, + bundles: {}, + pkgs: {}, + shim: {}, + config: {} + }, + registry = {}, + //registry of just enabled modules, to speed + //cycle breaking code when lots of modules + //are registered, but not activated. + enabledRegistry = {}, + undefEvents = {}, + defQueue = [], + defined = {}, + urlFetched = {}, + bundlesMap = {}, + requireCounter = 1, + unnormalizedCounter = 1; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part; + for (i = 0; i < ary.length; i++) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + // If at the start, or previous value is still .., + // keep them so that when converted to a path it may + // still work when converted to a path, even though + // as an ID it is less than ideal. In larger point + // releases, may be better to just kick out an error. + if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') { + continue; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + /** + * Given a relative module name, like ./something, normalize it to + * a real name that can be mapped to a path. + * @param {String} name the relative name + * @param {String} baseName a real name that the name arg is relative + * to. + * @param {Boolean} applyMap apply the map config to the value. Should + * only be done if this normalization is for a dependency ID. + * @returns {String} normalized name + */ + function normalize(name, baseName, applyMap) { + var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex, + foundMap, foundI, foundStarMap, starI, normalizedBaseParts, + baseParts = (baseName && baseName.split('/')), + map = config.map, + starMap = map && map['*']; + + //Adjust any relative paths. + if (name) { + name = name.split('/'); + lastIndex = name.length - 1; + + // If wanting node ID compatibility, strip .js from end + // of IDs. Have to do this here, and not in nameToUrl + // because node allows either .js or non .js to map + // to same file. + if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { + name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); + } + + // Starts with a '.' so need the baseName + if (name[0].charAt(0) === '.' && baseParts) { + //Convert baseName to array, and lop off the last part, + //so that . matches that 'directory' and not name of the baseName's + //module. For instance, baseName of 'one/two/three', maps to + //'one/two/three.js', but we want the directory, 'one/two' for + //this normalization. + normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); + name = normalizedBaseParts.concat(name); + } + + trimDots(name); + name = name.join('/'); + } + + //Apply map config if available. + if (applyMap && map && (baseParts || starMap)) { + nameParts = name.split('/'); + + outerLoop: for (i = nameParts.length; i > 0; i -= 1) { + nameSegment = nameParts.slice(0, i).join('/'); + + if (baseParts) { + //Find the longest baseName segment match in the config. + //So, do joins on the biggest to smallest lengths of baseParts. + for (j = baseParts.length; j > 0; j -= 1) { + mapValue = getOwn(map, baseParts.slice(0, j).join('/')); + + //baseName segment has config, find if it has one for + //this name. + if (mapValue) { + mapValue = getOwn(mapValue, nameSegment); + if (mapValue) { + //Match, update name to the new value. + foundMap = mapValue; + foundI = i; + break outerLoop; + } + } + } + } + + //Check for a star map match, but just hold on to it, + //if there is a shorter segment match later in a matching + //config, then favor over this star map. + if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { + foundStarMap = getOwn(starMap, nameSegment); + starI = i; + } + } + + if (!foundMap && foundStarMap) { + foundMap = foundStarMap; + foundI = starI; + } + + if (foundMap) { + nameParts.splice(0, foundI, foundMap); + name = nameParts.join('/'); + } + } + + // If the name points to a package's name, use + // the package main instead. + pkgMain = getOwn(config.pkgs, name); + + return pkgMain ? pkgMain : name; + } + + function removeScript(name) { + if (isBrowser) { + each(scripts(), function (scriptNode) { + if (scriptNode.getAttribute('data-requiremodule') === name && + scriptNode.getAttribute('data-requirecontext') === context.contextName) { + scriptNode.parentNode.removeChild(scriptNode); + return true; + } + }); + } + } + + function hasPathFallback(id) { + var pathConfig = getOwn(config.paths, id); + if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { + //Pop off the first array value, since it failed, and + //retry + pathConfig.shift(); + context.require.undef(id); + + //Custom require that does not do map translation, since + //ID is "absolute", already mapped/resolved. + context.makeRequire(null, { + skipMap: true + })([id]); + + return true; + } + } + + //Turns a plugin!resource to [plugin, resource] + //with the plugin being undefined if the name + //did not have a plugin prefix. + function splitPrefix(name) { + var prefix, + index = name ? name.indexOf('!') : -1; + if (index > -1) { + prefix = name.substring(0, index); + name = name.substring(index + 1, name.length); + } + return [prefix, name]; + } + + /** + * Creates a module mapping that includes plugin prefix, module + * name, and path. If parentModuleMap is provided it will + * also normalize the name via require.normalize() + * + * @param {String} name the module name + * @param {String} [parentModuleMap] parent module map + * for the module name, used to resolve relative names. + * @param {Boolean} isNormalized: is the ID already normalized. + * This is true if this call is done for a define() module ID. + * @param {Boolean} applyMap: apply the map config to the ID. + * Should only be true if this map is for a dependency. + * + * @returns {Object} + */ + function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { + var url, pluginModule, suffix, nameParts, + prefix = null, + parentName = parentModuleMap ? parentModuleMap.name : null, + originalName = name, + isDefine = true, + normalizedName = ''; + + //If no name, then it means it is a require call, generate an + //internal name. + if (!name) { + isDefine = false; + name = '_@r' + (requireCounter += 1); + } + + nameParts = splitPrefix(name); + prefix = nameParts[0]; + name = nameParts[1]; + + if (prefix) { + prefix = normalize(prefix, parentName, applyMap); + pluginModule = getOwn(defined, prefix); + } + + //Account for relative paths if there is a base name. + if (name) { + if (prefix) { + if (pluginModule && pluginModule.normalize) { + //Plugin is loaded, use its normalize method. + normalizedName = pluginModule.normalize(name, function (name) { + return normalize(name, parentName, applyMap); + }); + } else { + // If nested plugin references, then do not try to + // normalize, as it will not normalize correctly. This + // places a restriction on resourceIds, and the longer + // term solution is not to normalize until plugins are + // loaded and all normalizations to allow for async + // loading of a loader plugin. But for now, fixes the + // common uses. Details in #1131 + normalizedName = name.indexOf('!') === -1 ? + normalize(name, parentName, applyMap) : + name; + } + } else { + //A regular module. + normalizedName = normalize(name, parentName, applyMap); + + //Normalized name may be a plugin ID due to map config + //application in normalize. The map config values must + //already be normalized, so do not need to redo that part. + nameParts = splitPrefix(normalizedName); + prefix = nameParts[0]; + normalizedName = nameParts[1]; + isNormalized = true; + + url = context.nameToUrl(normalizedName); + } + } + + //If the id is a plugin id that cannot be determined if it needs + //normalization, stamp it with a unique ID so two matching relative + //ids that may conflict can be separate. + suffix = prefix && !pluginModule && !isNormalized ? + '_unnormalized' + (unnormalizedCounter += 1) : + ''; + + return { + prefix: prefix, + name: normalizedName, + parentMap: parentModuleMap, + unnormalized: !!suffix, + url: url, + originalName: originalName, + isDefine: isDefine, + id: (prefix ? + prefix + '!' + normalizedName : + normalizedName) + suffix + }; + } + + function getModule(depMap) { + var id = depMap.id, + mod = getOwn(registry, id); + + if (!mod) { + mod = registry[id] = new context.Module(depMap); + } + + return mod; + } + + function on(depMap, name, fn) { + var id = depMap.id, + mod = getOwn(registry, id); + + if (hasProp(defined, id) && + (!mod || mod.defineEmitComplete)) { + if (name === 'defined') { + fn(defined[id]); + } + } else { + mod = getModule(depMap); + if (mod.error && name === 'error') { + fn(mod.error); + } else { + mod.on(name, fn); + } + } + } + + function onError(err, errback) { + var ids = err.requireModules, + notified = false; + + if (errback) { + errback(err); + } else { + each(ids, function (id) { + var mod = getOwn(registry, id); + if (mod) { + //Set error on module, so it skips timeout checks. + mod.error = err; + if (mod.events.error) { + notified = true; + mod.emit('error', err); + } + } + }); + + if (!notified) { + req.onError(err); + } + } + } + + /** + * Internal method to transfer globalQueue items to this context's + * defQueue. + */ + function takeGlobalQueue() { + //Push all the globalDefQueue items into the context's defQueue + if (globalDefQueue.length) { + //Array splice in the values since the context code has a + //local var ref to defQueue, so cannot just reassign the one + //on context. + apsp.apply(defQueue, + [defQueue.length, 0].concat(globalDefQueue)); + globalDefQueue = []; + } + } + + handlers = { + 'require': function (mod) { + if (mod.require) { + return mod.require; + } else { + return (mod.require = context.makeRequire(mod.map)); + } + }, + 'exports': function (mod) { + mod.usingExports = true; + if (mod.map.isDefine) { + if (mod.exports) { + return (defined[mod.map.id] = mod.exports); + } else { + return (mod.exports = defined[mod.map.id] = {}); + } + } + }, + 'module': function (mod) { + if (mod.module) { + return mod.module; + } else { + return (mod.module = { + id: mod.map.id, + uri: mod.map.url, + config: function () { + return getOwn(config.config, mod.map.id) || {}; + }, + exports: mod.exports || (mod.exports = {}) + }); + } + } + }; + + function cleanRegistry(id) { + //Clean up machinery used for waiting modules. + delete registry[id]; + delete enabledRegistry[id]; + } + + function breakCycle(mod, traced, processed) { + var id = mod.map.id; + + if (mod.error) { + mod.emit('error', mod.error); + } else { + traced[id] = true; + each(mod.depMaps, function (depMap, i) { + var depId = depMap.id, + dep = getOwn(registry, depId); + + //Only force things that have not completed + //being defined, so still in the registry, + //and only if it has not been matched up + //in the module already. + if (dep && !mod.depMatched[i] && !processed[depId]) { + if (getOwn(traced, depId)) { + mod.defineDep(i, defined[depId]); + mod.check(); //pass false? + } else { + breakCycle(dep, traced, processed); + } + } + }); + processed[id] = true; + } + } + + function checkLoaded() { + var err, usingPathFallback, + waitInterval = config.waitSeconds * 1000, + //It is possible to disable the wait interval by using waitSeconds of 0. + expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(), + noLoads = [], + reqCalls = [], + stillLoading = false, + needCycleCheck = true; + + //Do not bother if this call was a result of a cycle break. + if (inCheckLoaded) { + return; + } + + inCheckLoaded = true; + + //Figure out the state of all the modules. + eachProp(enabledRegistry, function (mod) { + var map = mod.map, + modId = map.id; + + //Skip things that are not enabled or in error state. + if (!mod.enabled) { + return; + } + + if (!map.isDefine) { + reqCalls.push(mod); + } + + if (!mod.error) { + //If the module should be executed, and it has not + //been inited and time is up, remember it. + if (!mod.inited && expired) { + if (hasPathFallback(modId)) { + usingPathFallback = true; + stillLoading = true; + } else { + noLoads.push(modId); + removeScript(modId); + } + } else if (!mod.inited && mod.fetched && map.isDefine) { + stillLoading = true; + if (!map.prefix) { + //No reason to keep looking for unfinished + //loading. If the only stillLoading is a + //plugin resource though, keep going, + //because it may be that a plugin resource + //is waiting on a non-plugin cycle. + return (needCycleCheck = false); + } + } + } + }); + + if (expired && noLoads.length) { + //If wait time expired, throw error of unloaded modules. + err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads); + err.contextName = context.contextName; + return onError(err); + } + + //Not expired, check for a cycle. + if (needCycleCheck) { + each(reqCalls, function (mod) { + breakCycle(mod, {}, {}); + }); + } + + //If still waiting on loads, and the waiting load is something + //other than a plugin resource, or there are still outstanding + //scripts, then just try back later. + if ((!expired || usingPathFallback) && stillLoading) { + //Something is still waiting to load. Wait for it, but only + //if a timeout is not already in effect. + if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { + checkLoadedTimeoutId = setTimeout(function () { + checkLoadedTimeoutId = 0; + checkLoaded(); + }, 50); + } + } + + inCheckLoaded = false; + } + + Module = function (map) { + this.events = getOwn(undefEvents, map.id) || {}; + this.map = map; + this.shim = getOwn(config.shim, map.id); + this.depExports = []; + this.depMaps = []; + this.depMatched = []; + this.pluginMaps = {}; + this.depCount = 0; + + /* this.exports this.factory + this.depMaps = [], + this.enabled, this.fetched + */ + }; + + Module.prototype = { + init: function (depMaps, factory, errback, options) { + options = options || {}; + + //Do not do more inits if already done. Can happen if there + //are multiple define calls for the same module. That is not + //a normal, common case, but it is also not unexpected. + if (this.inited) { + return; + } + + this.factory = factory; + + if (errback) { + //Register for errors on this module. + this.on('error', errback); + } else if (this.events.error) { + //If no errback already, but there are error listeners + //on this module, set up an errback to pass to the deps. + errback = bind(this, function (err) { + this.emit('error', err); + }); + } + + //Do a copy of the dependency array, so that + //source inputs are not modified. For example + //"shim" deps are passed in here directly, and + //doing a direct modification of the depMaps array + //would affect that config. + this.depMaps = depMaps && depMaps.slice(0); + + this.errback = errback; + + //Indicate this module has be initialized + this.inited = true; + + this.ignore = options.ignore; + + //Could have option to init this module in enabled mode, + //or could have been previously marked as enabled. However, + //the dependencies are not known until init is called. So + //if enabled previously, now trigger dependencies as enabled. + if (options.enabled || this.enabled) { + //Enable this module and dependencies. + //Will call this.check() + this.enable(); + } else { + this.check(); + } + }, + + defineDep: function (i, depExports) { + //Because of cycles, defined callback for a given + //export can be called more than once. + if (!this.depMatched[i]) { + this.depMatched[i] = true; + this.depCount -= 1; + this.depExports[i] = depExports; + } + }, + + fetch: function () { + if (this.fetched) { + return; + } + this.fetched = true; + + context.startTime = (new Date()).getTime(); + + var map = this.map; + + //If the manager is for a plugin managed resource, + //ask the plugin to load it now. + if (this.shim) { + context.makeRequire(this.map, { + enableBuildCallback: true + })(this.shim.deps || [], bind(this, function () { + return map.prefix ? this.callPlugin() : this.load(); + })); + } else { + //Regular dependency. + return map.prefix ? this.callPlugin() : this.load(); + } + }, + + load: function () { + var url = this.map.url; + + //Regular dependency. + if (!urlFetched[url]) { + urlFetched[url] = true; + context.load(this.map.id, url); + } + }, + + /** + * Checks if the module is ready to define itself, and if so, + * define it. + */ + check: function () { + if (!this.enabled || this.enabling) { + return; + } + + var err, cjsModule, + id = this.map.id, + depExports = this.depExports, + exports = this.exports, + factory = this.factory; + + if (!this.inited) { + this.fetch(); + } else if (this.error) { + this.emit('error', this.error); + } else if (!this.defining) { + //The factory could trigger another require call + //that would result in checking this module to + //define itself again. If already in the process + //of doing that, skip this work. + this.defining = true; + + if (this.depCount < 1 && !this.defined) { + if (isFunction(factory)) { + //If there is an error listener, favor passing + //to that instead of throwing an error. However, + //only do it for define()'d modules. require + //errbacks should not be called for failures in + //their callbacks (#699). However if a global + //onError is set, use that. + if ((this.events.error && this.map.isDefine) || + req.onError !== defaultOnError) { + try { + exports = context.execCb(id, factory, depExports, exports); + } catch (e) { + err = e; + } + } else { + exports = context.execCb(id, factory, depExports, exports); + } + + // Favor return value over exports. If node/cjs in play, + // then will not have a return value anyway. Favor + // module.exports assignment over exports object. + if (this.map.isDefine && exports === undefined) { + cjsModule = this.module; + if (cjsModule) { + exports = cjsModule.exports; + } else if (this.usingExports) { + //exports already set the defined value. + exports = this.exports; + } + } + + if (err) { + err.requireMap = this.map; + err.requireModules = this.map.isDefine ? [this.map.id] : null; + err.requireType = this.map.isDefine ? 'define' : 'require'; + return onError((this.error = err)); + } + + } else { + //Just a literal value + exports = factory; + } + + this.exports = exports; + + if (this.map.isDefine && !this.ignore) { + defined[id] = exports; + + if (req.onResourceLoad) { + req.onResourceLoad(context, this.map, this.depMaps); + } + } + + //Clean up + cleanRegistry(id); + + this.defined = true; + } + + //Finished the define stage. Allow calling check again + //to allow define notifications below in the case of a + //cycle. + this.defining = false; + + if (this.defined && !this.defineEmitted) { + this.defineEmitted = true; + this.emit('defined', this.exports); + this.defineEmitComplete = true; + } + + } + }, + + callPlugin: function () { + var map = this.map, + id = map.id, + //Map already normalized the prefix. + pluginMap = makeModuleMap(map.prefix); + + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(pluginMap); + + on(pluginMap, 'defined', bind(this, function (plugin) { + var load, normalizedMap, normalizedMod, + bundleId = getOwn(bundlesMap, this.map.id), + name = this.map.name, + parentName = this.map.parentMap ? this.map.parentMap.name : null, + localRequire = context.makeRequire(map.parentMap, { + enableBuildCallback: true + }); + + //If current map is not normalized, wait for that + //normalized name to load instead of continuing. + if (this.map.unnormalized) { + //Normalize the ID if the plugin allows it. + if (plugin.normalize) { + name = plugin.normalize(name, function (name) { + return normalize(name, parentName, true); + }) || ''; + } + + //prefix and name should already be normalized, no need + //for applying map config again either. + normalizedMap = makeModuleMap(map.prefix + '!' + name, + this.map.parentMap); + on(normalizedMap, + 'defined', bind(this, function (value) { + this.init([], function () { return value; }, null, { + enabled: true, + ignore: true + }); + })); + + normalizedMod = getOwn(registry, normalizedMap.id); + if (normalizedMod) { + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(normalizedMap); + + if (this.events.error) { + normalizedMod.on('error', bind(this, function (err) { + this.emit('error', err); + })); + } + normalizedMod.enable(); + } + + return; + } + + //If a paths config, then just load that file instead to + //resolve the plugin, as it is built into that paths layer. + if (bundleId) { + this.map.url = context.nameToUrl(bundleId); + this.load(); + return; + } + + load = bind(this, function (value) { + this.init([], function () { return value; }, null, { + enabled: true + }); + }); + + load.error = bind(this, function (err) { + this.inited = true; + this.error = err; + err.requireModules = [id]; + + //Remove temp unnormalized modules for this module, + //since they will never be resolved otherwise now. + eachProp(registry, function (mod) { + if (mod.map.id.indexOf(id + '_unnormalized') === 0) { + cleanRegistry(mod.map.id); + } + }); + + onError(err); + }); + + //Allow plugins to load other code without having to know the + //context or how to 'complete' the load. + load.fromText = bind(this, function (text, textAlt) { + /*jslint evil: true */ + var moduleName = map.name, + moduleMap = makeModuleMap(moduleName), + hasInteractive = useInteractive; + + //As of 2.1.0, support just passing the text, to reinforce + //fromText only being called once per resource. Still + //support old style of passing moduleName but discard + //that moduleName in favor of the internal ref. + if (textAlt) { + text = textAlt; + } + + //Turn off interactive script matching for IE for any define + //calls in the text, then turn it back on at the end. + if (hasInteractive) { + useInteractive = false; + } + + //Prime the system by creating a module instance for + //it. + getModule(moduleMap); + + //Transfer any config to this other module. + if (hasProp(config.config, id)) { + config.config[moduleName] = config.config[id]; + } + + try { + req.exec(text); + } catch (e) { + return onError(makeError('fromtexteval', + 'fromText eval for ' + id + + ' failed: ' + e, + e, + [id])); + } + + if (hasInteractive) { + useInteractive = true; + } + + //Mark this as a dependency for the plugin + //resource + this.depMaps.push(moduleMap); + + //Support anonymous modules. + context.completeLoad(moduleName); + + //Bind the value of that module to the value for this + //resource ID. + localRequire([moduleName], load); + }); + + //Use parentName here since the plugin's name is not reliable, + //could be some weird string with no path that actually wants to + //reference the parentName's path. + plugin.load(map.name, localRequire, load, config); + })); + + context.enable(pluginMap, this); + this.pluginMaps[pluginMap.id] = pluginMap; + }, + + enable: function () { + enabledRegistry[this.map.id] = this; + this.enabled = true; + + //Set flag mentioning that the module is enabling, + //so that immediate calls to the defined callbacks + //for dependencies do not trigger inadvertent load + //with the depCount still being zero. + this.enabling = true; + + //Enable each dependency + each(this.depMaps, bind(this, function (depMap, i) { + var id, mod, handler; + + if (typeof depMap === 'string') { + //Dependency needs to be converted to a depMap + //and wired up to this module. + depMap = makeModuleMap(depMap, + (this.map.isDefine ? this.map : this.map.parentMap), + false, + !this.skipMap); + this.depMaps[i] = depMap; + + handler = getOwn(handlers, depMap.id); + + if (handler) { + this.depExports[i] = handler(this); + return; + } + + this.depCount += 1; + + on(depMap, 'defined', bind(this, function (depExports) { + if (this.undefed) { + return; + } + this.defineDep(i, depExports); + this.check(); + })); + + if (this.errback) { + on(depMap, 'error', bind(this, this.errback)); + } else if (this.events.error) { + // No direct errback on this module, but something + // else is listening for errors, so be sure to + // propagate the error correctly. + on(depMap, 'error', bind(this, function(err) { + this.emit('error', err); + })); + } + } + + id = depMap.id; + mod = registry[id]; + + //Skip special modules like 'require', 'exports', 'module' + //Also, don't call enable if it is already enabled, + //important in circular dependency cases. + if (!hasProp(handlers, id) && mod && !mod.enabled) { + context.enable(depMap, this); + } + })); + + //Enable each plugin that is used in + //a dependency + eachProp(this.pluginMaps, bind(this, function (pluginMap) { + var mod = getOwn(registry, pluginMap.id); + if (mod && !mod.enabled) { + context.enable(pluginMap, this); + } + })); + + this.enabling = false; + + this.check(); + }, + + on: function (name, cb) { + var cbs = this.events[name]; + if (!cbs) { + cbs = this.events[name] = []; + } + cbs.push(cb); + }, + + emit: function (name, evt) { + each(this.events[name], function (cb) { + cb(evt); + }); + if (name === 'error') { + //Now that the error handler was triggered, remove + //the listeners, since this broken Module instance + //can stay around for a while in the registry. + delete this.events[name]; + } + } + }; + + function callGetModule(args) { + //Skip modules already defined. + if (!hasProp(defined, args[0])) { + getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]); + } + } + + function removeListener(node, func, name, ieName) { + //Favor detachEvent because of IE9 + //issue, see attachEvent/addEventListener comment elsewhere + //in this file. + if (node.detachEvent && !isOpera) { + //Probably IE. If not it will throw an error, which will be + //useful to know. + if (ieName) { + node.detachEvent(ieName, func); + } + } else { + node.removeEventListener(name, func, false); + } + } + + /** + * Given an event from a script node, get the requirejs info from it, + * and then removes the event listeners on the node. + * @param {Event} evt + * @returns {Object} + */ + function getScriptData(evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + var node = evt.currentTarget || evt.srcElement; + + //Remove the listeners once here. + removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange'); + removeListener(node, context.onScriptError, 'error'); + + return { + node: node, + id: node && node.getAttribute('data-requiremodule') + }; + } + + function intakeDefines() { + var args; + + //Any defined modules in the global queue, intake them now. + takeGlobalQueue(); + + //Make sure any remaining defQueue items get properly processed. + while (defQueue.length) { + args = defQueue.shift(); + if (args[0] === null) { + return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])); + } else { + //args are id, deps, factory. Should be normalized by the + //define() function. + callGetModule(args); + } + } + } + + context = { + config: config, + contextName: contextName, + registry: registry, + defined: defined, + urlFetched: urlFetched, + defQueue: defQueue, + Module: Module, + makeModuleMap: makeModuleMap, + nextTick: req.nextTick, + onError: onError, + + /** + * Set a configuration for the context. + * @param {Object} cfg config object to integrate. + */ + configure: function (cfg) { + //Make sure the baseUrl ends in a slash. + if (cfg.baseUrl) { + if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { + cfg.baseUrl += '/'; + } + } + + //Save off the paths since they require special processing, + //they are additive. + var shim = config.shim, + objs = { + paths: true, + bundles: true, + config: true, + map: true + }; + + eachProp(cfg, function (value, prop) { + if (objs[prop]) { + if (!config[prop]) { + config[prop] = {}; + } + mixin(config[prop], value, true, true); + } else { + config[prop] = value; + } + }); + + //Reverse map the bundles + if (cfg.bundles) { + eachProp(cfg.bundles, function (value, prop) { + each(value, function (v) { + if (v !== prop) { + bundlesMap[v] = prop; + } + }); + }); + } + + //Merge shim + if (cfg.shim) { + eachProp(cfg.shim, function (value, id) { + //Normalize the structure + if (isArray(value)) { + value = { + deps: value + }; + } + if ((value.exports || value.init) && !value.exportsFn) { + value.exportsFn = context.makeShimExports(value); + } + shim[id] = value; + }); + config.shim = shim; + } + + //Adjust packages if necessary. + if (cfg.packages) { + each(cfg.packages, function (pkgObj) { + var location, name; + + pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj; + + name = pkgObj.name; + location = pkgObj.location; + if (location) { + config.paths[name] = pkgObj.location; + } + + //Save pointer to main module ID for pkg name. + //Remove leading dot in main, so main paths are normalized, + //and remove any trailing .js, since different package + //envs have different conventions: some use a module name, + //some use a file name. + config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main') + .replace(currDirRegExp, '') + .replace(jsSuffixRegExp, ''); + }); + } + + //If there are any "waiting to execute" modules in the registry, + //update the maps for them, since their info, like URLs to load, + //may have changed. + eachProp(registry, function (mod, id) { + //If module already has init called, since it is too + //late to modify them, and ignore unnormalized ones + //since they are transient. + if (!mod.inited && !mod.map.unnormalized) { + mod.map = makeModuleMap(id); + } + }); + + //If a deps array or a config callback is specified, then call + //require with those args. This is useful when require is defined as a + //config object before require.js is loaded. + if (cfg.deps || cfg.callback) { + context.require(cfg.deps || [], cfg.callback); + } + }, + + makeShimExports: function (value) { + function fn() { + var ret; + if (value.init) { + ret = value.init.apply(global, arguments); + } + return ret || (value.exports && getGlobal(value.exports)); + } + return fn; + }, + + makeRequire: function (relMap, options) { + options = options || {}; + + function localRequire(deps, callback, errback) { + var id, map, requireMod; + + if (options.enableBuildCallback && callback && isFunction(callback)) { + callback.__requireJsBuild = true; + } + + if (typeof deps === 'string') { + if (isFunction(callback)) { + //Invalid call + return onError(makeError('requireargs', 'Invalid require call'), errback); + } + + //If require|exports|module are requested, get the + //value for them from the special handlers. Caveat: + //this only works while module is being defined. + if (relMap && hasProp(handlers, deps)) { + return handlers[deps](registry[relMap.id]); + } + + //Synchronous access to one module. If require.get is + //available (as in the Node adapter), prefer that. + if (req.get) { + return req.get(context, deps, relMap, localRequire); + } + + //Normalize module name, if it contains . or .. + map = makeModuleMap(deps, relMap, false, true); + id = map.id; + + if (!hasProp(defined, id)) { + return onError(makeError('notloaded', 'Module name "' + + id + + '" has not been loaded yet for context: ' + + contextName + + (relMap ? '' : '. Use require([])'))); + } + return defined[id]; + } + + //Grab defines waiting in the global queue. + intakeDefines(); + + //Mark all the dependencies as needing to be loaded. + context.nextTick(function () { + //Some defines could have been added since the + //require call, collect them. + intakeDefines(); + + requireMod = getModule(makeModuleMap(null, relMap)); + + //Store if map config should be applied to this require + //call for dependencies. + requireMod.skipMap = options.skipMap; + + requireMod.init(deps, callback, errback, { + enabled: true + }); + + checkLoaded(); + }); + + return localRequire; + } + + mixin(localRequire, { + isBrowser: isBrowser, + + /** + * Converts a module name + .extension into an URL path. + * *Requires* the use of a module name. It does not support using + * plain URLs like nameToUrl. + */ + toUrl: function (moduleNamePlusExt) { + var ext, + index = moduleNamePlusExt.lastIndexOf('.'), + segment = moduleNamePlusExt.split('/')[0], + isRelative = segment === '.' || segment === '..'; + + //Have a file extension alias, and it is not the + //dots from a relative path. + if (index !== -1 && (!isRelative || index > 1)) { + ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length); + moduleNamePlusExt = moduleNamePlusExt.substring(0, index); + } + + return context.nameToUrl(normalize(moduleNamePlusExt, + relMap && relMap.id, true), ext, true); + }, + + defined: function (id) { + return hasProp(defined, makeModuleMap(id, relMap, false, true).id); + }, + + specified: function (id) { + id = makeModuleMap(id, relMap, false, true).id; + return hasProp(defined, id) || hasProp(registry, id); + } + }); + + //Only allow undef on top level require calls + if (!relMap) { + localRequire.undef = function (id) { + //Bind any waiting define() calls to this context, + //fix for #408 + takeGlobalQueue(); + + var map = makeModuleMap(id, relMap, true), + mod = getOwn(registry, id); + + mod.undefed = true; + removeScript(id); + + delete defined[id]; + delete urlFetched[map.url]; + delete undefEvents[id]; + + //Clean queued defines too. Go backwards + //in array so that the splices do not + //mess up the iteration. + eachReverse(defQueue, function(args, i) { + if(args[0] === id) { + defQueue.splice(i, 1); + } + }); + + if (mod) { + //Hold on to listeners in case the + //module will be attempted to be reloaded + //using a different config. + if (mod.events.defined) { + undefEvents[id] = mod.events; + } + + cleanRegistry(id); + } + }; + } + + return localRequire; + }, + + /** + * Called to enable a module if it is still in the registry + * awaiting enablement. A second arg, parent, the parent module, + * is passed in for context, when this method is overridden by + * the optimizer. Not shown here to keep code compact. + */ + enable: function (depMap) { + var mod = getOwn(registry, depMap.id); + if (mod) { + getModule(depMap).enable(); + } + }, + + /** + * Internal method used by environment adapters to complete a load event. + * A load event could be a script load or just a load pass from a synchronous + * load call. + * @param {String} moduleName the name of the module to potentially complete. + */ + completeLoad: function (moduleName) { + var found, args, mod, + shim = getOwn(config.shim, moduleName) || {}, + shExports = shim.exports; + + takeGlobalQueue(); + + while (defQueue.length) { + args = defQueue.shift(); + if (args[0] === null) { + args[0] = moduleName; + //If already found an anonymous module and bound it + //to this name, then this is some other anon module + //waiting for its completeLoad to fire. + if (found) { + break; + } + found = true; + } else if (args[0] === moduleName) { + //Found matching define call for this script! + found = true; + } + + callGetModule(args); + } + + //Do this after the cycle of callGetModule in case the result + //of those calls/init calls changes the registry. + mod = getOwn(registry, moduleName); + + if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { + if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { + if (hasPathFallback(moduleName)) { + return; + } else { + return onError(makeError('nodefine', + 'No define call for ' + moduleName, + null, + [moduleName])); + } + } else { + //A script that does not call define(), so just simulate + //the call for it. + callGetModule([moduleName, (shim.deps || []), shim.exportsFn]); + } + } + + checkLoaded(); + }, + + /** + * Converts a module name to a file path. Supports cases where + * moduleName may actually be just an URL. + * Note that it **does not** call normalize on the moduleName, + * it is assumed to have already been normalized. This is an + * internal API, not a public one. Use toUrl for the public API. + */ + nameToUrl: function (moduleName, ext, skipExt) { + var paths, syms, i, parentModule, url, + parentPath, bundleId, + pkgMain = getOwn(config.pkgs, moduleName); + + if (pkgMain) { + moduleName = pkgMain; + } + + bundleId = getOwn(bundlesMap, moduleName); + + if (bundleId) { + return context.nameToUrl(bundleId, ext, skipExt); + } + + //If a colon is in the URL, it indicates a protocol is used and it is just + //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) + //or ends with .js, then assume the user meant to use an url and not a module id. + //The slash is important for protocol-less URLs as well as full paths. + if (req.jsExtRegExp.test(moduleName)) { + //Just a plain path, not module name lookup, so just return it. + //Add extension if it is included. This is a bit wonky, only non-.js things pass + //an extension, this method probably needs to be reworked. + url = moduleName + (ext || ''); + } else { + //A module that needs to be converted to a path. + paths = config.paths; + + syms = moduleName.split('/'); + //For each module name segment, see if there is a path + //registered for it. Start with most specific name + //and work up from it. + for (i = syms.length; i > 0; i -= 1) { + parentModule = syms.slice(0, i).join('/'); + + parentPath = getOwn(paths, parentModule); + if (parentPath) { + //If an array, it means there are a few choices, + //Choose the one that is desired + if (isArray(parentPath)) { + parentPath = parentPath[0]; + } + syms.splice(0, i, parentPath); + break; + } + } + + //Join the path parts together, then figure out if baseUrl is needed. + url = syms.join('/'); + url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js')); + url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url; + } + + return config.urlArgs ? url + + ((url.indexOf('?') === -1 ? '?' : '&') + + config.urlArgs) : url; + }, + + //Delegates to req.load. Broken out as a separate function to + //allow overriding in the optimizer. + load: function (id, url) { + req.load(context, id, url); + }, + + /** + * Executes a module callback function. Broken out as a separate function + * solely to allow the build system to sequence the files in the built + * layer in the right sequence. + * + * @private + */ + execCb: function (name, callback, args, exports) { + return callback.apply(exports, args); + }, + + /** + * callback for script loads, used to check status of loading. + * + * @param {Event} evt the event from the browser for the script + * that was loaded. + */ + onScriptLoad: function (evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + if (evt.type === 'load' || + (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) { + //Reset interactive script so a script node is not held onto for + //to long. + interactiveScript = null; + + //Pull out the name of the module and the context. + var data = getScriptData(evt); + context.completeLoad(data.id); + } + }, + + /** + * Callback for script errors. + */ + onScriptError: function (evt) { + var data = getScriptData(evt); + if (!hasPathFallback(data.id)) { + return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id])); + } + } + }; + + context.require = context.makeRequire(); + return context; + } + + /** + * Main entry point. + * + * If the only argument to require is a string, then the module that + * is represented by that string is fetched for the appropriate context. + * + * If the first argument is an array, then it will be treated as an array + * of dependency string names to fetch. An optional function callback can + * be specified to execute when all of those dependencies are available. + * + * Make a local req variable to help Caja compliance (it assumes things + * on a require that are not standardized), and to give a short + * name for minification/local scope use. + */ + req = requirejs = function (deps, callback, errback, optional) { + + //Find the right context, use default + var context, config, + contextName = defContextName; + + // Determine if have config object in the call. + if (!isArray(deps) && typeof deps !== 'string') { + // deps is a config object + config = deps; + if (isArray(callback)) { + // Adjust args if there are dependencies + deps = callback; + callback = errback; + errback = optional; + } else { + deps = []; + } + } + + if (config && config.context) { + contextName = config.context; + } + + context = getOwn(contexts, contextName); + if (!context) { + context = contexts[contextName] = req.s.newContext(contextName); + } + + if (config) { + context.configure(config); + } + + return context.require(deps, callback, errback); + }; + + /** + * Support require.config() to make it easier to cooperate with other + * AMD loaders on globally agreed names. + */ + req.config = function (config) { + return req(config); + }; + + /** + * Execute something after the current tick + * of the event loop. Override for other envs + * that have a better solution than setTimeout. + * @param {Function} fn function to execute later. + */ + req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) { + setTimeout(fn, 4); + } : function (fn) { fn(); }; + + /** + * Export require as a global, but only if it does not already exist. + */ + if (!require) { + require = req; + } + + req.version = version; + + //Used to filter out dependencies that are already paths. + req.jsExtRegExp = /^\/|:|\?|\.js$/; + req.isBrowser = isBrowser; + s = req.s = { + contexts: contexts, + newContext: newContext + }; + + //Create default context. + req({}); + + //Exports some context-sensitive methods on global require. + each([ + 'toUrl', + 'undef', + 'defined', + 'specified' + ], function (prop) { + //Reference from contexts instead of early binding to default context, + //so that during builds, the latest instance of the default context + //with its config gets used. + req[prop] = function () { + var ctx = contexts[defContextName]; + return ctx.require[prop].apply(ctx, arguments); + }; + }); + + if (isBrowser) { + head = s.head = document.getElementsByTagName('head')[0]; + //If BASE tag is in play, using appendChild is a problem for IE6. + //When that browser dies, this can be removed. Details in this jQuery bug: + //http://dev.jquery.com/ticket/2709 + baseElement = document.getElementsByTagName('base')[0]; + if (baseElement) { + head = s.head = baseElement.parentNode; + } + } + + /** + * Any errors that require explicitly generates will be passed to this + * function. Intercept/override it if you want custom error handling. + * @param {Error} err the error object. + */ + req.onError = defaultOnError; + + /** + * Creates the node for the load command. Only used in browser envs. + */ + req.createNode = function (config, moduleName, url) { + var node = config.xhtml ? + document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : + document.createElement('script'); + node.type = config.scriptType || 'text/javascript'; + node.charset = 'utf-8'; + node.async = true; + return node; + }; + + /** + * Does the request to load a module for the browser case. + * Make this a separate function to allow other environments + * to override it. + * + * @param {Object} context the require context to find state. + * @param {String} moduleName the name of the module. + * @param {Object} url the URL to the module. + */ + req.load = function (context, moduleName, url) { + var config = (context && context.config) || {}, + node; + if (isBrowser) { + //In the browser so use a script tag + node = req.createNode(config, moduleName, url); + + node.setAttribute('data-requirecontext', context.contextName); + node.setAttribute('data-requiremodule', moduleName); + + //Set up load listener. Test attachEvent first because IE9 has + //a subtle issue in its addEventListener and script onload firings + //that do not match the behavior of all other browsers with + //addEventListener support, which fire the onload event for a + //script right after the script execution. See: + //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution + //UNFORTUNATELY Opera implements attachEvent but does not follow the script + //script execution mode. + if (node.attachEvent && + //Check if node.attachEvent is artificially added by custom script or + //natively supported by browser + //read https://github.com/jrburke/requirejs/issues/187 + //if we can NOT find [native code] then it must NOT natively supported. + //in IE8, node.attachEvent does not have toString() + //Note the test for "[native code" with no closing brace, see: + //https://github.com/jrburke/requirejs/issues/273 + !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && + !isOpera) { + //Probably IE. IE (at least 6-8) do not fire + //script onload right after executing the script, so + //we cannot tie the anonymous define call to a name. + //However, IE reports the script as being in 'interactive' + //readyState at the time of the define call. + useInteractive = true; + + node.attachEvent('onreadystatechange', context.onScriptLoad); + //It would be great to add an error handler here to catch + //404s in IE9+. However, onreadystatechange will fire before + //the error handler, so that does not help. If addEventListener + //is used, then IE will fire error before load, but we cannot + //use that pathway given the connect.microsoft.com issue + //mentioned above about not doing the 'script execute, + //then fire the script load event listener before execute + //next script' that other browsers do. + //Best hope: IE10 fixes the issues, + //and then destroys all installs of IE 6-9. + //node.attachEvent('onerror', context.onScriptError); + } else { + node.addEventListener('load', context.onScriptLoad, false); + node.addEventListener('error', context.onScriptError, false); + } + node.src = url; + + //For some cache cases in IE 6-8, the script executes before the end + //of the appendChild execution, so to tie an anonymous define + //call to the module name (which is stored on the node), hold on + //to a reference to this node, but clear after the DOM insertion. + currentlyAddingScript = node; + if (baseElement) { + head.insertBefore(node, baseElement); + } else { + head.appendChild(node); + } + currentlyAddingScript = null; + + return node; + } else if (isWebWorker) { + try { + //In a web worker, use importScripts. This is not a very + //efficient use of importScripts, importScripts will block until + //its script is downloaded and evaluated. However, if web workers + //are in play, the expectation that a build has been done so that + //only one script needs to be loaded anyway. This may need to be + //reevaluated if other use cases become common. + importScripts(url); + + //Account for anonymous modules + context.completeLoad(moduleName); + } catch (e) { + context.onError(makeError('importscripts', + 'importScripts failed for ' + + moduleName + ' at ' + url, + e, + [moduleName])); + } + } + }; + + function getInteractiveScript() { + if (interactiveScript && interactiveScript.readyState === 'interactive') { + return interactiveScript; + } + + eachReverse(scripts(), function (script) { + if (script.readyState === 'interactive') { + return (interactiveScript = script); + } + }); + return interactiveScript; + } + + //Look for a data-main script attribute, which could also adjust the baseUrl. + if (isBrowser && !cfg.skipDataMain) { + //Figure out baseUrl. Get it from the script tag with require.js in it. + eachReverse(scripts(), function (script) { + //Set the 'head' where we can append children by + //using the script's parent. + if (!head) { + head = script.parentNode; + } + + //Look for a data-main attribute to set main script for the page + //to load. If it is there, the path to data main becomes the + //baseUrl, if it is not already set. + dataMain = script.getAttribute('data-main'); + if (dataMain) { + //Preserve dataMain in case it is a path (i.e. contains '?') + mainScript = dataMain; + + //Set final baseUrl if there is not already an explicit one. + if (!cfg.baseUrl) { + //Pull off the directory of data-main for use as the + //baseUrl. + src = mainScript.split('/'); + mainScript = src.pop(); + subPath = src.length ? src.join('/') + '/' : './'; + + cfg.baseUrl = subPath; + } + + //Strip off any trailing .js since mainScript is now + //like a module name. + mainScript = mainScript.replace(jsSuffixRegExp, ''); + + //If mainScript is still a path, fall back to dataMain + if (req.jsExtRegExp.test(mainScript)) { + mainScript = dataMain; + } + + //Put the data-main script in the files to load. + cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]; + + return true; + } + }); + } + + /** + * The function that handles definitions of modules. Differs from + * require() in that a string for the module should be the first argument, + * and the function to execute after dependencies are loaded should + * return a value to define the module corresponding to the first argument's + * name. + */ + define = function (name, deps, callback) { + var node, context; + + //Allow for anonymous modules + if (typeof name !== 'string') { + //Adjust args appropriately + callback = deps; + deps = name; + name = null; + } + + //This module may not have dependencies + if (!isArray(deps)) { + callback = deps; + deps = null; + } + + //If no name, and callback is a function, then figure out if it a + //CommonJS thing with dependencies. + if (!deps && isFunction(callback)) { + deps = []; + //Remove comments from the callback string, + //look for require calls, and pull them into the dependencies, + //but only if there are function args. + if (callback.length) { + callback + .toString() + .replace(commentRegExp, '') + .replace(cjsRequireRegExp, function (match, dep) { + deps.push(dep); + }); + + //May be a CommonJS thing even without require calls, but still + //could use exports, and module. Avoid doing exports and module + //work though if it just needs require. + //REQUIRES the function to expect the CommonJS variables in the + //order listed below. + deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps); + } + } + + //If in IE 6-8 and hit an anonymous define() call, do the interactive + //work. + if (useInteractive) { + node = currentlyAddingScript || getInteractiveScript(); + if (node) { + if (!name) { + name = node.getAttribute('data-requiremodule'); + } + context = contexts[node.getAttribute('data-requirecontext')]; + } + } + + //Always save off evaluating the def call until the script onload handler. + //This allows multiple modules to be in a file without prematurely + //tracing dependencies, and allows for anonymous module support, + //where the module name is not known until the script onload event + //occurs. If no context, use the global queue, and get it processed + //in the onscript load callback. + (context ? context.defQueue : globalDefQueue).push([name, deps, callback]); + }; + + define.amd = { + jQuery: true + }; + + + /** + * Executes the text. Normally just uses eval, but can be modified + * to use a better, environment-specific call. Only used for transpiling + * loader plugins, not for plain JS modules. + * @param {String} text the text to execute/evaluate. + */ + req.exec = function (text) { + /*jslint evil: true */ + return eval(text); + }; + + //Set up with config info. + req(cfg); +}(this)); diff --git a/demo/libs/requirejs.min.js b/demo/libs/requirejs.min.js deleted file mode 100644 index ae76c97..0000000 --- a/demo/libs/requirejs.min.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - RequireJS 2.1.16 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. - Available via the MIT or new BSD license. - see: http://github.com/jrburke/requirejs for details -*/ -var requirejs,require,define; -(function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;dthis.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&& -(f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a= -this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f); -if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval", -"fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.defineDep(b, -a);this.check()}));this.errback?q(a,"error",u(this,this.errback)):this.events.error&&q(a,"error",u(this,function(a){this.emit("error",a)}))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:j,contextName:b, -registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p,nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a); -b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b,a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,e){function j(c,d,m){var n, -q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild=!0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,{isBrowser:z,toUrl:function(b){var d, -e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!==e&&(!("."===k||".."===k)||1e.attachEvent.toString().indexOf("[native code"))&& -!Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)):(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=I,q.baseUrl||(E=s.split("/"), -s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl=O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"=== -b.readyState)return N=b}),e=N;e&&(b||(b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this); \ No newline at end of file diff --git a/demo/main-built.js b/demo/main-built.js index c8dce31..aeaf49b 100644 --- a/demo/main-built.js +++ b/demo/main-built.js @@ -18,31 +18,31 @@ define('es6',[ define('es6!src/sum',["exports", "module"], function (exports, module) { - + "use strict"; module.exports = function (a, b) { return a + b; }; }); -define('es6!src/class',["exports", "es6!src/sum"], function (exports, _es6SrcSum) { - +define('es6!src/class',['exports', 'es6!src/sum'], function (exports, _es6SrcSum) { + 'use strict'; - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; + var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - var sum = _interopRequire(_es6SrcSum); + var _sum = _interopRequire(_es6SrcSum); - console.log(sum(1, 2)); + console.log(_sum(1, 2)); var A = function A(a) { _classCallCheck(this, A); - console.log("Hello " + a); + console.log('Hello ' + a); }; - new A("world!"); + new A('world!'); }); require(['es6!src/class']); define("src/index", function(){}); diff --git a/external-helpers.js b/external-helpers.js new file mode 100644 index 0000000..e69de29 diff --git a/package.json b/package.json index 31000fa..e3472b3 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,6 @@ "author": "Michael ", "license": "MIT", "devDependencies": { - "requirejs": "^2.1.16" + "requirejs": "^2.1.17" } } diff --git a/polyfill.js b/polyfill.js new file mode 100644 index 0000000..1b1e166 --- /dev/null +++ b/polyfill.js @@ -0,0 +1,3009 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o Array#indexOf +// true -> Array#includes +var $ = require('./$'); +module.exports = function(IS_INCLUDES){ + return function(el /*, fromIndex = 0 */){ + var O = $.toObject(this) + , length = $.toLength(O.length) + , index = $.toIndex(arguments[1], length) + , value; + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index; + } return !IS_INCLUDES && -1; + }; +}; +},{"./$":15}],3:[function(require,module,exports){ +'use strict'; +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var $ = require('./$') + , ctx = require('./$.ctx'); +module.exports = function(TYPE){ + var IS_MAP = TYPE == 1 + , IS_FILTER = TYPE == 2 + , IS_SOME = TYPE == 3 + , IS_EVERY = TYPE == 4 + , IS_FIND_INDEX = TYPE == 6 + , NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + return function(callbackfn/*, that = undefined */){ + var O = Object($.assertDefined(this)) + , self = $.ES5Object(O) + , f = ctx(callbackfn, arguments[1], 3) + , length = $.toLength(self.length) + , index = 0 + , result = IS_MAP ? Array(length) : IS_FILTER ? [] : undefined + , val, res; + for(;length > index; index++)if(NO_HOLES || index in self){ + val = self[index]; + res = f(val, index, O); + if(TYPE){ + if(IS_MAP)result[index] = res; // map + else if(res)switch(TYPE){ + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if(IS_EVERY)return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; +},{"./$":15,"./$.ctx":10}],4:[function(require,module,exports){ +var $ = require('./$'); +function assert(condition, msg1, msg2){ + if(!condition)throw TypeError(msg2 ? msg1 + msg2 : msg1); +} +assert.def = $.assertDefined; +assert.fn = function(it){ + if(!$.isFunction(it))throw TypeError(it + ' is not a function!'); + return it; +}; +assert.obj = function(it){ + if(!$.isObject(it))throw TypeError(it + ' is not an object!'); + return it; +}; +assert.inst = function(it, Constructor, name){ + if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!"); + return it; +}; +module.exports = assert; +},{"./$":15}],5:[function(require,module,exports){ +var $ = require('./$'); +// 19.1.2.1 Object.assign(target, source, ...) +module.exports = Object.assign || function(target, source){ // eslint-disable-line no-unused-vars + var T = Object($.assertDefined(target)) + , l = arguments.length + , i = 1; + while(l > i){ + var S = $.ES5Object(arguments[i++]) + , keys = $.getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)T[key = keys[j++]] = S[key]; + } + return T; +}; +},{"./$":15}],6:[function(require,module,exports){ +var $ = require('./$') + , TAG = require('./$.wks')('toStringTag') + , toString = {}.toString; +function cof(it){ + return toString.call(it).slice(8, -1); +} +cof.classof = function(it){ + var O, T; + return it == undefined ? it === undefined ? 'Undefined' : 'Null' + : typeof (T = (O = Object(it))[TAG]) == 'string' ? T : cof(O); +}; +cof.set = function(it, tag, stat){ + if(it && !$.has(it = stat ? it : it.prototype, TAG))$.hide(it, TAG, tag); +}; +module.exports = cof; +},{"./$":15,"./$.wks":26}],7:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , ctx = require('./$.ctx') + , safe = require('./$.uid').safe + , assert = require('./$.assert') + , $iter = require('./$.iter') + , has = $.has + , set = $.set + , isObject = $.isObject + , hide = $.hide + , step = $iter.step + , isFrozen = Object.isFrozen || $.core.Object.isFrozen + , ID = safe('id') + , O1 = safe('O1') + , LAST = safe('last') + , FIRST = safe('first') + , ITER = safe('iter') + , SIZE = $.DESC ? safe('size') : 'size' + , id = 0; + +function fastKey(it, create){ + // return primitive with prefix + if(!isObject(it))return (typeof it == 'string' ? 'S' : 'P') + it; + // can't set id to frozen object + if(isFrozen(it))return 'F'; + if(!has(it, ID)){ + // not necessary to add id + if(!create)return 'E'; + // add missing object id + hide(it, ID, ++id); + // return object id with prefix + } return 'O' + it[ID]; +} + +function getEntry(that, key){ + // fast case + var index = fastKey(key), entry; + if(index != 'F')return that[O1][index]; + // frozen object case + for(entry = that[FIRST]; entry; entry = entry.n){ + if(entry.k == key)return entry; + } +} + +module.exports = { + getConstructor: function(NAME, IS_MAP, ADDER){ + function C(iterable){ + var that = assert.inst(this, C, NAME); + set(that, O1, $.create(null)); + set(that, SIZE, 0); + set(that, LAST, undefined); + set(that, FIRST, undefined); + if(iterable != undefined)$iter.forOf(iterable, IS_MAP, that[ADDER], that); + } + $.mix(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function(){ + for(var that = this, data = that[O1], entry = that[FIRST]; entry; entry = entry.n){ + entry.r = true; + if(entry.p)entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that[FIRST] = that[LAST] = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function(key){ + var that = this + , entry = getEntry(that, key); + if(entry){ + var next = entry.n + , prev = entry.p; + delete that[O1][entry.i]; + entry.r = true; + if(prev)prev.n = next; + if(next)next.p = prev; + if(that[FIRST] == entry)that[FIRST] = next; + if(that[LAST] == entry)that[LAST] = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function(callbackfn /*, that = undefined */){ + var f = ctx(callbackfn, arguments[1], 3) + , entry; + while(entry = entry ? entry.n : this[FIRST]){ + f(entry.v, entry.k, this); + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function(key){ + return !!getEntry(this, key); + } + }); + if($.DESC)$.setDesc(C.prototype, 'size', { + get: function(){ + return assert.def(this[SIZE]); + } + }); + return C; + }, + def: function(that, key, value){ + var entry = getEntry(that, key) + , prev, index; + // change existing entry + if(entry){ + entry.v = value; + // create new entry + } else { + that[LAST] = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that[LAST], // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if(!that[FIRST])that[FIRST] = entry; + if(prev)prev.n = entry; + that[SIZE]++; + // add to index + if(index != 'F')that[O1][index] = entry; + } return that; + }, + getEntry: getEntry, + getIterConstructor: function(){ + return function(iterated, kind){ + set(this, ITER, {o: iterated, k: kind}); + }; + }, + next: function(){ + var iter = this[ITER] + , kind = iter.k + , entry = iter.l; + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + // get next entry + if(!iter.o || !(iter.l = entry = entry ? entry.n : iter.o[FIRST])){ + // or finish the iteration + iter.o = undefined; + return step(1); + } + // return step by kind + if(kind == 'key' )return step(0, entry.k); + if(kind == 'value')return step(0, entry.v); + return step(0, [entry.k, entry.v]); + } +}; +},{"./$":15,"./$.assert":4,"./$.ctx":10,"./$.iter":14,"./$.uid":24}],8:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , safe = require('./$.uid').safe + , assert = require('./$.assert') + , forOf = require('./$.iter').forOf + , has = $.has + , isObject = $.isObject + , hide = $.hide + , isFrozen = Object.isFrozen || $.core.Object.isFrozen + , id = 0 + , ID = safe('id') + , WEAK = safe('weak') + , LEAK = safe('leak') + , method = require('./$.array-methods') + , find = method(5) + , findIndex = method(6); +function findFrozen(store, key){ + return find.call(store.array, function(it){ + return it[0] === key; + }); +} +// fallback for frozen keys +function leakStore(that){ + return that[LEAK] || hide(that, LEAK, { + array: [], + get: function(key){ + var entry = findFrozen(this, key); + if(entry)return entry[1]; + }, + has: function(key){ + return !!findFrozen(this, key); + }, + set: function(key, value){ + var entry = findFrozen(this, key); + if(entry)entry[1] = value; + else this.array.push([key, value]); + }, + 'delete': function(key){ + var index = findIndex.call(this.array, function(it){ + return it[0] === key; + }); + if(~index)this.array.splice(index, 1); + return !!~index; + } + })[LEAK]; +} + +module.exports = { + getConstructor: function(NAME, IS_MAP, ADDER){ + function C(iterable){ + $.set(assert.inst(this, C, NAME), ID, id++); + if(iterable != undefined)forOf(iterable, IS_MAP, this[ADDER], this); + } + $.mix(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function(key){ + if(!isObject(key))return false; + if(isFrozen(key))return leakStore(this)['delete'](key); + return has(key, WEAK) && has(key[WEAK], this[ID]) && delete key[WEAK][this[ID]]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function(key){ + if(!isObject(key))return false; + if(isFrozen(key))return leakStore(this).has(key); + return has(key, WEAK) && has(key[WEAK], this[ID]); + } + }); + return C; + }, + def: function(that, key, value){ + if(isFrozen(assert.obj(key))){ + leakStore(that).set(key, value); + } else { + has(key, WEAK) || hide(key, WEAK, {}); + key[WEAK][that[ID]] = value; + } return that; + }, + leakStore: leakStore, + WEAK: WEAK, + ID: ID +}; +},{"./$":15,"./$.array-methods":3,"./$.assert":4,"./$.iter":14,"./$.uid":24}],9:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , $def = require('./$.def') + , $iter = require('./$.iter') + , assertInstance = require('./$.assert').inst; + +module.exports = function(NAME, methods, common, IS_MAP, isWeak){ + var Base = $.g[NAME] + , C = Base + , ADDER = IS_MAP ? 'set' : 'add' + , proto = C && C.prototype + , O = {}; + function fixMethod(KEY, CHAIN){ + var method = proto[KEY]; + if($.FW)proto[KEY] = function(a, b){ + var result = method.call(this, a === 0 ? 0 : a, b); + return CHAIN ? this : result; + }; + } + if(!$.isFunction(C) || !(isWeak || !$iter.BUGGY && proto.forEach && proto.entries)){ + // create collection constructor + C = common.getConstructor(NAME, IS_MAP, ADDER); + $.mix(C.prototype, methods); + } else { + var inst = new C + , chain = inst[ADDER](isWeak ? {} : -0, 1) + , buggyZero; + // wrap for init collections from iterable + if($iter.fail(function(iter){ + new C(iter); // eslint-disable-line no-new + }) || $iter.DANGER_CLOSING){ + C = function(iterable){ + assertInstance(this, C, NAME); + var that = new Base; + if(iterable != undefined)$iter.forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }; + C.prototype = proto; + if($.FW)proto.constructor = C; + } + isWeak || inst.forEach(function(val, key){ + buggyZero = 1 / key === -Infinity; + }); + // fix converting -0 key to +0 + if(buggyZero){ + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + // + fix .add & .set for chaining + if(buggyZero || chain !== inst)fixMethod(ADDER, true); + } + + require('./$.cof').set(C, NAME); + require('./$.species')(C); + + O[NAME] = C; + $def($def.G + $def.W + $def.F * (C != Base), O); + + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + if(!isWeak)$iter.std( + C, NAME, + common.getIterConstructor(), common.next, + IS_MAP ? 'key+value' : 'value' , !IS_MAP, true + ); + + return C; +}; +},{"./$":15,"./$.assert":4,"./$.cof":6,"./$.def":11,"./$.iter":14,"./$.species":21}],10:[function(require,module,exports){ +// Optional / simple context binding +var assertFunction = require('./$.assert').fn; +module.exports = function(fn, that, length){ + assertFunction(fn); + if(~length && that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } return function(/* ...args */){ + return fn.apply(that, arguments); + }; +}; +},{"./$.assert":4}],11:[function(require,module,exports){ +var $ = require('./$') + , global = $.g + , core = $.core + , isFunction = $.isFunction; +function ctx(fn, that){ + return function(){ + return fn.apply(that, arguments); + }; +} +global.core = core; +// type bitmap +$def.F = 1; // forced +$def.G = 2; // global +$def.S = 4; // static +$def.P = 8; // proto +$def.B = 16; // bind +$def.W = 32; // wrap +function $def(type, name, source){ + var key, own, out, exp + , isGlobal = type & $def.G + , target = isGlobal ? global : type & $def.S + ? global[name] : (global[name] || {}).prototype + , exports = isGlobal ? core : core[name] || (core[name] = {}); + if(isGlobal)source = name; + for(key in source){ + // contains in native + own = !(type & $def.F) && target && key in target; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + if(type & $def.B && own)exp = ctx(out, global); + else exp = type & $def.P && isFunction(out) ? ctx(Function.call, out) : out; + // extend global + if(target && !own){ + if(isGlobal)target[key] = out; + else delete target[key] && $.hide(target, key, out); + } + // export + if(exports[key] != out)$.hide(exports, key, exp); + } +} +module.exports = $def; +},{"./$":15}],12:[function(require,module,exports){ +module.exports = function($){ + $.FW = true; + $.path = $.g; + return $; +}; +},{}],13:[function(require,module,exports){ +// Fast apply +// http://jsperf.lnkit.com/fast-apply/5 +module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + case 5: return un ? fn(args[0], args[1], args[2], args[3], args[4]) + : fn.call(that, args[0], args[1], args[2], args[3], args[4]); + } return fn.apply(that, args); +}; +},{}],14:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , ctx = require('./$.ctx') + , cof = require('./$.cof') + , $def = require('./$.def') + , assertObject = require('./$.assert').obj + , SYMBOL_ITERATOR = require('./$.wks')('iterator') + , FF_ITERATOR = '@@iterator' + , Iterators = {} + , IteratorPrototype = {}; +// Safari has byggy iterators w/o `next` +var BUGGY = 'keys' in [] && !('next' in [].keys()); +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +setIterator(IteratorPrototype, $.that); +function setIterator(O, value){ + $.hide(O, SYMBOL_ITERATOR, value); + // Add iterator for FF iterator protocol + if(FF_ITERATOR in [])$.hide(O, FF_ITERATOR, value); +} +function defineIterator(Constructor, NAME, value, DEFAULT){ + var proto = Constructor.prototype + , iter = proto[SYMBOL_ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] || value; + // Define iterator + if($.FW)setIterator(proto, iter); + if(iter !== value){ + var iterProto = $.getProto(iter.call(new Constructor)); + // Set @@toStringTag to native iterators + cof.set(iterProto, NAME + ' Iterator', true); + // FF fix + if($.FW)$.has(proto, FF_ITERATOR) && setIterator(iterProto, $.that); + } + // Plug for library + Iterators[NAME] = iter; + // FF & v8 fix + Iterators[NAME + ' Iterator'] = $.that; + return iter; +} +function getIterator(it){ + var Symbol = $.g.Symbol + , ext = it[Symbol && Symbol.iterator || FF_ITERATOR] + , getIter = ext || it[SYMBOL_ITERATOR] || Iterators[cof.classof(it)]; + return assertObject(getIter.call(it)); +} +function closeIterator(iterator){ + var ret = iterator['return']; + if(ret !== undefined)assertObject(ret.call(iterator)); +} +function stepCall(iterator, fn, value, entries){ + try { + return entries ? fn(assertObject(value)[0], value[1]) : fn(value); + } catch(e){ + closeIterator(iterator); + throw e; + } +} +var DANGER_CLOSING = true; +!function(){ + try { + var iter = [1].keys(); + iter['return'] = function(){ DANGER_CLOSING = false; }; + Array.from(iter, function(){ throw 2; }); + } catch(e){ /* empty */ } +}(); +var $iter = module.exports = { + BUGGY: BUGGY, + DANGER_CLOSING: DANGER_CLOSING, + fail: function(exec){ + var fail = true; + try { + var arr = [[{}, 1]] + , iter = arr[SYMBOL_ITERATOR]() + , next = iter.next; + iter.next = function(){ + fail = false; + return next.call(this); + }; + arr[SYMBOL_ITERATOR] = function(){ + return iter; + }; + exec(arr); + } catch(e){ /* empty */ } + return fail; + }, + Iterators: Iterators, + prototype: IteratorPrototype, + step: function(done, value){ + return {value: value, done: !!done}; + }, + stepCall: stepCall, + close: closeIterator, + is: function(it){ + var O = Object(it) + , Symbol = $.g.Symbol + , SYM = Symbol && Symbol.iterator || FF_ITERATOR; + return SYM in O || SYMBOL_ITERATOR in O || $.has(Iterators, cof.classof(O)); + }, + get: getIterator, + set: setIterator, + create: function(Constructor, NAME, next, proto){ + Constructor.prototype = $.create(proto || $iter.prototype, {next: $.desc(1, next)}); + cof.set(Constructor, NAME + ' Iterator'); + }, + define: defineIterator, + std: function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){ + function createIter(kind){ + return function(){ + return new Constructor(this, kind); + }; + } + $iter.create(Constructor, NAME, next); + var entries = createIter('key+value') + , values = createIter('value') + , proto = Base.prototype + , methods, key; + if(DEFAULT == 'value')values = defineIterator(Base, NAME, values, 'values'); + else entries = defineIterator(Base, NAME, entries, 'entries'); + if(DEFAULT){ + methods = { + entries: entries, + keys: IS_SET ? values : createIter('key'), + values: values + }; + $def($def.P + $def.F * BUGGY, NAME, methods); + if(FORCE)for(key in methods){ + if(!(key in proto))$.hide(proto, key, methods[key]); + } + } + }, + forOf: function(iterable, entries, fn, that){ + var iterator = getIterator(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , step; + while(!(step = iterator.next()).done){ + if(stepCall(iterator, f, step.value, entries) === false){ + return closeIterator(iterator); + } + } + } +}; +},{"./$":15,"./$.assert":4,"./$.cof":6,"./$.ctx":10,"./$.def":11,"./$.wks":26}],15:[function(require,module,exports){ +'use strict'; +var global = typeof self != 'undefined' ? self : Function('return this')() + , core = {} + , defineProperty = Object.defineProperty + , hasOwnProperty = {}.hasOwnProperty + , ceil = Math.ceil + , floor = Math.floor + , max = Math.max + , min = Math.min; +// The engine works fine with descriptors? Thank's IE8 for his funny defineProperty. +var DESC = !!function(){ + try { + return defineProperty({}, 'a', {get: function(){ return 2; }}).a == 2; + } catch(e){ /* empty */ } +}(); +var hide = createDefiner(1); +// 7.1.4 ToInteger +function toInteger(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +} +function desc(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; +} +function simpleSet(object, key, value){ + object[key] = value; + return object; +} +function createDefiner(bitmap){ + return DESC ? function(object, key, value){ + return $.setDesc(object, key, desc(bitmap, value)); // eslint-disable-line no-use-before-define + } : simpleSet; +} + +function isObject(it){ + return it !== null && (typeof it == 'object' || typeof it == 'function'); +} +function isFunction(it){ + return typeof it == 'function'; +} +function assertDefined(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; +} + +var $ = module.exports = require('./$.fw')({ + g: global, + core: core, + html: global.document && document.documentElement, + // http://jsperf.com/core-js-isobject + isObject: isObject, + isFunction: isFunction, + it: function(it){ + return it; + }, + that: function(){ + return this; + }, + // 7.1.4 ToInteger + toInteger: toInteger, + // 7.1.15 ToLength + toLength: function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }, + toIndex: function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }, + has: function(it, key){ + return hasOwnProperty.call(it, key); + }, + create: Object.create, + getProto: Object.getPrototypeOf, + DESC: DESC, + desc: desc, + getDesc: Object.getOwnPropertyDescriptor, + setDesc: defineProperty, + getKeys: Object.keys, + getNames: Object.getOwnPropertyNames, + getSymbols: Object.getOwnPropertySymbols, + // Dummy, fix for not array-like ES3 string in es5 module + assertDefined: assertDefined, + ES5Object: Object, + toObject: function(it){ + return $.ES5Object(assertDefined(it)); + }, + hide: hide, + def: createDefiner(0), + set: global.Symbol ? simpleSet : hide, + mix: function(target, src){ + for(var key in src)hide(target, key, src[key]); + return target; + }, + each: [].forEach +}); +if(typeof __e != 'undefined')__e = core; +if(typeof __g != 'undefined')__g = global; +},{"./$.fw":12}],16:[function(require,module,exports){ +var $ = require('./$'); +module.exports = function(object, el){ + var O = $.toObject(object) + , keys = $.getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; +}; +},{"./$":15}],17:[function(require,module,exports){ +var $ = require('./$') + , assertObject = require('./$.assert').obj; +module.exports = function(it){ + assertObject(it); + return $.getSymbols ? $.getNames(it).concat($.getSymbols(it)) : $.getNames(it); +}; +},{"./$":15,"./$.assert":4}],18:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , invoke = require('./$.invoke') + , assertFunction = require('./$.assert').fn; +module.exports = function(/* ...pargs */){ + var fn = assertFunction(this) + , length = arguments.length + , pargs = Array(length) + , i = 0 + , _ = $.path._ + , holder = false; + while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; + return function(/* ...args */){ + var that = this + , _length = arguments.length + , j = 0, k = 0, args; + if(!holder && !_length)return invoke(fn, pargs, that); + args = pargs.slice(); + if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; + while(_length > k)args.push(arguments[k++]); + return invoke(fn, args, that); + }; +}; +},{"./$":15,"./$.assert":4,"./$.invoke":13}],19:[function(require,module,exports){ +'use strict'; +module.exports = function(regExp, replace, isStatic){ + var replacer = replace === Object(replace) ? function(part){ + return replace[part]; + } : replace; + return function(it){ + return String(isStatic ? it : this).replace(regExp, replacer); + }; +}; +},{}],20:[function(require,module,exports){ +// Works with __proto__ only. Old v8 can't works with null proto objects. +/*eslint-disable no-proto */ +var $ = require('./$') + , assert = require('./$.assert'); +module.exports = Object.setPrototypeOf || ('__proto__' in {} // eslint-disable-line + ? function(buggy, set){ + try { + set = require('./$.ctx')(Function.call, $.getDesc(Object.prototype, '__proto__').set, 2); + set({}, []); + } catch(e){ buggy = true; } + return function(O, proto){ + assert.obj(O); + assert(proto === null || $.isObject(proto), proto, ": can't set as prototype!"); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }() + : undefined); +},{"./$":15,"./$.assert":4,"./$.ctx":10}],21:[function(require,module,exports){ +var $ = require('./$'); +module.exports = function(C){ + if($.DESC && $.FW)$.setDesc(C, require('./$.wks')('species'), { + configurable: true, + get: $.that + }); +}; +},{"./$":15,"./$.wks":26}],22:[function(require,module,exports){ +'use strict'; +// true -> String#at +// false -> String#codePointAt +var $ = require('./$'); +module.exports = function(TO_STRING){ + return function(pos){ + var s = String($.assertDefined(this)) + , i = $.toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l + || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; +},{"./$":15}],23:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , ctx = require('./$.ctx') + , cof = require('./$.cof') + , invoke = require('./$.invoke') + , global = $.g + , isFunction = $.isFunction + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , postMessage = global.postMessage + , addEventListener = global.addEventListener + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; +function run(){ + var id = +this; + if($.has(queue, id)){ + var fn = queue[id]; + delete queue[id]; + fn(); + } +} +function listner(event){ + run.call(event.data); +} +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if(!isFunction(setTask) || !isFunction(clearTask)){ + setTask = function(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ + invoke(isFunction(fn) ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function(id){ + delete queue[id]; + }; + // Node.js 0.8- + if(cof(global.process) == 'process'){ + defer = function(id){ + global.process.nextTick(ctx(run, id, 1)); + }; + // Modern browsers, skip implementation for WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is object + } else if(addEventListener && isFunction(postMessage) && !$.g.importScripts){ + defer = function(id){ + postMessage(id, '*'); + }; + addEventListener('message', listner, false); + // WebWorkers + } else if(isFunction(MessageChannel)){ + channel = new MessageChannel; + port = channel.port2; + channel.port1.onmessage = listner; + defer = ctx(port.postMessage, port, 1); + // IE8- + } else if($.g.document && ONREADYSTATECHANGE in document.createElement('script')){ + defer = function(id){ + $.html.appendChild(document.createElement('script'))[ONREADYSTATECHANGE] = function(){ + $.html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function(id){ + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; +},{"./$":15,"./$.cof":6,"./$.ctx":10,"./$.invoke":13}],24:[function(require,module,exports){ +var sid = 0; +function uid(key){ + return 'Symbol(' + key + ')_' + (++sid + Math.random()).toString(36); +} +uid.safe = require('./$').g.Symbol || uid; +module.exports = uid; +},{"./$":15}],25:[function(require,module,exports){ +// 22.1.3.31 Array.prototype[@@unscopables] +var $ = require('./$') + , UNSCOPABLES = require('./$.wks')('unscopables'); +if($.FW && !(UNSCOPABLES in []))$.hide(Array.prototype, UNSCOPABLES, {}); +module.exports = function(key){ + if($.FW)[][UNSCOPABLES][key] = true; +}; +},{"./$":15,"./$.wks":26}],26:[function(require,module,exports){ +var global = require('./$').g + , store = {}; +module.exports = function(name){ + return store[name] || (store[name] = + global.Symbol && global.Symbol[name] || require('./$.uid').safe('Symbol.' + name)); +}; +},{"./$":15,"./$.uid":24}],27:[function(require,module,exports){ +var $ = require('./$') + , cof = require('./$.cof') + , $def = require('./$.def') + , invoke = require('./$.invoke') + , arrayMethod = require('./$.array-methods') + , IE_PROTO = require('./$.uid').safe('__proto__') + , assert = require('./$.assert') + , assertObject = assert.obj + , ObjectProto = Object.prototype + , A = [] + , slice = A.slice + , indexOf = A.indexOf + , classof = cof.classof + , defineProperties = Object.defineProperties + , has = $.has + , defineProperty = $.setDesc + , getOwnDescriptor = $.getDesc + , isFunction = $.isFunction + , toObject = $.toObject + , toLength = $.toLength + , IE8_DOM_DEFINE = false; + +if(!$.DESC){ + try { + IE8_DOM_DEFINE = defineProperty(document.createElement('div'), 'x', + {get: function(){ return 8; }} + ).x == 8; + } catch(e){ /* empty */ } + $.setDesc = function(O, P, Attributes){ + if(IE8_DOM_DEFINE)try { + return defineProperty(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)assertObject(O)[P] = Attributes.value; + return O; + }; + $.getDesc = function(O, P){ + if(IE8_DOM_DEFINE)try { + return getOwnDescriptor(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]); + }; + defineProperties = function(O, Properties){ + assertObject(O); + var keys = $.getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)$.setDesc(O, P = keys[i++], Properties[P]); + return O; + }; +} +$def($def.S + $def.F * !$.DESC, 'Object', { + // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $.getDesc, + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + defineProperty: $.setDesc, + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + defineProperties: defineProperties +}); + + // IE 8- don't enum bug keys +var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' + + 'toLocaleString,toString,valueOf').split(',') + // Additional keys for getOwnPropertyNames + , keys2 = keys1.concat('length', 'prototype') + , keysLen1 = keys1.length; + +// Create object with `null` prototype: use iframe Object with cleared prototype +var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = document.createElement('iframe') + , i = keysLen1 + , iframeDocument; + iframe.style.display = 'none'; + $.html.appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(''); + iframeDocument.close(); + createDict = iframeDocument.F; + while(i--)delete createDict.prototype[keys1[i]]; + return createDict(); +}; +function createGetKeys(names, length){ + return function(object){ + var O = toObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(length > i)if(has(O, key = names[i++])){ + ~indexOf.call(result, key) || result.push(key); + } + return result; + }; +} +function isPrimitive(it){ return !$.isObject(it); } +function Empty(){} +$def($def.S, 'Object', { + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + getPrototypeOf: $.getProto = $.getProto || function(O){ + O = Object(assert.def(O)); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(isFunction(O.constructor) && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; + }, + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true), + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + create: $.create = $.create || function(O, /*?*/Properties){ + var result; + if(O !== null){ + Empty.prototype = assertObject(O); + result = new Empty(); + Empty.prototype = null; + // add "__proto__" for Object.getPrototypeOf shim + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : defineProperties(result, Properties); + }, + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false), + // 19.1.2.17 / 15.2.3.8 Object.seal(O) + seal: $.it, // <- cap + // 19.1.2.5 / 15.2.3.9 Object.freeze(O) + freeze: $.it, // <- cap + // 19.1.2.15 / 15.2.3.10 Object.preventExtensions(O) + preventExtensions: $.it, // <- cap + // 19.1.2.13 / 15.2.3.11 Object.isSealed(O) + isSealed: isPrimitive, // <- cap + // 19.1.2.12 / 15.2.3.12 Object.isFrozen(O) + isFrozen: isPrimitive, // <- cap + // 19.1.2.11 / 15.2.3.13 Object.isExtensible(O) + isExtensible: $.isObject // <- cap +}); + +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +$def($def.P, 'Function', { + bind: function(that /*, args... */){ + var fn = assert.fn(this) + , partArgs = slice.call(arguments, 1); + function bound(/* args... */){ + var args = partArgs.concat(slice.call(arguments)); + return invoke(fn, args, this instanceof bound ? $.create(fn.prototype) : that); + } + if(fn.prototype)bound.prototype = fn.prototype; + return bound; + } +}); + +// Fix for not array-like ES3 string +function arrayMethodFix(fn){ + return function(){ + return fn.apply($.ES5Object(this), arguments); + }; +} +if(!(0 in Object('z') && 'z'[0] == 'z')){ + $.ES5Object = function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); + }; +} +$def($def.P + $def.F * ($.ES5Object != Object), 'Array', { + slice: arrayMethodFix(slice), + join: arrayMethodFix(A.join) +}); + +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +$def($def.S, 'Array', { + isArray: function(arg){ + return cof(arg) == 'Array'; + } +}); +function createArrayReduce(isRight){ + return function(callbackfn, memo){ + assert.fn(callbackfn); + var O = toObject(this) + , length = toLength(O.length) + , index = isRight ? length - 1 : 0 + , i = isRight ? -1 : 1; + if(arguments.length < 2)for(;;){ + if(index in O){ + memo = O[index]; + index += i; + break; + } + index += i; + assert(isRight ? index >= 0 : length > index, 'Reduce of empty array with no initial value'); + } + for(;isRight ? index >= 0 : length > index; index += i)if(index in O){ + memo = callbackfn(memo, O[index], index, this); + } + return memo; + }; +} +$def($def.P, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: $.each = $.each || arrayMethod(0), + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: arrayMethod(1), + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: arrayMethod(2), + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: arrayMethod(3), + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: arrayMethod(4), + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: createArrayReduce(false), + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: createArrayReduce(true), + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: indexOf = indexOf || require('./$.array-includes')(false), + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function(el, fromIndex /* = @[*-1] */){ + var O = toObject(this) + , length = toLength(O.length) + , index = length - 1; + if(arguments.length > 1)index = Math.min(index, $.toInteger(fromIndex)); + if(index < 0)index = toLength(length + index); + for(;index >= 0; index--)if(index in O)if(O[index] === el)return index; + return -1; + } +}); + +// 21.1.3.25 / 15.5.4.20 String.prototype.trim() +$def($def.P, 'String', {trim: require('./$.replacer')(/^\s*([\s\S]*\S)?\s*$/, '$1')}); + +// 20.3.3.1 / 15.9.4.4 Date.now() +$def($def.S, 'Date', {now: function(){ + return +new Date; +}}); + +function lz(num){ + return num > 9 ? num : '0' + num; +} +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +$def($def.P, 'Date', {toISOString: function(){ + if(!isFinite(this))throw RangeError('Invalid time value'); + var d = this + , y = d.getUTCFullYear() + , m = d.getUTCMilliseconds() + , s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; +}}); + +if(classof(function(){ return arguments; }()) == 'Object')cof.classof = function(it){ + var tag = classof(it); + return tag == 'Object' && isFunction(it.callee) ? 'Arguments' : tag; +}; +},{"./$":15,"./$.array-includes":2,"./$.array-methods":3,"./$.assert":4,"./$.cof":6,"./$.def":11,"./$.invoke":13,"./$.replacer":19,"./$.uid":24}],28:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , $def = require('./$.def') + , toIndex = $.toIndex; +$def($def.P, 'Array', { + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + copyWithin: function(target/* = 0 */, start /* = 0, end = @length */){ + var O = Object($.assertDefined(this)) + , len = $.toLength(O.length) + , to = toIndex(target, len) + , from = toIndex(start, len) + , end = arguments[2] + , fin = end === undefined ? len : toIndex(end, len) + , count = Math.min(fin - from, len - to) + , inc = 1; + if(from < to && to < from + count){ + inc = -1; + from = from + count - 1; + to = to + count - 1; + } + while(count-- > 0){ + if(from in O)O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; + } +}); +require('./$.unscope')('copyWithin'); +},{"./$":15,"./$.def":11,"./$.unscope":25}],29:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , $def = require('./$.def') + , toIndex = $.toIndex; +$def($def.P, 'Array', { + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + fill: function(value /*, start = 0, end = @length */){ + var O = Object($.assertDefined(this)) + , length = $.toLength(O.length) + , index = toIndex(arguments[1], length) + , end = arguments[2] + , endPos = end === undefined ? length : toIndex(end, length); + while(endPos > index)O[index++] = value; + return O; + } +}); +require('./$.unscope')('fill'); +},{"./$":15,"./$.def":11,"./$.unscope":25}],30:[function(require,module,exports){ +var $def = require('./$.def'); +$def($def.P, 'Array', { + // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) + findIndex: require('./$.array-methods')(6) +}); +require('./$.unscope')('findIndex'); +},{"./$.array-methods":3,"./$.def":11,"./$.unscope":25}],31:[function(require,module,exports){ +var $def = require('./$.def'); +$def($def.P, 'Array', { + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + find: require('./$.array-methods')(5) +}); +require('./$.unscope')('find'); +},{"./$.array-methods":3,"./$.def":11,"./$.unscope":25}],32:[function(require,module,exports){ +var $ = require('./$') + , ctx = require('./$.ctx') + , $def = require('./$.def') + , $iter = require('./$.iter') + , stepCall = $iter.stepCall; +$def($def.S + $def.F * $iter.DANGER_CLOSING, 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ + var O = Object($.assertDefined(arrayLike)) + , mapfn = arguments[1] + , mapping = mapfn !== undefined + , f = mapping ? ctx(mapfn, arguments[2], 2) : undefined + , index = 0 + , length, result, step, iterator; + if($iter.is(O)){ + iterator = $iter.get(O); + // strange IE quirks mode bug -> use typeof instead of isFunction + result = new (typeof this == 'function' ? this : Array); + for(; !(step = iterator.next()).done; index++){ + result[index] = mapping ? stepCall(iterator, f, [step.value, index], true) : step.value; + } + } else { + // strange IE quirks mode bug -> use typeof instead of isFunction + result = new (typeof this == 'function' ? this : Array)(length = $.toLength(O.length)); + for(; length > index; index++){ + result[index] = mapping ? f(O[index], index) : O[index]; + } + } + result.length = index; + return result; + } +}); +},{"./$":15,"./$.ctx":10,"./$.def":11,"./$.iter":14}],33:[function(require,module,exports){ +var $ = require('./$') + , setUnscope = require('./$.unscope') + , ITER = require('./$.uid').safe('iter') + , $iter = require('./$.iter') + , step = $iter.step + , Iterators = $iter.Iterators; + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +$iter.std(Array, 'Array', function(iterated, kind){ + $.set(this, ITER, {o: $.toObject(iterated), i: 0, k: kind}); +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function(){ + var iter = this[ITER] + , O = iter.o + , kind = iter.k + , index = iter.i++; + if(!O || index >= O.length){ + iter.o = undefined; + return step(1); + } + if(kind == 'key' )return step(0, index); + if(kind == 'value')return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'value'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +setUnscope('keys'); +setUnscope('values'); +setUnscope('entries'); +},{"./$":15,"./$.iter":14,"./$.uid":24,"./$.unscope":25}],34:[function(require,module,exports){ +var $def = require('./$.def'); +$def($def.S, 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function(/* ...args */){ + var index = 0 + , length = arguments.length + // strange IE quirks mode bug -> use typeof instead of isFunction + , result = new (typeof this == 'function' ? this : Array)(length); + while(length > index)result[index] = arguments[index++]; + result.length = length; + return result; + } +}); +},{"./$.def":11}],35:[function(require,module,exports){ +require('./$.species')(Array); +},{"./$.species":21}],36:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , NAME = 'name' + , setDesc = $.setDesc + , FunctionProto = Function.prototype; +// 19.2.4.2 name +NAME in FunctionProto || $.FW && $.DESC && setDesc(FunctionProto, NAME, { + configurable: true, + get: function(){ + var match = String(this).match(/^\s*function ([^ (]*)/) + , name = match ? match[1] : ''; + $.has(this, NAME) || setDesc(this, NAME, $.desc(5, name)); + return name; + }, + set: function(value){ + $.has(this, NAME) || setDesc(this, NAME, $.desc(0, value)); + } +}); +},{"./$":15}],37:[function(require,module,exports){ +'use strict'; +var strong = require('./$.collection-strong'); + +// 23.1 Map Objects +require('./$.collection')('Map', { + // 23.1.3.6 Map.prototype.get(key) + get: function(key){ + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function(key, value){ + return strong.def(this, key === 0 ? 0 : key, value); + } +}, strong, true); +},{"./$.collection":9,"./$.collection-strong":7}],38:[function(require,module,exports){ +var Infinity = 1 / 0 + , $def = require('./$.def') + , E = Math.E + , pow = Math.pow + , abs = Math.abs + , exp = Math.exp + , log = Math.log + , sqrt = Math.sqrt + , ceil = Math.ceil + , floor = Math.floor + , sign = Math.sign || function(x){ + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; + }; + +// 20.2.2.5 Math.asinh(x) +function asinh(x){ + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1)); +} +// 20.2.2.14 Math.expm1(x) +function expm1(x){ + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1; +} + +$def($def.S, 'Math', { + // 20.2.2.3 Math.acosh(x) + acosh: function(x){ + return (x = +x) < 1 ? NaN : isFinite(x) ? log(x / E + sqrt(x + 1) * sqrt(x - 1) / E) + 1 : x; + }, + // 20.2.2.5 Math.asinh(x) + asinh: asinh, + // 20.2.2.7 Math.atanh(x) + atanh: function(x){ + return (x = +x) == 0 ? x : log((1 + x) / (1 - x)) / 2; + }, + // 20.2.2.9 Math.cbrt(x) + cbrt: function(x){ + return sign(x = +x) * pow(abs(x), 1 / 3); + }, + // 20.2.2.11 Math.clz32(x) + clz32: function(x){ + return (x >>>= 0) ? 32 - x.toString(2).length : 32; + }, + // 20.2.2.12 Math.cosh(x) + cosh: function(x){ + return (exp(x = +x) + exp(-x)) / 2; + }, + // 20.2.2.14 Math.expm1(x) + expm1: expm1, + // 20.2.2.16 Math.fround(x) + // TODO: fallback for IE9- + fround: function(x){ + return new Float32Array([x])[0]; + }, + // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) + hypot: function(value1, value2){ // eslint-disable-line no-unused-vars + var sum = 0 + , len1 = arguments.length + , len2 = len1 + , args = Array(len1) + , larg = -Infinity + , arg; + while(len1--){ + arg = args[len1] = +arguments[len1]; + if(arg == Infinity || arg == -Infinity)return Infinity; + if(arg > larg)larg = arg; + } + larg = arg || 1; + while(len2--)sum += pow(args[len2] / larg, 2); + return larg * sqrt(sum); + }, + // 20.2.2.18 Math.imul(x, y) + imul: function(x, y){ + var UInt16 = 0xffff + , xn = +x + , yn = +y + , xl = UInt16 & xn + , yl = UInt16 & yn; + return 0 | xl * yl + ((UInt16 & xn >>> 16) * yl + xl * (UInt16 & yn >>> 16) << 16 >>> 0); + }, + // 20.2.2.20 Math.log1p(x) + log1p: function(x){ + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x); + }, + // 20.2.2.21 Math.log10(x) + log10: function(x){ + return log(x) / Math.LN10; + }, + // 20.2.2.22 Math.log2(x) + log2: function(x){ + return log(x) / Math.LN2; + }, + // 20.2.2.28 Math.sign(x) + sign: sign, + // 20.2.2.30 Math.sinh(x) + sinh: function(x){ + return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2); + }, + // 20.2.2.33 Math.tanh(x) + tanh: function(x){ + var a = expm1(x = +x) + , b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + }, + // 20.2.2.34 Math.trunc(x) + trunc: function(it){ + return (it > 0 ? floor : ceil)(it); + } +}); +},{"./$.def":11}],39:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , isObject = $.isObject + , isFunction = $.isFunction + , NUMBER = 'Number' + , Number = $.g[NUMBER] + , Base = Number + , proto = Number.prototype; +function toPrimitive(it){ + var fn, val; + if(isFunction(fn = it.valueOf) && !isObject(val = fn.call(it)))return val; + if(isFunction(fn = it.toString) && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to number"); +} +function toNumber(it){ + if(isObject(it))it = toPrimitive(it); + if(typeof it == 'string' && it.length > 2 && it.charCodeAt(0) == 48){ + var binary = false; + switch(it.charCodeAt(1)){ + case 66 : case 98 : binary = true; + case 79 : case 111 : return parseInt(it.slice(2), binary ? 2 : 8); + } + } return +it; +} +if($.FW && !(Number('0o1') && Number('0b1'))){ + Number = function Number(it){ + return this instanceof Number ? new Base(toNumber(it)) : toNumber(it); + }; + $.each.call($.DESC ? $.getNames(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), function(key){ + if($.has(Base, key) && !$.has(Number, key)){ + $.setDesc(Number, key, $.getDesc(Base, key)); + } + } + ); + Number.prototype = proto; + proto.constructor = Number; + $.hide($.g, NUMBER, Number); +} +},{"./$":15}],40:[function(require,module,exports){ +var $ = require('./$') + , $def = require('./$.def') + , abs = Math.abs + , floor = Math.floor + , MAX_SAFE_INTEGER = 0x1fffffffffffff; // pow(2, 53) - 1 == 9007199254740991; +function isInteger(it){ + return !$.isObject(it) && isFinite(it) && floor(it) === it; +} +$def($def.S, 'Number', { + // 20.1.2.1 Number.EPSILON + EPSILON: Math.pow(2, -52), + // 20.1.2.2 Number.isFinite(number) + isFinite: function(it){ + return typeof it == 'number' && isFinite(it); + }, + // 20.1.2.3 Number.isInteger(number) + isInteger: isInteger, + // 20.1.2.4 Number.isNaN(number) + isNaN: function(number){ + return number != number; + }, + // 20.1.2.5 Number.isSafeInteger(number) + isSafeInteger: function(number){ + return isInteger(number) && abs(number) <= MAX_SAFE_INTEGER; + }, + // 20.1.2.6 Number.MAX_SAFE_INTEGER + MAX_SAFE_INTEGER: MAX_SAFE_INTEGER, + // 20.1.2.10 Number.MIN_SAFE_INTEGER + MIN_SAFE_INTEGER: -MAX_SAFE_INTEGER, + // 20.1.2.12 Number.parseFloat(string) + parseFloat: parseFloat, + // 20.1.2.13 Number.parseInt(string, radix) + parseInt: parseInt +}); +},{"./$":15,"./$.def":11}],41:[function(require,module,exports){ +// 19.1.3.1 Object.assign(target, source) +var $def = require('./$.def'); +$def($def.S, 'Object', {assign: require('./$.assign')}); +},{"./$.assign":5,"./$.def":11}],42:[function(require,module,exports){ +// 19.1.3.10 Object.is(value1, value2) +var $def = require('./$.def'); +$def($def.S, 'Object', { + is: function(x, y){ + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + } +}); +},{"./$.def":11}],43:[function(require,module,exports){ +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $def = require('./$.def'); +$def($def.S, 'Object', {setPrototypeOf: require('./$.set-proto')}); +},{"./$.def":11,"./$.set-proto":20}],44:[function(require,module,exports){ +var $ = require('./$') + , $def = require('./$.def') + , isObject = $.isObject + , toObject = $.toObject; +function wrapObjectMethod(METHOD, MODE){ + var fn = ($.core.Object || {})[METHOD] || Object[METHOD] + , f = 0 + , o = {}; + o[METHOD] = MODE == 1 ? function(it){ + return isObject(it) ? fn(it) : it; + } : MODE == 2 ? function(it){ + return isObject(it) ? fn(it) : true; + } : MODE == 3 ? function(it){ + return isObject(it) ? fn(it) : false; + } : MODE == 4 ? function(it, key){ + return fn(toObject(it), key); + } : MODE == 5 ? function(it){ + return fn(Object($.assertDefined(it))); + } : function(it){ + return fn(toObject(it)); + }; + try { + fn('z'); + } catch(e){ + f = 1; + } + $def($def.S + $def.F * f, 'Object', o); +} +wrapObjectMethod('freeze', 1); +wrapObjectMethod('seal', 1); +wrapObjectMethod('preventExtensions', 1); +wrapObjectMethod('isFrozen', 2); +wrapObjectMethod('isSealed', 2); +wrapObjectMethod('isExtensible', 3); +wrapObjectMethod('getOwnPropertyDescriptor', 4); +wrapObjectMethod('getPrototypeOf', 5); +wrapObjectMethod('keys'); +wrapObjectMethod('getOwnPropertyNames'); +},{"./$":15,"./$.def":11}],45:[function(require,module,exports){ +'use strict'; +// 19.1.3.6 Object.prototype.toString() +var $ = require('./$') + , cof = require('./$.cof') + , tmp = {}; +tmp[require('./$.wks')('toStringTag')] = 'z'; +if($.FW && cof(tmp) != 'z')$.hide(Object.prototype, 'toString', function(){ + return '[object ' + cof.classof(this) + ']'; +}); +},{"./$":15,"./$.cof":6,"./$.wks":26}],46:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , ctx = require('./$.ctx') + , cof = require('./$.cof') + , $def = require('./$.def') + , assert = require('./$.assert') + , $iter = require('./$.iter') + , SPECIES = require('./$.wks')('species') + , RECORD = require('./$.uid').safe('record') + , forOf = $iter.forOf + , PROMISE = 'Promise' + , global = $.g + , process = global.process + , asap = process && process.nextTick || require('./$.task').set + , Promise = global[PROMISE] + , Base = Promise + , isFunction = $.isFunction + , isObject = $.isObject + , assertFunction = assert.fn + , assertObject = assert.obj + , test; +function getConstructor(C){ + var S = assertObject(C)[SPECIES]; + return S != undefined ? S : C; +} +isFunction(Promise) && isFunction(Promise.resolve) +&& Promise.resolve(test = new Promise(function(){})) == test +|| function(){ + function isThenable(it){ + var then; + if(isObject(it))then = it.then; + return isFunction(then) ? then : false; + } + function handledRejectionOrHasOnRejected(promise){ + var record = promise[RECORD] + , chain = record.c + , i = 0 + , react; + if(record.h)return true; + while(chain.length > i){ + react = chain[i++]; + if(react.fail || handledRejectionOrHasOnRejected(react.P))return true; + } + } + function notify(record, isReject){ + var chain = record.c; + if(isReject || chain.length)asap(function(){ + var promise = record.p + , value = record.v + , ok = record.s == 1 + , i = 0; + if(isReject && !handledRejectionOrHasOnRejected(promise)){ + setTimeout(function(){ + if(!handledRejectionOrHasOnRejected(promise)){ + if(cof(process) == 'process'){ + process.emit('unhandledRejection', value, promise); + } else if(global.console && isFunction(console.error)){ + console.error('Unhandled promise rejection', value); + } + } + }, 1e3); + } else while(chain.length > i)!function(react){ + var cb = ok ? react.ok : react.fail + , ret, then; + try { + if(cb){ + if(!ok)record.h = true; + ret = cb === true ? value : cb(value); + if(ret === react.P){ + react.rej(TypeError(PROMISE + '-chain cycle')); + } else if(then = isThenable(ret)){ + then.call(ret, react.res, react.rej); + } else react.res(ret); + } else react.rej(value); + } catch(err){ + react.rej(err); + } + }(chain[i++]); + chain.length = 0; + }); + } + function reject(value){ + var record = this; + if(record.d)return; + record.d = true; + record = record.r || record; // unwrap + record.v = value; + record.s = 2; + notify(record, true); + } + function resolve(value){ + var record = this + , then, wrapper; + if(record.d)return; + record.d = true; + record = record.r || record; // unwrap + try { + if(then = isThenable(value)){ + wrapper = {r: record, d: false}; // wrap + then.call(value, ctx(resolve, wrapper, 1), ctx(reject, wrapper, 1)); + } else { + record.v = value; + record.s = 1; + notify(record); + } + } catch(err){ + reject.call(wrapper || {r: record, d: false}, err); // wrap + } + } + // 25.4.3.1 Promise(executor) + Promise = function(executor){ + assertFunction(executor); + var record = { + p: assert.inst(this, Promise, PROMISE), // <- promise + c: [], // <- chain + s: 0, // <- state + d: false, // <- done + v: undefined, // <- value + h: false // <- handled rejection + }; + $.hide(this, RECORD, record); + try { + executor(ctx(resolve, record, 1), ctx(reject, record, 1)); + } catch(err){ + reject.call(record, err); + } + }; + $.mix(Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function(onFulfilled, onRejected){ + var S = assertObject(assertObject(this).constructor)[SPECIES]; + var react = { + ok: isFunction(onFulfilled) ? onFulfilled : true, + fail: isFunction(onRejected) ? onRejected : false + }; + var P = react.P = new (S != undefined ? S : Promise)(function(res, rej){ + react.res = assertFunction(res); + react.rej = assertFunction(rej); + }); + var record = this[RECORD]; + record.c.push(react); + record.s && notify(record); + return P; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function(onRejected){ + return this.then(undefined, onRejected); + } + }); +}(); +$def($def.G + $def.W + $def.F * (Promise != Base), {Promise: Promise}); +$def($def.S, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function(r){ + return new (getConstructor(this))(function(res, rej){ + rej(r); + }); + }, + // 25.4.4.6 Promise.resolve(x) + resolve: function(x){ + return isObject(x) && RECORD in x && $.getProto(x) === this.prototype + ? x : new (getConstructor(this))(function(res){ + res(x); + }); + } +}); +$def($def.S + $def.F * ($iter.fail(function(iter){ + Promise.all(iter)['catch'](function(){}); +}) || $iter.DANGER_CLOSING), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function(iterable){ + var C = getConstructor(this) + , values = []; + return new C(function(resolve, reject){ + forOf(iterable, false, values.push, values); + var remaining = values.length + , results = Array(remaining); + if(remaining)$.each.call(values, function(promise, index){ + C.resolve(promise).then(function(value){ + results[index] = value; + --remaining || resolve(results); + }, reject); + }); + else resolve(results); + }); + }, + // 25.4.4.4 Promise.race(iterable) + race: function(iterable){ + var C = getConstructor(this); + return new C(function(resolve, reject){ + forOf(iterable, false, function(promise){ + C.resolve(promise).then(resolve, reject); + }); + }); + } +}); +cof.set(Promise, PROMISE); +require('./$.species')(Promise); +},{"./$":15,"./$.assert":4,"./$.cof":6,"./$.ctx":10,"./$.def":11,"./$.iter":14,"./$.species":21,"./$.task":23,"./$.uid":24,"./$.wks":26}],47:[function(require,module,exports){ +var $ = require('./$') + , $def = require('./$.def') + , setProto = require('./$.set-proto') + , $iter = require('./$.iter') + , ITER = require('./$.uid').safe('iter') + , step = $iter.step + , assert = require('./$.assert') + , isObject = $.isObject + , getDesc = $.getDesc + , setDesc = $.setDesc + , getProto = $.getProto + , apply = Function.apply + , assertObject = assert.obj + , isExtensible = Object.isExtensible || $.it; +function Enumerate(iterated){ + var keys = [], key; + for(key in iterated)keys.push(key); + $.set(this, ITER, {o: iterated, a: keys, i: 0}); +} +$iter.create(Enumerate, 'Object', function(){ + var iter = this[ITER] + , keys = iter.a + , key; + do { + if(iter.i >= keys.length)return step(1); + } while(!((key = keys[iter.i++]) in iter.o)); + return step(0, key); +}); + +function wrap(fn){ + return function(it){ + assertObject(it); + try { + fn.apply(undefined, arguments); + return true; + } catch(e){ + return false; + } + }; +} + +function reflectGet(target, propertyKey/*, receiver*/){ + var receiver = arguments.length < 3 ? target : arguments[2] + , desc = getDesc(assertObject(target), propertyKey), proto; + if(desc)return $.has(desc, 'value') + ? desc.value + : desc.get === undefined + ? undefined + : desc.get.call(receiver); + return isObject(proto = getProto(target)) + ? reflectGet(proto, propertyKey, receiver) + : undefined; +} +function reflectSet(target, propertyKey, V/*, receiver*/){ + var receiver = arguments.length < 4 ? target : arguments[3] + , ownDesc = getDesc(assertObject(target), propertyKey) + , existingDescriptor, proto; + if(!ownDesc){ + if(isObject(proto = getProto(target))){ + return reflectSet(proto, propertyKey, V, receiver); + } + ownDesc = $.desc(0); + } + if($.has(ownDesc, 'value')){ + if(ownDesc.writable === false || !isObject(receiver))return false; + existingDescriptor = getDesc(receiver, propertyKey) || $.desc(0); + existingDescriptor.value = V; + setDesc(receiver, propertyKey, existingDescriptor); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +var reflect = { + // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) + apply: require('./$.ctx')(Function.call, apply, 3), + // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) + construct: function(target, argumentsList /*, newTarget*/){ + var proto = assert.fn(arguments.length < 3 ? target : arguments[2]).prototype + , instance = $.create(isObject(proto) ? proto : Object.prototype) + , result = apply.call(target, instance, argumentsList); + return isObject(result) ? result : instance; + }, + // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) + defineProperty: wrap(setDesc), + // 26.1.4 Reflect.deleteProperty(target, propertyKey) + deleteProperty: function(target, propertyKey){ + var desc = getDesc(assertObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + }, + // 26.1.5 Reflect.enumerate(target) + enumerate: function(target){ + return new Enumerate(assertObject(target)); + }, + // 26.1.6 Reflect.get(target, propertyKey [, receiver]) + get: reflectGet, + // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) + getOwnPropertyDescriptor: function(target, propertyKey){ + return getDesc(assertObject(target), propertyKey); + }, + // 26.1.8 Reflect.getPrototypeOf(target) + getPrototypeOf: function(target){ + return getProto(assertObject(target)); + }, + // 26.1.9 Reflect.has(target, propertyKey) + has: function(target, propertyKey){ + return propertyKey in target; + }, + // 26.1.10 Reflect.isExtensible(target) + isExtensible: function(target){ + return !!isExtensible(assertObject(target)); + }, + // 26.1.11 Reflect.ownKeys(target) + ownKeys: require('./$.own-keys'), + // 26.1.12 Reflect.preventExtensions(target) + preventExtensions: wrap(Object.preventExtensions || $.it), + // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) + set: reflectSet +}; +// 26.1.14 Reflect.setPrototypeOf(target, proto) +if(setProto)reflect.setPrototypeOf = function(target, proto){ + setProto(assertObject(target), proto); + return true; +}; + +$def($def.G, {Reflect: {}}); +$def($def.S, 'Reflect', reflect); +},{"./$":15,"./$.assert":4,"./$.ctx":10,"./$.def":11,"./$.iter":14,"./$.own-keys":17,"./$.set-proto":20,"./$.uid":24}],48:[function(require,module,exports){ +var $ = require('./$') + , cof = require('./$.cof') + , RegExp = $.g.RegExp + , Base = RegExp + , proto = RegExp.prototype; +if($.FW && $.DESC){ + // RegExp allows a regex with flags as the pattern + if(!function(){try{ return RegExp(/a/g, 'i') == '/a/i'; }catch(e){ /* empty */ }}()){ + RegExp = function RegExp(pattern, flags){ + return new Base(cof(pattern) == 'RegExp' && flags !== undefined + ? pattern.source : pattern, flags); + }; + $.each.call($.getNames(Base), function(key){ + key in RegExp || $.setDesc(RegExp, key, { + configurable: true, + get: function(){ return Base[key]; }, + set: function(it){ Base[key] = it; } + }); + }); + proto.constructor = RegExp; + RegExp.prototype = proto; + $.hide($.g, 'RegExp', RegExp); + } + // 21.2.5.3 get RegExp.prototype.flags() + if(/./g.flags != 'g')$.setDesc(proto, 'flags', { + configurable: true, + get: require('./$.replacer')(/^.*\/(\w*)$/, '$1') + }); +} +require('./$.species')(RegExp); +},{"./$":15,"./$.cof":6,"./$.replacer":19,"./$.species":21}],49:[function(require,module,exports){ +'use strict'; +var strong = require('./$.collection-strong'); + +// 23.2 Set Objects +require('./$.collection')('Set', { + // 23.2.3.1 Set.prototype.add(value) + add: function(value){ + return strong.def(this, value = value === 0 ? 0 : value, value); + } +}, strong); +},{"./$.collection":9,"./$.collection-strong":7}],50:[function(require,module,exports){ +var $def = require('./$.def'); +$def($def.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: require('./$.string-at')(false) +}); +},{"./$.def":11,"./$.string-at":22}],51:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , cof = require('./$.cof') + , $def = require('./$.def') + , toLength = $.toLength; + +$def($def.P, 'String', { + // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + endsWith: function(searchString /*, endPosition = @length */){ + if(cof(searchString) == 'RegExp')throw TypeError(); + var that = String($.assertDefined(this)) + , endPosition = arguments[1] + , len = toLength(that.length) + , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + searchString += ''; + return that.slice(end - searchString.length, end) === searchString; + } +}); +},{"./$":15,"./$.cof":6,"./$.def":11}],52:[function(require,module,exports){ +var $def = require('./$.def') + , toIndex = require('./$').toIndex + , fromCharCode = String.fromCharCode; + +$def($def.S, 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function(x){ // eslint-disable-line no-unused-vars + var res = [] + , len = arguments.length + , i = 0 + , code; + while(len > i){ + code = +arguments[i++]; + if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); +},{"./$":15,"./$.def":11}],53:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , cof = require('./$.cof') + , $def = require('./$.def'); + +$def($def.P, 'String', { + // 21.1.3.7 String.prototype.includes(searchString, position = 0) + includes: function(searchString /*, position = 0 */){ + if(cof(searchString) == 'RegExp')throw TypeError(); + return !!~String($.assertDefined(this)).indexOf(searchString, arguments[1]); + } +}); +},{"./$":15,"./$.cof":6,"./$.def":11}],54:[function(require,module,exports){ +var set = require('./$').set + , at = require('./$.string-at')(true) + , ITER = require('./$.uid').safe('iter') + , $iter = require('./$.iter') + , step = $iter.step; + +// 21.1.3.27 String.prototype[@@iterator]() +$iter.std(String, 'String', function(iterated){ + set(this, ITER, {o: String(iterated), i: 0}); +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function(){ + var iter = this[ITER] + , O = iter.o + , index = iter.i + , point; + if(index >= O.length)return step(1); + point = at.call(O, index); + iter.i += point.length; + return step(0, point); +}); +},{"./$":15,"./$.iter":14,"./$.string-at":22,"./$.uid":24}],55:[function(require,module,exports){ +var $ = require('./$') + , $def = require('./$.def'); + +$def($def.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function(callSite){ + var raw = $.toObject(callSite.raw) + , len = $.toLength(raw.length) + , sln = arguments.length + , res = [] + , i = 0; + while(len > i){ + res.push(String(raw[i++])); + if(i < sln)res.push(String(arguments[i])); + } return res.join(''); + } +}); +},{"./$":15,"./$.def":11}],56:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , $def = require('./$.def'); + +$def($def.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: function(count){ + var str = String($.assertDefined(this)) + , res = '' + , n = $.toInteger(count); + if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); + for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; + return res; + } +}); +},{"./$":15,"./$.def":11}],57:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , cof = require('./$.cof') + , $def = require('./$.def'); + +$def($def.P, 'String', { + // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + startsWith: function(searchString /*, position = 0 */){ + if(cof(searchString) == 'RegExp')throw TypeError(); + var that = String($.assertDefined(this)) + , index = $.toLength(Math.min(arguments[1], that.length)); + searchString += ''; + return that.slice(index, index + searchString.length) === searchString; + } +}); +},{"./$":15,"./$.cof":6,"./$.def":11}],58:[function(require,module,exports){ +'use strict'; +// ECMAScript 6 symbols shim +var $ = require('./$') + , setTag = require('./$.cof').set + , uid = require('./$.uid') + , $def = require('./$.def') + , keyOf = require('./$.keyof') + , has = $.has + , hide = $.hide + , getNames = $.getNames + , toObject = $.toObject + , Symbol = $.g.Symbol + , Base = Symbol + , setter = false + , TAG = uid.safe('tag') + , SymbolRegistry = {} + , AllSymbols = {}; + +function wrap(tag){ + var sym = AllSymbols[tag] = $.set($.create(Symbol.prototype), TAG, tag); + $.DESC && setter && $.setDesc(Object.prototype, tag, { + configurable: true, + set: function(value){ + hide(this, tag, value); + } + }); + return sym; +} + +// 19.4.1.1 Symbol([description]) +if(!$.isFunction(Symbol)){ + Symbol = function(description){ + if(this instanceof Symbol)throw TypeError('Symbol is not a constructor'); + return wrap(uid(description)); + }; + hide(Symbol.prototype, 'toString', function(){ + return this[TAG]; + }); +} +$def($def.G + $def.W, {Symbol: Symbol}); + +var symbolStatics = { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function(key){ + return keyOf(SymbolRegistry, key); + }, + pure: uid.safe, + set: $.set, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } +}; +// 19.4.2.2 Symbol.hasInstance +// 19.4.2.3 Symbol.isConcatSpreadable +// 19.4.2.4 Symbol.iterator +// 19.4.2.6 Symbol.match +// 19.4.2.8 Symbol.replace +// 19.4.2.9 Symbol.search +// 19.4.2.10 Symbol.species +// 19.4.2.11 Symbol.split +// 19.4.2.12 Symbol.toPrimitive +// 19.4.2.13 Symbol.toStringTag +// 19.4.2.14 Symbol.unscopables +$.each.call(( + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' + + 'species,split,toPrimitive,toStringTag,unscopables' + ).split(','), function(it){ + var sym = require('./$.wks')(it); + symbolStatics[it] = Symbol === Base ? sym : wrap(sym); + } +); + +setter = true; + +$def($def.S, 'Symbol', symbolStatics); + +$def($def.S + $def.F * (Symbol != Base), 'Object', { + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: function(it){ + var names = getNames(toObject(it)), result = [], key, i = 0; + while(names.length > i)has(AllSymbols, key = names[i++]) || result.push(key); + return result; + }, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: function(it){ + var names = getNames(toObject(it)), result = [], key, i = 0; + while(names.length > i)has(AllSymbols, key = names[i++]) && result.push(AllSymbols[key]); + return result; + } +}); + +setTag(Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setTag($.g.JSON, 'JSON', true); +},{"./$":15,"./$.cof":6,"./$.def":11,"./$.keyof":16,"./$.uid":24,"./$.wks":26}],59:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , weak = require('./$.collection-weak') + , leakStore = weak.leakStore + , ID = weak.ID + , WEAK = weak.WEAK + , has = $.has + , isObject = $.isObject + , isFrozen = Object.isFrozen || $.core.Object.isFrozen + , tmp = {}; + +// 23.3 WeakMap Objects +var WeakMap = require('./$.collection')('WeakMap', { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function(key){ + if(isObject(key)){ + if(isFrozen(key))return leakStore(this).get(key); + if(has(key, WEAK))return key[WEAK][this[ID]]; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function(key, value){ + return weak.def(this, key, value); + } +}, weak, true, true); + +// IE11 WeakMap frozen keys fix +if($.FW && new WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ + $.each.call(['delete', 'has', 'get', 'set'], function(key){ + var method = WeakMap.prototype[key]; + WeakMap.prototype[key] = function(a, b){ + // store frozen objects on leaky map + if(isObject(a) && isFrozen(a)){ + var result = leakStore(this)[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }; + }); +} +},{"./$":15,"./$.collection":9,"./$.collection-weak":8}],60:[function(require,module,exports){ +'use strict'; +var weak = require('./$.collection-weak'); + +// 23.4 WeakSet Objects +require('./$.collection')('WeakSet', { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function(value){ + return weak.def(this, value, true); + } +}, weak, false, true); +},{"./$.collection":9,"./$.collection-weak":8}],61:[function(require,module,exports){ +// https://github.com/domenic/Array.prototype.includes +var $def = require('./$.def'); +$def($def.P, 'Array', { + includes: require('./$.array-includes')(true) +}); +require('./$.unscope')('includes'); +},{"./$.array-includes":2,"./$.def":11,"./$.unscope":25}],62:[function(require,module,exports){ +// https://gist.github.com/WebReflection/9353781 +var $ = require('./$') + , $def = require('./$.def') + , ownKeys = require('./$.own-keys'); + +$def($def.S, 'Object', { + getOwnPropertyDescriptors: function(object){ + var O = $.toObject(object) + , result = {}; + $.each.call(ownKeys(O), function(key){ + $.setDesc(result, key, $.desc(0, $.getDesc(O, key))); + }); + return result; + } +}); +},{"./$":15,"./$.def":11,"./$.own-keys":17}],63:[function(require,module,exports){ +// http://goo.gl/XkBrjD +var $ = require('./$') + , $def = require('./$.def'); +function createObjectToArray(isEntries){ + return function(object){ + var O = $.toObject(object) + , keys = $.getKeys(object) + , length = keys.length + , i = 0 + , result = Array(length) + , key; + if(isEntries)while(length > i)result[i] = [key = keys[i++], O[key]]; + else while(length > i)result[i] = O[keys[i++]]; + return result; + }; +} +$def($def.S, 'Object', { + values: createObjectToArray(false), + entries: createObjectToArray(true) +}); +},{"./$":15,"./$.def":11}],64:[function(require,module,exports){ +// https://gist.github.com/kangax/9698100 +var $def = require('./$.def'); +$def($def.S, 'RegExp', { + escape: require('./$.replacer')(/([\\\-[\]{}()*+?.,^$|])/g, '\\$1', true) +}); +},{"./$.def":11,"./$.replacer":19}],65:[function(require,module,exports){ +// https://github.com/mathiasbynens/String.prototype.at +var $def = require('./$.def'); +$def($def.P, 'String', { + at: require('./$.string-at')(true) +}); +},{"./$.def":11,"./$.string-at":22}],66:[function(require,module,exports){ +// JavaScript 1.6 / Strawman array statics shim +var $ = require('./$') + , $def = require('./$.def') + , core = $.core + , statics = {}; +function setStatics(keys, length){ + $.each.call(keys.split(','), function(key){ + if(length == undefined && key in core.Array)statics[key] = core.Array[key]; + else if(key in [])statics[key] = require('./$.ctx')(Function.call, [][key], length); + }); +} +setStatics('pop,reverse,shift,keys,values,entries', 1); +setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3); +setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' + + 'reduce,reduceRight,copyWithin,fill,turn'); +$def($def.S, 'Array', statics); +},{"./$":15,"./$.ctx":10,"./$.def":11}],67:[function(require,module,exports){ +require('./es6.array.iterator'); +var $ = require('./$') + , Iterators = require('./$.iter').Iterators + , ITERATOR = require('./$.wks')('iterator') + , NodeList = $.g.NodeList; +if($.FW && NodeList && !(ITERATOR in NodeList.prototype)){ + $.hide(NodeList.prototype, ITERATOR, Iterators.Array); +} +Iterators.NodeList = Iterators.Array; +},{"./$":15,"./$.iter":14,"./$.wks":26,"./es6.array.iterator":33}],68:[function(require,module,exports){ +var $def = require('./$.def') + , $task = require('./$.task'); +$def($def.G + $def.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); +},{"./$.def":11,"./$.task":23}],69:[function(require,module,exports){ +// ie9- setTimeout & setInterval additional parameters fix +var $ = require('./$') + , $def = require('./$.def') + , invoke = require('./$.invoke') + , partial = require('./$.partial') + , MSIE = !!$.g.navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check +function wrap(set){ + return MSIE ? function(fn, time /*, ...args */){ + return set(invoke( + partial, + [].slice.call(arguments, 2), + $.isFunction(fn) ? fn : Function(fn) + ), time); + } : set; +} +$def($def.G + $def.B + $def.F * MSIE, { + setTimeout: wrap($.g.setTimeout), + setInterval: wrap($.g.setInterval) +}); +},{"./$":15,"./$.def":11,"./$.invoke":13,"./$.partial":18}],70:[function(require,module,exports){ +require('./modules/es5'); +require('./modules/es6.symbol'); +require('./modules/es6.object.assign'); +require('./modules/es6.object.is'); +require('./modules/es6.object.set-prototype-of'); +require('./modules/es6.object.to-string'); +require('./modules/es6.object.statics-accept-primitives'); +require('./modules/es6.function.name'); +require('./modules/es6.number.constructor'); +require('./modules/es6.number.statics'); +require('./modules/es6.math'); +require('./modules/es6.string.from-code-point'); +require('./modules/es6.string.raw'); +require('./modules/es6.string.iterator'); +require('./modules/es6.string.code-point-at'); +require('./modules/es6.string.ends-with'); +require('./modules/es6.string.includes'); +require('./modules/es6.string.repeat'); +require('./modules/es6.string.starts-with'); +require('./modules/es6.array.from'); +require('./modules/es6.array.of'); +require('./modules/es6.array.iterator'); +require('./modules/es6.array.species'); +require('./modules/es6.array.copy-within'); +require('./modules/es6.array.fill'); +require('./modules/es6.array.find'); +require('./modules/es6.array.find-index'); +require('./modules/es6.regexp'); +require('./modules/es6.promise'); +require('./modules/es6.map'); +require('./modules/es6.set'); +require('./modules/es6.weak-map'); +require('./modules/es6.weak-set'); +require('./modules/es6.reflect'); +require('./modules/es7.array.includes'); +require('./modules/es7.string.at'); +require('./modules/es7.regexp.escape'); +require('./modules/es7.object.get-own-property-descriptors'); +require('./modules/es7.object.to-array'); +require('./modules/js.array.statics'); +require('./modules/web.timers'); +require('./modules/web.immediate'); +require('./modules/web.dom.iterable'); +module.exports = require('./modules/$').core; +},{"./modules/$":15,"./modules/es5":27,"./modules/es6.array.copy-within":28,"./modules/es6.array.fill":29,"./modules/es6.array.find":31,"./modules/es6.array.find-index":30,"./modules/es6.array.from":32,"./modules/es6.array.iterator":33,"./modules/es6.array.of":34,"./modules/es6.array.species":35,"./modules/es6.function.name":36,"./modules/es6.map":37,"./modules/es6.math":38,"./modules/es6.number.constructor":39,"./modules/es6.number.statics":40,"./modules/es6.object.assign":41,"./modules/es6.object.is":42,"./modules/es6.object.set-prototype-of":43,"./modules/es6.object.statics-accept-primitives":44,"./modules/es6.object.to-string":45,"./modules/es6.promise":46,"./modules/es6.reflect":47,"./modules/es6.regexp":48,"./modules/es6.set":49,"./modules/es6.string.code-point-at":50,"./modules/es6.string.ends-with":51,"./modules/es6.string.from-code-point":52,"./modules/es6.string.includes":53,"./modules/es6.string.iterator":54,"./modules/es6.string.raw":55,"./modules/es6.string.repeat":56,"./modules/es6.string.starts-with":57,"./modules/es6.symbol":58,"./modules/es6.weak-map":59,"./modules/es6.weak-set":60,"./modules/es7.array.includes":61,"./modules/es7.object.get-own-property-descriptors":62,"./modules/es7.object.to-array":63,"./modules/es7.regexp.escape":64,"./modules/es7.string.at":65,"./modules/js.array.statics":66,"./modules/web.dom.iterable":67,"./modules/web.immediate":68,"./modules/web.timers":69}],71:[function(require,module,exports){ +(function (global){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +!(function(global) { + "use strict"; + + var hasOwn = Object.prototype.hasOwnProperty; + var undefined; // More compressible than void 0. + var iteratorSymbol = + typeof Symbol === "function" && Symbol.iterator || "@@iterator"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + return new Generator(innerFn, outerFn, self || null, tryLocsList || []); + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunction.displayName = "GeneratorFunction"; + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + genFun.__proto__ = GeneratorFunctionPrototype; + genFun.prototype = Object.create(Gp); + return genFun; + }; + + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + return new Promise(function(resolve, reject) { + var generator = wrap(innerFn, outerFn, self, tryLocsList); + var callNext = step.bind(generator.next); + var callThrow = step.bind(generator["throw"]); + + function step(arg) { + var record = tryCatch(this, null, arg); + if (record.type === "throw") { + reject(record.arg); + return; + } + + var info = record.arg; + if (info.done) { + resolve(info.value); + } else { + Promise.resolve(info.value).then(callNext, callThrow); + } + } + + callNext(); + }); + }; + + function Generator(innerFn, outerFn, self, tryLocsList) { + var generator = outerFn ? Object.create(outerFn.prototype) : this; + var context = new Context(tryLocsList); + var state = GenStateSuspendedStart; + + function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + while (true) { + var delegate = context.delegate; + if (delegate) { + var record = tryCatch( + delegate.iterator[method], + delegate.iterator, + arg + ); + + if (record.type === "throw") { + context.delegate = null; + + // Like returning generator.throw(uncaught), but without the + // overhead of an extra function call. + method = "throw"; + arg = record.arg; + + continue; + } + + // Delegate generator ran and handled its own exceptions so + // regardless of what the method was, we continue as if it is + // "next" with an undefined arg. + method = "next"; + arg = undefined; + + var info = record.arg; + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + } else { + state = GenStateSuspendedYield; + return info; + } + + context.delegate = null; + } + + if (method === "next") { + if (state === GenStateSuspendedStart && + typeof arg !== "undefined") { + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + throw new TypeError( + "attempt to send " + JSON.stringify(arg) + " to newborn generator" + ); + } + + if (state === GenStateSuspendedYield) { + context.sent = arg; + } else { + delete context.sent; + } + + } else if (method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw arg; + } + + if (context.dispatchException(arg)) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + method = "next"; + arg = undefined; + } + + } else if (method === "return") { + context.abrupt("return", arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + var info = { + value: record.arg, + done: context.done + }; + + if (record.arg === ContinueSentinel) { + if (context.delegate && method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + arg = undefined; + } + } else { + return info; + } + + } else if (record.type === "throw") { + state = GenStateCompleted; + + if (method === "next") { + context.dispatchException(record.arg); + } else { + arg = record.arg; + } + } + } + } + + generator.next = invoke.bind(generator, "next"); + generator["throw"] = invoke.bind(generator, "throw"); + generator["return"] = invoke.bind(generator, "return"); + + return generator; + } + + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function() { + this.prev = 0; + this.next = 0; + this.sent = undefined; + this.done = false; + this.delegate = null; + + this.tryEntries.forEach(resetTryEntry); + + // Pre-initialize at least 20 temporary variables to enable hidden + // class optimizations for simple generators. + for (var tempIndex = 0, tempName; + hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20; + ++tempIndex) { + this[tempName] = null; + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg < finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.next = finallyEntry.finallyLoc; + } else { + this.complete(record); + } + + return ContinueSentinel; + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = record.arg; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + return this.complete(entry.completion, entry.afterLoc); + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + return ContinueSentinel; + } + }; +})( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === "object" ? global : + typeof window === "object" ? window : this +); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}]},{},[1]); diff --git a/polyfill.min.js b/polyfill.min.js new file mode 100644 index 0000000..51406e5 --- /dev/null +++ b/polyfill.min.js @@ -0,0 +1,3 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oindex){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$":15}],3:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function(callbackfn){var O=Object($.assertDefined(this)),self=$.ES5Object(O),f=ctx(callbackfn,arguments[1],3),length=$.toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$":15,"./$.ctx":10}],4:[function(require,module,exports){var $=require("./$");function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}assert.def=$.assertDefined;assert.fn=function(it){if(!$.isFunction(it))throw TypeError(it+" is not a function!");return it};assert.obj=function(it){if(!$.isObject(it))throw TypeError(it+" is not an object!");return it};assert.inst=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it};module.exports=assert},{"./$":15}],5:[function(require,module,exports){var $=require("./$");module.exports=Object.assign||function(target,source){var T=Object($.assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=$.ES5Object(arguments[i++]),keys=$.getKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$":15}],6:[function(require,module,exports){var $=require("./$"),TAG=require("./$.wks")("toStringTag"),toString={}.toString;function cof(it){return toString.call(it).slice(8,-1)}cof.classof=function(it){var O,T;return it==undefined?it===undefined?"Undefined":"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:cof(O)};cof.set=function(it,tag,stat){if(it&&!$.has(it=stat?it:it.prototype,TAG))$.hide(it,TAG,tag)};module.exports=cof},{"./$":15,"./$.wks":26}],7:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,assert=require("./$.assert"),$iter=require("./$.iter"),has=$.has,set=$.set,isObject=$.isObject,hide=$.hide,step=$iter.step,isFrozen=Object.isFrozen||$.core.Object.isFrozen,ID=safe("id"),O1=safe("O1"),LAST=safe("last"),FIRST=safe("first"),ITER=safe("iter"),SIZE=$.DESC?safe("size"):"size",id=0;function fastKey(it,create){if(!isObject(it))return(typeof it=="string"?"S":"P")+it;if(isFrozen(it))return"F";if(!has(it,ID)){if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(iterable){var that=assert.inst(this,C,NAME);set(that,O1,$.create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);if(iterable!=undefined)$iter.forOf(iterable,IS_MAP,that[ADDER],that)}$.mix(C.prototype,{clear:function(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function(key){return!!getEntry(this,key)}});if($.DESC)$.setDesc(C.prototype,"size",{get:function(){return assert.def(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!="F")that[O1][index]=entry}return that},getEntry:getEntry,getIterConstructor:function(){return function(iterated,kind){set(this,ITER,{o:iterated,k:kind})}},next:function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){iter.o=undefined;return step(1)}if(kind=="key")return step(0,entry.k);if(kind=="value")return step(0,entry.v);return step(0,[entry.k,entry.v])}}},{"./$":15,"./$.assert":4,"./$.ctx":10,"./$.iter":14,"./$.uid":24}],8:[function(require,module,exports){"use strict";var $=require("./$"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.iter").forOf,has=$.has,isObject=$.isObject,hide=$.hide,isFrozen=Object.isFrozen||$.core.Object.isFrozen,id=0,ID=safe("id"),WEAK=safe("weak"),LEAK=safe("leak"),method=require("./$.array-methods"),find=method(5),findIndex=method(6);function findFrozen(store,key){return find.call(store.array,function(it){return it[0]===key})}function leakStore(that){return that[LEAK]||hide(that,LEAK,{array:[],get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.array.push([key,value])},"delete":function(key){var index=findIndex.call(this.array,function(it){return it[0]===key});if(~index)this.array.splice(index,1);return!!~index}})[LEAK]}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(iterable){$.set(assert.inst(this,C,NAME),ID,id++);if(iterable!=undefined)forOf(iterable,IS_MAP,this[ADDER],this)}$.mix(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this)["delete"](key);return has(key,WEAK)&&has(key[WEAK],this[ID])&&delete key[WEAK][this[ID]]},has:function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this).has(key);return has(key,WEAK)&&has(key[WEAK],this[ID])}});return C},def:function(that,key,value){if(isFrozen(assert.obj(key))){leakStore(that).set(key,value)}else{has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that[ID]]=value}return that},leakStore:leakStore,WEAK:WEAK,ID:ID}},{"./$":15,"./$.array-methods":3,"./$.assert":4,"./$.iter":14,"./$.uid":24}],9:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),$iter=require("./$.iter"),assertInstance=require("./$.assert").inst;module.exports=function(NAME,methods,common,IS_MAP,isWeak){var Base=$.g[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};function fixMethod(KEY,CHAIN){var method=proto[KEY];if($.FW)proto[KEY]=function(a,b){var result=method.call(this,a===0?0:a,b);return CHAIN?this:result}}if(!$.isFunction(C)||!(isWeak||!$iter.BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(NAME,IS_MAP,ADDER);$.mix(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](isWeak?{}:-0,1),buggyZero;if($iter.fail(function(iter){new C(iter)})||$iter.DANGER_CLOSING){C=function(iterable){assertInstance(this,C,NAME);var that=new Base;if(iterable!=undefined)$iter.forOf(iterable,IS_MAP,that[ADDER],that);return that};C.prototype=proto;if($.FW)proto.constructor=C}isWeak||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER,true)}require("./$.cof").set(C,NAME);require("./$.species")(C);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);if(!isWeak)$iter.std(C,NAME,common.getIterConstructor(),common.next,IS_MAP?"key+value":"value",!IS_MAP,true);return C}},{"./$":15,"./$.assert":4,"./$.cof":6,"./$.def":11,"./$.iter":14,"./$.species":21}],10:[function(require,module,exports){var assertFunction=require("./$.assert").fn;module.exports=function(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.assert":4}],11:[function(require,module,exports){var $=require("./$"),global=$.g,core=$.core,isFunction=$.isFunction;function ctx(fn,that){return function(){return fn.apply(that,arguments)}}global.core=core;$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;function $def(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,target=isGlobal?global:type&$def.S?global[name]:(global[name]||{}).prototype,exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;out=(own?target:source)[key];if(type&$def.B&&own)exp=ctx(out,global);else exp=type&$def.P&&isFunction(out)?ctx(Function.call,out):out;if(target&&!own){if(isGlobal)target[key]=out;else delete target[key]&&$.hide(target,key,out)}if(exports[key]!=out)$.hide(exports,key,exp)}}module.exports=$def},{"./$":15}],12:[function(require,module,exports){module.exports=function($){$.FW=true;$.path=$.g;return $}},{}],13:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}},{}],14:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),$def=require("./$.def"),assertObject=require("./$.assert").obj,SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",Iterators={},IteratorPrototype={};var BUGGY="keys"in[]&&!("next"in[].keys());setIterator(IteratorPrototype,$.that);function setIterator(O,value){$.hide(O,SYMBOL_ITERATOR,value);if(FF_ITERATOR in[])$.hide(O,FF_ITERATOR,value)}function defineIterator(Constructor,NAME,value,DEFAULT){var proto=Constructor.prototype,iter=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT]||value;if($.FW)setIterator(proto,iter);if(iter!==value){var iterProto=$.getProto(iter.call(new Constructor));cof.set(iterProto,NAME+" Iterator",true);if($.FW)$.has(proto,FF_ITERATOR)&&setIterator(iterProto,$.that)}Iterators[NAME]=iter;Iterators[NAME+" Iterator"]=$.that;return iter}function getIterator(it){var Symbol=$.g.Symbol,ext=it[Symbol&&Symbol.iterator||FF_ITERATOR],getIter=ext||it[SYMBOL_ITERATOR]||Iterators[cof.classof(it)];return assertObject(getIter.call(it))}function closeIterator(iterator){var ret=iterator["return"];if(ret!==undefined)assertObject(ret.call(iterator))}function stepCall(iterator,fn,value,entries){try{return entries?fn(assertObject(value)[0],value[1]):fn(value)}catch(e){closeIterator(iterator);throw e}}var DANGER_CLOSING=true;!function(){try{var iter=[1].keys();iter["return"]=function(){DANGER_CLOSING=false};Array.from(iter,function(){throw 2})}catch(e){}}();var $iter=module.exports={BUGGY:BUGGY,DANGER_CLOSING:DANGER_CLOSING,fail:function(exec){var fail=true;try{var arr=[[{},1]],iter=arr[SYMBOL_ITERATOR](),next=iter.next;iter.next=function(){fail=false;return next.call(this)};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return fail},Iterators:Iterators,prototype:IteratorPrototype,step:function(done,value){return{value:value,done:!!done}},stepCall:stepCall,close:closeIterator,is:function(it){var O=Object(it),Symbol=$.g.Symbol,SYM=Symbol&&Symbol.iterator||FF_ITERATOR;return SYM in O||SYMBOL_ITERATOR in O||$.has(Iterators,cof.classof(O))},get:getIterator,set:setIterator,create:function(Constructor,NAME,next,proto){Constructor.prototype=$.create(proto||$iter.prototype,{next:$.desc(1,next)});cof.set(Constructor,NAME+" Iterator")},define:defineIterator,std:function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){function createIter(kind){return function(){return new Constructor(this,kind)}}$iter.create(Constructor,NAME,next);var entries=createIter("key+value"),values=createIter("value"),proto=Base.prototype,methods,key;if(DEFAULT=="value")values=defineIterator(Base,NAME,values,"values");else entries=defineIterator(Base,NAME,entries,"entries");if(DEFAULT){methods={entries:entries,keys:IS_SET?values:createIter("key"),values:values};$def($def.P+$def.F*BUGGY,NAME,methods);if(FORCE)for(key in methods){if(!(key in proto))$.hide(proto,key,methods[key])}}},forOf:function(iterable,entries,fn,that){var iterator=getIterator(iterable),f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done){if(stepCall(iterator,f,step.value,entries)===false){return closeIterator(iterator)}}}}},{"./$":15,"./$.assert":4,"./$.cof":6,"./$.ctx":10,"./$.def":11,"./$.wks":26}],15:[function(require,module,exports){"use strict";var global=typeof self!="undefined"?self:Function("return this")(),core={},defineProperty=Object.defineProperty,hasOwnProperty={}.hasOwnProperty,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min;var DESC=!!function(){try{return defineProperty({},"a",{get:function(){return 2}}).a==2}catch(e){}}();var hide=createDefiner(1);function toInteger(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}function desc(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return $.setDesc(object,key,desc(bitmap,value))}:simpleSet}function isObject(it){return it!==null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}function assertDefined(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}var $=module.exports=require("./$.fw")({g:global,core:core,html:global.document&&document.documentElement,isObject:isObject,isFunction:isFunction,it:function(it){return it},that:function(){return this},toInteger:toInteger,toLength:function(it){return it>0?min(toInteger(it),9007199254740991):0},toIndex:function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)},has:function(it,key){return hasOwnProperty.call(it,key)},create:Object.create,getProto:Object.getPrototypeOf,DESC:DESC,desc:desc,getDesc:Object.getOwnPropertyDescriptor,setDesc:defineProperty,getKeys:Object.keys,getNames:Object.getOwnPropertyNames,getSymbols:Object.getOwnPropertySymbols,assertDefined:assertDefined,ES5Object:Object,toObject:function(it){return $.ES5Object(assertDefined(it))},hide:hide,def:createDefiner(0),set:global.Symbol?simpleSet:hide,mix:function(target,src){for(var key in src)hide(target,key,src[key]);return target},each:[].forEach});if(typeof __e!="undefined")__e=core;if(typeof __g!="undefined")__g=global},{"./$.fw":12}],16:[function(require,module,exports){var $=require("./$");module.exports=function(object,el){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":15}],17:[function(require,module,exports){var $=require("./$"),assertObject=require("./$.assert").obj;module.exports=function(it){assertObject(it);return $.getSymbols?$.getNames(it).concat($.getSymbols(it)):$.getNames(it)}},{"./$":15,"./$.assert":4}],18:[function(require,module,exports){"use strict";var $=require("./$"),invoke=require("./$.invoke"),assertFunction=require("./$.assert").fn;module.exports=function(){var fn=assertFunction(this),length=arguments.length,pargs=Array(length),i=0,_=$.path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$":15,"./$.assert":4,"./$.invoke":13}],19:[function(require,module,exports){"use strict";module.exports=function(regExp,replace,isStatic){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}},{}],20:[function(require,module,exports){var $=require("./$"),assert=require("./$.assert");module.exports=Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,$.getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function(O,proto){assert.obj(O);assert(proto===null||$.isObject(proto),proto,": can't set as prototype!");if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined)},{"./$":15,"./$.assert":4,"./$.ctx":10}],21:[function(require,module,exports){var $=require("./$");module.exports=function(C){if($.DESC&&$.FW)$.setDesc(C,require("./$.wks")("species"),{configurable:true,get:$.that})}},{"./$":15,"./$.wks":26}],22:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function(TO_STRING){return function(pos){var s=String($.assertDefined(this)),i=$.toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$":15}],23:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),invoke=require("./$.invoke"),global=$.g,isFunction=$.isFunction,setTask=global.setImmediate,clearTask=global.clearImmediate,postMessage=global.postMessage,addEventListener=global.addEventListener,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;function run(){var id=+this;if($.has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run.call(event.data)}if(!isFunction(setTask)||!isFunction(clearTask)){setTask=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearTask=function(id){delete queue[id]};if(cof(global.process)=="process"){defer=function(id){global.process.nextTick(ctx(run,id,1))}}else if(addEventListener&&isFunction(postMessage)&&!$.g.importScripts){defer=function(id){postMessage(id,"*")};addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if($.g.document&&ONREADYSTATECHANGE in document.createElement("script")){defer=function(id){$.html.appendChild(document.createElement("script"))[ONREADYSTATECHANGE]=function(){$.html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$":15,"./$.cof":6,"./$.ctx":10,"./$.invoke":13}],24:[function(require,module,exports){var sid=0;function uid(key){return"Symbol("+key+")_"+(++sid+Math.random()).toString(36)}uid.safe=require("./$").g.Symbol||uid;module.exports=uid},{"./$":15}],25:[function(require,module,exports){var $=require("./$"),UNSCOPABLES=require("./$.wks")("unscopables");if($.FW&&!(UNSCOPABLES in[]))$.hide(Array.prototype,UNSCOPABLES,{});module.exports=function(key){if($.FW)[][UNSCOPABLES][key]=true}},{"./$":15,"./$.wks":26}],26:[function(require,module,exports){var global=require("./$").g,store={};module.exports=function(name){return store[name]||(store[name]=global.Symbol&&global.Symbol[name]||require("./$.uid").safe("Symbol."+name))}},{"./$":15,"./$.uid":24}],27:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid").safe("__proto__"),assert=require("./$.assert"),assertObject=assert.obj,ObjectProto=Object.prototype,A=[],slice=A.slice,indexOf=A.indexOf,classof=cof.classof,defineProperties=Object.defineProperties,has=$.has,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,isFunction=$.isFunction,toObject=$.toObject,toLength=$.toLength,IE8_DOM_DEFINE=false;if(!$.DESC){try{IE8_DOM_DEFINE=defineProperty(document.createElement("div"),"x",{get:function(){return 8}}).x==8}catch(e){}$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)assertObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};defineProperties=function(O,Properties){assertObject(O);var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!$.DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=document.createElement("iframe"),i=keysLen1,iframeDocument;iframe.style.display="none";$.html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write("");iframeDocument.close();createDict=iframeDocument.F;while(i--)delete createDict.prototype[keys1[i]];return createDict()};function createGetKeys(names,length){return function(object){var O=toObject(object),i=0,result=[],key;for(key in O)if(key!=IE_PROTO)has(O,key)&&result.push(key);while(length>i)if(has(O,key=names[i++])){~indexOf.call(result,key)||result.push(key)}return result}}function isPrimitive(it){return!$.isObject(it)}function Empty(){}$def($def.S,"Object",{getPrototypeOf:$.getProto=$.getProto||function(O){O=Object(assert.def(O));if(has(O,IE_PROTO))return O[IE_PROTO];if(isFunction(O.constructor)&&O instanceof O.constructor){return O.constructor.prototype}return O instanceof Object?ObjectProto:null},getOwnPropertyNames:$.getNames=$.getNames||createGetKeys(keys2,keys2.length,true),create:$.create=$.create||function(O,Properties){var result;if(O!==null){Empty.prototype=assertObject(O);result=new Empty;Empty.prototype=null;result[IE_PROTO]=O}else result=createDict();return Properties===undefined?result:defineProperties(result,Properties)},keys:$.getKeys=$.getKeys||createGetKeys(keys1,keysLen1,false),seal:$.it,freeze:$.it,preventExtensions:$.it,isSealed:isPrimitive,isFrozen:isPrimitive,isExtensible:$.isObject});$def($def.P,"Function",{bind:function(that){var fn=assert.fn(this),partArgs=slice.call(arguments,1);function bound(){var args=partArgs.concat(slice.call(arguments));return invoke(fn,args,this instanceof bound?$.create(fn.prototype):that)}if(fn.prototype)bound.prototype=fn.prototype;return bound}});function arrayMethodFix(fn){return function(){return fn.apply($.ES5Object(this),arguments)}}if(!(0 in Object("z")&&"z"[0]=="z")){$.ES5Object=function(it){return cof(it)=="String"?it.split(""):Object(it)}}$def($def.P+$def.F*($.ES5Object!=Object),"Array",{slice:arrayMethodFix(slice),join:arrayMethodFix(A.join)});$def($def.S,"Array",{isArray:function(arg){return cof(arg)=="Array"}});function createArrayReduce(isRight){return function(callbackfn,memo){assert.fn(callbackfn);var O=toObject(this),length=toLength(O.length),index=isRight?length-1:0,i=isRight?-1:1;if(arguments.length<2)for(;;){if(index in O){memo=O[index];index+=i;break}index+=i;assert(isRight?index>=0:length>index,"Reduce of empty array with no initial value")}for(;isRight?index>=0:length>index;index+=i)if(index in O){memo=callbackfn(memo,O[index],index,this)}return memo}}$def($def.P,"Array",{forEach:$.each=$.each||arrayMethod(0),map:arrayMethod(1),filter:arrayMethod(2),some:arrayMethod(3),every:arrayMethod(4),reduce:createArrayReduce(false),reduceRight:createArrayReduce(true),indexOf:indexOf=indexOf||require("./$.array-includes")(false),lastIndexOf:function(el,fromIndex){var O=toObject(this),length=toLength(O.length),index=length-1;if(arguments.length>1)index=Math.min(index,$.toInteger(fromIndex));if(index<0)index=toLength(length+index);for(;index>=0;index--)if(index in O)if(O[index]===el)return index;return-1}});$def($def.P,"String",{trim:require("./$.replacer")(/^\s*([\s\S]*\S)?\s*$/,"$1")});$def($def.S,"Date",{now:function(){return+new Date}});function lz(num){return num>9?num:"0"+num}$def($def.P,"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var d=this,y=d.getUTCFullYear(),m=d.getUTCMilliseconds(),s=y<0?"-":y>9999?"+":"";return s+("00000"+Math.abs(y)).slice(s?-6:-4)+"-"+lz(d.getUTCMonth()+1)+"-"+lz(d.getUTCDate())+"T"+lz(d.getUTCHours())+":"+lz(d.getUTCMinutes())+":"+lz(d.getUTCSeconds())+"."+(m>99?m:"0"+lz(m))+"Z"}});if(classof(function(){return arguments}())=="Object")cof.classof=function(it){var tag=classof(it);return tag=="Object"&&isFunction(it.callee)?"Arguments":tag}},{"./$":15,"./$.array-includes":2,"./$.array-methods":3,"./$.assert":4,"./$.cof":6,"./$.def":11,"./$.invoke":13,"./$.replacer":19,"./$.uid":24}],28:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{copyWithin:function(target,start){var O=Object($.assertDefined(this)),len=$.toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],fin=end===undefined?len:toIndex(end,len),count=Math.min(fin-from,len-to),inc=1;if(from0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O}});require("./$.unscope")("copyWithin")},{"./$":15,"./$.def":11,"./$.unscope":25}],29:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{fill:function(value){var O=Object($.assertDefined(this)),length=$.toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O}});require("./$.unscope")("fill")},{"./$":15,"./$.def":11,"./$.unscope":25}],30:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{findIndex:require("./$.array-methods")(6)});require("./$.unscope")("findIndex")},{"./$.array-methods":3,"./$.def":11,"./$.unscope":25}],31:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{find:require("./$.array-methods")(5)});require("./$.unscope")("find")},{"./$.array-methods":3,"./$.def":11,"./$.unscope":25}],32:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),$iter=require("./$.iter"),stepCall=$iter.stepCall;$def($def.S+$def.F*$iter.DANGER_CLOSING,"Array",{from:function(arrayLike){var O=Object($.assertDefined(arrayLike)),mapfn=arguments[1],mapping=mapfn!==undefined,f=mapping?ctx(mapfn,arguments[2],2):undefined,index=0,length,result,step,iterator;if($iter.is(O)){iterator=$iter.get(O);result=new(typeof this=="function"?this:Array);for(;!(step=iterator.next()).done;index++){result[index]=mapping?stepCall(iterator,f,[step.value,index],true):step.value}}else{result=new(typeof this=="function"?this:Array)(length=$.toLength(O.length));for(;length>index;index++){result[index]=mapping?f(O[index],index):O[index]}}result.length=index;return result}})},{"./$":15,"./$.ctx":10,"./$.def":11,"./$.iter":14}],33:[function(require,module,exports){var $=require("./$"),setUnscope=require("./$.unscope"),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step,Iterators=$iter.Iterators;$iter.std(Array,"Array",function(iterated,kind){$.set(this,ITER,{o:$.toObject(iterated),i:0,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,index=iter.i++;if(!O||index>=O.length){iter.o=undefined;return step(1)}if(kind=="key")return step(0,index);if(kind=="value")return step(0,O[index]);return step(0,[index,O[index]])},"value");Iterators.Arguments=Iterators.Array;setUnscope("keys");setUnscope("values");setUnscope("entries")},{"./$":15,"./$.iter":14,"./$.uid":24,"./$.unscope":25}],34:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Array",{of:function(){var index=0,length=arguments.length,result=new(typeof this=="function"?this:Array)(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}})},{"./$.def":11}],35:[function(require,module,exports){require("./$.species")(Array)},{"./$.species":21}],36:[function(require,module,exports){"use strict";var $=require("./$"),NAME="name",setDesc=$.setDesc,FunctionProto=Function.prototype;NAME in FunctionProto||$.FW&&$.DESC&&setDesc(FunctionProto,NAME,{configurable:true,get:function(){var match=String(this).match(/^\s*function ([^ (]*)/),name=match?match[1]:"";$.has(this,NAME)||setDesc(this,NAME,$.desc(5,name));return name},set:function(value){$.has(this,NAME)||setDesc(this,NAME,$.desc(0,value))}})},{"./$":15}],37:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Map",{get:function(key){var entry=strong.getEntry(this,key);return entry&&entry.v},set:function(key,value){return strong.def(this,key===0?0:key,value)}},strong,true)},{"./$.collection":9,"./$.collection-strong":7}],38:[function(require,module,exports){var Infinity=1/0,$def=require("./$.def"),E=Math.E,pow=Math.pow,abs=Math.abs,exp=Math.exp,log=Math.log,sqrt=Math.sqrt,ceil=Math.ceil,floor=Math.floor,sign=Math.sign||function(x){return(x=+x)==0||x!=x?x:x<0?-1:1};function asinh(x){return!isFinite(x=+x)||x==0?x:x<0?-asinh(-x):log(x+sqrt(x*x+1))}function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:exp(x)-1}$def($def.S,"Math",{acosh:function(x){return(x=+x)<1?NaN:isFinite(x)?log(x/E+sqrt(x+1)*sqrt(x-1)/E)+1:x},asinh:asinh,atanh:function(x){return(x=+x)==0?x:log((1+x)/(1-x))/2},cbrt:function(x){return sign(x=+x)*pow(abs(x),1/3)},clz32:function(x){return(x>>>=0)?32-x.toString(2).length:32},cosh:function(x){ +return(exp(x=+x)+exp(-x))/2},expm1:expm1,fround:function(x){return new Float32Array([x])[0]},hypot:function(value1,value2){var sum=0,len1=arguments.length,len2=len1,args=Array(len1),larg=-Infinity,arg;while(len1--){arg=args[len1]=+arguments[len1];if(arg==Infinity||arg==-Infinity)return Infinity;if(arg>larg)larg=arg}larg=arg||1;while(len2--)sum+=pow(args[len2]/larg,2);return larg*sqrt(sum)},imul:function(x,y){var UInt16=65535,xn=+x,yn=+y,xl=UInt16&xn,yl=UInt16&yn;return 0|xl*yl+((UInt16&xn>>>16)*yl+xl*(UInt16&yn>>>16)<<16>>>0)},log1p:function(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:log(1+x)},log10:function(x){return log(x)/Math.LN10},log2:function(x){return log(x)/Math.LN2},sign:sign,sinh:function(x){return abs(x=+x)<1?(expm1(x)-expm1(-x))/2:(exp(x-1)-exp(-x-1))*(E/2)},tanh:function(x){var a=expm1(x=+x),b=expm1(-x);return a==Infinity?1:b==Infinity?-1:(a-b)/(exp(x)+exp(-x))},trunc:function(it){return(it>0?floor:ceil)(it)}})},{"./$.def":11}],39:[function(require,module,exports){"use strict";var $=require("./$"),isObject=$.isObject,isFunction=$.isFunction,NUMBER="Number",Number=$.g[NUMBER],Base=Number,proto=Number.prototype;function toPrimitive(it){var fn,val;if(isFunction(fn=it.valueOf)&&!isObject(val=fn.call(it)))return val;if(isFunction(fn=it.toString)&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to number")}function toNumber(it){if(isObject(it))it=toPrimitive(it);if(typeof it=="string"&&it.length>2&&it.charCodeAt(0)==48){var binary=false;switch(it.charCodeAt(1)){case 66:case 98:binary=true;case 79:case 111:return parseInt(it.slice(2),binary?2:8)}}return+it}if($.FW&&!(Number("0o1")&&Number("0b1"))){Number=function Number(it){return this instanceof Number?new Base(toNumber(it)):toNumber(it)};$.each.call($.DESC?$.getNames(Base):("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,"+"EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,"+"MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger").split(","),function(key){if($.has(Base,key)&&!$.has(Number,key)){$.setDesc(Number,key,$.getDesc(Base,key))}});Number.prototype=proto;proto.constructor=Number;$.hide($.g,NUMBER,Number)}},{"./$":15}],40:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),abs=Math.abs,floor=Math.floor,MAX_SAFE_INTEGER=9007199254740991;function isInteger(it){return!$.isObject(it)&&isFinite(it)&&floor(it)===it}$def($def.S,"Number",{EPSILON:Math.pow(2,-52),isFinite:function(it){return typeof it=="number"&&isFinite(it)},isInteger:isInteger,isNaN:function(number){return number!=number},isSafeInteger:function(number){return isInteger(number)&&abs(number)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MIN_SAFE_INTEGER:-MAX_SAFE_INTEGER,parseFloat:parseFloat,parseInt:parseInt})},{"./$":15,"./$.def":11}],41:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{assign:require("./$.assign")})},{"./$.assign":5,"./$.def":11}],42:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{is:function(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}})},{"./$.def":11}],43:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{setPrototypeOf:require("./$.set-proto")})},{"./$.def":11,"./$.set-proto":20}],44:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),isObject=$.isObject,toObject=$.toObject;function wrapObjectMethod(METHOD,MODE){var fn=($.core.Object||{})[METHOD]||Object[METHOD],f=0,o={};o[METHOD]=MODE==1?function(it){return isObject(it)?fn(it):it}:MODE==2?function(it){return isObject(it)?fn(it):true}:MODE==3?function(it){return isObject(it)?fn(it):false}:MODE==4?function(it,key){return fn(toObject(it),key)}:MODE==5?function(it){return fn(Object($.assertDefined(it)))}:function(it){return fn(toObject(it))};try{fn("z")}catch(e){f=1}$def($def.S+$def.F*f,"Object",o)}wrapObjectMethod("freeze",1);wrapObjectMethod("seal",1);wrapObjectMethod("preventExtensions",1);wrapObjectMethod("isFrozen",2);wrapObjectMethod("isSealed",2);wrapObjectMethod("isExtensible",3);wrapObjectMethod("getOwnPropertyDescriptor",4);wrapObjectMethod("getPrototypeOf",5);wrapObjectMethod("keys");wrapObjectMethod("getOwnPropertyNames")},{"./$":15,"./$.def":11}],45:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),tmp={};tmp[require("./$.wks")("toStringTag")]="z";if($.FW&&cof(tmp)!="z")$.hide(Object.prototype,"toString",function(){return"[object "+cof.classof(this)+"]"})},{"./$":15,"./$.cof":6,"./$.wks":26}],46:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),$def=require("./$.def"),assert=require("./$.assert"),$iter=require("./$.iter"),SPECIES=require("./$.wks")("species"),RECORD=require("./$.uid").safe("record"),forOf=$iter.forOf,PROMISE="Promise",global=$.g,process=global.process,asap=process&&process.nextTick||require("./$.task").set,Promise=global[PROMISE],Base=Promise,isFunction=$.isFunction,isObject=$.isObject,assertFunction=assert.fn,assertObject=assert.obj,test;function getConstructor(C){var S=assertObject(C)[SPECIES];return S!=undefined?S:C}isFunction(Promise)&&isFunction(Promise.resolve)&&Promise.resolve(test=new Promise(function(){}))==test||function(){function isThenable(it){var then;if(isObject(it))then=it.then;return isFunction(then)?then:false}function handledRejectionOrHasOnRejected(promise){var record=promise[RECORD],chain=record.c,i=0,react;if(record.h)return true;while(chain.length>i){react=chain[i++];if(react.fail||handledRejectionOrHasOnRejected(react.P))return true}}function notify(record,isReject){var chain=record.c;if(isReject||chain.length)asap(function(){var promise=record.p,value=record.v,ok=record.s==1,i=0;if(isReject&&!handledRejectionOrHasOnRejected(promise)){setTimeout(function(){if(!handledRejectionOrHasOnRejected(promise)){if(cof(process)=="process"){process.emit("unhandledRejection",value,promise)}else if(global.console&&isFunction(console.error)){console.error("Unhandled promise rejection",value)}}},1e3)}else while(chain.length>i)!function(react){var cb=ok?react.ok:react.fail,ret,then;try{if(cb){if(!ok)record.h=true;ret=cb===true?value:cb(value);if(ret===react.P){react.rej(TypeError(PROMISE+"-chain cycle"))}else if(then=isThenable(ret)){then.call(ret,react.res,react.rej)}else react.res(ret)}else react.rej(value)}catch(err){react.rej(err)}}(chain[i++]);chain.length=0})}function reject(value){var record=this;if(record.d)return;record.d=true;record=record.r||record;record.v=value;record.s=2;notify(record,true)}function resolve(value){var record=this,then,wrapper;if(record.d)return;record.d=true;record=record.r||record;try{if(then=isThenable(value)){wrapper={r:record,d:false};then.call(value,ctx(resolve,wrapper,1),ctx(reject,wrapper,1))}else{record.v=value;record.s=1;notify(record)}}catch(err){reject.call(wrapper||{r:record,d:false},err)}}Promise=function(executor){assertFunction(executor);var record={p:assert.inst(this,Promise,PROMISE),c:[],s:0,d:false,v:undefined,h:false};$.hide(this,RECORD,record);try{executor(ctx(resolve,record,1),ctx(reject,record,1))}catch(err){reject.call(record,err)}};$.mix(Promise.prototype,{then:function(onFulfilled,onRejected){var S=assertObject(assertObject(this).constructor)[SPECIES];var react={ok:isFunction(onFulfilled)?onFulfilled:true,fail:isFunction(onRejected)?onRejected:false};var P=react.P=new(S!=undefined?S:Promise)(function(res,rej){react.res=assertFunction(res);react.rej=assertFunction(rej)});var record=this[RECORD];record.c.push(react);record.s&¬ify(record);return P},"catch":function(onRejected){return this.then(undefined,onRejected)}})}();$def($def.G+$def.W+$def.F*(Promise!=Base),{Promise:Promise});$def($def.S,PROMISE,{reject:function(r){return new(getConstructor(this))(function(res,rej){rej(r)})},resolve:function(x){return isObject(x)&&RECORD in x&&$.getProto(x)===this.prototype?x:new(getConstructor(this))(function(res){res(x)})}});$def($def.S+$def.F*($iter.fail(function(iter){Promise.all(iter)["catch"](function(){})})||$iter.DANGER_CLOSING),PROMISE,{all:function(iterable){var C=getConstructor(this),values=[];return new C(function(resolve,reject){forOf(iterable,false,values.push,values);var remaining=values.length,results=Array(remaining);if(remaining)$.each.call(values,function(promise,index){C.resolve(promise).then(function(value){results[index]=value;--remaining||resolve(results)},reject)});else resolve(results)})},race:function(iterable){var C=getConstructor(this);return new C(function(resolve,reject){forOf(iterable,false,function(promise){C.resolve(promise).then(resolve,reject)})})}});cof.set(Promise,PROMISE);require("./$.species")(Promise)},{"./$":15,"./$.assert":4,"./$.cof":6,"./$.ctx":10,"./$.def":11,"./$.iter":14,"./$.species":21,"./$.task":23,"./$.uid":24,"./$.wks":26}],47:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),setProto=require("./$.set-proto"),$iter=require("./$.iter"),ITER=require("./$.uid").safe("iter"),step=$iter.step,assert=require("./$.assert"),isObject=$.isObject,getDesc=$.getDesc,setDesc=$.setDesc,getProto=$.getProto,apply=Function.apply,assertObject=assert.obj,isExtensible=Object.isExtensible||$.it;function Enumerate(iterated){var keys=[],key;for(key in iterated)keys.push(key);$.set(this,ITER,{o:iterated,a:keys,i:0})}$iter.create(Enumerate,"Object",function(){var iter=this[ITER],keys=iter.a,key;do{if(iter.i>=keys.length)return step(1)}while(!((key=keys[iter.i++])in iter.o));return step(0,key)});function wrap(fn){return function(it){assertObject(it);try{fn.apply(undefined,arguments);return true}catch(e){return false}}}function reflectGet(target,propertyKey){var receiver=arguments.length<3?target:arguments[2],desc=getDesc(assertObject(target),propertyKey),proto;if(desc)return $.has(desc,"value")?desc.value:desc.get===undefined?undefined:desc.get.call(receiver);return isObject(proto=getProto(target))?reflectGet(proto,propertyKey,receiver):undefined}function reflectSet(target,propertyKey,V){var receiver=arguments.length<4?target:arguments[3],ownDesc=getDesc(assertObject(target),propertyKey),existingDescriptor,proto;if(!ownDesc){if(isObject(proto=getProto(target))){return reflectSet(proto,propertyKey,V,receiver)}ownDesc=$.desc(0)}if($.has(ownDesc,"value")){if(ownDesc.writable===false||!isObject(receiver))return false;existingDescriptor=getDesc(receiver,propertyKey)||$.desc(0);existingDescriptor.value=V;setDesc(receiver,propertyKey,existingDescriptor);return true}return ownDesc.set===undefined?false:(ownDesc.set.call(receiver,V),true)}var reflect={apply:require("./$.ctx")(Function.call,apply,3),construct:function(target,argumentsList){var proto=assert.fn(arguments.length<3?target:arguments[2]).prototype,instance=$.create(isObject(proto)?proto:Object.prototype),result=apply.call(target,instance,argumentsList);return isObject(result)?result:instance},defineProperty:wrap(setDesc),deleteProperty:function(target,propertyKey){var desc=getDesc(assertObject(target),propertyKey);return desc&&!desc.configurable?false:delete target[propertyKey]},enumerate:function(target){return new Enumerate(assertObject(target))},get:reflectGet,getOwnPropertyDescriptor:function(target,propertyKey){return getDesc(assertObject(target),propertyKey)},getPrototypeOf:function(target){return getProto(assertObject(target))},has:function(target,propertyKey){return propertyKey in target},isExtensible:function(target){return!!isExtensible(assertObject(target))},ownKeys:require("./$.own-keys"),preventExtensions:wrap(Object.preventExtensions||$.it),set:reflectSet};if(setProto)reflect.setPrototypeOf=function(target,proto){setProto(assertObject(target),proto);return true};$def($def.G,{Reflect:{}});$def($def.S,"Reflect",reflect)},{"./$":15,"./$.assert":4,"./$.ctx":10,"./$.def":11,"./$.iter":14,"./$.own-keys":17,"./$.set-proto":20,"./$.uid":24}],48:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),RegExp=$.g.RegExp,Base=RegExp,proto=RegExp.prototype;if($.FW&&$.DESC){if(!function(){try{return RegExp(/a/g,"i")=="/a/i"}catch(e){}}()){RegExp=function RegExp(pattern,flags){return new Base(cof(pattern)=="RegExp"&&flags!==undefined?pattern.source:pattern,flags)};$.each.call($.getNames(Base),function(key){key in RegExp||$.setDesc(RegExp,key,{configurable:true,get:function(){return Base[key]},set:function(it){Base[key]=it}})});proto.constructor=RegExp;RegExp.prototype=proto;$.hide($.g,"RegExp",RegExp)}if(/./g.flags!="g")$.setDesc(proto,"flags",{configurable:true,get:require("./$.replacer")(/^.*\/(\w*)$/,"$1")})}require("./$.species")(RegExp)},{"./$":15,"./$.cof":6,"./$.replacer":19,"./$.species":21}],49:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Set",{add:function(value){return strong.def(this,value=value===0?0:value,value)}},strong)},{"./$.collection":9,"./$.collection-strong":7}],50:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{codePointAt:require("./$.string-at")(false)})},{"./$.def":11,"./$.string-at":22}],51:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),toLength=$.toLength;$def($def.P,"String",{endsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),endPosition=arguments[1],len=toLength(that.length),end=endPosition===undefined?len:Math.min(toLength(endPosition),len);searchString+="";return that.slice(end-searchString.length,end)===searchString}})},{"./$":15,"./$.cof":6,"./$.def":11}],52:[function(require,module,exports){var $def=require("./$.def"),toIndex=require("./$").toIndex,fromCharCode=String.fromCharCode;$def($def.S,"String",{fromCodePoint:function(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")}})},{"./$":15,"./$.def":11}],53:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{includes:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();return!!~String($.assertDefined(this)).indexOf(searchString,arguments[1])}})},{"./$":15,"./$.cof":6,"./$.def":11}],54:[function(require,module,exports){var set=require("./$").set,at=require("./$.string-at")(true),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step;$iter.std(String,"String",function(iterated){set(this,ITER,{o:String(iterated),i:0})},function(){var iter=this[ITER],O=iter.o,index=iter.i,point;if(index>=O.length)return step(1);point=at.call(O,index);iter.i+=point.length;return step(0,point)})},{"./$":15,"./$.iter":14,"./$.string-at":22,"./$.uid":24}],55:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");$def($def.S,"String",{raw:function(callSite){var raw=$.toObject(callSite.raw),len=$.toLength(raw.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(raw[i++]));if(i0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}})},{"./$":15,"./$.def":11}],57:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{startsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),index=$.toLength(Math.min(arguments[1],that.length));searchString+="";return that.slice(index,index+searchString.length)===searchString}})},{"./$":15,"./$.cof":6,"./$.def":11}],58:[function(require,module,exports){"use strict";var $=require("./$"),setTag=require("./$.cof").set,uid=require("./$.uid"),$def=require("./$.def"),keyOf=require("./$.keyof"),has=$.has,hide=$.hide,getNames=$.getNames,toObject=$.toObject,Symbol=$.g.Symbol,Base=Symbol,setter=false,TAG=uid.safe("tag"),SymbolRegistry={},AllSymbols={};function wrap(tag){var sym=AllSymbols[tag]=$.set($.create(Symbol.prototype),TAG,tag);$.DESC&&setter&&$.setDesc(Object.prototype,tag,{configurable:true,set:function(value){hide(this,tag,value)}});return sym}if(!$.isFunction(Symbol)){Symbol=function(description){if(this instanceof Symbol)throw TypeError("Symbol is not a constructor");return wrap(uid(description))};hide(Symbol.prototype,"toString",function(){return this[TAG]})}$def($def.G+$def.W,{Symbol:Symbol});var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=Symbol(key)},keyFor:function(key){return keyOf(SymbolRegistry,key)},pure:uid.safe,set:$.set,useSetter:function(){setter=true},useSimple:function(){setter=false}};$.each.call(("hasInstance,isConcatSpreadable,iterator,match,replace,search,"+"species,split,toPrimitive,toStringTag,unscopables").split(","),function(it){var sym=require("./$.wks")(it);symbolStatics[it]=Symbol===Base?sym:wrap(sym)});setter=true;$def($def.S,"Symbol",symbolStatics);$def($def.S+$def.F*(Symbol!=Base),"Object",{getOwnPropertyNames:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])||result.push(key);return result},getOwnPropertySymbols:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])&&result.push(AllSymbols[key]);return result}});setTag(Symbol,"Symbol");setTag(Math,"Math",true);setTag($.g.JSON,"JSON",true)},{"./$":15,"./$.cof":6,"./$.def":11,"./$.keyof":16,"./$.uid":24,"./$.wks":26}],59:[function(require,module,exports){"use strict";var $=require("./$"),weak=require("./$.collection-weak"),leakStore=weak.leakStore,ID=weak.ID,WEAK=weak.WEAK,has=$.has,isObject=$.isObject,isFrozen=Object.isFrozen||$.core.Object.isFrozen,tmp={};var WeakMap=require("./$.collection")("WeakMap",{get:function(key){if(isObject(key)){if(isFrozen(key))return leakStore(this).get(key);if(has(key,WEAK))return key[WEAK][this[ID]]}},set:function(key,value){return weak.def(this,key,value)}},weak,true,true);if($.FW&&(new WeakMap).set((Object.freeze||Object)(tmp),7).get(tmp)!=7){$.each.call(["delete","has","get","set"],function(key){var method=WeakMap.prototype[key];WeakMap.prototype[key]=function(a,b){if(isObject(a)&&isFrozen(a)){var result=leakStore(this)[key](a,b);return key=="set"?this:result}return method.call(this,a,b)}})}},{"./$":15,"./$.collection":9,"./$.collection-weak":8}],60:[function(require,module,exports){"use strict";var weak=require("./$.collection-weak");require("./$.collection")("WeakSet",{add:function(value){return weak.def(this,value,true)}},weak,false,true)},{"./$.collection":9,"./$.collection-weak":8}],61:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{includes:require("./$.array-includes")(true)});require("./$.unscope")("includes")},{"./$.array-includes":2,"./$.def":11,"./$.unscope":25}],62:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),ownKeys=require("./$.own-keys");$def($def.S,"Object",{getOwnPropertyDescriptors:function(object){var O=$.toObject(object),result={};$.each.call(ownKeys(O),function(key){$.setDesc(result,key,$.desc(0,$.getDesc(O,key)))});return result}})},{"./$":15,"./$.def":11,"./$.own-keys":17}],63:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");function createObjectToArray(isEntries){return function(object){var O=$.toObject(object),keys=$.getKeys(object),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}$def($def.S,"Object",{values:createObjectToArray(false),entries:createObjectToArray(true)})},{"./$":15,"./$.def":11}],64:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"RegExp",{escape:require("./$.replacer")(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",true)})},{"./$.def":11,"./$.replacer":19}],65:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{at:require("./$.string-at")(true)})},{"./$.def":11,"./$.string-at":22}],66:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),core=$.core,statics={};function setStatics(keys,length){$.each.call(keys.split(","),function(key){if(length==undefined&&key in core.Array)statics[key]=core.Array[key];else if(key in[])statics[key]=require("./$.ctx")(Function.call,[][key],length)})}setStatics("pop,reverse,shift,keys,values,entries",1);setStatics("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);setStatics("join,slice,concat,push,splice,unshift,sort,lastIndexOf,"+"reduce,reduceRight,copyWithin,fill,turn");$def($def.S,"Array",statics)},{"./$":15,"./$.ctx":10,"./$.def":11}],67:[function(require,module,exports){require("./es6.array.iterator");var $=require("./$"),Iterators=require("./$.iter").Iterators,ITERATOR=require("./$.wks")("iterator"),NodeList=$.g.NodeList;if($.FW&&NodeList&&!(ITERATOR in NodeList.prototype)){$.hide(NodeList.prototype,ITERATOR,Iterators.Array)}Iterators.NodeList=Iterators.Array},{"./$":15,"./$.iter":14,"./$.wks":26,"./es6.array.iterator":33}],68:[function(require,module,exports){var $def=require("./$.def"),$task=require("./$.task");$def($def.G+$def.B,{setImmediate:$task.set,clearImmediate:$task.clear})},{"./$.def":11,"./$.task":23}],69:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),invoke=require("./$.invoke"),partial=require("./$.partial"),MSIE=!!$.g.navigator&&/MSIE .\./.test(navigator.userAgent);function wrap(set){return MSIE?function(fn,time){return set(invoke(partial,[].slice.call(arguments,2),$.isFunction(fn)?fn:Function(fn)),time)}:set}$def($def.G+$def.B+$def.F*MSIE,{setTimeout:wrap($.g.setTimeout),setInterval:wrap($.g.setInterval)})},{"./$":15,"./$.def":11,"./$.invoke":13,"./$.partial":18}],70:[function(require,module,exports){require("./modules/es5");require("./modules/es6.symbol");require("./modules/es6.object.assign");require("./modules/es6.object.is");require("./modules/es6.object.set-prototype-of");require("./modules/es6.object.to-string");require("./modules/es6.object.statics-accept-primitives");require("./modules/es6.function.name");require("./modules/es6.number.constructor");require("./modules/es6.number.statics");require("./modules/es6.math");require("./modules/es6.string.from-code-point");require("./modules/es6.string.raw");require("./modules/es6.string.iterator");require("./modules/es6.string.code-point-at");require("./modules/es6.string.ends-with");require("./modules/es6.string.includes");require("./modules/es6.string.repeat");require("./modules/es6.string.starts-with");require("./modules/es6.array.from");require("./modules/es6.array.of");require("./modules/es6.array.iterator");require("./modules/es6.array.species");require("./modules/es6.array.copy-within");require("./modules/es6.array.fill");require("./modules/es6.array.find");require("./modules/es6.array.find-index");require("./modules/es6.regexp");require("./modules/es6.promise");require("./modules/es6.map");require("./modules/es6.set");require("./modules/es6.weak-map");require("./modules/es6.weak-set");require("./modules/es6.reflect");require("./modules/es7.array.includes");require("./modules/es7.string.at");require("./modules/es7.regexp.escape");require("./modules/es7.object.get-own-property-descriptors");require("./modules/es7.object.to-array");require("./modules/js.array.statics");require("./modules/web.timers");require("./modules/web.immediate");require("./modules/web.dom.iterable");module.exports=require("./modules/$").core},{"./modules/$":15,"./modules/es5":27,"./modules/es6.array.copy-within":28,"./modules/es6.array.fill":29,"./modules/es6.array.find":31,"./modules/es6.array.find-index":30,"./modules/es6.array.from":32,"./modules/es6.array.iterator":33,"./modules/es6.array.of":34,"./modules/es6.array.species":35,"./modules/es6.function.name":36,"./modules/es6.map":37,"./modules/es6.math":38,"./modules/es6.number.constructor":39,"./modules/es6.number.statics":40,"./modules/es6.object.assign":41,"./modules/es6.object.is":42,"./modules/es6.object.set-prototype-of":43,"./modules/es6.object.statics-accept-primitives":44,"./modules/es6.object.to-string":45,"./modules/es6.promise":46,"./modules/es6.reflect":47,"./modules/es6.regexp":48,"./modules/es6.set":49,"./modules/es6.string.code-point-at":50,"./modules/es6.string.ends-with":51,"./modules/es6.string.from-code-point":52,"./modules/es6.string.includes":53,"./modules/es6.string.iterator":54,"./modules/es6.string.raw":55,"./modules/es6.string.repeat":56,"./modules/es6.string.starts-with":57,"./modules/es6.symbol":58,"./modules/es6.weak-map":59,"./modules/es6.weak-set":60,"./modules/es7.array.includes":61,"./modules/es7.object.get-own-property-descriptors":62,"./modules/es7.object.to-array":63,"./modules/es7.regexp.escape":64,"./modules/es7.string.at":65,"./modules/js.array.statics":66,"./modules/web.dom.iterable":67,"./modules/web.immediate":68,"./modules/web.timers":69}],71:[function(require,module,exports){(function(global){!function(global){"use strict";var hasOwn=Object.prototype.hasOwnProperty;var undefined;var iteratorSymbol=typeof Symbol==="function"&&Symbol.iterator||"@@iterator";var inModule=typeof module==="object";var runtime=global.regeneratorRuntime;if(runtime){if(inModule){module.exports=runtime}return}runtime=global.regeneratorRuntime=inModule?module.exports:{};function wrap(innerFn,outerFn,self,tryLocsList){return new Generator(innerFn,outerFn,self||null,tryLocsList||[])}runtime.wrap=wrap;function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}var GenStateSuspendedStart="suspendedStart";var GenStateSuspendedYield="suspendedYield";var GenStateExecuting="executing";var GenStateCompleted="completed";var ContinueSentinel={};function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype;GeneratorFunction.prototype=Gp.constructor=GeneratorFunctionPrototype;GeneratorFunctionPrototype.constructor=GeneratorFunction;GeneratorFunction.displayName="GeneratorFunction";runtime.isGeneratorFunction=function(genFun){var ctor=typeof genFun==="function"&&genFun.constructor;return ctor?ctor===GeneratorFunction||(ctor.displayName||ctor.name)==="GeneratorFunction":false};runtime.mark=function(genFun){genFun.__proto__=GeneratorFunctionPrototype;genFun.prototype=Object.create(Gp);return genFun};runtime.async=function(innerFn,outerFn,self,tryLocsList){return new Promise(function(resolve,reject){var generator=wrap(innerFn,outerFn,self,tryLocsList);var callNext=step.bind(generator.next);var callThrow=step.bind(generator["throw"]);function step(arg){var record=tryCatch(this,null,arg);if(record.type==="throw"){reject(record.arg);return}var info=record.arg;if(info.done){resolve(info.value)}else{Promise.resolve(info.value).then(callNext,callThrow)}}callNext()})};function Generator(innerFn,outerFn,self,tryLocsList){var generator=outerFn?Object.create(outerFn.prototype):this;var context=new Context(tryLocsList);var state=GenStateSuspendedStart;function invoke(method,arg){if(state===GenStateExecuting){throw new Error("Generator is already running")}if(state===GenStateCompleted){return doneResult()}while(true){var delegate=context.delegate;if(delegate){var record=tryCatch(delegate.iterator[method],delegate.iterator,arg);if(record.type==="throw"){context.delegate=null;method="throw";arg=record.arg;continue}method="next";arg=undefined;var info=record.arg;if(info.done){context[delegate.resultName]=info.value;context.next=delegate.nextLoc}else{state=GenStateSuspendedYield;return info}context.delegate=null}if(method==="next"){if(state===GenStateSuspendedStart&&typeof arg!=="undefined"){throw new TypeError("attempt to send "+JSON.stringify(arg)+" to newborn generator")}if(state===GenStateSuspendedYield){context.sent=arg}else{delete context.sent}}else if(method==="throw"){if(state===GenStateSuspendedStart){state=GenStateCompleted;throw arg}if(context.dispatchException(arg)){method="next";arg=undefined}}else if(method==="return"){context.abrupt("return",arg)}state=GenStateExecuting;var record=tryCatch(innerFn,self,context);if(record.type==="normal"){state=context.done?GenStateCompleted:GenStateSuspendedYield;var info={value:record.arg,done:context.done};if(record.arg===ContinueSentinel){if(context.delegate&&method==="next"){arg=undefined}}else{return info}}else if(record.type==="throw"){state=GenStateCompleted;if(method==="next"){context.dispatchException(record.arg)}else{arg=record.arg}}}}generator.next=invoke.bind(generator,"next");generator["throw"]=invoke.bind(generator,"throw");generator["return"]=invoke.bind(generator,"return");return generator}Gp[iteratorSymbol]=function(){return this};Gp.toString=function(){return"[object Generator]"};function pushTryEntry(locs){var entry={tryLoc:locs[0]};if(1 in locs){entry.catchLoc=locs[1]}if(2 in locs){entry.finallyLoc=locs[2];entry.afterLoc=locs[3]}this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal";delete record.arg;entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}];tryLocsList.forEach(pushTryEntry,this);this.reset()}runtime.keys=function(object){var keys=[];for(var key in object){keys.push(key)}keys.reverse();return function next(){while(keys.length){var key=keys.pop();if(key in object){next.value=key;next.done=false;return next}}next.done=true;return next}};function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod){return iteratorMethod.call(iterable)}if(typeof iterable.next==="function"){return iterable}if(!isNaN(iterable.length)){var i=-1,next=function next(){while(++i=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc){return this.complete(entry.completion,entry.afterLoc)}}},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}(typeof global==="object"?global:typeof window==="object"?window:this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}]},{},[1]); \ No newline at end of file From 20d3a1bc45ac319ce5d6d59b2f39e8ba1266788e Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Mon, 6 Apr 2015 23:50:34 +0100 Subject: [PATCH 02/19] upgrade to Babel 5.0.9 with path for IE9 compatibility, added missing external-helpers. --- babel.js | 152 ++++++++++--------- babel.min.js | 64 ++++---- external-helpers.js | 327 ++++++++++++++++++++++++++++++++++++++++ external-helpers.min.js | 1 + 4 files changed, 441 insertions(+), 103 deletions(-) create mode 100644 external-helpers.min.js diff --git a/babel.js b/babel.js index fcf8015..01d80db 100644 --- a/babel.js +++ b/babel.js @@ -2739,7 +2739,9 @@ pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { this.expect(close); break; } else { - elts.push(this.parseAssignableListItemTypes(this.parseMaybeDefault())); + var left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left); + elts.push(this.parseMaybeDefault(null, left)); } } return elts; @@ -11394,8 +11396,8 @@ var UMDFormatter = (function (_AMDFormatter) { // globals - var browserArgs = [t.memberExpression(t.identifier("module"), t.identifier("exports"))]; - if (this.passModuleArg) browserArgs.push(t.identifier("module")); + var browserArgs = []; + if (this.passModuleArg) browserArgs.push(t.identifier("mod")); for (var _name2 in this.ids) { var id = this.defaultIds[_name2] || t.identifier(t.toIdentifier(_name2)); @@ -11407,12 +11409,17 @@ var UMDFormatter = (function (_AMDFormatter) { var moduleName = this.getModuleName(); if (moduleName) defineArgs.unshift(t.literal(moduleName)); + // + var globalArg = this.file.opts.basename; + if (moduleName) globalArg = moduleName; + globalArg = t.identifier(t.toIdentifier(globalArg)); + var runner = util.template("umd-runner-body", { AMD_ARGUMENTS: defineArgs, COMMON_TEST: commonTests, COMMON_ARGUMENTS: commonArgs, BROWSER_ARGUMENTS: browserArgs, - GLOBAL_ARG: t.identifier(t.toIdentifier(this.file.opts.basename)) + GLOBAL_ARG: globalArg }); // @@ -29839,138 +29846,147 @@ var path = require('path'); var commentRx = /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/mg; var mapFileCommentRx = - // //# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */ - /(?:\/\/[@#][ \t]+sourceMappingURL=(.+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg + // //# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */ + /(?:\/\/[@#][ \t]+sourceMappingURL=(.+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg function decodeBase64(base64) { - return new Buffer(base64, 'base64').toString(); + return new Buffer(base64, 'base64').toString(); } function stripComment(sm) { - return sm.split(',').pop(); + return sm.split(',').pop(); } function readFromFileMap(sm, dir) { - // NOTE: this will only work on the server since it attempts to read the map file + // NOTE: this will only work on the server since it attempts to read the map file - var r = mapFileCommentRx.exec(sm); - mapFileCommentRx.lastIndex = 0; - - // for some odd reason //# .. captures in 1 and /* .. */ in 2 - var filename = r[1] || r[2]; - var filepath = path.join(dir, filename); + var r = mapFileCommentRx.exec(sm); + mapFileCommentRx.lastIndex = 0; - try { - return fs.readFileSync(filepath, 'utf8'); - } catch (e) { - throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e); - } + // for some odd reason //# .. captures in 1 and /* .. */ in 2 + var filename = r[1] || r[2]; + var filepath = path.join(dir, filename); + + try { + return fs.readFileSync(filepath, 'utf8'); + } catch (e) { + throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e); + } } -function Converter (sm, opts) { - opts = opts || {}; - try { +function Converter(sm, opts) { + opts = opts || {}; + if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir); if (opts.hasComment) sm = stripComment(sm); if (opts.isEncoded) sm = decodeBase64(sm); if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm); this.sourcemap = sm; - } catch(e) { - console.error(e); - return null; - } +} + +function convertFromLargeSource(content) { + var lines = content.split('\n'); + var line; + // find first line which contains a source map starting at end of content + for (var i = lines.length - 1; i > 0; i--) { + line = lines[i] + if (~line.indexOf('sourceMappingURL=data:')) return exports.fromComment(line); + } } Converter.prototype.toJSON = function (space) { - return JSON.stringify(this.sourcemap, null, space); + return JSON.stringify(this.sourcemap, null, space); }; Converter.prototype.toBase64 = function () { - var json = this.toJSON(); - return new Buffer(json).toString('base64'); + var json = this.toJSON(); + return new Buffer(json).toString('base64'); }; -Converter.prototype.toComment = function () { - var base64 = this.toBase64(); - return '//# sourceMappingURL=data:application/json;base64,' + base64; +Converter.prototype.toComment = function (options) { + var base64 = this.toBase64(); + var data = 'sourceMappingURL=data:application/json;base64,' + base64; + return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; }; // returns copy instead of original Converter.prototype.toObject = function () { - return JSON.parse(this.toJSON()); + return JSON.parse(this.toJSON()); }; Converter.prototype.addProperty = function (key, value) { - if (this.sourcemap.hasOwnProperty(key)) throw new Error('property %s already exists on the sourcemap, use set property instead'); - return this.setProperty(key, value); + if (this.sourcemap.hasOwnProperty(key)) throw new Error('property %s already exists on the sourcemap, use set property instead'); + return this.setProperty(key, value); }; Converter.prototype.setProperty = function (key, value) { - this.sourcemap[key] = value; - return this; + this.sourcemap[key] = value; + return this; }; Converter.prototype.getProperty = function (key) { - return this.sourcemap[key]; + return this.sourcemap[key]; }; exports.fromObject = function (obj) { - return new Converter(obj); + return new Converter(obj); }; exports.fromJSON = function (json) { - return new Converter(json, { isJSON: true }); + return new Converter(json, {isJSON: true}); }; exports.fromBase64 = function (base64) { - return new Converter(base64, { isEncoded: true }); + return new Converter(base64, {isEncoded: true}); }; exports.fromComment = function (comment) { - comment = comment - .replace(/^\/\*/g, '//') - .replace(/\*\/$/g, ''); + comment = comment + .replace(/^\/\*/g, '//') + .replace(/\*\/$/g, ''); - return new Converter(comment, { isEncoded: true, hasComment: true }); + return new Converter(comment, {isEncoded: true, hasComment: true}); }; exports.fromMapFileComment = function (comment, dir) { - return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true }); + return new Converter(comment, {commentFileDir: dir, isFileComment: true, isJSON: true}); }; // Finds last sourcemap comment in file or returns null if none was found -exports.fromSource = function (content) { - var m = content.match(commentRx); - commentRx.lastIndex = 0; - return m ? exports.fromComment(m.pop()) : null; +exports.fromSource = function (content, largeSource) { + if (largeSource) return convertFromLargeSource(content); + + var m = content.match(commentRx); + commentRx.lastIndex = 0; + return m ? exports.fromComment(m.pop()) : null; }; // Finds last sourcemap comment in file or returns null if none was found exports.fromMapFileSource = function (content, dir) { - var m = content.match(mapFileCommentRx); - mapFileCommentRx.lastIndex = 0; - return m ? exports.fromMapFileComment(m.pop(), dir) : null; + var m = content.match(mapFileCommentRx); + mapFileCommentRx.lastIndex = 0; + return m ? exports.fromMapFileComment(m.pop(), dir) : null; }; exports.removeComments = function (src) { - commentRx.lastIndex = 0; - return src.replace(commentRx, ''); + commentRx.lastIndex = 0; + return src.replace(commentRx, ''); }; exports.removeMapFileComments = function (src) { - mapFileCommentRx.lastIndex = 0; - return src.replace(mapFileCommentRx, ''); + mapFileCommentRx.lastIndex = 0; + return src.replace(mapFileCommentRx, ''); }; -exports.__defineGetter__('commentRegex', function () { - commentRx.lastIndex = 0; - return commentRx; +Object.defineProperty(exports, 'commentRegex', function getCommentRegex() { + commentRx.lastIndex = 0; + return commentRx; }); -exports.__defineGetter__('mapFileCommentRegex', function () { - mapFileCommentRx.lastIndex = 0; - return mapFileCommentRx; +Object.defineProperty(exports, 'mapFileCommentRegex', function getMapFileCommentRegex () { + mapFileCommentRx.lastIndex = 0; + return mapFileCommentRx; }); }).call(this,require("buffer").Buffer) @@ -43153,7 +43169,7 @@ function through (write, end, opts) { stream.queue = stream.push = function (data) { // console.error(ended) if(_ended) return stream - if(data == null) _ended = true + if(data === null) _ended = true buffer.push(data) drain() return stream @@ -49753,7 +49769,7 @@ module.exports = function (str) { module.exports={ "name": "babel-core", "description": "Turn ES6 code into readable vanilla ES5 with source maps", - "version": "5.0.8", + "version": "5.0.9", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", "repository": "babel/babel", @@ -49781,7 +49797,7 @@ module.exports={ "dependencies": { "ast-types": "~0.7.0", "chalk": "^1.0.0", - "convert-source-map": "^0.5.0", + "convert-source-map": "hipertracker/convert-source-map", "core-js": "^0.8.1", "debug": "^2.1.1", "detect-indent": "^3.0.0", @@ -49824,6 +49840,6 @@ module.exports={ } },{}],455:[function(require,module,exports){ -module.exports={"abstract-expression-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-delete":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceDelete","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceSet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-comprehension-container":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-from":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-push":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"STATEMENT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call-instance-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INITIALIZERS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call-static-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CONSTRUCTOR","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INITIALIZERS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CONSTRUCTOR","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CONTEXT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"DECORATOR","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-super-constructor-call-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-super-constructor-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"corejs-is-iterator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CORE_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isIterable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"corejs-iterator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CORE_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getIterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"default-parameter":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"DEFAULT_VALUE","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"let","type":"VariableDeclaration","end":null}],"type":"Program","end":null},"exports-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-default-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-from-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"INIT","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-module-declaration-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-module-declaration":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"value":"__esModule","raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"for-of-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARR","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"for-of-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":null,"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"operator":">=","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"for-of":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-async-to-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"next","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"throw","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":null,"type":"ReturnStatement","end":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":null,"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"then","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-bind":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Function","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-class-call-check":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},"operator":"instanceof","right":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot call a class as a function","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-create-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-create-decorated-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"The decorator for method ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is of the invalid type ","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-default-props":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-defaults":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyNames","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-define-property":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-extends":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"assign","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":1,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-has-own":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-inherits":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"Super expression must either be null or a function, not ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"create","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__proto__","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-interop-require-wildcard":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"value":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-interop-require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-object-destructuring-empty":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot destructure undefined","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-object-without-properties":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"indexOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":">=","right":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-self-global":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"self","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-slice":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"slice","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-sliced-to-array-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-sliced-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"leadingComments":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-tagged-template-literal-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-tagged-template-literal":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-temporal-assert-defined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"ReferenceError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is not defined - temporal dead zone","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-temporal-undefined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null,"parenthesizedExpression":true},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-to-consumable-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-typeof":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"value":"symbol","raw":null,"type":"Literal","end":null},"alternate":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"let-scoping-return":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"v","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"ludicrous-in":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"RIGHT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"LEFT","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"named-function":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"GET_OUTER_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"property-method-assignment-wrapper-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":true,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"delegate":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"YieldExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"property-method-assignment-wrapper":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"prototype-identifier":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CLASS_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"require-assign-key":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null}],"type":"Program","end":null},"require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"rest":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"ARRAY_LEN","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"START","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARRAY_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"self-contained-helpers-head":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"HELPER","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"system":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"System","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"register","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"MODULE_DEPENDENCIES","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"EXPORT_IDENTIFIER","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"setters","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"SETTERS","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"execute","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"EXECUTE","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"tail-call-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"body":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BLOCK","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"WhileStatement","end":null,"_scopeInfo":null,"_paths":null},"label":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"LabeledStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null}],"type":"Program","end":null},"test-exports":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"test-module":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"umd-commonjs-strict":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"root","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"UMD_ROOT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FACTORY_PARAMETERS","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"FACTORY_BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"umd-runner-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"COMMON_TEST","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"GLOBAL_ARG","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null}} +module.exports={"abstract-expression-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-delete":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceDelete","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceSet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-comprehension-container":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-from":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-push":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"STATEMENT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call-instance-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INITIALIZERS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call-static-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CONSTRUCTOR","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INITIALIZERS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CONSTRUCTOR","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CONTEXT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"DECORATOR","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-super-constructor-call-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-super-constructor-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"corejs-is-iterator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CORE_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isIterable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"corejs-iterator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CORE_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getIterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"default-parameter":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"DEFAULT_VALUE","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"let","type":"VariableDeclaration","end":null}],"type":"Program","end":null},"exports-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-default-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-from-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"INIT","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-module-declaration-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-module-declaration":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"value":"__esModule","raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"for-of-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARR","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"for-of-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":null,"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"operator":">=","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"for-of":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-async-to-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"next","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"throw","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":null,"type":"ReturnStatement","end":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":null,"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"then","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-bind":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Function","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-class-call-check":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},"operator":"instanceof","right":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot call a class as a function","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-create-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-create-decorated-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"The decorator for method ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is of the invalid type ","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-default-props":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-defaults":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyNames","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-define-property":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-extends":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"assign","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":1,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-has-own":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-inherits":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"Super expression must either be null or a function, not ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"create","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__proto__","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-interop-require-wildcard":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"value":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-interop-require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-object-destructuring-empty":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot destructure undefined","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-object-without-properties":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"indexOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":">=","right":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-self-global":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"self","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-slice":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"slice","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-sliced-to-array-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-sliced-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"leadingComments":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-tagged-template-literal-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-tagged-template-literal":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-temporal-assert-defined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"ReferenceError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is not defined - temporal dead zone","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-temporal-undefined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null,"parenthesizedExpression":true},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-to-consumable-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-typeof":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"value":"symbol","raw":null,"type":"Literal","end":null},"alternate":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"let-scoping-return":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"v","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"ludicrous-in":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"RIGHT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"LEFT","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"named-function":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"GET_OUTER_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"property-method-assignment-wrapper-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":true,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"delegate":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"YieldExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"property-method-assignment-wrapper":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"prototype-identifier":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CLASS_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"require-assign-key":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null}],"type":"Program","end":null},"require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"rest":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"ARRAY_LEN","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"START","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARRAY_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"self-contained-helpers-head":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"HELPER","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"system":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"System","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"register","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"MODULE_DEPENDENCIES","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"EXPORT_IDENTIFIER","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"setters","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"SETTERS","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"execute","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"EXECUTE","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"tail-call-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"body":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BLOCK","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"WhileStatement","end":null,"_scopeInfo":null,"_paths":null},"label":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"LabeledStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null}],"type":"Program","end":null},"test-exports":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"test-module":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"umd-commonjs-strict":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"root","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"UMD_ROOT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FACTORY_PARAMETERS","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"FACTORY_BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"umd-runner-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"COMMON_TEST","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"GLOBAL_ARG","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null}} },{}]},{},[19])(19) }); \ No newline at end of file diff --git a/babel.min.js b/babel.min.js index e23da29..71d0169 100644 --- a/babel.min.js +++ b/babel.min.js @@ -1,8 +1,7 @@ (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.babel=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o")){node.params.push(this.flow_parseTypeAnnotatableIdentifier());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");return this.finishNode(node,"TypeParameterDeclaration")};pp.flow_parseTypeParameterInstantiation=function(){var node=this.startNode(),oldInType=this.inType;node.params=[];this.inType=true;this.expectRelational("<");while(!this.isRelational(">")){node.params.push(this.flow_parseType());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");this.inType=oldInType;return this.finishNode(node,"TypeParameterInstantiation")};pp.flow_parseObjectPropertyKey=function(){return this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.flow_parseObjectTypeIndexer=function(node,isStatic){node["static"]=isStatic;this.expect(tt.bracketL);node.id=this.flow_parseObjectPropertyKey();this.expect(tt.colon);node.key=this.flow_parseType();this.expect(tt.bracketR);this.expect(tt.colon);node.value=this.flow_parseType();this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeIndexer")};pp.flow_parseObjectTypeMethodish=function(node){node.params=[];node.rest=null;node.typeParameters=null;if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}this.expect(tt.parenL);while(this.type===tt.name){node.params.push(this.flow_parseFunctionTypeParam());if(this.type!==tt.parenR){this.expect(tt.comma)}}if(this.eat(tt.ellipsis)){node.rest=this.flow_parseFunctionTypeParam()}this.expect(tt.parenR);this.expect(tt.colon);node.returnType=this.flow_parseType();return this.finishNode(node,"FunctionTypeAnnotation")};pp.flow_parseObjectTypeMethod=function(start,isStatic,key){var node=this.startNodeAt(start);node.value=this.flow_parseObjectTypeMethodish(this.startNodeAt(start));node["static"]=isStatic;node.key=key;node.optional=false;this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeProperty")};pp.flow_parseObjectTypeCallProperty=function(node,isStatic){var valueNode=this.startNode();node["static"]=isStatic;node.value=this.flow_parseObjectTypeMethodish(valueNode);this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeCallProperty")};pp.flow_parseObjectType=function(allowStatic){var nodeStart=this.startNode();var node;var optional=false;var property;var propertyKey;var propertyTypeAnnotation;var token;var isStatic;nodeStart.callProperties=[];nodeStart.properties=[];nodeStart.indexers=[];this.expect(tt.braceL);while(this.type!==tt.braceR){var start=this.markPosition();node=this.startNode();if(allowStatic&&this.isContextual("static")){this.next();isStatic=true}if(this.type===tt.bracketL){nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node,isStatic))}else if(this.type===tt.parenL||this.isRelational("<")){nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node,allowStatic))}else{if(isStatic&&this.type===tt.colon){propertyKey=this.parseIdent()}else{propertyKey=this.flow_parseObjectPropertyKey()}if(this.isRelational("<")||this.type===tt.parenL){nodeStart.properties.push(this.flow_parseObjectTypeMethod(start,isStatic,propertyKey))}else{if(this.eat(tt.question)){optional=true}this.expect(tt.colon);node.key=propertyKey;node.value=this.flow_parseType();node.optional=optional;node["static"]=isStatic;this.flow_objectTypeSemicolon();nodeStart.properties.push(this.finishNode(node,"ObjectTypeProperty"))}}}this.expect(tt.braceR);return this.finishNode(nodeStart,"ObjectTypeAnnotation")};pp.flow_objectTypeSemicolon=function(){if(!this.eat(tt.semi)&&this.type!==tt.braceR){this.unexpected()}};pp.flow_parseGenericType=function(start,id){var node=this.startNodeAt(start);node.typeParameters=null;node.id=id;while(this.eat(tt.dot)){var node2=this.startNodeAt(start);node2.qualification=node.id;node2.id=this.parseIdent();node.id=this.finishNode(node2,"QualifiedTypeIdentifier")}if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterInstantiation()}return this.finishNode(node,"GenericTypeAnnotation")};pp.flow_parseVoidType=function(){var node=this.startNode();this.expect(tt._void);return this.finishNode(node,"VoidTypeAnnotation")};pp.flow_parseTypeofType=function(){var node=this.startNode();this.expect(tt._typeof);node.argument=this.flow_parsePrimaryType();return this.finishNode(node,"TypeofTypeAnnotation")};pp.flow_parseTupleType=function(){var node=this.startNode();node.types=[];this.expect(tt.bracketL);while(this.pos. It looks like "+"you are trying to write a function type, but you ended up "+"writing a grouped type followed by an =>, which is a syntax "+"error. Remember, function type parameters are named so function "+"types look like (name1: type1, name2: type2) => returnType. You "+"probably wrote (type1) => returnType")}return type}tmp=this.flow_parseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;this.expect(tt.parenR);this.expect(tt.arrow);node.returnType=this.flow_parseType();node.typeParameters=null;return this.finishNode(node,"FunctionTypeAnnotation");case tt.string:node.value=this.value;node.raw=this.input.slice(this.start,this.end);this.next();return this.finishNode(node,"StringLiteralTypeAnnotation");default:if(this.type.keyword){switch(this.type.keyword){case"void":return this.flow_parseVoidType();case"typeof":return this.flow_parseTypeofType()}}}this.unexpected()};pp.flow_parsePostfixType=function(){var node=this.startNode();var type=node.elementType=this.flow_parsePrimaryType();if(this.type===tt.bracketL){this.expect(tt.bracketL);this.expect(tt.bracketR);return this.finishNode(node,"ArrayTypeAnnotation")}return type};pp.flow_parsePrefixType=function(){var node=this.startNode();if(this.eat(tt.question)){node.typeAnnotation=this.flow_parsePrefixType();return this.finishNode(node,"NullableTypeAnnotation")}return this.flow_parsePostfixType()};pp.flow_parseIntersectionType=function(){var node=this.startNode();var type=this.flow_parsePrefixType();node.types=[type];while(this.eat(tt.bitwiseAND)){node.types.push(this.flow_parsePrefixType())}return node.types.length===1?type:this.finishNode(node,"IntersectionTypeAnnotation")};pp.flow_parseUnionType=function(){var node=this.startNode();var type=this.flow_parseIntersectionType();node.types=[type];while(this.eat(tt.bitwiseOR)){node.types.push(this.flow_parseIntersectionType())}return node.types.length===1?type:this.finishNode(node,"UnionTypeAnnotation")};pp.flow_parseType=function(){var oldInType=this.inType;this.inType=true;var type=this.flow_parseUnionType();this.inType=oldInType;return type};pp.flow_parseTypeAnnotation=function(){var node=this.startNode();var oldInType=this.inType;this.inType=true;this.expect(tt.colon);node.typeAnnotation=this.flow_parseType();this.inType=oldInType;return this.finishNode(node,"TypeAnnotation")};pp.flow_parseTypeAnnotatableIdentifier=function(requireTypeAnnotation,canBeOptionalParam){var node=this.startNode();var ident=this.parseIdent();var isOptionalParam=false;if(canBeOptionalParam&&this.eat(tt.question)){this.expect(tt.question);isOptionalParam=true}if(requireTypeAnnotation||this.type===tt.colon){ident.typeAnnotation=this.flow_parseTypeAnnotation();this.finishNode(ident,ident.type)}if(isOptionalParam){ident.optional=true;this.finishNode(ident,ident.type)}return ident};acorn.plugins.flow=function(instance){instance.extend("parseFunctionBody",function(inner){return function(node,allowExpression){if(this.type===tt.colon){node.returnType=this.flow_parseTypeAnnotation()}return inner.call(this,node,allowExpression)}});instance.extend("parseStatement",function(inner){return function(declaration,topLevel){if(this.strict&&this.type===tt.name&&this.value==="interface"){var node=this.startNode();this.next();return this.flow_parseInterface(node)}else{return inner.call(this,declaration,topLevel)}}});instance.extend("parseExpressionStatement",function(inner){return function(node,expr){if(expr.type==="Identifier"){if(expr.name==="declare"){if(this.type===tt._class||this.type===tt.name||this.type===tt._function||this.type===tt._var){return this.flow_parseDeclare(node)}}else if(this.type===tt.name){if(expr.name==="interface"){return this.flow_parseInterface(node)}else if(expr.name==="type"){return this.flow_parseTypeAlias(node)}}}return inner.call(this,node,expr)}});instance.extend("shouldParseExportDeclaration",function(inner){return function(){return this.isContextual("type")||inner.call(this)}});instance.extend("parseParenItem",function(inner){return function(node,start){if(this.type===tt.colon){var typeCastNode=this.startNodeAt(start);typeCastNode.expression=node;typeCastNode.typeAnnotation=this.flow_parseTypeAnnotation();return this.finishNode(typeCastNode,"TypeCastExpression")}else{return node}}});instance.extend("parseClassId",function(inner){return function(node,isStatement){inner.call(this,node,isStatement);if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}}});instance.extend("readToken",function(inner){return function(code){if(this.inType&&(code===62||code===60)){return this.finishOp(tt.relational,1)}else{return inner.call(this,code)}}});instance.extend("jsx_readToken",function(inner){return function(){if(!this.inType)return inner.call(this)}});instance.extend("parseParenArrowList",function(inner){return function(start,exprList,isAsync){for(var i=0;i...",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);this.context.push(tc.j_oTag);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;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);++this.pos;if(ch===13&&this.input.charCodeAt(this.pos)===10){++this.pos;out+="\n"}else{out+=String.fromCharCode(ch)}if(this.options.locations){++this.curLine;this.lineStart=this.pos}chunkStart=this.pos}else{++this.pos}}}};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{++this.pos}}out+=this.input.slice(chunkStart,this.pos++);return this.finishToken(tt.string,out)};var XHTMLEntities={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};var hexNumber=/^[\da-fA-F]+$/;var decimalNumber=/^\d+$/;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")}node.openingElement=openingElement;node.closingElement=closingElement;node.children=children;return this.finishNode(node,"JSXElement")};pp.jsx_parseElement=function(){var start=this.markPosition();this.next();return this.jsx_parseElementAt(start)};acorn.plugins.jsx=function(instance){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;this.context.push(tc.j_cTag);this.exprAllowed=false}else{return inner.call(this,prevType)}}})}},{"..":5}],3:[function(require,module,exports){"use strict";var tt=require("./tokentype").types;var Parser=require("./state").Parser;var reservedWords=require("./identifier").reservedWords;var has=require("./util").has;var pp=Parser.prototype;pp.checkPropClash=function(prop,propHash){if(this.options.ecmaVersion>=6)return;var key=prop.key,name=undefined;switch(key.type){case"Identifier":name=key.name;break;case"Literal":name=String(key.value);break;default:return}var kind=prop.kind||"init",other=undefined;if(has(propHash,name)){other=propHash[name];var isGetSet=kind!=="init";if((this.strict||isGetSet)&&other[kind]||!(isGetSet^other.init))this.raise(key.start,"Redefinition of property")}else{other=propHash[name]={init:false,get:false,set:false}}other[kind]=true};pp.parseExpression=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeAssign(noIn,refShorthandDefaultPos);if(this.type===tt.comma){var node=this.startNodeAt(start);node.expressions=[expr];while(this.eat(tt.comma))node.expressions.push(this.parseMaybeAssign(noIn,refShorthandDefaultPos));return this.finishNode(node,"SequenceExpression")}return expr};pp.parseMaybeAssign=function(noIn,refShorthandDefaultPos,afterLeftParse){if(this.type==tt._yield&&this.inGenerator)return this.parseYield();var failOnShorthandAssign=undefined;if(!refShorthandDefaultPos){refShorthandDefaultPos={start:0};failOnShorthandAssign=true}else{failOnShorthandAssign=false}var start=this.markPosition();var left=this.parseMaybeConditional(noIn,refShorthandDefaultPos);if(afterLeftParse)left=afterLeftParse.call(this,left,start);if(this.type.isAssign){var node=this.startNodeAt(start);node.operator=this.value;node.left=this.type===tt.eq?this.toAssignable(left):left;refShorthandDefaultPos.start=0;this.checkLVal(left);if(left.parenthesizedExpression){if(left.type==="ObjectPattern"){this.raise(left.start,"You're trying to assign to a parenthesized expression, instead of `({ foo }) = {}` use `({ foo } = {})`")}else{this.raise(left.start,"Parenthesized left hand expressions are illegal")}}this.next();node.right=this.parseMaybeAssign(noIn);return this.finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return left};pp.parseMaybeConditional=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;if(this.eat(tt.question)){var node=this.startNodeAt(start);node.test=expr;node.consequent=this.parseMaybeAssign();this.expect(tt.colon);node.alternate=this.parseMaybeAssign(noIn); -return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseExprOp(expr,start,-1,noIn)};pp.parseExprOp=function(left,leftStart,minPrec,noIn){var prec=this.type.binop;if(prec!=null&&(!noIn||this.type!==tt._in)){if(prec>minPrec){var node=this.startNodeAt(leftStart);node.left=left;node.operator=this.value;var op=this.type;this.next();var start=this.markPosition();node.right=this.parseExprOp(this.parseMaybeUnary(),start,op.rightAssociative?prec-1:prec,noIn);this.finishNode(node,op===tt.logicalOR||op===tt.logicalAND?"LogicalExpression":"BinaryExpression");return this.parseExprOp(node,leftStart,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){if(this.type.prefix){var node=this.startNode(),update=this.type===tt.incDec;node.operator=this.value;node.prefix=true;this.next();node.argument=this.parseMaybeUnary();if(refShorthandDefaultPos&&refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(update)this.checkLVal(node.argument);else if(this.strict&&node.operator==="delete"&&node.argument.type==="Identifier")this.raise(node.start,"Deleting local variable in strict mode");return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var start=this.markPosition();var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.type.postfix&&!this.canInsertSemicolon()){var node=this.startNodeAt(start);node.operator=this.value;node.prefix=false;node.argument=expr;this.checkLVal(expr);this.next();expr=this.finishNode(node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprAtom(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseSubscripts(expr,start)};pp.parseSubscripts=function(base,start,noCalls){if(this.eat(tt.dot)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseIdent(true);node.computed=false;return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(this.eat(tt.bracketL)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseExpression();node.computed=true;this.expect(tt.bracketR);return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(!noCalls&&this.eat(tt.parenL)){var node=this.startNodeAt(start);node.callee=base;node.arguments=this.parseExprList(tt.parenR,false);return this.parseSubscripts(this.finishNode(node,"CallExpression"),start,noCalls)}else if(this.type===tt.backQuote){var node=this.startNodeAt(start);node.tag=base;node.quasi=this.parseTemplate();return this.parseSubscripts(this.finishNode(node,"TaggedTemplateExpression"),start,noCalls)}return base};pp.parseExprAtom=function(refShorthandDefaultPos){var node=undefined;switch(this.type){case tt._this:case tt._super:var type=this.type===tt._this?"ThisExpression":"Super";node=this.startNode();this.next();return this.finishNode(node,type);case tt._yield:if(this.inGenerator)this.unexpected();case tt._do:if(this.options.features["es7.doExpressions"]){var _node=this.startNode();this.next();_node.body=this.parseBlock();return this.finishNode(_node,"DoExpression")}case tt.name:var start=this.markPosition();node=this.startNode();var id=this.parseIdent(this.type!==tt.name);if(this.options.features["es7.asyncFunctions"]){if(id.name==="async"){if(this.type===tt.parenL){var expr=this.parseParenAndDistinguishExpression(start,true);if(expr&&expr.type==="ArrowFunctionExpression"){return expr}else{node.callee=id;if(!expr){node.arguments=[]}else if(expr.type==="SequenceExpression"){node.arguments=expr.expressions}else{node.arguments=[expr]}return this.parseSubscripts(this.finishNode(node,"CallExpression"),start)}}else if(this.type===tt.name){id=this.parseIdent();this.expect(tt.arrow);return this.parseArrowExpression(node,[id],true)}if(this.type===tt._function&&!this.canInsertSemicolon()){this.next();return this.parseFunction(node,false,false,true)}}else if(id.name==="await"){if(this.inAsync)return this.parseAwait(node)}}if(!this.canInsertSemicolon()&&this.eat(tt.arrow)){return this.parseArrowExpression(this.startNodeAt(start),[id])}return id;case tt.regexp:var value=this.value;node=this.parseLiteral(value.value);node.regex={pattern:value.pattern,flags:value.flags};return node;case tt.num:case tt.string:return this.parseLiteral(this.value);case tt._null:case tt._true:case tt._false:node=this.startNode();node.value=this.type===tt._null?null:this.type===tt._true;node.raw=this.type.keyword;this.next();return this.finishNode(node,"Literal");case tt.parenL:return this.parseParenAndDistinguishExpression();case tt.bracketL:node=this.startNode();this.next();if((this.options.ecmaVersion>=7||this.options.features["es7.comprehensions"])&&this.type===tt._for){return this.parseComprehension(node,false)}node.elements=this.parseExprList(tt.bracketR,true,true,refShorthandDefaultPos);return this.finishNode(node,"ArrayExpression");case tt.braceL:return this.parseObj(false,refShorthandDefaultPos);case tt._function:node=this.startNode();this.next();return this.parseFunction(node,false);case tt.at:this.parseDecorators();case tt._class:node=this.startNode();this.takeDecorators(node);return this.parseClass(node,false);case tt._new:return this.parseNew();case tt.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(tt.parenL);var val=this.parseExpression();this.expect(tt.parenR);return val};pp.parseParenAndDistinguishExpression=function(start,isAsync){start=start||this.markPosition();var val=undefined;if(this.options.ecmaVersion>=6){this.next();if((this.options.features["es7.comprehensions"]||this.options.ecmaVersion>=7)&&this.type===tt._for){return this.parseComprehension(this.startNodeAt(start),true)}var innerStart=this.markPosition(),exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=undefined,innerParenStart=undefined;while(this.type!==tt.parenR){first?first=false:this.expect(tt.comma);if(this.type===tt.ellipsis){var spreadNodeStart=this.markPosition();spreadStart=this.start;exprList.push(this.parseParenItem(this.parseRest(),spreadNodeStart));break}else{if(this.type===tt.parenL&&!innerParenStart){innerParenStart=this.start}exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem))}}var innerEnd=this.markPosition();this.expect(tt.parenR);if(!this.canInsertSemicolon()&&this.eat(tt.arrow)){if(innerParenStart)this.unexpected(innerParenStart);return this.parseParenArrowList(start,exprList,isAsync)}if(!exprList.length){if(isAsync){return}else{this.unexpected(this.lastTokStart)}}if(spreadStart)this.unexpected(spreadStart);if(refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(exprList.length>1){val=this.startNodeAt(innerStart);val.expressions=exprList;this.finishNodeAt(val,"SequenceExpression",innerEnd)}else{val=exprList[0]}}else{val=this.parseParenExpression()}if(this.options.preserveParens){var par=this.startNodeAt(start);par.expression=val;return this.finishNode(par,"ParenthesizedExpression")}else{val.parenthesizedExpression=true;return val}};pp.parseParenArrowList=function(start,exprList,isAsync){return this.parseArrowExpression(this.startNodeAt(start),exprList,isAsync)};pp.parseParenItem=function(node,start){return node};var empty=[];pp.parseNew=function(){var node=this.startNode();var meta=this.parseIdent(true);if(this.options.ecmaVersion>=6&&this.eat(tt.dot)){node.meta=meta;node.property=this.parseIdent(true);if(node.property.name!=="target")this.raise(node.property.start,"The only valid meta property for new is new.target");return this.finishNode(node,"MetaProperty")}var start=this.markPosition();node.callee=this.parseSubscripts(this.parseExprAtom(),start,true);if(this.eat(tt.parenL))node.arguments=this.parseExprList(tt.parenR,false);else node.arguments=empty;return this.finishNode(node,"NewExpression")};pp.parseTemplateElement=function(){var elem=this.startNode();elem.value={raw:this.input.slice(this.start,this.end),cooked:this.value};this.next();elem.tail=this.type===tt.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(tt.dollarBraceL);node.expressions.push(this.parseExpression());this.expect(tt.braceR);node.quasis.push(curElt=this.parseTemplateElement())}this.next();return this.finishNode(node,"TemplateLiteral")};pp.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=false,isAsync=false,start=undefined;if(this.options.features["es7.objectRestSpread"]&&this.type===tt.ellipsis){prop=this.parseSpread();prop.type="SpreadProperty";node.properties.push(prop);continue}if(this.options.ecmaVersion>=6){prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos)start=this.markPosition();if(!isPattern)isGenerator=this.eat(tt.star)}if(this.options.features["es7.asyncFunctions"]&&this.isContextual("async")){if(isGenerator||isPattern)this.unexpected();var asyncId=this.parseIdent();if(this.type===tt.colon||this.type===tt.parenL){prop.key=asyncId}else{isAsync=true;this.parsePropertyName(prop)}}else{this.parsePropertyName(prop)}this.parseObjPropValue(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos);this.checkPropClash(prop,propHash);node.properties.push(this.finishNode(prop,"Property"))}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")};pp.parseObjPropValue=function(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos){if(this.eat(tt.colon)){prop.value=isPattern?this.parseMaybeDefault():this.parseMaybeAssign(false,refShorthandDefaultPos);prop.kind="init"}else if(this.options.ecmaVersion>=6&&this.type===tt.parenL){if(isPattern)this.unexpected();prop.kind="init";prop.method=true;prop.value=this.parseMethod(isGenerator,isAsync)}else if(this.options.ecmaVersion>=5&&!prop.computed&&prop.key.type==="Identifier"&&(prop.key.name==="get"||prop.key.name==="set")&&(this.type!=tt.comma&&this.type!=tt.braceR)){if(isGenerator||isAsync||isPattern)this.unexpected();prop.kind=prop.key.name;this.parsePropertyName(prop);prop.value=this.parseMethod(false)}else if(this.options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"){prop.kind="init";if(isPattern){if(this.isKeyword(prop.key.name)||this.strict&&(reservedWords.strictBind(prop.key.name)||reservedWords.strict(prop.key.name))||!this.options.allowReserved&&this.isReservedWord(prop.key.name))this.raise(prop.key.start,"Binding "+prop.key.name);prop.value=this.parseMaybeDefault(start,prop.key)}else if(this.type===tt.eq&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start)refShorthandDefaultPos.start=this.start;prop.value=this.parseMaybeDefault(start,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(tt.bracketL)){prop.computed=true;prop.key=this.parseMaybeAssign();this.expect(tt.bracketR);return}else{prop.computed=false}}prop.key=this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.initFunction=function(node,isAsync){node.id=null;if(this.options.ecmaVersion>=6){node.generator=false;node.expression=false}if(this.options.features["es7.asyncFunctions"]){node.async=!!isAsync}};pp.parseMethod=function(isGenerator,isAsync){var node=this.startNode();this.initFunction(node,isAsync);this.expect(tt.parenL);node.params=this.parseBindingList(tt.parenR,false,false);if(this.options.ecmaVersion>=6){node.generator=isGenerator}this.parseFunctionBody(node);return this.finishNode(node,"FunctionExpression")};pp.parseArrowExpression=function(node,params,isAsync){this.initFunction(node,isAsync);node.params=this.toAssignableList(params,true);this.parseFunctionBody(node,true);return this.finishNode(node,"ArrowFunctionExpression")};pp.parseFunctionBody=function(node,allowExpression){var isExpression=allowExpression&&this.type!==tt.braceL;var oldInAsync=this.inAsync;this.inAsync=node.async;if(isExpression){node.body=this.parseMaybeAssign();node.expression=true}else{var oldInFunc=this.inFunction,oldInGen=this.inGenerator,oldLabels=this.labels;this.inFunction=true;this.inGenerator=node.generator;this.labels=[];node.body=this.parseBlock(true);node.expression=false;this.inFunction=oldInFunc;this.inGenerator=oldInGen;this.labels=oldLabels}this.inAsync=oldInAsync;if(this.strict||!isExpression&&node.body.body.length&&this.isUseStrict(node.body.body[0])){var nameHash={},oldStrict=this.strict;this.strict=true;if(node.id)this.checkLVal(node.id,true);for(var i=0;i=6||this.input.slice(this.start,this.end).indexOf("\\")==-1)))this.raise(this.start,"The keyword '"+this.value+"' is reserved");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")};pp.parseAwait=function(node){if(this.eat(tt.semi)||this.canInsertSemicolon()){this.unexpected()}node.all=this.eat(tt.star);node.argument=this.parseMaybeAssign(true);return this.finishNode(node,"AwaitExpression")};pp.parseYield=function(){var node=this.startNode();this.next();if(this.type==tt.semi||this.canInsertSemicolon()||this.type!=tt.star&&!this.type.startsExpr){node.delegate=false;node.argument=null}else{node.delegate=this.eat(tt.star);node.argument=this.parseMaybeAssign()}return this.finishNode(node,"YieldExpression")};pp.parseComprehension=function(node,isGenerator){node.blocks=[];while(this.type===tt._for){var block=this.startNode();this.next();this.expect(tt.parenL);block.left=this.parseBindingAtom();this.checkLVal(block.left,true);this.expectContextual("of");block.right=this.parseExpression();this.expect(tt.parenR);node.blocks.push(this.finishNode(block,"ComprehensionBlock"))}node.filter=this.eat(tt._if)?this.parseParenExpression():null;node.body=this.parseExpression();this.expect(isGenerator?tt.parenR:tt.bracketR);node.generator=isGenerator;return this.finishNode(node,"ComprehensionExpression")}},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){"use strict";exports.isIdentifierStart=isIdentifierStart;exports.isIdentifierChar=isIdentifierChar;exports.__esModule=true;function makePredicate(words){words=words.split(" ");var f="",cats=[];out:for(var i=0;i3){cats.sort(function(a,b){return b.length-a.length});f+="switch(str.length){";for(var i=0;icode)return false;pos+=set[i+1];if(pos>=code)return true}}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<=65535)return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)}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<=65535)return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}},{}],5:[function(require,module,exports){"use strict";exports.parse=parse;exports.parseExpressionAt=parseExpressionAt;exports.tokenizer=tokenizer;exports.__esModule=true;var _state=require("./state");var Parser=_state.Parser;var _options=require("./options");var getOptions=_options.getOptions;require("./parseutil");require("./statement");require("./lval");require("./expression");require("./lookahead");exports.Parser=_state.Parser;exports.plugins=_state.plugins;exports.defaultOptions=_options.defaultOptions;var _location=require("./location");exports.SourceLocation=_location.SourceLocation;exports.getLineInfo=_location.getLineInfo;exports.Node=require("./node").Node;var _tokentype=require("./tokentype");exports.TokenType=_tokentype.TokenType;exports.tokTypes=_tokentype.types;var _tokencontext=require("./tokencontext");exports.TokContext=_tokencontext.TokContext;exports.tokContexts=_tokencontext.types;var _identifier=require("./identifier");exports.isIdentifierChar=_identifier.isIdentifierChar;exports.isIdentifierStart=_identifier.isIdentifierStart;exports.Token=require("./tokenize").Token;var _whitespace=require("./whitespace");exports.isNewLine=_whitespace.isNewLine;exports.lineBreak=_whitespace.lineBreak;exports.lineBreakG=_whitespace.lineBreakG;require("../plugins/flow");require("../plugins/jsx");var version="1.0.0";exports.version=version;function parse(input,options){var p=parser(options,input);var startPos=p.options.locations?[p.pos,p.curPosition()]:p.pos;p.nextToken();return p.parseTopLevel(p.options.program||p.startNodeAt(startPos))}function parseExpressionAt(input,pos,options){var p=parser(options,input,pos);p.nextToken();return p.parseExpression()}function tokenizer(input,options){return parser(options,input)}function parser(options,input){return new Parser(getOptions(options),String(input))}},{"../plugins/flow":1,"../plugins/jsx":2,"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.getLineInfo=getLineInfo;exports.__esModule=true;var Parser=require("./state").Parser;var lineBreakG=require("./whitespace").lineBreakG;var Position=exports.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}();var SourceLocation=exports.SourceLocation=function SourceLocation(p,start,end){_classCallCheck(this,SourceLocation);this.start=start;this.end=end;if(p.sourceFile!==null)this.source=p.sourceFile};function getLineInfo(input,offset){for(var line=1,cur=0;;){lineBreakG.lastIndex=cur;var match=lineBreakG.exec(input);if(match&&match.index=6&&node){switch(node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var i=0;i=6){node.sourceType=this.options.sourceType}return this.finishNode(node,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp.parseStatement=function(declaration,topLevel){if(this.type===tt.at){this.parseDecorators(true)}var starttype=this.type,node=this.startNode();switch(starttype){case tt._break:case tt._continue:return this.parseBreakContinueStatement(node,starttype.keyword);case tt._debugger:return this.parseDebuggerStatement(node);case tt._do:return this.parseDoStatement(node);case tt._for:return this.parseForStatement(node);case tt._function:if(!declaration&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(node);case tt._class:if(!declaration)this.unexpected();this.takeDecorators(node);return this.parseClass(node,true);case tt._if:return this.parseIfStatement(node);case tt._return:return this.parseReturnStatement(node);case tt._switch:return this.parseSwitchStatement(node);case tt._throw:return this.parseThrowStatement(node);case tt._try:return this.parseTryStatement(node);case tt._let:case tt._const:if(!declaration)this.unexpected();case tt._var:return this.parseVarStatement(node,starttype);case tt._while:return this.parseWhileStatement(node);case tt._with:return this.parseWithStatement(node);case tt.braceL:return this.parseBlock();case tt.semi:return this.parseEmptyStatement(node);case tt._export:case tt._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===tt._import?this.parseImport(node):this.parseExport(node);case tt.name:if(this.options.features["es7.asyncFunctions"]&&this.value==="async"&&this.lookahead().type===tt._function){this.next();this.expect(tt._function);return this.parseFunction(node,true,false,true)}default:var maybeName=this.value,expr=this.parseExpression();if(starttype===tt.name&&expr.type==="Identifier"&&this.eat(tt.colon))return this.parseLabeledStatement(node,maybeName,expr);else return this.parseExpressionStatement(node,expr)}};pp.takeDecorators=function(node){if(this.decorators.length){node.decorators=this.decorators;this.decorators=[]}};pp.parseDecorators=function(allowExport){while(this.type===tt.at){this.decorators.push(this.parseDecorator())}if(allowExport&&this.type===tt._export){return}if(this.type!==tt._class){this.raise(this.start,"Leading decorators must be attached to a class declaration")}};pp.parseDecorator=function(allowExport){if(!this.options.features["es7.decorators"]){this.unexpected()}var node=this.startNode();this.next();node.expression=this.parseMaybeAssign();return this.finishNode(node,"Decorator")};pp.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword=="break";this.next();if(this.eat(tt.semi)||this.insertSemicolon())node.label=null;else if(this.type!==tt.name)this.unexpected();else{node.label=this.parseIdent();this.semicolon()}for(var i=0;i=6)this.eat(tt.semi);else this.semicolon();return this.finishNode(node,"DoWhileStatement")};pp.parseForStatement=function(node){this.next();this.labels.push(loopLabel);this.expect(tt.parenL);if(this.type===tt.semi)return this.parseFor(node,null);if(this.type===tt._var||this.type===tt._let||this.type===tt._const){var _init=this.startNode(),varKind=this.type;this.next();this.parseVar(_init,true,varKind);this.finishNode(_init,"VariableDeclaration");if((this.type===tt._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&_init.declarations.length===1&&!(varKind!==tt._var&&_init.declarations[0].init))return this.parseForIn(node,_init);return this.parseFor(node,_init)}var refShorthandDefaultPos={start:0};var init=this.parseExpression(true,refShorthandDefaultPos);if(this.type===tt._in||this.options.ecmaVersion>=6&&this.isContextual("of")){this.toAssignable(init);this.checkLVal(init);return this.parseForIn(node,init)}else if(refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}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(tt._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();if(this.eat(tt.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(tt.braceL);this.labels.push(switchLabel);for(var cur,sawDefault;this.type!=tt.braceR;){if(this.type===tt._case||this.type===tt._default){var isCase=this.type===tt._case;if(cur)this.finishNode(cur,"SwitchCase");node.cases.push(cur=this.startNode());cur.consequent=[];this.next();if(isCase){cur.test=this.parseExpression()}else{if(sawDefault)this.raise(this.lastTokStart,"Multiple default clauses");sawDefault=true;cur.test=null}this.expect(tt.colon)}else{if(!cur)this.unexpected();cur.consequent.push(this.parseStatement(true))}}if(cur)this.finishNode(cur,"SwitchCase");this.next();this.labels.pop();return this.finishNode(node,"SwitchStatement")};pp.parseThrowStatement=function(node){this.next();if(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")};var empty=[];pp.parseTryStatement=function(node){this.next();node.block=this.parseBlock();node.handler=null;if(this.type===tt._catch){var clause=this.startNode();this.next();this.expect(tt.parenL);clause.param=this.parseBindingAtom();this.checkLVal(clause.param,true);this.expect(tt.parenR);clause.guard=null;clause.body=this.parseBlock();node.handler=this.finishNode(clause,"CatchClause")}node.guardedHandlers=empty;node.finalizer=this.eat(tt._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=6&&this.isContextual("of"))){this.unexpected()}else if(decl.id.type!="Identifier"&&!(isFor&&(this.type===tt._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(tt.comma))break}return node};pp.parseVarHead=function(decl){decl.id=this.parseBindingAtom();this.checkLVal(decl.id,true)};pp.parseFunction=function(node,isStatement,allowExpressionBody,isAsync){this.initFunction(node,isAsync);if(this.options.ecmaVersion>=6)node.generator=this.eat(tt.star);if(isStatement||this.type===tt.name)node.id=this.parseIdent();this.parseFunctionParams(node);this.parseFunctionBody(node,allowExpressionBody);return this.finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")};pp.parseFunctionParams=function(node){this.expect(tt.parenL);node.params=this.parseBindingList(tt.parenR,false,false)};pp.parseClass=function(node,isStatement){this.next();this.parseClassId(node,isStatement);this.parseClassSuper(node);var classBody=this.startNode();classBody.body=[];this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(this.eat(tt.semi))continue;if(this.type===tt.at){this.decorators.push(this.parseDecorator());continue}var method=this.startNode();this.takeDecorators(method);var isGenerator=this.eat(tt.star),isAsync=false;this.parsePropertyName(method);if(this.type!==tt.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="static"){if(isGenerator)this.unexpected();method["static"]=true;isGenerator=this.eat(tt.star);this.parsePropertyName(method)}else{method["static"]=false}if(!isGenerator&&method.key.type==="Identifier"&&!method.computed&&this.isClassProperty()){classBody.body.push(this.parseClassProperty(method));continue}if(this.options.features["es7.asyncFunctions"]&&this.type!==tt.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async"){isAsync=true;this.parsePropertyName(method)}method.kind="method";if(!method.computed&&!isGenerator){if(method.key.type==="Identifier"){if(this.type!==tt.parenL&&(method.key.name==="get"||method.key.name==="set")){method.kind=method.key.name;this.parsePropertyName(method)}else if(!method["static"]&&method.key.name==="constructor"){method.kind="constructor"}}else if(!method["static"]&&method.key.type==="Literal"&&method.key.value==="constructor"){method.kind="constructor"}}if(method.kind==="constructor"&&method.decorators){this.raise(method.start,"You can't attach decorators to a class constructor")}this.parseClassMethod(classBody,method,isGenerator,isAsync)}if(this.decorators.length){this.raise(this.start,"You have trailing decorators with no method")}node.body=this.finishNode(classBody,"ClassBody");return this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")};pp.isClassProperty=function(){return this.type===tt.eq||(this.type===tt.semi||this.canInsertSemicolon())};pp.parseClassProperty=function(node){if(this.type===tt.eq){if(!this.options.features["es7.classProperties"])this.unexpected();this.next();node.value=this.parseMaybeAssign()}else{node.value=null}this.semicolon();return this.finishNode(node,"ClassProperty")};pp.parseClassMethod=function(classBody,method,isGenerator,isAsync){method.value=this.parseMethod(isGenerator,isAsync);classBody.body.push(this.finishNode(method,"MethodDefinition"))};pp.parseClassId=function(node,isStatement){node.id=this.type===tt.name?this.parseIdent():isStatement?this.unexpected():null};pp.parseClassSuper=function(node){node.superClass=this.eat(tt._extends)?this.parseExprSubscripts():null};pp.parseExport=function(node){this.next();if(this.type===tt.star){var specifier=this.startNode();this.next();if(this.options.features["es7.exportExtensions"]&&this.eatContextual("as")){specifier.exported=this.parseIdent();node.specifiers=[this.finishNode(specifier,"ExportNamespaceSpecifier")];this.parseExportSpecifiersMaybe(node);this.parseExportFrom(node)}else{this.parseExportFrom(node);return this.finishNode(node,"ExportAllDeclaration")}}else if(this.isExportDefaultSpecifier()){var specifier=this.startNode();specifier.exported=this.parseIdent(true);node.specifiers=[this.finishNode(specifier,"ExportDefaultSpecifier")];if(this.type===tt.comma&&this.lookahead().type===tt.star){this.expect(tt.comma);var _specifier=this.startNode();this.expect(tt.star);this.expectContextual("as");_specifier.exported=this.parseIdent();node.specifiers.push(this.finishNode(_specifier,"ExportNamespaceSpecifier"))}else{this.parseExportSpecifiersMaybe(node)}this.parseExportFrom(node)}else if(this.eat(tt._default)){var expr=this.parseMaybeAssign();var needsSemi=true;if(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();this.checkExport(node);return this.finishNode(node,"ExportDefaultDeclaration")}else if(this.type.keyword||this.shouldParseExportDeclaration()){node.declaration=this.parseStatement(true);node.specifiers=[];node.source=null}else{node.declaration=null;node.specifiers=this.parseExportSpecifiers();if(this.eatContextual("from")){node.source=this.type===tt.string?this.parseExprAtom():this.unexpected()}else{node.source=null}this.semicolon()}this.checkExport(node);return this.finishNode(node,"ExportNamedDeclaration")};pp.isExportDefaultSpecifier=function(){if(this.type===tt.name){return this.value!=="type"&&this.value!=="async"}if(this.type!==tt._default){return false}var lookahead=this.lookahead();return lookahead.type===tt.comma||lookahead.type===tt.name&&lookahead.value==="from"};pp.parseExportSpecifiersMaybe=function(node){if(this.eat(tt.comma)){node.specifiers=node.specifiers.concat(this.parseExportSpecifiers())}};pp.parseExportFrom=function(node){this.expectContextual("from");node.source=this.type===tt.string?this.parseExprAtom():this.unexpected();this.semicolon();this.checkExport(node)};pp.shouldParseExportDeclaration=function(){return this.options.features["es7.asyncFunctions"]&&this.isContextual("async")};pp.checkExport=function(node){if(this.decorators.length){var isClass=node.declaration&&(node.declaration.type==="ClassDeclaration"||node.declaration.type==="ClassExpression");if(!node.declaration||!isClass){this.raise(node.start,"You can only use decorators on an export when exporting a class")}this.takeDecorators(node.declaration)}};pp.parseExportSpecifiers=function(){var nodes=[],first=true;this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(!first){this.expect(tt.comma);if(this.afterTrailingComma(tt.braceR))break}else first=false;var node=this.startNode();node.local=this.parseIdent(this.type===tt._default);node.exported=this.eatContextual("as")?this.parseIdent(true):node.local;nodes.push(this.finishNode(node,"ExportSpecifier"))}return nodes};pp.parseImport=function(node){this.next();if(this.type===tt.string){node.specifiers=empty;node.source=this.parseExprAtom();node.kind=""}else{node.specifiers=[];this.parseImportSpecifiers(node);this.expectContextual("from");node.source=this.type===tt.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(node,"ImportDeclaration")};pp.parseImportSpecifiers=function(node){var first=true;if(this.type===tt.name){var start=this.markPosition();node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(),start));if(!this.eat(tt.comma))return}if(this.type===tt.star){var specifier=this.startNode();this.next();this.expectContextual("as");specifier.local=this.parseIdent();this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportNamespaceSpecifier"));return}this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(!first){this.expect(tt.comma);if(this.afterTrailingComma(tt.braceR))break}else first=false;var specifier=this.startNode();specifier.imported=this.parseIdent(true);specifier.local=this.eatContextual("as")?this.parseIdent():specifier.imported;this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportSpecifier"))}};pp.parseImportSpecifierDefault=function(id,start){var node=this.startNodeAt(start);node.local=id;this.checkLVal(node.local,true);return this.finishNode(node,"ImportDefaultSpecifier")}},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var Parser=require("./state").Parser;var tt=require("./tokentype").types;var lineBreak=require("./whitespace").lineBreak;var TokContext=exports.TokContext=function TokContext(token,isExpr,preserveSpace,override){_classCallCheck(this,TokContext);this.token=token;this.isExpr=isExpr;this.preserveSpace=preserveSpace;this.override=override};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=Parser.prototype;pp.initialContext=function(){return[types.b_stat]};pp.braceIsBlock=function(prevType){var parent=undefined;if(prevType===tt.colon&&(parent=this.curContext()).token=="{")return!parent.isExpr;if(prevType===tt._return)return lineBreak.test(this.input.slice(this.lastTokEnd,this.start));if(prevType===tt._else||prevType===tt.semi||prevType===tt.eof)return true;if(prevType==tt.braceL)return this.curContext()===types.b_stat;return!this.exprAllowed};pp.updateContext=function(prevType){var update=undefined,type=this.type;if(type.keyword&&prevType==tt.dot)this.exprAllowed=false;else if(update=type.updateContext)update.call(this,prevType);else this.exprAllowed=type.beforeExpr};tt.parenR.updateContext=tt.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}};tt.braceL.updateContext=function(prevType){this.context.push(this.braceIsBlock(prevType)?types.b_stat:types.b_expr);this.exprAllowed=true};tt.dollarBraceL.updateContext=function(){this.context.push(types.b_tmpl);this.exprAllowed=true};tt.parenL.updateContext=function(prevType){var statementParens=prevType===tt._if||prevType===tt._for||prevType===tt._with||prevType===tt._while;this.context.push(statementParens?types.p_stat:types.p_expr);this.exprAllowed=true};tt.incDec.updateContext=function(){};tt._function.updateContext=function(){if(this.curContext()!==types.b_stat)this.context.push(types.f_expr);this.exprAllowed=false};tt.backQuote.updateContext=function(){if(this.curContext()===types.q_tmpl)this.context.pop();else this.context.push(types.q_tmpl);this.exprAllowed=false}},{"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var _identifier=require("./identifier");var isIdentifierStart=_identifier.isIdentifierStart;var isIdentifierChar=_identifier.isIdentifierChar;var _tokentype=require("./tokentype");var tt=_tokentype.types;var keywordTypes=_tokentype.keywords;var Parser=require("./state").Parser;var SourceLocation=require("./location").SourceLocation;var _whitespace=require("./whitespace");var lineBreak=_whitespace.lineBreak;var lineBreakG=_whitespace.lineBreakG;var isNewLine=_whitespace.isNewLine;var nonASCIIwhitespace=_whitespace.nonASCIIwhitespace;var Token=exports.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 SourceLocation(p,p.startLoc,p.endLoc);if(p.options.ranges)this.range=[p.start,p.end]};var pp=Parser.prototype;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(typeof Symbol!=="undefined")pp[Symbol.iterator]=function(){var self=this;return{next:function next(){var token=self.getToken();return{done:token.type===tt.eof,value:token}}}};pp.setStrict=function(strict){this.strict=strict;if(this.type!==tt.num&&this.type!==tt.string)return;this.pos=this.start;if(this.options.locations){while(this.pos=this.input.length)return this.finishToken(tt.eof);if(curContext.override)return curContext.override(this);else this.readToken(this.fullCharCodeAtPos())};pp.readToken=function(code){if(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<=55295||code>=57344)return code;var next=this.input.charCodeAt(this.pos+1);return(code<<10)+next-56613888};pp.skipBlockComment=function(){var startLoc=this.options.onComment&&this.options.locations&&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){lineBreakG.lastIndex=start;var match=undefined;while((match=lineBreakG.exec(this.input))&&match.index8&&ch<14){++this.pos}else if(ch===47){var next=this.input.charCodeAt(this.pos+1);if(next===42){this.skipBlockComment()}else if(next===47){this.skipLineComment(2)}else break}else if(ch===160){++this.pos}else if(ch>=5760&&nonASCIIwhitespace.test(String.fromCharCode(ch))){++this.pos}else{break}}};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)};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){this.pos+=3;return this.finishToken(tt.ellipsis)}else{++this.pos;return this.finishToken(tt.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(tt.assign,2);return this.finishOp(tt.slash,1)};pp.readToken_mult_modulo=function(code){var type=code===42?tt.star:tt.modulo;var width=1;var next=this.input.charCodeAt(this.pos+1);if(next===42){width++;next=this.input.charCodeAt(this.pos+2);type=tt.exponent}if(next===61){width++;type=tt.assign}return this.finishOp(type,width)};pp.readToken_pipe_amp=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===code)return this.finishOp(code===124?tt.logicalOR:tt.logicalAND,2);if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(code===124?tt.bitwiseOR:tt.bitwiseAND,1)};pp.readToken_caret=function(){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(tt.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&&lineBreak.test(this.input.slice(this.lastTokEnd,this.pos))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(tt.incDec,2)}if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(tt.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(tt.assign,size+1);return this.finishOp(tt.bitShift,size)}if(next==33&&code==60&&this.input.charCodeAt(this.pos+2)==45&&this.input.charCodeAt(this.pos+3)==45){if(this.inModule)unexpected();this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(next===61)size=this.input.charCodeAt(this.pos+2)===61?3:2;return this.finishOp(tt.relational,size)};pp.readToken_eq_excl=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(tt.equality,this.input.charCodeAt(this.pos+2)===61?3:2); +return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseExprOp(expr,start,-1,noIn)};pp.parseExprOp=function(left,leftStart,minPrec,noIn){var prec=this.type.binop;if(prec!=null&&(!noIn||this.type!==tt._in)){if(prec>minPrec){var node=this.startNodeAt(leftStart);node.left=left;node.operator=this.value;var op=this.type;this.next();var start=this.markPosition();node.right=this.parseExprOp(this.parseMaybeUnary(),start,op.rightAssociative?prec-1:prec,noIn);this.finishNode(node,op===tt.logicalOR||op===tt.logicalAND?"LogicalExpression":"BinaryExpression");return this.parseExprOp(node,leftStart,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){if(this.type.prefix){var node=this.startNode(),update=this.type===tt.incDec;node.operator=this.value;node.prefix=true;this.next();node.argument=this.parseMaybeUnary();if(refShorthandDefaultPos&&refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(update)this.checkLVal(node.argument);else if(this.strict&&node.operator==="delete"&&node.argument.type==="Identifier")this.raise(node.start,"Deleting local variable in strict mode");return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var start=this.markPosition();var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.type.postfix&&!this.canInsertSemicolon()){var node=this.startNodeAt(start);node.operator=this.value;node.prefix=false;node.argument=expr;this.checkLVal(expr);this.next();expr=this.finishNode(node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprAtom(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseSubscripts(expr,start)};pp.parseSubscripts=function(base,start,noCalls){if(this.eat(tt.dot)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseIdent(true);node.computed=false;return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(this.eat(tt.bracketL)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseExpression();node.computed=true;this.expect(tt.bracketR);return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(!noCalls&&this.eat(tt.parenL)){var node=this.startNodeAt(start);node.callee=base;node.arguments=this.parseExprList(tt.parenR,false);return this.parseSubscripts(this.finishNode(node,"CallExpression"),start,noCalls)}else if(this.type===tt.backQuote){var node=this.startNodeAt(start);node.tag=base;node.quasi=this.parseTemplate();return this.parseSubscripts(this.finishNode(node,"TaggedTemplateExpression"),start,noCalls)}return base};pp.parseExprAtom=function(refShorthandDefaultPos){var node=undefined;switch(this.type){case tt._this:case tt._super:var type=this.type===tt._this?"ThisExpression":"Super";node=this.startNode();this.next();return this.finishNode(node,type);case tt._yield:if(this.inGenerator)this.unexpected();case tt._do:if(this.options.features["es7.doExpressions"]){var _node=this.startNode();this.next();_node.body=this.parseBlock();return this.finishNode(_node,"DoExpression")}case tt.name:var start=this.markPosition();node=this.startNode();var id=this.parseIdent(this.type!==tt.name);if(this.options.features["es7.asyncFunctions"]){if(id.name==="async"){if(this.type===tt.parenL){var expr=this.parseParenAndDistinguishExpression(start,true);if(expr&&expr.type==="ArrowFunctionExpression"){return expr}else{node.callee=id;if(!expr){node.arguments=[]}else if(expr.type==="SequenceExpression"){node.arguments=expr.expressions}else{node.arguments=[expr]}return this.parseSubscripts(this.finishNode(node,"CallExpression"),start)}}else if(this.type===tt.name){id=this.parseIdent();this.expect(tt.arrow);return this.parseArrowExpression(node,[id],true)}if(this.type===tt._function&&!this.canInsertSemicolon()){this.next();return this.parseFunction(node,false,false,true)}}else if(id.name==="await"){if(this.inAsync)return this.parseAwait(node)}}if(!this.canInsertSemicolon()&&this.eat(tt.arrow)){return this.parseArrowExpression(this.startNodeAt(start),[id])}return id;case tt.regexp:var value=this.value;node=this.parseLiteral(value.value);node.regex={pattern:value.pattern,flags:value.flags};return node;case tt.num:case tt.string:return this.parseLiteral(this.value);case tt._null:case tt._true:case tt._false:node=this.startNode();node.value=this.type===tt._null?null:this.type===tt._true;node.raw=this.type.keyword;this.next();return this.finishNode(node,"Literal");case tt.parenL:return this.parseParenAndDistinguishExpression();case tt.bracketL:node=this.startNode();this.next();if((this.options.ecmaVersion>=7||this.options.features["es7.comprehensions"])&&this.type===tt._for){return this.parseComprehension(node,false)}node.elements=this.parseExprList(tt.bracketR,true,true,refShorthandDefaultPos);return this.finishNode(node,"ArrayExpression");case tt.braceL:return this.parseObj(false,refShorthandDefaultPos);case tt._function:node=this.startNode();this.next();return this.parseFunction(node,false);case tt.at:this.parseDecorators();case tt._class:node=this.startNode();this.takeDecorators(node);return this.parseClass(node,false);case tt._new:return this.parseNew();case tt.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(tt.parenL);var val=this.parseExpression();this.expect(tt.parenR);return val};pp.parseParenAndDistinguishExpression=function(start,isAsync){start=start||this.markPosition();var val=undefined;if(this.options.ecmaVersion>=6){this.next();if((this.options.features["es7.comprehensions"]||this.options.ecmaVersion>=7)&&this.type===tt._for){return this.parseComprehension(this.startNodeAt(start),true)}var innerStart=this.markPosition(),exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=undefined,innerParenStart=undefined;while(this.type!==tt.parenR){first?first=false:this.expect(tt.comma);if(this.type===tt.ellipsis){var spreadNodeStart=this.markPosition();spreadStart=this.start;exprList.push(this.parseParenItem(this.parseRest(),spreadNodeStart));break}else{if(this.type===tt.parenL&&!innerParenStart){innerParenStart=this.start}exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem))}}var innerEnd=this.markPosition();this.expect(tt.parenR);if(!this.canInsertSemicolon()&&this.eat(tt.arrow)){if(innerParenStart)this.unexpected(innerParenStart);return this.parseParenArrowList(start,exprList,isAsync)}if(!exprList.length){if(isAsync){return}else{this.unexpected(this.lastTokStart)}}if(spreadStart)this.unexpected(spreadStart);if(refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(exprList.length>1){val=this.startNodeAt(innerStart);val.expressions=exprList;this.finishNodeAt(val,"SequenceExpression",innerEnd)}else{val=exprList[0]}}else{val=this.parseParenExpression()}if(this.options.preserveParens){var par=this.startNodeAt(start);par.expression=val;return this.finishNode(par,"ParenthesizedExpression")}else{val.parenthesizedExpression=true;return val}};pp.parseParenArrowList=function(start,exprList,isAsync){return this.parseArrowExpression(this.startNodeAt(start),exprList,isAsync)};pp.parseParenItem=function(node,start){return node};var empty=[];pp.parseNew=function(){var node=this.startNode();var meta=this.parseIdent(true);if(this.options.ecmaVersion>=6&&this.eat(tt.dot)){node.meta=meta;node.property=this.parseIdent(true);if(node.property.name!=="target")this.raise(node.property.start,"The only valid meta property for new is new.target");return this.finishNode(node,"MetaProperty")}var start=this.markPosition();node.callee=this.parseSubscripts(this.parseExprAtom(),start,true);if(this.eat(tt.parenL))node.arguments=this.parseExprList(tt.parenR,false);else node.arguments=empty;return this.finishNode(node,"NewExpression")};pp.parseTemplateElement=function(){var elem=this.startNode();elem.value={raw:this.input.slice(this.start,this.end),cooked:this.value};this.next();elem.tail=this.type===tt.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(tt.dollarBraceL);node.expressions.push(this.parseExpression());this.expect(tt.braceR);node.quasis.push(curElt=this.parseTemplateElement())}this.next();return this.finishNode(node,"TemplateLiteral")};pp.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=false,isAsync=false,start=undefined;if(this.options.features["es7.objectRestSpread"]&&this.type===tt.ellipsis){prop=this.parseSpread();prop.type="SpreadProperty";node.properties.push(prop);continue}if(this.options.ecmaVersion>=6){prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos)start=this.markPosition();if(!isPattern)isGenerator=this.eat(tt.star)}if(this.options.features["es7.asyncFunctions"]&&this.isContextual("async")){if(isGenerator||isPattern)this.unexpected();var asyncId=this.parseIdent();if(this.type===tt.colon||this.type===tt.parenL){prop.key=asyncId}else{isAsync=true;this.parsePropertyName(prop)}}else{this.parsePropertyName(prop)}this.parseObjPropValue(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos);this.checkPropClash(prop,propHash);node.properties.push(this.finishNode(prop,"Property"))}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")};pp.parseObjPropValue=function(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos){if(this.eat(tt.colon)){prop.value=isPattern?this.parseMaybeDefault():this.parseMaybeAssign(false,refShorthandDefaultPos);prop.kind="init"}else if(this.options.ecmaVersion>=6&&this.type===tt.parenL){if(isPattern)this.unexpected();prop.kind="init";prop.method=true;prop.value=this.parseMethod(isGenerator,isAsync)}else if(this.options.ecmaVersion>=5&&!prop.computed&&prop.key.type==="Identifier"&&(prop.key.name==="get"||prop.key.name==="set")&&(this.type!=tt.comma&&this.type!=tt.braceR)){if(isGenerator||isAsync||isPattern)this.unexpected();prop.kind=prop.key.name;this.parsePropertyName(prop);prop.value=this.parseMethod(false)}else if(this.options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"){prop.kind="init";if(isPattern){if(this.isKeyword(prop.key.name)||this.strict&&(reservedWords.strictBind(prop.key.name)||reservedWords.strict(prop.key.name))||!this.options.allowReserved&&this.isReservedWord(prop.key.name))this.raise(prop.key.start,"Binding "+prop.key.name);prop.value=this.parseMaybeDefault(start,prop.key)}else if(this.type===tt.eq&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start)refShorthandDefaultPos.start=this.start;prop.value=this.parseMaybeDefault(start,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(tt.bracketL)){prop.computed=true;prop.key=this.parseMaybeAssign();this.expect(tt.bracketR);return}else{prop.computed=false}}prop.key=this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.initFunction=function(node,isAsync){node.id=null;if(this.options.ecmaVersion>=6){node.generator=false;node.expression=false}if(this.options.features["es7.asyncFunctions"]){node.async=!!isAsync}};pp.parseMethod=function(isGenerator,isAsync){var node=this.startNode();this.initFunction(node,isAsync);this.expect(tt.parenL);node.params=this.parseBindingList(tt.parenR,false,false);if(this.options.ecmaVersion>=6){node.generator=isGenerator}this.parseFunctionBody(node);return this.finishNode(node,"FunctionExpression")};pp.parseArrowExpression=function(node,params,isAsync){this.initFunction(node,isAsync);node.params=this.toAssignableList(params,true);this.parseFunctionBody(node,true);return this.finishNode(node,"ArrowFunctionExpression")};pp.parseFunctionBody=function(node,allowExpression){var isExpression=allowExpression&&this.type!==tt.braceL;var oldInAsync=this.inAsync;this.inAsync=node.async;if(isExpression){node.body=this.parseMaybeAssign();node.expression=true}else{var oldInFunc=this.inFunction,oldInGen=this.inGenerator,oldLabels=this.labels;this.inFunction=true;this.inGenerator=node.generator;this.labels=[];node.body=this.parseBlock(true);node.expression=false;this.inFunction=oldInFunc;this.inGenerator=oldInGen;this.labels=oldLabels}this.inAsync=oldInAsync;if(this.strict||!isExpression&&node.body.body.length&&this.isUseStrict(node.body.body[0])){var nameHash={},oldStrict=this.strict;this.strict=true;if(node.id)this.checkLVal(node.id,true);for(var i=0;i=6||this.input.slice(this.start,this.end).indexOf("\\")==-1)))this.raise(this.start,"The keyword '"+this.value+"' is reserved");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")};pp.parseAwait=function(node){if(this.eat(tt.semi)||this.canInsertSemicolon()){this.unexpected()}node.all=this.eat(tt.star);node.argument=this.parseMaybeAssign(true);return this.finishNode(node,"AwaitExpression")};pp.parseYield=function(){var node=this.startNode();this.next();if(this.type==tt.semi||this.canInsertSemicolon()||this.type!=tt.star&&!this.type.startsExpr){node.delegate=false;node.argument=null}else{node.delegate=this.eat(tt.star);node.argument=this.parseMaybeAssign()}return this.finishNode(node,"YieldExpression")};pp.parseComprehension=function(node,isGenerator){node.blocks=[];while(this.type===tt._for){var block=this.startNode();this.next();this.expect(tt.parenL);block.left=this.parseBindingAtom();this.checkLVal(block.left,true);this.expectContextual("of");block.right=this.parseExpression();this.expect(tt.parenR);node.blocks.push(this.finishNode(block,"ComprehensionBlock"))}node.filter=this.eat(tt._if)?this.parseParenExpression():null;node.body=this.parseExpression();this.expect(isGenerator?tt.parenR:tt.bracketR);node.generator=isGenerator;return this.finishNode(node,"ComprehensionExpression")}},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){"use strict";exports.isIdentifierStart=isIdentifierStart;exports.isIdentifierChar=isIdentifierChar;exports.__esModule=true;function makePredicate(words){words=words.split(" ");var f="",cats=[];out:for(var i=0;i3){cats.sort(function(a,b){return b.length-a.length});f+="switch(str.length){";for(var i=0;icode)return false;pos+=set[i+1];if(pos>=code)return true}}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<=65535)return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)}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<=65535)return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}},{}],5:[function(require,module,exports){"use strict";exports.parse=parse;exports.parseExpressionAt=parseExpressionAt;exports.tokenizer=tokenizer;exports.__esModule=true;var _state=require("./state");var Parser=_state.Parser;var _options=require("./options");var getOptions=_options.getOptions;require("./parseutil");require("./statement");require("./lval");require("./expression");require("./lookahead");exports.Parser=_state.Parser;exports.plugins=_state.plugins;exports.defaultOptions=_options.defaultOptions;var _location=require("./location");exports.SourceLocation=_location.SourceLocation;exports.getLineInfo=_location.getLineInfo;exports.Node=require("./node").Node;var _tokentype=require("./tokentype");exports.TokenType=_tokentype.TokenType;exports.tokTypes=_tokentype.types;var _tokencontext=require("./tokencontext");exports.TokContext=_tokencontext.TokContext;exports.tokContexts=_tokencontext.types;var _identifier=require("./identifier");exports.isIdentifierChar=_identifier.isIdentifierChar;exports.isIdentifierStart=_identifier.isIdentifierStart;exports.Token=require("./tokenize").Token;var _whitespace=require("./whitespace");exports.isNewLine=_whitespace.isNewLine;exports.lineBreak=_whitespace.lineBreak;exports.lineBreakG=_whitespace.lineBreakG;require("../plugins/flow");require("../plugins/jsx");var version="1.0.0";exports.version=version;function parse(input,options){var p=parser(options,input);var startPos=p.options.locations?[p.pos,p.curPosition()]:p.pos;p.nextToken();return p.parseTopLevel(p.options.program||p.startNodeAt(startPos))}function parseExpressionAt(input,pos,options){var p=parser(options,input,pos);p.nextToken();return p.parseExpression()}function tokenizer(input,options){return parser(options,input)}function parser(options,input){return new Parser(getOptions(options),String(input))}},{"../plugins/flow":1,"../plugins/jsx":2,"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.getLineInfo=getLineInfo;exports.__esModule=true;var Parser=require("./state").Parser;var lineBreakG=require("./whitespace").lineBreakG;var Position=exports.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}();var SourceLocation=exports.SourceLocation=function SourceLocation(p,start,end){_classCallCheck(this,SourceLocation);this.start=start;this.end=end;if(p.sourceFile!==null)this.source=p.sourceFile};function getLineInfo(input,offset){for(var line=1,cur=0;;){lineBreakG.lastIndex=cur;var match=lineBreakG.exec(input);if(match&&match.index=6&&node){switch(node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var i=0;i=6){node.sourceType=this.options.sourceType}return this.finishNode(node,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp.parseStatement=function(declaration,topLevel){if(this.type===tt.at){this.parseDecorators(true)}var starttype=this.type,node=this.startNode();switch(starttype){case tt._break:case tt._continue:return this.parseBreakContinueStatement(node,starttype.keyword);case tt._debugger:return this.parseDebuggerStatement(node);case tt._do:return this.parseDoStatement(node);case tt._for:return this.parseForStatement(node);case tt._function:if(!declaration&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(node);case tt._class:if(!declaration)this.unexpected();this.takeDecorators(node);return this.parseClass(node,true);case tt._if:return this.parseIfStatement(node);case tt._return:return this.parseReturnStatement(node);case tt._switch:return this.parseSwitchStatement(node);case tt._throw:return this.parseThrowStatement(node);case tt._try:return this.parseTryStatement(node);case tt._let:case tt._const:if(!declaration)this.unexpected();case tt._var:return this.parseVarStatement(node,starttype);case tt._while:return this.parseWhileStatement(node);case tt._with:return this.parseWithStatement(node);case tt.braceL:return this.parseBlock();case tt.semi:return this.parseEmptyStatement(node);case tt._export:case tt._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===tt._import?this.parseImport(node):this.parseExport(node);case tt.name:if(this.options.features["es7.asyncFunctions"]&&this.value==="async"&&this.lookahead().type===tt._function){this.next();this.expect(tt._function);return this.parseFunction(node,true,false,true)}default:var maybeName=this.value,expr=this.parseExpression();if(starttype===tt.name&&expr.type==="Identifier"&&this.eat(tt.colon))return this.parseLabeledStatement(node,maybeName,expr);else return this.parseExpressionStatement(node,expr)}};pp.takeDecorators=function(node){if(this.decorators.length){node.decorators=this.decorators;this.decorators=[]}};pp.parseDecorators=function(allowExport){while(this.type===tt.at){this.decorators.push(this.parseDecorator())}if(allowExport&&this.type===tt._export){return}if(this.type!==tt._class){this.raise(this.start,"Leading decorators must be attached to a class declaration")}};pp.parseDecorator=function(allowExport){if(!this.options.features["es7.decorators"]){this.unexpected()}var node=this.startNode();this.next();node.expression=this.parseMaybeAssign();return this.finishNode(node,"Decorator")};pp.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword=="break";this.next();if(this.eat(tt.semi)||this.insertSemicolon())node.label=null;else if(this.type!==tt.name)this.unexpected();else{node.label=this.parseIdent();this.semicolon()}for(var i=0;i=6)this.eat(tt.semi);else this.semicolon();return this.finishNode(node,"DoWhileStatement")};pp.parseForStatement=function(node){this.next();this.labels.push(loopLabel);this.expect(tt.parenL);if(this.type===tt.semi)return this.parseFor(node,null);if(this.type===tt._var||this.type===tt._let||this.type===tt._const){var _init=this.startNode(),varKind=this.type;this.next();this.parseVar(_init,true,varKind);this.finishNode(_init,"VariableDeclaration");if((this.type===tt._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&_init.declarations.length===1&&!(varKind!==tt._var&&_init.declarations[0].init))return this.parseForIn(node,_init);return this.parseFor(node,_init)}var refShorthandDefaultPos={start:0};var init=this.parseExpression(true,refShorthandDefaultPos);if(this.type===tt._in||this.options.ecmaVersion>=6&&this.isContextual("of")){this.toAssignable(init);this.checkLVal(init);return this.parseForIn(node,init)}else if(refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}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(tt._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();if(this.eat(tt.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(tt.braceL);this.labels.push(switchLabel);for(var cur,sawDefault;this.type!=tt.braceR;){if(this.type===tt._case||this.type===tt._default){var isCase=this.type===tt._case;if(cur)this.finishNode(cur,"SwitchCase");node.cases.push(cur=this.startNode());cur.consequent=[];this.next();if(isCase){cur.test=this.parseExpression()}else{if(sawDefault)this.raise(this.lastTokStart,"Multiple default clauses");sawDefault=true;cur.test=null}this.expect(tt.colon)}else{if(!cur)this.unexpected();cur.consequent.push(this.parseStatement(true))}}if(cur)this.finishNode(cur,"SwitchCase");this.next();this.labels.pop();return this.finishNode(node,"SwitchStatement")};pp.parseThrowStatement=function(node){this.next();if(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")};var empty=[];pp.parseTryStatement=function(node){this.next();node.block=this.parseBlock();node.handler=null;if(this.type===tt._catch){var clause=this.startNode();this.next();this.expect(tt.parenL);clause.param=this.parseBindingAtom();this.checkLVal(clause.param,true);this.expect(tt.parenR);clause.guard=null;clause.body=this.parseBlock();node.handler=this.finishNode(clause,"CatchClause")}node.guardedHandlers=empty;node.finalizer=this.eat(tt._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=6&&this.isContextual("of"))){this.unexpected()}else if(decl.id.type!="Identifier"&&!(isFor&&(this.type===tt._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(tt.comma))break}return node};pp.parseVarHead=function(decl){decl.id=this.parseBindingAtom();this.checkLVal(decl.id,true)};pp.parseFunction=function(node,isStatement,allowExpressionBody,isAsync){this.initFunction(node,isAsync);if(this.options.ecmaVersion>=6)node.generator=this.eat(tt.star);if(isStatement||this.type===tt.name)node.id=this.parseIdent();this.parseFunctionParams(node);this.parseFunctionBody(node,allowExpressionBody);return this.finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")};pp.parseFunctionParams=function(node){this.expect(tt.parenL);node.params=this.parseBindingList(tt.parenR,false,false)};pp.parseClass=function(node,isStatement){this.next();this.parseClassId(node,isStatement);this.parseClassSuper(node);var classBody=this.startNode();classBody.body=[];this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(this.eat(tt.semi))continue;if(this.type===tt.at){this.decorators.push(this.parseDecorator());continue}var method=this.startNode();this.takeDecorators(method);var isGenerator=this.eat(tt.star),isAsync=false;this.parsePropertyName(method);if(this.type!==tt.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="static"){if(isGenerator)this.unexpected();method["static"]=true;isGenerator=this.eat(tt.star);this.parsePropertyName(method)}else{method["static"]=false}if(!isGenerator&&method.key.type==="Identifier"&&!method.computed&&this.isClassProperty()){classBody.body.push(this.parseClassProperty(method));continue}if(this.options.features["es7.asyncFunctions"]&&this.type!==tt.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async"){isAsync=true;this.parsePropertyName(method)}method.kind="method";if(!method.computed&&!isGenerator){if(method.key.type==="Identifier"){if(this.type!==tt.parenL&&(method.key.name==="get"||method.key.name==="set")){method.kind=method.key.name;this.parsePropertyName(method)}else if(!method["static"]&&method.key.name==="constructor"){method.kind="constructor"}}else if(!method["static"]&&method.key.type==="Literal"&&method.key.value==="constructor"){method.kind="constructor"}}if(method.kind==="constructor"&&method.decorators){this.raise(method.start,"You can't attach decorators to a class constructor")}this.parseClassMethod(classBody,method,isGenerator,isAsync)}if(this.decorators.length){this.raise(this.start,"You have trailing decorators with no method")}node.body=this.finishNode(classBody,"ClassBody");return this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")};pp.isClassProperty=function(){return this.type===tt.eq||(this.type===tt.semi||this.canInsertSemicolon())};pp.parseClassProperty=function(node){if(this.type===tt.eq){if(!this.options.features["es7.classProperties"])this.unexpected();this.next();node.value=this.parseMaybeAssign()}else{node.value=null}this.semicolon();return this.finishNode(node,"ClassProperty")};pp.parseClassMethod=function(classBody,method,isGenerator,isAsync){method.value=this.parseMethod(isGenerator,isAsync);classBody.body.push(this.finishNode(method,"MethodDefinition"))};pp.parseClassId=function(node,isStatement){node.id=this.type===tt.name?this.parseIdent():isStatement?this.unexpected():null};pp.parseClassSuper=function(node){node.superClass=this.eat(tt._extends)?this.parseExprSubscripts():null};pp.parseExport=function(node){this.next();if(this.type===tt.star){var specifier=this.startNode();this.next();if(this.options.features["es7.exportExtensions"]&&this.eatContextual("as")){specifier.exported=this.parseIdent();node.specifiers=[this.finishNode(specifier,"ExportNamespaceSpecifier")];this.parseExportSpecifiersMaybe(node);this.parseExportFrom(node)}else{this.parseExportFrom(node);return this.finishNode(node,"ExportAllDeclaration")}}else if(this.isExportDefaultSpecifier()){var specifier=this.startNode();specifier.exported=this.parseIdent(true);node.specifiers=[this.finishNode(specifier,"ExportDefaultSpecifier")];if(this.type===tt.comma&&this.lookahead().type===tt.star){this.expect(tt.comma);var _specifier=this.startNode();this.expect(tt.star);this.expectContextual("as");_specifier.exported=this.parseIdent();node.specifiers.push(this.finishNode(_specifier,"ExportNamespaceSpecifier"))}else{this.parseExportSpecifiersMaybe(node)}this.parseExportFrom(node)}else if(this.eat(tt._default)){var expr=this.parseMaybeAssign();var needsSemi=true;if(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();this.checkExport(node);return this.finishNode(node,"ExportDefaultDeclaration")}else if(this.type.keyword||this.shouldParseExportDeclaration()){node.declaration=this.parseStatement(true);node.specifiers=[];node.source=null}else{node.declaration=null;node.specifiers=this.parseExportSpecifiers();if(this.eatContextual("from")){node.source=this.type===tt.string?this.parseExprAtom():this.unexpected()}else{node.source=null}this.semicolon()}this.checkExport(node);return this.finishNode(node,"ExportNamedDeclaration")};pp.isExportDefaultSpecifier=function(){if(this.type===tt.name){return this.value!=="type"&&this.value!=="async"}if(this.type!==tt._default){return false}var lookahead=this.lookahead();return lookahead.type===tt.comma||lookahead.type===tt.name&&lookahead.value==="from"};pp.parseExportSpecifiersMaybe=function(node){if(this.eat(tt.comma)){node.specifiers=node.specifiers.concat(this.parseExportSpecifiers())}};pp.parseExportFrom=function(node){this.expectContextual("from");node.source=this.type===tt.string?this.parseExprAtom():this.unexpected();this.semicolon();this.checkExport(node)};pp.shouldParseExportDeclaration=function(){return this.options.features["es7.asyncFunctions"]&&this.isContextual("async")};pp.checkExport=function(node){if(this.decorators.length){var isClass=node.declaration&&(node.declaration.type==="ClassDeclaration"||node.declaration.type==="ClassExpression");if(!node.declaration||!isClass){this.raise(node.start,"You can only use decorators on an export when exporting a class")}this.takeDecorators(node.declaration)}};pp.parseExportSpecifiers=function(){var nodes=[],first=true;this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(!first){this.expect(tt.comma);if(this.afterTrailingComma(tt.braceR))break}else first=false;var node=this.startNode();node.local=this.parseIdent(this.type===tt._default);node.exported=this.eatContextual("as")?this.parseIdent(true):node.local;nodes.push(this.finishNode(node,"ExportSpecifier"))}return nodes};pp.parseImport=function(node){this.next();if(this.type===tt.string){node.specifiers=empty;node.source=this.parseExprAtom();node.kind=""}else{node.specifiers=[];this.parseImportSpecifiers(node);this.expectContextual("from");node.source=this.type===tt.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(node,"ImportDeclaration")};pp.parseImportSpecifiers=function(node){var first=true;if(this.type===tt.name){var start=this.markPosition();node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(),start));if(!this.eat(tt.comma))return}if(this.type===tt.star){var specifier=this.startNode();this.next();this.expectContextual("as");specifier.local=this.parseIdent();this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportNamespaceSpecifier"));return}this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(!first){this.expect(tt.comma);if(this.afterTrailingComma(tt.braceR))break}else first=false;var specifier=this.startNode();specifier.imported=this.parseIdent(true);specifier.local=this.eatContextual("as")?this.parseIdent():specifier.imported;this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportSpecifier"))}};pp.parseImportSpecifierDefault=function(id,start){var node=this.startNodeAt(start);node.local=id;this.checkLVal(node.local,true);return this.finishNode(node,"ImportDefaultSpecifier")}},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var Parser=require("./state").Parser;var tt=require("./tokentype").types;var lineBreak=require("./whitespace").lineBreak;var TokContext=exports.TokContext=function TokContext(token,isExpr,preserveSpace,override){_classCallCheck(this,TokContext);this.token=token;this.isExpr=isExpr;this.preserveSpace=preserveSpace;this.override=override};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=Parser.prototype;pp.initialContext=function(){return[types.b_stat]};pp.braceIsBlock=function(prevType){var parent=undefined;if(prevType===tt.colon&&(parent=this.curContext()).token=="{")return!parent.isExpr;if(prevType===tt._return)return lineBreak.test(this.input.slice(this.lastTokEnd,this.start));if(prevType===tt._else||prevType===tt.semi||prevType===tt.eof)return true;if(prevType==tt.braceL)return this.curContext()===types.b_stat;return!this.exprAllowed};pp.updateContext=function(prevType){var update=undefined,type=this.type;if(type.keyword&&prevType==tt.dot)this.exprAllowed=false;else if(update=type.updateContext)update.call(this,prevType);else this.exprAllowed=type.beforeExpr};tt.parenR.updateContext=tt.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}};tt.braceL.updateContext=function(prevType){this.context.push(this.braceIsBlock(prevType)?types.b_stat:types.b_expr);this.exprAllowed=true};tt.dollarBraceL.updateContext=function(){this.context.push(types.b_tmpl);this.exprAllowed=true};tt.parenL.updateContext=function(prevType){var statementParens=prevType===tt._if||prevType===tt._for||prevType===tt._with||prevType===tt._while;this.context.push(statementParens?types.p_stat:types.p_expr);this.exprAllowed=true};tt.incDec.updateContext=function(){};tt._function.updateContext=function(){if(this.curContext()!==types.b_stat)this.context.push(types.f_expr);this.exprAllowed=false};tt.backQuote.updateContext=function(){if(this.curContext()===types.q_tmpl)this.context.pop();else this.context.push(types.q_tmpl);this.exprAllowed=false}},{"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var _identifier=require("./identifier");var isIdentifierStart=_identifier.isIdentifierStart;var isIdentifierChar=_identifier.isIdentifierChar;var _tokentype=require("./tokentype");var tt=_tokentype.types;var keywordTypes=_tokentype.keywords;var Parser=require("./state").Parser;var SourceLocation=require("./location").SourceLocation;var _whitespace=require("./whitespace");var lineBreak=_whitespace.lineBreak;var lineBreakG=_whitespace.lineBreakG;var isNewLine=_whitespace.isNewLine;var nonASCIIwhitespace=_whitespace.nonASCIIwhitespace;var Token=exports.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 SourceLocation(p,p.startLoc,p.endLoc);if(p.options.ranges)this.range=[p.start,p.end]};var pp=Parser.prototype;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(typeof Symbol!=="undefined")pp[Symbol.iterator]=function(){var self=this;return{next:function next(){var token=self.getToken();return{done:token.type===tt.eof,value:token}}}};pp.setStrict=function(strict){this.strict=strict;if(this.type!==tt.num&&this.type!==tt.string)return;this.pos=this.start;if(this.options.locations){while(this.pos=this.input.length)return this.finishToken(tt.eof);if(curContext.override)return curContext.override(this);else this.readToken(this.fullCharCodeAtPos())};pp.readToken=function(code){if(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<=55295||code>=57344)return code;var next=this.input.charCodeAt(this.pos+1);return(code<<10)+next-56613888};pp.skipBlockComment=function(){var startLoc=this.options.onComment&&this.options.locations&&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){lineBreakG.lastIndex=start;var match=undefined;while((match=lineBreakG.exec(this.input))&&match.index8&&ch<14){++this.pos}else if(ch===47){var next=this.input.charCodeAt(this.pos+1);if(next===42){this.skipBlockComment()}else if(next===47){this.skipLineComment(2)}else break}else if(ch===160){++this.pos}else if(ch>=5760&&nonASCIIwhitespace.test(String.fromCharCode(ch))){++this.pos}else{break}}};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)};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){this.pos+=3;return this.finishToken(tt.ellipsis)}else{++this.pos;return this.finishToken(tt.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(tt.assign,2);return this.finishOp(tt.slash,1)};pp.readToken_mult_modulo=function(code){var type=code===42?tt.star:tt.modulo;var width=1;var next=this.input.charCodeAt(this.pos+1);if(next===42){width++;next=this.input.charCodeAt(this.pos+2);type=tt.exponent}if(next===61){width++;type=tt.assign}return this.finishOp(type,width)};pp.readToken_pipe_amp=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===code)return this.finishOp(code===124?tt.logicalOR:tt.logicalAND,2);if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(code===124?tt.bitwiseOR:tt.bitwiseAND,1)};pp.readToken_caret=function(){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(tt.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&&lineBreak.test(this.input.slice(this.lastTokEnd,this.pos))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(tt.incDec,2)}if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(tt.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(tt.assign,size+1);return this.finishOp(tt.bitShift,size)}if(next==33&&code==60&&this.input.charCodeAt(this.pos+2)==45&&this.input.charCodeAt(this.pos+3)==45){if(this.inModule)unexpected();this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(next===61)size=this.input.charCodeAt(this.pos+2)===61?3:2;return this.finishOp(tt.relational,size)};pp.readToken_eq_excl=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(tt.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(tt.arrow)}return this.finishOp(code===61?tt.eq:tt.prefix,1)};pp.getTokenFromCode=function(code){switch(code){case 46:return this.readToken_dot();case 40:++this.pos;return this.finishToken(tt.parenL);case 41:++this.pos;return this.finishToken(tt.parenR);case 59:++this.pos;return this.finishToken(tt.semi);case 44:++this.pos;return this.finishToken(tt.comma);case 91:++this.pos;return this.finishToken(tt.bracketL);case 93:++this.pos;return this.finishToken(tt.bracketR);case 123:++this.pos;return this.finishToken(tt.braceL);case 125:++this.pos;return this.finishToken(tt.braceR);case 58:++this.pos;return this.finishToken(tt.colon);case 63:++this.pos;return this.finishToken(tt.question);case 64:++this.pos;return this.finishToken(tt.at);case 96:if(this.options.ecmaVersion<6)break;++this.pos;return this.finishToken(tt.backQuote);case 48:var next=this.input.charCodeAt(this.pos+1);if(next===120||next===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(next===111||next===79)return this.readRadixNumber(8);if(next===98||next===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(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(tt.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)};var regexpUnicodeSupport=false;try{new RegExp("￿","u");regexpUnicodeSupport=true}catch(e){}pp.readRegexp=function(){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(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;var mods=this.readWord1();var tmp=content;if(mods){var validFlags=/^[gmsiy]*$/;if(this.options.ecmaVersion>=6)validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))this.raise(start,"Invalid regular expression flag");if(mods.indexOf("u")>=0&&!regexpUnicodeSupport){tmp=tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x")}}try{new RegExp(tmp)}catch(e){if(e instanceof SyntaxError)this.raise(start,"Error parsing regular expression: "+e.message);this.raise(e)}var value=undefined;try{value=new RegExp(content,mods)}catch(err){value=null}return this.finishToken(tt.regexp,{pattern:content,flags:mods,value:value})};pp.readInt=function(radix,len){var start=this.pos,total=0;for(var i=0,e=len==null?Infinity:len;i=97)val=code-97+10;else if(code>=65)val=code-65+10;else if(code>=48&&code<=57)val=code-48;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;var val=this.readInt(radix);if(val==null)this.raise(this.start+2,"Expected number in radix "+radix);if(isIdentifierStart(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(tt.num,val)};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");if(this.input.charCodeAt(this.pos)===46){++this.pos;this.readInt(10);isFloat=true}var next=this.input.charCodeAt(this.pos);if(next===69||next===101){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(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(tt.num,val)};pp.readCodePoint=function(){var ch=this.input.charCodeAt(this.pos),code=undefined;if(ch===123){if(this.options.ecmaVersion<6)this.unexpected();++this.pos;code=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(code>1114111)this.unexpected()}else{code=this.readHexChar(4)}return code};function codePointToString(code){if(code<=65535)return String.fromCharCode(code);return String.fromCharCode((code-65536>>10)+55296,(code-65536&1023)+56320)}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();chunkStart=this.pos}else{if(isNewLine(ch))this.raise(this.start,"Unterminated string constant");++this.pos}}out+=this.input.slice(chunkStart,this.pos++);return this.finishToken(tt.string,out)};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===tt.template){if(ch===36){this.pos+=2;return this.finishToken(tt.dollarBraceL)}else{++this.pos;return this.finishToken(tt.backQuote)}}out+=this.input.slice(chunkStart,this.pos);return this.finishToken(tt.template,out)}if(ch===92){out+=this.input.slice(chunkStart,this.pos);out+=this.readEscapedChar();chunkStart=this.pos}else if(isNewLine(ch)){out+=this.input.slice(chunkStart,this.pos);++this.pos;if(ch===13&&this.input.charCodeAt(this.pos)===10){++this.pos;out+="\n"}else{out+=String.fromCharCode(ch)}if(this.options.locations){++this.curLine;this.lineStart=this.pos}chunkStart=this.pos}else{++this.pos}}};pp.readEscapedChar=function(){var ch=this.input.charCodeAt(++this.pos);var octal=/^[0-7]+/.exec(this.input.slice(this.pos,this.pos+3));if(octal)octal=octal[0];while(octal&&parseInt(octal,8)>255)octal=octal.slice(0,-1);if(octal==="0")octal=null;++this.pos;if(octal){if(this.strict)this.raise(this.pos-2,"Octal literal in strict mode");this.pos+=octal.length-1;return String.fromCharCode(parseInt(octal,8))}else{switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return" ";case 102:return"\f";case 48:return"\x00";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations){this.lineStart=this.pos;++this.curLine}return"";default:return String.fromCharCode(ch)}}};pp.readHexChar=function(len){var n=this.readInt(16,len);if(n===null)this.raise(this.start,"Bad character escape sequence");return n};var containsEsc;pp.readWord1=function(){containsEsc=false;var word="",first=true,chunkStart=this.pos;var astral=this.options.ecmaVersion>=6;while(this.pos=6||!containsEsc)&&this.isKeyword(word))type=keywordTypes[word];return this.finishToken(type,word)}},{"./identifier":4,"./location":6,"./state":12,"./tokentype":16,"./whitespace":18}],16:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var TokenType=exports.TokenType=function TokenType(label){var conf=arguments[1]===undefined?{}:arguments[1];_classCallCheck(this,TokenType);this.label=label;this.keyword=conf.keyword;this.beforeExpr=!!conf.beforeExpr;this.startsExpr=!!conf.startsExpr;this.rightAssociative=!!conf.rightAssociative;this.isLoop=!!conf.isLoop;this.isAssign=!!conf.isAssign;this.prefix=!!conf.prefix;this.postfix=!!conf.postfix;this.binop=conf.binop||null;this.updateContext=null};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"),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}),at:new TokenType("@"),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),exponent:new TokenType("**",{beforeExpr:true,binop:11,rightAssociative:true})};exports.types=types;var keywords={};exports.keywords=keywords;function kw(name){var options=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");kw("do",{isLoop:true});kw("else",beforeExpr);kw("finally");kw("for",{isLoop:true});kw("function");kw("if");kw("return",beforeExpr);kw("switch");kw("throw",beforeExpr);kw("try");kw("var");kw("let");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("yield",{beforeExpr:true,startsExpr:true});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})},{}],17:[function(require,module,exports){"use strict";exports.isArray=isArray;exports.has=has;exports.__esModule=true;function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function has(obj,propName){return Object.prototype.hasOwnProperty.call(obj,propName)}},{}],18:[function(require,module,exports){"use strict";exports.isNewLine=isNewLine;exports.__esModule=true;var lineBreak=/\r\n?|\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===8232||code==8233}var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;exports.nonASCIIwhitespace=nonASCIIwhitespace},{}],19:[function(require,module,exports){(function(global){"use strict";var transform=module.exports=require("../transformation");transform.options=require("../transformation/file/options");transform.version=require("../../../package").version;transform.transform=transform;transform.run=function(code){var opts=arguments[1]===undefined?{}:arguments[1];opts.sourceMaps="inline";return new Function(transform(code,opts).code)()};transform.load=function(url,callback,_x,hold){var opts=arguments[2]===undefined?{}:arguments[2];var _opts=opts;if(!_opts.filename)_opts.filename=url;var xhr=global.ActiveXObject?new global.ActiveXObject("Microsoft.XMLHTTP"):new global.XMLHttpRequest;xhr.open("GET",url,true);if("overrideMimeType"in xhr)xhr.overrideMimeType("text/plain");xhr.onreadystatechange=function(){if(xhr.readyState!==4)return;var status=xhr.status;if(status===0||status===200){var param=[xhr.responseText,opts];if(!hold)transform.run.apply(transform,param);if(callback)callback(param)}else{throw new Error("Could not load "+url)}};xhr.send(null)};var runScripts=function runScripts(){var scripts=[];var types=["text/ecmascript-6","text/6to5","text/babel","module"];var index=0;var exec=function(_exec){var _execWrapper=function exec(){return _exec.apply(this,arguments)};_execWrapper.toString=function(){return _exec.toString()};return _execWrapper}(function(){var param=scripts[index];if(param instanceof Array){transform.run.apply(transform,param);index++;exec()}});var run=function run(script,i){var opts={};if(script.src){transform.load(script.src,function(param){scripts[i]=param;exec()},opts,true)}else{opts.filename="embedded";scripts[i]=[script.innerHTML,opts]}};var _scripts=global.document.getElementsByTagName("script");for(var i=0;i<_scripts.length;++i){var _script=_scripts[i];if(types.indexOf(_script.type)>=0)scripts.push(_script)}for(i in scripts){run(scripts[i],i)}exec()};if(global.addEventListener){global.addEventListener("DOMContentLoaded",runScripts,false)}else if(global.attachEvent){global.attachEvent("onload",runScripts)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../../../package":454,"../transformation":63,"../transformation/file/options":49}],20:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var repeating=_interopRequire(require("repeating"));var trimRight=_interopRequire(require("trim-right"));var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var includes=_interopRequire(require("lodash/collection/includes"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var Buffer=function(){function Buffer(position,format){_classCallCheck(this,Buffer);this.position=position;this._indent=format.indent.base;this.format=format;this.buf=""}Buffer.prototype.get=function get(){return trimRight(this.buf)};Buffer.prototype.getIndent=function getIndent(){if(this.format.compact||this.format.concise){return""}else{return repeating(this.format.indent.style,this._indent)}};Buffer.prototype.indentSize=function indentSize(){return this.getIndent().length};Buffer.prototype.indent=function indent(){this._indent++};Buffer.prototype.dedent=function dedent(){this._indent--};Buffer.prototype.semicolon=function semicolon(){this.push(";")};Buffer.prototype.ensureSemicolon=function ensureSemicolon(){if(!this.isLast(";"))this.semicolon()};Buffer.prototype.rightBrace=function rightBrace(){this.newline(true);this.push("}")};Buffer.prototype.keyword=function keyword(name){this.push(name);this.space()};Buffer.prototype.space=function space(){if(this.format.compact)return;if(this.buf&&!this.isLast(" ")&&!this.isLast("\n")){this.push(" ")}};Buffer.prototype.removeLast=function removeLast(cha){if(this.format.compact)return;if(!this.isLast(cha))return;this.buf=this.buf.substr(0,this.buf.length-1);this.position.unshift(cha)};Buffer.prototype.newline=function newline(i,removeLast){if(this.format.compact)return;if(this.format.concise){this.space();return}if(!removeLast)removeLast=false;if(isNumber(i)){i=Math.min(2,i);if(this.endsWith("{\n")||this.endsWith(":\n"))i--;if(i<=0)return;while(i>0){this._newline(removeLast);i--}return}if(isBoolean(i)){removeLast=i}this._newline(removeLast)};Buffer.prototype._newline=function _newline(removeLast){if(this.endsWith("\n\n"))return;if(removeLast&&this.isLast("\n"))this.removeLast("\n");this.removeLast(" ");this._removeSpacesAfterLastNewline();this._push("\n")};Buffer.prototype._removeSpacesAfterLastNewline=function _removeSpacesAfterLastNewline(){var lastNewlineIndex=this.buf.lastIndexOf("\n");if(lastNewlineIndex===-1)return;var index=this.buf.length-1;while(index>lastNewlineIndex){if(this.buf[index]!==" "){break}index--}if(index===lastNewlineIndex){this.buf=this.buf.substring(0,index+1)}};Buffer.prototype.push=function push(str,noIndent){if(!this.format.compact&&this._indent&&!noIndent&&str!=="\n"){var indent=this.getIndent();str=str.replace(/\n/g,"\n"+indent);if(this.isLast("\n"))this._push(indent)}this._push(str)};Buffer.prototype._push=function _push(str){this.position.push(str);this.buf+=str};Buffer.prototype.endsWith=function endsWith(str){return this.buf.slice(-str.length)===str};Buffer.prototype.isLast=function isLast(cha){if(this.format.compact)return false;var buf=this.buf;var last=buf[buf.length-1];if(Array.isArray(cha)){return includes(cha,last)}else{return cha===last}};return Buffer}();module.exports=Buffer},{"lodash/collection/includes":319,"lodash/lang/isBoolean":393,"lodash/lang/isNumber":397,repeating:437,"trim-right":453}],21:[function(require,module,exports){"use strict";exports.File=File;exports.Program=Program;exports.BlockStatement=BlockStatement;exports.__esModule=true;function File(node,print){print(node.program)}function Program(node,print){print.sequence(node.body)}function BlockStatement(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();print.sequence(node.body,{indent:true});this.removeLast("\n");this.rightBrace()}}},{}],22:[function(require,module,exports){"use strict";exports.ClassDeclaration=ClassDeclaration;exports.ClassBody=ClassBody;exports.ClassProperty=ClassProperty;exports.MethodDefinition=MethodDefinition;exports.__esModule=true;function ClassDeclaration(node,print){print.list(node.decorators);this.push("class");if(node.id){this.space();print(node.id)}print(node.typeParameters);if(node.superClass){this.push(" extends ");print(node.superClass);print(node.superTypeParameters)}if(node["implements"]){this.push(" implements ");print.join(node["implements"],{separator:", "})}this.space();print(node.body)}exports.ClassExpression=ClassDeclaration;function ClassBody(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();this.indent();print.sequence(node.body);this.dedent();this.rightBrace()}}function ClassProperty(node,print){print.list(node.decorators);if(node["static"])this.push("static ");print(node.key);print(node.typeAnnotation);if(node.value){this.space();this.push("=");this.space();print(node.value)}this.semicolon()}function MethodDefinition(node,print){print.list(node.decorators);if(node["static"]){this.push("static ")}this._method(node,print)}},{}],23:[function(require,module,exports){"use strict";exports.ComprehensionBlock=ComprehensionBlock;exports.ComprehensionExpression=ComprehensionExpression;exports.__esModule=true;function ComprehensionBlock(node,print){this.keyword("for");this.push("(");print(node.left);this.push(" of ");print(node.right);this.push(")")}function ComprehensionExpression(node,print){this.push(node.generator?"(":"[");print.join(node.blocks,{separator:" "});this.space();if(node.filter){this.keyword("if");this.push("(");print(node.filter);this.push(")");this.space()}print(node.body);this.push(node.generator?")":"]")}},{}],24:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.UnaryExpression=UnaryExpression;exports.DoExpression=DoExpression;exports.UpdateExpression=UpdateExpression;exports.ConditionalExpression=ConditionalExpression;exports.NewExpression=NewExpression;exports.SequenceExpression=SequenceExpression;exports.ThisExpression=ThisExpression;exports.Super=Super;exports.Decorator=Decorator;exports.CallExpression=CallExpression;exports.EmptyStatement=EmptyStatement;exports.ExpressionStatement=ExpressionStatement;exports.AssignmentExpression=AssignmentExpression;exports.MemberExpression=MemberExpression;exports.__esModule=true;var isInteger=_interopRequire(require("is-integer"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var t=_interopRequireWildcard(require("../../types"));function UnaryExpression(node,print){var hasSpace=/[a-z]$/.test(node.operator);var arg=node.argument;if(t.isUpdateExpression(arg)||t.isUnaryExpression(arg)){hasSpace=true}if(t.isUnaryExpression(arg)&&arg.operator==="!"){hasSpace=false}this.push(node.operator);if(hasSpace)this.push(" ");print(node.argument)}function DoExpression(node,print){this.push("do");this.space();print(node.body)}function UpdateExpression(node,print){if(node.prefix){this.push(node.operator);print(node.argument)}else{print(node.argument);this.push(node.operator)}}function ConditionalExpression(node,print){print(node.test);this.space();this.push("?");this.space();print(node.consequent);this.space();this.push(":");this.space();print(node.alternate)}function NewExpression(node,print){this.push("new ");print(node.callee);this.push("(");print.list(node.arguments);this.push(")")}function SequenceExpression(node,print){print.list(node.expressions)}function ThisExpression(){this.push("this")}function Super(){this.push("super")}function Decorator(node,print){this.push("@");print(node.expression)}function CallExpression(node,print){print(node.callee);this.push("(");var separator=",";if(node._prettyCall){separator+="\n";this.newline();this.indent()}else{separator+=" "}print.list(node.arguments,{separator:separator});if(node._prettyCall){this.newline();this.dedent()}this.push(")")}var buildYieldAwait=function buildYieldAwait(keyword){return function(node,print){this.push(keyword);if(node.delegate||node.all){this.push("*")}if(node.argument){this.space();print(node.argument)}}};var YieldExpression=buildYieldAwait("yield");exports.YieldExpression=YieldExpression;var AwaitExpression=buildYieldAwait("await");exports.AwaitExpression=AwaitExpression;function EmptyStatement(){this.semicolon()}function ExpressionStatement(node,print){print(node.expression);this.semicolon()}function AssignmentExpression(node,print){print(node.left);this.push(" ");this.push(node.operator);this.push(" ");print(node.right)}exports.BinaryExpression=AssignmentExpression;exports.LogicalExpression=AssignmentExpression;exports.AssignmentPattern=AssignmentExpression;var SCIENTIFIC_NOTATION=/e/i;function MemberExpression(node,print){var obj=node.object;print(obj);if(!node.computed&&t.isMemberExpression(node.property)){throw new TypeError("Got a MemberExpression for MemberExpression property")}var computed=node.computed;if(t.isLiteral(node.property)&&isNumber(node.property.value)){computed=true}if(computed){this.push("[");print(node.property);this.push("]")}else{if(t.isLiteral(obj)&&isInteger(obj.value)&&!SCIENTIFIC_NOTATION.test(obj.value.toString())){this.push(".")}this.push(".");print(node.property)}}exports.MetaProperty=MemberExpression},{"../../types":153,"is-integer":303,"lodash/lang/isNumber":397}],25:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.AnyTypeAnnotation=AnyTypeAnnotation;exports.ArrayTypeAnnotation=ArrayTypeAnnotation;exports.BooleanTypeAnnotation=BooleanTypeAnnotation;exports.DeclareClass=DeclareClass;exports.DeclareFunction=DeclareFunction;exports.DeclareModule=DeclareModule;exports.DeclareVariable=DeclareVariable;exports.FunctionTypeAnnotation=FunctionTypeAnnotation;exports.FunctionTypeParam=FunctionTypeParam;exports.InterfaceExtends=InterfaceExtends;exports._interfaceish=_interfaceish;exports.InterfaceDeclaration=InterfaceDeclaration;exports.IntersectionTypeAnnotation=IntersectionTypeAnnotation;exports.NullableTypeAnnotation=NullableTypeAnnotation;exports.NumberTypeAnnotation=NumberTypeAnnotation;exports.StringLiteralTypeAnnotation=StringLiteralTypeAnnotation;exports.StringTypeAnnotation=StringTypeAnnotation;exports.TupleTypeAnnotation=TupleTypeAnnotation;exports.TypeofTypeAnnotation=TypeofTypeAnnotation;exports.TypeAlias=TypeAlias;exports.TypeAnnotation=TypeAnnotation;exports.TypeParameterInstantiation=TypeParameterInstantiation;exports.ObjectTypeAnnotation=ObjectTypeAnnotation;exports.ObjectTypeCallProperty=ObjectTypeCallProperty;exports.ObjectTypeIndexer=ObjectTypeIndexer;exports.ObjectTypeProperty=ObjectTypeProperty;exports.QualifiedTypeIdentifier=QualifiedTypeIdentifier;exports.UnionTypeAnnotation=UnionTypeAnnotation;exports.TypeCastExpression=TypeCastExpression;exports.VoidTypeAnnotation=VoidTypeAnnotation;exports.__esModule=true;var t=_interopRequireWildcard(require("../../types"));function AnyTypeAnnotation(){this.push("any")}function ArrayTypeAnnotation(node,print){print(node.elementType);this.push("[");this.push("]")}function BooleanTypeAnnotation(node){this.push("bool")}function DeclareClass(node,print){this.push("declare class ");this._interfaceish(node,print)}function DeclareFunction(node,print){this.push("declare function ");print(node.id);print(node.id.typeAnnotation.typeAnnotation);this.semicolon()}function DeclareModule(node,print){this.push("declare module ");print(node.id);this.space();print(node.body)}function DeclareVariable(node,print){this.push("declare var ");print(node.id);print(node.id.typeAnnotation);this.semicolon()}function FunctionTypeAnnotation(node,print,parent){print(node.typeParameters);this.push("(");print.list(node.params);if(node.rest){if(node.params.length){this.push(",");this.space()}this.push("...");print(node.rest)}this.push(")");if(parent.type==="ObjectTypeProperty"||parent.type==="ObjectTypeCallProperty"||parent.type==="DeclareFunction"){this.push(":")}else{this.space();this.push("=>")}this.space();print(node.returnType)}function FunctionTypeParam(node,print){print(node.name);if(node.optional)this.push("?");this.push(":");this.space();print(node.typeAnnotation)}function InterfaceExtends(node,print){print(node.id);print(node.typeParameters)}exports.ClassImplements=InterfaceExtends;exports.GenericTypeAnnotation=InterfaceExtends;function _interfaceish(node,print){print(node.id);print(node.typeParameters);if(node["extends"].length){this.push(" extends ");print.join(node["extends"],{separator:", "})}this.space();print(node.body)}function InterfaceDeclaration(node,print){this.push("interface ");this._interfaceish(node,print)}function IntersectionTypeAnnotation(node,print){print.join(node.types,{separator:" & "})}function NullableTypeAnnotation(node,print){this.push("?");print(node.typeAnnotation)}function NumberTypeAnnotation(){this.push("number")}function StringLiteralTypeAnnotation(node){this._stringLiteral(node.value)}function StringTypeAnnotation(){this.push("string")}function TupleTypeAnnotation(node,print){this.push("[");print.join(node.types,{separator:", "});this.push("]")}function TypeofTypeAnnotation(node,print){this.push("typeof ");print(node.argument)}function TypeAlias(node,print){this.push("type ");print(node.id);print(node.typeParameters);this.space();this.push("=");this.space();print(node.right);this.semicolon()}function TypeAnnotation(node,print){this.push(":");this.space();if(node.optional)this.push("?");print(node.typeAnnotation)}function TypeParameterInstantiation(node,print){this.push("<");print.join(node.params,{separator:", "});this.push(">")}exports.TypeParameterDeclaration=TypeParameterInstantiation;function ObjectTypeAnnotation(node,print){var _this=this;this.push("{");var props=node.properties.concat(node.callProperties,node.indexers);if(props.length){this.space();print.list(props,{separator:false,indent:true,iterator:function(){if(props.length!==1){_this.semicolon();_this.space()}}});this.space()}this.push("}")}function ObjectTypeCallProperty(node,print){if(node["static"])this.push("static ");print(node.value)}function ObjectTypeIndexer(node,print){if(node["static"])this.push("static ");this.push("[");print(node.id);this.push(":");this.space();print(node.key);this.push("]");this.push(":");this.space();print(node.value)}function ObjectTypeProperty(node,print){if(node["static"])this.push("static ");print(node.key);if(node.optional)this.push("?");if(!t.isFunctionTypeAnnotation(node.value)){this.push(":");this.space()}print(node.value)}function QualifiedTypeIdentifier(node,print){print(node.qualification);this.push(".");print(node.id)}function UnionTypeAnnotation(node,print){print.join(node.types,{separator:" | "})}function TypeCastExpression(node,print){this.push("(");print(node.expression);print(node.typeAnnotation);this.push(")")}function VoidTypeAnnotation(node){this.push("void")}},{"../../types":153}],26:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.JSXAttribute=JSXAttribute;exports.JSXIdentifier=JSXIdentifier;exports.JSXNamespacedName=JSXNamespacedName;exports.JSXMemberExpression=JSXMemberExpression;exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXExpressionContainer=JSXExpressionContainer;exports.JSXElement=JSXElement;exports.JSXOpeningElement=JSXOpeningElement;exports.JSXClosingElement=JSXClosingElement;exports.JSXEmptyExpression=JSXEmptyExpression;exports.__esModule=true;var each=_interopRequire(require("lodash/collection/each"));var t=_interopRequireWildcard(require("../../types"));function JSXAttribute(node,print){print(node.name);if(node.value){this.push("=");print(node.value)}}function JSXIdentifier(node){this.push(node.name)}function JSXNamespacedName(node,print){print(node.namespace);this.push(":");print(node.name)}function JSXMemberExpression(node,print){print(node.object);this.push(".");print(node.property)}function JSXSpreadAttribute(node,print){this.push("{...");print(node.argument);this.push("}")}function JSXExpressionContainer(node,print){this.push("{");print(node.expression);this.push("}")}function JSXElement(node,print){var _this=this;var open=node.openingElement;print(open);if(open.selfClosing)return;this.indent();each(node.children,function(child){if(t.isLiteral(child)){_this.push(child.value)}else{print(child)}});this.dedent();print(node.closingElement)}function JSXOpeningElement(node,print){this.push("<");print(node.name);if(node.attributes.length>0){this.push(" ");print.join(node.attributes,{separator:" "})}this.push(node.selfClosing?" />":">")}function JSXClosingElement(node,print){this.push("")}function JSXEmptyExpression(){}},{"../../types":153, "lodash/collection/each":316}],27:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports._params=_params;exports._method=_method;exports.FunctionExpression=FunctionExpression;exports.ArrowFunctionExpression=ArrowFunctionExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../types"));function _params(node,print){var _this=this;print(node.typeParameters);this.push("(");print.list(node.params,{iterator:function(node){if(node.optional)_this.push("?");print(node.typeAnnotation)}});this.push(")");if(node.returnType){print(node.returnType)}}function _method(node,print){var value=node.value;var kind=node.kind;var key=node.key;if(kind==="method"||kind==="init"){if(value.generator){this.push("*")}}if(kind==="get"||kind==="set"){this.push(kind+" ")}if(value.async)this.push("async ");if(node.computed){this.push("[");print(key);this.push("]")}else{print(key)}this._params(value,print);this.push(" ");print(value.body)}function FunctionExpression(node,print){if(node.async)this.push("async ");this.push("function");if(node.generator)this.push("*");if(node.id){this.push(" ");print(node.id)}else{this.space()}this._params(node,print);this.space();print(node.body)}exports.FunctionDeclaration=FunctionExpression;function ArrowFunctionExpression(node,print){if(node.async)this.push("async ");if(node.params.length===1&&t.isIdentifier(node.params[0])){print(node.params[0])}else{this._params(node,print)}this.push(" => ");print(node.body)}},{"../../types":153}],28:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.ImportSpecifier=ImportSpecifier;exports.ImportDefaultSpecifier=ImportDefaultSpecifier;exports.ExportDefaultSpecifier=ExportDefaultSpecifier;exports.ExportSpecifier=ExportSpecifier;exports.ExportNamespaceSpecifier=ExportNamespaceSpecifier;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ImportDeclaration=ImportDeclaration;exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier;exports.__esModule=true;var each=_interopRequire(require("lodash/collection/each"));var t=_interopRequireWildcard(require("../../types"));function ImportSpecifier(node,print){print(node.imported);if(node.local&&node.local!==node.imported){this.push(" as ");print(node.local)}}function ImportDefaultSpecifier(node,print){print(node.local)}function ExportDefaultSpecifier(node,print){print(node.exported)}function ExportSpecifier(node,print){print(node.local);if(node.exported&&node.local!==node.exported){this.push(" as ");print(node.exported)}}function ExportNamespaceSpecifier(node,print){this.push("* as ");print(node.exported)}function ExportAllDeclaration(node,print){this.push("export *");if(node.exported){this.push(" as ");print(node.exported)}this.push(" from ");print(node.source);this.semicolon()}function ExportNamedDeclaration(node,print){this.push("export ");ExportDeclaration.call(this,node,print)}function ExportDefaultDeclaration(node,print){this.push("export default ");ExportDeclaration.call(this,node,print)}function ExportDeclaration(node,print){var specifiers=node.specifiers;if(node.declaration){var declar=node.declaration;print(declar);if(t.isStatement(declar)||t.isFunction(declar)||t.isClass(declar))return}else{var first=specifiers[0];var hasSpecial=false;if(t.isExportDefaultSpecifier(first)||t.isExportNamespaceSpecifier(first)){hasSpecial=true;print(specifiers.shift());if(specifiers.length){this.push(", ")}}if(specifiers.length||!specifiers.length&&!hasSpecial){this.push("{");if(specifiers.length){this.space();print.join(specifiers,{separator:", "});this.space()}this.push("}")}if(node.source){this.push(" from ");print(node.source)}}this.ensureSemicolon()}function ImportDeclaration(node,print){this.push("import ");if(node.isType){this.push("type ")}var specfiers=node.specifiers;if(specfiers&&specfiers.length){var first=node.specifiers[0];if(t.isImportDefaultSpecifier(first)||t.isImportNamespaceSpecifier(first)){print(node.specifiers.shift());if(node.specifiers.length){this.push(", ")}}if(node.specifiers.length){this.push("{");this.space();print.join(node.specifiers,{separator:", "});this.space();this.push("}")}this.push(" from ")}print(node.source);this.semicolon()}function ImportNamespaceSpecifier(node,print){this.push("* as ");print(node.local)}},{"../../types":153,"lodash/collection/each":316}],29:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.WithStatement=WithStatement;exports.IfStatement=IfStatement;exports.ForStatement=ForStatement;exports.WhileStatement=WhileStatement;exports.DoWhileStatement=DoWhileStatement;exports.LabeledStatement=LabeledStatement;exports.TryStatement=TryStatement;exports.CatchClause=CatchClause;exports.ThrowStatement=ThrowStatement;exports.SwitchStatement=SwitchStatement;exports.SwitchCase=SwitchCase;exports.DebuggerStatement=DebuggerStatement;exports.VariableDeclaration=VariableDeclaration;exports.VariableDeclarator=VariableDeclarator;exports.__esModule=true;var repeating=_interopRequire(require("repeating"));var t=_interopRequireWildcard(require("../../types"));function WithStatement(node,print){this.keyword("with");this.push("(");print(node.object);this.push(")");print.block(node.body)}function IfStatement(node,print){this.keyword("if");this.push("(");print(node.test);this.push(")");this.space();print.indentOnComments(node.consequent);if(node.alternate){if(this.isLast("}"))this.space();this.push("else ");print.indentOnComments(node.alternate)}}function ForStatement(node,print){this.keyword("for");this.push("(");print(node.init);this.push(";");if(node.test){this.push(" ");print(node.test)}this.push(";");if(node.update){this.push(" ");print(node.update)}this.push(")");print.block(node.body)}function WhileStatement(node,print){this.keyword("while");this.push("(");print(node.test);this.push(")");print.block(node.body)}var buildForXStatement=function buildForXStatement(op){return function(node,print){this.keyword("for");this.push("(");print(node.left);this.push(" "+op+" ");print(node.right);this.push(")");print.block(node.body)}};var ForInStatement=buildForXStatement("in");exports.ForInStatement=ForInStatement;var ForOfStatement=buildForXStatement("of");exports.ForOfStatement=ForOfStatement;function DoWhileStatement(node,print){this.keyword("do");print(node.body);this.space();this.keyword("while");this.push("(");print(node.test);this.push(");")}var buildLabelStatement=function buildLabelStatement(prefix,key){return function(node,print){this.push(prefix);var label=node[key||"label"];if(label){this.push(" ");print(label)}this.semicolon()}};var ContinueStatement=buildLabelStatement("continue");exports.ContinueStatement=ContinueStatement;var ReturnStatement=buildLabelStatement("return","argument");exports.ReturnStatement=ReturnStatement;var BreakStatement=buildLabelStatement("break");exports.BreakStatement=BreakStatement;function LabeledStatement(node,print){print(node.label);this.push(": ");print(node.body)}function TryStatement(node,print){this.keyword("try");print(node.block);this.space();if(node.handlers){print(node.handlers[0])}else{print(node.handler)}if(node.finalizer){this.space();this.push("finally ");print(node.finalizer)}}function CatchClause(node,print){this.keyword("catch");this.push("(");print(node.param);this.push(") ");print(node.body)}function ThrowStatement(node,print){this.push("throw ");print(node.argument);this.semicolon()}function SwitchStatement(node,print){this.keyword("switch");this.push("(");print(node.discriminant);this.push(")");this.space();this.push("{");print.sequence(node.cases,{indent:true,addNewlines:function addNewlines(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}});this.push("}")}function SwitchCase(node,print){if(node.test){this.push("case ");print(node.test);this.push(":")}else{this.push("default:")}if(node.consequent.length){this.newline();print.sequence(node.consequent,{indent:true})}}function DebuggerStatement(){this.push("debugger;")}function VariableDeclaration(node,print,parent){this.push(node.kind+" ");var hasInits=false;if(!t.isFor(parent)){for(var i=0;i0)_this.push(" ");print(elem);if(i1e5;if(format.compact){console.error(messages.get("codeGeneratorDeopt",opts.filename,"100KB"))}}return format};CodeGenerator.findCommonStringDelimeter=function findCommonStringDelimeter(code,tokens){var occurences={single:0,"double":0};var checked=0;for(var i=0;i=3)continue;var raw=code.slice(token.start,token.end);if(raw[0]==="'"){occurences.single++}else{occurences.double++}checked++}if(occurences.single>occurences.double){return"single"}else{return"double"}};CodeGenerator.generators={templateLiterals:require("./generators/template-literals"),comprehensions:require("./generators/comprehensions"),expressions:require("./generators/expressions"),statements:require("./generators/statements"),classes:require("./generators/classes"),methods:require("./generators/methods"),modules:require("./generators/modules"),types:require("./generators/types"),flow:require("./generators/flow"),base:require("./generators/base"),jsx:require("./generators/jsx")};CodeGenerator.prototype.generate=function generate(){var ast=this.ast;this.print(ast);var comments=[];each(ast.comments,function(comment){if(!comment._displayed)comments.push(comment)});this._printComments(comments);return{map:this.map.get(),code:this.buffer.get()}};CodeGenerator.prototype.buildPrint=function buildPrint(parent){var _this=this;var print=function(node,opts){return _this.print(node,parent,opts)};print.sequence=function(nodes){var opts=arguments[1]===undefined?{}:arguments[1];opts.statement=true;return _this.printJoin(print,nodes,opts)};print.join=function(nodes,opts){return _this.printJoin(print,nodes,opts)};print.list=function(items){var opts=arguments[1]===undefined?{}:arguments[1];if(opts.separator==null)opts.separator=", ";print.join(items,opts)};print.block=function(node){return _this.printBlock(print,node)};print.indentOnComments=function(node){return _this.printAndIndentOnComments(print,node)};return print};CodeGenerator.prototype.print=function print(node,parent){var _this=this;var opts=arguments[2]===undefined?{}:arguments[2];if(!node)return;if(parent&&parent._compact){node._compact=true}var oldConcise=this.format.concise;if(node._compact){this.format.concise=true}var newline=function(leading){if(!opts.statement&&!n.isUserWhitespacable(node,parent)){return}var lines=0;if(node.start!=null&&!node._ignoreUserWhitespace){if(leading){lines=_this.whitespace.getNewlinesBefore(node)}else{lines=_this.whitespace.getNewlinesAfter(node)}}else{if(!leading)lines++;if(opts.addNewlines)lines+=opts.addNewlines(leading,node)||0;var needs=n.needsWhitespaceAfter;if(leading)needs=n.needsWhitespaceBefore;if(needs(node,parent))lines++;if(!_this.buffer.buf)lines=0}_this.newline(lines)};if(this[node.type]){var needsNoLineTermParens=n.needsParensNoLineTerminator(node,parent);var needsParens=needsNoLineTermParens||n.needsParens(node,parent);if(needsParens)this.push("(");if(needsNoLineTermParens)this.indent();this.printLeadingComments(node,parent);newline(true);if(opts.before)opts.before();this.map.mark(node,"start");this[node.type](node,this.buildPrint(node),parent);if(needsNoLineTermParens){this.newline();this.dedent()}if(needsParens)this.push(")");this.map.mark(node,"end");if(opts.after)opts.after();newline(false);this.printTrailingComments(node,parent)}else{throw new ReferenceError("unknown node of type "+JSON.stringify(node.type)+" with constructor "+JSON.stringify(node&&node.constructor.name))}this.format.concise=oldConcise};CodeGenerator.prototype.printJoin=function printJoin(print,nodes){var _this=this;var opts=arguments[2]===undefined?{}:arguments[2];if(!nodes||!nodes.length)return;var len=nodes.length;if(opts.indent)this.indent();each(nodes,function(node,i){print(node,{statement:opts.statement,addNewlines:opts.addNewlines,after:function(){if(opts.iterator){opts.iterator(node,i)}if(opts.separator&&i","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(tier,i){each(tier,function(op){PRECEDENCE[op]=i})});function NullableTypeAnnotation(node,parent){return t.isArrayTypeAnnotation(parent)}exports.FunctionTypeAnnotation=NullableTypeAnnotation;function UpdateExpression(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}}function ObjectExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function Binary(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node){return true}}}function BinaryExpression(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}}function SequenceExpression(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}return true}function YieldExpression(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)||t.isConditionalExpression(parent)||t.isYieldExpression(parent)}function ClassExpression(node,parent){return t.isExpressionStatement(parent)}function UnaryLike(node,parent){return t.isMemberExpression(parent)&&parent.object===node}function FunctionExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isCallExpression(parent)&&parent.callee===node){return true}}function ConditionalExpression(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isCallExpression(parent)||t.isNewExpression(parent)){if(parent.callee===node){return true}}if(t.isConditionalExpression(parent)&&parent.test===node){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}exports.AssignmentExpression=ConditionalExpression},{"../../types":153,"lodash/collection/each":316}],35:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var each=_interopRequire(require("lodash/collection/each"));var map=_interopRequire(require("lodash/collection/map"));var t=_interopRequireWildcard(require("../../types"));function crawl(node){var state=arguments[1]===undefined?{}:arguments[1];if(t.isMemberExpression(node)){crawl(node.object,state);if(node.computed)crawl(node.property,state)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){crawl(node.left,state);crawl(node.right,state)}else if(t.isCallExpression(node)){state.hasCall=true;crawl(node.callee,state)}else if(t.isFunction(node)){state.hasFunction=true}else if(t.isIdentifier(node)){var _state=state;if(!_state.hasHelper)_state.hasHelper=isHelper(node.callee)}return state}function isHelper(node){if(t.isMemberExpression(node)){return isHelper(node.object)||isHelper(node.property)}else if(t.isIdentifier(node)){return node.name==="require"||node.name[0]==="_"}else if(t.isCallExpression(node)){return isHelper(node.callee)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){return t.isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)}else{return false}}function isType(node){return t.isLiteral(node)||t.isObjectExpression(node)||t.isArrayExpression(node)||t.isIdentifier(node)||t.isMemberExpression(node)}exports.nodes={AssignmentExpression:function AssignmentExpression(node){var state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction){return{before:state.hasFunction,after:true}}},SwitchCase:function SwitchCase(node,parent){return{before:node.consequent.length||parent.cases[0]===node}},LogicalExpression:function LogicalExpression(node){if(t.isFunction(node.left)||t.isFunction(node.right)){return{after:true}}},Literal:function Literal(node){if(node.value==="use strict"){return{after:true}}},CallExpression:function CallExpression(node){if(t.isFunction(node.callee)||isHelper(node)){return{before:true,after:true}}},VariableDeclaration:function VariableDeclaration(node){for(var i=0;i=3){callExpr._prettyCall=true}return t.inherits(callExpr,node)}};var addDisplayName=function addDisplayName(id,call){var props=call.arguments[0].properties;var safe=true;for(var i=0;i=0}function pullFlag(node,flag){var flags=node.regex.flags.split("");if(node.regex.flags.indexOf(flag)<0)return;pull(flags,flag);node.regex.flags=flags.join("")}},{"../../types":153,"lodash/array/pull":313}],60:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var t=_interopRequireWildcard(require("../../types"));var awaitVisitor={enter:function enter(node,parent,scope,state){if(t.isFunction(node))this.skip();if(t.isAwaitExpression(node)){node.type="YieldExpression";if(node.all){node.all=false;node.argument=t.callExpression(t.memberExpression(t.identifier("Promise"),t.identifier("all")),[node.argument])}}}};var referenceVisitor={enter:function enter(node,parent,scope,state){var name=state.id.name;if(t.isReferencedIdentifier(node,parent,{name:name})&&scope.bindingIdentifierEquals(name,state.id)){var _state;return _state=state,!_state.ref&&(_state.ref=scope.generateUidIdentifier(name)),_state.ref}}};module.exports=function(node,callId,scope){node.async=false;node.generator=true;scope.traverse(node,awaitVisitor,state);var call=t.callExpression(callId,[node]);var id=node.id;node.id=null;if(t.isFunctionDeclaration(node)){var declar=t.variableDeclaration("let",[t.variableDeclarator(id,call)]);declar._blockHoist=true;return declar}else{if(id){var state={id:id};scope.traverse(node,referenceVisitor,state);if(state.ref){scope.parent.push({id:state.ref});return t.assignmentExpression("=",state.ref,call)}}return call}}},{"../../types":153}],61:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _toConsumableArray=function(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i=opts.stage)return true;if(transformer.metadata.optional&&!includes(opts.optional,key))return false;return true};TransformerPass.prototype.checkNode=function checkNode(node){var check=this.transformer.check;if(check){return this.shouldRun=check(node)}else{return true}};TransformerPass.prototype.transform=function transform(){if(!this.shouldRun)return;var file=this.file;file.log.debug("Running transformer "+this.transformer.key);traverse(file.ast,this.handlers,file.scope,file);this.ran=true};return TransformerPass}();module.exports=TransformerPass},{"../traversal":144,"lodash/collection/includes":319}],76:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var TransformerPass=_interopRequire(require("./transformer-pass"));var isFunction=_interopRequire(require("lodash/lang/isFunction"));var traverse=_interopRequire(require("../traversal"));var isObject=_interopRequire(require("lodash/lang/isObject"));var assign=_interopRequire(require("lodash/object/assign"));var acorn=_interopRequireWildcard(require("../../acorn"));var File=_interopRequire(require("./file"));var each=_interopRequire(require("lodash/collection/each"));var Transformer=function(){function Transformer(transformerKey,transformer,opts){_classCallCheck(this,Transformer);transformer=assign({},transformer);var take=function take(key){var val=transformer[key];delete transformer[key];return val};this.manipulateOptions=take("manipulateOptions");this.metadata=take("metadata")||{};this.parser=take("parser");this.check=take("check");this.post=take("post");this.pre=take("pre");if(this.metadata.stage!=null){this.metadata.optional=true}this.handlers=this.normalize(transformer);var _ref=this;if(!_ref.opts)_ref.opts={};this.key=transformerKey}Transformer.prototype.normalize=function normalize(transformer){var _this=this;if(isFunction(transformer)){transformer={ast:transformer}}traverse.explode(transformer);each(transformer,function(fns,type){if(type[0]==="_"){_this[type]=fns;return}if(type==="enter"||type==="exit")return;if(isFunction(fns))fns={enter:fns};if(!isObject(fns))return;if(!fns.enter)fns.enter=function(){};if(!fns.exit)fns.exit=function(){};transformer[type]=fns});return transformer};Transformer.prototype.buildPass=function buildPass(file){if(!(file instanceof File)){throw new TypeError("Transformer "+this.key+" is resolving to a different Babel version to what is doing the actual transformation...")}return new TransformerPass(file,this)};return Transformer}();module.exports=Transformer},{"../../acorn":5,"../traversal":144,"./file":46,"./transformer-pass":75,"lodash/collection/each":316,"lodash/lang/isFunction":395,"lodash/lang/isObject":398,"lodash/object/assign":404}],77:[function(require,module,exports){module.exports={useStrict:"strict","es5.runtime":"runtime","es6.runtime":"runtime"}},{}],78:[function(require,module,exports){module.exports={selfContained:"runtime","unicode-regex":"regex.unicode","spec.typeofSymbol":"es6.spec.symbols","es6.symbols":"es6.spec.symbols","es6.blockScopingTDZ":"es6.spec.blockScoping","minification.deadCodeElimination":"utility.deadCodeElimination","minification.removeConsoleCalls":"utility.removeConsole","minification.removeDebugger":"utility.removeDebugger"}},{}],79:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.MemberExpression=MemberExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function MemberExpression(node){var prop=node.property;if(node.computed&&t.isLiteral(prop)&&t.isValidIdentifier(prop.value)){node.property=t.identifier(prop.value);node.computed=false}else if(!node.computed&&t.isIdentifier(prop)&&!t.isValidIdentifier(prop.name)){node.property=t.literal(prop.name);node.computed=true}}},{"../../../types":153}],80:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.Property=Property;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function Property(node){var key=node.key;if(t.isLiteral(key)&&t.isValidIdentifier(key.value)){node.key=t.identifier(key.value);node.computed=false}else if(!node.computed&&t.isIdentifier(key)&&!t.isValidIdentifier(key.name)){node.key=t.literal(key.name)}}},{"../../../types":153}],81:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.check=check;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var defineMap=_interopRequireWildcard(require("../../helpers/define-map"));var t=_interopRequireWildcard(require("../../../types"));function check(node){return t.isProperty(node)&&(node.kind==="get"||node.kind==="set")}function ObjectExpression(node){var mutatorMap={};var hasAny=false;node.properties=node.properties.filter(function(prop){if(prop.kind==="get"||prop.kind==="set"){hasAny=true;defineMap.push(mutatorMap,prop.key,prop.kind,prop.computed,prop.value);return false}else{return true}});if(!hasAny)return;return t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("defineProperties")),[node,defineMap.toDefineObject(mutatorMap)])}},{"../../../types":153,"../../helpers/define-map":54}],82:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ArrowFunctionExpression=ArrowFunctionExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));var check=t.isArrowFunctionExpression;exports.check=check;function ArrowFunctionExpression(node){t.ensureBlock(node);node.expression=false;node.type="FunctionExpression";node.shadow=true;return node}},{"../../../types":153}],83:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.check=check;exports.VariableDeclaration=VariableDeclaration;exports.Loop=Loop;exports.BlockStatement=BlockStatement;exports.__esModule=true;var traverse=_interopRequire(require("../../../traversal"));var object=_interopRequire(require("../../../helpers/object"));var util=_interopRequireWildcard(require("../../../util"));var t=_interopRequireWildcard(require("../../../types"));var values=_interopRequire(require("lodash/object/values"));var extend=_interopRequire(require("lodash/object/extend"));function isLet(node,parent){if(!t.isVariableDeclaration(node))return false;if(node._let)return true;if(node.kind!=="let")return false;if(isLetInitable(node,parent)){for(var i=0;i=0){return}loopText=""+loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(this.isReturnStatement()){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);return t.inherits(replace,node)}}};var BlockScoping=function(){function BlockScoping(loopPath,blockPath,parent,scope,file){_classCallCheck(this,BlockScoping);this.parent=parent;this.scope=scope;this.file=file;this.blockPath=blockPath;this.block=blockPath.node;this.outsideLetReferences=object();this.hasLetReferences=false;this.letReferences=this.block._letReferences=object();this.body=[];if(loopPath){this.loopParent=loopPath.parent;this.loopLabel=t.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=loopPath;this.loop=loopPath.node}}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}if(this.loopLabel&&!t.isLabeledStatement(this.loopParent)){return t.labeledStatement(this.loopLabel,this.loop)}};BlockScoping.prototype.remap=function remap(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=object();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loop=this.loop;if(loop){traverseReplace(loop.right,loop,scope,remaps);traverseReplace(loop.test,loop,scope,remaps);traverseReplace(loop.update,loop,scope,remaps)}this.blockPath.traverse(replaceVisitor,remaps)};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loop){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=values(outsideRefs);var args=values(outsideRefs);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn.shadow=true;this.addContinuations(fn);block.body=this.body;var ref=fn;if(this.loop){ref=this.scope.generateUidIdentifier("loop");this.loopPath.insertBefore(t.variableDeclaration("var",[t.variableDeclarator(ref,fn)]))}var call=t.callExpression(ref,args);var ret=this.scope.generateUidIdentifier("ret");var hasYield=traverse.hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=traverse.hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call)}this.buildClosure(ret,call)};BlockScoping.prototype.buildClosure=function buildClosure(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.addContinuations=function addContinuations(fn){var state={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(fn,continuationVisitor,state);for(var i=0;i=spreadPropIndex)break;if(t.isSpreadProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key)&&!prop.computed)key=t.literal(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef)}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[objRef])))}if(pattern.properties.length>1&&t.isMemberExpression(objRef)){var temp=this.scope.generateUidBasedOnNode(objRef,this.file);this.nodes.push(this.buildVariableDeclaration(temp,objRef)); - -objRef=temp}for(var i=0;iarr.elements.length)return;if(pattern.elements.length0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.literal(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){var shouldMemoise=true;if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)){var memo=this.scope.generateMemoisedReference(ref,true);if(memo){this.nodes.push(this.buildVariableDeclaration(memo,ref));ref=memo}}this.push(pattern,ref);return this.nodes};return DestructuringTransformer}()},{"../../../messages":43,"../../../types":153}],87:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ForOfStatement=ForOfStatement;exports._ForOfStatementArray=_ForOfStatementArray;exports.__esModule=true;var messages=_interopRequireWildcard(require("../../../messages"));var util=_interopRequireWildcard(require("../../../util"));var t=_interopRequireWildcard(require("../../../types"));var check=t.isForOfStatement;exports.check=check;function ForOfStatement(node,parent,scope,file){if(this.get("right").isArrayExpression()){return _ForOfStatementArray.call(this,node,scope,file)}var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,file);var declar=build.declar;var loop=build.loop;var block=loop.body;t.inheritsComments(loop,node);t.ensureBlock(node);if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);if(build.replaceParent){this.parentPath.replaceWithMultiple(build.node);this.remove()}else{this.replaceWithMultiple(build.node)}}function _ForOfStatementArray(node,scope,file){var nodes=[];var right=node.right;if(!t.isIdentifier(right)||!scope.hasBinding(right.name)){var uid=scope.generateUidIdentifier("arr");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,right)]));right=uid}var iterationKey=scope.generateUidIdentifier("i");var loop=util.template("for-of-array",{BODY:node.body,KEY:iterationKey,ARR:right});t.inherits(loop,node);t.ensureBlock(loop);var iterationValue=t.memberExpression(right,iterationKey,true);var left=node.left;if(t.isVariableDeclaration(left)){left.declarations[0].init=iterationValue;loop.body.body.unshift(left)}else{loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=",left,iterationValue)))}nodes.push(loop);return nodes}var loose=function loose(node,parent,scope,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=util.template("for-of-loose",{LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,node:loop,loop:loop}};var spec=function spec(node,parent,scope,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=util.template("for-of",{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}}},{"../../../messages":43,"../../../types":153,"../../../util":157}],88:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ImportDeclaration=ImportDeclaration;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));exports.check=require("../internal/modules").check;function keepBlockHoist(node,nodes){if(node._blockHoist){for(var i=0;i",len,start),t.binaryExpression("-",len,start),t.literal(0))}var loop=util.template("rest",{ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}},{"../../../types":153,"../../../util":157,"lodash/lang/isNumber":397}],92:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.check=check;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function loose(node,body,objId){for(var i=0;i0){var declarations=flatten(map(this.vars,function(decl){return decl.declarations},this));var assignment=reduceRight(declarations,function(expr,decl){return t.assignmentExpression("=",decl.id,expr)},t.identifier("undefined"));var statement=t.expressionStatement(assignment);statement._blockHoist=Infinity;body.unshift(statement)}var paramDecls=this.paramDecls;if(paramDecls.length>0){body.unshift(t.variableDeclaration("var",paramDecls))}body.unshift(t.expressionStatement(t.assignmentExpression("=",this.getAgainId(),t.literal(false))));node.body=util.template("tail-call-body",{AGAIN_ID:this.getAgainId(),THIS_ID:this.thisId,ARGUMENTS_ID:this.argumentsId,FUNCTION_ID:this.getFunctionId(),BLOCK:node.body});var topVars=[];if(this.needsThis){topVars.push(t.variableDeclarator(this.getThisId(),t.thisExpression()))}if(this.needsArguments||this.setsArguments){var decl=t.variableDeclarator(this.getArgumentsId());if(this.needsArguments){decl.init=t.identifier("arguments")}topVars.push(decl)}var leftId=this.leftId;if(leftId){topVars.push(t.variableDeclarator(leftId))}if(topVars.length>0){node.body.body.unshift(t.variableDeclaration("var",topVars))}};TailCallTransformer.prototype.subTransform=function subTransform(node){if(!node)return;var handler=this["subTransform"+node.type];if(handler)return handler.call(this,node)};TailCallTransformer.prototype.subTransformConditionalExpression=function subTransformConditionalExpression(node){var callConsequent=this.subTransform(node.consequent);var callAlternate=this.subTransform(node.alternate);if(!callConsequent&&!callAlternate){return}node.type="IfStatement";node.consequent=callConsequent?t.toBlock(callConsequent):returnBlock(node.consequent);if(callAlternate){node.alternate=t.isIfStatement(callAlternate)?callAlternate:t.toBlock(callAlternate)}else{node.alternate=returnBlock(node.alternate)}return[node]};TailCallTransformer.prototype.subTransformLogicalExpression=function subTransformLogicalExpression(node){var callRight=this.subTransform(node.right);if(!callRight)return;var leftId=this.getLeftId();var testExpr=t.assignmentExpression("=",leftId,node.left);if(node.operator==="&&"){testExpr=t.unaryExpression("!",testExpr)}return[t.ifStatement(testExpr,returnBlock(leftId))].concat(callRight)};TailCallTransformer.prototype.subTransformSequenceExpression=function subTransformSequenceExpression(node){var seq=node.expressions;var lastCall=this.subTransform(seq[seq.length-1]);if(!lastCall){return}if(--seq.length===1){node=seq[0]}return[t.expressionStatement(node)].concat(lastCall)};TailCallTransformer.prototype.subTransformCallExpression=function subTransformCallExpression(node){var callee=node.callee,thisBinding,args;if(t.isMemberExpression(callee,{computed:false})&&t.isIdentifier(callee.property)){switch(callee.property.name){case"call":args=t.arrayExpression(node.arguments.slice(1));break;case"apply":args=node.arguments[1]||t.identifier("undefined");break;default:return}thisBinding=node.arguments[0];callee=callee.object}if(!t.isIdentifier(callee)||!this.scope.bindingIdentifierEquals(callee.name,this.ownerId)){return}this.hasTailRecursion=true;if(this.hasDeopt())return;var body=[];if(!t.isThisExpression(thisBinding)){body.push(t.expressionStatement(t.assignmentExpression("=",this.getThisId(),thisBinding||t.identifier("undefined"))))}if(!args){args=t.arrayExpression(node.arguments); - -}var argumentsId=this.getArgumentsId();var params=this.getParams();body.push(t.expressionStatement(t.assignmentExpression("=",argumentsId,args)));var i,param;if(t.isArrayExpression(args)){var elems=args.elements;for(i=0;i1){var last=nodes[nodes.length-1];if(t.isLiteral(last,{value:""}))nodes.pop();var root=buildBinaryExpression(nodes.shift(),nodes.shift());for(i=0;i=1){nodes.push(node)}return nodes}},{"../../../types":153}],109:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.manipulateOptions=manipulateOptions;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));var metadata={stage:1};exports.metadata=metadata;function manipulateOptions(opts){if(opts.whitelist)opts.whitelist.push("es6.destructuring")}var hasSpread=function hasSpread(node){for(var i=0;i3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}var msg;if(closest){msg=messages.get("undeclaredVariableSuggestion",node.name,closest)}else{msg=messages.get("undeclaredVariable",node.name)}throw file.errorWithNode(node,msg,ReferenceError)}},{"../../../messages":43,leven:307}],142:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var t=_interopRequireWildcard(require("../types"));var Binding=function(){function Binding(_ref){var identifier=_ref.identifier;var scope=_ref.scope;var path=_ref.path;var kind=_ref.kind;_classCallCheck(this,Binding);this.identifier=identifier;this.constant=true;this.scope=scope;this.path=path;this.kind=kind}Binding.prototype.setTypeAnnotation=function setTypeAnnotation(){var typeInfo=this.path.getTypeAnnotation();this.typeAnnotationInferred=typeInfo.inferred;this.typeAnnotation=typeInfo.annotation};Binding.prototype.isTypeGeneric=function isTypeGeneric(){var _path;return(_path=this.path).isTypeGeneric.apply(_path,arguments)};Binding.prototype.assignTypeGeneric=function assignTypeGeneric(type,params){var typeParams=null;if(params)params=t.typeParameterInstantiation(params);this.assignType(t.genericTypeAnnotation(t.identifier(type),typeParams))};Binding.prototype.assignType=function assignType(type){this.typeAnnotation=type};Binding.prototype.reassign=function reassign(){this.constant=false;if(this.typeAnnotationInferred){this.typeAnnotation=null}};Binding.prototype.isCompatibleWithType=function isCompatibleWithType(newType){return false};return Binding}();module.exports=Binding},{"../types":153}],143:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var TraversalPath=_interopRequire(require("./path"));var compact=_interopRequire(require("lodash/array/compact"));var t=_interopRequireWildcard(require("../types"));var TraversalContext=function(){function TraversalContext(scope,opts,state,parentPath){_classCallCheck(this,TraversalContext);this.parentPath=parentPath;this.scope=scope;this.state=state;this.opts=opts}TraversalContext.prototype.create=function create(node,obj,key){return TraversalPath.get(this.parentPath,this,node,obj,key)};TraversalContext.prototype.visitMultiple=function visitMultiple(nodes,node,key){if(nodes.length===0)return false;var visited=[];var queue=this.queue=[];var stop=false;for(var i=0;i=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}}for(var i=0;i":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right}}confident=false}}},{}],147:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var react=_interopRequireWildcard(require("../../transformation/helpers/react"));var t=_interopRequireWildcard(require("../../types"));var referenceVisitor={enter:function enter(node,parent,scope,state){if(this.isJSXIdentifier()&&react.isCompatTag(node.name)){return}if(this.isJSXIdentifier()||this.isIdentifier()){if(this.isReferenced()){var bindingInfo=scope.getBinding(node.name);if(bindingInfo!==state.scope.getBinding(node.name))return;if(bindingInfo&&bindingInfo.constant){state.bindings[node.name]=bindingInfo}else{scope.dump();state.foundIncompatible=true;this.stop()}}}}};var PathHoister=function(){function PathHoister(path,scope){_classCallCheck(this,PathHoister);this.foundIncompatible=false;this.bindings={};this.scope=scope;this.scopes=[];this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var checkScope=this.path.scope;do{if(this.isCompatibleScope(checkScope)){this.scopes.push(checkScope)}else{break}}while(checkScope=checkScope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(scope.path.isFunction()){if(this.hasNonParamBindings()){return this.getNextScopeStatementParent()}else{return scope.path.get("body").get("body")[0]}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasNonParamBindings=function hasNonParamBindings(){for(var name in this.bindings){var binding=this.bindings[name];if(binding.kind!=="param")return true}return false};PathHoister.prototype.run=function run(){this.path.traverse(referenceVisitor,this);if(this.foundIncompatible)return;this.getCompatibleScopes();var path=this.getAttachmentPath();if(!path)return;var uid=path.scope.generateUidIdentifier("ref");path.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);this.path.replaceWith(uid)};return PathHoister}();module.exports=PathHoister},{"../../transformation/helpers/react":58,"../../types":153}],148:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _createClass=function(){function defineProperties(target,props){for(var key in props){var prop=props[key];prop.configurable=true;if(prop.value)prop.writable=true}Object.defineProperties(target,props)}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var PathHoister=_interopRequire(require("./hoister"));var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var isRegExp=_interopRequire(require("lodash/lang/isRegExp"));var isString=_interopRequire(require("lodash/lang/isString"));var traverse=_interopRequire(require("../index"));var includes=_interopRequire(require("lodash/collection/includes"));var assign=_interopRequire(require("lodash/object/assign"));var extend=_interopRequire(require("lodash/object/extend"));var Scope=_interopRequire(require("../scope"));var t=_interopRequireWildcard(require("../../types"));var hoistVariablesVisitor={enter:function enter(node,parent,scope){if(this.isFunction()){return this.skip()}if(this.isVariableDeclaration()&&node.kind==="var"){var bindings=this.getBindingIdentifiers();for(var key in bindings){scope.push({id:bindings[key]})}var exprs=[];for(var i=0;i=fromIndex){path.key+=incrementBy}}};TraversalPath.prototype.setData=function setData(key,val){return this.data[key]=val};TraversalPath.prototype.getData=function getData(key,def){var val=this.data[key];if(!val&&def)val=this.data[key]=def;return val};TraversalPath.prototype.setScope=function setScope(file){this.scope=TraversalPath.getScope(this,this.context&&this.context.scope,file)};TraversalPath.prototype.clearContext=function clearContext(){this.context=null};TraversalPath.prototype.setContext=function setContext(parentPath,context,key,file){this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.parentPath=parentPath||this.parentPath;this.key=key;if(context){this.context=context;this.state=context.state;this.opts=context.opts}this.type=this.node&&this.node.type;this.setScope(file)};TraversalPath.prototype._remove=function _remove(){if(Array.isArray(this.container)){this.container.splice(this.key,1);this.updateSiblingKeys(this.key,-1)}else{this.container[this.key]=null}};TraversalPath.prototype.remove=function remove(){var removeParent=false;if(this.parentPath){if(!removeParent)removeParent=this.parentPath.isExpressionStatement();if(!removeParent)removeParent=this.parentPath.isSequenceExpression()&&this.parent.expressions.length===1;if(removeParent)return this.parentPath.remove()}this._remove();this.removed=true};TraversalPath.prototype.skip=function skip(){this.shouldSkip=true};TraversalPath.prototype.stop=function stop(){this.shouldStop=true;this.shouldSkip=true};TraversalPath.prototype.errorWithNode=function errorWithNode(msg){var Error=arguments[1]===undefined?SyntaxError:arguments[1];var loc=this.node.loc.start;var err=new Error("Line "+loc.line+": "+msg);err.loc=loc;return err};TraversalPath.prototype.replaceInline=function replaceInline(nodes){if(Array.isArray(nodes)){if(Array.isArray(this.container)){nodes=this._verifyNodeList(nodes);this._containerInsertAfter(nodes);return this.remove()}else{return this.replaceWithMultiple(nodes)}}else{return this.replaceWith(nodes)}};TraversalPath.prototype._verifyNodeList=function _verifyNodeList(nodes){if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;i-1};TraversalPath.prototype.visit=function visit(){if(this.isBlacklisted())return false;this.call("enter");if(this.shouldSkip){return this.shouldStop}var node=this.node;var opts=this.opts;if(node){if(Array.isArray(node)){for(var i=0;iparts.length;i++){var part=parts[i];if(part==="."){path=path.parentPath}else{path=path.get(parts[i])}}return path}};TraversalPath.prototype.has=function has(key){return!!this.node[key]};TraversalPath.prototype.is=function is(key){return this.has(key)};TraversalPath.prototype.isnt=function isnt(key){return!this.has(key)};TraversalPath.prototype.getTypeAnnotation=function getTypeAnnotation(){if(this.typeInfo){return this.typeInfo}var info=this.typeInfo={inferred:false,annotation:null};var type=this.node.typeAnnotation;if(!type){info.inferred=true;type=this.inferType(this)}if(type){if(t.isTypeAnnotation(type))type=type.typeAnnotation;info.annotation=type}return info};TraversalPath.prototype.resolve=function resolve(){if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve()}else{}}else if(this.isIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding||!binding.constant)return;return;if(binding.path===this){return this}else{return binding.path.resolve()}}else if(this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve();if(!target||!target.isObjectExpression())return;var props=target.get("properties");for(var i=0;iparts.length){return false}}return true};_createClass(TraversalPath,{node:{get:function(){if(this.removed){return null}else{return this.container[this.key]}},set:function(replacement){throw new Error("Don't use `path.node = newNode;`, use `path.replaceWith(newNode)` or `path.replaceWithMultiple([newNode])`")}}});return TraversalPath}();module.exports=TraversalPath;assign(TraversalPath.prototype,require("./evaluation"));assign(TraversalPath.prototype,require("./conversion"));for(var i=0;i1)id+=i;return"_"+id};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.file.uids[name])return true;scope=scope.parent}while(scope);return false};Scope.prototype.generateUidBasedOnNode=function generateUidBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function(_add){var _addWrapper=function add(_x){return _add.apply(this,arguments)};_addWrapper.toString=function(){return _add.toString()};return _addWrapper}(function(node){if(t.isModuleDeclaration(node)){if(node.specifiers&&node.specifiers.length){for(var i=0;i-1;return false}each(t.VISITOR_KEYS,function(keys,type){if(t.BUILDER_KEYS[type])return;var defs={};each(keys,function(key){defs[key]=null});t.BUILDER_KEYS[type]=defs});each(t.BUILDER_KEYS,function(keys,type){t[type[0].toLowerCase()+type.slice(1)]=function(){var node={};node.start=null;node.type=type;var i=0;for(var key in keys){var arg=arguments[i++];if(arg===undefined)arg=keys[key];node[key]=arg}return node}});function shallowEqual(actual,expected){var keys=Object.keys(expected);for(var i=0;iparts.length){return false}}return true}}function removeComments(child){each(COMMENT_KEYS,function(key){delete child[key]});return child}function inheritsComments(child,parent){if(child&&parent){each(COMMENT_KEYS,function(key){child[key]=uniq(compact([].concat(child[key],parent[key])))})}return child}function inherits(child,parent){if(!child||!parent)return child;child._declarations=parent._declarations;child._scopeInfo=parent._scopeInfo;child.range=parent.range;child.start=parent.start;child.loc=parent.loc;child.end=parent.end;child.typeAnnotation=parent.typeAnnotation;child.returnType=parent.returnType;t.inheritsComments(child,parent);return child}toFastProperties(t);toFastProperties(t.VISITOR_KEYS);exports.__esModule=true;assign(t,require("./retrievers"));assign(t,require("./validators"));assign(t,require("./converters"))},{"./alias-keys":150,"./builder-keys":151,"./converters":152,"./retrievers":154,"./validators":155,"./visitor-keys":156,"lodash/array/compact":310,"lodash/array/uniq":314,"lodash/collection/each":316,"lodash/object/assign":404,"to-fast-properties":452}],154:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.getBindingIdentifiers=getBindingIdentifiers;exports.getLastStatements=getLastStatements;exports.__esModule=true;var object=_interopRequire(require("../helpers/object"));var t=_interopRequireWildcard(require("./index"));function getBindingIdentifiers(node){var search=[].concat(node);var ids=object();while(search.length){var id=search.shift();if(!id)continue;var keys=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){ids[id.name]=id}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(keys){for(var i=0;i1)return ast.body;var node=ast.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}}function parseTemplate(loc,code){var ast=parse({filename:loc,looseModules:true},code).program;ast=traverse.removeProperties(ast);return ast}function loadTemplates(){var templates={};var templatesLoc=path.join(__dirname,"transformation/templates");if(!fs.existsSync(templatesLoc)){throw new ReferenceError(messages.get("missingTemplatesDirectory"))}each(fs.readdirSync(templatesLoc),function(name){if(name[0]===".")return;var key=path.basename(name,path.extname(name));var loc=path.join(templatesLoc,name);var code=fs.readFileSync(loc,"utf8");templates[key]=parseTemplate(loc,code)});return templates}try{exports.templates=require("../../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}}).call(this,require("_process"),"/lib/babel")},{"../../templates.json":455,"./helpers/parse":42,"./messages":43,"./patch":44,"./traversal":144,"./types":153,_process:183,"debug/node":293,fs:172,"lodash/collection/contains":315,"lodash/collection/each":316,"lodash/lang/cloneDeep":390,"lodash/lang/isBoolean":393,"lodash/lang/isEmpty":394,"lodash/lang/isRegExp":400,"lodash/lang/isString":401,"lodash/object/has":407,"lodash/string/escapeRegExp":412,minimatch:416,module:172,path:182,util:199}],158:[function(require,module,exports){var types=require("../lib/types");var Type=types.Type;var def=Type.def;var or=Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var isRegExp=builtin.RegExp;var shared=require("../lib/shared");var defaults=shared.defaults;var geq=shared.geq;def("Printable").field("loc",or(def("SourceLocation"),null),defaults["null"],true);def("Node").bases("Printable").field("type",isString).field("comments",or([def("Comment")],null),defaults["null"],true);def("SourceLocation").build("start","end","source").field("start",def("Position")).field("end",def("Position")).field("source",or(isString,null),defaults["null"]);def("Position").build("line","column").field("line",geq(1)).field("column",geq(0));def("Program").bases("Node").build("body").field("body",[def("Statement")]);def("Function").bases("Node").field("id",or(def("Identifier"),null),defaults["null"]).field("params",[def("Pattern")]).field("body",def("BlockStatement"));def("Statement").bases("Node");def("EmptyStatement").bases("Statement").build();def("BlockStatement").bases("Statement").build("body").field("body",[def("Statement")]);def("ExpressionStatement").bases("Statement").build("expression").field("expression",def("Expression"));def("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Statement")).field("alternate",or(def("Statement"),null),defaults["null"]);def("LabeledStatement").bases("Statement").build("label","body").field("label",def("Identifier")).field("body",def("Statement"));def("BreakStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("ContinueStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("WithStatement").bases("Statement").build("object","body").field("object",def("Expression")).field("body",def("Statement"));def("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",def("Expression")).field("cases",[def("SwitchCase")]).field("lexical",isBoolean,defaults["false"]);def("ReturnStatement").bases("Statement").build("argument").field("argument",or(def("Expression"),null));def("ThrowStatement").bases("Statement").build("argument").field("argument",def("Expression"));def("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",def("BlockStatement")).field("handler",or(def("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[def("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[def("CatchClause")],defaults.emptyArray).field("finalizer",or(def("BlockStatement"),null),defaults["null"]);def("CatchClause").bases("Node").build("param","guard","body").field("param",def("Pattern")).field("guard",or(def("Expression"),null),defaults["null"]).field("body",def("BlockStatement"));def("WhileStatement").bases("Statement").build("test","body").field("test",def("Expression")).field("body",def("Statement"));def("DoWhileStatement").bases("Statement").build("body","test").field("body",def("Statement")).field("test",def("Expression"));def("ForStatement").bases("Statement").build("init","test","update","body").field("init",or(def("VariableDeclaration"),def("Expression"),null)).field("test",or(def("Expression"),null)).field("update",or(def("Expression"),null)).field("body",def("Statement"));def("ForInStatement").bases("Statement").build("left","right","body","each").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement")).field("each",isBoolean);def("DebuggerStatement").bases("Statement").build();def("Declaration").bases("Statement");def("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",def("Identifier"));def("FunctionExpression").bases("Function","Expression").build("id","params","body");def("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",or("var","let","const")).field("declarations",[or(def("VariableDeclarator"),def("Identifier"))]);def("VariableDeclarator").bases("Node").build("id","init").field("id",def("Pattern")).field("init",or(def("Expression"),null));def("Expression").bases("Node","Pattern");def("ThisExpression").bases("Expression").build();def("ArrayExpression").bases("Expression").build("elements").field("elements",[or(def("Expression"),null)]);def("ObjectExpression").bases("Expression").build("properties").field("properties",[def("Property")]);def("Property").bases("Node").build("kind","key","value").field("kind",or("init","get","set")).field("key",or(def("Literal"),def("Identifier"))).field("value",or(def("Expression"),def("Pattern")));def("SequenceExpression").bases("Expression").build("expressions").field("expressions",[def("Expression")]);var UnaryOperator=or("-","+","!","~","typeof","void","delete");def("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",UnaryOperator).field("argument",def("Expression")).field("prefix",isBoolean,defaults["true"]);var BinaryOperator=or("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");def("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",BinaryOperator).field("left",def("Expression")).field("right",def("Expression"));var AssignmentOperator=or("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");def("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",AssignmentOperator).field("left",def("Pattern")).field("right",def("Expression"));var UpdateOperator=or("++","--");def("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",UpdateOperator).field("argument",def("Expression")).field("prefix",isBoolean);var LogicalOperator=or("||","&&");def("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",LogicalOperator).field("left",def("Expression")).field("right",def("Expression"));def("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Expression")).field("alternate",def("Expression"));def("NewExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("CallExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("MemberExpression").bases("Expression").build("object","property","computed").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("Pattern").bases("Node");def("ObjectPattern").bases("Pattern").build("properties").field("properties",[or(def("PropertyPattern"),def("Property"))]);def("PropertyPattern").bases("Pattern").build("key","pattern").field("key",or(def("Literal"),def("Identifier"))).field("pattern",def("Pattern"));def("ArrayPattern").bases("Pattern").build("elements").field("elements",[or(def("Pattern"),null)]);def("SwitchCase").bases("Node").build("test","consequent").field("test",or(def("Expression"),null)).field("consequent",[def("Statement")]);def("Identifier").bases("Node","Expression","Pattern").build("name").field("name",isString);def("Literal").bases("Node","Expression").build("value").field("value",or(isString,isBoolean,null,isNumber,isRegExp));def("Comment").bases("Printable").field("value",isString).field("leading",isBoolean,defaults["true"]).field("trailing",isBoolean,defaults["false"]);def("Block").bases("Comment").build("value","leading","trailing");def("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":169,"../lib/types":170}],159:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;def("XMLDefaultDeclaration").bases("Declaration").field("namespace",def("Expression"));def("XMLAnyName").bases("Expression");def("XMLQualifiedIdentifier").bases("Expression").field("left",or(def("Identifier"),def("XMLAnyName"))).field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLAttributeSelector").bases("Expression").field("attribute",def("Expression"));def("XMLFilterExpression").bases("Expression").field("left",def("Expression")).field("right",def("Expression"));def("XMLElement").bases("XML","Expression").field("contents",[def("XML")]);def("XMLList").bases("XML","Expression").field("contents",[def("XML")]);def("XML").bases("Node");def("XMLEscape").bases("XML").field("expression",def("Expression"));def("XMLText").bases("XML").field("text",isString);def("XMLStartTag").bases("XML").field("contents",[def("XML")]);def("XMLEndTag").bases("XML").field("contents",[def("XML")]);def("XMLPointTag").bases("XML").field("contents",[def("XML")]);def("XMLName").bases("XML").field("contents",or(isString,[def("XML")]));def("XMLAttribute").bases("XML").field("value",isString);def("XMLCdata").bases("XML").field("contents",isString);def("XMLComment").bases("XML").field("contents",isString);def("XMLProcessingInstruction").bases("XML").field("target",isString).field("contents",or(isString,null))},{"../lib/types":170,"./core":158}],160:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var isObject=builtin.object; +}};DefaultFormatter.prototype.exportAllDeclaration=function exportAllDeclaration(node,nodes){var ref=this.getExternalReference(node,nodes);nodes.push(this.buildExportsWildcard(ref,node))};DefaultFormatter.prototype.isLoose=function isLoose(){return this.file.isLoose("es6.modules")};DefaultFormatter.prototype.exportSpecifier=function exportSpecifier(specifier,node,nodes){if(node.source){var ref=this.getExternalReference(node,nodes);if(specifier.local.name==="default"&&!this.noInteropRequireExport){ref=t.callExpression(this.file.addHelper("interop-require"),[ref])}else{ref=t.memberExpression(ref,specifier.local);if(!this.isLoose()){nodes.push(this.buildExportsFromAssignment(specifier.exported,ref,node));return}}nodes.push(this.buildExportsAssignment(specifier.exported,ref,node))}else{nodes.push(this.buildExportsAssignment(specifier.exported,specifier.local,node))}};DefaultFormatter.prototype.buildExportsWildcard=function buildExportsWildcard(objectIdentifier){return t.expressionStatement(t.callExpression(this.file.addHelper("defaults"),[t.identifier("exports"),t.callExpression(this.file.addHelper("interop-require-wildcard"),[objectIdentifier])]))};DefaultFormatter.prototype.buildExportsFromAssignment=function buildExportsFromAssignment(id,init){this.checkExportIdentifier(id);return util.template("exports-from-assign",{INIT:init,ID:t.literal(id.name)},true)};DefaultFormatter.prototype.buildExportsAssignment=function buildExportsAssignment(id,init){this.checkExportIdentifier(id);return util.template("exports-assign",{VALUE:init,KEY:id},true)};DefaultFormatter.prototype.exportDeclaration=function exportDeclaration(node,nodes){var declar=node.declaration;var id=declar.id;if(t.isExportDefaultDeclaration(node)){id=t.identifier("default")}var assign;if(t.isVariableDeclaration(declar)){for(var i=0;i=opts.stage)return true;if(transformer.metadata.optional&&!includes(opts.optional,key))return false;return true};TransformerPass.prototype.checkNode=function checkNode(node){var check=this.transformer.check;if(check){return this.shouldRun=check(node)}else{return true}};TransformerPass.prototype.transform=function transform(){if(!this.shouldRun)return;var file=this.file;file.log.debug("Running transformer "+this.transformer.key);traverse(file.ast,this.handlers,file.scope,file);this.ran=true};return TransformerPass}();module.exports=TransformerPass},{"../traversal":144,"lodash/collection/includes":319}],76:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var TransformerPass=_interopRequire(require("./transformer-pass"));var isFunction=_interopRequire(require("lodash/lang/isFunction"));var traverse=_interopRequire(require("../traversal"));var isObject=_interopRequire(require("lodash/lang/isObject"));var assign=_interopRequire(require("lodash/object/assign"));var acorn=_interopRequireWildcard(require("../../acorn"));var File=_interopRequire(require("./file"));var each=_interopRequire(require("lodash/collection/each"));var Transformer=function(){function Transformer(transformerKey,transformer,opts){_classCallCheck(this,Transformer);transformer=assign({},transformer);var take=function take(key){var val=transformer[key];delete transformer[key];return val};this.manipulateOptions=take("manipulateOptions");this.metadata=take("metadata")||{};this.parser=take("parser");this.check=take("check");this.post=take("post");this.pre=take("pre");if(this.metadata.stage!=null){this.metadata.optional=true}this.handlers=this.normalize(transformer);var _ref=this;if(!_ref.opts)_ref.opts={};this.key=transformerKey}Transformer.prototype.normalize=function normalize(transformer){var _this=this;if(isFunction(transformer)){transformer={ast:transformer}}traverse.explode(transformer);each(transformer,function(fns,type){if(type[0]==="_"){_this[type]=fns;return}if(type==="enter"||type==="exit")return;if(isFunction(fns))fns={enter:fns};if(!isObject(fns))return;if(!fns.enter)fns.enter=function(){};if(!fns.exit)fns.exit=function(){};transformer[type]=fns});return transformer};Transformer.prototype.buildPass=function buildPass(file){if(!(file instanceof File)){throw new TypeError("Transformer "+this.key+" is resolving to a different Babel version to what is doing the actual transformation...")}return new TransformerPass(file,this)};return Transformer}();module.exports=Transformer},{"../../acorn":5,"../traversal":144,"./file":46,"./transformer-pass":75,"lodash/collection/each":316,"lodash/lang/isFunction":395,"lodash/lang/isObject":398,"lodash/object/assign":404}],77:[function(require,module,exports){module.exports={useStrict:"strict","es5.runtime":"runtime","es6.runtime":"runtime"}},{}],78:[function(require,module,exports){module.exports={selfContained:"runtime","unicode-regex":"regex.unicode","spec.typeofSymbol":"es6.spec.symbols","es6.symbols":"es6.spec.symbols","es6.blockScopingTDZ":"es6.spec.blockScoping","minification.deadCodeElimination":"utility.deadCodeElimination","minification.removeConsoleCalls":"utility.removeConsole","minification.removeDebugger":"utility.removeDebugger"}},{}],79:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.MemberExpression=MemberExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function MemberExpression(node){var prop=node.property;if(node.computed&&t.isLiteral(prop)&&t.isValidIdentifier(prop.value)){node.property=t.identifier(prop.value);node.computed=false}else if(!node.computed&&t.isIdentifier(prop)&&!t.isValidIdentifier(prop.name)){node.property=t.literal(prop.name);node.computed=true}}},{"../../../types":153}],80:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.Property=Property;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function Property(node){var key=node.key;if(t.isLiteral(key)&&t.isValidIdentifier(key.value)){node.key=t.identifier(key.value);node.computed=false}else if(!node.computed&&t.isIdentifier(key)&&!t.isValidIdentifier(key.name)){node.key=t.literal(key.name)}}},{"../../../types":153}],81:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.check=check;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var defineMap=_interopRequireWildcard(require("../../helpers/define-map"));var t=_interopRequireWildcard(require("../../../types"));function check(node){return t.isProperty(node)&&(node.kind==="get"||node.kind==="set")}function ObjectExpression(node){var mutatorMap={};var hasAny=false;node.properties=node.properties.filter(function(prop){if(prop.kind==="get"||prop.kind==="set"){hasAny=true;defineMap.push(mutatorMap,prop.key,prop.kind,prop.computed,prop.value);return false}else{return true}});if(!hasAny)return;return t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("defineProperties")),[node,defineMap.toDefineObject(mutatorMap)])}},{"../../../types":153,"../../helpers/define-map":54}],82:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ArrowFunctionExpression=ArrowFunctionExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));var check=t.isArrowFunctionExpression;exports.check=check;function ArrowFunctionExpression(node){t.ensureBlock(node);node.expression=false;node.type="FunctionExpression";node.shadow=true;return node}},{"../../../types":153}],83:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.check=check;exports.VariableDeclaration=VariableDeclaration;exports.Loop=Loop;exports.BlockStatement=BlockStatement;exports.__esModule=true;var traverse=_interopRequire(require("../../../traversal"));var object=_interopRequire(require("../../../helpers/object"));var util=_interopRequireWildcard(require("../../../util"));var t=_interopRequireWildcard(require("../../../types"));var values=_interopRequire(require("lodash/object/values"));var extend=_interopRequire(require("lodash/object/extend"));function isLet(node,parent){if(!t.isVariableDeclaration(node))return false;if(node._let)return true;if(node.kind!=="let")return false;if(isLetInitable(node,parent)){for(var i=0;inp){return true}if(pp===np&&this.name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&this.name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&parent.callee===node;case"ConditionalExpression":return this.name==="test"&&parent.test===node;case"MemberExpression":return this.name==="object"&&parent.object===node;default:return false}default:if(parent.type==="NewExpression"&&this.name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}NPp.canBeFirstInStatement=function(){var node=this.node;return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};NPp.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(path){for(var node,parent;path.parent;path=path.parent){node=path.node;parent=path.parent.node;if(n.BlockStatement.check(parent)&&path.parent.name==="body"&&path.name===0){assert.strictEqual(parent.body[0],node);return true}if(n.ExpressionStatement.check(parent)&&path.name==="expression"){assert.strictEqual(parent.expression,node);return true}if(n.SequenceExpression.check(parent)&&path.parent.name==="expressions"&&path.name===0){assert.strictEqual(parent.expressions[0],node);continue}if(n.CallExpression.check(parent)&&path.name==="callee"){assert.strictEqual(parent.callee,node);continue}if(n.MemberExpression.check(parent)&&path.name==="object"){assert.strictEqual(parent.object,node);continue}if(n.ConditionalExpression.check(parent)&&path.name==="test"){assert.strictEqual(parent.test,node);continue}if(isBinary(parent)&&path.name==="left"){assert.strictEqual(parent.left,node);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&path.name==="argument"){assert.strictEqual(parent.argument,node);continue}return false}return true}function cleanUpNodesAfterPrune(remainingNodePath){if(n.VariableDeclaration.check(remainingNodePath.node)){var declarations=remainingNodePath.get("declarations").value;if(!declarations||declarations.length===0){return remainingNodePath.prune()}}else if(n.ExpressionStatement.check(remainingNodePath.node)){if(!remainingNodePath.get("expression").value){return remainingNodePath.prune()}}else if(n.IfStatement.check(remainingNodePath.node)){cleanUpIfStatementAfterPrune(remainingNodePath)}return remainingNodePath}function cleanUpIfStatementAfterPrune(ifStatement){var testExpression=ifStatement.get("test").value;var alternate=ifStatement.get("alternate").value;var consequent=ifStatement.get("consequent").value;if(!consequent&&!alternate){var testExpressionStatement=b.expressionStatement(testExpression);ifStatement.replace(testExpressionStatement)}else if(!consequent&&alternate){var negatedTestExpression=b.unaryExpression("!",testExpression,true);if(n.UnaryExpression.check(testExpression)&&testExpression.operator==="!"){negatedTestExpression=testExpression.argument}ifStatement.get("test").replace(negatedTestExpression);ifStatement.get("consequent").replace(alternate);ifStatement.get("alternate").replace()}}module.exports=NodePath},{"./path":167,"./scope":168,"./types":170,assert:173,util:199}],166:[function(require,module,exports){var assert=require("assert");var types=require("./types");var NodePath=require("./node-path");var Printable=types.namedTypes.Printable;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isFunction=types.builtInTypes.function;var hasOwn=Object.prototype.hasOwnProperty;var undefined;function PathVisitor(){assert.ok(this instanceof PathVisitor);this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this._shouldVisitComments=hasOwn.call(this._methodNameTable,"Block")||hasOwn.call(this._methodNameTable,"Line");this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false}function computeMethodNameTable(visitor){var typeNames=Object.create(null);for(var methodName in visitor){if(/^visit[A-Z]/.test(methodName)){typeNames[methodName.slice("visit".length)]=true}}var supertypeTable=types.computeSupertypeLookupTable(typeNames);var methodNameTable=Object.create(null);var typeNames=Object.keys(supertypeTable);var typeNameCount=typeNames.length;for(var i=0;i=0){parentCache[path.name=i]=path}}else{parentValue[path.name]=path.value;parentCache[path.name]=path}assert.strictEqual(parentValue[path.name],path.value);assert.strictEqual(path.parentPath.get(path.name),path);return path}Pp.replace=function replace(replacement){var results=[];var parentValue=this.parentPath.value;var parentCache=getChildCache(this.parentPath);var count=arguments.length;repairRelationshipWithParent(this);if(isArray.check(parentValue)){var originalLength=parentValue.length;var move=getMoves(this.parentPath,count-1,this.name+1);var spliceArgs=[this.name,1];for(var i=0;i=than},isNumber+" >= "+than)};exports.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return false},"true":function(){return true},undefined:function(){}};var naiveIsPrimitive=Type.or(builtin.string,builtin.number,builtin.boolean,builtin.null,builtin.undefined);exports.isPrimitive=new Type(function(value){if(value===null)return true;var type=typeof value;return!(type==="object"||type==="function")},naiveIsPrimitive.toString())},{"../lib/types":170}],170:[function(require,module,exports){var assert=require("assert");var Ap=Array.prototype;var slice=Ap.slice;var map=Ap.map;var each=Ap.forEach;var Op=Object.prototype;var objToStr=Op.toString;var funObjStr=objToStr.call(function(){});var strObjStr=objToStr.call("");var hasOwn=Op.hasOwnProperty;function Type(check,name){var self=this;assert.ok(self instanceof Type,self);assert.strictEqual(objToStr.call(check),funObjStr,check+" is not a function");var nameObjStr=objToStr.call(name);assert.ok(nameObjStr===funObjStr||nameObjStr===strObjStr,name+" is neither a function nor a string");Object.defineProperties(self,{name:{value:name},check:{value:function(value,deep){var result=check.call(self,value,deep);if(!result&&deep&&objToStr.call(deep)===funObjStr)deep(self,value);return result}}})}var Tp=Type.prototype;exports.Type=Type;Tp.assert=function(value,deep){if(!this.check(value,deep)){var str=shallowStringify(value);assert.ok(false,str+" does not match type "+this);return false}return true};function shallowStringify(value){if(isObject.check(value))return"{"+Object.keys(value).map(function(key){return key+": "+value[key]}).join(", ")+"}";if(isArray.check(value))return"["+value.map(shallowStringify).join(", ")+"]";return JSON.stringify(value)}Tp.toString=function(){var name=this.name;if(isString.check(name))return name;if(isFunction.check(name))return name.call(this)+"";return name+" type"};var builtInTypes={};exports.builtInTypes=builtInTypes;function defBuiltInType(example,name){var objStr=objToStr.call(example);Object.defineProperty(builtInTypes,name,{enumerable:true,value:new Type(function(value){return objToStr.call(value)===objStr},name)});return builtInTypes[name]}var isString=defBuiltInType("","string");var isFunction=defBuiltInType(function(){},"function");var isArray=defBuiltInType([],"array");var isObject=defBuiltInType({},"object");var isRegExp=defBuiltInType(/./,"RegExp");var isDate=defBuiltInType(new Date,"Date");var isNumber=defBuiltInType(3,"number");var isBoolean=defBuiltInType(true,"boolean");var isNull=defBuiltInType(null,"null");var isUndefined=defBuiltInType(void 0,"undefined");function toType(from,name){if(from instanceof Type)return from;if(from instanceof Def)return from.type;if(isArray.check(from))return Type.fromArray(from);if(isObject.check(from))return Type.fromObject(from);if(isFunction.check(from))return new Type(from,name);return new Type(function(value){return value===from},isUndefined.check(name)?function(){return from+""}:name)}Type.or=function(){var types=[];var len=arguments.length;for(var i=0;i=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};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=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};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}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,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/":199}],174:[function(require,module,exports){arguments[4][172][0].apply(exports,arguments)},{dup:172}],175:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var kMaxLength=1073741823;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return arr.foo()===42&&typeof arr.subarray==="function"&&new Uint8Array(1).subarray(1,1).byteLength===0}catch(e){return false}}();function Buffer(subject,encoding){var self=this;if(!(self instanceof Buffer))return new Buffer(subject,encoding);var type=typeof subject;var length;if(type==="number"){length=+subject}else if(type==="string"){length=Buffer.byteLength(subject,encoding)}else if(type==="object"&&subject!==null){if(subject.type==="Buffer"&&isArray(subject.data))subject=subject.data;length=+subject.length}else{throw new TypeError("must start with number, buffer, array or string")}if(length>kMaxLength){throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength.toString(16)+" bytes")}if(length<0)length=0;else length>>>=0;if(Buffer.TYPED_ARRAY_SUPPORT){self=Buffer._augment(new Uint8Array(length))}else{self.length=length;self._isBuffer=true}var i;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof subject.byteLength==="number"){self._set(subject)}else if(isArrayish(subject)){if(Buffer.isBuffer(subject)){for(i=0;i0&&length<=Buffer.poolSize)self.parent=rootParent;return self}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;break;case"utf8":case"utf-8":ret=utf8ToBytes(str).length;break;case"base64":ret=base64ToBytes(str).length;break;default:ret=str.length}return ret};Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined;Buffer.prototype.toString=function toString(encoding,start,end){ -var loweredCase=false;start=start>>>0;end=end===undefined||end===Infinity?this.length:end>>>0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val)){return arrayIndexOf(this,val,byteOffset)}if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,val,byteOffset)}return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;for(var i=0;byteOffset+iremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;ithis.length){throw new RangeError("attempt to write outside buffer bounds")}var remaining=this.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}encoding=String(encoding||"utf8").toLowerCase();var ret;switch(encoding){case"hex":ret=hexWrite(this,string,offset,length);break;case"utf8":case"utf-8":ret=utf8Write(this,string,offset,length);break;case"ascii":ret=asciiWrite(this,string,offset,length);break;case"binary":ret=binaryWrite(this,string,offset,length);break;case"base64":ret=base64Write(this,string,offset,length);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=utf16leWrite(this,string,offset,length);break;default:throw new TypeError("Unknown encoding: "+encoding)}return ret};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end);for(var i=start;ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||valuebuf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i>>0&255}return offset+byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul>>>0&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||valuebuf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,target_start,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(target_start>=target.length)target_start=target.length;if(!target_start)target_start=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-target_start=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":176,ieee754:177,"is-array":178}],176:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],177:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=nBytes*8-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8);m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8);if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=nBytes*8-mLen-1,eMax=(1<>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8);e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=s*128}},{}],178:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],179:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;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(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i0&&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"){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};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;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}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{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.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};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}},{}],180:[function(require,module,exports){if(typeof Object.create==="function"){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{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],181:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],182:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--; +if(!_declar.init)_declar.init=t.identifier("undefined")}}node._let=true;node.kind="var";return true}function isLetInitable(node,parent){return!t.isFor(parent)||!t.isFor(parent,{left:node})}function isVar(node,parent){return t.isVariableDeclaration(node,{kind:"var"})&&!isLet(node,parent)}function standardizeLets(declars){for(var i=0;i=0){return}loopText=""+loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(this.isReturnStatement()){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);return t.inherits(replace,node)}}};var BlockScoping=function(){function BlockScoping(loopPath,blockPath,parent,scope,file){_classCallCheck(this,BlockScoping);this.parent=parent;this.scope=scope;this.file=file;this.blockPath=blockPath;this.block=blockPath.node;this.outsideLetReferences=object();this.hasLetReferences=false;this.letReferences=this.block._letReferences=object();this.body=[];if(loopPath){this.loopParent=loopPath.parent;this.loopLabel=t.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=loopPath;this.loop=loopPath.node}}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}if(this.loopLabel&&!t.isLabeledStatement(this.loopParent)){return t.labeledStatement(this.loopLabel,this.loop)}};BlockScoping.prototype.remap=function remap(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=object();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loop=this.loop;if(loop){traverseReplace(loop.right,loop,scope,remaps);traverseReplace(loop.test,loop,scope,remaps);traverseReplace(loop.update,loop,scope,remaps)}this.blockPath.traverse(replaceVisitor,remaps)};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loop){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=values(outsideRefs);var args=values(outsideRefs);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn.shadow=true;this.addContinuations(fn);block.body=this.body;var ref=fn;if(this.loop){ref=this.scope.generateUidIdentifier("loop");this.loopPath.insertBefore(t.variableDeclaration("var",[t.variableDeclarator(ref,fn)]))}var call=t.callExpression(ref,args);var ret=this.scope.generateUidIdentifier("ret");var hasYield=traverse.hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=traverse.hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call)}this.buildClosure(ret,call)};BlockScoping.prototype.buildClosure=function buildClosure(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.addContinuations=function addContinuations(fn){var state={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(fn,continuationVisitor,state);for(var i=0;i=spreadPropIndex)break;if(t.isSpreadProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key)&&!prop.computed)key=t.literal(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef)}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[objRef])))}if(pattern.properties.length>1&&t.isMemberExpression(objRef)){var temp=this.scope.generateUidBasedOnNode(objRef,this.file); -}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(isNaN(n)||util.isNull(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else return state.length}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(!util.isNumber(n)||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(util.isNull(ret)){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(!util.isNull(ret))this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(function(){maybeReadMore_(stream,state)})}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;process.nextTick(function(){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}})}}function forEach(xs,f){for(var i=0,l=xs.length;i1){var cbs=[];for(var c=0;c=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:175}],197:[function(require,module,exports){exports.isatty=function(){return false};function ReadStream(){throw new Error("tty.ReadStream is not implemented")}exports.ReadStream=ReadStream;function WriteStream(){throw new Error("tty.ReadStream is not implemented")}exports.WriteStream=WriteStream},{}],198:[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"}},{}],199:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;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=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}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;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]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+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){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}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=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}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");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-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]}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"||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"];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(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){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":198,_process:183,inherits:180}],200:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(process.platform==="win32"){ansiStyles.blue.open=""}function build(_styles){var builder=function builder(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;aindex){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$":223}],211:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function(callbackfn){var O=Object($.assertDefined(this)),self=$.ES5Object(O),f=ctx(callbackfn,arguments[1],3),length=$.toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$":223,"./$.ctx":218}],212:[function(require,module,exports){var $=require("./$");function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}assert.def=$.assertDefined;assert.fn=function(it){if(!$.isFunction(it))throw TypeError(it+" is not a function!");return it};assert.obj=function(it){if(!$.isObject(it))throw TypeError(it+" is not an object!");return it};assert.inst=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it};module.exports=assert},{"./$":223}],213:[function(require,module,exports){var $=require("./$");module.exports=Object.assign||function(target,source){var T=Object($.assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=$.ES5Object(arguments[i++]),keys=$.getKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$":223}],214:[function(require,module,exports){var $=require("./$"),TAG=require("./$.wks")("toStringTag"),toString={}.toString;function cof(it){return toString.call(it).slice(8,-1)}cof.classof=function(it){var O,T;return it==undefined?it===undefined?"Undefined":"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:cof(O)};cof.set=function(it,tag,stat){if(it&&!$.has(it=stat?it:it.prototype,TAG))$.hide(it,TAG,tag)};module.exports=cof},{"./$":223,"./$.wks":234}],215:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,assert=require("./$.assert"),$iter=require("./$.iter"),has=$.has,set=$.set,isObject=$.isObject,hide=$.hide,step=$iter.step,isFrozen=Object.isFrozen||$.core.Object.isFrozen,ID=safe("id"),O1=safe("O1"),LAST=safe("last"),FIRST=safe("first"),ITER=safe("iter"),SIZE=$.DESC?safe("size"):"size",id=0;function fastKey(it,create){if(!isObject(it))return(typeof it=="string"?"S":"P")+it;if(isFrozen(it))return"F";if(!has(it,ID)){if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(iterable){var that=assert.inst(this,C,NAME);set(that,O1,$.create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);if(iterable!=undefined)$iter.forOf(iterable,IS_MAP,that[ADDER],that)}$.mix(C.prototype,{clear:function(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function(key){return!!getEntry(this,key)}});if($.DESC)$.setDesc(C.prototype,"size",{get:function(){return assert.def(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!="F")that[O1][index]=entry}return that},getEntry:getEntry,getIterConstructor:function(){return function(iterated,kind){set(this,ITER,{o:iterated,k:kind})}},next:function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){iter.o=undefined;return step(1)}if(kind=="key")return step(0,entry.k);if(kind=="value")return step(0,entry.v);return step(0,[entry.k,entry.v])}}},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.iter":222,"./$.uid":232}],216:[function(require,module,exports){"use strict";var $=require("./$"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.iter").forOf,has=$.has,isObject=$.isObject,hide=$.hide,isFrozen=Object.isFrozen||$.core.Object.isFrozen,id=0,ID=safe("id"),WEAK=safe("weak"),LEAK=safe("leak"),method=require("./$.array-methods"),find=method(5),findIndex=method(6);function findFrozen(store,key){return find.call(store.array,function(it){return it[0]===key})}function leakStore(that){return that[LEAK]||hide(that,LEAK,{array:[],get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.array.push([key,value])},"delete":function(key){var index=findIndex.call(this.array,function(it){return it[0]===key});if(~index)this.array.splice(index,1);return!!~index}})[LEAK]}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(iterable){$.set(assert.inst(this,C,NAME),ID,id++);if(iterable!=undefined)forOf(iterable,IS_MAP,this[ADDER],this)}$.mix(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this)["delete"](key);return has(key,WEAK)&&has(key[WEAK],this[ID])&&delete key[WEAK][this[ID]]},has:function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this).has(key);return has(key,WEAK)&&has(key[WEAK],this[ID])}});return C},def:function(that,key,value){if(isFrozen(assert.obj(key))){leakStore(that).set(key,value)}else{has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that[ID]]=value}return that},leakStore:leakStore,WEAK:WEAK,ID:ID}},{"./$":223,"./$.array-methods":211,"./$.assert":212,"./$.iter":222,"./$.uid":232}],217:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),$iter=require("./$.iter"),assertInstance=require("./$.assert").inst;module.exports=function(NAME,methods,common,IS_MAP,isWeak){var Base=$.g[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};function fixMethod(KEY,CHAIN){var method=proto[KEY];if($.FW)proto[KEY]=function(a,b){var result=method.call(this,a===0?0:a,b);return CHAIN?this:result}}if(!$.isFunction(C)||!(isWeak||!$iter.BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(NAME,IS_MAP,ADDER);$.mix(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](isWeak?{}:-0,1),buggyZero;if($iter.fail(function(iter){new C(iter)})||$iter.DANGER_CLOSING){C=function(iterable){assertInstance(this,C,NAME);var that=new Base;if(iterable!=undefined)$iter.forOf(iterable,IS_MAP,that[ADDER],that);return that};C.prototype=proto;if($.FW)proto.constructor=C}isWeak||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER,true)}require("./$.cof").set(C,NAME);require("./$.species")(C);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);if(!isWeak)$iter.std(C,NAME,common.getIterConstructor(),common.next,IS_MAP?"key+value":"value",!IS_MAP,true);return C}},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.def":219,"./$.iter":222,"./$.species":229}],218:[function(require,module,exports){var assertFunction=require("./$.assert").fn;module.exports=function(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.assert":212}],219:[function(require,module,exports){var $=require("./$"),global=$.g,core=$.core,isFunction=$.isFunction;function ctx(fn,that){return function(){return fn.apply(that,arguments)}}$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;function $def(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,target=isGlobal?global:type&$def.S?global[name]:(global[name]||{}).prototype,exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;if(own&&key in exports)continue;out=own?target[key]:source[key];if(isGlobal&&!isFunction(target[key]))exp=source[key];else if(type&$def.B&&own)exp=ctx(out,global);else if(type&$def.W&&target[key]==out)!function(C){exp=function(param){return this instanceof C?new C(param):C(param)};exp.prototype=C.prototype}(out);else exp=type&$def.P&&isFunction(out)?ctx(Function.call,out):out;$.hide(exports,key,exp)}}module.exports=$def},{"./$":223}],220:[function(require,module,exports){module.exports=function($){$.FW=false;$.path=$.core;return $}},{}],221:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}},{}],222:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),$def=require("./$.def"),assertObject=require("./$.assert").obj,SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",Iterators={},IteratorPrototype={};var BUGGY="keys"in[]&&!("next"in[].keys()); +this.nodes.push(this.buildVariableDeclaration(temp,objRef));objRef=temp}for(var i=0;iarr.elements.length)return;if(pattern.elements.length0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.literal(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){var shouldMemoise=true;if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)){var memo=this.scope.generateMemoisedReference(ref,true);if(memo){this.nodes.push(this.buildVariableDeclaration(memo,ref));ref=memo}}this.push(pattern,ref);return this.nodes};return DestructuringTransformer}()},{"../../../messages":43,"../../../types":153}],87:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ForOfStatement=ForOfStatement;exports._ForOfStatementArray=_ForOfStatementArray;exports.__esModule=true;var messages=_interopRequireWildcard(require("../../../messages"));var util=_interopRequireWildcard(require("../../../util"));var t=_interopRequireWildcard(require("../../../types"));var check=t.isForOfStatement;exports.check=check;function ForOfStatement(node,parent,scope,file){if(this.get("right").isArrayExpression()){return _ForOfStatementArray.call(this,node,scope,file)}var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,file);var declar=build.declar;var loop=build.loop;var block=loop.body;t.inheritsComments(loop,node);t.ensureBlock(node);if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);if(build.replaceParent){this.parentPath.replaceWithMultiple(build.node);this.remove()}else{this.replaceWithMultiple(build.node)}}function _ForOfStatementArray(node,scope,file){var nodes=[];var right=node.right;if(!t.isIdentifier(right)||!scope.hasBinding(right.name)){var uid=scope.generateUidIdentifier("arr");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,right)]));right=uid}var iterationKey=scope.generateUidIdentifier("i");var loop=util.template("for-of-array",{BODY:node.body,KEY:iterationKey,ARR:right});t.inherits(loop,node);t.ensureBlock(loop);var iterationValue=t.memberExpression(right,iterationKey,true);var left=node.left;if(t.isVariableDeclaration(left)){left.declarations[0].init=iterationValue;loop.body.body.unshift(left)}else{loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=",left,iterationValue)))}nodes.push(loop);return nodes}var loose=function loose(node,parent,scope,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=util.template("for-of-loose",{LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,node:loop,loop:loop}};var spec=function spec(node,parent,scope,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=util.template("for-of",{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}}},{"../../../messages":43,"../../../types":153,"../../../util":157}],88:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ImportDeclaration=ImportDeclaration;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));exports.check=require("../internal/modules").check;function keepBlockHoist(node,nodes){if(node._blockHoist){for(var i=0;i",len,start),t.binaryExpression("-",len,start),t.literal(0))}var loop=util.template("rest",{ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}},{"../../../types":153,"../../../util":157,"lodash/lang/isNumber":397}],92:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.check=check;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function loose(node,body,objId){for(var i=0;i0){var declarations=flatten(map(this.vars,function(decl){return decl.declarations},this));var assignment=reduceRight(declarations,function(expr,decl){return t.assignmentExpression("=",decl.id,expr)},t.identifier("undefined"));var statement=t.expressionStatement(assignment);statement._blockHoist=Infinity;body.unshift(statement)}var paramDecls=this.paramDecls;if(paramDecls.length>0){body.unshift(t.variableDeclaration("var",paramDecls))}body.unshift(t.expressionStatement(t.assignmentExpression("=",this.getAgainId(),t.literal(false))));node.body=util.template("tail-call-body",{AGAIN_ID:this.getAgainId(),THIS_ID:this.thisId,ARGUMENTS_ID:this.argumentsId,FUNCTION_ID:this.getFunctionId(),BLOCK:node.body});var topVars=[];if(this.needsThis){topVars.push(t.variableDeclarator(this.getThisId(),t.thisExpression()))}if(this.needsArguments||this.setsArguments){var decl=t.variableDeclarator(this.getArgumentsId());if(this.needsArguments){decl.init=t.identifier("arguments")}topVars.push(decl)}var leftId=this.leftId;if(leftId){topVars.push(t.variableDeclarator(leftId))}if(topVars.length>0){node.body.body.unshift(t.variableDeclaration("var",topVars))}};TailCallTransformer.prototype.subTransform=function subTransform(node){if(!node)return;var handler=this["subTransform"+node.type];if(handler)return handler.call(this,node)};TailCallTransformer.prototype.subTransformConditionalExpression=function subTransformConditionalExpression(node){var callConsequent=this.subTransform(node.consequent);var callAlternate=this.subTransform(node.alternate);if(!callConsequent&&!callAlternate){return}node.type="IfStatement";node.consequent=callConsequent?t.toBlock(callConsequent):returnBlock(node.consequent);if(callAlternate){node.alternate=t.isIfStatement(callAlternate)?callAlternate:t.toBlock(callAlternate)}else{node.alternate=returnBlock(node.alternate)}return[node]};TailCallTransformer.prototype.subTransformLogicalExpression=function subTransformLogicalExpression(node){var callRight=this.subTransform(node.right);if(!callRight)return;var leftId=this.getLeftId();var testExpr=t.assignmentExpression("=",leftId,node.left);if(node.operator==="&&"){testExpr=t.unaryExpression("!",testExpr)}return[t.ifStatement(testExpr,returnBlock(leftId))].concat(callRight)};TailCallTransformer.prototype.subTransformSequenceExpression=function subTransformSequenceExpression(node){var seq=node.expressions;var lastCall=this.subTransform(seq[seq.length-1]);if(!lastCall){return}if(--seq.length===1){node=seq[0]}return[t.expressionStatement(node)].concat(lastCall)};TailCallTransformer.prototype.subTransformCallExpression=function subTransformCallExpression(node){var callee=node.callee,thisBinding,args;if(t.isMemberExpression(callee,{computed:false})&&t.isIdentifier(callee.property)){switch(callee.property.name){case"call":args=t.arrayExpression(node.arguments.slice(1));break;case"apply":args=node.arguments[1]||t.identifier("undefined");break;default:return}thisBinding=node.arguments[0];callee=callee.object}if(!t.isIdentifier(callee)||!this.scope.bindingIdentifierEquals(callee.name,this.ownerId)){return}this.hasTailRecursion=true;if(this.hasDeopt())return;var body=[];if(!t.isThisExpression(thisBinding)){body.push(t.expressionStatement(t.assignmentExpression("=",this.getThisId(),thisBinding||t.identifier("undefined")))); -setIterator(IteratorPrototype,$.that);function setIterator(O,value){$.hide(O,SYMBOL_ITERATOR,value);if(FF_ITERATOR in[])$.hide(O,FF_ITERATOR,value)}function defineIterator(Constructor,NAME,value,DEFAULT){var proto=Constructor.prototype,iter=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT]||value;if($.FW)setIterator(proto,iter);if(iter!==value){var iterProto=$.getProto(iter.call(new Constructor));cof.set(iterProto,NAME+" Iterator",true);if($.FW)$.has(proto,FF_ITERATOR)&&setIterator(iterProto,$.that)}Iterators[NAME]=iter;Iterators[NAME+" Iterator"]=$.that;return iter}function getIterator(it){var Symbol=$.g.Symbol,ext=it[Symbol&&Symbol.iterator||FF_ITERATOR],getIter=ext||it[SYMBOL_ITERATOR]||Iterators[cof.classof(it)];return assertObject(getIter.call(it))}function closeIterator(iterator){var ret=iterator["return"];if(ret!==undefined)assertObject(ret.call(iterator))}function stepCall(iterator,fn,value,entries){try{return entries?fn(assertObject(value)[0],value[1]):fn(value)}catch(e){closeIterator(iterator);throw e}}var DANGER_CLOSING=true;!function(){try{var iter=[1].keys();iter["return"]=function(){DANGER_CLOSING=false};Array.from(iter,function(){throw 2})}catch(e){}}();var $iter=module.exports={BUGGY:BUGGY,DANGER_CLOSING:DANGER_CLOSING,fail:function(exec){var fail=true;try{var arr=[[{},1]],iter=arr[SYMBOL_ITERATOR](),next=iter.next;iter.next=function(){fail=false;return next.call(this)};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return fail},Iterators:Iterators,prototype:IteratorPrototype,step:function(done,value){return{value:value,done:!!done}},stepCall:stepCall,close:closeIterator,is:function(it){var O=Object(it),Symbol=$.g.Symbol,SYM=Symbol&&Symbol.iterator||FF_ITERATOR;return SYM in O||SYMBOL_ITERATOR in O||$.has(Iterators,cof.classof(O))},get:getIterator,set:setIterator,create:function(Constructor,NAME,next,proto){Constructor.prototype=$.create(proto||$iter.prototype,{next:$.desc(1,next)});cof.set(Constructor,NAME+" Iterator")},define:defineIterator,std:function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){function createIter(kind){return function(){return new Constructor(this,kind)}}$iter.create(Constructor,NAME,next);var entries=createIter("key+value"),values=createIter("value"),proto=Base.prototype,methods,key;if(DEFAULT=="value")values=defineIterator(Base,NAME,values,"values");else entries=defineIterator(Base,NAME,entries,"entries");if(DEFAULT){methods={entries:entries,keys:IS_SET?values:createIter("key"),values:values};$def($def.P+$def.F*BUGGY,NAME,methods);if(FORCE)for(key in methods){if(!(key in proto))$.hide(proto,key,methods[key])}}},forOf:function(iterable,entries,fn,that){var iterator=getIterator(iterable),f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done){if(stepCall(iterator,f,step.value,entries)===false){return closeIterator(iterator)}}}}},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.ctx":218,"./$.def":219,"./$.wks":234}],223:[function(require,module,exports){"use strict";var global=typeof self!="undefined"?self:Function("return this")(),core={},defineProperty=Object.defineProperty,hasOwnProperty={}.hasOwnProperty,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min;var DESC=!!function(){try{return defineProperty({},"a",{get:function(){return 2}}).a==2}catch(e){}}();var hide=createDefiner(1);function toInteger(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}function desc(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return $.setDesc(object,key,desc(bitmap,value))}:simpleSet}function isObject(it){return it!==null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}function assertDefined(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}var $=module.exports=require("./$.fw")({g:global,core:core,html:global.document&&document.documentElement,isObject:isObject,isFunction:isFunction,it:function(it){return it},that:function(){return this},toInteger:toInteger,toLength:function(it){return it>0?min(toInteger(it),9007199254740991):0},toIndex:function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)},has:function(it,key){return hasOwnProperty.call(it,key)},create:Object.create,getProto:Object.getPrototypeOf,DESC:DESC,desc:desc,getDesc:Object.getOwnPropertyDescriptor,setDesc:defineProperty,getKeys:Object.keys,getNames:Object.getOwnPropertyNames,getSymbols:Object.getOwnPropertySymbols,assertDefined:assertDefined,ES5Object:Object,toObject:function(it){return $.ES5Object(assertDefined(it))},hide:hide,def:createDefiner(0),set:global.Symbol?simpleSet:hide,mix:function(target,src){for(var key in src)hide(target,key,src[key]);return target},each:[].forEach});if(typeof __e!="undefined")__e=core;if(typeof __g!="undefined")__g=global},{"./$.fw":220}],224:[function(require,module,exports){var $=require("./$");module.exports=function(object,el){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":223}],225:[function(require,module,exports){var $=require("./$"),assertObject=require("./$.assert").obj;module.exports=function(it){assertObject(it);return $.getSymbols?$.getNames(it).concat($.getSymbols(it)):$.getNames(it)}},{"./$":223,"./$.assert":212}],226:[function(require,module,exports){"use strict";var $=require("./$"),invoke=require("./$.invoke"),assertFunction=require("./$.assert").fn;module.exports=function(){var fn=assertFunction(this),length=arguments.length,pargs=Array(length),i=0,_=$.path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$":223,"./$.assert":212,"./$.invoke":221}],227:[function(require,module,exports){"use strict";module.exports=function(regExp,replace,isStatic){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}},{}],228:[function(require,module,exports){var $=require("./$"),assert=require("./$.assert");module.exports=Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,$.getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function(O,proto){assert.obj(O);assert(proto===null||$.isObject(proto),proto,": can't set as prototype!");if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined)},{"./$":223,"./$.assert":212,"./$.ctx":218}],229:[function(require,module,exports){var $=require("./$");module.exports=function(C){if($.DESC&&$.FW)$.setDesc(C,require("./$.wks")("species"),{configurable:true,get:$.that})}},{"./$":223,"./$.wks":234}],230:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function(TO_STRING){return function(pos){var s=String($.assertDefined(this)),i=$.toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$":223}],231:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),invoke=require("./$.invoke"),global=$.g,isFunction=$.isFunction,setTask=global.setImmediate,clearTask=global.clearImmediate,postMessage=global.postMessage,addEventListener=global.addEventListener,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;function run(){var id=+this;if($.has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run.call(event.data)}if(!isFunction(setTask)||!isFunction(clearTask)){setTask=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearTask=function(id){delete queue[id]};if(cof(global.process)=="process"){defer=function(id){global.process.nextTick(ctx(run,id,1))}}else if(addEventListener&&isFunction(postMessage)&&!$.g.importScripts){defer=function(id){postMessage(id,"*")};addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if($.g.document&&ONREADYSTATECHANGE in document.createElement("script")){defer=function(id){$.html.appendChild(document.createElement("script"))[ONREADYSTATECHANGE]=function(){$.html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$":223,"./$.cof":214,"./$.ctx":218,"./$.invoke":221}],232:[function(require,module,exports){var sid=0;function uid(key){return"Symbol("+key+")_"+(++sid+Math.random()).toString(36)}uid.safe=require("./$").g.Symbol||uid;module.exports=uid},{"./$":223}],233:[function(require,module,exports){var $=require("./$"),UNSCOPABLES=require("./$.wks")("unscopables");if($.FW&&!(UNSCOPABLES in[]))$.hide(Array.prototype,UNSCOPABLES,{});module.exports=function(key){if($.FW)[][UNSCOPABLES][key]=true}},{"./$":223,"./$.wks":234}],234:[function(require,module,exports){var global=require("./$").g,store={};module.exports=function(name){return store[name]||(store[name]=global.Symbol&&global.Symbol[name]||require("./$.uid").safe("Symbol."+name))}},{"./$":223,"./$.uid":232}],235:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,$def=require("./$.def"),$iter=require("./$.iter"),ENTRIES=safe("entries"),FN=safe("fn"),ITER=safe("iter"),forOf=$iter.forOf,stepCall=$iter.stepCall,getIterator=$iter.get,setIterator=$iter.set,createIterator=$iter.create;function $for(iterable,entries){if(!(this instanceof $for))return new $for(iterable,entries);this[ITER]=getIterator(iterable);this[ENTRIES]=!!entries}createIterator($for,"Wrapper",function(){return this[ITER].next()});var $forProto=$for.prototype;setIterator($forProto,function(){return this[ITER]});function createChainIterator(next){function Iterator(iter,fn,that){this[ITER]=getIterator(iter);this[ENTRIES]=iter[ENTRIES];this[FN]=ctx(fn,that,iter[ENTRIES]?2:1)}createIterator(Iterator,"Chain",next,$forProto);setIterator(Iterator.prototype,$.that);return Iterator}var MapIter=createChainIterator(function(){var step=this[ITER].next();return step.done?step:$iter.step(0,stepCall(this[ITER],this[FN],step.value,this[ENTRIES]))});var FilterIter=createChainIterator(function(){for(;;){var step=this[ITER].next();if(step.done||stepCall(this[ITER],this[FN],step.value,this[ENTRIES]))return step}});$.mix($forProto,{of:function(fn,that){forOf(this,this[ENTRIES],fn,that)},array:function(fn,that){var result=[];forOf(fn!=undefined?this.map(fn,that):this,false,result.push,result);return result},filter:function(fn,that){return new FilterIter(this,fn,that)},map:function(fn,that){return new MapIter(this,fn,that)}});$for.isIterable=$iter.is;$for.getIterator=getIterator;$def($def.G+$def.F,{$for:$for})},{"./$":223,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.uid":232}],236:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),assertFunction=require("./$.assert").fn;$def($def.P+$def.F,"Array",{turn:function(fn,target){assertFunction(fn);var memo=target==undefined?[]:Object(target),O=$.ES5Object(this),length=$.toLength(O.length),index=0;while(length>index)if(fn(memo,O[index],index++,this)===false)break;return memo}});require("./$.unscope")("turn")},{"./$":223,"./$.assert":212,"./$.def":219,"./$.unscope":233}],237:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),invoke=require("./$.invoke"),hide=$.hide,assertFunction=require("./$.assert").fn,_=$.DESC?require("./$.uid")("tie"):"toLocaleString",toLocaleString={}.toLocaleString;$.core._=$.path._=$.path._||{};$def($def.P+$def.F,"Function",{part:require("./$.partial"),only:function(numberArguments,that){var fn=assertFunction(this),n=$.toLength(numberArguments),isThat=arguments.length>1;return function(){var length=Math.min(n,arguments.length),args=Array(length),i=0;while(length>i)args[i]=arguments[i++];return invoke(fn,args,isThat?that:this)}}});function tie(key){var that=this,bound={};return hide(that,_,function(key){if(key===undefined||!(key in that))return toLocaleString.call(that);return $.has(bound,key)?bound[key]:bound[key]=ctx(that[key],that,-1)})[_](key)}hide($.path._,"toString",function(){return _});hide(Object.prototype,_,tie);$.DESC||hide(Array.prototype,_,tie)},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.def":219,"./$.invoke":221,"./$.partial":226,"./$.uid":232}],238:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),core=$.core,formatRegExp=/\b\w\w?\b/g,flexioRegExp=/:(.*)\|(.*)$/,locales={},current="en",SECONDS="Seconds",MINUTES="Minutes",HOURS="Hours",DATE="Date",MONTH="Month",YEAR="FullYear";function lz(num){return num>9?num:"0"+num}function createFormat(prefix){return function(template,locale){var that=this,dict=locales[$.has(locales,locale)?locale:current];function get(unit){return that[prefix+unit]()}return String(template).replace(formatRegExp,function(part){switch(part){case"s":return get(SECONDS);case"ss":return lz(get(SECONDS));case"m":return get(MINUTES);case"mm":return lz(get(MINUTES));case"h":return get(HOURS);case"hh":return lz(get(HOURS));case"D":return get(DATE);case"DD":return lz(get(DATE));case"W":return dict[0][get("Day")];case"N":return get(MONTH)+1;case"NN":return lz(get(MONTH)+1);case"M":return dict[2][get(MONTH)];case"MM":return dict[1][get(MONTH)];case"Y":return get(YEAR);case"YY":return lz(get(YEAR)%100)}return part})}}function addLocale(lang,locale){function split(index){var result=[];$.each.call(locale.months.split(","),function(it){result.push(it.replace(flexioRegExp,"$"+index))});return result}locales[lang]=[locale.weekdays.split(","),split(1),split(2)];return core}$def($def.P+$def.F,DATE,{format:createFormat("get"),formatUTC:createFormat("getUTC")});addLocale(current,{weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",months:"January,February,March,April,May,June,July,August,September,October,November,December"});addLocale("ru",{weekdays:"Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота",months:"Январ:я|ь,Феврал:я|ь,Март:а|,Апрел:я|ь,Ма:я|й,Июн:я|ь,"+"Июл:я|ь,Август:а|,Сентябр:я|ь,Октябр:я|ь,Ноябр:я|ь,Декабр:я|ь"});core.locale=function(locale){return $.has(locales,locale)?current=locale:current};core.addLocale=addLocale},{"./$":223,"./$.def":219}],239:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),partial=require("./$.partial");$def($def.G+$def.F,{delay:function(time){return new($.core.Promise||$.g.Promise)(function(resolve){setTimeout(partial.call(resolve,true),time)})}})},{"./$":223,"./$.def":219,"./$.partial":226}],240:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),assign=require("./$.assign"),keyOf=require("./$.keyof"),ITER=require("./$.uid").safe("iter"),assert=require("./$.assert"),$iter=require("./$.iter"),step=$iter.step,getKeys=$.getKeys,toObject=$.toObject,has=$.has;function Dict(iterable){var dict=$.create(null);if(iterable!=undefined){if($iter.is(iterable)){$iter.forOf(iterable,true,function(key,value){dict[key]=value})}else assign(dict,iterable)}return dict}Dict.prototype=null;function DictIterator(iterated,kind){$.set(this,ITER,{o:toObject(iterated),a:getKeys(iterated),i:0,k:kind})}$iter.create(DictIterator,"Dict",function(){var iter=this[ITER],O=iter.o,keys=iter.a,kind=iter.k,key;do{if(iter.i>=keys.length){iter.o=undefined;return step(1)}}while(!has(O,key=keys[iter.i++]));if(kind=="key")return step(0,key);if(kind=="value")return step(0,O[key]);return step(0,[key,O[key]])});function createDictIter(kind){return function(it){return new DictIterator(it,kind)}}function generic(A,B){return typeof A=="function"?A:B}function createDictMethod(TYPE){var IS_MAP=TYPE==1,IS_EVERY=TYPE==4;return function(object,callbackfn,that){var f=ctx(callbackfn,that,3),O=toObject(object),result=IS_MAP||TYPE==7||TYPE==2?new(generic(this,Dict)):undefined,key,val,res;for(key in O)if(has(O,key)){val=O[key];res=f(val,key,object);if(TYPE){if(IS_MAP)result[key]=res;else if(res)switch(TYPE){case 2:result[key]=val;break;case 3:return true;case 5:return val;case 6:return key;case 7:result[res[0]]=res[1]}else if(IS_EVERY)return false}}return TYPE==3||IS_EVERY?IS_EVERY:result}}function createDictReduce(IS_TURN){return function(object,mapfn,init){assert.fn(mapfn);var O=toObject(object),keys=getKeys(O),length=keys.length,i=0,memo,key,result;if(IS_TURN){memo=init==undefined?new(generic(this,Dict)):Object(init)}else if(arguments.length<3){assert(length,"Reduce of empty object with no initial value");memo=O[keys[i++]]}else memo=Object(init);while(length>i)if(has(O,key=keys[i++])){result=mapfn(memo,O[key],key,object);if(IS_TURN){if(result===false)break}else memo=result}return memo}}var findKey=createDictMethod(6);$def($def.G+$def.F,{Dict:$.mix(Dict,{keys:createDictIter("key"),values:createDictIter("value"),entries:createDictIter("key+value"),forEach:createDictMethod(0),map:createDictMethod(1),filter:createDictMethod(2),some:createDictMethod(3),every:createDictMethod(4),find:createDictMethod(5),findKey:findKey,mapPairs:createDictMethod(7),reduce:createDictReduce(false),turn:createDictReduce(true),keyOf:keyOf,includes:function(object,el){return(el==el?keyOf(object,el):findKey(object,function(it){return it!=it}))!==undefined},has:has,get:function(object,key){if(has(object,key))return object[key]},set:$.def,isDict:function(it){return $.isObject(it)&&$.getProto(it)===Dict.prototype}})})},{"./$":223,"./$.assert":212,"./$.assign":213,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.keyof":224,"./$.uid":232}],241:[function(require,module,exports){var $def=require("./$.def");$def($def.G+$def.F,{global:require("./$").g})},{"./$":223,"./$.def":219}],242:[function(require,module,exports){var core=require("./$").core,$iter=require("./$.iter");core.isIterable=$iter.is;core.getIterator=$iter.get},{"./$":223,"./$.iter":222}],243:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),log={},enabled=true;$.each.call(("assert,clear,count,debug,dir,dirxml,error,exception,"+"group,groupCollapsed,groupEnd,info,isIndependentlyComposed,log,"+"markTimeline,profile,profileEnd,table,time,timeEnd,timeline,"+"timelineEnd,timeStamp,trace,warn").split(","),function(key){log[key]=function(){if(enabled&&$.g.console&&$.isFunction(console[key])){return Function.apply.call(console[key],console,arguments)}}});$def($def.G+$def.F,{log:require("./$.assign")(log.log,log,{enable:function(){enabled=true},disable:function(){enabled=false}})})},{"./$":223,"./$.assign":213,"./$.def":219}],244:[function(require,module,exports){"use strict";var $=require("./$"),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step,NUMBER="Number";function NumberIterator(iterated){$.set(this,ITER,{l:$.toLength(iterated),i:0})}$iter.create(NumberIterator,NUMBER,function(){var iter=this[ITER],i=iter.i++;return ii)args.push(arguments[i++]);return invoke(fn,args)}});$def($def.P+$def.F,"Number",methods)},{"./$":223,"./$.def":219,"./$.invoke":221}],246:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),ownKeys=require("./$.own-keys");function define(target,mixin){var keys=ownKeys($.toObject(mixin)),length=keys.length,i=0,key;while(length>i)$.setDesc(target,key=keys[i++],$.getDesc(mixin,key));return target}$def($def.S+$def.F,"Object",{isObject:$.isObject,classof:require("./$.cof").classof,define:define,make:function(proto,mixin){return define($.create(proto),mixin)}})},{"./$":223,"./$.cof":214,"./$.def":219,"./$.own-keys":225}],247:[function(require,module,exports){var $def=require("./$.def"),replacer=require("./$.replacer");var escapeHTMLDict={"&":"&","<":"<",">":">",'"':""","'":"'"},unescapeHTMLDict={},key;for(key in escapeHTMLDict)unescapeHTMLDict[escapeHTMLDict[key]]=key;$def($def.P+$def.F,"String",{escapeHTML:replacer(/[&<>"']/g,escapeHTMLDict),unescapeHTML:replacer(/&(?:amp|lt|gt|quot|apos);/g,unescapeHTMLDict)})},{"./$.def":219,"./$.replacer":227}],248:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid").safe("__proto__"),assert=require("./$.assert"),assertObject=assert.obj,ObjectProto=Object.prototype,A=[],slice=A.slice,indexOf=A.indexOf,classof=cof.classof,defineProperties=Object.defineProperties,has=$.has,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,isFunction=$.isFunction,toObject=$.toObject,toLength=$.toLength,IE8_DOM_DEFINE=false;if(!$.DESC){try{IE8_DOM_DEFINE=defineProperty(document.createElement("div"),"x",{get:function(){return 8}}).x==8}catch(e){}$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)assertObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};defineProperties=function(O,Properties){assertObject(O);var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!$.DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=document.createElement("iframe"),i=keysLen1,iframeDocument;iframe.style.display="none";$.html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write("");iframeDocument.close();createDict=iframeDocument.F;while(i--)delete createDict.prototype[keys1[i]];return createDict()};function createGetKeys(names,length){return function(object){var O=toObject(object),i=0,result=[],key;for(key in O)if(key!=IE_PROTO)has(O,key)&&result.push(key);while(length>i)if(has(O,key=names[i++])){~indexOf.call(result,key)||result.push(key)}return result}}function isPrimitive(it){return!$.isObject(it)}function Empty(){}$def($def.S,"Object",{getPrototypeOf:$.getProto=$.getProto||function(O){O=Object(assert.def(O));if(has(O,IE_PROTO))return O[IE_PROTO];if(isFunction(O.constructor)&&O instanceof O.constructor){return O.constructor.prototype}return O instanceof Object?ObjectProto:null},getOwnPropertyNames:$.getNames=$.getNames||createGetKeys(keys2,keys2.length,true),create:$.create=$.create||function(O,Properties){var result;if(O!==null){Empty.prototype=assertObject(O);result=new Empty;Empty.prototype=null;result[IE_PROTO]=O}else result=createDict();return Properties===undefined?result:defineProperties(result,Properties)},keys:$.getKeys=$.getKeys||createGetKeys(keys1,keysLen1,false),seal:$.it,freeze:$.it,preventExtensions:$.it,isSealed:isPrimitive,isFrozen:isPrimitive,isExtensible:$.isObject});$def($def.P,"Function",{bind:function(that){var fn=assert.fn(this),partArgs=slice.call(arguments,1);function bound(){var args=partArgs.concat(slice.call(arguments));return invoke(fn,args,this instanceof bound?$.create(fn.prototype):that)}if(fn.prototype)bound.prototype=fn.prototype;return bound}});function arrayMethodFix(fn){return function(){return fn.apply($.ES5Object(this),arguments)}}if(!(0 in Object("z")&&"z"[0]=="z")){$.ES5Object=function(it){return cof(it)=="String"?it.split(""):Object(it)}}$def($def.P+$def.F*($.ES5Object!=Object),"Array",{slice:arrayMethodFix(slice),join:arrayMethodFix(A.join)});$def($def.S,"Array",{isArray:function(arg){return cof(arg)=="Array"}});function createArrayReduce(isRight){return function(callbackfn,memo){assert.fn(callbackfn);var O=toObject(this),length=toLength(O.length),index=isRight?length-1:0,i=isRight?-1:1;if(arguments.length<2)for(;;){if(index in O){memo=O[index];index+=i;break}index+=i;assert(isRight?index>=0:length>index,"Reduce of empty array with no initial value")}for(;isRight?index>=0:length>index;index+=i)if(index in O){memo=callbackfn(memo,O[index],index,this)}return memo}}$def($def.P,"Array",{forEach:$.each=$.each||arrayMethod(0),map:arrayMethod(1),filter:arrayMethod(2),some:arrayMethod(3),every:arrayMethod(4),reduce:createArrayReduce(false),reduceRight:createArrayReduce(true),indexOf:indexOf=indexOf||require("./$.array-includes")(false),lastIndexOf:function(el,fromIndex){var O=toObject(this),length=toLength(O.length),index=length-1;if(arguments.length>1)index=Math.min(index,$.toInteger(fromIndex));if(index<0)index=toLength(length+index);for(;index>=0;index--)if(index in O)if(O[index]===el)return index;return-1}});$def($def.P,"String",{trim:require("./$.replacer")(/^\s*([\s\S]*\S)?\s*$/,"$1")});$def($def.S,"Date",{now:function(){return+new Date}});function lz(num){return num>9?num:"0"+num}$def($def.P,"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var d=this,y=d.getUTCFullYear(),m=d.getUTCMilliseconds(),s=y<0?"-":y>9999?"+":"";return s+("00000"+Math.abs(y)).slice(s?-6:-4)+"-"+lz(d.getUTCMonth()+1)+"-"+lz(d.getUTCDate())+"T"+lz(d.getUTCHours())+":"+lz(d.getUTCMinutes())+":"+lz(d.getUTCSeconds())+"."+(m>99?m:"0"+lz(m))+"Z"}});if(classof(function(){return arguments}())=="Object")cof.classof=function(it){var tag=classof(it);return tag=="Object"&&isFunction(it.callee)?"Arguments":tag}},{"./$":223,"./$.array-includes":210,"./$.array-methods":211,"./$.assert":212,"./$.cof":214,"./$.def":219,"./$.invoke":221,"./$.replacer":227,"./$.uid":232}],249:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{copyWithin:function(target,start){var O=Object($.assertDefined(this)),len=$.toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],fin=end===undefined?len:toIndex(end,len),count=Math.min(fin-from,len-to),inc=1;if(from0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O}});require("./$.unscope")("copyWithin")},{"./$":223,"./$.def":219,"./$.unscope":233}],250:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{fill:function(value){var O=Object($.assertDefined(this)),length=$.toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O}});require("./$.unscope")("fill")},{"./$":223,"./$.def":219,"./$.unscope":233}],251:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{findIndex:require("./$.array-methods")(6)});require("./$.unscope")("findIndex")},{"./$.array-methods":211,"./$.def":219,"./$.unscope":233}],252:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{find:require("./$.array-methods")(5)});require("./$.unscope")("find")},{"./$.array-methods":211,"./$.def":219,"./$.unscope":233}],253:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),$iter=require("./$.iter"),stepCall=$iter.stepCall;$def($def.S+$def.F*$iter.DANGER_CLOSING,"Array",{from:function(arrayLike){var O=Object($.assertDefined(arrayLike)),mapfn=arguments[1],mapping=mapfn!==undefined,f=mapping?ctx(mapfn,arguments[2],2):undefined,index=0,length,result,step,iterator;if($iter.is(O)){iterator=$iter.get(O);result=new(typeof this=="function"?this:Array);for(;!(step=iterator.next()).done;index++){result[index]=mapping?stepCall(iterator,f,[step.value,index],true):step.value}}else{result=new(typeof this=="function"?this:Array)(length=$.toLength(O.length));for(;length>index;index++){result[index]=mapping?f(O[index],index):O[index]}}result.length=index;return result}})},{"./$":223,"./$.ctx":218,"./$.def":219,"./$.iter":222}],254:[function(require,module,exports){var $=require("./$"),setUnscope=require("./$.unscope"),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step,Iterators=$iter.Iterators;$iter.std(Array,"Array",function(iterated,kind){$.set(this,ITER,{o:$.toObject(iterated),i:0,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,index=iter.i++;if(!O||index>=O.length){iter.o=undefined;return step(1)}if(kind=="key")return step(0,index);if(kind=="value")return step(0,O[index]);return step(0,[index,O[index]])},"value");Iterators.Arguments=Iterators.Array;setUnscope("keys");setUnscope("values");setUnscope("entries")},{"./$":223,"./$.iter":222,"./$.uid":232,"./$.unscope":233}],255:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Array",{of:function(){var index=0,length=arguments.length,result=new(typeof this=="function"?this:Array)(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}})},{"./$.def":219}],256:[function(require,module,exports){require("./$.species")(Array)},{"./$.species":229}],257:[function(require,module,exports){"use strict";var $=require("./$"),NAME="name",setDesc=$.setDesc,FunctionProto=Function.prototype;NAME in FunctionProto||$.FW&&$.DESC&&setDesc(FunctionProto,NAME,{configurable:true,get:function(){var match=String(this).match(/^\s*function ([^ (]*)/),name=match?match[1]:"";$.has(this,NAME)||setDesc(this,NAME,$.desc(5,name));return name},set:function(value){$.has(this,NAME)||setDesc(this,NAME,$.desc(0,value))}})},{"./$":223}],258:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Map",{get:function(key){var entry=strong.getEntry(this,key);return entry&&entry.v},set:function(key,value){return strong.def(this,key===0?0:key,value)}},strong,true)},{"./$.collection":217,"./$.collection-strong":215}],259:[function(require,module,exports){var Infinity=1/0,$def=require("./$.def"),E=Math.E,pow=Math.pow,abs=Math.abs,exp=Math.exp,log=Math.log,sqrt=Math.sqrt,ceil=Math.ceil,floor=Math.floor,sign=Math.sign||function(x){return(x=+x)==0||x!=x?x:x<0?-1:1};function asinh(x){return!isFinite(x=+x)||x==0?x:x<0?-asinh(-x):log(x+sqrt(x*x+1))}function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:exp(x)-1}$def($def.S,"Math",{acosh:function(x){return(x=+x)<1?NaN:isFinite(x)?log(x/E+sqrt(x+1)*sqrt(x-1)/E)+1:x},asinh:asinh,atanh:function(x){return(x=+x)==0?x:log((1+x)/(1-x))/2; +}if(!args){args=t.arrayExpression(node.arguments)}var argumentsId=this.getArgumentsId();var params=this.getParams();body.push(t.expressionStatement(t.assignmentExpression("=",argumentsId,args)));var i,param;if(t.isArrayExpression(args)){var elems=args.elements;for(i=0;i1){var last=nodes[nodes.length-1];if(t.isLiteral(last,{value:""}))nodes.pop();var root=buildBinaryExpression(nodes.shift(),nodes.shift());for(i=0;i=1){nodes.push(node)}return nodes}},{"../../../types":153}],109:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.manipulateOptions=manipulateOptions;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));var metadata={stage:1};exports.metadata=metadata;function manipulateOptions(opts){if(opts.whitelist)opts.whitelist.push("es6.destructuring")}var hasSpread=function hasSpread(node){for(var i=0;i3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}var msg;if(closest){msg=messages.get("undeclaredVariableSuggestion",node.name,closest)}else{msg=messages.get("undeclaredVariable",node.name)}throw file.errorWithNode(node,msg,ReferenceError)}},{"../../../messages":43,leven:307}],142:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var t=_interopRequireWildcard(require("../types"));var Binding=function(){function Binding(_ref){var identifier=_ref.identifier;var scope=_ref.scope;var path=_ref.path;var kind=_ref.kind;_classCallCheck(this,Binding);this.identifier=identifier;this.constant=true;this.scope=scope;this.path=path;this.kind=kind}Binding.prototype.setTypeAnnotation=function setTypeAnnotation(){var typeInfo=this.path.getTypeAnnotation();this.typeAnnotationInferred=typeInfo.inferred;this.typeAnnotation=typeInfo.annotation};Binding.prototype.isTypeGeneric=function isTypeGeneric(){var _path;return(_path=this.path).isTypeGeneric.apply(_path,arguments)};Binding.prototype.assignTypeGeneric=function assignTypeGeneric(type,params){var typeParams=null;if(params)params=t.typeParameterInstantiation(params);this.assignType(t.genericTypeAnnotation(t.identifier(type),typeParams))};Binding.prototype.assignType=function assignType(type){this.typeAnnotation=type};Binding.prototype.reassign=function reassign(){this.constant=false;if(this.typeAnnotationInferred){this.typeAnnotation=null}};Binding.prototype.isCompatibleWithType=function isCompatibleWithType(newType){return false};return Binding}();module.exports=Binding},{"../types":153}],143:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var TraversalPath=_interopRequire(require("./path"));var compact=_interopRequire(require("lodash/array/compact"));var t=_interopRequireWildcard(require("../types"));var TraversalContext=function(){function TraversalContext(scope,opts,state,parentPath){_classCallCheck(this,TraversalContext);this.parentPath=parentPath;this.scope=scope;this.state=state;this.opts=opts}TraversalContext.prototype.create=function create(node,obj,key){return TraversalPath.get(this.parentPath,this,node,obj,key)};TraversalContext.prototype.visitMultiple=function visitMultiple(nodes,node,key){if(nodes.length===0)return false;var visited=[];var queue=this.queue=[];var stop=false;for(var i=0;i=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}}for(var i=0;i":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right}}confident=false}}},{}],147:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var react=_interopRequireWildcard(require("../../transformation/helpers/react"));var t=_interopRequireWildcard(require("../../types"));var referenceVisitor={enter:function enter(node,parent,scope,state){if(this.isJSXIdentifier()&&react.isCompatTag(node.name)){return}if(this.isJSXIdentifier()||this.isIdentifier()){if(this.isReferenced()){var bindingInfo=scope.getBinding(node.name);if(bindingInfo!==state.scope.getBinding(node.name))return;if(bindingInfo&&bindingInfo.constant){state.bindings[node.name]=bindingInfo}else{scope.dump();state.foundIncompatible=true;this.stop()}}}}};var PathHoister=function(){function PathHoister(path,scope){_classCallCheck(this,PathHoister);this.foundIncompatible=false;this.bindings={};this.scope=scope;this.scopes=[];this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var checkScope=this.path.scope;do{if(this.isCompatibleScope(checkScope)){this.scopes.push(checkScope)}else{break}}while(checkScope=checkScope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(scope.path.isFunction()){if(this.hasNonParamBindings()){return this.getNextScopeStatementParent()}else{return scope.path.get("body").get("body")[0]}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasNonParamBindings=function hasNonParamBindings(){for(var name in this.bindings){var binding=this.bindings[name];if(binding.kind!=="param")return true}return false};PathHoister.prototype.run=function run(){this.path.traverse(referenceVisitor,this);if(this.foundIncompatible)return;this.getCompatibleScopes();var path=this.getAttachmentPath();if(!path)return;var uid=path.scope.generateUidIdentifier("ref");path.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);this.path.replaceWith(uid)};return PathHoister}();module.exports=PathHoister},{"../../transformation/helpers/react":58,"../../types":153}],148:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _createClass=function(){function defineProperties(target,props){for(var key in props){var prop=props[key];prop.configurable=true;if(prop.value)prop.writable=true}Object.defineProperties(target,props)}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var PathHoister=_interopRequire(require("./hoister"));var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var isRegExp=_interopRequire(require("lodash/lang/isRegExp"));var isString=_interopRequire(require("lodash/lang/isString"));var traverse=_interopRequire(require("../index"));var includes=_interopRequire(require("lodash/collection/includes"));var assign=_interopRequire(require("lodash/object/assign"));var extend=_interopRequire(require("lodash/object/extend"));var Scope=_interopRequire(require("../scope"));var t=_interopRequireWildcard(require("../../types"));var hoistVariablesVisitor={enter:function enter(node,parent,scope){if(this.isFunction()){return this.skip()}if(this.isVariableDeclaration()&&node.kind==="var"){var bindings=this.getBindingIdentifiers();for(var key in bindings){scope.push({id:bindings[key]})}var exprs=[];for(var i=0;i=fromIndex){path.key+=incrementBy}}};TraversalPath.prototype.setData=function setData(key,val){return this.data[key]=val};TraversalPath.prototype.getData=function getData(key,def){var val=this.data[key];if(!val&&def)val=this.data[key]=def;return val};TraversalPath.prototype.setScope=function setScope(file){this.scope=TraversalPath.getScope(this,this.context&&this.context.scope,file)};TraversalPath.prototype.clearContext=function clearContext(){this.context=null};TraversalPath.prototype.setContext=function setContext(parentPath,context,key,file){this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.parentPath=parentPath||this.parentPath;this.key=key;if(context){this.context=context;this.state=context.state;this.opts=context.opts}this.type=this.node&&this.node.type;this.setScope(file)};TraversalPath.prototype._remove=function _remove(){if(Array.isArray(this.container)){this.container.splice(this.key,1);this.updateSiblingKeys(this.key,-1)}else{this.container[this.key]=null}};TraversalPath.prototype.remove=function remove(){var removeParent=false;if(this.parentPath){if(!removeParent)removeParent=this.parentPath.isExpressionStatement();if(!removeParent)removeParent=this.parentPath.isSequenceExpression()&&this.parent.expressions.length===1;if(removeParent)return this.parentPath.remove()}this._remove();this.removed=true};TraversalPath.prototype.skip=function skip(){this.shouldSkip=true};TraversalPath.prototype.stop=function stop(){this.shouldStop=true;this.shouldSkip=true};TraversalPath.prototype.errorWithNode=function errorWithNode(msg){var Error=arguments[1]===undefined?SyntaxError:arguments[1];var loc=this.node.loc.start;var err=new Error("Line "+loc.line+": "+msg);err.loc=loc;return err};TraversalPath.prototype.replaceInline=function replaceInline(nodes){if(Array.isArray(nodes)){if(Array.isArray(this.container)){nodes=this._verifyNodeList(nodes);this._containerInsertAfter(nodes);return this.remove()}else{return this.replaceWithMultiple(nodes)}}else{return this.replaceWith(nodes)}};TraversalPath.prototype._verifyNodeList=function _verifyNodeList(nodes){if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;i>>=0)?32-x.toString(2).length:32},cosh:function(x){return(exp(x=+x)+exp(-x))/2},expm1:expm1,fround:function(x){return new Float32Array([x])[0]},hypot:function(value1,value2){var sum=0,len1=arguments.length,len2=len1,args=Array(len1),larg=-Infinity,arg;while(len1--){arg=args[len1]=+arguments[len1];if(arg==Infinity||arg==-Infinity)return Infinity;if(arg>larg)larg=arg}larg=arg||1;while(len2--)sum+=pow(args[len2]/larg,2);return larg*sqrt(sum)},imul:function(x,y){var UInt16=65535,xn=+x,yn=+y,xl=UInt16&xn,yl=UInt16&yn;return 0|xl*yl+((UInt16&xn>>>16)*yl+xl*(UInt16&yn>>>16)<<16>>>0)},log1p:function(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:log(1+x)},log10:function(x){return log(x)/Math.LN10},log2:function(x){return log(x)/Math.LN2},sign:sign,sinh:function(x){return abs(x=+x)<1?(expm1(x)-expm1(-x))/2:(exp(x-1)-exp(-x-1))*(E/2)},tanh:function(x){var a=expm1(x=+x),b=expm1(-x);return a==Infinity?1:b==Infinity?-1:(a-b)/(exp(x)+exp(-x))},trunc:function(it){return(it>0?floor:ceil)(it)}})},{"./$.def":219}],260:[function(require,module,exports){"use strict";var $=require("./$"),isObject=$.isObject,isFunction=$.isFunction,NUMBER="Number",Number=$.g[NUMBER],Base=Number,proto=Number.prototype;function toPrimitive(it){var fn,val;if(isFunction(fn=it.valueOf)&&!isObject(val=fn.call(it)))return val;if(isFunction(fn=it.toString)&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to number")}function toNumber(it){if(isObject(it))it=toPrimitive(it);if(typeof it=="string"&&it.length>2&&it.charCodeAt(0)==48){var binary=false;switch(it.charCodeAt(1)){case 66:case 98:binary=true;case 79:case 111:return parseInt(it.slice(2),binary?2:8)}}return+it}if($.FW&&!(Number("0o1")&&Number("0b1"))){Number=function Number(it){return this instanceof Number?new Base(toNumber(it)):toNumber(it)};$.each.call($.DESC?$.getNames(Base):("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,"+"EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,"+"MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger").split(","),function(key){if($.has(Base,key)&&!$.has(Number,key)){$.setDesc(Number,key,$.getDesc(Base,key))}});Number.prototype=proto;proto.constructor=Number;$.hide($.g,NUMBER,Number)}},{"./$":223}],261:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),abs=Math.abs,floor=Math.floor,MAX_SAFE_INTEGER=9007199254740991;function isInteger(it){return!$.isObject(it)&&isFinite(it)&&floor(it)===it}$def($def.S,"Number",{EPSILON:Math.pow(2,-52),isFinite:function(it){return typeof it=="number"&&isFinite(it)},isInteger:isInteger,isNaN:function(number){return number!=number},isSafeInteger:function(number){return isInteger(number)&&abs(number)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MIN_SAFE_INTEGER:-MAX_SAFE_INTEGER,parseFloat:parseFloat,parseInt:parseInt})},{"./$":223,"./$.def":219}],262:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{assign:require("./$.assign")})},{"./$.assign":213,"./$.def":219}],263:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{is:function(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}})},{"./$.def":219}],264:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{setPrototypeOf:require("./$.set-proto")})},{"./$.def":219,"./$.set-proto":228}],265:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),isObject=$.isObject,toObject=$.toObject;function wrapObjectMethod(METHOD,MODE){var fn=($.core.Object||{})[METHOD]||Object[METHOD],f=0,o={};o[METHOD]=MODE==1?function(it){return isObject(it)?fn(it):it}:MODE==2?function(it){return isObject(it)?fn(it):true}:MODE==3?function(it){return isObject(it)?fn(it):false}:MODE==4?function(it,key){return fn(toObject(it),key)}:MODE==5?function(it){return fn(Object($.assertDefined(it)))}:function(it){return fn(toObject(it))};try{fn("z")}catch(e){f=1}$def($def.S+$def.F*f,"Object",o)}wrapObjectMethod("freeze",1);wrapObjectMethod("seal",1);wrapObjectMethod("preventExtensions",1);wrapObjectMethod("isFrozen",2);wrapObjectMethod("isSealed",2);wrapObjectMethod("isExtensible",3);wrapObjectMethod("getOwnPropertyDescriptor",4);wrapObjectMethod("getPrototypeOf",5);wrapObjectMethod("keys");wrapObjectMethod("getOwnPropertyNames")},{"./$":223,"./$.def":219}],266:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),tmp={};tmp[require("./$.wks")("toStringTag")]="z";if($.FW&&cof(tmp)!="z")$.hide(Object.prototype,"toString",function(){return"[object "+cof.classof(this)+"]"})},{"./$":223,"./$.cof":214,"./$.wks":234}],267:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),$def=require("./$.def"),assert=require("./$.assert"),$iter=require("./$.iter"),SPECIES=require("./$.wks")("species"),RECORD=require("./$.uid").safe("record"),forOf=$iter.forOf,PROMISE="Promise",global=$.g,process=global.process,asap=process&&process.nextTick||require("./$.task").set,Promise=global[PROMISE],Base=Promise,isFunction=$.isFunction,isObject=$.isObject,assertFunction=assert.fn,assertObject=assert.obj,test;function getConstructor(C){var S=assertObject(C)[SPECIES];return S!=undefined?S:C}isFunction(Promise)&&isFunction(Promise.resolve)&&Promise.resolve(test=new Promise(function(){}))==test||function(){function isThenable(it){var then;if(isObject(it))then=it.then;return isFunction(then)?then:false}function handledRejectionOrHasOnRejected(promise){var record=promise[RECORD],chain=record.c,i=0,react;if(record.h)return true;while(chain.length>i){react=chain[i++];if(react.fail||handledRejectionOrHasOnRejected(react.P))return true}}function notify(record,isReject){var chain=record.c;if(isReject||chain.length)asap(function(){var promise=record.p,value=record.v,ok=record.s==1,i=0;if(isReject&&!handledRejectionOrHasOnRejected(promise)){setTimeout(function(){if(!handledRejectionOrHasOnRejected(promise)){if(cof(process)=="process"){process.emit("unhandledRejection",value,promise)}else if(global.console&&isFunction(console.error)){console.error("Unhandled promise rejection",value)}}},1e3)}else while(chain.length>i)!function(react){var cb=ok?react.ok:react.fail,ret,then;try{if(cb){if(!ok)record.h=true;ret=cb===true?value:cb(value);if(ret===react.P){react.rej(TypeError(PROMISE+"-chain cycle"))}else if(then=isThenable(ret)){then.call(ret,react.res,react.rej)}else react.res(ret)}else react.rej(value)}catch(err){react.rej(err)}}(chain[i++]);chain.length=0})}function reject(value){var record=this;if(record.d)return;record.d=true;record=record.r||record;record.v=value;record.s=2;notify(record,true)}function resolve(value){var record=this,then,wrapper;if(record.d)return;record.d=true;record=record.r||record;try{if(then=isThenable(value)){wrapper={r:record,d:false};then.call(value,ctx(resolve,wrapper,1),ctx(reject,wrapper,1))}else{record.v=value;record.s=1;notify(record)}}catch(err){reject.call(wrapper||{r:record,d:false},err)}}Promise=function(executor){assertFunction(executor);var record={p:assert.inst(this,Promise,PROMISE),c:[],s:0,d:false,v:undefined,h:false};$.hide(this,RECORD,record);try{executor(ctx(resolve,record,1),ctx(reject,record,1))}catch(err){reject.call(record,err)}};$.mix(Promise.prototype,{then:function(onFulfilled,onRejected){var S=assertObject(assertObject(this).constructor)[SPECIES];var react={ok:isFunction(onFulfilled)?onFulfilled:true,fail:isFunction(onRejected)?onRejected:false};var P=react.P=new(S!=undefined?S:Promise)(function(res,rej){react.res=assertFunction(res);react.rej=assertFunction(rej)});var record=this[RECORD];record.c.push(react);record.s&¬ify(record);return P},"catch":function(onRejected){return this.then(undefined,onRejected)}})}();$def($def.G+$def.W+$def.F*(Promise!=Base),{Promise:Promise});$def($def.S,PROMISE,{reject:function(r){return new(getConstructor(this))(function(res,rej){rej(r)})},resolve:function(x){return isObject(x)&&RECORD in x&&$.getProto(x)===this.prototype?x:new(getConstructor(this))(function(res){res(x)})}});$def($def.S+$def.F*($iter.fail(function(iter){Promise.all(iter)["catch"](function(){})})||$iter.DANGER_CLOSING),PROMISE,{all:function(iterable){var C=getConstructor(this),values=[];return new C(function(resolve,reject){forOf(iterable,false,values.push,values);var remaining=values.length,results=Array(remaining);if(remaining)$.each.call(values,function(promise,index){C.resolve(promise).then(function(value){results[index]=value;--remaining||resolve(results)},reject)});else resolve(results)})},race:function(iterable){var C=getConstructor(this);return new C(function(resolve,reject){forOf(iterable,false,function(promise){C.resolve(promise).then(resolve,reject)})})}});cof.set(Promise,PROMISE);require("./$.species")(Promise)},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.species":229,"./$.task":231,"./$.uid":232,"./$.wks":234}],268:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),setProto=require("./$.set-proto"),$iter=require("./$.iter"),ITER=require("./$.uid").safe("iter"),step=$iter.step,assert=require("./$.assert"),isObject=$.isObject,getDesc=$.getDesc,setDesc=$.setDesc,getProto=$.getProto,apply=Function.apply,assertObject=assert.obj,isExtensible=Object.isExtensible||$.it;function Enumerate(iterated){var keys=[],key;for(key in iterated)keys.push(key);$.set(this,ITER,{o:iterated,a:keys,i:0})}$iter.create(Enumerate,"Object",function(){var iter=this[ITER],keys=iter.a,key;do{if(iter.i>=keys.length)return step(1)}while(!((key=keys[iter.i++])in iter.o));return step(0,key)});function wrap(fn){return function(it){assertObject(it);try{fn.apply(undefined,arguments);return true}catch(e){return false}}}function reflectGet(target,propertyKey){var receiver=arguments.length<3?target:arguments[2],desc=getDesc(assertObject(target),propertyKey),proto;if(desc)return $.has(desc,"value")?desc.value:desc.get===undefined?undefined:desc.get.call(receiver);return isObject(proto=getProto(target))?reflectGet(proto,propertyKey,receiver):undefined}function reflectSet(target,propertyKey,V){var receiver=arguments.length<4?target:arguments[3],ownDesc=getDesc(assertObject(target),propertyKey),existingDescriptor,proto;if(!ownDesc){if(isObject(proto=getProto(target))){return reflectSet(proto,propertyKey,V,receiver)}ownDesc=$.desc(0)}if($.has(ownDesc,"value")){if(ownDesc.writable===false||!isObject(receiver))return false;existingDescriptor=getDesc(receiver,propertyKey)||$.desc(0);existingDescriptor.value=V;setDesc(receiver,propertyKey,existingDescriptor);return true}return ownDesc.set===undefined?false:(ownDesc.set.call(receiver,V),true)}var reflect={apply:require("./$.ctx")(Function.call,apply,3),construct:function(target,argumentsList){var proto=assert.fn(arguments.length<3?target:arguments[2]).prototype,instance=$.create(isObject(proto)?proto:Object.prototype),result=apply.call(target,instance,argumentsList);return isObject(result)?result:instance},defineProperty:wrap(setDesc),deleteProperty:function(target,propertyKey){var desc=getDesc(assertObject(target),propertyKey);return desc&&!desc.configurable?false:delete target[propertyKey]},enumerate:function(target){return new Enumerate(assertObject(target))},get:reflectGet,getOwnPropertyDescriptor:function(target,propertyKey){return getDesc(assertObject(target),propertyKey)},getPrototypeOf:function(target){return getProto(assertObject(target))},has:function(target,propertyKey){return propertyKey in target},isExtensible:function(target){return!!isExtensible(assertObject(target))},ownKeys:require("./$.own-keys"),preventExtensions:wrap(Object.preventExtensions||$.it),set:reflectSet};if(setProto)reflect.setPrototypeOf=function(target,proto){setProto(assertObject(target),proto);return true};$def($def.G,{Reflect:{}});$def($def.S,"Reflect",reflect)},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.own-keys":225,"./$.set-proto":228,"./$.uid":232}],269:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),RegExp=$.g.RegExp,Base=RegExp,proto=RegExp.prototype;if($.FW&&$.DESC){if(!function(){try{return RegExp(/a/g,"i")=="/a/i"}catch(e){}}()){RegExp=function RegExp(pattern,flags){return new Base(cof(pattern)=="RegExp"&&flags!==undefined?pattern.source:pattern,flags)};$.each.call($.getNames(Base),function(key){key in RegExp||$.setDesc(RegExp,key,{configurable:true,get:function(){return Base[key]},set:function(it){Base[key]=it}})});proto.constructor=RegExp;RegExp.prototype=proto;$.hide($.g,"RegExp",RegExp)}if(/./g.flags!="g")$.setDesc(proto,"flags",{configurable:true,get:require("./$.replacer")(/^.*\/(\w*)$/,"$1")})}require("./$.species")(RegExp)},{"./$":223,"./$.cof":214,"./$.replacer":227,"./$.species":229}],270:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Set",{add:function(value){return strong.def(this,value=value===0?0:value,value)}},strong)},{"./$.collection":217,"./$.collection-strong":215}],271:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{codePointAt:require("./$.string-at")(false)})},{"./$.def":219,"./$.string-at":230}],272:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),toLength=$.toLength;$def($def.P,"String",{endsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),endPosition=arguments[1],len=toLength(that.length),end=endPosition===undefined?len:Math.min(toLength(endPosition),len);searchString+="";return that.slice(end-searchString.length,end)===searchString}})},{"./$":223,"./$.cof":214,"./$.def":219}],273:[function(require,module,exports){var $def=require("./$.def"),toIndex=require("./$").toIndex,fromCharCode=String.fromCharCode;$def($def.S,"String",{fromCodePoint:function(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")}})},{"./$":223,"./$.def":219}],274:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{includes:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();return!!~String($.assertDefined(this)).indexOf(searchString,arguments[1])}})},{"./$":223,"./$.cof":214,"./$.def":219}],275:[function(require,module,exports){var set=require("./$").set,at=require("./$.string-at")(true),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step;$iter.std(String,"String",function(iterated){set(this,ITER,{o:String(iterated),i:0})},function(){var iter=this[ITER],O=iter.o,index=iter.i,point;if(index>=O.length)return step(1);point=at.call(O,index);iter.i+=point.length;return step(0,point)})},{"./$":223,"./$.iter":222,"./$.string-at":230,"./$.uid":232}],276:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");$def($def.S,"String",{raw:function(callSite){var raw=$.toObject(callSite.raw),len=$.toLength(raw.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(raw[i++]));if(i0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}})},{"./$":223,"./$.def":219}],278:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{startsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),index=$.toLength(Math.min(arguments[1],that.length));searchString+="";return that.slice(index,index+searchString.length)===searchString}})},{"./$":223,"./$.cof":214,"./$.def":219}],279:[function(require,module,exports){"use strict";var $=require("./$"),setTag=require("./$.cof").set,uid=require("./$.uid"),$def=require("./$.def"),keyOf=require("./$.keyof"),has=$.has,hide=$.hide,getNames=$.getNames,toObject=$.toObject,Symbol=$.g.Symbol,Base=Symbol,setter=false,TAG=uid.safe("tag"),SymbolRegistry={},AllSymbols={};function wrap(tag){var sym=AllSymbols[tag]=$.set($.create(Symbol.prototype),TAG,tag);$.DESC&&setter&&$.setDesc(Object.prototype,tag,{configurable:true,set:function(value){hide(this,tag,value)}});return sym}if(!$.isFunction(Symbol)){Symbol=function(description){if(this instanceof Symbol)throw TypeError("Symbol is not a constructor");return wrap(uid(description))};hide(Symbol.prototype,"toString",function(){return this[TAG]})}$def($def.G+$def.W,{Symbol:Symbol});var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=Symbol(key)},keyFor:function(key){return keyOf(SymbolRegistry,key)},pure:uid.safe,set:$.set,useSetter:function(){setter=true},useSimple:function(){setter=false}};$.each.call(("hasInstance,isConcatSpreadable,iterator,match,replace,search,"+"species,split,toPrimitive,toStringTag,unscopables").split(","),function(it){var sym=require("./$.wks")(it);symbolStatics[it]=Symbol===Base?sym:wrap(sym)});setter=true;$def($def.S,"Symbol",symbolStatics);$def($def.S+$def.F*(Symbol!=Base),"Object",{getOwnPropertyNames:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])||result.push(key);return result},getOwnPropertySymbols:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])&&result.push(AllSymbols[key]);return result}});setTag(Symbol,"Symbol");setTag(Math,"Math",true);setTag($.g.JSON,"JSON",true)},{"./$":223,"./$.cof":214,"./$.def":219,"./$.keyof":224,"./$.uid":232,"./$.wks":234}],280:[function(require,module,exports){"use strict";var $=require("./$"),weak=require("./$.collection-weak"),leakStore=weak.leakStore,ID=weak.ID,WEAK=weak.WEAK,has=$.has,isObject=$.isObject,isFrozen=Object.isFrozen||$.core.Object.isFrozen,tmp={};var WeakMap=require("./$.collection")("WeakMap",{get:function(key){if(isObject(key)){if(isFrozen(key))return leakStore(this).get(key);if(has(key,WEAK))return key[WEAK][this[ID]]}},set:function(key,value){return weak.def(this,key,value)}},weak,true,true);if($.FW&&(new WeakMap).set((Object.freeze||Object)(tmp),7).get(tmp)!=7){$.each.call(["delete","has","get","set"],function(key){var method=WeakMap.prototype[key];WeakMap.prototype[key]=function(a,b){if(isObject(a)&&isFrozen(a)){var result=leakStore(this)[key](a,b);return key=="set"?this:result}return method.call(this,a,b)}})}},{"./$":223,"./$.collection":217,"./$.collection-weak":216}],281:[function(require,module,exports){"use strict";var weak=require("./$.collection-weak");require("./$.collection")("WeakSet",{add:function(value){return weak.def(this,value,true)}},weak,false,true)},{"./$.collection":217,"./$.collection-weak":216}],282:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{includes:require("./$.array-includes")(true)});require("./$.unscope")("includes")},{"./$.array-includes":210,"./$.def":219,"./$.unscope":233}],283:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),ownKeys=require("./$.own-keys");$def($def.S,"Object",{getOwnPropertyDescriptors:function(object){var O=$.toObject(object),result={};$.each.call(ownKeys(O),function(key){$.setDesc(result,key,$.desc(0,$.getDesc(O,key)))});return result}})},{"./$":223,"./$.def":219,"./$.own-keys":225}],284:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");function createObjectToArray(isEntries){return function(object){var O=$.toObject(object),keys=$.getKeys(object),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}$def($def.S,"Object",{values:createObjectToArray(false),entries:createObjectToArray(true)})},{"./$":223,"./$.def":219}],285:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"RegExp",{escape:require("./$.replacer")(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",true)})},{"./$.def":219,"./$.replacer":227}],286:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{at:require("./$.string-at")(true)})},{"./$.def":219,"./$.string-at":230}],287:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),core=$.core,statics={};function setStatics(keys,length){$.each.call(keys.split(","),function(key){if(length==undefined&&key in core.Array)statics[key]=core.Array[key];else if(key in[])statics[key]=require("./$.ctx")(Function.call,[][key],length)})}setStatics("pop,reverse,shift,keys,values,entries",1);setStatics("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);setStatics("join,slice,concat,push,splice,unshift,sort,lastIndexOf,"+"reduce,reduceRight,copyWithin,fill,turn");$def($def.S,"Array",statics)},{"./$":223,"./$.ctx":218,"./$.def":219}],288:[function(require,module,exports){require("./es6.array.iterator");var $=require("./$"),Iterators=require("./$.iter").Iterators,ITERATOR=require("./$.wks")("iterator"),NodeList=$.g.NodeList;if($.FW&&NodeList&&!(ITERATOR in NodeList.prototype)){$.hide(NodeList.prototype,ITERATOR,Iterators.Array)}Iterators.NodeList=Iterators.Array},{"./$":223,"./$.iter":222,"./$.wks":234,"./es6.array.iterator":254}],289:[function(require,module,exports){var $def=require("./$.def"),$task=require("./$.task");$def($def.G+$def.B,{setImmediate:$task.set,clearImmediate:$task.clear})},{"./$.def":219,"./$.task":231}],290:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),invoke=require("./$.invoke"),partial=require("./$.partial"),MSIE=!!$.g.navigator&&/MSIE .\./.test(navigator.userAgent);function wrap(set){return MSIE?function(fn,time){return set(invoke(partial,[].slice.call(arguments,2),$.isFunction(fn)?fn:Function(fn)),time)}:set}$def($def.G+$def.B+$def.F*MSIE,{setTimeout:wrap($.g.setTimeout),setInterval:wrap($.g.setInterval)})},{"./$":223,"./$.def":219,"./$.invoke":221,"./$.partial":226}],291:[function(require,module,exports){require("./modules/es5");require("./modules/es6.symbol");require("./modules/es6.object.assign");require("./modules/es6.object.is");require("./modules/es6.object.set-prototype-of");require("./modules/es6.object.to-string");require("./modules/es6.object.statics-accept-primitives");require("./modules/es6.function.name");require("./modules/es6.number.constructor");require("./modules/es6.number.statics");require("./modules/es6.math");require("./modules/es6.string.from-code-point");require("./modules/es6.string.raw");require("./modules/es6.string.iterator");require("./modules/es6.string.code-point-at");require("./modules/es6.string.ends-with");require("./modules/es6.string.includes");require("./modules/es6.string.repeat");require("./modules/es6.string.starts-with");require("./modules/es6.array.from");require("./modules/es6.array.of");require("./modules/es6.array.iterator");require("./modules/es6.array.species");require("./modules/es6.array.copy-within");require("./modules/es6.array.fill");require("./modules/es6.array.find");require("./modules/es6.array.find-index");require("./modules/es6.regexp");require("./modules/es6.promise");require("./modules/es6.map");require("./modules/es6.set");require("./modules/es6.weak-map");require("./modules/es6.weak-set");require("./modules/es6.reflect");require("./modules/es7.array.includes");require("./modules/es7.string.at");require("./modules/es7.regexp.escape");require("./modules/es7.object.get-own-property-descriptors");require("./modules/es7.object.to-array");require("./modules/js.array.statics");require("./modules/web.timers");require("./modules/web.immediate");require("./modules/web.dom.iterable");module.exports=require("./modules/$").core},{"./modules/$":223,"./modules/es5":248,"./modules/es6.array.copy-within":249,"./modules/es6.array.fill":250,"./modules/es6.array.find":252,"./modules/es6.array.find-index":251,"./modules/es6.array.from":253,"./modules/es6.array.iterator":254,"./modules/es6.array.of":255,"./modules/es6.array.species":256,"./modules/es6.function.name":257,"./modules/es6.map":258,"./modules/es6.math":259,"./modules/es6.number.constructor":260,"./modules/es6.number.statics":261,"./modules/es6.object.assign":262,"./modules/es6.object.is":263,"./modules/es6.object.set-prototype-of":264,"./modules/es6.object.statics-accept-primitives":265,"./modules/es6.object.to-string":266,"./modules/es6.promise":267,"./modules/es6.reflect":268,"./modules/es6.regexp":269,"./modules/es6.set":270,"./modules/es6.string.code-point-at":271,"./modules/es6.string.ends-with":272,"./modules/es6.string.from-code-point":273,"./modules/es6.string.includes":274,"./modules/es6.string.iterator":275,"./modules/es6.string.raw":276,"./modules/es6.string.repeat":277,"./modules/es6.string.starts-with":278,"./modules/es6.symbol":279,"./modules/es6.weak-map":280,"./modules/es6.weak-set":281,"./modules/es7.array.includes":282,"./modules/es7.object.get-own-property-descriptors":283,"./modules/es7.object.to-array":284,"./modules/es7.regexp.escape":285,"./modules/es7.string.at":286,"./modules/js.array.statics":287,"./modules/web.dom.iterable":288,"./modules/web.immediate":289,"./modules/web.timers":290}],292:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;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]){args=["%o"].concat(args)}var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);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}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(msmaxUsed||u===maxUsed&&w>maxWeight){maxUsed=u;maxWeight=w;result=+n}}return result}module.exports=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}var tabs=0;var spaces=0;var prev=0;var indents={};var current;var isIndent;str.split(/\n/g).forEach(function(line){if(!line){return}var indent;var matches=line.match(INDENT_RE);if(!matches){indent=0; +if(!node){throw new Error("Node list has falsy node with the index of "+i)}else if(typeof node!=="object"){throw new Error("Node list contains a non-object node with the index of "+i)}else if(!node.type){throw new Error("Node list contains a node without a type with the index of "+i)}}return nodes};TraversalPath.prototype.replaceWithMultiple=function replaceWithMultiple(nodes){nodes=this._verifyNodeList(nodes);t.inheritsComments(nodes[0],this.node);this.container[this.key]=null;this.insertAfter(nodes);if(!this.node)this.remove()};TraversalPath.prototype.replaceWith=function replaceWith(replacement,arraysAllowed){if(this.removed){throw new Error("You can't replace this node, we've already removed it")}if(!replacement){throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead")}if(Array.isArray(replacement)){if(arraysAllowed){return this.replaceWithMultiple(replacement)}else{throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`")}}if(this.isPreviousType("Expression")&&t.isStatement(replacement)){return this.replaceExpressionWithStatements([replacement])}var oldNode=this.node;if(oldNode)t.inheritsComments(replacement,oldNode);this.container[this.key]=replacement;this.type=replacement.type;this.setScope();this.checkNodes([replacement])};TraversalPath.prototype.checkNodes=function checkNodes(nodes){var scope=this.scope;var file=scope&&scope.file;if(!file)return;for(var i=0;i-1};TraversalPath.prototype.visit=function visit(){if(this.isBlacklisted())return false;this.call("enter");if(this.shouldSkip){return this.shouldStop}var node=this.node;var opts=this.opts;if(node){if(Array.isArray(node)){for(var i=0;iparts.length;i++){var part=parts[i];if(part==="."){path=path.parentPath}else{path=path.get(parts[i])}}return path}};TraversalPath.prototype.has=function has(key){return!!this.node[key]};TraversalPath.prototype.is=function is(key){return this.has(key)};TraversalPath.prototype.isnt=function isnt(key){return!this.has(key)};TraversalPath.prototype.getTypeAnnotation=function getTypeAnnotation(){if(this.typeInfo){return this.typeInfo}var info=this.typeInfo={inferred:false,annotation:null};var type=this.node.typeAnnotation;if(!type){info.inferred=true;type=this.inferType(this)}if(type){if(t.isTypeAnnotation(type))type=type.typeAnnotation;info.annotation=type}return info};TraversalPath.prototype.resolve=function resolve(){if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve()}else{}}else if(this.isIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding||!binding.constant)return;return;if(binding.path===this){return this}else{return binding.path.resolve()}}else if(this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve();if(!target||!target.isObjectExpression())return;var props=target.get("properties");for(var i=0;iparts.length){return false}}return true};_createClass(TraversalPath,{node:{get:function(){if(this.removed){return null}else{return this.container[this.key]}},set:function(replacement){throw new Error("Don't use `path.node = newNode;`, use `path.replaceWith(newNode)` or `path.replaceWithMultiple([newNode])`")}}});return TraversalPath}();module.exports=TraversalPath;assign(TraversalPath.prototype,require("./evaluation"));assign(TraversalPath.prototype,require("./conversion"));for(var i=0;i1)id+=i;return"_"+id};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.file.uids[name])return true;scope=scope.parent}while(scope);return false};Scope.prototype.generateUidBasedOnNode=function generateUidBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function(_add){var _addWrapper=function add(_x){return _add.apply(this,arguments)};_addWrapper.toString=function(){return _add.toString()};return _addWrapper}(function(node){if(t.isModuleDeclaration(node)){if(node.specifiers&&node.specifiers.length){for(var i=0;i0;current=indents[isIndent?diff:-diff];if(current){current[0]++}else{current=indents[diff]=[1,0]}}else if(current){current[1]+=+isIndent}});var amount=getMostUsed(indents);var type;var actual;if(!amount){type=null;actual=""}else if(spaces>=tabs){type="space";actual=repeating(" ",amount)}else{type="tab";actual=repeating(" ",amount)}return{amount:amount,type:type,indent:actual}}},{repeating:437}],296:[function(require,module,exports){(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(["exports"],factory)}else if(typeof exports!=="undefined"){factory(exports)}else{factory(root.estraverse={})}})(this,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);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=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()){key=element.ref.key;parent=element.ref.parent;i=worklist.length;while(i--){nextElem=worklist[i];if(nextElem.ref&&nextElem.ref.parent===parent){if(nextElem.ref.key=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){var comments=[],comment,len,i,cursor;if(!tree.range){throw new Error("attachComments needs range information")}if(!tokens.length){if(providedComments.length){for(i=0,len=providedComments.length;inode.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}}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(cursornode.range[1]){return VisitorOption.Skip}}});return tree}exports.version="1.8.1-dev";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})},{}],297:[function(require,module,exports){(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}})()},{}],298:[function(require,module,exports){(function(){"use strict";var Regex,NON_ASCII_WHITESPACES;Regex={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function isDecimalDigit(ch){return ch>=48&&ch<=57}function isHexDigit(ch){return isDecimalDigit(ch)||97<=ch&&ch<=102||65<=ch&&ch<=70}function isOctalDigit(ch){return ch>=48&&ch<=55}NON_ASCII_WHITESPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&NON_ASCII_WHITESPACES.indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function isIdentifierStart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))}function isIdentifierPart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch>=48&&ch<=57||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))}module.exports={isDecimalDigit:isDecimalDigit,isHexDigit:isHexDigit,isOctalDigit:isOctalDigit,isWhiteSpace:isWhiteSpace,isLineTerminator:isLineTerminator,isIdentifierStart:isIdentifierStart,isIdentifierPart:isIdentifierPart}})()},{}],299:[function(require,module,exports){(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){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){return false}for(i=1,iz=id.length;i!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g;module.exports.matchToToken=function(match){token={type:"invalid",value:match[0]};if(match[1])token.type="string",token.closed=!!(match[3]||match[4]);else if(match[5])token.type="comment";else if(match[6])token.type="comment",token.closed=!!match[7];else if(match[8])token.type="regex";else if(match[9])token.type="number";else if(match[10])token.type="name";else if(match[11])token.type="punctuator";else if(match[12])token.type="whitespace";return token}},{}],307:[function(require,module,exports){var arr=[];var charCodeCache=[];module.exports=function(a,b){if(a===b){return 0}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen}if(bLen===0){return aLen}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(iret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2}}return ret}},{}],308:[function(require,module,exports){var leftPad=require("left-pad");function get(options,key,defaultValue){return key in options?options[key]:defaultValue}function lineNumbers(code,options){var getOption=get.bind(null,options||{});var transform=getOption("transform",Function.prototype);var padding=getOption("padding"," ");var before=getOption("before"," ");var after=getOption("after"," | ");var start=getOption("start",1);var isArray=Array.isArray(code);var lines=isArray?code:code.split("\n");var end=start+lines.length-1;var width=String(end).length;var numbered=lines.map(function(line,index){var number=start+index;var params={before:before,number:number,width:width,after:after,line:line};transform(params);return params.before+leftPad(params.number,width,padding)+params.after+params.line});return isArray?numbered:numbered.join("\n")}module.exports=lineNumbers},{"left-pad":309}],309:[function(require,module,exports){module.exports=leftpad;function leftpad(str,len,ch){str=String(str);var i=-1;ch||(ch=" ");len=len-str.length;while(++i-1){splice.call(array,fromIndex,1)}}return array}module.exports=pull},{"../internal/baseIndexOf":345}],314:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseUniq=require("../internal/baseUniq"),isIterateeCall=require("../internal/isIterateeCall"),sortedUniq=require("../internal/sortedUniq");function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(isSorted!=null&&typeof isSorted!="boolean"){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?null:isSorted;isSorted=false}iteratee=iteratee==null?iteratee:baseCallback(iteratee,thisArg,3);return isSorted?sortedUniq(array,iteratee):baseUniq(array,iteratee)}module.exports=uniq},{"../internal/baseCallback":333,"../internal/baseUniq":360,"../internal/isIterateeCall":382,"../internal/sortedUniq":388}],315:[function(require,module,exports){module.exports=require("./includes")},{"./includes":319}],316:[function(require,module,exports){module.exports=require("./forEach")},{"./forEach":317}],317:[function(require,module,exports){var arrayEach=require("../internal/arrayEach"),baseEach=require("../internal/baseEach"),createForEach=require("../internal/createForEach");var forEach=createForEach(arrayEach,baseEach);module.exports=forEach},{"../internal/arrayEach":327,"../internal/baseEach":337,"../internal/createForEach":372}],318:[function(require,module,exports){var createAggregator=require("../internal/createAggregator");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value)}else{result[key]=[value]}});module.exports=groupBy},{"../internal/createAggregator":367}],319:[function(require,module,exports){var baseIndexOf=require("../internal/baseIndexOf"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength"),isString=require("../lang/isString"),values=require("../object/values");var nativeMax=Math.max;function includes(collection,target,fromIndex,guard){var length=collection?collection.length:0;if(!isLength(length)){collection=values(collection);length=collection.length}if(!length){return false}if(typeof fromIndex!="number"||guard&&isIterateeCall(target,fromIndex,guard)){fromIndex=0}else{fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex-1:baseIndexOf(collection,target,fromIndex)>-1}module.exports=includes},{"../internal/baseIndexOf":345,"../internal/isIterateeCall":382,"../internal/isLength":383,"../lang/isArray":392,"../lang/isString":401,"../object/values":411}],320:[function(require,module,exports){var arrayMap=require("../internal/arrayMap"),baseCallback=require("../internal/baseCallback"),baseMap=require("../internal/baseMap"),isArray=require("../lang/isArray");function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=baseCallback(iteratee,thisArg,3);return func(collection,iteratee)}module.exports=map},{"../internal/arrayMap":328,"../internal/baseCallback":333,"../internal/baseMap":350,"../lang/isArray":392}],321:[function(require,module,exports){var arrayReduceRight=require("../internal/arrayReduceRight"),baseEachRight=require("../internal/baseEachRight"),createReduce=require("../internal/createReduce");var reduceRight=createReduce(arrayReduceRight,baseEachRight);module.exports=reduceRight},{"../internal/arrayReduceRight":329,"../internal/baseEachRight":338,"../internal/createReduce":373}],322:[function(require,module,exports){var arraySome=require("../internal/arraySome"),baseCallback=require("../internal/baseCallback"),baseSome=require("../internal/baseSome"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall");function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=null}if(typeof predicate!="function"||typeof thisArg!="undefined"){predicate=baseCallback(predicate,thisArg,3)}return func(collection,predicate)}module.exports=some},{"../internal/arraySome":330,"../internal/baseCallback":333,"../internal/baseSome":357,"../internal/isIterateeCall":382,"../lang/isArray":392}],323:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseEach=require("../internal/baseEach"),baseSortBy=require("../internal/baseSortBy"),compareAscending=require("../internal/compareAscending"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength");function sortBy(collection,iteratee,thisArg){if(collection==null){return[]}var index=-1,length=collection.length,result=isLength(length)?Array(length):[];if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=null}iteratee=baseCallback(iteratee,thisArg,3);baseEach(collection,function(value,key,collection){result[++index]={criteria:iteratee(value,key,collection),index:index,value:value}});return baseSortBy(result,compareAscending)}module.exports=sortBy},{"../internal/baseCallback":333,"../internal/baseEach":337,"../internal/baseSortBy":358,"../internal/compareAscending":366,"../internal/isIterateeCall":382,"../internal/isLength":383}],324:[function(require,module,exports){var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max;function restParam(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=nativeMax(typeof start=="undefined"?func.length-1:+start||0,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);while(++indexother||!valIsReflexive||typeof value=="undefined"&&othIsReflexive){return 1}if(value-1;return false}each(t.VISITOR_KEYS,function(keys,type){if(t.BUILDER_KEYS[type])return;var defs={};each(keys,function(key){defs[key]=null});t.BUILDER_KEYS[type]=defs});each(t.BUILDER_KEYS,function(keys,type){t[type[0].toLowerCase()+type.slice(1)]=function(){var node={};node.start=null;node.type=type;var i=0;for(var key in keys){var arg=arguments[i++];if(arg===undefined)arg=keys[key];node[key]=arg}return node}});function shallowEqual(actual,expected){var keys=Object.keys(expected);for(var i=0;iparts.length){return false}}return true}}function removeComments(child){each(COMMENT_KEYS,function(key){delete child[key]});return child}function inheritsComments(child,parent){if(child&&parent){each(COMMENT_KEYS,function(key){child[key]=uniq(compact([].concat(child[key],parent[key])))})}return child}function inherits(child,parent){if(!child||!parent)return child;child._declarations=parent._declarations;child._scopeInfo=parent._scopeInfo;child.range=parent.range;child.start=parent.start;child.loc=parent.loc;child.end=parent.end;child.typeAnnotation=parent.typeAnnotation;child.returnType=parent.returnType;t.inheritsComments(child,parent);return child}toFastProperties(t);toFastProperties(t.VISITOR_KEYS);exports.__esModule=true;assign(t,require("./retrievers"));assign(t,require("./validators"));assign(t,require("./converters"))},{"./alias-keys":150,"./builder-keys":151,"./converters":152,"./retrievers":154,"./validators":155,"./visitor-keys":156,"lodash/array/compact":310,"lodash/array/uniq":314,"lodash/collection/each":316,"lodash/object/assign":404,"to-fast-properties":452}],154:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.getBindingIdentifiers=getBindingIdentifiers;exports.getLastStatements=getLastStatements;exports.__esModule=true;var object=_interopRequire(require("../helpers/object"));var t=_interopRequireWildcard(require("./index"));function getBindingIdentifiers(node){var search=[].concat(node);var ids=object();while(search.length){var id=search.shift();if(!id)continue;var keys=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){ids[id.name]=id}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(keys){for(var i=0;i1)return ast.body;var node=ast.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}}function parseTemplate(loc,code){var ast=parse({filename:loc,looseModules:true},code).program;ast=traverse.removeProperties(ast);return ast}function loadTemplates(){var templates={};var templatesLoc=path.join(__dirname,"transformation/templates");if(!fs.existsSync(templatesLoc)){throw new ReferenceError(messages.get("missingTemplatesDirectory"))}each(fs.readdirSync(templatesLoc),function(name){if(name[0]===".")return;var key=path.basename(name,path.extname(name));var loc=path.join(templatesLoc,name);var code=fs.readFileSync(loc,"utf8");templates[key]=parseTemplate(loc,code)});return templates}try{exports.templates=require("../../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}}).call(this,require("_process"),"/lib/babel")},{"../../templates.json":455,"./helpers/parse":42,"./messages":43,"./patch":44,"./traversal":144,"./types":153,_process:183,"debug/node":293,fs:172,"lodash/collection/contains":315,"lodash/collection/each":316,"lodash/lang/cloneDeep":390,"lodash/lang/isBoolean":393,"lodash/lang/isEmpty":394,"lodash/lang/isRegExp":400,"lodash/lang/isString":401,"lodash/object/has":407,"lodash/string/escapeRegExp":412,minimatch:416,module:172,path:182,util:199}],158:[function(require,module,exports){var types=require("../lib/types");var Type=types.Type;var def=Type.def;var or=Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var isRegExp=builtin.RegExp;var shared=require("../lib/shared");var defaults=shared.defaults;var geq=shared.geq;def("Printable").field("loc",or(def("SourceLocation"),null),defaults["null"],true);def("Node").bases("Printable").field("type",isString).field("comments",or([def("Comment")],null),defaults["null"],true);def("SourceLocation").build("start","end","source").field("start",def("Position")).field("end",def("Position")).field("source",or(isString,null),defaults["null"]);def("Position").build("line","column").field("line",geq(1)).field("column",geq(0));def("Program").bases("Node").build("body").field("body",[def("Statement")]);def("Function").bases("Node").field("id",or(def("Identifier"),null),defaults["null"]).field("params",[def("Pattern")]).field("body",def("BlockStatement"));def("Statement").bases("Node");def("EmptyStatement").bases("Statement").build();def("BlockStatement").bases("Statement").build("body").field("body",[def("Statement")]);def("ExpressionStatement").bases("Statement").build("expression").field("expression",def("Expression"));def("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Statement")).field("alternate",or(def("Statement"),null),defaults["null"]);def("LabeledStatement").bases("Statement").build("label","body").field("label",def("Identifier")).field("body",def("Statement"));def("BreakStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("ContinueStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("WithStatement").bases("Statement").build("object","body").field("object",def("Expression")).field("body",def("Statement"));def("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",def("Expression")).field("cases",[def("SwitchCase")]).field("lexical",isBoolean,defaults["false"]);def("ReturnStatement").bases("Statement").build("argument").field("argument",or(def("Expression"),null));def("ThrowStatement").bases("Statement").build("argument").field("argument",def("Expression"));def("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",def("BlockStatement")).field("handler",or(def("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[def("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[def("CatchClause")],defaults.emptyArray).field("finalizer",or(def("BlockStatement"),null),defaults["null"]);def("CatchClause").bases("Node").build("param","guard","body").field("param",def("Pattern")).field("guard",or(def("Expression"),null),defaults["null"]).field("body",def("BlockStatement"));def("WhileStatement").bases("Statement").build("test","body").field("test",def("Expression")).field("body",def("Statement"));def("DoWhileStatement").bases("Statement").build("body","test").field("body",def("Statement")).field("test",def("Expression"));def("ForStatement").bases("Statement").build("init","test","update","body").field("init",or(def("VariableDeclaration"),def("Expression"),null)).field("test",or(def("Expression"),null)).field("update",or(def("Expression"),null)).field("body",def("Statement"));def("ForInStatement").bases("Statement").build("left","right","body","each").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement")).field("each",isBoolean);def("DebuggerStatement").bases("Statement").build();def("Declaration").bases("Statement");def("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",def("Identifier"));def("FunctionExpression").bases("Function","Expression").build("id","params","body");def("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",or("var","let","const")).field("declarations",[or(def("VariableDeclarator"),def("Identifier"))]);def("VariableDeclarator").bases("Node").build("id","init").field("id",def("Pattern")).field("init",or(def("Expression"),null));def("Expression").bases("Node","Pattern");def("ThisExpression").bases("Expression").build();def("ArrayExpression").bases("Expression").build("elements").field("elements",[or(def("Expression"),null)]);def("ObjectExpression").bases("Expression").build("properties").field("properties",[def("Property")]);def("Property").bases("Node").build("kind","key","value").field("kind",or("init","get","set")).field("key",or(def("Literal"),def("Identifier"))).field("value",or(def("Expression"),def("Pattern")));def("SequenceExpression").bases("Expression").build("expressions").field("expressions",[def("Expression")]);var UnaryOperator=or("-","+","!","~","typeof","void","delete");def("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",UnaryOperator).field("argument",def("Expression")).field("prefix",isBoolean,defaults["true"]);var BinaryOperator=or("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");def("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",BinaryOperator).field("left",def("Expression")).field("right",def("Expression"));var AssignmentOperator=or("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");def("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",AssignmentOperator).field("left",def("Pattern")).field("right",def("Expression"));var UpdateOperator=or("++","--");def("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",UpdateOperator).field("argument",def("Expression")).field("prefix",isBoolean);var LogicalOperator=or("||","&&");def("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",LogicalOperator).field("left",def("Expression")).field("right",def("Expression"));def("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Expression")).field("alternate",def("Expression"));def("NewExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("CallExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("MemberExpression").bases("Expression").build("object","property","computed").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("Pattern").bases("Node");def("ObjectPattern").bases("Pattern").build("properties").field("properties",[or(def("PropertyPattern"),def("Property"))]);def("PropertyPattern").bases("Pattern").build("key","pattern").field("key",or(def("Literal"),def("Identifier"))).field("pattern",def("Pattern"));def("ArrayPattern").bases("Pattern").build("elements").field("elements",[or(def("Pattern"),null)]);def("SwitchCase").bases("Node").build("test","consequent").field("test",or(def("Expression"),null)).field("consequent",[def("Statement")]);def("Identifier").bases("Node","Expression","Pattern").build("name").field("name",isString);def("Literal").bases("Node","Expression").build("value").field("value",or(isString,isBoolean,null,isNumber,isRegExp));def("Comment").bases("Printable").field("value",isString).field("leading",isBoolean,defaults["true"]).field("trailing",isBoolean,defaults["false"]);def("Block").bases("Comment").build("value","leading","trailing");def("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":169,"../lib/types":170}],159:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;def("XMLDefaultDeclaration").bases("Declaration").field("namespace",def("Expression"));def("XMLAnyName").bases("Expression");def("XMLQualifiedIdentifier").bases("Expression").field("left",or(def("Identifier"),def("XMLAnyName"))).field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLAttributeSelector").bases("Expression").field("attribute",def("Expression"));def("XMLFilterExpression").bases("Expression").field("left",def("Expression")).field("right",def("Expression"));def("XMLElement").bases("XML","Expression").field("contents",[def("XML")]);def("XMLList").bases("XML","Expression").field("contents",[def("XML")]);def("XML").bases("Node");def("XMLEscape").bases("XML").field("expression",def("Expression"));def("XMLText").bases("XML").field("text",isString);def("XMLStartTag").bases("XML").field("contents",[def("XML")]);def("XMLEndTag").bases("XML").field("contents",[def("XML")]);def("XMLPointTag").bases("XML").field("contents",[def("XML")]);def("XMLName").bases("XML").field("contents",or(isString,[def("XML")]));def("XMLAttribute").bases("XML").field("value",isString);def("XMLCdata").bases("XML").field("contents",isString);def("XMLComment").bases("XML").field("contents",isString);def("XMLProcessingInstruction").bases("XML").field("target",isString).field("contents",or(isString,null))},{"../lib/types":170,"./core":158}],160:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes; -},{"../lang/isArguments":391,"../lang/isArray":392,"../lang/isPlainObject":399,"../lang/isTypedArray":402,"../lang/toPlainObject":403,"./arrayCopy":326,"./isLength":383}],355:[function(require,module,exports){function baseProperty(key){return function(object){return object==null?undefined:object[key]}}module.exports=baseProperty},{}],356:[function(require,module,exports){function baseReduce(collection,iteratee,accumulator,initFromCollection,eachFunc){eachFunc(collection,function(value,index,collection){accumulator=initFromCollection?(initFromCollection=false,value):iteratee(accumulator,value,index,collection)});return accumulator}module.exports=baseReduce},{}],357:[function(require,module,exports){var baseEach=require("./baseEach");function baseSome(collection,predicate){var result;baseEach(collection,function(value,index,collection){result=predicate(value,index,collection);return!result});return!!result}module.exports=baseSome},{"./baseEach":337}],358:[function(require,module,exports){function baseSortBy(array,comparer){var length=array.length;array.sort(comparer);while(length--){array[length]=array[length].value}return array}module.exports=baseSortBy},{}],359:[function(require,module,exports){function baseToString(value){if(typeof value=="string"){return value}return value==null?"":value+""}module.exports=baseToString},{}],360:[function(require,module,exports){var baseIndexOf=require("./baseIndexOf"),cacheIndexOf=require("./cacheIndexOf"),createCache=require("./createCache");function baseUniq(array,iteratee){var index=-1,indexOf=baseIndexOf,length=array.length,isCommon=true,isLarge=isCommon&&length>=200,seen=isLarge?createCache():null,result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index3&&typeof customizer=="function"){customizer=bindCallback(customizer,thisArg,5);length-=2}else{customizer=length>2&&typeof thisArg=="function"?thisArg:null;length-=customizer?1:0}if(guard&&isIterateeCall(args[1],args[2],guard)){customizer=length==3?null:customizer;length=2}var index=0;while(++indexarrLength)){return false}while(result&&++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}module.exports=isLength},{}],384:[function(require,module,exports){function isObjectLike(value){return!!value&&typeof value=="object"}module.exports=isObjectLike},{}],385:[function(require,module,exports){var isObject=require("../lang/isObject");function isStrictComparable(value){return value===value&&(value===0?1/value>0:!isObject(value))}module.exports=isStrictComparable},{"../lang/isObject":398}],386:[function(require,module,exports){var baseForIn=require("./baseForIn"),isObjectLike=require("./isObjectLike");var objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;function shimIsPlainObject(value){var Ctor;if(!(isObjectLike(value)&&objToString.call(value)==objectTag)||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;baseForIn(value,function(subValue,key){result=key});return typeof result=="undefined"||hasOwnProperty.call(value,result)}module.exports=shimIsPlainObject},{"./baseForIn":341,"./isObjectLike":384}],387:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isIndex=require("./isIndex"),isLength=require("./isLength"),keysIn=require("../object/keysIn"),support=require("../support");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length;var allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object));var index=-1,result=[];while(++index0;while(++indexnp){return true}if(pp===np&&this.name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&this.name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&parent.callee===node;case"ConditionalExpression":return this.name==="test"&&parent.test===node;case"MemberExpression":return this.name==="object"&&parent.object===node;default:return false}default:if(parent.type==="NewExpression"&&this.name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}NPp.canBeFirstInStatement=function(){var node=this.node;return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};NPp.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(path){for(var node,parent;path.parent;path=path.parent){node=path.node;parent=path.parent.node;if(n.BlockStatement.check(parent)&&path.parent.name==="body"&&path.name===0){assert.strictEqual(parent.body[0],node);return true}if(n.ExpressionStatement.check(parent)&&path.name==="expression"){assert.strictEqual(parent.expression,node);return true}if(n.SequenceExpression.check(parent)&&path.parent.name==="expressions"&&path.name===0){assert.strictEqual(parent.expressions[0],node);continue}if(n.CallExpression.check(parent)&&path.name==="callee"){assert.strictEqual(parent.callee,node);continue}if(n.MemberExpression.check(parent)&&path.name==="object"){assert.strictEqual(parent.object,node);continue}if(n.ConditionalExpression.check(parent)&&path.name==="test"){assert.strictEqual(parent.test,node);continue}if(isBinary(parent)&&path.name==="left"){assert.strictEqual(parent.left,node);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&path.name==="argument"){assert.strictEqual(parent.argument,node);continue}return false}return true}function cleanUpNodesAfterPrune(remainingNodePath){if(n.VariableDeclaration.check(remainingNodePath.node)){var declarations=remainingNodePath.get("declarations").value;if(!declarations||declarations.length===0){return remainingNodePath.prune()}}else if(n.ExpressionStatement.check(remainingNodePath.node)){if(!remainingNodePath.get("expression").value){return remainingNodePath.prune()}}else if(n.IfStatement.check(remainingNodePath.node)){cleanUpIfStatementAfterPrune(remainingNodePath)}return remainingNodePath}function cleanUpIfStatementAfterPrune(ifStatement){var testExpression=ifStatement.get("test").value;var alternate=ifStatement.get("alternate").value;var consequent=ifStatement.get("consequent").value;if(!consequent&&!alternate){var testExpressionStatement=b.expressionStatement(testExpression);ifStatement.replace(testExpressionStatement)}else if(!consequent&&alternate){var negatedTestExpression=b.unaryExpression("!",testExpression,true);if(n.UnaryExpression.check(testExpression)&&testExpression.operator==="!"){negatedTestExpression=testExpression.argument}ifStatement.get("test").replace(negatedTestExpression);ifStatement.get("consequent").replace(alternate);ifStatement.get("alternate").replace()}}module.exports=NodePath},{"./path":167,"./scope":168,"./types":170,assert:173,util:199}],166:[function(require,module,exports){var assert=require("assert");var types=require("./types");var NodePath=require("./node-path");var Printable=types.namedTypes.Printable;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isFunction=types.builtInTypes.function;var hasOwn=Object.prototype.hasOwnProperty;var undefined;function PathVisitor(){assert.ok(this instanceof PathVisitor);this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this._shouldVisitComments=hasOwn.call(this._methodNameTable,"Block")||hasOwn.call(this._methodNameTable,"Line");this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false}function computeMethodNameTable(visitor){var typeNames=Object.create(null);for(var methodName in visitor){if(/^visit[A-Z]/.test(methodName)){typeNames[methodName.slice("visit".length)]=true}}var supertypeTable=types.computeSupertypeLookupTable(typeNames);var methodNameTable=Object.create(null);var typeNames=Object.keys(supertypeTable);var typeNameCount=typeNames.length;for(var i=0;i=0;i--){filename=f[i];if(filename)break}for(var i=0,l=set.length;i>> no match, partial?",file,fr,pattern,pr);if(fr===fl)return true}return false}var hit;if(typeof p==="string"){if(options.nocase){hit=f.toLowerCase()===p.toLowerCase()}else{hit=f===p}this.debug("string match",p,f,hit)}else{hit=f.match(p);this.debug("pattern match",p,f,hit)}if(!hit)return false}if(fi===fl&&pi===pl){return true}else if(fi===fl){return partial}else if(pi===pl){var emptyFileEnd=fi===fl-1&&file[fi]==="";return emptyFileEnd}throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}}).call(this,require("_process"))},{_process:183,"brace-expansion":417}],417:[function(require,module,exports){var concatMap=require("concat-map");var balanced=require("balanced-match");module.exports=expandTop;var escSlash="\x00SLASH"+Math.random()+"\x00";var escOpen="\x00OPEN"+Math.random()+"\x00";var escClose="\x00CLOSE"+Math.random()+"\x00";var escComma="\x00COMMA"+Math.random()+"\x00";var escPeriod="\x00PERIOD"+Math.random()+"\x00";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[];var m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre;var body=m.body;var post=m.post;var p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);if(post.length){p[p.length-1]+=postParts.shift();p.push.apply(p,postParts)}parts.push.apply(parts,p);return parts}function expandTop(str){if(!str)return[];return expand(escapeBraces(str),true).map(unescapeBraces)}function identity(e){return e}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,isTop){var expansions=[];var m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);var isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);var isSequence=isNumericSequence||isAlphaSequence;var isOptions=/^(.*,)+(.+)?$/.test(m.body);if(!isSequence&&!isOptions){if(m.post.match(/,.*}/)){str=m.pre+"{"+m.body+escClose+m.post;return expand(str)}return[str]}var n;if(isSequence){n=m.body.split(/\.\./)}else{n=parseCommaParts(m.body);if(n.length===1){n=expand(n[0],false).map(embrace);if(n.length===1){var post=m.post.length?expand(m.post,false):[""];return post.map(function(p){return m.pre+n[0]+p})}}}var pre=m.pre;var post=m.post.length?expand(m.post,false):[""];var N;if(isSequence){var x=numeric(n[0]);var y=numeric(n[1]);var width=Math.max(n[0].length,n[1].length);var incr=n.length==3?Math.abs(numeric(n[2])):1;var test=lte;var reverse=y0){var z=new Array(need+1).join("0");if(i<0)c="-"+z+c.slice(1);else c=z+c}}}N.push(c)}}else{N=concatMap(n,function(el){return expand(el,false)})}for(var j=0;j1?str.substring(m.start+a.length,m.end):"";m.post=str.slice(m.end+b.length);return m}}}if(bal&&ended){var start=m.start+a.length;m=balanced(a,b,str.substr(start));if(m){m.start+=start;m.end+=start;m.pre=str.slice(0,start)+m.pre}return m}}},{}],419:[function(require,module,exports){module.exports=function(xs,fn){var res=[];for(var i=0;idst){names[dst]=names[src]}++dst}}names.length=dst;return names};function defaultCreatorFn(object){return create(null)}function makeAccessor(secretCreatorFn){var brand=makeUniqueKey();var passkey=create(null);secretCreatorFn=secretCreatorFn||defaultCreatorFn;function register(object){var secret;function vault(key,forget){if(key===passkey){return forget?secret=null:secret||(secret=secretCreatorFn(object))}}defProp(object,brand,vault)}function accessor(object){if(!hasOwn.call(object,brand))register(object);return object[brand](passkey)}accessor.forget=function(object){if(hasOwn.call(object,brand))object[brand](passkey,true)};return accessor}defProp(exports,"makeAccessor",makeAccessor)},{}],422:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var isArray=types.builtInTypes.array;var b=types.builders;var n=types.namedTypes;var leap=require("./leap");var meta=require("./meta");var util=require("./util");var hasOwn=Object.prototype.hasOwnProperty;function Emitter(contextId){assert.ok(this instanceof Emitter);n.Identifier.assert(contextId);Object.defineProperties(this,{contextId:{value:contextId},listing:{value:[]},marked:{value:[true]},finalLoc:{value:loc()},tryEntries:{value:[]}});Object.defineProperties(this,{leapManager:{value:new leap.LeapManager(this)}})}var Ep=Emitter.prototype;exports.Emitter=Emitter;function loc(){return b.literal(-1)}Ep.mark=function(loc){n.Literal.assert(loc);var index=this.listing.length;if(loc.value===-1){loc.value=index}else{assert.strictEqual(loc.value,index)}this.marked[index]=true;return loc};Ep.emit=function(node){if(n.Expression.check(node))node=b.expressionStatement(node);n.Statement.assert(node);this.listing.push(node)};Ep.emitAssign=function(lhs,rhs){this.emit(this.assign(lhs,rhs));return lhs};Ep.assign=function(lhs,rhs){return b.expressionStatement(b.assignmentExpression("=",lhs,rhs))};Ep.contextProperty=function(name,computed){return b.memberExpression(this.contextId,computed?b.literal(name):b.identifier(name),!!computed)};var volatileContextPropertyNames={prev:true,next:true,sent:true,rval:true};Ep.isVolatileContextProperty=function(expr){if(n.MemberExpression.check(expr)){if(expr.computed){return true}if(n.Identifier.check(expr.object)&&n.Identifier.check(expr.property)&&expr.object.name===this.contextId.name&&hasOwn.call(volatileContextPropertyNames,expr.property.name)){return true}}return false};Ep.stop=function(rval){if(rval){this.setReturnValue(rval)}this.jump(this.finalLoc)};Ep.setReturnValue=function(valuePath){n.Expression.assert(valuePath.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(valuePath))};Ep.clearPendingException=function(tryLoc,assignee){n.Literal.assert(tryLoc);var catchCall=b.callExpression(this.contextProperty("catch",true),[tryLoc]);if(assignee){this.emitAssign(assignee,catchCall)}else{this.emit(catchCall)}};Ep.jump=function(toLoc){this.emitAssign(this.contextProperty("next"),toLoc);this.emit(b.breakStatement())};Ep.jumpIf=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);this.emit(b.ifStatement(test,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};Ep.jumpIfNot=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);var negatedTest;if(n.UnaryExpression.check(test)&&test.operator==="!"){negatedTest=test.argument}else{negatedTest=b.unaryExpression("!",test)}this.emit(b.ifStatement(negatedTest,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};var nextTempId=0;Ep.makeTempVar=function(){return this.contextProperty("t"+nextTempId++)};Ep.getContextFunction=function(id){var func=b.functionExpression(id||null,[this.contextId],b.blockStatement([this.getDispatchLoop()]),false,false);func._aliasFunction=true;return func};Ep.getDispatchLoop=function(){var self=this;var cases=[];var current;var alreadyEnded=false;self.listing.forEach(function(stmt,i){if(self.marked.hasOwnProperty(i)){cases.push(b.switchCase(b.literal(i),current=[]));alreadyEnded=false}if(!alreadyEnded){current.push(stmt);if(isSwitchCaseEnder(stmt))alreadyEnded=true}});this.finalLoc.value=this.listing.length;cases.push(b.switchCase(this.finalLoc,[]),b.switchCase(b.literal("end"),[b.returnStatement(b.callExpression(this.contextProperty("stop"),[]))]));return b.whileStatement(b.literal(1),b.switchStatement(b.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),cases))};function isSwitchCaseEnder(stmt){return n.BreakStatement.check(stmt)||n.ContinueStatement.check(stmt)||n.ReturnStatement.check(stmt)||n.ThrowStatement.check(stmt)}Ep.getTryLocsList=function(){if(this.tryEntries.length===0){return null}var lastLocValue=0;return b.arrayExpression(this.tryEntries.map(function(tryEntry){var thisLocValue=tryEntry.firstLoc.value;assert.ok(thisLocValue>=lastLocValue,"try entries out of order");lastLocValue=thisLocValue;var ce=tryEntry.catchEntry;var fe=tryEntry.finallyEntry;var locs=[tryEntry.firstLoc,ce?ce.firstLoc:null];if(fe){locs[2]=fe.firstLoc;locs[3]=fe.afterLoc}return b.arrayExpression(locs)}))};Ep.explode=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var node=path.value;var self=this;n.Node.assert(node);if(n.Statement.check(node))return self.explodeStatement(path);if(n.Expression.check(node))return self.explodeExpression(path,ignoreResult);if(n.Declaration.check(node))throw getDeclError(node);switch(node.type){case"Program":return path.get("body").map(self.explodeStatement,self);case"VariableDeclarator":throw getDeclError(node);case"Property":case"SwitchCase":case"CatchClause":throw new Error(node.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(node.type))}};function getDeclError(node){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+JSON.stringify(node))}Ep.explodeStatement=function(path,labelId){assert.ok(path instanceof types.NodePath);var stmt=path.value;var self=this;n.Statement.assert(stmt);if(labelId){n.Identifier.assert(labelId)}else{labelId=null}if(n.BlockStatement.check(stmt)){return path.get("body").each(self.explodeStatement,self)}if(!meta.containsLeap(stmt)){self.emit(stmt);return}switch(stmt.type){case"ExpressionStatement":self.explodeExpression(path.get("expression"),true);break;case"LabeledStatement":var after=loc();self.leapManager.withEntry(new leap.LabeledEntry(after,stmt.label),function(){self.explodeStatement(path.get("body"),stmt.label)});self.mark(after);break;case"WhileStatement":var before=loc();var after=loc();self.mark(before);self.jumpIfNot(self.explodeExpression(path.get("test")),after);self.leapManager.withEntry(new leap.LoopEntry(after,before,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(before);self.mark(after);break;case"DoWhileStatement":var first=loc();var test=loc();var after=loc();self.mark(first);self.leapManager.withEntry(new leap.LoopEntry(after,test,labelId),function(){self.explode(path.get("body"))});self.mark(test);self.jumpIf(self.explodeExpression(path.get("test")),first);self.mark(after);break;case"ForStatement":var head=loc();var update=loc();var after=loc();if(stmt.init){self.explode(path.get("init"),true)}self.mark(head);if(stmt.test){self.jumpIfNot(self.explodeExpression(path.get("test")),after)}else{}self.leapManager.withEntry(new leap.LoopEntry(after,update,labelId),function(){self.explodeStatement(path.get("body"))});self.mark(update);if(stmt.update){self.explode(path.get("update"),true)}self.jump(head);self.mark(after);break;case"ForInStatement":n.Identifier.assert(stmt.left);var head=loc();var after=loc();var keyIterNextFn=self.makeTempVar();self.emitAssign(keyIterNextFn,b.callExpression(util.runtimeProperty("keys"),[self.explodeExpression(path.get("right"))]));self.mark(head);var keyInfoTmpVar=self.makeTempVar();self.jumpIf(b.memberExpression(b.assignmentExpression("=",keyInfoTmpVar,b.callExpression(keyIterNextFn,[])),b.identifier("done"),false),after);self.emitAssign(stmt.left,b.memberExpression(keyInfoTmpVar,b.identifier("value"),false));self.leapManager.withEntry(new leap.LoopEntry(after,head,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(head);self.mark(after);break;case"BreakStatement":self.emitAbruptCompletion({type:"break",target:self.leapManager.getBreakLoc(stmt.label)});break;case"ContinueStatement":self.emitAbruptCompletion({type:"continue",target:self.leapManager.getContinueLoc(stmt.label)});break;case"SwitchStatement":var disc=self.emitAssign(self.makeTempVar(),self.explodeExpression(path.get("discriminant")));var after=loc();var defaultLoc=loc();var condition=defaultLoc;var caseLocs=[];var cases=stmt.cases||[];for(var i=cases.length-1;i>=0;--i){var c=cases[i];n.SwitchCase.assert(c);if(c.test){condition=b.conditionalExpression(b.binaryExpression("===",disc,c.test),caseLocs[i]=loc(),condition)}else{caseLocs[i]=defaultLoc}}self.jump(self.explodeExpression(new types.NodePath(condition,path,"discriminant")));self.leapManager.withEntry(new leap.SwitchEntry(after),function(){path.get("cases").each(function(casePath){var c=casePath.value;var i=casePath.name;self.mark(caseLocs[i]);casePath.get("consequent").each(self.explodeStatement,self)})});self.mark(after);if(defaultLoc.value===-1){self.mark(defaultLoc);assert.strictEqual(after.value,defaultLoc.value)}break;case"IfStatement":var elseLoc=stmt.alternate&&loc();var after=loc();self.jumpIfNot(self.explodeExpression(path.get("test")),elseLoc||after);self.explodeStatement(path.get("consequent"));if(elseLoc){self.jump(after);self.mark(elseLoc);self.explodeStatement(path.get("alternate"))}self.mark(after);break;case"ReturnStatement":self.emitAbruptCompletion({type:"return",value:self.explodeExpression(path.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var after=loc();var handler=stmt.handler;if(!handler&&stmt.handlers){handler=stmt.handlers[0]||null}var catchLoc=handler&&loc();var catchEntry=catchLoc&&new leap.CatchEntry(catchLoc,handler.param);var finallyLoc=stmt.finalizer&&loc();var finallyEntry=finallyLoc&&new leap.FinallyEntry(finallyLoc,after);var tryEntry=new leap.TryEntry(self.getUnmarkedCurrentLoc(),catchEntry,finallyEntry);self.tryEntries.push(tryEntry);self.updateContextPrevLoc(tryEntry.firstLoc);self.leapManager.withEntry(tryEntry,function(){self.explodeStatement(path.get("block"));if(catchLoc){if(finallyLoc){self.jump(finallyLoc)}else{self.jump(after)}self.updateContextPrevLoc(self.mark(catchLoc));var bodyPath=path.get("handler","body");var safeParam=self.makeTempVar();self.clearPendingException(tryEntry.firstLoc,safeParam);var catchScope=bodyPath.scope;var catchParamName=handler.param.name;n.CatchClause.assert(catchScope.node);assert.strictEqual(catchScope.lookup(catchParamName),catchScope);types.visit(bodyPath,{visitIdentifier:function(path){if(util.isReference(path,catchParamName)&&path.scope.lookup(catchParamName)===catchScope){return safeParam}this.traverse(path)},visitFunction:function(path){if(path.scope.declares(catchParamName)){return false}this.traverse(path)}});self.leapManager.withEntry(catchEntry,function(){self.explodeStatement(bodyPath)})}if(finallyLoc){self.updateContextPrevLoc(self.mark(finallyLoc));self.leapManager.withEntry(finallyEntry,function(){self.explodeStatement(path.get("finalizer"))});self.emit(b.returnStatement(b.callExpression(self.contextProperty("finish"),[finallyEntry.firstLoc])))}});self.mark(after);break;case"ThrowStatement":self.emit(b.throwStatement(self.explodeExpression(path.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(stmt.type))}};Ep.emitAbruptCompletion=function(record){if(!isValidCompletion(record)){assert.ok(false,"invalid completion record: "+JSON.stringify(record))}assert.notStrictEqual(record.type,"normal","normal completions are not abrupt");var abruptArgs=[b.literal(record.type)];if(record.type==="break"||record.type==="continue"){n.Literal.assert(record.target);abruptArgs[1]=record.target}else if(record.type==="return"||record.type==="throw"){if(record.value){n.Expression.assert(record.value);abruptArgs[1]=record.value}}this.emit(b.returnStatement(b.callExpression(this.contextProperty("abrupt"),abruptArgs)))};function isValidCompletion(record){var type=record.type;if(type==="normal"){return!hasOwn.call(record,"target")}if(type==="break"||type==="continue"){return!hasOwn.call(record,"value")&&n.Literal.check(record.target)}if(type==="return"||type==="throw"){return hasOwn.call(record,"value")&&!hasOwn.call(record,"target")}return false}Ep.getUnmarkedCurrentLoc=function(){return b.literal(this.listing.length)};Ep.updateContextPrevLoc=function(loc){if(loc){n.Literal.assert(loc);if(loc.value===-1){loc.value=this.listing.length}else{assert.strictEqual(loc.value,this.listing.length)}}else{loc=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),loc)};Ep.explodeExpression=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var expr=path.value;if(expr){n.Expression.assert(expr)}else{return expr}var self=this;var result;function finish(expr){n.Expression.assert(expr);if(ignoreResult){self.emit(expr)}else{return expr}}if(!meta.containsLeap(expr)){return finish(expr)}var hasLeapingChildren=meta.containsLeap.onlyChildren(expr);function explodeViaTempVar(tempVar,childPath,ignoreChildResult){assert.ok(childPath instanceof types.NodePath);assert.ok(!ignoreChildResult||!tempVar,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var result=self.explodeExpression(childPath,ignoreChildResult);if(ignoreChildResult){}else if(tempVar||hasLeapingChildren&&(self.isVolatileContextProperty(result)||meta.hasSideEffects(result))){result=self.emitAssign(tempVar||self.makeTempVar(),result)}return result}switch(expr.type){case"MemberExpression":return finish(b.memberExpression(self.explodeExpression(path.get("object")),expr.computed?explodeViaTempVar(null,path.get("property")):expr.property,expr.computed));case"CallExpression":var oldCalleePath=path.get("callee");var newCallee=self.explodeExpression(oldCalleePath);if(!n.MemberExpression.check(oldCalleePath.node)&&n.MemberExpression.check(newCallee)){newCallee=b.sequenceExpression([b.literal(0),newCallee])}return finish(b.callExpression(newCallee,path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"NewExpression":return finish(b.newExpression(explodeViaTempVar(null,path.get("callee")),path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"ObjectExpression":return finish(b.objectExpression(path.get("properties").map(function(propPath){return b.property(propPath.value.kind,propPath.value.key,explodeViaTempVar(null,propPath.get("value")))})));case"ArrayExpression":return finish(b.arrayExpression(path.get("elements").map(function(elemPath){return explodeViaTempVar(null,elemPath)})));case"SequenceExpression":var lastIndex=expr.expressions.length-1;path.get("expressions").each(function(exprPath){if(exprPath.name===lastIndex){result=self.explodeExpression(exprPath,ignoreResult)}else{self.explodeExpression(exprPath,true)}});return result;case"LogicalExpression":var after=loc();if(!ignoreResult){result=self.makeTempVar()}var left=explodeViaTempVar(result,path.get("left"));if(expr.operator==="&&"){self.jumpIfNot(left,after)}else{assert.strictEqual(expr.operator,"||");self.jumpIf(left,after)}explodeViaTempVar(result,path.get("right"),ignoreResult);self.mark(after);return result;case"ConditionalExpression":var elseLoc=loc();var after=loc();var test=self.explodeExpression(path.get("test"));self.jumpIfNot(test,elseLoc);if(!ignoreResult){result=self.makeTempVar()}explodeViaTempVar(result,path.get("consequent"),ignoreResult);self.jump(after);self.mark(elseLoc);explodeViaTempVar(result,path.get("alternate"),ignoreResult);self.mark(after);return result;case"UnaryExpression":return finish(b.unaryExpression(expr.operator,self.explodeExpression(path.get("argument")),!!expr.prefix));case"BinaryExpression":return finish(b.binaryExpression(expr.operator,explodeViaTempVar(null,path.get("left")),explodeViaTempVar(null,path.get("right"))));case"AssignmentExpression":return finish(b.assignmentExpression(expr.operator,self.explodeExpression(path.get("left")),self.explodeExpression(path.get("right"))));case"UpdateExpression":return finish(b.updateExpression(expr.operator,self.explodeExpression(path.get("argument")),expr.prefix));case"YieldExpression":var after=loc();var arg=expr.argument&&self.explodeExpression(path.get("argument"));if(arg&&expr.delegate){var result=self.makeTempVar();self.emit(b.returnStatement(b.callExpression(self.contextProperty("delegateYield"),[arg,b.literal(result.property.name),after])));self.mark(after);return result}self.emitAssign(self.contextProperty("next"),after);self.emit(b.returnStatement(arg||null));self.mark(after);return self.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(expr.type))}}},{"./leap":424,"./meta":425,"./util":426,assert:173,"ast-types":171}],423:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.hoist=function(funPath){assert.ok(funPath instanceof types.NodePath);n.Function.assert(funPath.value);var vars={};function varDeclToExpr(vdec,includeIdentifiers){n.VariableDeclaration.assert(vdec);var exprs=[];vdec.declarations.forEach(function(dec){vars[dec.id.name]=dec.id;if(dec.init){exprs.push(b.assignmentExpression("=",dec.id,dec.init))}else if(includeIdentifiers){exprs.push(dec.id)}});if(exprs.length===0)return null;if(exprs.length===1)return exprs[0]; +}return childPath}Pp.getValueProperty=function getValueProperty(name){return this.value[name]};Pp.get=function get(name){var path=this;var names=arguments;var count=names.length;for(var i=0;i=0){parentCache[path.name=i]=path}}else{parentValue[path.name]=path.value;parentCache[path.name]=path}assert.strictEqual(parentValue[path.name],path.value);assert.strictEqual(path.parentPath.get(path.name),path);return path}Pp.replace=function replace(replacement){var results=[];var parentValue=this.parentPath.value;var parentCache=getChildCache(this.parentPath);var count=arguments.length;repairRelationshipWithParent(this);if(isArray.check(parentValue)){var originalLength=parentValue.length;var move=getMoves(this.parentPath,count-1,this.name+1);var spliceArgs=[this.name,1];for(var i=0;i=than},isNumber+" >= "+than)};exports.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return false},"true":function(){return true},undefined:function(){}};var naiveIsPrimitive=Type.or(builtin.string,builtin.number,builtin.boolean,builtin.null,builtin.undefined);exports.isPrimitive=new Type(function(value){if(value===null)return true;var type=typeof value;return!(type==="object"||type==="function")},naiveIsPrimitive.toString())},{"../lib/types":170}],170:[function(require,module,exports){var assert=require("assert");var Ap=Array.prototype;var slice=Ap.slice;var map=Ap.map;var each=Ap.forEach;var Op=Object.prototype;var objToStr=Op.toString;var funObjStr=objToStr.call(function(){});var strObjStr=objToStr.call("");var hasOwn=Op.hasOwnProperty;function Type(check,name){var self=this;assert.ok(self instanceof Type,self);assert.strictEqual(objToStr.call(check),funObjStr,check+" is not a function");var nameObjStr=objToStr.call(name);assert.ok(nameObjStr===funObjStr||nameObjStr===strObjStr,name+" is neither a function nor a string");Object.defineProperties(self,{name:{value:name},check:{value:function(value,deep){var result=check.call(self,value,deep);if(!result&&deep&&objToStr.call(deep)===funObjStr)deep(self,value);return result}}})}var Tp=Type.prototype;exports.Type=Type;Tp.assert=function(value,deep){if(!this.check(value,deep)){var str=shallowStringify(value);assert.ok(false,str+" does not match type "+this);return false}return true};function shallowStringify(value){if(isObject.check(value))return"{"+Object.keys(value).map(function(key){return key+": "+value[key]}).join(", ")+"}";if(isArray.check(value))return"["+value.map(shallowStringify).join(", ")+"]";return JSON.stringify(value)}Tp.toString=function(){var name=this.name;if(isString.check(name))return name;if(isFunction.check(name))return name.call(this)+"";return name+" type"};var builtInTypes={};exports.builtInTypes=builtInTypes;function defBuiltInType(example,name){var objStr=objToStr.call(example);Object.defineProperty(builtInTypes,name,{enumerable:true,value:new Type(function(value){return objToStr.call(value)===objStr},name)});return builtInTypes[name]}var isString=defBuiltInType("","string");var isFunction=defBuiltInType(function(){},"function");var isArray=defBuiltInType([],"array");var isObject=defBuiltInType({},"object");var isRegExp=defBuiltInType(/./,"RegExp");var isDate=defBuiltInType(new Date,"Date");var isNumber=defBuiltInType(3,"number");var isBoolean=defBuiltInType(true,"boolean");var isNull=defBuiltInType(null,"null");var isUndefined=defBuiltInType(void 0,"undefined");function toType(from,name){if(from instanceof Type)return from;if(from instanceof Def)return from.type;if(isArray.check(from))return Type.fromArray(from);if(isObject.check(from))return Type.fromObject(from);if(isFunction.check(from))return new Type(from,name);return new Type(function(value){return value===from},isUndefined.check(name)?function(){return from+""}:name)}Type.or=function(){var types=[];var len=arguments.length;for(var i=0;i=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};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=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};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}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,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/":199}],174:[function(require,module,exports){arguments[4][172][0].apply(exports,arguments)},{dup:172}],175:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var kMaxLength=1073741823;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return arr.foo()===42&&typeof arr.subarray==="function"&&new Uint8Array(1).subarray(1,1).byteLength===0}catch(e){return false}}();function Buffer(subject,encoding){var self=this;if(!(self instanceof Buffer))return new Buffer(subject,encoding);var type=typeof subject;var length;if(type==="number"){length=+subject}else if(type==="string"){length=Buffer.byteLength(subject,encoding)}else if(type==="object"&&subject!==null){if(subject.type==="Buffer"&&isArray(subject.data))subject=subject.data;length=+subject.length}else{throw new TypeError("must start with number, buffer, array or string")}if(length>kMaxLength){throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength.toString(16)+" bytes")}if(length<0)length=0;else length>>>=0;if(Buffer.TYPED_ARRAY_SUPPORT){self=Buffer._augment(new Uint8Array(length))}else{self.length=length;self._isBuffer=true}var i;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof subject.byteLength==="number"){self._set(subject)}else if(isArrayish(subject)){if(Buffer.isBuffer(subject)){for(i=0;i0&&length<=Buffer.poolSize)self.parent=rootParent;return self}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;break;case"utf8":case"utf-8":ret=utf8ToBytes(str).length;break;case"base64":ret=base64ToBytes(str).length;break;default:ret=str.length}return ret};Buffer.prototype.length=undefined; -return b.sequenceExpression(exprs)}types.visit(funPath.get("body"),{visitVariableDeclaration:function(path){var expr=varDeclToExpr(path.value,false);if(expr===null){path.replace()}else{return b.expressionStatement(expr)}return false},visitForStatement:function(path){var init=path.value.init;if(n.VariableDeclaration.check(init)){path.get("init").replace(varDeclToExpr(init,false))}this.traverse(path)},visitForInStatement:function(path){var left=path.value.left;if(n.VariableDeclaration.check(left)){path.get("left").replace(varDeclToExpr(left,true))}this.traverse(path)},visitFunctionDeclaration:function(path){var node=path.value;vars[node.id.name]=node.id;var parentNode=path.parent.node;var assignment=b.expressionStatement(b.assignmentExpression("=",node.id,b.functionExpression(node.id,node.params,node.body,node.generator,node.expression)));if(n.BlockStatement.check(path.parent.node)){path.parent.get("body").unshift(assignment);path.replace()}else{path.replace(assignment)}return false},visitFunctionExpression:function(path){return false}});var paramNames={};funPath.get("params").each(function(paramPath){var param=paramPath.value;if(n.Identifier.check(param)){paramNames[param.name]=param}else{}});var declarations=[];Object.keys(vars).forEach(function(name){if(!hasOwn.call(paramNames,name)){declarations.push(b.variableDeclarator(vars[name],null))}});if(declarations.length===0){return null}return b.variableDeclaration("var",declarations)}},{assert:173,"ast-types":171}],424:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var inherits=require("util").inherits;var hasOwn=Object.prototype.hasOwnProperty;function Entry(){assert.ok(this instanceof Entry)}function FunctionEntry(returnLoc){Entry.call(this);n.Literal.assert(returnLoc);this.returnLoc=returnLoc}inherits(FunctionEntry,Entry);exports.FunctionEntry=FunctionEntry;function LoopEntry(breakLoc,continueLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Literal.assert(continueLoc);if(label){n.Identifier.assert(label)}else{label=null}this.breakLoc=breakLoc;this.continueLoc=continueLoc;this.label=label}inherits(LoopEntry,Entry);exports.LoopEntry=LoopEntry;function SwitchEntry(breakLoc){Entry.call(this);n.Literal.assert(breakLoc);this.breakLoc=breakLoc}inherits(SwitchEntry,Entry);exports.SwitchEntry=SwitchEntry;function TryEntry(firstLoc,catchEntry,finallyEntry){Entry.call(this);n.Literal.assert(firstLoc);if(catchEntry){assert.ok(catchEntry instanceof CatchEntry)}else{catchEntry=null}if(finallyEntry){assert.ok(finallyEntry instanceof FinallyEntry)}else{finallyEntry=null}assert.ok(catchEntry||finallyEntry);this.firstLoc=firstLoc;this.catchEntry=catchEntry;this.finallyEntry=finallyEntry}inherits(TryEntry,Entry);exports.TryEntry=TryEntry;function CatchEntry(firstLoc,paramId){Entry.call(this);n.Literal.assert(firstLoc);n.Identifier.assert(paramId);this.firstLoc=firstLoc;this.paramId=paramId}inherits(CatchEntry,Entry);exports.CatchEntry=CatchEntry;function FinallyEntry(firstLoc,afterLoc){Entry.call(this);n.Literal.assert(firstLoc);n.Literal.assert(afterLoc);this.firstLoc=firstLoc;this.afterLoc=afterLoc}inherits(FinallyEntry,Entry);exports.FinallyEntry=FinallyEntry;function LabeledEntry(breakLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Identifier.assert(label);this.breakLoc=breakLoc;this.label=label}inherits(LabeledEntry,Entry);exports.LabeledEntry=LabeledEntry;function LeapManager(emitter){assert.ok(this instanceof LeapManager);var Emitter=require("./emit").Emitter;assert.ok(emitter instanceof Emitter);this.emitter=emitter;this.entryStack=[new FunctionEntry(emitter.finalLoc)]}var LMp=LeapManager.prototype;exports.LeapManager=LeapManager;LMp.withEntry=function(entry,callback){assert.ok(entry instanceof Entry);this.entryStack.push(entry);try{callback.call(this.emitter)}finally{var popped=this.entryStack.pop();assert.strictEqual(popped,entry)}};LMp._findLeapLocation=function(property,label){for(var i=this.entryStack.length-1;i>=0;--i){var entry=this.entryStack[i];var loc=entry[property];if(loc){if(label){if(entry.label&&entry.label.name===label.name){return loc}}else if(entry instanceof LabeledEntry){}else{return loc}}}return null};LMp.getBreakLoc=function(label){return this._findLeapLocation("breakLoc",label)};LMp.getContinueLoc=function(label){return this._findLeapLocation("continueLoc",label)}},{"./emit":422,assert:173,"ast-types":171,util:199}],425:[function(require,module,exports){var assert=require("assert");var m=require("private").makeAccessor();var types=require("ast-types");var isArray=types.builtInTypes.array;var n=types.namedTypes;var hasOwn=Object.prototype.hasOwnProperty;function makePredicate(propertyName,knownTypes){function onlyChildren(node){n.Node.assert(node);var result=false;function check(child){if(result){}else if(isArray.check(child)){child.some(check)}else if(n.Node.check(child)){assert.strictEqual(result,false);result=predicate(child)}return result}types.eachField(node,function(name,child){check(child)});return result}function predicate(node){n.Node.assert(node);var meta=m(node);if(hasOwn.call(meta,propertyName))return meta[propertyName];if(hasOwn.call(opaqueTypes,node.type))return meta[propertyName]=false;if(hasOwn.call(knownTypes,node.type))return meta[propertyName]=true;return meta[propertyName]=onlyChildren(node)}predicate.onlyChildren=onlyChildren;return predicate}var opaqueTypes={FunctionExpression:true};var sideEffectTypes={CallExpression:true,ForInStatement:true,UnaryExpression:true,BinaryExpression:true,AssignmentExpression:true,UpdateExpression:true,NewExpression:true};var leapTypes={YieldExpression:true,BreakStatement:true,ContinueStatement:true,ReturnStatement:true,ThrowStatement:true};for(var type in leapTypes){if(hasOwn.call(leapTypes,type)){sideEffectTypes[type]=leapTypes[type]}}exports.hasSideEffects=makePredicate("hasSideEffects",sideEffectTypes);exports.containsLeap=makePredicate("containsLeap",leapTypes)},{assert:173,"ast-types":171,"private":421}],426:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.defaults=function(obj){var len=arguments.length;var extension;for(var i=1;i0){outerBody.push(vars)}var wrapArgs=[emitter.getContextFunction(innerFnId),shouldTransformAsync?b.literal(null):outerFnId,b.thisExpression()];var tryLocsList=emitter.getTryLocsList();if(tryLocsList){wrapArgs.push(tryLocsList)}var wrapCall=b.callExpression(shouldTransformAsync?runtimeProperty("async"):runtimeProperty("wrap"),wrapArgs);outerBody.push(b.returnStatement(wrapCall));node.body=b.blockStatement(outerBody);node.body._declarations=bodyBlock._declarations;if(shouldTransformAsync){node.async=false;return}if(n.FunctionDeclaration.check(node)){var pp=path.parent;while(pp&&!(n.BlockStatement.check(pp.value)||n.Program.check(pp.value))){pp=pp.parent}if(!pp){return}path.replace();node.type="FunctionExpression";var varDecl=b.variableDeclaration("var",[b.variableDeclarator(node.id,b.callExpression(runtimeProperty("mark"),[node]))]);if(node.comments){varDecl.leadingComments=node.leadingComments;varDecl.trailingComments=node.trailingComments;node.leadingComments=null;node.trailingComments=null}varDecl._blockHoist=3;var bodyPath=pp.get("body");var bodyLen=bodyPath.value.length;bodyPath.push(varDecl)}else{n.FunctionExpression.assert(node);return b.callExpression(runtimeProperty("mark"),[node])}}});function shouldNotHoistAbove(stmtPath){var value=stmtPath.value;n.Statement.assert(value);if(n.ExpressionStatement.check(value)&&n.Literal.check(value.expression)&&value.expression.value==="use strict"){return true}if(n.VariableDeclaration.check(value)){for(var i=0;i=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc){return this.complete(entry.completion,entry.afterLoc)}}},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}(typeof global==="object"?global:typeof window==="object"?window:this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],431:[function(require,module,exports){var regenerate=require("regenerate");exports.REGULAR={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,65535),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)};exports.UNICODE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)};exports.UNICODE_IGNORE_CASE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},{regenerate:433}],432:[function(require,module,exports){module.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}},{}],433:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports;var freeModule=typeof module=="object"&&module&&module.exports==freeExports&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal){root=freeGlobal}var ERRORS={rangeOrder:"A range’s `stop` value must be greater than or equal "+"to the `start` value.",codePointRange:"Invalid code point value. Code points range from "+"U+000000 to U+10FFFF."};var HIGH_SURROGATE_MIN=55296;var HIGH_SURROGATE_MAX=56319;var LOW_SURROGATE_MIN=56320;var LOW_SURROGATE_MAX=57343;var regexNull=/\\x00([^0123456789]|$)/g;var object={};var hasOwnProperty=object.hasOwnProperty;var extend=function(destination,source){var key;for(key in source){if(hasOwnProperty.call(source,key)){destination[key]=source[key]}}return destination};var forEach=function(array,callback){var index=-1;var length=array.length;while(++index=start&&codePointrangeEnd){return data}if(rangeStart<=start&&rangeEnd>=end){data.splice(index,2);continue}if(rangeStart>=start&&rangeEnd=start&&rangeStart<=end){data[index+1]=rangeStart}else if(rangeEnd>=start&&rangeEnd<=end){data[index]=rangeEnd+1;return data}index+=2}return data};var dataAdd=function(data,codePoint){var index=0;var start;var end;var lastIndex=null;var length=data.length;if(codePoint<0||codePoint>1114111){throw RangeError(ERRORS.codePointRange)}while(index=start&&codePointcodePoint){data.splice(lastIndex!=null?lastIndex+2:0,0,codePoint,codePoint+1);return data}if(codePoint==end){if(codePoint+1==data[index+2]){data.splice(index,4,start,data[index+3]);return data}data[index+1]=codePoint+1;return data}lastIndex=index;index+=2}data.push(codePoint,codePoint+1);return data};var dataAddData=function(dataA,dataB){var index=0;var start;var end;var data=dataA.slice();var length=dataB.length;while(index1114111||rangeEnd<0||rangeEnd>1114111){throw RangeError(ERRORS.codePointRange)}var index=0;var start;var end;var added=false;var length=data.length;while(indexrangeEnd){return data}if(start>=rangeStart&&start<=rangeEnd){if(end>rangeStart&&end-1<=rangeEnd){data.splice(index,2);index-=2}else{data.splice(index-1,2);index-=2}}}else if(start==rangeEnd+1){data[index]=rangeStart;return data}else if(start>rangeEnd){data.splice(index,0,rangeStart,rangeEnd+1);return data}else if(rangeStart>=start&&rangeStart=start&&rangeStart=end){data[index]=rangeStart;data[index+1]=rangeEnd+1;added=true}index+=2}if(!added){data.push(rangeStart,rangeEnd+1)}return data};var dataContains=function(data,codePoint){var index=0;var length=data.length;var start=data[index];var end=data[length-1];if(length>=2){if(codePointend){return false}}while(index=start&&codePoint>>0;end=end===undefined||end===Infinity?this.length:end>>>0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val)){return arrayIndexOf(this,val,byteOffset)}if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,val,byteOffset)}return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;for(var i=0;byteOffset+iremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;ithis.length){throw new RangeError("attempt to write outside buffer bounds")}var remaining=this.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}encoding=String(encoding||"utf8").toLowerCase();var ret;switch(encoding){case"hex":ret=hexWrite(this,string,offset,length);break;case"utf8":case"utf-8":ret=utf8Write(this,string,offset,length);break;case"ascii":ret=asciiWrite(this,string,offset,length);break;case"binary":ret=binaryWrite(this,string,offset,length);break;case"base64":ret=base64Write(this,string,offset,length);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=utf16leWrite(this,string,offset,length);break;default:throw new TypeError("Unknown encoding: "+encoding)}return ret};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end);for(var i=start;ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||valuebuf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i>>0&255}return offset+byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul>>>0&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||valuebuf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,target_start,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(target_start>=target.length)target_start=target.length;if(!target_start)target_start=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-target_start=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":176,ieee754:177,"is-array":178}],176:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],177:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=nBytes*8-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8);m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8);if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=nBytes*8-mLen-1,eMax=(1<>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8);e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=s*128}},{}],178:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],179:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;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(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i0&&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"){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};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;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}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{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.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};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}},{}],180:[function(require,module,exports){if(typeof Object.create==="function"){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{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],181:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],182:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){ +parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(isNaN(n)||util.isNull(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else return state.length}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(!util.isNumber(n)||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(util.isNull(ret)){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(!util.isNull(ret))this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(function(){maybeReadMore_(stream,state)})}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;process.nextTick(function(){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}})}}function forEach(xs,f){for(var i=0,l=xs.length;i1){var cbs=[];for(var c=0;c=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:175}],197:[function(require,module,exports){exports.isatty=function(){return false};function ReadStream(){throw new Error("tty.ReadStream is not implemented")}exports.ReadStream=ReadStream;function WriteStream(){throw new Error("tty.ReadStream is not implemented")}exports.WriteStream=WriteStream},{}],198:[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"}},{}],199:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;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=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}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;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]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+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){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}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=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}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");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-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]}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"||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"];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(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){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":198,_process:183,inherits:180}],200:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(process.platform==="win32"){ansiStyles.blue.open=""}function build(_styles){var builder=function builder(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a0;i--){line=lines[i];if(~line.indexOf("sourceMappingURL=data:"))return exports.fromComment(line)}}Converter.prototype.toJSON=function(space){return JSON.stringify(this.sourcemap,null,space)};Converter.prototype.toBase64=function(){var json=this.toJSON();return new Buffer(json).toString("base64")};Converter.prototype.toComment=function(options){var base64=this.toBase64();var data="sourceMappingURL=data:application/json;base64,"+base64;return options&&options.multiline?"/*# "+data+" */":"//# "+data};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(key,value){if(this.sourcemap.hasOwnProperty(key))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(key,value)};Converter.prototype.setProperty=function(key,value){this.sourcemap[key]=value;return this};Converter.prototype.getProperty=function(key){return this.sourcemap[key]};exports.fromObject=function(obj){return new Converter(obj)};exports.fromJSON=function(json){return new Converter(json,{isJSON:true})};exports.fromBase64=function(base64){return new Converter(base64,{isEncoded:true})};exports.fromComment=function(comment){comment=comment.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(comment,{isEncoded:true,hasComment:true})};exports.fromMapFileComment=function(comment,dir){return new Converter(comment,{commentFileDir:dir,isFileComment:true,isJSON:true})};exports.fromSource=function(content,largeSource){if(largeSource)return convertFromLargeSource(content);var m=content.match(commentRx);commentRx.lastIndex=0;return m?exports.fromComment(m.pop()):null};exports.fromMapFileSource=function(content,dir){var m=content.match(mapFileCommentRx);mapFileCommentRx.lastIndex=0;return m?exports.fromMapFileComment(m.pop(),dir):null};exports.removeComments=function(src){commentRx.lastIndex=0;return src.replace(commentRx,"")};exports.removeMapFileComments=function(src){mapFileCommentRx.lastIndex=0;return src.replace(mapFileCommentRx,"")};Object.defineProperty(exports,"commentRegex",function getCommentRegex(){commentRx.lastIndex=0;return commentRx});Object.defineProperty(exports,"mapFileCommentRegex",function getMapFileCommentRegex(){mapFileCommentRx.lastIndex=0;return mapFileCommentRx})}).call(this,require("buffer").Buffer)},{buffer:175,fs:172,path:182}],209:[function(require,module,exports){require("./shim");require("./modules/core.dict");require("./modules/core.iter-helpers");require("./modules/core.$for");require("./modules/core.delay");require("./modules/core.binding");require("./modules/core.object");require("./modules/core.array.turn");require("./modules/core.number.iterator");require("./modules/core.number.math");require("./modules/core.string.escape-html");require("./modules/core.date");require("./modules/core.global");require("./modules/core.log");module.exports=require("./modules/$").core},{"./modules/$":223,"./modules/core.$for":235,"./modules/core.array.turn":236,"./modules/core.binding":237,"./modules/core.date":238,"./modules/core.delay":239,"./modules/core.dict":240,"./modules/core.global":241,"./modules/core.iter-helpers":242,"./modules/core.log":243,"./modules/core.number.iterator":244,"./modules/core.number.math":245,"./modules/core.object":246,"./modules/core.string.escape-html":247,"./shim":291}],210:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function(IS_INCLUDES){return function(el){var O=$.toObject(this),length=$.toLength(O.length),index=$.toIndex(arguments[1],length),value;if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$":223}],211:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function(callbackfn){var O=Object($.assertDefined(this)),self=$.ES5Object(O),f=ctx(callbackfn,arguments[1],3),length=$.toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$":223,"./$.ctx":218}],212:[function(require,module,exports){var $=require("./$");function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}assert.def=$.assertDefined;assert.fn=function(it){if(!$.isFunction(it))throw TypeError(it+" is not a function!");return it};assert.obj=function(it){if(!$.isObject(it))throw TypeError(it+" is not an object!");return it};assert.inst=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it};module.exports=assert},{"./$":223}],213:[function(require,module,exports){var $=require("./$");module.exports=Object.assign||function(target,source){var T=Object($.assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=$.ES5Object(arguments[i++]),keys=$.getKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$":223}],214:[function(require,module,exports){var $=require("./$"),TAG=require("./$.wks")("toStringTag"),toString={}.toString;function cof(it){return toString.call(it).slice(8,-1)}cof.classof=function(it){var O,T;return it==undefined?it===undefined?"Undefined":"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:cof(O)};cof.set=function(it,tag,stat){if(it&&!$.has(it=stat?it:it.prototype,TAG))$.hide(it,TAG,tag)};module.exports=cof},{"./$":223,"./$.wks":234}],215:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,assert=require("./$.assert"),$iter=require("./$.iter"),has=$.has,set=$.set,isObject=$.isObject,hide=$.hide,step=$iter.step,isFrozen=Object.isFrozen||$.core.Object.isFrozen,ID=safe("id"),O1=safe("O1"),LAST=safe("last"),FIRST=safe("first"),ITER=safe("iter"),SIZE=$.DESC?safe("size"):"size",id=0;function fastKey(it,create){if(!isObject(it))return(typeof it=="string"?"S":"P")+it;if(isFrozen(it))return"F";if(!has(it,ID)){if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(iterable){var that=assert.inst(this,C,NAME);set(that,O1,$.create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);if(iterable!=undefined)$iter.forOf(iterable,IS_MAP,that[ADDER],that)}$.mix(C.prototype,{clear:function(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function(key){return!!getEntry(this,key)}});if($.DESC)$.setDesc(C.prototype,"size",{get:function(){return assert.def(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!="F")that[O1][index]=entry}return that},getEntry:getEntry,getIterConstructor:function(){return function(iterated,kind){set(this,ITER,{o:iterated,k:kind})}},next:function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){iter.o=undefined;return step(1)}if(kind=="key")return step(0,entry.k);if(kind=="value")return step(0,entry.v);return step(0,[entry.k,entry.v])}}},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.iter":222,"./$.uid":232}],216:[function(require,module,exports){"use strict";var $=require("./$"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.iter").forOf,has=$.has,isObject=$.isObject,hide=$.hide,isFrozen=Object.isFrozen||$.core.Object.isFrozen,id=0,ID=safe("id"),WEAK=safe("weak"),LEAK=safe("leak"),method=require("./$.array-methods"),find=method(5),findIndex=method(6);function findFrozen(store,key){return find.call(store.array,function(it){return it[0]===key})}function leakStore(that){return that[LEAK]||hide(that,LEAK,{array:[],get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.array.push([key,value])},"delete":function(key){var index=findIndex.call(this.array,function(it){return it[0]===key});if(~index)this.array.splice(index,1);return!!~index}})[LEAK]}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(iterable){$.set(assert.inst(this,C,NAME),ID,id++);if(iterable!=undefined)forOf(iterable,IS_MAP,this[ADDER],this)}$.mix(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this)["delete"](key);return has(key,WEAK)&&has(key[WEAK],this[ID])&&delete key[WEAK][this[ID]]},has:function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this).has(key);return has(key,WEAK)&&has(key[WEAK],this[ID])}});return C},def:function(that,key,value){if(isFrozen(assert.obj(key))){leakStore(that).set(key,value)}else{has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that[ID]]=value}return that},leakStore:leakStore,WEAK:WEAK,ID:ID}},{"./$":223,"./$.array-methods":211,"./$.assert":212,"./$.iter":222,"./$.uid":232}],217:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),$iter=require("./$.iter"),assertInstance=require("./$.assert").inst;module.exports=function(NAME,methods,common,IS_MAP,isWeak){var Base=$.g[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};function fixMethod(KEY,CHAIN){var method=proto[KEY];if($.FW)proto[KEY]=function(a,b){var result=method.call(this,a===0?0:a,b);return CHAIN?this:result}}if(!$.isFunction(C)||!(isWeak||!$iter.BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(NAME,IS_MAP,ADDER);$.mix(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](isWeak?{}:-0,1),buggyZero;if($iter.fail(function(iter){new C(iter)})||$iter.DANGER_CLOSING){C=function(iterable){assertInstance(this,C,NAME);var that=new Base;if(iterable!=undefined)$iter.forOf(iterable,IS_MAP,that[ADDER],that);return that};C.prototype=proto;if($.FW)proto.constructor=C}isWeak||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER,true)}require("./$.cof").set(C,NAME);require("./$.species")(C);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);if(!isWeak)$iter.std(C,NAME,common.getIterConstructor(),common.next,IS_MAP?"key+value":"value",!IS_MAP,true);return C}},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.def":219,"./$.iter":222,"./$.species":229}],218:[function(require,module,exports){var assertFunction=require("./$.assert").fn;module.exports=function(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.assert":212}],219:[function(require,module,exports){var $=require("./$"),global=$.g,core=$.core,isFunction=$.isFunction;function ctx(fn,that){return function(){return fn.apply(that,arguments)}}$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;function $def(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,target=isGlobal?global:type&$def.S?global[name]:(global[name]||{}).prototype,exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;if(own&&key in exports)continue;out=own?target[key]:source[key];if(isGlobal&&!isFunction(target[key]))exp=source[key];else if(type&$def.B&&own)exp=ctx(out,global);else if(type&$def.W&&target[key]==out)!function(C){exp=function(param){return this instanceof C?new C(param):C(param)};exp.prototype=C.prototype}(out);else exp=type&$def.P&&isFunction(out)?ctx(Function.call,out):out;$.hide(exports,key,exp)}}module.exports=$def},{"./$":223}],220:[function(require,module,exports){module.exports=function($){$.FW=false;$.path=$.core;return $}},{}],221:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]); -}index+=2}return result};var floor=Math.floor;var highSurrogate=function(codePoint){return parseInt(floor((codePoint-65536)/1024)+HIGH_SURROGATE_MIN,10)};var lowSurrogate=function(codePoint){return parseInt((codePoint-65536)%1024+LOW_SURROGATE_MIN,10)};var stringFromCharCode=String.fromCharCode;var codePointToString=function(codePoint){var string;if(codePoint==9){string="\\t"}else if(codePoint==10){string="\\n"}else if(codePoint==12){string="\\f"}else if(codePoint==13){string="\\r"}else if(codePoint==92){string="\\\\"}else if(codePoint==36||codePoint>=40&&codePoint<=43||codePoint==45||codePoint==46||codePoint==63||codePoint>=91&&codePoint<=94||codePoint>=123&&codePoint<=125){string="\\"+stringFromCharCode(codePoint)}else if(codePoint>=32&&codePoint<=126){string=stringFromCharCode(codePoint)}else if(codePoint<=255){string="\\x"+pad(hex(codePoint),2)}else{string="\\u"+pad(hex(codePoint),4)}return string};var symbolToCodePoint=function(symbol){var length=symbol.length;var first=symbol.charCodeAt(0);var second;if(first>=HIGH_SURROGATE_MIN&&first<=HIGH_SURROGATE_MAX&&length>1){second=symbol.charCodeAt(1);return(first-HIGH_SURROGATE_MIN)*1024+second-LOW_SURROGATE_MIN+65536}return first};var createBMPCharacterClasses=function(data){var result="";var index=0;var start;var end;var length=data.length;if(dataIsSingleton(data)){return codePointToString(data[0])}while(index=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=HIGH_SURROGATE_MIN&&start<=HIGH_SURROGATE_MAX){if(end>=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){loneHighSurrogates.push(start,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=LOW_SURROGATE_MIN&&start<=LOW_SURROGATE_MAX){if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneLowSurrogates.push(start,end+1)}if(end>LOW_SURROGATE_MAX){loneLowSurrogates.push(start,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>LOW_SURROGATE_MAX&&start<=65535){if(end<=65535){bmp.push(start,end+1)}else{bmp.push(start,65535+1);astral.push(65535+1,end+1)}}else{astral.push(start,end+1)}index+=2}return{loneHighSurrogates:loneHighSurrogates,loneLowSurrogates:loneLowSurrogates,bmp:bmp,astral:astral}};var optimizeSurrogateMappings=function(surrogateMappings){var result=[];var tmpLow=[];var addLow=false;var mapping;var nextMapping;var highSurrogates;var lowSurrogates;var nextHighSurrogates;var nextLowSurrogates;var index=-1;var length=surrogateMappings.length;while(++index1){value=slice.call(arguments)}if(this instanceof regenerate){this.data=[];return value?this.add(value):this}return(new regenerate).add(value)};regenerate.version="1.2.0";var proto=regenerate.prototype;extend(proto,{add:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataAddData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.add(item)});return $this}$this.data=dataAdd($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},remove:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataRemoveData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.remove(item)});return $this}$this.data=dataRemove($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},addRange:function(start,end){var $this=this;$this.data=dataAddRange($this.data,isNumber(start)?start:symbolToCodePoint(start),isNumber(end)?end:symbolToCodePoint(end));return $this},removeRange:function(start,end){var $this=this;var startCodePoint=isNumber(start)?start:symbolToCodePoint(start);var endCodePoint=isNumber(end)?end:symbolToCodePoint(end);$this.data=dataRemoveRange($this.data,startCodePoint,endCodePoint);return $this},intersection:function(argument){var $this=this;var array=argument instanceof regenerate?dataToArray(argument.data):argument;$this.data=dataIntersection($this.data,array);return $this},contains:function(codePoint){return dataContains(this.data,isNumber(codePoint)?codePoint:symbolToCodePoint(codePoint))},clone:function(){var set=new regenerate;set.data=this.data.slice(0);return set},toString:function(options){var result=createCharacterClassesFromData(this.data,options?options.bmpOnly:false);return result.replace(regexNull,"\\0$1")},toRegExp:function(flags){return RegExp(this.toString(),flags||"")},valueOf:function(){return dataToArray(this.data)}});proto.toArray=proto.valueOf;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define(function(){return regenerate})}else if(freeExports&&!freeExports.nodeType){if(freeModule){freeModule.exports=regenerate}else{freeExports.regenerate=regenerate}}else{root.regenerate=regenerate}})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],434:[function(require,module,exports){(function(global){(function(){"use strict";var objectTypes={"function":true,object:true};var root=objectTypes[typeof window]&&window||this;var oldRoot=root;var freeExports=objectTypes[typeof exports]&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal}var stringFromCharCode=String.fromCharCode;var floor=Math.floor;function fromCodePoint(){var MAX_SIZE=16384;var codeUnits=[];var highSurrogate;var lowSurrogate;var index=-1;var length=arguments.length;if(!length){return""}var result="";while(++index1114111||floor(codePoint)!=codePoint){throw RangeError("Invalid code point: "+codePoint)}if(codePoint<=65535){codeUnits.push(codePoint)}else{codePoint-=65536;highSurrogate=(codePoint>>10)+55296;lowSurrogate=codePoint%1024+56320;codeUnits.push(highSurrogate,lowSurrogate)}if(index+1==length||codeUnits.length>MAX_SIZE){result+=stringFromCharCode.apply(null,codeUnits);codeUnits.length=0}}return result}function assertType(type,expected){if(expected.indexOf("|")==-1){if(type==expected){return}throw Error("Invalid node type: "+type)}expected=assertType.hasOwnProperty(expected)?assertType[expected]:assertType[expected]=RegExp("^(?:"+expected+")$");if(expected.test(type)){return}throw Error("Invalid node type: "+type)}function generate(node){var type=node.type;if(generate.hasOwnProperty(type)&&typeof generate[type]=="function"){return generate[type](node)}throw Error("Invalid node type: "+type)}function generateAlternative(node){assertType(node.type,"alternative");var terms=node.body,length=terms?terms.length:0;if(length==1){return generateTerm(terms[0])}else{var i=-1,result="";while(++i=55296&&first<=56319){second=lookahead().charCodeAt(0);if(second>=56320&&second<=57343){pos++;return createValue("symbol",(first-55296)*1024+second-56320+65536,pos-2,pos)}}}return createValue("symbol",first,pos-1,pos)}function createDisjunction(alternatives,from,to){return addRaw({type:"disjunction",body:alternatives,range:[from,to]})}function createDot(){return addRaw({type:"dot",range:[pos-1,pos]})}function createCharacterClassEscape(value){return addRaw({type:"characterClassEscape",value:value,range:[pos-2,pos]})}function createReference(matchIndex){return addRaw({type:"reference",matchIndex:parseInt(matchIndex,10),range:[pos-1-matchIndex.length,pos]})}function createGroup(behavior,disjunction,from,to){return addRaw({type:"group",behavior:behavior,body:disjunction,range:[from,to]})}function createQuantifier(min,max,from,to){if(to==null){from=pos-1;to=pos}return addRaw({type:"quantifier",min:min,max:max,greedy:true,body:null,range:[from,to]})}function createAlternative(terms,from,to){return addRaw({type:"alternative",body:terms,range:[from,to]})}function createCharacterClass(classRanges,negative,from,to){return addRaw({type:"characterClass",body:classRanges,negative:negative,range:[from,to]})}function createClassRange(min,max,from,to){if(min.codePoint>max.codePoint){throw SyntaxError("invalid range in character class")}return addRaw({type:"characterClassRange",min:min,max:max,range:[from,to]})}function flattenBody(body){if(body.type==="alternative"){return body.body}else{return[body]}}function isEmpty(obj){return obj.type==="empty"}function incr(amount){amount=amount||1;var res=str.substring(pos,pos+amount);pos+=amount||1;return res}function skip(value){if(!match(value)){throw SyntaxError("character: "+value)}}function match(value){if(str.indexOf(value,pos)===pos){return incr(value.length)}}function lookahead(){return str[pos]}function current(value){return str.indexOf(value,pos)===pos}function next(value){return str[pos+1]===value}function matchReg(regExp){var subStr=str.substring(pos);var res=subStr.match(regExp);if(res){res.range=[];res.range[0]=pos;incr(res[0].length);res.range[1]=pos}return res}function parseDisjunction(){var res=[],from=pos;res.push(parseAlternative());while(match("|")){res.push(parseAlternative())}if(res.length===1){return res[0]}return createDisjunction(res,from,pos)}function parseAlternative(){var res=[],from=pos;var term;while(term=parseTerm()){res.push(term)}if(res.length===1){return res[0]}return createAlternative(res,from,pos)}function parseTerm(){if(pos>=str.length||current("|")||current(")")){return null}var anchor=parseAnchor();if(anchor){return anchor}var atom=parseAtom();if(!atom){throw SyntaxError("Expected atom")}var quantifier=parseQuantifier()||false;if(quantifier){quantifier.body=flattenBody(atom);updateRawStart(quantifier,atom.range[0]);return quantifier}return atom}function parseGroup(matchA,typeA,matchB,typeB){var type=null,from=pos;if(match(matchA)){type=typeA}else if(match(matchB)){type=typeB}else{return false}var body=parseDisjunction();if(!body){throw SyntaxError("Expected disjunction")}skip(")");var group=createGroup(type,flattenBody(body),from,pos);if(type=="normal"){if(firstIteration){closedCaptureCounter++}}return group}function parseAnchor(){var res,from=pos;if(match("^")){return createAnchor("start",1)}else if(match("$")){return createAnchor("end",1)}else if(match("\\b")){return createAnchor("boundary",2)}else if(match("\\B")){return createAnchor("not-boundary",2)}else{return parseGroup("(?=","lookahead","(?!","negativeLookahead")}}function parseQuantifier(){var res;var quantifier;var min,max;if(match("*")){quantifier=createQuantifier(0)}else if(match("+")){quantifier=createQuantifier(1)}else if(match("?")){quantifier=createQuantifier(0,1)}else if(res=matchReg(/^\{([0-9]+)\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,min,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,undefined,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),([0-9]+)\}/)){min=parseInt(res[1],10);max=parseInt(res[2],10);if(min>max){throw SyntaxError("numbers out of order in {} quantifier")}quantifier=createQuantifier(min,max,res.range[0],res.range[1])}if(quantifier){if(match("?")){quantifier.greedy=false;quantifier.range[1]+=1}}return quantifier}function parseAtom(){var res;if(res=matchReg(/^[^^$\\.*+?(){[|]/)){return createCharacter(res)}else if(match(".")){return createDot()}else if(match("\\")){res=parseAtomEscape();if(!res){throw SyntaxError("atomEscape")}return res}else if(res=parseCharacterClass()){return res}else{return parseGroup("(?:","ignore","(","normal")}}function parseUnicodeSurrogatePairEscape(firstEscape){if(hasUnicodeFlag){var first,second;if(firstEscape.kind=="unicodeEscape"&&(first=firstEscape.codePoint)>=55296&&first<=56319&¤t("\\")&&next("u")){var prevPos=pos;pos++;var secondEscape=parseClassEscape();if(secondEscape.kind=="unicodeEscape"&&(second=secondEscape.codePoint)>=56320&&second<=57343){firstEscape.range[1]=secondEscape.range[1];firstEscape.codePoint=(first-55296)*1024+second-56320+65536;firstEscape.type="value";firstEscape.kind="unicodeCodePointEscape";addRaw(firstEscape)}else{pos=prevPos}}}return firstEscape}function parseClassEscape(){return parseAtomEscape(true)}function parseAtomEscape(insideCharacterClass){var res;res=parseDecimalEscape();if(res){return res}if(insideCharacterClass){if(match("b")){return createEscaped("singleEscape",8,"\\b")}else if(match("B")){throw SyntaxError("\\B not possible inside of CharacterClass")}}res=parseCharacterEscape();return res}function parseDecimalEscape(){var res,match;if(res=matchReg(/^(?!0)\d+/)){match=res[0];var refIdx=parseInt(res[0],10);if(refIdx<=closedCaptureCounter){return createReference(res[0])}else{backrefDenied.push(refIdx);incr(-res[0].length);if(res=matchReg(/^[0-7]{1,3}/)){return createEscaped("octal",parseInt(res[0],8),res[0],1)}else{res=createCharacter(matchReg(/^[89]/));return updateRawStart(res,res.range[0]-1)}}}else if(res=matchReg(/^[0-7]{1,3}/)){match=res[0];if(/^0{1,3}$/.test(match)){return createEscaped("null",0,"0",match.length+1)}else{return createEscaped("octal",parseInt(match,8),match,1)}}else if(res=matchReg(/^[dDsSwW]/)){return createCharacterClassEscape(res[0])}return false}function parseCharacterEscape(){var res;if(res=matchReg(/^[fnrtv]/)){var codePoint=0;switch(res[0]){case"t":codePoint=9;break;case"n":codePoint=10;break;case"v":codePoint=11;break;case"f":codePoint=12;break;case"r":codePoint=13;break}return createEscaped("singleEscape",codePoint,"\\"+res[0])}else if(res=matchReg(/^c([a-zA-Z])/)){return createEscaped("controlLetter",res[1].charCodeAt(0)%32,res[1],2)}else if(res=matchReg(/^x([0-9a-fA-F]{2})/)){return createEscaped("hexadecimalEscape",parseInt(res[1],16),res[1],2)}else if(res=matchReg(/^u([0-9a-fA-F]{4})/)){return parseUnicodeSurrogatePairEscape(createEscaped("unicodeEscape",parseInt(res[1],16),res[1],2))}else if(hasUnicodeFlag&&(res=matchReg(/^u\{([0-9a-fA-F]+)\}/))){return createEscaped("unicodeCodePointEscape",parseInt(res[1],16),res[1],4)}else{return parseIdentityEscape()}}function isIdentifierPart(ch){var NonAsciiIdentifierPart=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&NonAsciiIdentifierPart.test(String.fromCharCode(ch))}function parseIdentityEscape(){var ZWJ="‌";var ZWNJ="‍";var res;var tmp;if(!isIdentifierPart(lookahead())){tmp=incr();return createEscaped("identifier",tmp.charCodeAt(0),tmp,1)}if(match(ZWJ)){return createEscaped("identifier",8204,ZWJ)}else if(match(ZWNJ)){return createEscaped("identifier",8205,ZWNJ)}return null}function parseCharacterClass(){var res,from=pos;if(res=matchReg(/^\[\^/)){res=parseClassRanges();skip("]");return createCharacterClass(res,true,from,pos)}else if(match("[")){res=parseClassRanges();skip("]");return createCharacterClass(res,false,from,pos)}return null}function parseClassRanges(){var res;if(current("]")){return[]}else{res=parseNonemptyClassRanges();if(!res){throw SyntaxError("nonEmptyClassRanges")}return res}}function parseHelperClassRanges(atom){var from,to,res;if(current("-")&&!next("]")){skip("-");res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}to=pos;var classRanges=parseClassRanges();if(!classRanges){throw SyntaxError("classRanges")}from=atom.range[0];if(classRanges.type==="empty"){return[createClassRange(atom,res,from,to)]}return[createClassRange(atom,res,from,to)].concat(classRanges)}res=parseNonemptyClassRangesNoDash();if(!res){throw SyntaxError("nonEmptyClassRangesNoDash")}return[atom].concat(res)}function parseNonemptyClassRanges(){var atom=parseClassAtom();if(!atom){throw SyntaxError("classAtom")}if(current("]")){return[atom]}return parseHelperClassRanges(atom)}function parseNonemptyClassRangesNoDash(){var res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}if(current("]")){return res}return parseHelperClassRanges(res)}function parseClassAtom(){if(match("-")){return createCharacter("-")}else{return parseClassAtomNoDash()}}function parseClassAtomNoDash(){var res;if(res=matchReg(/^[^\\\]-]/)){return createCharacter(res[0])}else if(match("\\")){res=parseClassEscape();if(!res){throw SyntaxError("classEscape")}return parseUnicodeSurrogatePairEscape(res)}}var backrefDenied=[];var closedCaptureCounter=0;var firstIteration=true;var hasUnicodeFlag=(flags||"").indexOf("u")!==-1;var pos=0;str=String(str);if(str===""){str="(?:)"}var result=parseDisjunction();if(result.range[1]!==str.length){throw SyntaxError("Could not parse entire input - got stuck: "+str)}for(var i=0;i0?floor:ceil)(it)}function desc(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return $.setDesc(object,key,desc(bitmap,value))}:simpleSet}function isObject(it){return it!==null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}function assertDefined(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}var $=module.exports=require("./$.fw")({g:global,core:core,html:global.document&&document.documentElement,isObject:isObject,isFunction:isFunction,it:function(it){return it},that:function(){return this},toInteger:toInteger,toLength:function(it){return it>0?min(toInteger(it),9007199254740991):0},toIndex:function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)},has:function(it,key){return hasOwnProperty.call(it,key)},create:Object.create,getProto:Object.getPrototypeOf,DESC:DESC,desc:desc,getDesc:Object.getOwnPropertyDescriptor,setDesc:defineProperty,getKeys:Object.keys,getNames:Object.getOwnPropertyNames,getSymbols:Object.getOwnPropertySymbols,assertDefined:assertDefined,ES5Object:Object,toObject:function(it){return $.ES5Object(assertDefined(it))},hide:hide,def:createDefiner(0),set:global.Symbol?simpleSet:hide,mix:function(target,src){for(var key in src)hide(target,key,src[key]);return target},each:[].forEach});if(typeof __e!="undefined")__e=core;if(typeof __g!="undefined")__g=global},{"./$.fw":220}],224:[function(require,module,exports){var $=require("./$");module.exports=function(object,el){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":223}],225:[function(require,module,exports){var $=require("./$"),assertObject=require("./$.assert").obj;module.exports=function(it){assertObject(it);return $.getSymbols?$.getNames(it).concat($.getSymbols(it)):$.getNames(it)}},{"./$":223,"./$.assert":212}],226:[function(require,module,exports){"use strict";var $=require("./$"),invoke=require("./$.invoke"),assertFunction=require("./$.assert").fn;module.exports=function(){var fn=assertFunction(this),length=arguments.length,pargs=Array(length),i=0,_=$.path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$":223,"./$.assert":212,"./$.invoke":221}],227:[function(require,module,exports){"use strict";module.exports=function(regExp,replace,isStatic){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}},{}],228:[function(require,module,exports){var $=require("./$"),assert=require("./$.assert");module.exports=Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,$.getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function(O,proto){assert.obj(O);assert(proto===null||$.isObject(proto),proto,": can't set as prototype!");if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined)},{"./$":223,"./$.assert":212,"./$.ctx":218}],229:[function(require,module,exports){var $=require("./$");module.exports=function(C){if($.DESC&&$.FW)$.setDesc(C,require("./$.wks")("species"),{configurable:true,get:$.that})}},{"./$":223,"./$.wks":234}],230:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function(TO_STRING){return function(pos){var s=String($.assertDefined(this)),i=$.toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$":223}],231:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),invoke=require("./$.invoke"),global=$.g,isFunction=$.isFunction,setTask=global.setImmediate,clearTask=global.clearImmediate,postMessage=global.postMessage,addEventListener=global.addEventListener,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;function run(){var id=+this;if($.has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run.call(event.data)}if(!isFunction(setTask)||!isFunction(clearTask)){setTask=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearTask=function(id){delete queue[id]};if(cof(global.process)=="process"){defer=function(id){global.process.nextTick(ctx(run,id,1))}}else if(addEventListener&&isFunction(postMessage)&&!$.g.importScripts){defer=function(id){postMessage(id,"*")};addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if($.g.document&&ONREADYSTATECHANGE in document.createElement("script")){defer=function(id){$.html.appendChild(document.createElement("script"))[ONREADYSTATECHANGE]=function(){$.html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$":223,"./$.cof":214,"./$.ctx":218,"./$.invoke":221}],232:[function(require,module,exports){var sid=0;function uid(key){return"Symbol("+key+")_"+(++sid+Math.random()).toString(36)}uid.safe=require("./$").g.Symbol||uid;module.exports=uid},{"./$":223}],233:[function(require,module,exports){var $=require("./$"),UNSCOPABLES=require("./$.wks")("unscopables");if($.FW&&!(UNSCOPABLES in[]))$.hide(Array.prototype,UNSCOPABLES,{});module.exports=function(key){if($.FW)[][UNSCOPABLES][key]=true}},{"./$":223,"./$.wks":234}],234:[function(require,module,exports){var global=require("./$").g,store={};module.exports=function(name){return store[name]||(store[name]=global.Symbol&&global.Symbol[name]||require("./$.uid").safe("Symbol."+name))}},{"./$":223,"./$.uid":232}],235:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,$def=require("./$.def"),$iter=require("./$.iter"),ENTRIES=safe("entries"),FN=safe("fn"),ITER=safe("iter"),forOf=$iter.forOf,stepCall=$iter.stepCall,getIterator=$iter.get,setIterator=$iter.set,createIterator=$iter.create;function $for(iterable,entries){if(!(this instanceof $for))return new $for(iterable,entries);this[ITER]=getIterator(iterable);this[ENTRIES]=!!entries}createIterator($for,"Wrapper",function(){return this[ITER].next()});var $forProto=$for.prototype;setIterator($forProto,function(){return this[ITER]});function createChainIterator(next){function Iterator(iter,fn,that){this[ITER]=getIterator(iter);this[ENTRIES]=iter[ENTRIES];this[FN]=ctx(fn,that,iter[ENTRIES]?2:1)}createIterator(Iterator,"Chain",next,$forProto);setIterator(Iterator.prototype,$.that);return Iterator}var MapIter=createChainIterator(function(){var step=this[ITER].next();return step.done?step:$iter.step(0,stepCall(this[ITER],this[FN],step.value,this[ENTRIES]))});var FilterIter=createChainIterator(function(){for(;;){var step=this[ITER].next();if(step.done||stepCall(this[ITER],this[FN],step.value,this[ENTRIES]))return step}});$.mix($forProto,{of:function(fn,that){forOf(this,this[ENTRIES],fn,that)},array:function(fn,that){var result=[];forOf(fn!=undefined?this.map(fn,that):this,false,result.push,result);return result},filter:function(fn,that){return new FilterIter(this,fn,that)},map:function(fn,that){return new MapIter(this,fn,that)}});$for.isIterable=$iter.is;$for.getIterator=getIterator;$def($def.G+$def.F,{$for:$for})},{"./$":223,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.uid":232}],236:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),assertFunction=require("./$.assert").fn;$def($def.P+$def.F,"Array",{turn:function(fn,target){assertFunction(fn);var memo=target==undefined?[]:Object(target),O=$.ES5Object(this),length=$.toLength(O.length),index=0;while(length>index)if(fn(memo,O[index],index++,this)===false)break;return memo}});require("./$.unscope")("turn")},{"./$":223,"./$.assert":212,"./$.def":219,"./$.unscope":233}],237:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),invoke=require("./$.invoke"),hide=$.hide,assertFunction=require("./$.assert").fn,_=$.DESC?require("./$.uid")("tie"):"toLocaleString",toLocaleString={}.toLocaleString;$.core._=$.path._=$.path._||{};$def($def.P+$def.F,"Function",{part:require("./$.partial"),only:function(numberArguments,that){var fn=assertFunction(this),n=$.toLength(numberArguments),isThat=arguments.length>1;return function(){var length=Math.min(n,arguments.length),args=Array(length),i=0;while(length>i)args[i]=arguments[i++];return invoke(fn,args,isThat?that:this)}}});function tie(key){var that=this,bound={};return hide(that,_,function(key){if(key===undefined||!(key in that))return toLocaleString.call(that);return $.has(bound,key)?bound[key]:bound[key]=ctx(that[key],that,-1)})[_](key)}hide($.path._,"toString",function(){return _});hide(Object.prototype,_,tie);$.DESC||hide(Array.prototype,_,tie)},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.def":219,"./$.invoke":221,"./$.partial":226,"./$.uid":232}],238:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),core=$.core,formatRegExp=/\b\w\w?\b/g,flexioRegExp=/:(.*)\|(.*)$/,locales={},current="en",SECONDS="Seconds",MINUTES="Minutes",HOURS="Hours",DATE="Date",MONTH="Month",YEAR="FullYear";function lz(num){return num>9?num:"0"+num}function createFormat(prefix){return function(template,locale){var that=this,dict=locales[$.has(locales,locale)?locale:current];function get(unit){return that[prefix+unit]()}return String(template).replace(formatRegExp,function(part){switch(part){case"s":return get(SECONDS);case"ss":return lz(get(SECONDS));case"m":return get(MINUTES);case"mm":return lz(get(MINUTES));case"h":return get(HOURS);case"hh":return lz(get(HOURS));case"D":return get(DATE);case"DD":return lz(get(DATE));case"W":return dict[0][get("Day")];case"N":return get(MONTH)+1;case"NN":return lz(get(MONTH)+1);case"M":return dict[2][get(MONTH)];case"MM":return dict[1][get(MONTH)];case"Y":return get(YEAR);case"YY":return lz(get(YEAR)%100)}return part})}}function addLocale(lang,locale){function split(index){var result=[];$.each.call(locale.months.split(","),function(it){result.push(it.replace(flexioRegExp,"$"+index))});return result}locales[lang]=[locale.weekdays.split(","),split(1),split(2)];return core}$def($def.P+$def.F,DATE,{format:createFormat("get"),formatUTC:createFormat("getUTC")});addLocale(current,{weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",months:"January,February,March,April,May,June,July,August,September,October,November,December"});addLocale("ru",{weekdays:"Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота",months:"Январ:я|ь,Феврал:я|ь,Март:а|,Апрел:я|ь,Ма:я|й,Июн:я|ь,"+"Июл:я|ь,Август:а|,Сентябр:я|ь,Октябр:я|ь,Ноябр:я|ь,Декабр:я|ь"});core.locale=function(locale){return $.has(locales,locale)?current=locale:current};core.addLocale=addLocale},{"./$":223,"./$.def":219}],239:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),partial=require("./$.partial");$def($def.G+$def.F,{delay:function(time){return new($.core.Promise||$.g.Promise)(function(resolve){setTimeout(partial.call(resolve,true),time)})}})},{"./$":223,"./$.def":219,"./$.partial":226}],240:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),assign=require("./$.assign"),keyOf=require("./$.keyof"),ITER=require("./$.uid").safe("iter"),assert=require("./$.assert"),$iter=require("./$.iter"),step=$iter.step,getKeys=$.getKeys,toObject=$.toObject,has=$.has;function Dict(iterable){var dict=$.create(null);if(iterable!=undefined){if($iter.is(iterable)){$iter.forOf(iterable,true,function(key,value){dict[key]=value})}else assign(dict,iterable)}return dict}Dict.prototype=null;function DictIterator(iterated,kind){$.set(this,ITER,{o:toObject(iterated),a:getKeys(iterated),i:0,k:kind})}$iter.create(DictIterator,"Dict",function(){var iter=this[ITER],O=iter.o,keys=iter.a,kind=iter.k,key;do{if(iter.i>=keys.length){iter.o=undefined;return step(1)}}while(!has(O,key=keys[iter.i++]));if(kind=="key")return step(0,key);if(kind=="value")return step(0,O[key]);return step(0,[key,O[key]])});function createDictIter(kind){return function(it){return new DictIterator(it,kind)}}function generic(A,B){return typeof A=="function"?A:B}function createDictMethod(TYPE){var IS_MAP=TYPE==1,IS_EVERY=TYPE==4;return function(object,callbackfn,that){var f=ctx(callbackfn,that,3),O=toObject(object),result=IS_MAP||TYPE==7||TYPE==2?new(generic(this,Dict)):undefined,key,val,res;for(key in O)if(has(O,key)){val=O[key];res=f(val,key,object);if(TYPE){if(IS_MAP)result[key]=res;else if(res)switch(TYPE){case 2:result[key]=val;break;case 3:return true;case 5:return val;case 6:return key;case 7:result[res[0]]=res[1]}else if(IS_EVERY)return false}}return TYPE==3||IS_EVERY?IS_EVERY:result}}function createDictReduce(IS_TURN){return function(object,mapfn,init){assert.fn(mapfn);var O=toObject(object),keys=getKeys(O),length=keys.length,i=0,memo,key,result;if(IS_TURN){memo=init==undefined?new(generic(this,Dict)):Object(init)}else if(arguments.length<3){assert(length,"Reduce of empty object with no initial value");memo=O[keys[i++]]}else memo=Object(init);while(length>i)if(has(O,key=keys[i++])){result=mapfn(memo,O[key],key,object);if(IS_TURN){if(result===false)break}else memo=result}return memo}}var findKey=createDictMethod(6);$def($def.G+$def.F,{Dict:$.mix(Dict,{keys:createDictIter("key"),values:createDictIter("value"),entries:createDictIter("key+value"),forEach:createDictMethod(0),map:createDictMethod(1),filter:createDictMethod(2),some:createDictMethod(3),every:createDictMethod(4),find:createDictMethod(5),findKey:findKey,mapPairs:createDictMethod(7),reduce:createDictReduce(false),turn:createDictReduce(true),keyOf:keyOf,includes:function(object,el){return(el==el?keyOf(object,el):findKey(object,function(it){return it!=it}))!==undefined},has:has,get:function(object,key){if(has(object,key))return object[key]},set:$.def,isDict:function(it){return $.isObject(it)&&$.getProto(it)===Dict.prototype}})})},{"./$":223,"./$.assert":212,"./$.assign":213,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.keyof":224,"./$.uid":232}],241:[function(require,module,exports){var $def=require("./$.def");$def($def.G+$def.F,{global:require("./$").g})},{"./$":223,"./$.def":219}],242:[function(require,module,exports){var core=require("./$").core,$iter=require("./$.iter");core.isIterable=$iter.is;core.getIterator=$iter.get},{"./$":223,"./$.iter":222}],243:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),log={},enabled=true;$.each.call(("assert,clear,count,debug,dir,dirxml,error,exception,"+"group,groupCollapsed,groupEnd,info,isIndependentlyComposed,log,"+"markTimeline,profile,profileEnd,table,time,timeEnd,timeline,"+"timelineEnd,timeStamp,trace,warn").split(","),function(key){log[key]=function(){if(enabled&&$.g.console&&$.isFunction(console[key])){return Function.apply.call(console[key],console,arguments)}}});$def($def.G+$def.F,{log:require("./$.assign")(log.log,log,{enable:function(){enabled=true},disable:function(){enabled=false}})})},{"./$":223,"./$.assign":213,"./$.def":219}],244:[function(require,module,exports){"use strict";var $=require("./$"),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step,NUMBER="Number";function NumberIterator(iterated){$.set(this,ITER,{l:$.toLength(iterated),i:0})}$iter.create(NumberIterator,NUMBER,function(){var iter=this[ITER],i=iter.i++;return ii)args.push(arguments[i++]);return invoke(fn,args)}});$def($def.P+$def.F,"Number",methods)},{"./$":223,"./$.def":219,"./$.invoke":221}],246:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),ownKeys=require("./$.own-keys");function define(target,mixin){var keys=ownKeys($.toObject(mixin)),length=keys.length,i=0,key;while(length>i)$.setDesc(target,key=keys[i++],$.getDesc(mixin,key));return target}$def($def.S+$def.F,"Object",{isObject:$.isObject,classof:require("./$.cof").classof,define:define,make:function(proto,mixin){return define($.create(proto),mixin)}})},{"./$":223,"./$.cof":214,"./$.def":219,"./$.own-keys":225}],247:[function(require,module,exports){var $def=require("./$.def"),replacer=require("./$.replacer");var escapeHTMLDict={"&":"&","<":"<",">":">",'"':""","'":"'"},unescapeHTMLDict={},key;for(key in escapeHTMLDict)unescapeHTMLDict[escapeHTMLDict[key]]=key;$def($def.P+$def.F,"String",{escapeHTML:replacer(/[&<>"']/g,escapeHTMLDict),unescapeHTML:replacer(/&(?:amp|lt|gt|quot|apos);/g,unescapeHTMLDict)})},{"./$.def":219,"./$.replacer":227}],248:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid").safe("__proto__"),assert=require("./$.assert"),assertObject=assert.obj,ObjectProto=Object.prototype,A=[],slice=A.slice,indexOf=A.indexOf,classof=cof.classof,defineProperties=Object.defineProperties,has=$.has,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,isFunction=$.isFunction,toObject=$.toObject,toLength=$.toLength,IE8_DOM_DEFINE=false;if(!$.DESC){try{IE8_DOM_DEFINE=defineProperty(document.createElement("div"),"x",{get:function(){return 8}}).x==8}catch(e){}$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)assertObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};defineProperties=function(O,Properties){assertObject(O);var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!$.DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=document.createElement("iframe"),i=keysLen1,iframeDocument;iframe.style.display="none";$.html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write("");iframeDocument.close();createDict=iframeDocument.F;while(i--)delete createDict.prototype[keys1[i]];return createDict()};function createGetKeys(names,length){return function(object){var O=toObject(object),i=0,result=[],key;for(key in O)if(key!=IE_PROTO)has(O,key)&&result.push(key);while(length>i)if(has(O,key=names[i++])){~indexOf.call(result,key)||result.push(key)}return result}}function isPrimitive(it){return!$.isObject(it)}function Empty(){}$def($def.S,"Object",{getPrototypeOf:$.getProto=$.getProto||function(O){O=Object(assert.def(O));if(has(O,IE_PROTO))return O[IE_PROTO];if(isFunction(O.constructor)&&O instanceof O.constructor){return O.constructor.prototype}return O instanceof Object?ObjectProto:null},getOwnPropertyNames:$.getNames=$.getNames||createGetKeys(keys2,keys2.length,true),create:$.create=$.create||function(O,Properties){var result;if(O!==null){Empty.prototype=assertObject(O);result=new Empty;Empty.prototype=null;result[IE_PROTO]=O}else result=createDict();return Properties===undefined?result:defineProperties(result,Properties)},keys:$.getKeys=$.getKeys||createGetKeys(keys1,keysLen1,false),seal:$.it,freeze:$.it,preventExtensions:$.it,isSealed:isPrimitive,isFrozen:isPrimitive,isExtensible:$.isObject});$def($def.P,"Function",{bind:function(that){var fn=assert.fn(this),partArgs=slice.call(arguments,1);function bound(){var args=partArgs.concat(slice.call(arguments));return invoke(fn,args,this instanceof bound?$.create(fn.prototype):that)}if(fn.prototype)bound.prototype=fn.prototype;return bound}});function arrayMethodFix(fn){return function(){return fn.apply($.ES5Object(this),arguments)}}if(!(0 in Object("z")&&"z"[0]=="z")){$.ES5Object=function(it){return cof(it)=="String"?it.split(""):Object(it)}}$def($def.P+$def.F*($.ES5Object!=Object),"Array",{slice:arrayMethodFix(slice),join:arrayMethodFix(A.join)});$def($def.S,"Array",{isArray:function(arg){return cof(arg)=="Array"}});function createArrayReduce(isRight){return function(callbackfn,memo){assert.fn(callbackfn);var O=toObject(this),length=toLength(O.length),index=isRight?length-1:0,i=isRight?-1:1;if(arguments.length<2)for(;;){if(index in O){memo=O[index];index+=i;break}index+=i;assert(isRight?index>=0:length>index,"Reduce of empty array with no initial value")}for(;isRight?index>=0:length>index;index+=i)if(index in O){memo=callbackfn(memo,O[index],index,this)}return memo}}$def($def.P,"Array",{forEach:$.each=$.each||arrayMethod(0),map:arrayMethod(1),filter:arrayMethod(2),some:arrayMethod(3),every:arrayMethod(4),reduce:createArrayReduce(false),reduceRight:createArrayReduce(true),indexOf:indexOf=indexOf||require("./$.array-includes")(false),lastIndexOf:function(el,fromIndex){var O=toObject(this),length=toLength(O.length),index=length-1;if(arguments.length>1)index=Math.min(index,$.toInteger(fromIndex));if(index<0)index=toLength(length+index);for(;index>=0;index--)if(index in O)if(O[index]===el)return index;return-1}});$def($def.P,"String",{trim:require("./$.replacer")(/^\s*([\s\S]*\S)?\s*$/,"$1")});$def($def.S,"Date",{now:function(){return+new Date}});function lz(num){return num>9?num:"0"+num}$def($def.P,"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var d=this,y=d.getUTCFullYear(),m=d.getUTCMilliseconds(),s=y<0?"-":y>9999?"+":"";return s+("00000"+Math.abs(y)).slice(s?-6:-4)+"-"+lz(d.getUTCMonth()+1)+"-"+lz(d.getUTCDate())+"T"+lz(d.getUTCHours())+":"+lz(d.getUTCMinutes())+":"+lz(d.getUTCSeconds())+"."+(m>99?m:"0"+lz(m))+"Z"}});if(classof(function(){return arguments}())=="Object")cof.classof=function(it){var tag=classof(it);return tag=="Object"&&isFunction(it.callee)?"Arguments":tag}},{"./$":223,"./$.array-includes":210,"./$.array-methods":211,"./$.assert":212,"./$.cof":214,"./$.def":219,"./$.invoke":221,"./$.replacer":227,"./$.uid":232}],249:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{copyWithin:function(target,start){var O=Object($.assertDefined(this)),len=$.toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],fin=end===undefined?len:toIndex(end,len),count=Math.min(fin-from,len-to),inc=1;if(from0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O}});require("./$.unscope")("copyWithin")},{"./$":223,"./$.def":219,"./$.unscope":233}],250:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{fill:function(value){var O=Object($.assertDefined(this)),length=$.toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O}});require("./$.unscope")("fill")},{"./$":223,"./$.def":219,"./$.unscope":233}],251:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{findIndex:require("./$.array-methods")(6)});require("./$.unscope")("findIndex")},{"./$.array-methods":211,"./$.def":219,"./$.unscope":233}],252:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{find:require("./$.array-methods")(5)});require("./$.unscope")("find")},{"./$.array-methods":211,"./$.def":219,"./$.unscope":233}],253:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),$iter=require("./$.iter"),stepCall=$iter.stepCall;$def($def.S+$def.F*$iter.DANGER_CLOSING,"Array",{from:function(arrayLike){var O=Object($.assertDefined(arrayLike)),mapfn=arguments[1],mapping=mapfn!==undefined,f=mapping?ctx(mapfn,arguments[2],2):undefined,index=0,length,result,step,iterator;if($iter.is(O)){iterator=$iter.get(O);result=new(typeof this=="function"?this:Array);for(;!(step=iterator.next()).done;index++){result[index]=mapping?stepCall(iterator,f,[step.value,index],true):step.value}}else{result=new(typeof this=="function"?this:Array)(length=$.toLength(O.length));for(;length>index;index++){result[index]=mapping?f(O[index],index):O[index]}}result.length=index;return result}})},{"./$":223,"./$.ctx":218,"./$.def":219,"./$.iter":222}],254:[function(require,module,exports){var $=require("./$"),setUnscope=require("./$.unscope"),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step,Iterators=$iter.Iterators;$iter.std(Array,"Array",function(iterated,kind){$.set(this,ITER,{o:$.toObject(iterated),i:0,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,index=iter.i++;if(!O||index>=O.length){iter.o=undefined;return step(1)}if(kind=="key")return step(0,index);if(kind=="value")return step(0,O[index]);return step(0,[index,O[index]])},"value");Iterators.Arguments=Iterators.Array;setUnscope("keys");setUnscope("values");setUnscope("entries")},{"./$":223,"./$.iter":222,"./$.uid":232,"./$.unscope":233}],255:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Array",{of:function(){var index=0,length=arguments.length,result=new(typeof this=="function"?this:Array)(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}})},{"./$.def":219}],256:[function(require,module,exports){require("./$.species")(Array)},{"./$.species":229}],257:[function(require,module,exports){"use strict";var $=require("./$"),NAME="name",setDesc=$.setDesc,FunctionProto=Function.prototype;NAME in FunctionProto||$.FW&&$.DESC&&setDesc(FunctionProto,NAME,{configurable:true,get:function(){var match=String(this).match(/^\s*function ([^ (]*)/),name=match?match[1]:"";$.has(this,NAME)||setDesc(this,NAME,$.desc(5,name));return name},set:function(value){$.has(this,NAME)||setDesc(this,NAME,$.desc(0,value))}})},{"./$":223}],258:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Map",{get:function(key){var entry=strong.getEntry(this,key);return entry&&entry.v},set:function(key,value){return strong.def(this,key===0?0:key,value)}},strong,true)},{"./$.collection":217,"./$.collection-strong":215}],259:[function(require,module,exports){var Infinity=1/0,$def=require("./$.def"),E=Math.E,pow=Math.pow,abs=Math.abs,exp=Math.exp,log=Math.log,sqrt=Math.sqrt,ceil=Math.ceil,floor=Math.floor,sign=Math.sign||function(x){ +return(x=+x)==0||x!=x?x:x<0?-1:1};function asinh(x){return!isFinite(x=+x)||x==0?x:x<0?-asinh(-x):log(x+sqrt(x*x+1))}function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:exp(x)-1}$def($def.S,"Math",{acosh:function(x){return(x=+x)<1?NaN:isFinite(x)?log(x/E+sqrt(x+1)*sqrt(x-1)/E)+1:x},asinh:asinh,atanh:function(x){return(x=+x)==0?x:log((1+x)/(1-x))/2},cbrt:function(x){return sign(x=+x)*pow(abs(x),1/3)},clz32:function(x){return(x>>>=0)?32-x.toString(2).length:32},cosh:function(x){return(exp(x=+x)+exp(-x))/2},expm1:expm1,fround:function(x){return new Float32Array([x])[0]},hypot:function(value1,value2){var sum=0,len1=arguments.length,len2=len1,args=Array(len1),larg=-Infinity,arg;while(len1--){arg=args[len1]=+arguments[len1];if(arg==Infinity||arg==-Infinity)return Infinity;if(arg>larg)larg=arg}larg=arg||1;while(len2--)sum+=pow(args[len2]/larg,2);return larg*sqrt(sum)},imul:function(x,y){var UInt16=65535,xn=+x,yn=+y,xl=UInt16&xn,yl=UInt16&yn;return 0|xl*yl+((UInt16&xn>>>16)*yl+xl*(UInt16&yn>>>16)<<16>>>0)},log1p:function(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:log(1+x)},log10:function(x){return log(x)/Math.LN10},log2:function(x){return log(x)/Math.LN2},sign:sign,sinh:function(x){return abs(x=+x)<1?(expm1(x)-expm1(-x))/2:(exp(x-1)-exp(-x-1))*(E/2)},tanh:function(x){var a=expm1(x=+x),b=expm1(-x);return a==Infinity?1:b==Infinity?-1:(a-b)/(exp(x)+exp(-x))},trunc:function(it){return(it>0?floor:ceil)(it)}})},{"./$.def":219}],260:[function(require,module,exports){"use strict";var $=require("./$"),isObject=$.isObject,isFunction=$.isFunction,NUMBER="Number",Number=$.g[NUMBER],Base=Number,proto=Number.prototype;function toPrimitive(it){var fn,val;if(isFunction(fn=it.valueOf)&&!isObject(val=fn.call(it)))return val;if(isFunction(fn=it.toString)&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to number")}function toNumber(it){if(isObject(it))it=toPrimitive(it);if(typeof it=="string"&&it.length>2&&it.charCodeAt(0)==48){var binary=false;switch(it.charCodeAt(1)){case 66:case 98:binary=true;case 79:case 111:return parseInt(it.slice(2),binary?2:8)}}return+it}if($.FW&&!(Number("0o1")&&Number("0b1"))){Number=function Number(it){return this instanceof Number?new Base(toNumber(it)):toNumber(it)};$.each.call($.DESC?$.getNames(Base):("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,"+"EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,"+"MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger").split(","),function(key){if($.has(Base,key)&&!$.has(Number,key)){$.setDesc(Number,key,$.getDesc(Base,key))}});Number.prototype=proto;proto.constructor=Number;$.hide($.g,NUMBER,Number)}},{"./$":223}],261:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),abs=Math.abs,floor=Math.floor,MAX_SAFE_INTEGER=9007199254740991;function isInteger(it){return!$.isObject(it)&&isFinite(it)&&floor(it)===it}$def($def.S,"Number",{EPSILON:Math.pow(2,-52),isFinite:function(it){return typeof it=="number"&&isFinite(it)},isInteger:isInteger,isNaN:function(number){return number!=number},isSafeInteger:function(number){return isInteger(number)&&abs(number)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MIN_SAFE_INTEGER:-MAX_SAFE_INTEGER,parseFloat:parseFloat,parseInt:parseInt})},{"./$":223,"./$.def":219}],262:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{assign:require("./$.assign")})},{"./$.assign":213,"./$.def":219}],263:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{is:function(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}})},{"./$.def":219}],264:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{setPrototypeOf:require("./$.set-proto")})},{"./$.def":219,"./$.set-proto":228}],265:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),isObject=$.isObject,toObject=$.toObject;function wrapObjectMethod(METHOD,MODE){var fn=($.core.Object||{})[METHOD]||Object[METHOD],f=0,o={};o[METHOD]=MODE==1?function(it){return isObject(it)?fn(it):it}:MODE==2?function(it){return isObject(it)?fn(it):true}:MODE==3?function(it){return isObject(it)?fn(it):false}:MODE==4?function(it,key){return fn(toObject(it),key)}:MODE==5?function(it){return fn(Object($.assertDefined(it)))}:function(it){return fn(toObject(it))};try{fn("z")}catch(e){f=1}$def($def.S+$def.F*f,"Object",o)}wrapObjectMethod("freeze",1);wrapObjectMethod("seal",1);wrapObjectMethod("preventExtensions",1);wrapObjectMethod("isFrozen",2);wrapObjectMethod("isSealed",2);wrapObjectMethod("isExtensible",3);wrapObjectMethod("getOwnPropertyDescriptor",4);wrapObjectMethod("getPrototypeOf",5);wrapObjectMethod("keys");wrapObjectMethod("getOwnPropertyNames")},{"./$":223,"./$.def":219}],266:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),tmp={};tmp[require("./$.wks")("toStringTag")]="z";if($.FW&&cof(tmp)!="z")$.hide(Object.prototype,"toString",function(){return"[object "+cof.classof(this)+"]"})},{"./$":223,"./$.cof":214,"./$.wks":234}],267:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),$def=require("./$.def"),assert=require("./$.assert"),$iter=require("./$.iter"),SPECIES=require("./$.wks")("species"),RECORD=require("./$.uid").safe("record"),forOf=$iter.forOf,PROMISE="Promise",global=$.g,process=global.process,asap=process&&process.nextTick||require("./$.task").set,Promise=global[PROMISE],Base=Promise,isFunction=$.isFunction,isObject=$.isObject,assertFunction=assert.fn,assertObject=assert.obj,test;function getConstructor(C){var S=assertObject(C)[SPECIES];return S!=undefined?S:C}isFunction(Promise)&&isFunction(Promise.resolve)&&Promise.resolve(test=new Promise(function(){}))==test||function(){function isThenable(it){var then;if(isObject(it))then=it.then;return isFunction(then)?then:false}function handledRejectionOrHasOnRejected(promise){var record=promise[RECORD],chain=record.c,i=0,react;if(record.h)return true;while(chain.length>i){react=chain[i++];if(react.fail||handledRejectionOrHasOnRejected(react.P))return true}}function notify(record,isReject){var chain=record.c;if(isReject||chain.length)asap(function(){var promise=record.p,value=record.v,ok=record.s==1,i=0;if(isReject&&!handledRejectionOrHasOnRejected(promise)){setTimeout(function(){if(!handledRejectionOrHasOnRejected(promise)){if(cof(process)=="process"){process.emit("unhandledRejection",value,promise)}else if(global.console&&isFunction(console.error)){console.error("Unhandled promise rejection",value)}}},1e3)}else while(chain.length>i)!function(react){var cb=ok?react.ok:react.fail,ret,then;try{if(cb){if(!ok)record.h=true;ret=cb===true?value:cb(value);if(ret===react.P){react.rej(TypeError(PROMISE+"-chain cycle"))}else if(then=isThenable(ret)){then.call(ret,react.res,react.rej)}else react.res(ret)}else react.rej(value)}catch(err){react.rej(err)}}(chain[i++]);chain.length=0})}function reject(value){var record=this;if(record.d)return;record.d=true;record=record.r||record;record.v=value;record.s=2;notify(record,true)}function resolve(value){var record=this,then,wrapper;if(record.d)return;record.d=true;record=record.r||record;try{if(then=isThenable(value)){wrapper={r:record,d:false};then.call(value,ctx(resolve,wrapper,1),ctx(reject,wrapper,1))}else{record.v=value;record.s=1;notify(record)}}catch(err){reject.call(wrapper||{r:record,d:false},err)}}Promise=function(executor){assertFunction(executor);var record={p:assert.inst(this,Promise,PROMISE),c:[],s:0,d:false,v:undefined,h:false};$.hide(this,RECORD,record);try{executor(ctx(resolve,record,1),ctx(reject,record,1))}catch(err){reject.call(record,err)}};$.mix(Promise.prototype,{then:function(onFulfilled,onRejected){var S=assertObject(assertObject(this).constructor)[SPECIES];var react={ok:isFunction(onFulfilled)?onFulfilled:true,fail:isFunction(onRejected)?onRejected:false};var P=react.P=new(S!=undefined?S:Promise)(function(res,rej){react.res=assertFunction(res);react.rej=assertFunction(rej)});var record=this[RECORD];record.c.push(react);record.s&¬ify(record);return P},"catch":function(onRejected){return this.then(undefined,onRejected)}})}();$def($def.G+$def.W+$def.F*(Promise!=Base),{Promise:Promise});$def($def.S,PROMISE,{reject:function(r){return new(getConstructor(this))(function(res,rej){rej(r)})},resolve:function(x){return isObject(x)&&RECORD in x&&$.getProto(x)===this.prototype?x:new(getConstructor(this))(function(res){res(x)})}});$def($def.S+$def.F*($iter.fail(function(iter){Promise.all(iter)["catch"](function(){})})||$iter.DANGER_CLOSING),PROMISE,{all:function(iterable){var C=getConstructor(this),values=[];return new C(function(resolve,reject){forOf(iterable,false,values.push,values);var remaining=values.length,results=Array(remaining);if(remaining)$.each.call(values,function(promise,index){C.resolve(promise).then(function(value){results[index]=value;--remaining||resolve(results)},reject)});else resolve(results)})},race:function(iterable){var C=getConstructor(this);return new C(function(resolve,reject){forOf(iterable,false,function(promise){C.resolve(promise).then(resolve,reject)})})}});cof.set(Promise,PROMISE);require("./$.species")(Promise)},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.species":229,"./$.task":231,"./$.uid":232,"./$.wks":234}],268:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),setProto=require("./$.set-proto"),$iter=require("./$.iter"),ITER=require("./$.uid").safe("iter"),step=$iter.step,assert=require("./$.assert"),isObject=$.isObject,getDesc=$.getDesc,setDesc=$.setDesc,getProto=$.getProto,apply=Function.apply,assertObject=assert.obj,isExtensible=Object.isExtensible||$.it;function Enumerate(iterated){var keys=[],key;for(key in iterated)keys.push(key);$.set(this,ITER,{o:iterated,a:keys,i:0})}$iter.create(Enumerate,"Object",function(){var iter=this[ITER],keys=iter.a,key;do{if(iter.i>=keys.length)return step(1)}while(!((key=keys[iter.i++])in iter.o));return step(0,key)});function wrap(fn){return function(it){assertObject(it);try{fn.apply(undefined,arguments);return true}catch(e){return false}}}function reflectGet(target,propertyKey){var receiver=arguments.length<3?target:arguments[2],desc=getDesc(assertObject(target),propertyKey),proto;if(desc)return $.has(desc,"value")?desc.value:desc.get===undefined?undefined:desc.get.call(receiver);return isObject(proto=getProto(target))?reflectGet(proto,propertyKey,receiver):undefined}function reflectSet(target,propertyKey,V){var receiver=arguments.length<4?target:arguments[3],ownDesc=getDesc(assertObject(target),propertyKey),existingDescriptor,proto;if(!ownDesc){if(isObject(proto=getProto(target))){return reflectSet(proto,propertyKey,V,receiver)}ownDesc=$.desc(0)}if($.has(ownDesc,"value")){if(ownDesc.writable===false||!isObject(receiver))return false;existingDescriptor=getDesc(receiver,propertyKey)||$.desc(0);existingDescriptor.value=V;setDesc(receiver,propertyKey,existingDescriptor);return true}return ownDesc.set===undefined?false:(ownDesc.set.call(receiver,V),true)}var reflect={apply:require("./$.ctx")(Function.call,apply,3),construct:function(target,argumentsList){var proto=assert.fn(arguments.length<3?target:arguments[2]).prototype,instance=$.create(isObject(proto)?proto:Object.prototype),result=apply.call(target,instance,argumentsList);return isObject(result)?result:instance},defineProperty:wrap(setDesc),deleteProperty:function(target,propertyKey){var desc=getDesc(assertObject(target),propertyKey);return desc&&!desc.configurable?false:delete target[propertyKey]},enumerate:function(target){return new Enumerate(assertObject(target))},get:reflectGet,getOwnPropertyDescriptor:function(target,propertyKey){return getDesc(assertObject(target),propertyKey)},getPrototypeOf:function(target){return getProto(assertObject(target))},has:function(target,propertyKey){return propertyKey in target},isExtensible:function(target){return!!isExtensible(assertObject(target))},ownKeys:require("./$.own-keys"),preventExtensions:wrap(Object.preventExtensions||$.it),set:reflectSet};if(setProto)reflect.setPrototypeOf=function(target,proto){setProto(assertObject(target),proto);return true};$def($def.G,{Reflect:{}});$def($def.S,"Reflect",reflect)},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.own-keys":225,"./$.set-proto":228,"./$.uid":232}],269:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),RegExp=$.g.RegExp,Base=RegExp,proto=RegExp.prototype;if($.FW&&$.DESC){if(!function(){try{return RegExp(/a/g,"i")=="/a/i"}catch(e){}}()){RegExp=function RegExp(pattern,flags){return new Base(cof(pattern)=="RegExp"&&flags!==undefined?pattern.source:pattern,flags)};$.each.call($.getNames(Base),function(key){key in RegExp||$.setDesc(RegExp,key,{configurable:true,get:function(){return Base[key]},set:function(it){Base[key]=it}})});proto.constructor=RegExp;RegExp.prototype=proto;$.hide($.g,"RegExp",RegExp)}if(/./g.flags!="g")$.setDesc(proto,"flags",{configurable:true,get:require("./$.replacer")(/^.*\/(\w*)$/,"$1")})}require("./$.species")(RegExp)},{"./$":223,"./$.cof":214,"./$.replacer":227,"./$.species":229}],270:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Set",{add:function(value){return strong.def(this,value=value===0?0:value,value)}},strong)},{"./$.collection":217,"./$.collection-strong":215}],271:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{codePointAt:require("./$.string-at")(false)})},{"./$.def":219,"./$.string-at":230}],272:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),toLength=$.toLength;$def($def.P,"String",{endsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),endPosition=arguments[1],len=toLength(that.length),end=endPosition===undefined?len:Math.min(toLength(endPosition),len);searchString+="";return that.slice(end-searchString.length,end)===searchString}})},{"./$":223,"./$.cof":214,"./$.def":219}],273:[function(require,module,exports){var $def=require("./$.def"),toIndex=require("./$").toIndex,fromCharCode=String.fromCharCode;$def($def.S,"String",{fromCodePoint:function(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")}})},{"./$":223,"./$.def":219}],274:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{includes:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();return!!~String($.assertDefined(this)).indexOf(searchString,arguments[1])}})},{"./$":223,"./$.cof":214,"./$.def":219}],275:[function(require,module,exports){var set=require("./$").set,at=require("./$.string-at")(true),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step;$iter.std(String,"String",function(iterated){set(this,ITER,{o:String(iterated),i:0})},function(){var iter=this[ITER],O=iter.o,index=iter.i,point;if(index>=O.length)return step(1);point=at.call(O,index);iter.i+=point.length;return step(0,point)})},{"./$":223,"./$.iter":222,"./$.string-at":230,"./$.uid":232}],276:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");$def($def.S,"String",{raw:function(callSite){var raw=$.toObject(callSite.raw),len=$.toLength(raw.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(raw[i++]));if(i0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}})},{"./$":223,"./$.def":219}],278:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{startsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),index=$.toLength(Math.min(arguments[1],that.length));searchString+="";return that.slice(index,index+searchString.length)===searchString}})},{"./$":223,"./$.cof":214,"./$.def":219}],279:[function(require,module,exports){"use strict";var $=require("./$"),setTag=require("./$.cof").set,uid=require("./$.uid"),$def=require("./$.def"),keyOf=require("./$.keyof"),has=$.has,hide=$.hide,getNames=$.getNames,toObject=$.toObject,Symbol=$.g.Symbol,Base=Symbol,setter=false,TAG=uid.safe("tag"),SymbolRegistry={},AllSymbols={};function wrap(tag){var sym=AllSymbols[tag]=$.set($.create(Symbol.prototype),TAG,tag);$.DESC&&setter&&$.setDesc(Object.prototype,tag,{configurable:true,set:function(value){hide(this,tag,value)}});return sym}if(!$.isFunction(Symbol)){Symbol=function(description){if(this instanceof Symbol)throw TypeError("Symbol is not a constructor");return wrap(uid(description))};hide(Symbol.prototype,"toString",function(){return this[TAG]})}$def($def.G+$def.W,{Symbol:Symbol});var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=Symbol(key)},keyFor:function(key){return keyOf(SymbolRegistry,key)},pure:uid.safe,set:$.set,useSetter:function(){setter=true},useSimple:function(){setter=false}};$.each.call(("hasInstance,isConcatSpreadable,iterator,match,replace,search,"+"species,split,toPrimitive,toStringTag,unscopables").split(","),function(it){var sym=require("./$.wks")(it);symbolStatics[it]=Symbol===Base?sym:wrap(sym)});setter=true;$def($def.S,"Symbol",symbolStatics);$def($def.S+$def.F*(Symbol!=Base),"Object",{getOwnPropertyNames:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])||result.push(key);return result},getOwnPropertySymbols:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])&&result.push(AllSymbols[key]);return result}});setTag(Symbol,"Symbol");setTag(Math,"Math",true);setTag($.g.JSON,"JSON",true)},{"./$":223,"./$.cof":214,"./$.def":219,"./$.keyof":224,"./$.uid":232,"./$.wks":234}],280:[function(require,module,exports){"use strict";var $=require("./$"),weak=require("./$.collection-weak"),leakStore=weak.leakStore,ID=weak.ID,WEAK=weak.WEAK,has=$.has,isObject=$.isObject,isFrozen=Object.isFrozen||$.core.Object.isFrozen,tmp={};var WeakMap=require("./$.collection")("WeakMap",{get:function(key){if(isObject(key)){if(isFrozen(key))return leakStore(this).get(key);if(has(key,WEAK))return key[WEAK][this[ID]]}},set:function(key,value){return weak.def(this,key,value)}},weak,true,true);if($.FW&&(new WeakMap).set((Object.freeze||Object)(tmp),7).get(tmp)!=7){$.each.call(["delete","has","get","set"],function(key){var method=WeakMap.prototype[key];WeakMap.prototype[key]=function(a,b){if(isObject(a)&&isFrozen(a)){var result=leakStore(this)[key](a,b);return key=="set"?this:result}return method.call(this,a,b)}})}},{"./$":223,"./$.collection":217,"./$.collection-weak":216}],281:[function(require,module,exports){"use strict";var weak=require("./$.collection-weak");require("./$.collection")("WeakSet",{add:function(value){return weak.def(this,value,true)}},weak,false,true)},{"./$.collection":217,"./$.collection-weak":216}],282:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{includes:require("./$.array-includes")(true)});require("./$.unscope")("includes")},{"./$.array-includes":210,"./$.def":219,"./$.unscope":233}],283:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),ownKeys=require("./$.own-keys");$def($def.S,"Object",{getOwnPropertyDescriptors:function(object){var O=$.toObject(object),result={};$.each.call(ownKeys(O),function(key){$.setDesc(result,key,$.desc(0,$.getDesc(O,key)))});return result}})},{"./$":223,"./$.def":219,"./$.own-keys":225}],284:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");function createObjectToArray(isEntries){return function(object){var O=$.toObject(object),keys=$.getKeys(object),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}$def($def.S,"Object",{values:createObjectToArray(false),entries:createObjectToArray(true)})},{"./$":223,"./$.def":219}],285:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"RegExp",{escape:require("./$.replacer")(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",true)})},{"./$.def":219,"./$.replacer":227}],286:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{at:require("./$.string-at")(true)})},{"./$.def":219,"./$.string-at":230}],287:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),core=$.core,statics={};function setStatics(keys,length){$.each.call(keys.split(","),function(key){if(length==undefined&&key in core.Array)statics[key]=core.Array[key];else if(key in[])statics[key]=require("./$.ctx")(Function.call,[][key],length)})}setStatics("pop,reverse,shift,keys,values,entries",1);setStatics("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);setStatics("join,slice,concat,push,splice,unshift,sort,lastIndexOf,"+"reduce,reduceRight,copyWithin,fill,turn");$def($def.S,"Array",statics)},{"./$":223,"./$.ctx":218,"./$.def":219}],288:[function(require,module,exports){require("./es6.array.iterator");var $=require("./$"),Iterators=require("./$.iter").Iterators,ITERATOR=require("./$.wks")("iterator"),NodeList=$.g.NodeList;if($.FW&&NodeList&&!(ITERATOR in NodeList.prototype)){$.hide(NodeList.prototype,ITERATOR,Iterators.Array)}Iterators.NodeList=Iterators.Array},{"./$":223,"./$.iter":222,"./$.wks":234,"./es6.array.iterator":254}],289:[function(require,module,exports){var $def=require("./$.def"),$task=require("./$.task");$def($def.G+$def.B,{setImmediate:$task.set,clearImmediate:$task.clear})},{"./$.def":219,"./$.task":231}],290:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),invoke=require("./$.invoke"),partial=require("./$.partial"),MSIE=!!$.g.navigator&&/MSIE .\./.test(navigator.userAgent);function wrap(set){return MSIE?function(fn,time){return set(invoke(partial,[].slice.call(arguments,2),$.isFunction(fn)?fn:Function(fn)),time)}:set}$def($def.G+$def.B+$def.F*MSIE,{setTimeout:wrap($.g.setTimeout),setInterval:wrap($.g.setInterval)})},{"./$":223,"./$.def":219,"./$.invoke":221,"./$.partial":226}],291:[function(require,module,exports){require("./modules/es5");require("./modules/es6.symbol");require("./modules/es6.object.assign");require("./modules/es6.object.is");require("./modules/es6.object.set-prototype-of");require("./modules/es6.object.to-string");require("./modules/es6.object.statics-accept-primitives");require("./modules/es6.function.name");require("./modules/es6.number.constructor");require("./modules/es6.number.statics");require("./modules/es6.math");require("./modules/es6.string.from-code-point");require("./modules/es6.string.raw");require("./modules/es6.string.iterator");require("./modules/es6.string.code-point-at");require("./modules/es6.string.ends-with");require("./modules/es6.string.includes");require("./modules/es6.string.repeat");require("./modules/es6.string.starts-with");require("./modules/es6.array.from");require("./modules/es6.array.of");require("./modules/es6.array.iterator");require("./modules/es6.array.species");require("./modules/es6.array.copy-within");require("./modules/es6.array.fill");require("./modules/es6.array.find");require("./modules/es6.array.find-index");require("./modules/es6.regexp");require("./modules/es6.promise");require("./modules/es6.map");require("./modules/es6.set");require("./modules/es6.weak-map");require("./modules/es6.weak-set");require("./modules/es6.reflect");require("./modules/es7.array.includes");require("./modules/es7.string.at");require("./modules/es7.regexp.escape");require("./modules/es7.object.get-own-property-descriptors");require("./modules/es7.object.to-array");require("./modules/js.array.statics");require("./modules/web.timers");require("./modules/web.immediate");require("./modules/web.dom.iterable");module.exports=require("./modules/$").core},{"./modules/$":223,"./modules/es5":248,"./modules/es6.array.copy-within":249,"./modules/es6.array.fill":250,"./modules/es6.array.find":252,"./modules/es6.array.find-index":251,"./modules/es6.array.from":253,"./modules/es6.array.iterator":254,"./modules/es6.array.of":255,"./modules/es6.array.species":256,"./modules/es6.function.name":257,"./modules/es6.map":258,"./modules/es6.math":259,"./modules/es6.number.constructor":260,"./modules/es6.number.statics":261,"./modules/es6.object.assign":262,"./modules/es6.object.is":263,"./modules/es6.object.set-prototype-of":264,"./modules/es6.object.statics-accept-primitives":265,"./modules/es6.object.to-string":266,"./modules/es6.promise":267,"./modules/es6.reflect":268,"./modules/es6.regexp":269,"./modules/es6.set":270,"./modules/es6.string.code-point-at":271,"./modules/es6.string.ends-with":272,"./modules/es6.string.from-code-point":273,"./modules/es6.string.includes":274,"./modules/es6.string.iterator":275,"./modules/es6.string.raw":276,"./modules/es6.string.repeat":277,"./modules/es6.string.starts-with":278,"./modules/es6.symbol":279,"./modules/es6.weak-map":280,"./modules/es6.weak-set":281,"./modules/es7.array.includes":282,"./modules/es7.object.get-own-property-descriptors":283,"./modules/es7.object.to-array":284,"./modules/es7.regexp.escape":285,"./modules/es7.string.at":286,"./modules/js.array.statics":287,"./modules/web.dom.iterable":288,"./modules/web.immediate":289,"./modules/web.timers":290}],292:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;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]){args=["%o"].concat(args)}var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);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}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(msmaxUsed||u===maxUsed&&w>maxWeight){ +maxUsed=u;maxWeight=w;result=+n}}return result}module.exports=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}var tabs=0;var spaces=0;var prev=0;var indents={};var current;var isIndent;str.split(/\n/g).forEach(function(line){if(!line){return}var indent;var matches=line.match(INDENT_RE);if(!matches){indent=0}else{indent=matches[0].length;if(matches[1]){spaces++}else{tabs++}}var diff=indent-prev;prev=indent;if(diff){isIndent=diff>0;current=indents[isIndent?diff:-diff];if(current){current[0]++}else{current=indents[diff]=[1,0]}}else if(current){current[1]+=+isIndent}});var amount=getMostUsed(indents);var type;var actual;if(!amount){type=null;actual=""}else if(spaces>=tabs){type="space";actual=repeating(" ",amount)}else{type="tab";actual=repeating(" ",amount)}return{amount:amount,type:type,indent:actual}}},{repeating:437}],296:[function(require,module,exports){(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(["exports"],factory)}else if(typeof exports!=="undefined"){factory(exports)}else{factory(root.estraverse={})}})(this,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);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=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()){key=element.ref.key;parent=element.ref.parent;i=worklist.length;while(i--){nextElem=worklist[i];if(nextElem.ref&&nextElem.ref.parent===parent){if(nextElem.ref.key=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){var comments=[],comment,len,i,cursor;if(!tree.range){throw new Error("attachComments needs range information")}if(!tokens.length){if(providedComments.length){for(i=0,len=providedComments.length;inode.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}}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(cursornode.range[1]){return VisitorOption.Skip}}});return tree}exports.version="1.8.1-dev";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})},{}],297:[function(require,module,exports){(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}})()},{}],298:[function(require,module,exports){(function(){"use strict";var Regex,NON_ASCII_WHITESPACES;Regex={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function isDecimalDigit(ch){return ch>=48&&ch<=57}function isHexDigit(ch){return isDecimalDigit(ch)||97<=ch&&ch<=102||65<=ch&&ch<=70}function isOctalDigit(ch){return ch>=48&&ch<=55}NON_ASCII_WHITESPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&NON_ASCII_WHITESPACES.indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function isIdentifierStart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))}function isIdentifierPart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch>=48&&ch<=57||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))}module.exports={isDecimalDigit:isDecimalDigit,isHexDigit:isHexDigit,isOctalDigit:isOctalDigit,isWhiteSpace:isWhiteSpace,isLineTerminator:isLineTerminator,isIdentifierStart:isIdentifierStart,isIdentifierPart:isIdentifierPart}})()},{}],299:[function(require,module,exports){(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){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){return false}for(i=1,iz=id.length;i!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g;module.exports.matchToToken=function(match){token={type:"invalid",value:match[0]};if(match[1])token.type="string",token.closed=!!(match[3]||match[4]);else if(match[5])token.type="comment";else if(match[6])token.type="comment",token.closed=!!match[7];else if(match[8])token.type="regex";else if(match[9])token.type="number";else if(match[10])token.type="name";else if(match[11])token.type="punctuator";else if(match[12])token.type="whitespace";return token}},{}],307:[function(require,module,exports){var arr=[];var charCodeCache=[];module.exports=function(a,b){if(a===b){return 0}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen}if(bLen===0){return aLen}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(iret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2}}return ret}},{}],308:[function(require,module,exports){var leftPad=require("left-pad");function get(options,key,defaultValue){return key in options?options[key]:defaultValue}function lineNumbers(code,options){var getOption=get.bind(null,options||{});var transform=getOption("transform",Function.prototype);var padding=getOption("padding"," ");var before=getOption("before"," ");var after=getOption("after"," | ");var start=getOption("start",1);var isArray=Array.isArray(code);var lines=isArray?code:code.split("\n");var end=start+lines.length-1;var width=String(end).length;var numbered=lines.map(function(line,index){var number=start+index;var params={before:before,number:number,width:width,after:after,line:line};transform(params);return params.before+leftPad(params.number,width,padding)+params.after+params.line});return isArray?numbered:numbered.join("\n")}module.exports=lineNumbers},{"left-pad":309}],309:[function(require,module,exports){module.exports=leftpad;function leftpad(str,len,ch){str=String(str);var i=-1;ch||(ch=" ");len=len-str.length;while(++i-1){splice.call(array,fromIndex,1)}}return array}module.exports=pull},{"../internal/baseIndexOf":345}],314:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseUniq=require("../internal/baseUniq"),isIterateeCall=require("../internal/isIterateeCall"),sortedUniq=require("../internal/sortedUniq");function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(isSorted!=null&&typeof isSorted!="boolean"){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?null:isSorted;isSorted=false}iteratee=iteratee==null?iteratee:baseCallback(iteratee,thisArg,3);return isSorted?sortedUniq(array,iteratee):baseUniq(array,iteratee)}module.exports=uniq},{"../internal/baseCallback":333,"../internal/baseUniq":360,"../internal/isIterateeCall":382,"../internal/sortedUniq":388}],315:[function(require,module,exports){module.exports=require("./includes")},{"./includes":319}],316:[function(require,module,exports){module.exports=require("./forEach")},{"./forEach":317}],317:[function(require,module,exports){var arrayEach=require("../internal/arrayEach"),baseEach=require("../internal/baseEach"),createForEach=require("../internal/createForEach");var forEach=createForEach(arrayEach,baseEach);module.exports=forEach},{"../internal/arrayEach":327,"../internal/baseEach":337,"../internal/createForEach":372}],318:[function(require,module,exports){var createAggregator=require("../internal/createAggregator");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value)}else{result[key]=[value]}});module.exports=groupBy},{"../internal/createAggregator":367}],319:[function(require,module,exports){var baseIndexOf=require("../internal/baseIndexOf"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength"),isString=require("../lang/isString"),values=require("../object/values");var nativeMax=Math.max;function includes(collection,target,fromIndex,guard){var length=collection?collection.length:0;if(!isLength(length)){collection=values(collection);length=collection.length}if(!length){return false}if(typeof fromIndex!="number"||guard&&isIterateeCall(target,fromIndex,guard)){fromIndex=0}else{fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex-1:baseIndexOf(collection,target,fromIndex)>-1}module.exports=includes},{"../internal/baseIndexOf":345,"../internal/isIterateeCall":382,"../internal/isLength":383,"../lang/isArray":392,"../lang/isString":401,"../object/values":411}],320:[function(require,module,exports){var arrayMap=require("../internal/arrayMap"),baseCallback=require("../internal/baseCallback"),baseMap=require("../internal/baseMap"),isArray=require("../lang/isArray");function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=baseCallback(iteratee,thisArg,3);return func(collection,iteratee)}module.exports=map},{"../internal/arrayMap":328,"../internal/baseCallback":333,"../internal/baseMap":350,"../lang/isArray":392}],321:[function(require,module,exports){var arrayReduceRight=require("../internal/arrayReduceRight"),baseEachRight=require("../internal/baseEachRight"),createReduce=require("../internal/createReduce");var reduceRight=createReduce(arrayReduceRight,baseEachRight);module.exports=reduceRight},{"../internal/arrayReduceRight":329,"../internal/baseEachRight":338,"../internal/createReduce":373}],322:[function(require,module,exports){var arraySome=require("../internal/arraySome"),baseCallback=require("../internal/baseCallback"),baseSome=require("../internal/baseSome"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall");function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=null}if(typeof predicate!="function"||typeof thisArg!="undefined"){predicate=baseCallback(predicate,thisArg,3)}return func(collection,predicate)}module.exports=some},{"../internal/arraySome":330,"../internal/baseCallback":333,"../internal/baseSome":357,"../internal/isIterateeCall":382,"../lang/isArray":392}],323:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseEach=require("../internal/baseEach"),baseSortBy=require("../internal/baseSortBy"),compareAscending=require("../internal/compareAscending"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength");function sortBy(collection,iteratee,thisArg){if(collection==null){return[]}var index=-1,length=collection.length,result=isLength(length)?Array(length):[];if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=null}iteratee=baseCallback(iteratee,thisArg,3);baseEach(collection,function(value,key,collection){result[++index]={criteria:iteratee(value,key,collection),index:index,value:value}});return baseSortBy(result,compareAscending)}module.exports=sortBy},{"../internal/baseCallback":333,"../internal/baseEach":337,"../internal/baseSortBy":358,"../internal/compareAscending":366,"../internal/isIterateeCall":382,"../internal/isLength":383}],324:[function(require,module,exports){var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max;function restParam(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=nativeMax(typeof start=="undefined"?func.length-1:+start||0,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);while(++indexother||!valIsReflexive||typeof value=="undefined"&&othIsReflexive){return 1}if(value=200,seen=isLarge?createCache():null,result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index3&&typeof customizer=="function"){customizer=bindCallback(customizer,thisArg,5);length-=2}else{customizer=length>2&&typeof thisArg=="function"?thisArg:null;length-=customizer?1:0}if(guard&&isIterateeCall(args[1],args[2],guard)){customizer=length==3?null:customizer;length=2}var index=0;while(++indexarrLength)){return false}while(result&&++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}module.exports=isLength},{}],384:[function(require,module,exports){function isObjectLike(value){return!!value&&typeof value=="object"}module.exports=isObjectLike},{}],385:[function(require,module,exports){var isObject=require("../lang/isObject");function isStrictComparable(value){return value===value&&(value===0?1/value>0:!isObject(value))}module.exports=isStrictComparable},{"../lang/isObject":398}],386:[function(require,module,exports){var baseForIn=require("./baseForIn"),isObjectLike=require("./isObjectLike");var objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;function shimIsPlainObject(value){var Ctor;if(!(isObjectLike(value)&&objToString.call(value)==objectTag)||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;baseForIn(value,function(subValue,key){result=key});return typeof result=="undefined"||hasOwnProperty.call(value,result)}module.exports=shimIsPlainObject},{"./baseForIn":341,"./isObjectLike":384}],387:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isIndex=require("./isIndex"),isLength=require("./isLength"),keysIn=require("../object/keysIn"),support=require("../support");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length;var allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object));var index=-1,result=[];while(++index0;while(++index=0;i--){filename=f[i];if(filename)break}for(var i=0,l=set.length;i>> no match, partial?",file,fr,pattern,pr);if(fr===fl)return true}return false}var hit;if(typeof p==="string"){if(options.nocase){hit=f.toLowerCase()===p.toLowerCase()}else{hit=f===p}this.debug("string match",p,f,hit)}else{hit=f.match(p);this.debug("pattern match",p,f,hit)}if(!hit)return false}if(fi===fl&&pi===pl){return true}else if(fi===fl){return partial}else if(pi===pl){var emptyFileEnd=fi===fl-1&&file[fi]==="";return emptyFileEnd}throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}}).call(this,require("_process"))},{_process:183,"brace-expansion":417}],417:[function(require,module,exports){var concatMap=require("concat-map");var balanced=require("balanced-match");module.exports=expandTop;var escSlash="\x00SLASH"+Math.random()+"\x00";var escOpen="\x00OPEN"+Math.random()+"\x00";var escClose="\x00CLOSE"+Math.random()+"\x00";var escComma="\x00COMMA"+Math.random()+"\x00";var escPeriod="\x00PERIOD"+Math.random()+"\x00";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[];var m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre;var body=m.body;var post=m.post;var p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);if(post.length){p[p.length-1]+=postParts.shift();p.push.apply(p,postParts)}parts.push.apply(parts,p);return parts}function expandTop(str){if(!str)return[];return expand(escapeBraces(str),true).map(unescapeBraces)}function identity(e){return e}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,isTop){var expansions=[];var m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);var isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);var isSequence=isNumericSequence||isAlphaSequence;var isOptions=/^(.*,)+(.+)?$/.test(m.body);if(!isSequence&&!isOptions){if(m.post.match(/,.*}/)){str=m.pre+"{"+m.body+escClose+m.post;return expand(str)}return[str]}var n;if(isSequence){n=m.body.split(/\.\./)}else{n=parseCommaParts(m.body);if(n.length===1){n=expand(n[0],false).map(embrace);if(n.length===1){var post=m.post.length?expand(m.post,false):[""];return post.map(function(p){return m.pre+n[0]+p})}}}var pre=m.pre;var post=m.post.length?expand(m.post,false):[""];var N;if(isSequence){var x=numeric(n[0]);var y=numeric(n[1]);var width=Math.max(n[0].length,n[1].length);var incr=n.length==3?Math.abs(numeric(n[2])):1;var test=lte;var reverse=y0){var z=new Array(need+1).join("0");if(i<0)c="-"+z+c.slice(1);else c=z+c}}}N.push(c)}}else{N=concatMap(n,function(el){return expand(el,false)})}for(var j=0;j1?str.substring(m.start+a.length,m.end):"";m.post=str.slice(m.end+b.length);return m}}}if(bal&&ended){var start=m.start+a.length;m=balanced(a,b,str.substr(start));if(m){m.start+=start;m.end+=start;m.pre=str.slice(0,start)+m.pre}return m}}},{}],419:[function(require,module,exports){module.exports=function(xs,fn){var res=[];for(var i=0;idst){names[dst]=names[src]}++dst}}names.length=dst;return names};function defaultCreatorFn(object){return create(null)}function makeAccessor(secretCreatorFn){var brand=makeUniqueKey();var passkey=create(null);secretCreatorFn=secretCreatorFn||defaultCreatorFn;function register(object){var secret;function vault(key,forget){if(key===passkey){return forget?secret=null:secret||(secret=secretCreatorFn(object))}}defProp(object,brand,vault)}function accessor(object){if(!hasOwn.call(object,brand))register(object);return object[brand](passkey)}accessor.forget=function(object){if(hasOwn.call(object,brand))object[brand](passkey,true)};return accessor}defProp(exports,"makeAccessor",makeAccessor)},{}],422:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var isArray=types.builtInTypes.array;var b=types.builders;var n=types.namedTypes;var leap=require("./leap");var meta=require("./meta");var util=require("./util");var hasOwn=Object.prototype.hasOwnProperty;function Emitter(contextId){assert.ok(this instanceof Emitter);n.Identifier.assert(contextId);Object.defineProperties(this,{contextId:{value:contextId},listing:{value:[]},marked:{value:[true]},finalLoc:{value:loc()},tryEntries:{value:[]}});Object.defineProperties(this,{leapManager:{value:new leap.LeapManager(this)}})}var Ep=Emitter.prototype;exports.Emitter=Emitter;function loc(){return b.literal(-1)}Ep.mark=function(loc){n.Literal.assert(loc);var index=this.listing.length;if(loc.value===-1){loc.value=index}else{assert.strictEqual(loc.value,index)}this.marked[index]=true;return loc};Ep.emit=function(node){if(n.Expression.check(node))node=b.expressionStatement(node);n.Statement.assert(node);this.listing.push(node)};Ep.emitAssign=function(lhs,rhs){this.emit(this.assign(lhs,rhs));return lhs};Ep.assign=function(lhs,rhs){return b.expressionStatement(b.assignmentExpression("=",lhs,rhs))};Ep.contextProperty=function(name,computed){return b.memberExpression(this.contextId,computed?b.literal(name):b.identifier(name),!!computed)};var volatileContextPropertyNames={prev:true,next:true,sent:true,rval:true};Ep.isVolatileContextProperty=function(expr){if(n.MemberExpression.check(expr)){if(expr.computed){return true}if(n.Identifier.check(expr.object)&&n.Identifier.check(expr.property)&&expr.object.name===this.contextId.name&&hasOwn.call(volatileContextPropertyNames,expr.property.name)){return true}}return false};Ep.stop=function(rval){if(rval){this.setReturnValue(rval)}this.jump(this.finalLoc)};Ep.setReturnValue=function(valuePath){n.Expression.assert(valuePath.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(valuePath))};Ep.clearPendingException=function(tryLoc,assignee){n.Literal.assert(tryLoc);var catchCall=b.callExpression(this.contextProperty("catch",true),[tryLoc]);if(assignee){this.emitAssign(assignee,catchCall)}else{this.emit(catchCall)}};Ep.jump=function(toLoc){this.emitAssign(this.contextProperty("next"),toLoc);this.emit(b.breakStatement())};Ep.jumpIf=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);this.emit(b.ifStatement(test,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};Ep.jumpIfNot=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);var negatedTest;if(n.UnaryExpression.check(test)&&test.operator==="!"){negatedTest=test.argument}else{negatedTest=b.unaryExpression("!",test)}this.emit(b.ifStatement(negatedTest,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};var nextTempId=0;Ep.makeTempVar=function(){return this.contextProperty("t"+nextTempId++)};Ep.getContextFunction=function(id){var func=b.functionExpression(id||null,[this.contextId],b.blockStatement([this.getDispatchLoop()]),false,false);func._aliasFunction=true;return func};Ep.getDispatchLoop=function(){var self=this;var cases=[];var current;var alreadyEnded=false;self.listing.forEach(function(stmt,i){if(self.marked.hasOwnProperty(i)){cases.push(b.switchCase(b.literal(i),current=[]));alreadyEnded=false}if(!alreadyEnded){current.push(stmt);if(isSwitchCaseEnder(stmt))alreadyEnded=true}});this.finalLoc.value=this.listing.length;cases.push(b.switchCase(this.finalLoc,[]),b.switchCase(b.literal("end"),[b.returnStatement(b.callExpression(this.contextProperty("stop"),[]))]));return b.whileStatement(b.literal(1),b.switchStatement(b.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),cases))};function isSwitchCaseEnder(stmt){return n.BreakStatement.check(stmt)||n.ContinueStatement.check(stmt)||n.ReturnStatement.check(stmt)||n.ThrowStatement.check(stmt)}Ep.getTryLocsList=function(){if(this.tryEntries.length===0){return null}var lastLocValue=0;return b.arrayExpression(this.tryEntries.map(function(tryEntry){var thisLocValue=tryEntry.firstLoc.value;assert.ok(thisLocValue>=lastLocValue,"try entries out of order");lastLocValue=thisLocValue;var ce=tryEntry.catchEntry;var fe=tryEntry.finallyEntry;var locs=[tryEntry.firstLoc,ce?ce.firstLoc:null];if(fe){locs[2]=fe.firstLoc;locs[3]=fe.afterLoc}return b.arrayExpression(locs)}))};Ep.explode=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var node=path.value;var self=this;n.Node.assert(node);if(n.Statement.check(node))return self.explodeStatement(path);if(n.Expression.check(node))return self.explodeExpression(path,ignoreResult);if(n.Declaration.check(node))throw getDeclError(node);switch(node.type){case"Program":return path.get("body").map(self.explodeStatement,self);case"VariableDeclarator":throw getDeclError(node);case"Property":case"SwitchCase":case"CatchClause":throw new Error(node.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(node.type))}};function getDeclError(node){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+JSON.stringify(node))}Ep.explodeStatement=function(path,labelId){assert.ok(path instanceof types.NodePath);var stmt=path.value;var self=this;n.Statement.assert(stmt);if(labelId){n.Identifier.assert(labelId)}else{labelId=null}if(n.BlockStatement.check(stmt)){return path.get("body").each(self.explodeStatement,self)}if(!meta.containsLeap(stmt)){self.emit(stmt);return}switch(stmt.type){case"ExpressionStatement":self.explodeExpression(path.get("expression"),true);break;case"LabeledStatement":var after=loc();self.leapManager.withEntry(new leap.LabeledEntry(after,stmt.label),function(){self.explodeStatement(path.get("body"),stmt.label)});self.mark(after);break;case"WhileStatement":var before=loc();var after=loc();self.mark(before);self.jumpIfNot(self.explodeExpression(path.get("test")),after);self.leapManager.withEntry(new leap.LoopEntry(after,before,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(before);self.mark(after);break;case"DoWhileStatement":var first=loc();var test=loc();var after=loc();self.mark(first);self.leapManager.withEntry(new leap.LoopEntry(after,test,labelId),function(){self.explode(path.get("body"))});self.mark(test);self.jumpIf(self.explodeExpression(path.get("test")),first);self.mark(after);break;case"ForStatement":var head=loc();var update=loc();var after=loc();if(stmt.init){self.explode(path.get("init"),true)}self.mark(head);if(stmt.test){self.jumpIfNot(self.explodeExpression(path.get("test")),after)}else{}self.leapManager.withEntry(new leap.LoopEntry(after,update,labelId),function(){self.explodeStatement(path.get("body"))});self.mark(update);if(stmt.update){self.explode(path.get("update"),true)}self.jump(head);self.mark(after);break;case"ForInStatement":n.Identifier.assert(stmt.left);var head=loc();var after=loc();var keyIterNextFn=self.makeTempVar();self.emitAssign(keyIterNextFn,b.callExpression(util.runtimeProperty("keys"),[self.explodeExpression(path.get("right"))]));self.mark(head);var keyInfoTmpVar=self.makeTempVar();self.jumpIf(b.memberExpression(b.assignmentExpression("=",keyInfoTmpVar,b.callExpression(keyIterNextFn,[])),b.identifier("done"),false),after);self.emitAssign(stmt.left,b.memberExpression(keyInfoTmpVar,b.identifier("value"),false));self.leapManager.withEntry(new leap.LoopEntry(after,head,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(head);self.mark(after);break;case"BreakStatement":self.emitAbruptCompletion({type:"break",target:self.leapManager.getBreakLoc(stmt.label)});break;case"ContinueStatement":self.emitAbruptCompletion({type:"continue",target:self.leapManager.getContinueLoc(stmt.label)});break;case"SwitchStatement":var disc=self.emitAssign(self.makeTempVar(),self.explodeExpression(path.get("discriminant")));var after=loc();var defaultLoc=loc();var condition=defaultLoc;var caseLocs=[];var cases=stmt.cases||[];for(var i=cases.length-1;i>=0;--i){var c=cases[i];n.SwitchCase.assert(c);if(c.test){condition=b.conditionalExpression(b.binaryExpression("===",disc,c.test),caseLocs[i]=loc(),condition)}else{caseLocs[i]=defaultLoc}}self.jump(self.explodeExpression(new types.NodePath(condition,path,"discriminant")));self.leapManager.withEntry(new leap.SwitchEntry(after),function(){path.get("cases").each(function(casePath){var c=casePath.value;var i=casePath.name;self.mark(caseLocs[i]);casePath.get("consequent").each(self.explodeStatement,self)})});self.mark(after);if(defaultLoc.value===-1){self.mark(defaultLoc);assert.strictEqual(after.value,defaultLoc.value)}break;case"IfStatement":var elseLoc=stmt.alternate&&loc();var after=loc();self.jumpIfNot(self.explodeExpression(path.get("test")),elseLoc||after);self.explodeStatement(path.get("consequent"));if(elseLoc){self.jump(after);self.mark(elseLoc);self.explodeStatement(path.get("alternate"))}self.mark(after);break;case"ReturnStatement":self.emitAbruptCompletion({type:"return",value:self.explodeExpression(path.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var after=loc();var handler=stmt.handler;if(!handler&&stmt.handlers){handler=stmt.handlers[0]||null}var catchLoc=handler&&loc();var catchEntry=catchLoc&&new leap.CatchEntry(catchLoc,handler.param);var finallyLoc=stmt.finalizer&&loc();var finallyEntry=finallyLoc&&new leap.FinallyEntry(finallyLoc,after);var tryEntry=new leap.TryEntry(self.getUnmarkedCurrentLoc(),catchEntry,finallyEntry);self.tryEntries.push(tryEntry);self.updateContextPrevLoc(tryEntry.firstLoc);self.leapManager.withEntry(tryEntry,function(){self.explodeStatement(path.get("block"));if(catchLoc){if(finallyLoc){self.jump(finallyLoc)}else{self.jump(after)}self.updateContextPrevLoc(self.mark(catchLoc));var bodyPath=path.get("handler","body");var safeParam=self.makeTempVar();self.clearPendingException(tryEntry.firstLoc,safeParam);var catchScope=bodyPath.scope;var catchParamName=handler.param.name;n.CatchClause.assert(catchScope.node);assert.strictEqual(catchScope.lookup(catchParamName),catchScope);types.visit(bodyPath,{visitIdentifier:function(path){if(util.isReference(path,catchParamName)&&path.scope.lookup(catchParamName)===catchScope){return safeParam}this.traverse(path)},visitFunction:function(path){if(path.scope.declares(catchParamName)){return false}this.traverse(path)}});self.leapManager.withEntry(catchEntry,function(){self.explodeStatement(bodyPath)})}if(finallyLoc){self.updateContextPrevLoc(self.mark(finallyLoc));self.leapManager.withEntry(finallyEntry,function(){self.explodeStatement(path.get("finalizer"))});self.emit(b.returnStatement(b.callExpression(self.contextProperty("finish"),[finallyEntry.firstLoc])))}});self.mark(after);break;case"ThrowStatement":self.emit(b.throwStatement(self.explodeExpression(path.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(stmt.type))}};Ep.emitAbruptCompletion=function(record){if(!isValidCompletion(record)){assert.ok(false,"invalid completion record: "+JSON.stringify(record))}assert.notStrictEqual(record.type,"normal","normal completions are not abrupt");var abruptArgs=[b.literal(record.type)];if(record.type==="break"||record.type==="continue"){n.Literal.assert(record.target);abruptArgs[1]=record.target}else if(record.type==="return"||record.type==="throw"){if(record.value){n.Expression.assert(record.value);abruptArgs[1]=record.value}}this.emit(b.returnStatement(b.callExpression(this.contextProperty("abrupt"),abruptArgs)))};function isValidCompletion(record){var type=record.type;if(type==="normal"){return!hasOwn.call(record,"target")}if(type==="break"||type==="continue"){return!hasOwn.call(record,"value")&&n.Literal.check(record.target)}if(type==="return"||type==="throw"){return hasOwn.call(record,"value")&&!hasOwn.call(record,"target")}return false}Ep.getUnmarkedCurrentLoc=function(){return b.literal(this.listing.length)};Ep.updateContextPrevLoc=function(loc){if(loc){n.Literal.assert(loc);if(loc.value===-1){loc.value=this.listing.length}else{assert.strictEqual(loc.value,this.listing.length)}}else{loc=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),loc)};Ep.explodeExpression=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var expr=path.value;if(expr){n.Expression.assert(expr)}else{return expr}var self=this;var result;function finish(expr){n.Expression.assert(expr);if(ignoreResult){self.emit(expr)}else{return expr}}if(!meta.containsLeap(expr)){return finish(expr)}var hasLeapingChildren=meta.containsLeap.onlyChildren(expr);function explodeViaTempVar(tempVar,childPath,ignoreChildResult){assert.ok(childPath instanceof types.NodePath);assert.ok(!ignoreChildResult||!tempVar,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var result=self.explodeExpression(childPath,ignoreChildResult);if(ignoreChildResult){}else if(tempVar||hasLeapingChildren&&(self.isVolatileContextProperty(result)||meta.hasSideEffects(result))){result=self.emitAssign(tempVar||self.makeTempVar(),result)}return result}switch(expr.type){case"MemberExpression":return finish(b.memberExpression(self.explodeExpression(path.get("object")),expr.computed?explodeViaTempVar(null,path.get("property")):expr.property,expr.computed));case"CallExpression":var oldCalleePath=path.get("callee");var newCallee=self.explodeExpression(oldCalleePath);if(!n.MemberExpression.check(oldCalleePath.node)&&n.MemberExpression.check(newCallee)){newCallee=b.sequenceExpression([b.literal(0),newCallee])}return finish(b.callExpression(newCallee,path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"NewExpression":return finish(b.newExpression(explodeViaTempVar(null,path.get("callee")),path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"ObjectExpression":return finish(b.objectExpression(path.get("properties").map(function(propPath){return b.property(propPath.value.kind,propPath.value.key,explodeViaTempVar(null,propPath.get("value")))})));case"ArrayExpression":return finish(b.arrayExpression(path.get("elements").map(function(elemPath){return explodeViaTempVar(null,elemPath)})));case"SequenceExpression":var lastIndex=expr.expressions.length-1;path.get("expressions").each(function(exprPath){if(exprPath.name===lastIndex){result=self.explodeExpression(exprPath,ignoreResult)}else{self.explodeExpression(exprPath,true)}});return result;case"LogicalExpression":var after=loc();if(!ignoreResult){result=self.makeTempVar()}var left=explodeViaTempVar(result,path.get("left"));if(expr.operator==="&&"){self.jumpIfNot(left,after)}else{assert.strictEqual(expr.operator,"||");self.jumpIf(left,after)}explodeViaTempVar(result,path.get("right"),ignoreResult);self.mark(after);return result;case"ConditionalExpression":var elseLoc=loc();var after=loc();var test=self.explodeExpression(path.get("test"));self.jumpIfNot(test,elseLoc);if(!ignoreResult){result=self.makeTempVar()}explodeViaTempVar(result,path.get("consequent"),ignoreResult);self.jump(after);self.mark(elseLoc);explodeViaTempVar(result,path.get("alternate"),ignoreResult);self.mark(after);return result;case"UnaryExpression":return finish(b.unaryExpression(expr.operator,self.explodeExpression(path.get("argument")),!!expr.prefix));case"BinaryExpression":return finish(b.binaryExpression(expr.operator,explodeViaTempVar(null,path.get("left")),explodeViaTempVar(null,path.get("right"))));case"AssignmentExpression":return finish(b.assignmentExpression(expr.operator,self.explodeExpression(path.get("left")),self.explodeExpression(path.get("right"))));case"UpdateExpression":return finish(b.updateExpression(expr.operator,self.explodeExpression(path.get("argument")),expr.prefix));case"YieldExpression":var after=loc();var arg=expr.argument&&self.explodeExpression(path.get("argument"));if(arg&&expr.delegate){var result=self.makeTempVar();self.emit(b.returnStatement(b.callExpression(self.contextProperty("delegateYield"),[arg,b.literal(result.property.name),after])));self.mark(after);return result}self.emitAssign(self.contextProperty("next"),after);self.emit(b.returnStatement(arg||null));self.mark(after);return self.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(expr.type))}}},{"./leap":424,"./meta":425,"./util":426,assert:173,"ast-types":171}],423:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.hoist=function(funPath){assert.ok(funPath instanceof types.NodePath);n.Function.assert(funPath.value);var vars={};function varDeclToExpr(vdec,includeIdentifiers){ +n.VariableDeclaration.assert(vdec);var exprs=[];vdec.declarations.forEach(function(dec){vars[dec.id.name]=dec.id;if(dec.init){exprs.push(b.assignmentExpression("=",dec.id,dec.init))}else if(includeIdentifiers){exprs.push(dec.id)}});if(exprs.length===0)return null;if(exprs.length===1)return exprs[0];return b.sequenceExpression(exprs)}types.visit(funPath.get("body"),{visitVariableDeclaration:function(path){var expr=varDeclToExpr(path.value,false);if(expr===null){path.replace()}else{return b.expressionStatement(expr)}return false},visitForStatement:function(path){var init=path.value.init;if(n.VariableDeclaration.check(init)){path.get("init").replace(varDeclToExpr(init,false))}this.traverse(path)},visitForInStatement:function(path){var left=path.value.left;if(n.VariableDeclaration.check(left)){path.get("left").replace(varDeclToExpr(left,true))}this.traverse(path)},visitFunctionDeclaration:function(path){var node=path.value;vars[node.id.name]=node.id;var parentNode=path.parent.node;var assignment=b.expressionStatement(b.assignmentExpression("=",node.id,b.functionExpression(node.id,node.params,node.body,node.generator,node.expression)));if(n.BlockStatement.check(path.parent.node)){path.parent.get("body").unshift(assignment);path.replace()}else{path.replace(assignment)}return false},visitFunctionExpression:function(path){return false}});var paramNames={};funPath.get("params").each(function(paramPath){var param=paramPath.value;if(n.Identifier.check(param)){paramNames[param.name]=param}else{}});var declarations=[];Object.keys(vars).forEach(function(name){if(!hasOwn.call(paramNames,name)){declarations.push(b.variableDeclarator(vars[name],null))}});if(declarations.length===0){return null}return b.variableDeclaration("var",declarations)}},{assert:173,"ast-types":171}],424:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var inherits=require("util").inherits;var hasOwn=Object.prototype.hasOwnProperty;function Entry(){assert.ok(this instanceof Entry)}function FunctionEntry(returnLoc){Entry.call(this);n.Literal.assert(returnLoc);this.returnLoc=returnLoc}inherits(FunctionEntry,Entry);exports.FunctionEntry=FunctionEntry;function LoopEntry(breakLoc,continueLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Literal.assert(continueLoc);if(label){n.Identifier.assert(label)}else{label=null}this.breakLoc=breakLoc;this.continueLoc=continueLoc;this.label=label}inherits(LoopEntry,Entry);exports.LoopEntry=LoopEntry;function SwitchEntry(breakLoc){Entry.call(this);n.Literal.assert(breakLoc);this.breakLoc=breakLoc}inherits(SwitchEntry,Entry);exports.SwitchEntry=SwitchEntry;function TryEntry(firstLoc,catchEntry,finallyEntry){Entry.call(this);n.Literal.assert(firstLoc);if(catchEntry){assert.ok(catchEntry instanceof CatchEntry)}else{catchEntry=null}if(finallyEntry){assert.ok(finallyEntry instanceof FinallyEntry)}else{finallyEntry=null}assert.ok(catchEntry||finallyEntry);this.firstLoc=firstLoc;this.catchEntry=catchEntry;this.finallyEntry=finallyEntry}inherits(TryEntry,Entry);exports.TryEntry=TryEntry;function CatchEntry(firstLoc,paramId){Entry.call(this);n.Literal.assert(firstLoc);n.Identifier.assert(paramId);this.firstLoc=firstLoc;this.paramId=paramId}inherits(CatchEntry,Entry);exports.CatchEntry=CatchEntry;function FinallyEntry(firstLoc,afterLoc){Entry.call(this);n.Literal.assert(firstLoc);n.Literal.assert(afterLoc);this.firstLoc=firstLoc;this.afterLoc=afterLoc}inherits(FinallyEntry,Entry);exports.FinallyEntry=FinallyEntry;function LabeledEntry(breakLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Identifier.assert(label);this.breakLoc=breakLoc;this.label=label}inherits(LabeledEntry,Entry);exports.LabeledEntry=LabeledEntry;function LeapManager(emitter){assert.ok(this instanceof LeapManager);var Emitter=require("./emit").Emitter;assert.ok(emitter instanceof Emitter);this.emitter=emitter;this.entryStack=[new FunctionEntry(emitter.finalLoc)]}var LMp=LeapManager.prototype;exports.LeapManager=LeapManager;LMp.withEntry=function(entry,callback){assert.ok(entry instanceof Entry);this.entryStack.push(entry);try{callback.call(this.emitter)}finally{var popped=this.entryStack.pop();assert.strictEqual(popped,entry)}};LMp._findLeapLocation=function(property,label){for(var i=this.entryStack.length-1;i>=0;--i){var entry=this.entryStack[i];var loc=entry[property];if(loc){if(label){if(entry.label&&entry.label.name===label.name){return loc}}else if(entry instanceof LabeledEntry){}else{return loc}}}return null};LMp.getBreakLoc=function(label){return this._findLeapLocation("breakLoc",label)};LMp.getContinueLoc=function(label){return this._findLeapLocation("continueLoc",label)}},{"./emit":422,assert:173,"ast-types":171,util:199}],425:[function(require,module,exports){var assert=require("assert");var m=require("private").makeAccessor();var types=require("ast-types");var isArray=types.builtInTypes.array;var n=types.namedTypes;var hasOwn=Object.prototype.hasOwnProperty;function makePredicate(propertyName,knownTypes){function onlyChildren(node){n.Node.assert(node);var result=false;function check(child){if(result){}else if(isArray.check(child)){child.some(check)}else if(n.Node.check(child)){assert.strictEqual(result,false);result=predicate(child)}return result}types.eachField(node,function(name,child){check(child)});return result}function predicate(node){n.Node.assert(node);var meta=m(node);if(hasOwn.call(meta,propertyName))return meta[propertyName];if(hasOwn.call(opaqueTypes,node.type))return meta[propertyName]=false;if(hasOwn.call(knownTypes,node.type))return meta[propertyName]=true;return meta[propertyName]=onlyChildren(node)}predicate.onlyChildren=onlyChildren;return predicate}var opaqueTypes={FunctionExpression:true};var sideEffectTypes={CallExpression:true,ForInStatement:true,UnaryExpression:true,BinaryExpression:true,AssignmentExpression:true,UpdateExpression:true,NewExpression:true};var leapTypes={YieldExpression:true,BreakStatement:true,ContinueStatement:true,ReturnStatement:true,ThrowStatement:true};for(var type in leapTypes){if(hasOwn.call(leapTypes,type)){sideEffectTypes[type]=leapTypes[type]}}exports.hasSideEffects=makePredicate("hasSideEffects",sideEffectTypes);exports.containsLeap=makePredicate("containsLeap",leapTypes)},{assert:173,"ast-types":171,"private":421}],426:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.defaults=function(obj){var len=arguments.length;var extension;for(var i=1;i0){outerBody.push(vars)}var wrapArgs=[emitter.getContextFunction(innerFnId),shouldTransformAsync?b.literal(null):outerFnId,b.thisExpression()];var tryLocsList=emitter.getTryLocsList();if(tryLocsList){wrapArgs.push(tryLocsList)}var wrapCall=b.callExpression(shouldTransformAsync?runtimeProperty("async"):runtimeProperty("wrap"),wrapArgs);outerBody.push(b.returnStatement(wrapCall));node.body=b.blockStatement(outerBody);node.body._declarations=bodyBlock._declarations;if(shouldTransformAsync){node.async=false;return}if(n.FunctionDeclaration.check(node)){var pp=path.parent;while(pp&&!(n.BlockStatement.check(pp.value)||n.Program.check(pp.value))){pp=pp.parent}if(!pp){return}path.replace();node.type="FunctionExpression";var varDecl=b.variableDeclaration("var",[b.variableDeclarator(node.id,b.callExpression(runtimeProperty("mark"),[node]))]);if(node.comments){varDecl.leadingComments=node.leadingComments;varDecl.trailingComments=node.trailingComments;node.leadingComments=null;node.trailingComments=null}varDecl._blockHoist=3;var bodyPath=pp.get("body");var bodyLen=bodyPath.value.length;bodyPath.push(varDecl)}else{n.FunctionExpression.assert(node);return b.callExpression(runtimeProperty("mark"),[node])}}});function shouldNotHoistAbove(stmtPath){var value=stmtPath.value;n.Statement.assert(value);if(n.ExpressionStatement.check(value)&&n.Literal.check(value.expression)&&value.expression.value==="use strict"){return true}if(n.VariableDeclaration.check(value)){for(var i=0;i=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc){return this.complete(entry.completion,entry.afterLoc)}}},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}(typeof global==="object"?global:typeof window==="object"?window:this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],431:[function(require,module,exports){var regenerate=require("regenerate");exports.REGULAR={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,65535),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)};exports.UNICODE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)};exports.UNICODE_IGNORE_CASE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},{regenerate:433}],432:[function(require,module,exports){module.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}},{}],433:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports;var freeModule=typeof module=="object"&&module&&module.exports==freeExports&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal){root=freeGlobal}var ERRORS={rangeOrder:"A range’s `stop` value must be greater than or equal "+"to the `start` value.",codePointRange:"Invalid code point value. Code points range from "+"U+000000 to U+10FFFF."};var HIGH_SURROGATE_MIN=55296;var HIGH_SURROGATE_MAX=56319;var LOW_SURROGATE_MIN=56320;var LOW_SURROGATE_MAX=57343;var regexNull=/\\x00([^0123456789]|$)/g;var object={};var hasOwnProperty=object.hasOwnProperty;var extend=function(destination,source){var key;for(key in source){if(hasOwnProperty.call(source,key)){destination[key]=source[key]}}return destination};var forEach=function(array,callback){var index=-1;var length=array.length;while(++index=start&&codePointrangeEnd){return data}if(rangeStart<=start&&rangeEnd>=end){data.splice(index,2);continue}if(rangeStart>=start&&rangeEnd=start&&rangeStart<=end){data[index+1]=rangeStart}else if(rangeEnd>=start&&rangeEnd<=end){data[index]=rangeEnd+1;return data}index+=2}return data};var dataAdd=function(data,codePoint){var index=0;var start;var end;var lastIndex=null;var length=data.length;if(codePoint<0||codePoint>1114111){throw RangeError(ERRORS.codePointRange)}while(index=start&&codePointcodePoint){data.splice(lastIndex!=null?lastIndex+2:0,0,codePoint,codePoint+1);return data}if(codePoint==end){if(codePoint+1==data[index+2]){data.splice(index,4,start,data[index+3]);return data}data[index+1]=codePoint+1;return data}lastIndex=index;index+=2}data.push(codePoint,codePoint+1);return data};var dataAddData=function(dataA,dataB){var index=0;var start;var end;var data=dataA.slice();var length=dataB.length;while(index1114111||rangeEnd<0||rangeEnd>1114111){throw RangeError(ERRORS.codePointRange)}var index=0;var start;var end;var added=false;var length=data.length;while(indexrangeEnd){return data}if(start>=rangeStart&&start<=rangeEnd){if(end>rangeStart&&end-1<=rangeEnd){data.splice(index,2);index-=2}else{data.splice(index-1,2);index-=2}}}else if(start==rangeEnd+1){data[index]=rangeStart;return data}else if(start>rangeEnd){data.splice(index,0,rangeStart,rangeEnd+1);return data}else if(rangeStart>=start&&rangeStart=start&&rangeStart=end){data[index]=rangeStart;data[index+1]=rangeEnd+1;added=true}index+=2}if(!added){data.push(rangeStart,rangeEnd+1)}return data};var dataContains=function(data,codePoint){var index=0;var length=data.length;var start=data[index];var end=data[length-1];if(length>=2){if(codePointend){return false}}while(index=start&&codePoint=40&&codePoint<=43||codePoint==45||codePoint==46||codePoint==63||codePoint>=91&&codePoint<=94||codePoint>=123&&codePoint<=125){string="\\"+stringFromCharCode(codePoint)}else if(codePoint>=32&&codePoint<=126){string=stringFromCharCode(codePoint)}else if(codePoint<=255){string="\\x"+pad(hex(codePoint),2)}else{string="\\u"+pad(hex(codePoint),4)}return string};var symbolToCodePoint=function(symbol){var length=symbol.length;var first=symbol.charCodeAt(0);var second;if(first>=HIGH_SURROGATE_MIN&&first<=HIGH_SURROGATE_MAX&&length>1){second=symbol.charCodeAt(1);return(first-HIGH_SURROGATE_MIN)*1024+second-LOW_SURROGATE_MIN+65536}return first};var createBMPCharacterClasses=function(data){var result="";var index=0;var start;var end;var length=data.length;if(dataIsSingleton(data)){return codePointToString(data[0])}while(index=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=HIGH_SURROGATE_MIN&&start<=HIGH_SURROGATE_MAX){if(end>=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){loneHighSurrogates.push(start,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=LOW_SURROGATE_MIN&&start<=LOW_SURROGATE_MAX){if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneLowSurrogates.push(start,end+1)}if(end>LOW_SURROGATE_MAX){loneLowSurrogates.push(start,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>LOW_SURROGATE_MAX&&start<=65535){if(end<=65535){bmp.push(start,end+1)}else{bmp.push(start,65535+1);astral.push(65535+1,end+1)}}else{astral.push(start,end+1)}index+=2}return{loneHighSurrogates:loneHighSurrogates,loneLowSurrogates:loneLowSurrogates,bmp:bmp,astral:astral}};var optimizeSurrogateMappings=function(surrogateMappings){var result=[];var tmpLow=[];var addLow=false;var mapping;var nextMapping;var highSurrogates;var lowSurrogates;var nextHighSurrogates;var nextLowSurrogates;var index=-1;var length=surrogateMappings.length;while(++index1){value=slice.call(arguments)}if(this instanceof regenerate){this.data=[];return value?this.add(value):this}return(new regenerate).add(value)};regenerate.version="1.2.0";var proto=regenerate.prototype;extend(proto,{add:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataAddData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.add(item)});return $this}$this.data=dataAdd($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},remove:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataRemoveData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.remove(item)});return $this}$this.data=dataRemove($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},addRange:function(start,end){var $this=this;$this.data=dataAddRange($this.data,isNumber(start)?start:symbolToCodePoint(start),isNumber(end)?end:symbolToCodePoint(end));return $this},removeRange:function(start,end){var $this=this;var startCodePoint=isNumber(start)?start:symbolToCodePoint(start);var endCodePoint=isNumber(end)?end:symbolToCodePoint(end);$this.data=dataRemoveRange($this.data,startCodePoint,endCodePoint);return $this},intersection:function(argument){var $this=this;var array=argument instanceof regenerate?dataToArray(argument.data):argument;$this.data=dataIntersection($this.data,array);return $this},contains:function(codePoint){return dataContains(this.data,isNumber(codePoint)?codePoint:symbolToCodePoint(codePoint))},clone:function(){var set=new regenerate;set.data=this.data.slice(0);return set},toString:function(options){var result=createCharacterClassesFromData(this.data,options?options.bmpOnly:false);return result.replace(regexNull,"\\0$1")},toRegExp:function(flags){return RegExp(this.toString(),flags||"")},valueOf:function(){return dataToArray(this.data)}});proto.toArray=proto.valueOf;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define(function(){return regenerate})}else if(freeExports&&!freeExports.nodeType){if(freeModule){freeModule.exports=regenerate}else{freeExports.regenerate=regenerate}}else{root.regenerate=regenerate}})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],434:[function(require,module,exports){(function(global){(function(){"use strict";var objectTypes={"function":true,object:true};var root=objectTypes[typeof window]&&window||this;var oldRoot=root;var freeExports=objectTypes[typeof exports]&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal}var stringFromCharCode=String.fromCharCode;var floor=Math.floor;function fromCodePoint(){var MAX_SIZE=16384;var codeUnits=[];var highSurrogate;var lowSurrogate;var index=-1;var length=arguments.length;if(!length){return""}var result="";while(++index1114111||floor(codePoint)!=codePoint){throw RangeError("Invalid code point: "+codePoint)}if(codePoint<=65535){codeUnits.push(codePoint)}else{codePoint-=65536;highSurrogate=(codePoint>>10)+55296;lowSurrogate=codePoint%1024+56320;codeUnits.push(highSurrogate,lowSurrogate)}if(index+1==length||codeUnits.length>MAX_SIZE){result+=stringFromCharCode.apply(null,codeUnits);codeUnits.length=0}}return result}function assertType(type,expected){if(expected.indexOf("|")==-1){if(type==expected){return}throw Error("Invalid node type: "+type)}expected=assertType.hasOwnProperty(expected)?assertType[expected]:assertType[expected]=RegExp("^(?:"+expected+")$");if(expected.test(type)){return}throw Error("Invalid node type: "+type)}function generate(node){var type=node.type;if(generate.hasOwnProperty(type)&&typeof generate[type]=="function"){return generate[type](node)}throw Error("Invalid node type: "+type)}function generateAlternative(node){assertType(node.type,"alternative");var terms=node.body,length=terms?terms.length:0;if(length==1){return generateTerm(terms[0])}else{var i=-1,result="";while(++i=55296&&first<=56319){second=lookahead().charCodeAt(0);if(second>=56320&&second<=57343){pos++;return createValue("symbol",(first-55296)*1024+second-56320+65536,pos-2,pos)}}}return createValue("symbol",first,pos-1,pos)}function createDisjunction(alternatives,from,to){return addRaw({type:"disjunction",body:alternatives,range:[from,to]})}function createDot(){return addRaw({type:"dot",range:[pos-1,pos]})}function createCharacterClassEscape(value){return addRaw({type:"characterClassEscape",value:value,range:[pos-2,pos]})}function createReference(matchIndex){return addRaw({type:"reference",matchIndex:parseInt(matchIndex,10),range:[pos-1-matchIndex.length,pos]})}function createGroup(behavior,disjunction,from,to){return addRaw({type:"group",behavior:behavior,body:disjunction,range:[from,to]})}function createQuantifier(min,max,from,to){if(to==null){from=pos-1;to=pos}return addRaw({type:"quantifier",min:min,max:max,greedy:true,body:null,range:[from,to]})}function createAlternative(terms,from,to){return addRaw({type:"alternative",body:terms,range:[from,to]})}function createCharacterClass(classRanges,negative,from,to){return addRaw({type:"characterClass",body:classRanges,negative:negative,range:[from,to]})}function createClassRange(min,max,from,to){if(min.codePoint>max.codePoint){throw SyntaxError("invalid range in character class")}return addRaw({type:"characterClassRange",min:min,max:max,range:[from,to]})}function flattenBody(body){if(body.type==="alternative"){return body.body}else{return[body]}}function isEmpty(obj){return obj.type==="empty"}function incr(amount){amount=amount||1;var res=str.substring(pos,pos+amount);pos+=amount||1;return res}function skip(value){if(!match(value)){throw SyntaxError("character: "+value)}}function match(value){if(str.indexOf(value,pos)===pos){return incr(value.length)}}function lookahead(){return str[pos]}function current(value){return str.indexOf(value,pos)===pos}function next(value){return str[pos+1]===value}function matchReg(regExp){var subStr=str.substring(pos);var res=subStr.match(regExp);if(res){res.range=[];res.range[0]=pos;incr(res[0].length);res.range[1]=pos}return res}function parseDisjunction(){var res=[],from=pos;res.push(parseAlternative());while(match("|")){res.push(parseAlternative())}if(res.length===1){return res[0]}return createDisjunction(res,from,pos)}function parseAlternative(){var res=[],from=pos;var term;while(term=parseTerm()){res.push(term)}if(res.length===1){return res[0]}return createAlternative(res,from,pos)}function parseTerm(){if(pos>=str.length||current("|")||current(")")){return null}var anchor=parseAnchor();if(anchor){return anchor}var atom=parseAtom();if(!atom){throw SyntaxError("Expected atom")}var quantifier=parseQuantifier()||false;if(quantifier){quantifier.body=flattenBody(atom);updateRawStart(quantifier,atom.range[0]);return quantifier}return atom}function parseGroup(matchA,typeA,matchB,typeB){var type=null,from=pos;if(match(matchA)){type=typeA}else if(match(matchB)){type=typeB}else{return false}var body=parseDisjunction();if(!body){throw SyntaxError("Expected disjunction")}skip(")");var group=createGroup(type,flattenBody(body),from,pos);if(type=="normal"){if(firstIteration){closedCaptureCounter++}}return group}function parseAnchor(){var res,from=pos;if(match("^")){return createAnchor("start",1)}else if(match("$")){return createAnchor("end",1)}else if(match("\\b")){return createAnchor("boundary",2)}else if(match("\\B")){return createAnchor("not-boundary",2)}else{return parseGroup("(?=","lookahead","(?!","negativeLookahead")}}function parseQuantifier(){var res;var quantifier;var min,max;if(match("*")){quantifier=createQuantifier(0)}else if(match("+")){quantifier=createQuantifier(1)}else if(match("?")){quantifier=createQuantifier(0,1)}else if(res=matchReg(/^\{([0-9]+)\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,min,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,undefined,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),([0-9]+)\}/)){min=parseInt(res[1],10);max=parseInt(res[2],10);if(min>max){throw SyntaxError("numbers out of order in {} quantifier")}quantifier=createQuantifier(min,max,res.range[0],res.range[1])}if(quantifier){if(match("?")){quantifier.greedy=false;quantifier.range[1]+=1}}return quantifier}function parseAtom(){var res;if(res=matchReg(/^[^^$\\.*+?(){[|]/)){return createCharacter(res)}else if(match(".")){return createDot()}else if(match("\\")){res=parseAtomEscape();if(!res){throw SyntaxError("atomEscape")}return res}else if(res=parseCharacterClass()){return res}else{return parseGroup("(?:","ignore","(","normal")}}function parseUnicodeSurrogatePairEscape(firstEscape){if(hasUnicodeFlag){var first,second;if(firstEscape.kind=="unicodeEscape"&&(first=firstEscape.codePoint)>=55296&&first<=56319&¤t("\\")&&next("u")){var prevPos=pos;pos++;var secondEscape=parseClassEscape();if(secondEscape.kind=="unicodeEscape"&&(second=secondEscape.codePoint)>=56320&&second<=57343){firstEscape.range[1]=secondEscape.range[1];firstEscape.codePoint=(first-55296)*1024+second-56320+65536;firstEscape.type="value";firstEscape.kind="unicodeCodePointEscape";addRaw(firstEscape)}else{pos=prevPos}}}return firstEscape}function parseClassEscape(){return parseAtomEscape(true)}function parseAtomEscape(insideCharacterClass){var res;res=parseDecimalEscape();if(res){return res}if(insideCharacterClass){if(match("b")){return createEscaped("singleEscape",8,"\\b")}else if(match("B")){throw SyntaxError("\\B not possible inside of CharacterClass")}}res=parseCharacterEscape();return res}function parseDecimalEscape(){var res,match;if(res=matchReg(/^(?!0)\d+/)){match=res[0];var refIdx=parseInt(res[0],10);if(refIdx<=closedCaptureCounter){return createReference(res[0])}else{backrefDenied.push(refIdx);incr(-res[0].length);if(res=matchReg(/^[0-7]{1,3}/)){return createEscaped("octal",parseInt(res[0],8),res[0],1)}else{res=createCharacter(matchReg(/^[89]/));return updateRawStart(res,res.range[0]-1)}}}else if(res=matchReg(/^[0-7]{1,3}/)){match=res[0];if(/^0{1,3}$/.test(match)){return createEscaped("null",0,"0",match.length+1)}else{return createEscaped("octal",parseInt(match,8),match,1)}}else if(res=matchReg(/^[dDsSwW]/)){return createCharacterClassEscape(res[0])}return false}function parseCharacterEscape(){var res;if(res=matchReg(/^[fnrtv]/)){var codePoint=0;switch(res[0]){case"t":codePoint=9;break;case"n":codePoint=10;break;case"v":codePoint=11;break;case"f":codePoint=12;break;case"r":codePoint=13;break}return createEscaped("singleEscape",codePoint,"\\"+res[0])}else if(res=matchReg(/^c([a-zA-Z])/)){return createEscaped("controlLetter",res[1].charCodeAt(0)%32,res[1],2)}else if(res=matchReg(/^x([0-9a-fA-F]{2})/)){return createEscaped("hexadecimalEscape",parseInt(res[1],16),res[1],2)}else if(res=matchReg(/^u([0-9a-fA-F]{4})/)){return parseUnicodeSurrogatePairEscape(createEscaped("unicodeEscape",parseInt(res[1],16),res[1],2))}else if(hasUnicodeFlag&&(res=matchReg(/^u\{([0-9a-fA-F]+)\}/))){return createEscaped("unicodeCodePointEscape",parseInt(res[1],16),res[1],4)}else{return parseIdentityEscape()}}function isIdentifierPart(ch){var NonAsciiIdentifierPart=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&NonAsciiIdentifierPart.test(String.fromCharCode(ch))}function parseIdentityEscape(){var ZWJ="‌";var ZWNJ="‍";var res;var tmp;if(!isIdentifierPart(lookahead())){tmp=incr();return createEscaped("identifier",tmp.charCodeAt(0),tmp,1)}if(match(ZWJ)){return createEscaped("identifier",8204,ZWJ)}else if(match(ZWNJ)){return createEscaped("identifier",8205,ZWNJ)}return null}function parseCharacterClass(){var res,from=pos;if(res=matchReg(/^\[\^/)){res=parseClassRanges();skip("]");return createCharacterClass(res,true,from,pos)}else if(match("[")){res=parseClassRanges();skip("]");return createCharacterClass(res,false,from,pos)}return null}function parseClassRanges(){var res;if(current("]")){return[]}else{res=parseNonemptyClassRanges();if(!res){throw SyntaxError("nonEmptyClassRanges")}return res}}function parseHelperClassRanges(atom){var from,to,res;if(current("-")&&!next("]")){skip("-");res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}to=pos;var classRanges=parseClassRanges();if(!classRanges){throw SyntaxError("classRanges")}from=atom.range[0];if(classRanges.type==="empty"){return[createClassRange(atom,res,from,to)]}return[createClassRange(atom,res,from,to)].concat(classRanges)}res=parseNonemptyClassRangesNoDash();if(!res){throw SyntaxError("nonEmptyClassRangesNoDash")}return[atom].concat(res)}function parseNonemptyClassRanges(){var atom=parseClassAtom();if(!atom){throw SyntaxError("classAtom")}if(current("]")){return[atom]}return parseHelperClassRanges(atom)}function parseNonemptyClassRangesNoDash(){var res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}if(current("]")){return res}return parseHelperClassRanges(res)}function parseClassAtom(){if(match("-")){return createCharacter("-")}else{return parseClassAtomNoDash()}}function parseClassAtomNoDash(){var res;if(res=matchReg(/^[^\\\]-]/)){return createCharacter(res[0])}else if(match("\\")){res=parseClassEscape();if(!res){throw SyntaxError("classEscape")}return parseUnicodeSurrogatePairEscape(res)}}var backrefDenied=[];var closedCaptureCounter=0;var firstIteration=true;var hasUnicodeFlag=(flags||"").indexOf("u")!==-1;var pos=0;str=String(str);if(str===""){str="(?:)"}var result=parseDisjunction();if(result.range[1]!==str.length){throw SyntaxError("Could not parse entire input - got stuck: "+str)}for(var i=0;i-1:false;unicode=flags?flags.indexOf("u")>-1:false;assign(tree,processTerm(tree));return generate(tree)}},{"./data/character-class-escape-sets.js":431,"./data/iu-mappings.json":432,regenerate:433,regjsgen:434,regjsparser:435}],437:[function(require,module,exports){"use strict";var isFinite=require("is-finite");module.exports=function(str,n){if(typeof str!=="string"){throw new TypeError("Expected a string as the first argument")}if(n<0||!isFinite(n)){throw new TypeError("Expected a finite positive number")}var ret="";do{if(n&1){ret+=str}str+=str}while(n=n>>1);return ret}},{"is-finite":438}],438:[function(require,module,exports){arguments[4][304][0].apply(exports,arguments)},{dup:304}],439:[function(require,module,exports){"use strict";module.exports=/^#!.*/},{}],440:[function(require,module,exports){"use strict";module.exports=function(str){var isExtendedLengthPath=/^\\\\\?\\/.test(str);var hasNonAscii=/[^\x00-\x80]+/.test(str);if(isExtendedLengthPath||hasNonAscii){return str}return str.replace(/\\/g,"/")}},{}],441:[function(require,module,exports){exports.SourceMapGenerator=require("./source-map/source-map-generator").SourceMapGenerator;exports.SourceMapConsumer=require("./source-map/source-map-consumer").SourceMapConsumer;exports.SourceNode=require("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":447,"./source-map/source-map-generator":448,"./source-map/source-node":449}],442:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function ArraySet(){this._array=[];this._set={}}ArraySet.fromArray=function ArraySet_fromArray(aArray,aAllowDuplicates){var set=new ArraySet;for(var i=0,len=aArray.length;i=0&&aIdx>1;return isNegative?-shifted:shifted}exports.encode=function base64VLQ_encode(aValue){var encoded="";var digit;var vlq=toVLQSigned(aValue);do{digit=vlq&VLQ_BASE_MASK;vlq>>>=VLQ_BASE_SHIFT;if(vlq>0){digit|=VLQ_CONTINUATION_BIT}encoded+=base64.encode(digit)}while(vlq>0);return encoded};exports.decode=function base64VLQ_decode(aStr,aIndex,aOutParam){var strLen=aStr.length;var result=0;var shift=0;var continuation,digit;do{if(aIndex>=strLen){throw new Error("Expected more digits in base 64 VLQ value.")}digit=base64.decode(aStr.charAt(aIndex++));continuation=!!(digit&VLQ_CONTINUATION_BIT);digit&=VLQ_BASE_MASK;result=result+(digit<0){if(aHigh-mid>1){return recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return aHigh1){return recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return mid}else{return aLow<0?-1:aLow}}}exports.search=function search(aNeedle,aHaystack,aCompare,aBias){if(aHaystack.length===0){return-1}var index=recursiveSearch(-1,aHaystack.length,aNeedle,aHaystack,aCompare,aBias||exports.GREATEST_LOWER_BOUND);if(index<0){return-1}while(index-1>=0){if(aCompare(aHaystack[index],aHaystack[index-1],true)!==0){break}--index}return index}})},{amdefine:451}],446:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function generatedPositionAfter(mappingA,mappingB){var lineA=mappingA.generatedLine;var lineB=mappingB.generatedLine;var columnA=mappingA.generatedColumn;var columnB=mappingB.generatedColumn;return lineB>lineA||lineB==lineA&&columnB>=columnA||util.compareByGeneratedPositions(mappingA,mappingB)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(aCallback,aThisArg){this._array.forEach(aCallback,aThisArg)};MappingList.prototype.add=function MappingList_add(aMapping){var mapping;if(generatedPositionAfter(this._last,aMapping)){this._last=aMapping;this._array.push(aMapping)}else{this._sorted=false;this._array.push(aMapping)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(util.compareByGeneratedPositions);this._sorted=true}return this._array};exports.MappingList=MappingList})},{"./util":450,amdefine:451}],447:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");var binarySearch=require("./binary-search");var ArraySet=require("./array-set").ArraySet;var base64VLQ=require("./base64-vlq");function SourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}return sourceMap.sections!=null?new IndexedSourceMapConsumer(sourceMap):new BasicSourceMapConsumer(sourceMap)}SourceMapConsumer.fromSourceMap=function(aSourceMap){return BasicSourceMapConsumer.fromSourceMap(aSourceMap)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{get:function(){if(!this.__generatedMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{get:function(){if(!this.__originalMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._nextCharIsMappingSeparator=function SourceMapConsumer_nextCharIsMappingSeparator(aStr,index){var c=aStr.charAt(index);return c===";"||c===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(aCallback,aContext,aOrder){var context=aContext||null;var order=aOrder||SourceMapConsumer.GENERATED_ORDER;var mappings;switch(order){case SourceMapConsumer.GENERATED_ORDER:mappings=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:mappings=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var sourceRoot=this.sourceRoot;mappings.map(function(mapping){var source=mapping.source;if(source!=null&&sourceRoot!=null){source=util.join(sourceRoot,source)}return{source:source,generatedLine:mapping.generatedLine,generatedColumn:mapping.generatedColumn,originalLine:mapping.originalLine,originalColumn:mapping.originalColumn,name:mapping.name}}).forEach(aCallback,context)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column",0)};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var mappings=[];var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,binarySearch.LEAST_UPPER_BOUND);if(index>=0){var mapping=this._originalMappings[index];var originalLine=mapping.originalLine;var originalColumn=mapping.originalColumn;while(mapping&&mapping.originalLine===originalLine&&(aArgs.column===undefined||mapping.originalColumn===originalColumn)){mappings.push({line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)});mapping=this._originalMappings[++index]}}return mappings};exports.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sources=util.getArg(sourceMap,"sources");var names=util.getArg(sourceMap,"names",[]);var sourceRoot=util.getArg(sourceMap,"sourceRoot",null);var sourcesContent=util.getArg(sourceMap,"sourcesContent",null);var mappings=util.getArg(sourceMap,"mappings");var file=util.getArg(sourceMap,"file",null);if(version!=this._version){throw new Error("Unsupported version: "+version)}sources=sources.map(util.normalize);this._names=ArraySet.fromArray(names,true);this._sources=ArraySet.fromArray(sources,true);this.sourceRoot=sourceRoot;this.sourcesContent=sourcesContent;this._mappings=mappings;this.file=file}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.fromSourceMap=function SourceMapConsumer_fromSourceMap(aSourceMap){var smc=Object.create(BasicSourceMapConsumer.prototype);smc._names=ArraySet.fromArray(aSourceMap._names.toArray(),true);smc._sources=ArraySet.fromArray(aSourceMap._sources.toArray(),true);smc.sourceRoot=aSourceMap._sourceRoot;smc.sourcesContent=aSourceMap._generateSourcesContent(smc._sources.toArray(),smc.sourceRoot);smc.file=aSourceMap._file;smc.__generatedMappings=aSourceMap._mappings.toArray().slice();smc.__originalMappings=aSourceMap._mappings.toArray().slice().sort(util.compareByOriginalPositions);return smc};BasicSourceMapConsumer.prototype._version=3;Object.defineProperty(BasicSourceMapConsumer.prototype,"sources",{get:function(){return this._sources.toArray().map(function(s){return this.sourceRoot!=null?util.join(this.sourceRoot,s):s},this)}});BasicSourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){var generatedLine=1;var previousGeneratedColumn=0;var previousOriginalLine=0;var previousOriginalColumn=0;var previousSource=0;var previousName=0;var length=aStr.length;var index=0;var cachedValues={};var temp={};var mapping,str,values,end,value;while(index1){mapping.source=this._sources.at(previousSource+values[1]);previousSource+=values[1];if(values.length===2){throw new Error("Found a source, but no line and column")}mapping.originalLine=previousOriginalLine+values[2];previousOriginalLine=mapping.originalLine;mapping.originalLine+=1;if(values.length===3){throw new Error("Found a source and line, but no column")}mapping.originalColumn=previousOriginalColumn+values[3];previousOriginalColumn=mapping.originalColumn;if(values.length>4){mapping.name=this._names.at(previousName+values[4]);previousName+=values[4]}}this.__generatedMappings.push(mapping);if(typeof mapping.originalLine==="number"){this.__originalMappings.push(mapping)}}}this.__generatedMappings.sort(util.compareByGeneratedPositions);this.__originalMappings.sort(util.compareByOriginalPositions)};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(aNeedle,aMappings,aLineName,aColumnName,aComparator,aBias){if(aNeedle[aLineName]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+aNeedle[aLineName])}if(aNeedle[aColumnName]<0){throw new TypeError("Column must be greater than or equal to 0, got "+aNeedle[aColumnName])}return binarySearch.search(aNeedle,aMappings,aComparator,aBias)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var index=0;index=0){var mapping=this._generatedMappings[index];if(mapping.generatedLine===needle.generatedLine){var source=util.getArg(mapping,"source",null);if(source!=null&&this.sourceRoot!=null){source=util.join(this.sourceRoot,source)}return{source:source,line:util.getArg(mapping,"originalLine",null),column:util.getArg(mapping,"originalColumn",null),name:util.getArg(mapping,"name",null)}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(aSource,nullOnMissing){if(!this.sourcesContent){return null}if(this.sourceRoot!=null){aSource=util.relative(this.sourceRoot,aSource)}if(this._sources.has(aSource)){return this.sourcesContent[this._sources.indexOf(aSource)]}var url;if(this.sourceRoot!=null&&(url=util.urlParse(this.sourceRoot))){var fileUriAbsPath=aSource.replace(/^file:\/\//,"");if(url.scheme=="file"&&this._sources.has(fileUriAbsPath)){return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]}if((!url.path||url.path=="/")&&this._sources.has("/"+aSource)){return this.sourcesContent[this._sources.indexOf("/"+aSource)]}}if(nullOnMissing){return null}else{throw new Error('"'+aSource+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column")};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,util.getArg(aArgs,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(index>=0){var mapping=this._originalMappings[index];if(mapping.source===needle.source){return{line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};exports.BasicSourceMapConsumer=BasicSourceMapConsumer;function IndexedSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sections=util.getArg(sourceMap,"sections");if(version!=this._version){throw new Error("Unsupported version: "+version)}var lastOffset={line:-1,column:0};this._sections=sections.map(function(s){if(s.url){throw new Error("Support for url field in sections not implemented.")}var offset=util.getArg(s,"offset");var offsetLine=util.getArg(offset,"line");var offsetColumn=util.getArg(offset,"column");if(offsetLine0&&aGenerated.column>=0&&!aOriginal&&!aSource&&!aName){return}else if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aOriginal&&"line"in aOriginal&&"column"in aOriginal&&aGenerated.line>0&&aGenerated.column>=0&&aOriginal.line>0&&aOriginal.column>=0&&aSource){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:aGenerated,source:aSource,original:aOriginal,name:aName}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var previousGeneratedColumn=0;var previousGeneratedLine=1;var previousOriginalColumn=0;var previousOriginalLine=0;var previousName=0;var previousSource=0;var result="";var mapping;var mappings=this._mappings.toArray();for(var i=0,len=mappings.length;i0){if(!util.compareByGeneratedPositions(mapping,mappings[i-1])){continue}result+=","}}result+=base64VLQ.encode(mapping.generatedColumn-previousGeneratedColumn);previousGeneratedColumn=mapping.generatedColumn;if(mapping.source!=null){result+=base64VLQ.encode(this._sources.indexOf(mapping.source)-previousSource);previousSource=this._sources.indexOf(mapping.source);result+=base64VLQ.encode(mapping.originalLine-1-previousOriginalLine);previousOriginalLine=mapping.originalLine-1;result+=base64VLQ.encode(mapping.originalColumn-previousOriginalColumn);previousOriginalColumn=mapping.originalColumn;if(mapping.name!=null){result+=base64VLQ.encode(this._names.indexOf(mapping.name)-previousName);previousName=this._names.indexOf(mapping.name)}}}return result};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(aSources,aSourceRoot){return aSources.map(function(source){if(!this._sourcesContents){return null}if(aSourceRoot!=null){source=util.relative(aSourceRoot,source)}var key=util.toSetString(source);return Object.prototype.hasOwnProperty.call(this._sourcesContents,key)?this._sourcesContents[key]:null},this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var map={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){map.file=this._file}if(this._sourceRoot!=null){map.sourceRoot=this._sourceRoot}if(this._sourcesContents){map.sourcesContent=this._generateSourcesContent(map.sources,map.sourceRoot)}return map};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};exports.SourceMapGenerator=SourceMapGenerator})},{"./array-set":442,"./base64-vlq":443,"./mapping-list":446,"./util":450,amdefine:451}],449:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var SourceMapGenerator=require("./source-map-generator").SourceMapGenerator;var util=require("./util");var REGEX_NEWLINE=/(\r?\n)/;var NEWLINE_CODE=10;var isSourceNode="$$$isSourceNode$$$";function SourceNode(aLine,aColumn,aSource,aChunks,aName){this.children=[];this.sourceContents={};this.line=aLine==null?null:aLine;this.column=aColumn==null?null:aColumn;this.source=aSource==null?null:aSource;this.name=aName==null?null:aName;this[isSourceNode]=true;if(aChunks!=null)this.add(aChunks)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(aGeneratedCode,aSourceMapConsumer,aRelativePath){var node=new SourceNode;var remainingLines=aGeneratedCode.split(REGEX_NEWLINE);var shiftNextLine=function(){var lineContents=remainingLines.shift();var newLine=remainingLines.shift()||"";return lineContents+newLine};var lastGeneratedLine=1,lastGeneratedColumn=0;var lastMapping=null;aSourceMapConsumer.eachMapping(function(mapping){if(lastMapping!==null){if(lastGeneratedLine0){if(lastMapping){addMappingWithCode(lastMapping,shiftNextLine())}node.add(remainingLines.join(""))}aSourceMapConsumer.sources.forEach(function(sourceFile){var content=aSourceMapConsumer.sourceContentFor(sourceFile);if(content!=null){if(aRelativePath!=null){sourceFile=util.join(aRelativePath,sourceFile)}node.setSourceContent(sourceFile,content)}});return node;function addMappingWithCode(mapping,code){if(mapping===null||mapping.source===undefined){node.add(code)}else{var source=aRelativePath?util.join(aRelativePath,mapping.source):mapping.source; +break;case"value":var codePoint=item.codePoint;var set=regenerate(codePoint);if(ignoreCase&&unicode){var folded=caseFold(codePoint);if(folded){set.add(folded)}}update(item,set.toString());break;case"anchor":case"empty":case"group":case"reference":break;default:throw Error("Unknown term type: "+item.type)}return item}module.exports=function(pattern,flags){var tree=parse(pattern,flags);ignoreCase=flags?flags.indexOf("i")>-1:false;unicode=flags?flags.indexOf("u")>-1:false;assign(tree,processTerm(tree));return generate(tree)}},{"./data/character-class-escape-sets.js":431,"./data/iu-mappings.json":432,regenerate:433,regjsgen:434,regjsparser:435}],437:[function(require,module,exports){"use strict";var isFinite=require("is-finite");module.exports=function(str,n){if(typeof str!=="string"){throw new TypeError("Expected a string as the first argument")}if(n<0||!isFinite(n)){throw new TypeError("Expected a finite positive number")}var ret="";do{if(n&1){ret+=str}str+=str}while(n=n>>1);return ret}},{"is-finite":438}],438:[function(require,module,exports){arguments[4][304][0].apply(exports,arguments)},{dup:304}],439:[function(require,module,exports){"use strict";module.exports=/^#!.*/},{}],440:[function(require,module,exports){"use strict";module.exports=function(str){var isExtendedLengthPath=/^\\\\\?\\/.test(str);var hasNonAscii=/[^\x00-\x80]+/.test(str);if(isExtendedLengthPath||hasNonAscii){return str}return str.replace(/\\/g,"/")}},{}],441:[function(require,module,exports){exports.SourceMapGenerator=require("./source-map/source-map-generator").SourceMapGenerator;exports.SourceMapConsumer=require("./source-map/source-map-consumer").SourceMapConsumer;exports.SourceNode=require("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":447,"./source-map/source-map-generator":448,"./source-map/source-node":449}],442:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function ArraySet(){this._array=[];this._set={}}ArraySet.fromArray=function ArraySet_fromArray(aArray,aAllowDuplicates){var set=new ArraySet;for(var i=0,len=aArray.length;i=0&&aIdx>1;return isNegative?-shifted:shifted}exports.encode=function base64VLQ_encode(aValue){var encoded="";var digit;var vlq=toVLQSigned(aValue);do{digit=vlq&VLQ_BASE_MASK;vlq>>>=VLQ_BASE_SHIFT;if(vlq>0){digit|=VLQ_CONTINUATION_BIT}encoded+=base64.encode(digit)}while(vlq>0);return encoded};exports.decode=function base64VLQ_decode(aStr,aIndex,aOutParam){var strLen=aStr.length;var result=0;var shift=0;var continuation,digit;do{if(aIndex>=strLen){throw new Error("Expected more digits in base 64 VLQ value.")}digit=base64.decode(aStr.charAt(aIndex++));continuation=!!(digit&VLQ_CONTINUATION_BIT);digit&=VLQ_BASE_MASK;result=result+(digit<0){if(aHigh-mid>1){return recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return aHigh1){return recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return mid}else{return aLow<0?-1:aLow}}}exports.search=function search(aNeedle,aHaystack,aCompare,aBias){if(aHaystack.length===0){return-1}var index=recursiveSearch(-1,aHaystack.length,aNeedle,aHaystack,aCompare,aBias||exports.GREATEST_LOWER_BOUND);if(index<0){return-1}while(index-1>=0){if(aCompare(aHaystack[index],aHaystack[index-1],true)!==0){break}--index}return index}})},{amdefine:451}],446:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function generatedPositionAfter(mappingA,mappingB){var lineA=mappingA.generatedLine;var lineB=mappingB.generatedLine;var columnA=mappingA.generatedColumn;var columnB=mappingB.generatedColumn;return lineB>lineA||lineB==lineA&&columnB>=columnA||util.compareByGeneratedPositions(mappingA,mappingB)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(aCallback,aThisArg){this._array.forEach(aCallback,aThisArg)};MappingList.prototype.add=function MappingList_add(aMapping){var mapping;if(generatedPositionAfter(this._last,aMapping)){this._last=aMapping;this._array.push(aMapping)}else{this._sorted=false;this._array.push(aMapping)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(util.compareByGeneratedPositions);this._sorted=true}return this._array};exports.MappingList=MappingList})},{"./util":450,amdefine:451}],447:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");var binarySearch=require("./binary-search");var ArraySet=require("./array-set").ArraySet;var base64VLQ=require("./base64-vlq");function SourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}return sourceMap.sections!=null?new IndexedSourceMapConsumer(sourceMap):new BasicSourceMapConsumer(sourceMap)}SourceMapConsumer.fromSourceMap=function(aSourceMap){return BasicSourceMapConsumer.fromSourceMap(aSourceMap)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{get:function(){if(!this.__generatedMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{get:function(){if(!this.__originalMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._nextCharIsMappingSeparator=function SourceMapConsumer_nextCharIsMappingSeparator(aStr,index){var c=aStr.charAt(index);return c===";"||c===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(aCallback,aContext,aOrder){var context=aContext||null;var order=aOrder||SourceMapConsumer.GENERATED_ORDER;var mappings;switch(order){case SourceMapConsumer.GENERATED_ORDER:mappings=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:mappings=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var sourceRoot=this.sourceRoot;mappings.map(function(mapping){var source=mapping.source;if(source!=null&&sourceRoot!=null){source=util.join(sourceRoot,source)}return{source:source,generatedLine:mapping.generatedLine,generatedColumn:mapping.generatedColumn,originalLine:mapping.originalLine,originalColumn:mapping.originalColumn,name:mapping.name}}).forEach(aCallback,context)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column",0)};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var mappings=[];var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,binarySearch.LEAST_UPPER_BOUND);if(index>=0){var mapping=this._originalMappings[index];var originalLine=mapping.originalLine;var originalColumn=mapping.originalColumn;while(mapping&&mapping.originalLine===originalLine&&(aArgs.column===undefined||mapping.originalColumn===originalColumn)){mappings.push({line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)});mapping=this._originalMappings[++index]}}return mappings};exports.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sources=util.getArg(sourceMap,"sources");var names=util.getArg(sourceMap,"names",[]);var sourceRoot=util.getArg(sourceMap,"sourceRoot",null);var sourcesContent=util.getArg(sourceMap,"sourcesContent",null);var mappings=util.getArg(sourceMap,"mappings");var file=util.getArg(sourceMap,"file",null);if(version!=this._version){throw new Error("Unsupported version: "+version)}sources=sources.map(util.normalize);this._names=ArraySet.fromArray(names,true);this._sources=ArraySet.fromArray(sources,true);this.sourceRoot=sourceRoot;this.sourcesContent=sourcesContent;this._mappings=mappings;this.file=file}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.fromSourceMap=function SourceMapConsumer_fromSourceMap(aSourceMap){var smc=Object.create(BasicSourceMapConsumer.prototype);smc._names=ArraySet.fromArray(aSourceMap._names.toArray(),true);smc._sources=ArraySet.fromArray(aSourceMap._sources.toArray(),true);smc.sourceRoot=aSourceMap._sourceRoot;smc.sourcesContent=aSourceMap._generateSourcesContent(smc._sources.toArray(),smc.sourceRoot);smc.file=aSourceMap._file;smc.__generatedMappings=aSourceMap._mappings.toArray().slice();smc.__originalMappings=aSourceMap._mappings.toArray().slice().sort(util.compareByOriginalPositions);return smc};BasicSourceMapConsumer.prototype._version=3;Object.defineProperty(BasicSourceMapConsumer.prototype,"sources",{get:function(){return this._sources.toArray().map(function(s){return this.sourceRoot!=null?util.join(this.sourceRoot,s):s},this)}});BasicSourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){var generatedLine=1;var previousGeneratedColumn=0;var previousOriginalLine=0;var previousOriginalColumn=0;var previousSource=0;var previousName=0;var length=aStr.length;var index=0;var cachedValues={};var temp={};var mapping,str,values,end,value;while(index1){mapping.source=this._sources.at(previousSource+values[1]);previousSource+=values[1];if(values.length===2){throw new Error("Found a source, but no line and column")}mapping.originalLine=previousOriginalLine+values[2];previousOriginalLine=mapping.originalLine;mapping.originalLine+=1;if(values.length===3){throw new Error("Found a source and line, but no column")}mapping.originalColumn=previousOriginalColumn+values[3];previousOriginalColumn=mapping.originalColumn;if(values.length>4){mapping.name=this._names.at(previousName+values[4]);previousName+=values[4]}}this.__generatedMappings.push(mapping);if(typeof mapping.originalLine==="number"){this.__originalMappings.push(mapping)}}}this.__generatedMappings.sort(util.compareByGeneratedPositions);this.__originalMappings.sort(util.compareByOriginalPositions)};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(aNeedle,aMappings,aLineName,aColumnName,aComparator,aBias){if(aNeedle[aLineName]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+aNeedle[aLineName])}if(aNeedle[aColumnName]<0){throw new TypeError("Column must be greater than or equal to 0, got "+aNeedle[aColumnName])}return binarySearch.search(aNeedle,aMappings,aComparator,aBias)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var index=0;index=0){var mapping=this._generatedMappings[index];if(mapping.generatedLine===needle.generatedLine){var source=util.getArg(mapping,"source",null);if(source!=null&&this.sourceRoot!=null){source=util.join(this.sourceRoot,source)}return{source:source,line:util.getArg(mapping,"originalLine",null),column:util.getArg(mapping,"originalColumn",null),name:util.getArg(mapping,"name",null)}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(aSource,nullOnMissing){if(!this.sourcesContent){return null}if(this.sourceRoot!=null){aSource=util.relative(this.sourceRoot,aSource)}if(this._sources.has(aSource)){return this.sourcesContent[this._sources.indexOf(aSource)]}var url;if(this.sourceRoot!=null&&(url=util.urlParse(this.sourceRoot))){var fileUriAbsPath=aSource.replace(/^file:\/\//,"");if(url.scheme=="file"&&this._sources.has(fileUriAbsPath)){return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]}if((!url.path||url.path=="/")&&this._sources.has("/"+aSource)){return this.sourcesContent[this._sources.indexOf("/"+aSource)]}}if(nullOnMissing){return null}else{throw new Error('"'+aSource+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column")};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,util.getArg(aArgs,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(index>=0){var mapping=this._originalMappings[index];if(mapping.source===needle.source){return{line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};exports.BasicSourceMapConsumer=BasicSourceMapConsumer;function IndexedSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sections=util.getArg(sourceMap,"sections");if(version!=this._version){throw new Error("Unsupported version: "+version)}var lastOffset={line:-1,column:0};this._sections=sections.map(function(s){if(s.url){throw new Error("Support for url field in sections not implemented.")}var offset=util.getArg(s,"offset");var offsetLine=util.getArg(offset,"line");var offsetColumn=util.getArg(offset,"column");if(offsetLine0&&aGenerated.column>=0&&!aOriginal&&!aSource&&!aName){return}else if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aOriginal&&"line"in aOriginal&&"column"in aOriginal&&aGenerated.line>0&&aGenerated.column>=0&&aOriginal.line>0&&aOriginal.column>=0&&aSource){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:aGenerated,source:aSource,original:aOriginal,name:aName}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var previousGeneratedColumn=0;var previousGeneratedLine=1;var previousOriginalColumn=0;var previousOriginalLine=0;var previousName=0;var previousSource=0;var result="";var mapping;var mappings=this._mappings.toArray();for(var i=0,len=mappings.length;i0){if(!util.compareByGeneratedPositions(mapping,mappings[i-1])){continue}result+=","}}result+=base64VLQ.encode(mapping.generatedColumn-previousGeneratedColumn);previousGeneratedColumn=mapping.generatedColumn;if(mapping.source!=null){result+=base64VLQ.encode(this._sources.indexOf(mapping.source)-previousSource);previousSource=this._sources.indexOf(mapping.source);result+=base64VLQ.encode(mapping.originalLine-1-previousOriginalLine);previousOriginalLine=mapping.originalLine-1;result+=base64VLQ.encode(mapping.originalColumn-previousOriginalColumn);previousOriginalColumn=mapping.originalColumn;if(mapping.name!=null){result+=base64VLQ.encode(this._names.indexOf(mapping.name)-previousName);previousName=this._names.indexOf(mapping.name)}}}return result};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(aSources,aSourceRoot){return aSources.map(function(source){if(!this._sourcesContents){return null}if(aSourceRoot!=null){source=util.relative(aSourceRoot,source)}var key=util.toSetString(source);return Object.prototype.hasOwnProperty.call(this._sourcesContents,key)?this._sourcesContents[key]:null},this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var map={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){map.file=this._file}if(this._sourceRoot!=null){map.sourceRoot=this._sourceRoot}if(this._sourcesContents){map.sourcesContent=this._generateSourcesContent(map.sources,map.sourceRoot)}return map};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};exports.SourceMapGenerator=SourceMapGenerator})},{"./array-set":442,"./base64-vlq":443,"./mapping-list":446,"./util":450,amdefine:451}],449:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var SourceMapGenerator=require("./source-map-generator").SourceMapGenerator;var util=require("./util");var REGEX_NEWLINE=/(\r?\n)/;var NEWLINE_CODE=10;var isSourceNode="$$$isSourceNode$$$";function SourceNode(aLine,aColumn,aSource,aChunks,aName){this.children=[];this.sourceContents={};this.line=aLine==null?null:aLine;this.column=aColumn==null?null:aColumn;this.source=aSource==null?null:aSource;this.name=aName==null?null:aName;this[isSourceNode]=true;if(aChunks!=null)this.add(aChunks)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(aGeneratedCode,aSourceMapConsumer,aRelativePath){var node=new SourceNode;var remainingLines=aGeneratedCode.split(REGEX_NEWLINE);var shiftNextLine=function(){var lineContents=remainingLines.shift();var newLine=remainingLines.shift()||"";return lineContents+newLine};var lastGeneratedLine=1,lastGeneratedColumn=0;var lastMapping=null;aSourceMapConsumer.eachMapping(function(mapping){if(lastMapping!==null){if(lastGeneratedLine0){if(lastMapping){addMappingWithCode(lastMapping,shiftNextLine())}node.add(remainingLines.join(""))}aSourceMapConsumer.sources.forEach(function(sourceFile){var content=aSourceMapConsumer.sourceContentFor(sourceFile); -node.add(new SourceNode(mapping.originalLine,mapping.originalColumn,source,code,mapping.name))}}};SourceNode.prototype.add=function SourceNode_add(aChunk){if(Array.isArray(aChunk)){aChunk.forEach(function(chunk){this.add(chunk)},this)}else if(aChunk[isSourceNode]||typeof aChunk==="string"){if(aChunk){this.children.push(aChunk)}}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.prepend=function SourceNode_prepend(aChunk){if(Array.isArray(aChunk)){for(var i=aChunk.length-1;i>=0;i--){this.prepend(aChunk[i])}}else if(aChunk[isSourceNode]||typeof aChunk==="string"){this.children.unshift(aChunk)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.walk=function SourceNode_walk(aFn){var chunk;for(var i=0,len=this.children.length;i0){newChildren=[];for(i=0;i=0;i--){part=parts[i];if(part==="."){parts.splice(i,1)}else if(part===".."){up++}else if(up>0){if(part===""){parts.splice(i+1,up);up=0}else{parts.splice(i,2);up--}}}path=parts.join("/");if(path===""){path=isAbsolute?"/":"."}if(url){url.path=path;return urlGenerate(url)}return path}exports.normalize=normalize;function join(aRoot,aPath){if(aRoot===""){aRoot="."}if(aPath===""){aPath="."}var aPathUrl=urlParse(aPath);var aRootUrl=urlParse(aRoot);if(aRootUrl){aRoot=aRootUrl.path||"/"}if(aPathUrl&&!aPathUrl.scheme){if(aRootUrl){aPathUrl.scheme=aRootUrl.scheme}return urlGenerate(aPathUrl)}if(aPathUrl||aPath.match(dataUrlRegexp)){return aPath}if(aRootUrl&&!aRootUrl.host&&!aRootUrl.path){aRootUrl.host=aPath;return urlGenerate(aRootUrl)}var joined=aPath.charAt(0)==="/"?aPath:normalize(aRoot.replace(/\/+$/,"")+"/"+aPath);if(aRootUrl){aRootUrl.path=joined;return urlGenerate(aRootUrl)}return joined}exports.join=join;function relative(aRoot,aPath){if(aRoot===""){aRoot="."}aRoot=aRoot.replace(/\/$/,"");var url=urlParse(aRoot);if(aPath.charAt(0)=="/"&&url&&url.path=="/"){return aPath.slice(1)}return aPath.indexOf(aRoot+"/")===0?aPath.substr(aRoot.length+1):aPath}exports.relative=relative;function toSetString(aStr){return"$"+aStr}exports.toSetString=toSetString;function fromSetString(aStr){return aStr.substr(1)}exports.fromSetString=fromSetString;function strcmp(aStr1,aStr2){var s1=aStr1||"";var s2=aStr2||"";return(s1>s2)-(s10){ary.splice(i-1,2);i-=2}}}}function normalize(name,baseName){var baseParts;if(name&&name.charAt(0)==="."){if(baseName){baseParts=baseName.split("/");baseParts=baseParts.slice(0,baseParts.length-1);baseParts=baseParts.concat(name.split("/"));trimDots(baseParts);name=baseParts.join("/")}}return name}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(id){function load(value){loaderCache[id]=value}load.fromText=function(id,text){throw new Error("amdefine does not implement load.fromText")};return load}makeRequire=function(systemRequire,exports,module,relId){function amdRequire(deps,callback){if(typeof deps==="string"){return stringRequire(systemRequire,exports,module,deps,relId)}else{deps=deps.map(function(depName){return stringRequire(systemRequire,exports,module,depName,relId)});process.nextTick(function(){callback.apply(null,deps)})}}amdRequire.toUrl=function(filePath){if(filePath.indexOf(".")===0){return normalize(filePath,path.dirname(module.filename))}else{return filePath}};return amdRequire};requireFn=requireFn||function req(){return module.require.apply(module,arguments)};function runFactory(id,deps,factory){var r,e,m,result;if(id){e=loaderCache[id]={};m={id:id,uri:__filename,exports:e};r=makeRequire(requireFn,e,m,id)}else{if(alreadyCalled){throw new Error("amdefine with no module ID cannot be called more than once per file.")}alreadyCalled=true;e=module.exports;m=module;r=makeRequire(requireFn,e,m,module.id)}if(deps){deps=deps.map(function(depName){return r(depName)})}if(typeof factory==="function"){result=factory.apply(m.exports,deps)}else{result=factory}if(result!==undefined){m.exports=result;if(id){loaderCache[id]=m.exports}}}stringRequire=function(systemRequire,exports,module,id,relId){var index=id.indexOf("!"),originalId=id,prefix,plugin;if(index===-1){id=normalize(id,relId);if(id==="require"){return makeRequire(systemRequire,exports,module,relId)}else if(id==="exports"){return exports}else if(id==="module"){return module}else if(loaderCache.hasOwnProperty(id)){return loaderCache[id]}else if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}else{if(systemRequire){return systemRequire(originalId)}else{throw new Error("No module with ID: "+id)}}}else{prefix=id.substring(0,index);id=id.substring(index+1,id.length);plugin=stringRequire(systemRequire,exports,module,prefix,relId);if(plugin.normalize){id=plugin.normalize(id,makeNormalize(relId))}else{id=normalize(id,relId)}if(loaderCache[id]){return loaderCache[id]}else{plugin.load(id,makeRequire(systemRequire,exports,module,relId),makeLoad(id),{});return loaderCache[id]}}};function define(id,deps,factory){if(Array.isArray(id)){factory=deps;deps=id;id=undefined}else if(typeof id!=="string"){factory=id;id=deps=undefined}if(deps&&!Array.isArray(deps)){factory=deps;deps=undefined}if(!deps){deps=["require","exports","module"]}if(id){defineCache[id]=[id,deps,factory]}else{runFactory(id,deps,factory)}}define.require=function(id){if(loaderCache[id]){return loaderCache[id]}if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}};define.amd={};return define}module.exports=amdefine}).call(this,require("_process"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{_process:183,path:182}],452:[function(require,module,exports){"use strict";module.exports=function toFastProperties(obj){function f(){}f.prototype=obj;new f;return;eval(obj)}},{}],453:[function(require,module,exports){"use strict";module.exports=function(str){return str.replace(/[\s\uFEFF\xA0]+$/g,"")}},{}],454:[function(require,module,exports){module.exports={name:"babel-core",description:"Turn ES6 code into readable vanilla ES5 with source maps",version:"5.0.8",author:"Sebastian McKenzie ",homepage:"https://babeljs.io/",repository:"babel/babel",main:"lib/babel/api/node.js",browser:{"./lib/babel/api/register/node.js":"./lib/babel/api/register/browser.js"},keywords:["harmony","classes","modules","let","const","var","es6","transpile","transpiler","6to5","babel"],scripts:{bench:"make bench",test:"make test"},dependencies:{"ast-types":"~0.7.0",chalk:"^1.0.0","convert-source-map":"^0.5.0","core-js":"^0.8.1",debug:"^2.1.1","detect-indent":"^3.0.0",estraverse:"^1.9.1",esutils:"^1.1.6","fs-readdir-recursive":"^0.1.0",globals:"^6.2.0","is-integer":"^1.0.4","js-tokens":"1.0.0",leven:"^1.0.1","line-numbers":"0.2.0",lodash:"^3.2.0",minimatch:"^2.0.3","output-file-sync":"^1.1.0","path-is-absolute":"^1.0.0","private":"^0.1.6","regenerator-babel":"0.8.13-2",regexpu:"^1.1.2",repeating:"^1.1.2","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.4.0","source-map-support":"^0.2.9","to-fast-properties":"^1.0.0","trim-right":"^1.0.0"},devDependencies:{babel:"4.7.13",browserify:"^9.0.3",chai:"^2.0.0",eslint:"^0.15.1","babel-eslint":"^1.0.1",esvalid:"^1.1.0",istanbul:"^0.3.5",matcha:"^0.6.0",mocha:"^2.1.0",rimraf:"^2.2.8","uglify-js":"^2.4.16"}}},{}],455:[function(require,module,exports){module.exports={"abstract-expression-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-delete":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceDelete",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceSet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-comprehension-container":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-from":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-push":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"STATEMENT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"call-instance-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,type:"ThisExpression",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INITIALIZERS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"call-static-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CONSTRUCTOR",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INITIALIZERS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"CONSTRUCTOR",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},call:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"CONTEXT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"class-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"DECORATOR",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"class-super-constructor-call-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"class-super-constructor-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"corejs-is-iterator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CORE_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isIterable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"corejs-iterator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CORE_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getIterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"default-parameter":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"DEFAULT_VALUE",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"let",type:"VariableDeclaration",end:null}],type:"Program",end:null},"exports-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-default-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-from-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},value:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"INIT",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-module-declaration-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-module-declaration":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},{start:null,loc:null,range:null,value:"__esModule",raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null, -type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"for-of-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARR",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"for-of-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:null,update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},operator:">=",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"for-of":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"Program",end:null},"helper-async-to-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"next",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"throw",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:null,type:"ReturnStatement",end:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:null,type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"then",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-bind":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Function",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-class-call-check":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},operator:"instanceof",right:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"BinaryExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot call a class as a function",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-create-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],type:"CallExpression",end:null, -_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-create-decorated-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,leadingComments:null,_paths:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"The decorator for method ",raw:null,type:"Literal",end:null},operator:"+",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,value:" is of the invalid type ",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-default-props":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-defaults":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyNames",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-define-property":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},operator:"==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-extends":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"assign",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:1,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier", -end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-has-own":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-inherits":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"Super expression must either be null or a function, not ",raw:null,type:"Literal",end:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"create",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__proto__",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-interop-require-wildcard":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},value:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-interop-require":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},alternate:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-object-destructuring-empty":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot destructure undefined",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-object-without-properties":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"indexOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:">=",right:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-self-global":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"self",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-slice":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"slice",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-sliced-to-array-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array", -type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-sliced-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,leadingComments:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-tagged-template-literal-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-tagged-template-literal":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-temporal-assert-defined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"ReferenceError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},operator:"+",right:{start:null,loc:null,range:null,value:" is not defined - temporal dead zone",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-temporal-undefined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null,parenthesizedExpression:true},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-to-consumable-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-typeof":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,value:"symbol",raw:null,type:"Literal",end:null},alternate:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"let-scoping-return":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"v",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"ludicrous-in":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"RIGHT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"LEFT",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"named-function":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{ -loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"GET_OUTER_ID",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"property-method-assignment-wrapper-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:true,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,delegate:true,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"YieldExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"property-method-assignment-wrapper":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"prototype-identifier":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CLASS_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"require-assign-key":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null}],type:"Program",end:null},require:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},rest:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"ARRAY_LEN",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"START",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARRAY_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"self-contained-helpers-head":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"HELPER",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},system:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"System",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"register",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"MODULE_DEPENDENCIES",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"EXPORT_IDENTIFIER",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"setters",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"SETTERS",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"execute",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"EXECUTE",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"tail-call-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,body:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BLOCK",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"WhileStatement",end:null,_scopeInfo:null,_paths:null},label:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"LabeledStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null}],type:"Program",end:null},"test-exports":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"test-module":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"umd-commonjs-strict":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"root",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"BROWSER_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"UMD_ROOT",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FACTORY_PARAMETERS",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"FACTORY_BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"umd-runner-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"COMMON_TEST",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"BROWSER_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"GLOBAL_ARG",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null}}},{}]},{},[19])(19)}); \ No newline at end of file +if(content!=null){if(aRelativePath!=null){sourceFile=util.join(aRelativePath,sourceFile)}node.setSourceContent(sourceFile,content)}});return node;function addMappingWithCode(mapping,code){if(mapping===null||mapping.source===undefined){node.add(code)}else{var source=aRelativePath?util.join(aRelativePath,mapping.source):mapping.source;node.add(new SourceNode(mapping.originalLine,mapping.originalColumn,source,code,mapping.name))}}};SourceNode.prototype.add=function SourceNode_add(aChunk){if(Array.isArray(aChunk)){aChunk.forEach(function(chunk){this.add(chunk)},this)}else if(aChunk[isSourceNode]||typeof aChunk==="string"){if(aChunk){this.children.push(aChunk)}}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.prepend=function SourceNode_prepend(aChunk){if(Array.isArray(aChunk)){for(var i=aChunk.length-1;i>=0;i--){this.prepend(aChunk[i])}}else if(aChunk[isSourceNode]||typeof aChunk==="string"){this.children.unshift(aChunk)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.walk=function SourceNode_walk(aFn){var chunk;for(var i=0,len=this.children.length;i0){newChildren=[];for(i=0;i=0;i--){part=parts[i];if(part==="."){parts.splice(i,1)}else if(part===".."){up++}else if(up>0){if(part===""){parts.splice(i+1,up);up=0}else{parts.splice(i,2);up--}}}path=parts.join("/");if(path===""){path=isAbsolute?"/":"."}if(url){url.path=path;return urlGenerate(url)}return path}exports.normalize=normalize;function join(aRoot,aPath){if(aRoot===""){aRoot="."}if(aPath===""){aPath="."}var aPathUrl=urlParse(aPath);var aRootUrl=urlParse(aRoot);if(aRootUrl){aRoot=aRootUrl.path||"/"}if(aPathUrl&&!aPathUrl.scheme){if(aRootUrl){aPathUrl.scheme=aRootUrl.scheme}return urlGenerate(aPathUrl)}if(aPathUrl||aPath.match(dataUrlRegexp)){return aPath}if(aRootUrl&&!aRootUrl.host&&!aRootUrl.path){aRootUrl.host=aPath;return urlGenerate(aRootUrl)}var joined=aPath.charAt(0)==="/"?aPath:normalize(aRoot.replace(/\/+$/,"")+"/"+aPath);if(aRootUrl){aRootUrl.path=joined;return urlGenerate(aRootUrl)}return joined}exports.join=join;function relative(aRoot,aPath){if(aRoot===""){aRoot="."}aRoot=aRoot.replace(/\/$/,"");var url=urlParse(aRoot);if(aPath.charAt(0)=="/"&&url&&url.path=="/"){return aPath.slice(1)}return aPath.indexOf(aRoot+"/")===0?aPath.substr(aRoot.length+1):aPath}exports.relative=relative;function toSetString(aStr){return"$"+aStr}exports.toSetString=toSetString;function fromSetString(aStr){return aStr.substr(1)}exports.fromSetString=fromSetString;function strcmp(aStr1,aStr2){var s1=aStr1||"";var s2=aStr2||"";return(s1>s2)-(s10){ary.splice(i-1,2);i-=2}}}}function normalize(name,baseName){var baseParts;if(name&&name.charAt(0)==="."){if(baseName){baseParts=baseName.split("/");baseParts=baseParts.slice(0,baseParts.length-1);baseParts=baseParts.concat(name.split("/"));trimDots(baseParts);name=baseParts.join("/")}}return name}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(id){function load(value){loaderCache[id]=value}load.fromText=function(id,text){throw new Error("amdefine does not implement load.fromText")};return load}makeRequire=function(systemRequire,exports,module,relId){function amdRequire(deps,callback){if(typeof deps==="string"){return stringRequire(systemRequire,exports,module,deps,relId)}else{deps=deps.map(function(depName){return stringRequire(systemRequire,exports,module,depName,relId)});process.nextTick(function(){callback.apply(null,deps)})}}amdRequire.toUrl=function(filePath){if(filePath.indexOf(".")===0){return normalize(filePath,path.dirname(module.filename))}else{return filePath}};return amdRequire};requireFn=requireFn||function req(){return module.require.apply(module,arguments)};function runFactory(id,deps,factory){var r,e,m,result;if(id){e=loaderCache[id]={};m={id:id,uri:__filename,exports:e};r=makeRequire(requireFn,e,m,id)}else{if(alreadyCalled){throw new Error("amdefine with no module ID cannot be called more than once per file.")}alreadyCalled=true;e=module.exports;m=module;r=makeRequire(requireFn,e,m,module.id)}if(deps){deps=deps.map(function(depName){return r(depName)})}if(typeof factory==="function"){result=factory.apply(m.exports,deps)}else{result=factory}if(result!==undefined){m.exports=result;if(id){loaderCache[id]=m.exports}}}stringRequire=function(systemRequire,exports,module,id,relId){var index=id.indexOf("!"),originalId=id,prefix,plugin;if(index===-1){id=normalize(id,relId);if(id==="require"){return makeRequire(systemRequire,exports,module,relId)}else if(id==="exports"){return exports}else if(id==="module"){return module}else if(loaderCache.hasOwnProperty(id)){return loaderCache[id]}else if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}else{if(systemRequire){return systemRequire(originalId)}else{throw new Error("No module with ID: "+id)}}}else{prefix=id.substring(0,index);id=id.substring(index+1,id.length);plugin=stringRequire(systemRequire,exports,module,prefix,relId);if(plugin.normalize){id=plugin.normalize(id,makeNormalize(relId))}else{id=normalize(id,relId)}if(loaderCache[id]){return loaderCache[id]}else{plugin.load(id,makeRequire(systemRequire,exports,module,relId),makeLoad(id),{});return loaderCache[id]}}};function define(id,deps,factory){if(Array.isArray(id)){factory=deps;deps=id;id=undefined}else if(typeof id!=="string"){factory=id;id=deps=undefined}if(deps&&!Array.isArray(deps)){factory=deps;deps=undefined}if(!deps){deps=["require","exports","module"]}if(id){defineCache[id]=[id,deps,factory]}else{runFactory(id,deps,factory)}}define.require=function(id){if(loaderCache[id]){return loaderCache[id]}if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}};define.amd={};return define}module.exports=amdefine}).call(this,require("_process"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{_process:183,path:182}],452:[function(require,module,exports){"use strict";module.exports=function toFastProperties(obj){function f(){}f.prototype=obj;new f;return;eval(obj)}},{}],453:[function(require,module,exports){"use strict";module.exports=function(str){return str.replace(/[\s\uFEFF\xA0]+$/g,"")}},{}],454:[function(require,module,exports){module.exports={name:"babel-core",description:"Turn ES6 code into readable vanilla ES5 with source maps",version:"5.0.9",author:"Sebastian McKenzie ",homepage:"https://babeljs.io/",repository:"babel/babel",main:"lib/babel/api/node.js",browser:{"./lib/babel/api/register/node.js":"./lib/babel/api/register/browser.js"},keywords:["harmony","classes","modules","let","const","var","es6","transpile","transpiler","6to5","babel"],scripts:{bench:"make bench",test:"make test"},dependencies:{"ast-types":"~0.7.0",chalk:"^1.0.0","convert-source-map":"hipertracker/convert-source-map","core-js":"^0.8.1",debug:"^2.1.1","detect-indent":"^3.0.0",estraverse:"^1.9.1",esutils:"^1.1.6","fs-readdir-recursive":"^0.1.0",globals:"^6.2.0","is-integer":"^1.0.4","js-tokens":"1.0.0",leven:"^1.0.1","line-numbers":"0.2.0",lodash:"^3.2.0",minimatch:"^2.0.3","output-file-sync":"^1.1.0","path-is-absolute":"^1.0.0","private":"^0.1.6","regenerator-babel":"0.8.13-2",regexpu:"^1.1.2",repeating:"^1.1.2","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.4.0","source-map-support":"^0.2.9","to-fast-properties":"^1.0.0","trim-right":"^1.0.0"},devDependencies:{babel:"4.7.13",browserify:"^9.0.3",chai:"^2.0.0",eslint:"^0.15.1","babel-eslint":"^1.0.1",esvalid:"^1.1.0",istanbul:"^0.3.5",matcha:"^0.6.0",mocha:"^2.1.0",rimraf:"^2.2.8","uglify-js":"^2.4.16"}}},{}],455:[function(require,module,exports){module.exports={"abstract-expression-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-delete":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceDelete",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceSet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-comprehension-container":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-from":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-push":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"STATEMENT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"call-instance-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,type:"ThisExpression",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INITIALIZERS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"call-static-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CONSTRUCTOR",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INITIALIZERS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"CONSTRUCTOR",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},call:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"CONTEXT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"class-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"DECORATOR",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"class-super-constructor-call-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"class-super-constructor-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"corejs-is-iterator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CORE_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isIterable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"corejs-iterator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CORE_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getIterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"default-parameter":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"DEFAULT_VALUE",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"let",type:"VariableDeclaration",end:null}],type:"Program",end:null},"exports-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-default-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-from-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},value:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"INIT",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-module-declaration-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-module-declaration":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"exports", +type:"Identifier",end:null},{start:null,loc:null,range:null,value:"__esModule",raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"for-of-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARR",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"for-of-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:null,update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},operator:">=",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"for-of":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"Program",end:null},"helper-async-to-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"next",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"throw",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:null,type:"ReturnStatement",end:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:null,type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"then",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-bind":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Function",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-class-call-check":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},operator:"instanceof",right:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"BinaryExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot call a class as a function",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-create-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{ +start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-create-decorated-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,leadingComments:null,_paths:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"The decorator for method ",raw:null,type:"Literal",end:null},operator:"+",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,value:" is of the invalid type ",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-default-props":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-defaults":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyNames",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-define-property":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},operator:"==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-extends":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"assign",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:1,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null, +loc:null,range:null,name:"source",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-has-own":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-inherits":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"Super expression must either be null or a function, not ",raw:null,type:"Literal",end:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"create",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__proto__",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-interop-require-wildcard":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},value:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-interop-require":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},alternate:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-object-destructuring-empty":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot destructure undefined",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-object-without-properties":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"indexOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:">=",right:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-self-global":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"self",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-slice":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"slice",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-sliced-to-array-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false, +params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-sliced-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,leadingComments:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-tagged-template-literal-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-tagged-template-literal":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-temporal-assert-defined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"ReferenceError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},operator:"+",right:{start:null,loc:null,range:null,value:" is not defined - temporal dead zone",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-temporal-undefined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null,parenthesizedExpression:true},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-to-consumable-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-typeof":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,value:"symbol",raw:null,type:"Literal",end:null},alternate:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"let-scoping-return":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"v",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"ludicrous-in":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"RIGHT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"LEFT",type:"Identifier",end:null},computed:true,type:"MemberExpression", +end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"named-function":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"GET_OUTER_ID",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"property-method-assignment-wrapper-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:true,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,delegate:true,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"YieldExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"property-method-assignment-wrapper":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"prototype-identifier":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CLASS_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"require-assign-key":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null}],type:"Program",end:null},require:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},rest:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"ARRAY_LEN",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"START",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARRAY_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"self-contained-helpers-head":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"HELPER",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},system:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"System",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"register",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"MODULE_DEPENDENCIES",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"EXPORT_IDENTIFIER",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"setters",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"SETTERS",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"execute",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"EXECUTE",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"tail-call-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,body:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BLOCK",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"WhileStatement",end:null,_scopeInfo:null,_paths:null},label:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"LabeledStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null}],type:"Program",end:null},"test-exports":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"test-module":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"umd-commonjs-strict":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"root",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"BROWSER_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"UMD_ROOT",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FACTORY_PARAMETERS",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"FACTORY_BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"umd-runner-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"COMMON_TEST",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"mod",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"mod",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"BROWSER_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"GLOBAL_ARG",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"mod",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null}}},{}]},{},[19])(19)}); \ No newline at end of file diff --git a/external-helpers.js b/external-helpers.js index e69de29..3b76720 100644 --- a/external-helpers.js +++ b/external-helpers.js @@ -0,0 +1,327 @@ +(function (global) { + var babelHelpers = global.babelHelpers = {}; + + babelHelpers.inherits = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) subClass.__proto__ = superClass; + }; + + babelHelpers.defaults = function (obj, defaults) { + var keys = Object.getOwnPropertyNames(defaults); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = Object.getOwnPropertyDescriptor(defaults, key); + + if (value && value.configurable && obj[key] === undefined) { + Object.defineProperty(obj, key, value); + } + } + + return obj; + }; + + babelHelpers.createClass = (function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + })(); + + babelHelpers.createDecoratedClass = (function () { + function defineProperties(target, descriptors, initializers) { + for (var i = 0; i < descriptors.length; i++) { + var descriptor = descriptors[i]; + var decorators = descriptor.decorators; + var key = descriptor.key; + delete descriptor.key; + delete descriptor.decorators; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor || descriptor.initializer) descriptor.writable = true; + + if (decorators) { + for (var f = 0; f < decorators.length; f++) { + var decorator = decorators[f]; + + if (typeof decorator === "function") { + descriptor = decorator(target, key, descriptor) || descriptor; + } else { + throw new TypeError("The decorator for method " + descriptor.key + " is of the invalid type " + typeof decorator); + } + } + + if (initializers) initializers[key] = descriptor.initializer; + } + + Object.defineProperty(target, key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps, protoInitializers, staticInitializers) { + if (protoProps) defineProperties(Constructor.prototype, protoProps, protoInitializers); + if (staticProps) defineProperties(Constructor, staticProps, staticInitializers); + return Constructor; + }; + })(); + + babelHelpers.taggedTemplateLiteral = function (strings, raw) { + return Object.freeze(Object.defineProperties(strings, { + raw: { + value: Object.freeze(raw) + } + })); + }; + + babelHelpers.taggedTemplateLiteralLoose = function (strings, raw) { + strings.raw = raw; + return strings; + }; + + babelHelpers.interopRequire = function (obj) { + return obj && obj.__esModule ? obj["default"] : obj; + }; + + babelHelpers.toArray = function (arr) { + return Array.isArray(arr) ? arr : Array.from(arr); + }; + + babelHelpers.toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } else { + return Array.from(arr); + } + }; + + babelHelpers.slicedToArray = function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; + + babelHelpers.slicedToArrayLoose = function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + var _arr = []; + + for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { + _arr.push(_step.value); + + if (i && _arr.length === i) break; + } + + return _arr; + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; + + babelHelpers.objectWithoutProperties = function (obj, keys) { + var target = {}; + + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + + return target; + }; + + babelHelpers.hasOwn = Object.prototype.hasOwnProperty; + babelHelpers.slice = Array.prototype.slice; + babelHelpers.bind = Function.prototype.bind; + + babelHelpers.defineProperty = function (obj, key, value) { + return Object.defineProperty(obj, key, { + value: value, + enumerable: key == null || typeof Symbol == "undefined" || key.constructor !== Symbol, + configurable: true, + writable: true + }); + }; + + babelHelpers.asyncToGenerator = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new Promise(function (resolve, reject) { + var callNext = step.bind(null, "next"); + var callThrow = step.bind(null, "throw"); + + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(callNext, callThrow); + } + } + + callNext(); + }); + }; + }; + + babelHelpers.interopRequireWildcard = function (obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + }; + + babelHelpers._typeof = function (obj) { + return obj && obj.constructor === Symbol ? "symbol" : typeof obj; + }; + + babelHelpers._extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + babelHelpers.get = function get(object, property, receiver) { + var desc = Object.getOwnPropertyDescriptor(object, property); + + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } + }; + + babelHelpers.set = function set(object, property, value, receiver) { + var desc = Object.getOwnPropertyDescriptor(object, property); + + if (desc === undefined) { + var parent = Object.getPrototypeOf(object); + + if (parent !== null) { + set(parent, property, value, receiver); + } + } else if ("value" in desc && desc.writable) { + desc.value = value; + } else { + var setter = desc.set; + + if (setter !== undefined) { + setter.call(receiver, value); + } + } + + return value; + }; + + babelHelpers.classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + }; + + babelHelpers.objectDestructuringEmpty = function (obj) { + if (obj == null) throw new TypeError("Cannot destructure undefined"); + }; + + babelHelpers.temporalUndefined = {}; + + babelHelpers.temporalAssertDefined = function (val, name, undef) { + if (val === undef) { + throw new ReferenceError(name + " is not defined - temporal dead zone"); + } + + return true; + }; + + babelHelpers.selfGlobal = typeof global === "undefined" ? self : global; + + babelHelpers.defaultProps = function (defaultProps, props) { + if (defaultProps) { + for (var propName in defaultProps) { + if (typeof props[propName] === "undefined") { + props[propName] = defaultProps[propName]; + } + } + } + + return props; + }; +})(typeof global === "undefined" ? self : global); diff --git a/external-helpers.min.js b/external-helpers.min.js new file mode 100644 index 0000000..7dcfec4 --- /dev/null +++ b/external-helpers.min.js @@ -0,0 +1 @@ +(function(global){var babelHelpers=global.babelHelpers={};babelHelpers.inherits=function(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)subClass.__proto__=superClass};babelHelpers.defaults=function(obj,defaults){var keys=Object.getOwnPropertyNames(defaults);for(var i=0;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i]}return target};babelHelpers.hasOwn=Object.prototype.hasOwnProperty;babelHelpers.slice=Array.prototype.slice;babelHelpers.bind=Function.prototype.bind;babelHelpers.defineProperty=function(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:key==null||typeof Symbol=="undefined"||key.constructor!==Symbol,configurable:true,writable:true})};babelHelpers.asyncToGenerator=function(fn){return function(){var gen=fn.apply(this,arguments);return new Promise(function(resolve,reject){var callNext=step.bind(null,"next");var callThrow=step.bind(null,"throw");function step(key,arg){try{var info=gen[key](arg);var value=info.value}catch(error){reject(error);return}if(info.done){resolve(value)}else{Promise.resolve(value).then(callNext,callThrow)}}callNext()})}};babelHelpers.interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};babelHelpers._typeof=function(obj){return obj&&obj.constructor===Symbol?"symbol":typeof obj};babelHelpers._extends=Object.assign||function(target){for(var i=1;i Date: Mon, 8 Jun 2015 16:27:06 +0100 Subject: [PATCH 03/19] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e3472b3..2a0d6b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "requirejs-babel", - "version": "0.0.5", + "version": "0.0.6", "description": "An AMD loader plugin for Babel", "repository": { "type": "git", @@ -14,6 +14,6 @@ "author": "Michael ", "license": "MIT", "devDependencies": { - "requirejs": "^2.1.17" + "requirejs": "^2.1.18" } } From 89d57c1a40f6f7b20b0e0bb6385841b5e87ebfe2 Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Mon, 8 Jun 2015 16:35:57 +0100 Subject: [PATCH 04/19] upgraded to babel 5.5.5 --- babel.js | 99002 ++++++++++++++++++++++---------------- babel.min.js | 81 +- external-helpers.js | 104 +- external-helpers.min.js | 2 +- 4 files changed, 56739 insertions(+), 42450 deletions(-) diff --git a/babel.js b/babel.js index 01d80db..e9f0b57 100644 --- a/babel.js +++ b/babel.js @@ -1,1469 +1,863 @@ (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.babel = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o")) { - node.params.push(this.flow_parseTypeAnnotatableIdentifier()); - if (!this.isRelational(">")) { - this.expect(tt.comma); + node.id = this.parseIdent(); + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterInstantiation(); + } else { + node.typeParameters = null; } - } - this.expectRelational(">"); - return this.finishNode(node, "TypeParameterDeclaration"); -}; + return this.finishNode(node, "InterfaceExtends"); + }; -pp.flow_parseTypeParameterInstantiation = function () { - var node = this.startNode(), - oldInType = this.inType; - node.params = []; + pp.flow_parseInterface = function (node) { + this.flow_parseInterfaceish(node, false); + return this.finishNode(node, "InterfaceDeclaration"); + }; - this.inType = true; +// Type aliases - this.expectRelational("<"); - while (!this.isRelational(">")) { - node.params.push(this.flow_parseType()); - if (!this.isRelational(">")) { - this.expect(tt.comma); + pp.flow_parseTypeAlias = function (node) { + node.id = this.parseIdent(); + + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + } else { + node.typeParameters = null; } - } - this.expectRelational(">"); - this.inType = oldInType; + var oldInType = this.inType; + this.inType = true; - return this.finishNode(node, "TypeParameterInstantiation"); -}; + this.expect(tt.eq); -pp.flow_parseObjectPropertyKey = function () { - return this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); -}; + node.right = this.flow_parseType(); -pp.flow_parseObjectTypeIndexer = function (node, isStatic) { - node["static"] = isStatic; + this.inType = oldInType; - this.expect(tt.bracketL); - node.id = this.flow_parseObjectPropertyKey(); - this.expect(tt.colon); - node.key = this.flow_parseType(); - this.expect(tt.bracketR); - this.expect(tt.colon); - node.value = this.flow_parseType(); + this.semicolon(); - this.flow_objectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeIndexer"); -}; + return this.finishNode(node, "TypeAlias"); + }; -pp.flow_parseObjectTypeMethodish = function (node) { - node.params = []; - node.rest = null; - node.typeParameters = null; +// Type annotations - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - } + pp.flow_parseTypeParameterDeclaration = function () { + var node = this.startNode(); + node.params = []; - this.expect(tt.parenL); - while (this.type === tt.name) { - node.params.push(this.flow_parseFunctionTypeParam()); - if (this.type !== tt.parenR) { - this.expect(tt.comma); + this.expectRelational("<"); + while (!this.isRelational(">")) { + node.params.push(this.flow_parseTypeAnnotatableIdentifier()); + if (!this.isRelational(">")) { + this.expect(tt.comma); + } } - } + this.expectRelational(">"); - if (this.eat(tt.ellipsis)) { - node.rest = this.flow_parseFunctionTypeParam(); - } - this.expect(tt.parenR); - this.expect(tt.colon); - node.returnType = this.flow_parseType(); - - return this.finishNode(node, "FunctionTypeAnnotation"); -}; - -pp.flow_parseObjectTypeMethod = function (start, isStatic, key) { - var node = this.startNodeAt(start); - node.value = this.flow_parseObjectTypeMethodish(this.startNodeAt(start)); - node["static"] = isStatic; - node.key = key; - node.optional = false; - this.flow_objectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeProperty"); -}; - -pp.flow_parseObjectTypeCallProperty = function (node, isStatic) { - var valueNode = this.startNode(); - node["static"] = isStatic; - node.value = this.flow_parseObjectTypeMethodish(valueNode); - this.flow_objectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeCallProperty"); -}; - -pp.flow_parseObjectType = function (allowStatic) { - var nodeStart = this.startNode(); - var node; - var optional = false; - var property; - var propertyKey; - var propertyTypeAnnotation; - var token; - var isStatic; - - nodeStart.callProperties = []; - nodeStart.properties = []; - nodeStart.indexers = []; - - this.expect(tt.braceL); - - while (this.type !== tt.braceR) { - var start = this.markPosition(); - node = this.startNode(); - if (allowStatic && this.isContextual("static")) { - this.next(); - isStatic = true; - } + return this.finishNode(node, "TypeParameterDeclaration"); + }; - if (this.type === tt.bracketL) { - nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node, isStatic)); - } else if (this.type === tt.parenL || this.isRelational("<")) { - nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node, allowStatic)); - } else { - if (isStatic && this.type === tt.colon) { - propertyKey = this.parseIdent(); - } else { - propertyKey = this.flow_parseObjectPropertyKey(); - } - if (this.isRelational("<") || this.type === tt.parenL) { - // This is a method property - nodeStart.properties.push(this.flow_parseObjectTypeMethod(start, isStatic, propertyKey)); - } else { - if (this.eat(tt.question)) { - optional = true; - } - this.expect(tt.colon); - node.key = propertyKey; - node.value = this.flow_parseType(); - node.optional = optional; - node["static"] = isStatic; - this.flow_objectTypeSemicolon(); - nodeStart.properties.push(this.finishNode(node, "ObjectTypeProperty")); + pp.flow_parseTypeParameterInstantiation = function () { + var node = this.startNode(), + oldInType = this.inType; + node.params = []; + + this.inType = true; + + this.expectRelational("<"); + while (!this.isRelational(">")) { + node.params.push(this.flow_parseType()); + if (!this.isRelational(">")) { + this.expect(tt.comma); } } - } + this.expectRelational(">"); - this.expect(tt.braceR); + this.inType = oldInType; - return this.finishNode(nodeStart, "ObjectTypeAnnotation"); -}; + return this.finishNode(node, "TypeParameterInstantiation"); + }; -pp.flow_objectTypeSemicolon = function () { - if (!this.eat(tt.semi) && this.type !== tt.braceR) { - this.unexpected(); - } -}; - -pp.flow_parseGenericType = function (start, id) { - var node = this.startNodeAt(start); - - node.typeParameters = null; - node.id = id; - - while (this.eat(tt.dot)) { - var node2 = this.startNodeAt(start); - node2.qualification = node.id; - node2.id = this.parseIdent(); - node.id = this.finishNode(node2, "QualifiedTypeIdentifier"); - } - - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterInstantiation(); - } - - return this.finishNode(node, "GenericTypeAnnotation"); -}; - -pp.flow_parseVoidType = function () { - var node = this.startNode(); - this.expect(tt._void); - return this.finishNode(node, "VoidTypeAnnotation"); -}; - -pp.flow_parseTypeofType = function () { - var node = this.startNode(); - this.expect(tt._typeof); - node.argument = this.flow_parsePrimaryType(); - return this.finishNode(node, "TypeofTypeAnnotation"); -}; - -pp.flow_parseTupleType = function () { - var node = this.startNode(); - node.types = []; - this.expect(tt.bracketL); - // We allow trailing commas - while (this.pos < this.input.length && this.type !== tt.bracketR) { - node.types.push(this.flow_parseType()); - if (this.type === tt.bracketR) break; - this.expect(tt.comma); - } - this.expect(tt.bracketR); - return this.finishNode(node, "TupleTypeAnnotation"); -}; - -pp.flow_parseFunctionTypeParam = function () { - var optional = false; - var node = this.startNode(); - node.name = this.parseIdent(); - if (this.eat(tt.question)) { - optional = true; - } - this.expect(tt.colon); - node.optional = optional; - node.typeAnnotation = this.flow_parseType(); - return this.finishNode(node, "FunctionTypeParam"); -}; - -pp.flow_parseFunctionTypeParams = function () { - var ret = { params: [], rest: null }; - while (this.type === tt.name) { - ret.params.push(this.flow_parseFunctionTypeParam()); - if (this.type !== tt.parenR) { - this.expect(tt.comma); + pp.flow_parseObjectPropertyKey = function () { + return this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); + }; + + pp.flow_parseObjectTypeIndexer = function (node, isStatic) { + node["static"] = isStatic; + + this.expect(tt.bracketL); + node.id = this.flow_parseObjectPropertyKey(); + this.expect(tt.colon); + node.key = this.flow_parseType(); + this.expect(tt.bracketR); + this.expect(tt.colon); + node.value = this.flow_parseType(); + + this.flow_objectTypeSemicolon(); + return this.finishNode(node, "ObjectTypeIndexer"); + }; + + pp.flow_parseObjectTypeMethodish = function (node) { + node.params = []; + node.rest = null; + node.typeParameters = null; + + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); } - } - if (this.eat(tt.ellipsis)) { - ret.rest = this.flow_parseFunctionTypeParam(); - } - return ret; -}; -pp.flow_identToTypeAnnotation = function (start, node, id) { - switch (id.name) { - case "any": - return this.finishNode(node, "AnyTypeAnnotation"); + this.expect(tt.parenL); + while (this.type === tt.name) { + node.params.push(this.flow_parseFunctionTypeParam()); + if (this.type !== tt.parenR) { + this.expect(tt.comma); + } + } - case "bool": - case "boolean": - return this.finishNode(node, "BooleanTypeAnnotation"); + if (this.eat(tt.ellipsis)) { + node.rest = this.flow_parseFunctionTypeParam(); + } + this.expect(tt.parenR); + this.expect(tt.colon); + node.returnType = this.flow_parseType(); - case "number": - return this.finishNode(node, "NumberTypeAnnotation"); + return this.finishNode(node, "FunctionTypeAnnotation"); + }; - case "string": - return this.finishNode(node, "StringTypeAnnotation"); + pp.flow_parseObjectTypeMethod = function (start, isStatic, key) { + var node = this.startNodeAt(start); + node.value = this.flow_parseObjectTypeMethodish(this.startNodeAt(start)); + node["static"] = isStatic; + node.key = key; + node.optional = false; + this.flow_objectTypeSemicolon(); + return this.finishNode(node, "ObjectTypeProperty"); + }; - default: - return this.flow_parseGenericType(start, id); - } -}; + pp.flow_parseObjectTypeCallProperty = function (node, isStatic) { + var valueNode = this.startNode(); + node["static"] = isStatic; + node.value = this.flow_parseObjectTypeMethodish(valueNode); + this.flow_objectTypeSemicolon(); + return this.finishNode(node, "ObjectTypeCallProperty"); + }; -// The parsing of types roughly parallels the parsing of expressions, and -// primary types are kind of like primary expressions...they're the -// primitives with which other types are constructed. -pp.flow_parsePrimaryType = function () { - var typeIdentifier = null; - var params = null; - var returnType = null; - var start = this.markPosition(); - var node = this.startNode(); - var rest = null; - var tmp; - var typeParameters; - var token; - var type; - var isGroupedType = false; - - switch (this.type) { - case tt.name: - return this.flow_identToTypeAnnotation(start, node, this.parseIdent()); - - case tt.braceL: - return this.flow_parseObjectType(); - - case tt.bracketL: - return this.flow_parseTupleType(); - - case tt.relational: - if (this.value === "<") { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - this.expect(tt.parenL); - tmp = this.flow_parseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(tt.parenR); + pp.flow_parseObjectType = function (allowStatic) { + var nodeStart = this.startNode(); + var node; + var optional = false; + var property; + var propertyKey; + var propertyTypeAnnotation; + var token; + var isStatic; - this.expect(tt.arrow); + nodeStart.callProperties = []; + nodeStart.properties = []; + nodeStart.indexers = []; - node.returnType = this.flow_parseType(); + this.expect(tt.braceL); - return this.finishNode(node, "FunctionTypeAnnotation"); + while (this.type !== tt.braceR) { + var start = this.markPosition(); + node = this.startNode(); + if (allowStatic && this.isContextual("static")) { + this.next(); + isStatic = true; } - case tt.parenL: - this.next(); - - // Check to see if this is actually a grouped type - if (this.type !== tt.parenR && this.type !== tt.ellipsis) { - if (this.type === tt.name) { - var token = this.lookahead().type; - isGroupedType = token !== tt.question && token !== tt.colon; + if (this.type === tt.bracketL) { + nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node, isStatic)); + } else if (this.type === tt.parenL || this.isRelational("<")) { + nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node, allowStatic)); + } else { + if (isStatic && this.type === tt.colon) { + propertyKey = this.parseIdent(); } else { - isGroupedType = true; + propertyKey = this.flow_parseObjectPropertyKey(); } - } - - if (isGroupedType) { - type = this.flow_parseType(); - this.expect(tt.parenR); - - // If we see a => next then someone was probably confused about - // function types, so we can provide a better error message - if (this.eat(tt.arrow)) { - this.raise(node, "Unexpected token =>. It looks like " + "you are trying to write a function type, but you ended up " + "writing a grouped type followed by an =>, which is a syntax " + "error. Remember, function type parameters are named so function " + "types look like (name1: type1, name2: type2) => returnType. You " + "probably wrote (type1) => returnType"); + if (this.isRelational("<") || this.type === tt.parenL) { + // This is a method property + nodeStart.properties.push(this.flow_parseObjectTypeMethod(start, isStatic, propertyKey)); + } else { + if (this.eat(tt.question)) { + optional = true; + } + this.expect(tt.colon); + node.key = propertyKey; + node.value = this.flow_parseType(); + node.optional = optional; + node["static"] = isStatic; + this.flow_objectTypeSemicolon(); + nodeStart.properties.push(this.finishNode(node, "ObjectTypeProperty")); } - - return type; } + } - tmp = this.flow_parseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; + this.expect(tt.braceR); - this.expect(tt.parenR); + return this.finishNode(nodeStart, "ObjectTypeAnnotation"); + }; - this.expect(tt.arrow); + pp.flow_objectTypeSemicolon = function () { + if (!this.eat(tt.semi) && !this.eat(tt.comma) && this.type !== tt.braceR) { + this.unexpected(); + } + }; - node.returnType = this.flow_parseType(); - node.typeParameters = null; + pp.flow_parseGenericType = function (start, id) { + var node = this.startNodeAt(start); - return this.finishNode(node, "FunctionTypeAnnotation"); + node.typeParameters = null; + node.id = id; - case tt.string: - node.value = this.value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "StringLiteralTypeAnnotation"); + while (this.eat(tt.dot)) { + var node2 = this.startNodeAt(start); + node2.qualification = node.id; + node2.id = this.parseIdent(); + node.id = this.finishNode(node2, "QualifiedTypeIdentifier"); + } - default: - if (this.type.keyword) { - switch (this.type.keyword) { - case "void": - return this.flow_parseVoidType(); + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterInstantiation(); + } - case "typeof": - return this.flow_parseTypeofType(); - } - } - } + return this.finishNode(node, "GenericTypeAnnotation"); + }; + + pp.flow_parseVoidType = function () { + var node = this.startNode(); + this.expect(tt._void); + return this.finishNode(node, "VoidTypeAnnotation"); + }; - this.unexpected(); -}; + pp.flow_parseTypeofType = function () { + var node = this.startNode(); + this.expect(tt._typeof); + node.argument = this.flow_parsePrimaryType(); + return this.finishNode(node, "TypeofTypeAnnotation"); + }; -pp.flow_parsePostfixType = function () { - var node = this.startNode(); - var type = node.elementType = this.flow_parsePrimaryType(); - if (this.type === tt.bracketL) { + pp.flow_parseTupleType = function () { + var node = this.startNode(); + node.types = []; this.expect(tt.bracketL); + // We allow trailing commas + while (this.pos < this.input.length && this.type !== tt.bracketR) { + node.types.push(this.flow_parseType()); + if (this.type === tt.bracketR) break; + this.expect(tt.comma); + } this.expect(tt.bracketR); - return this.finishNode(node, "ArrayTypeAnnotation"); - } - return type; -}; + return this.finishNode(node, "TupleTypeAnnotation"); + }; -pp.flow_parsePrefixType = function () { - var node = this.startNode(); - if (this.eat(tt.question)) { - node.typeAnnotation = this.flow_parsePrefixType(); - return this.finishNode(node, "NullableTypeAnnotation"); - } - return this.flow_parsePostfixType(); -}; + pp.flow_parseFunctionTypeParam = function () { + var optional = false; + var node = this.startNode(); + node.name = this.parseIdent(); + if (this.eat(tt.question)) { + optional = true; + } + this.expect(tt.colon); + node.optional = optional; + node.typeAnnotation = this.flow_parseType(); + return this.finishNode(node, "FunctionTypeParam"); + }; -pp.flow_parseIntersectionType = function () { - var node = this.startNode(); - var type = this.flow_parsePrefixType(); - node.types = [type]; - while (this.eat(tt.bitwiseAND)) { - node.types.push(this.flow_parsePrefixType()); - } - return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); -}; + pp.flow_parseFunctionTypeParams = function () { + var ret = { params: [], rest: null }; + while (this.type === tt.name) { + ret.params.push(this.flow_parseFunctionTypeParam()); + if (this.type !== tt.parenR) { + this.expect(tt.comma); + } + } + if (this.eat(tt.ellipsis)) { + ret.rest = this.flow_parseFunctionTypeParam(); + } + return ret; + }; -pp.flow_parseUnionType = function () { - var node = this.startNode(); - var type = this.flow_parseIntersectionType(); - node.types = [type]; - while (this.eat(tt.bitwiseOR)) { - node.types.push(this.flow_parseIntersectionType()); - } - return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); -}; + pp.flow_identToTypeAnnotation = function (start, node, id) { + switch (id.name) { + case "any": + return this.finishNode(node, "AnyTypeAnnotation"); -pp.flow_parseType = function () { - var oldInType = this.inType; - this.inType = true; - var type = this.flow_parseUnionType(); - this.inType = oldInType; - return type; -}; + case "bool": + case "boolean": + return this.finishNode(node, "BooleanTypeAnnotation"); -pp.flow_parseTypeAnnotation = function () { - var node = this.startNode(); + case "mixed": + return this.finishNode(node, "MixedTypeAnnotation"); - var oldInType = this.inType; - this.inType = true; - this.expect(tt.colon); - node.typeAnnotation = this.flow_parseType(); - this.inType = oldInType; + case "number": + return this.finishNode(node, "NumberTypeAnnotation"); - return this.finishNode(node, "TypeAnnotation"); -}; + case "string": + return this.finishNode(node, "StringTypeAnnotation"); -pp.flow_parseTypeAnnotatableIdentifier = function (requireTypeAnnotation, canBeOptionalParam) { - var node = this.startNode(); - var ident = this.parseIdent(); - var isOptionalParam = false; + default: + return this.flow_parseGenericType(start, id); + } + }; - if (canBeOptionalParam && this.eat(tt.question)) { - this.expect(tt.question); - isOptionalParam = true; - } +// The parsing of types roughly parallels the parsing of expressions, and +// primary types are kind of like primary expressions...they're the +// primitives with which other types are constructed. + pp.flow_parsePrimaryType = function () { + var typeIdentifier = null; + var params = null; + var returnType = null; + var start = this.markPosition(); + var node = this.startNode(); + var rest = null; + var tmp; + var typeParameters; + var token; + var type; + var isGroupedType = false; - if (requireTypeAnnotation || this.type === tt.colon) { - ident.typeAnnotation = this.flow_parseTypeAnnotation(); - this.finishNode(ident, ident.type); - } + switch (this.type) { + case tt.name: + return this.flow_identToTypeAnnotation(start, node, this.parseIdent()); - if (isOptionalParam) { - ident.optional = true; - this.finishNode(ident, ident.type); - } + case tt.braceL: + return this.flow_parseObjectType(); - return ident; -}; + case tt.bracketL: + return this.flow_parseTupleType(); -acorn.plugins.flow = function (instance) { - // function name(): string {} - instance.extend("parseFunctionBody", function (inner) { - return function (node, allowExpression) { - if (this.type === tt.colon) { - node.returnType = this.flow_parseTypeAnnotation(); - } + case tt.relational: + if (this.value === "<") { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + this.expect(tt.parenL); + tmp = this.flow_parseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; + this.expect(tt.parenR); - return inner.call(this, node, allowExpression); - }; - }); + this.expect(tt.arrow); - instance.extend("parseStatement", function (inner) { - return function (declaration, topLevel) { - // strict mode handling of `interface` since it's a reserved word - if (this.strict && this.type === tt.name && this.value === "interface") { - var node = this.startNode(); + node.returnType = this.flow_parseType(); + + return this.finishNode(node, "FunctionTypeAnnotation"); + } + + case tt.parenL: this.next(); - return this.flow_parseInterface(node); - } else { - return inner.call(this, declaration, topLevel); - } - }; - }); - instance.extend("parseExpressionStatement", function (inner) { - return function (node, expr) { - if (expr.type === "Identifier") { - if (expr.name === "declare") { - if (this.type === tt._class || this.type === tt.name || this.type === tt._function || this.type === tt._var) { - return this.flow_parseDeclare(node); - } - } else if (this.type === tt.name) { - if (expr.name === "interface") { - return this.flow_parseInterface(node); - } else if (expr.name === "type") { - return this.flow_parseTypeAlias(node); + // Check to see if this is actually a grouped type + if (this.type !== tt.parenR && this.type !== tt.ellipsis) { + if (this.type === tt.name) { + var token = this.lookahead().type; + isGroupedType = token !== tt.question && token !== tt.colon; + } else { + isGroupedType = true; } } - } - return inner.call(this, node, expr); - }; - }); + if (isGroupedType) { + type = this.flow_parseType(); + this.expect(tt.parenR); - instance.extend("shouldParseExportDeclaration", function (inner) { - return function () { - return this.isContextual("type") || inner.call(this); - }; - }); + // If we see a => next then someone was probably confused about + // function types, so we can provide a better error message + if (this.eat(tt.arrow)) { + this.raise(node, "Unexpected token =>. It looks like " + "you are trying to write a function type, but you ended up " + "writing a grouped type followed by an =>, which is a syntax " + "error. Remember, function type parameters are named so function " + "types look like (name1: type1, name2: type2) => returnType. You " + "probably wrote (type1) => returnType"); + } - instance.extend("parseParenItem", function (inner) { - return function (node, start) { - if (this.type === tt.colon) { - var typeCastNode = this.startNodeAt(start); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.flow_parseTypeAnnotation(); - return this.finishNode(typeCastNode, "TypeCastExpression"); - } else { - return node; - } - }; - }); + return type; + } - instance.extend("parseClassId", function (inner) { - return function (node, isStatement) { - inner.call(this, node, isStatement); - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - } - }; - }); + tmp = this.flow_parseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; - instance.extend("readToken", function (inner) { - return function (code) { - if (this.inType && (code === 62 || code === 60)) { - return this.finishOp(tt.relational, 1); - } else { - return inner.call(this, code); - } - }; - }); + this.expect(tt.parenR); - instance.extend("jsx_readToken", function (inner) { - return function () { - if (!this.inType) return inner.call(this); - }; - }); + this.expect(tt.arrow); - instance.extend("parseParenArrowList", function (inner) { - return function (start, exprList, isAsync) { - for (var i = 0; i < exprList.length; i++) { - var listItem = exprList[i]; - if (listItem.type === "TypeCastExpression") { - var expr = listItem.expression; - expr.typeAnnotation = listItem.typeAnnotation; - exprList[i] = expr; - } - } - return inner.call(this, start, exprList, isAsync); - }; - }); - - instance.extend("parseClassProperty", function (inner) { - return function (node) { - if (this.type === tt.colon) { - node.typeAnnotation = this.flow_parseTypeAnnotation(); - } - return inner.call(this, node); - }; - }); - instance.extend("isClassProperty", function (inner) { - return function () { - return this.type === tt.colon || inner.call(this); - }; - }); + node.returnType = this.flow_parseType(); + node.typeParameters = null; - instance.extend("parseClassMethod", function (inner) { - return function (classBody, method, isGenerator, isAsync) { - var typeParameters; - if (this.isRelational("<")) { - typeParameters = this.flow_parseTypeParameterDeclaration(); - } - method.value = this.parseMethod(isGenerator, isAsync); - method.value.typeParameters = typeParameters; - classBody.body.push(this.finishNode(method, "MethodDefinition")); - }; - }); + return this.finishNode(node, "FunctionTypeAnnotation"); - instance.extend("parseClassSuper", function (inner) { - return function (node, isStatement) { - inner.call(this, node, isStatement); - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.flow_parseTypeParameterInstantiation(); - } - if (this.isContextual("implements")) { + case tt.string: + node.value = this.value; + node.raw = this.input.slice(this.start, this.end); this.next(); - var implemented = node["implements"] = []; - do { - var node = this.startNode(); - node.id = this.parseIdent(); - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - implemented.push(this.finishNode(node, "ClassImplements")); - } while (this.eat(tt.comma)); - } - }; - }); - - instance.extend("parseObjPropValue", function (inner) { - return function (prop) { - var typeParameters; - if (this.isRelational("<")) { - typeParameters = this.flow_parseTypeParameterDeclaration(); - if (this.type !== tt.parenL) this.unexpected(); - } - inner.apply(this, arguments); - prop.value.typeParameters = typeParameters; - }; - }); - - instance.extend("parseAssignableListItemTypes", function (inner) { - return function (param) { - if (this.eat(tt.question)) { - param.optional = true; - } - if (this.type === tt.colon) { - param.typeAnnotation = this.flow_parseTypeAnnotation(); - } - this.finishNode(param, param.type); - return param; - }; - }); - - instance.extend("parseImportSpecifiers", function (inner) { - return function (node) { - node.isType = false; - if (this.isContextual("type")) { - var start = this.markPosition(); - var typeId = this.parseIdent(); - if (this.type === tt.name && this.value !== "from" || this.type === tt.braceL || this.type === tt.star) { - node.isType = true; - } else { - node.specifiers.push(this.parseImportSpecifierDefault(typeId, start)); - if (this.isContextual("from")) return; - this.eat(tt.comma); - } - } - inner.call(this, node); - }; - }); - - // function foo() {} - instance.extend("parseFunctionParams", function (inner) { - return function (node) { - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - } - inner.call(this, node); - }; - }); - - // var foo: string = bar - instance.extend("parseVarHead", function (inner) { - return function (decl) { - inner.call(this, decl); - if (this.type === tt.colon) { - decl.id.typeAnnotation = this.flow_parseTypeAnnotation(); - this.finishNode(decl.id, decl.id.type); - } - }; - }); -}; -},{"..":5}],2:[function(require,module,exports){ -"use strict"; - -var acorn = require(".."); - -var tt = acorn.tokTypes; -var tc = acorn.tokContexts; - -tc.j_oTag = new acorn.TokContext("...", 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; + return this.finishNode(node, "StringLiteralTypeAnnotation"); -// 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); + default: + if (this.type.keyword) { + switch (this.type.keyword) { + case "void": + return this.flow_parseVoidType(); - switch (ch) { - case 60: // '<' - case 123: - // '{' - if (this.pos === this.start) { - if (ch === 60 && this.exprAllowed) { - ++this.pos; - return this.finishToken(tt.jsxTagStart); + case "typeof": + return this.flow_parseTypeofType(); } - 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; + this.unexpected(); + }; - default: - if (acorn.isNewLine(ch)) { - out += this.input.slice(chunkStart, this.pos); - ++this.pos; - if (ch === 13 && this.input.charCodeAt(this.pos) === 10) { - ++this.pos; - out += "\n"; - } else { - out += String.fromCharCode(ch); - } - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - chunkStart = this.pos; - } else { - ++this.pos; - } + pp.flow_parsePostfixType = function () { + var node = this.startNode(); + var type = node.elementType = this.flow_parsePrimaryType(); + if (this.type === tt.bracketL) { + this.expect(tt.bracketL); + this.expect(tt.bracketR); + return this.finishNode(node, "ArrayTypeAnnotation"); } - } -}; + return type; + }; -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 { - ++this.pos; + pp.flow_parsePrefixType = function () { + var node = this.startNode(); + if (this.eat(tt.question)) { + node.typeAnnotation = this.flow_parsePrefixType(); + return this.finishNode(node, "NullableTypeAnnotation"); } - } - out += this.input.slice(chunkStart, this.pos++); - return this.finishToken(tt.string, out); -}; - -var XHTMLEntities = { - quot: "\"", - amp: "&", - apos: "'", - lt: "<", - gt: ">", - nbsp: " ", - iexcl: "¡", - cent: "¢", - pound: "£", - curren: "¤", - yen: "¥", - brvbar: "¦", - sect: "§", - uml: "¨", - copy: "©", - ordf: "ª", - laquo: "«", - not: "¬", - shy: "­", - reg: "®", - macr: "¯", - deg: "°", - plusmn: "±", - sup2: "²", - sup3: "³", - acute: "´", - micro: "µ", - para: "¶", - middot: "·", - cedil: "¸", - sup1: "¹", - ordm: "º", - raquo: "»", - frac14: "¼", - frac12: "½", - frac34: "¾", - iquest: "¿", - Agrave: "À", - Aacute: "Á", - Acirc: "Â", - Atilde: "Ã", - Auml: "Ä", - Aring: "Å", - AElig: "Æ", - Ccedil: "Ç", - Egrave: "È", - Eacute: "É", - Ecirc: "Ê", - Euml: "Ë", - Igrave: "Ì", - Iacute: "Í", - Icirc: "Î", - Iuml: "Ï", - ETH: "Ð", - Ntilde: "Ñ", - Ograve: "Ò", - Oacute: "Ó", - Ocirc: "Ô", - Otilde: "Õ", - Ouml: "Ö", - times: "×", - Oslash: "Ø", - Ugrave: "Ù", - Uacute: "Ú", - Ucirc: "Û", - Uuml: "Ü", - Yacute: "Ý", - THORN: "Þ", - szlig: "ß", - agrave: "à", - aacute: "á", - acirc: "â", - atilde: "ã", - auml: "ä", - aring: "å", - aelig: "æ", - ccedil: "ç", - egrave: "è", - eacute: "é", - ecirc: "ê", - euml: "ë", - igrave: "ì", - iacute: "í", - icirc: "î", - iuml: "ï", - eth: "ð", - ntilde: "ñ", - ograve: "ò", - oacute: "ó", - ocirc: "ô", - otilde: "õ", - ouml: "ö", - divide: "÷", - oslash: "ø", - ugrave: "ù", - uacute: "ú", - ucirc: "û", - uuml: "ü", - yacute: "ý", - thorn: "þ", - yuml: "ÿ", - OElig: "Œ", - oelig: "œ", - Scaron: "Š", - scaron: "š", - Yuml: "Ÿ", - fnof: "ƒ", - circ: "ˆ", - tilde: "˜", - Alpha: "Α", - Beta: "Β", - Gamma: "Γ", - Delta: "Δ", - Epsilon: "Ε", - Zeta: "Ζ", - Eta: "Η", - Theta: "Θ", - Iota: "Ι", - Kappa: "Κ", - Lambda: "Λ", - Mu: "Μ", - Nu: "Ν", - Xi: "Ξ", - Omicron: "Ο", - Pi: "Π", - Rho: "Ρ", - Sigma: "Σ", - Tau: "Τ", - Upsilon: "Υ", - Phi: "Φ", - Chi: "Χ", - Psi: "Ψ", - Omega: "Ω", - alpha: "α", - beta: "β", - gamma: "γ", - delta: "δ", - epsilon: "ε", - zeta: "ζ", - eta: "η", - theta: "θ", - iota: "ι", - kappa: "κ", - lambda: "λ", - mu: "μ", - nu: "ν", - xi: "ξ", - omicron: "ο", - pi: "π", - rho: "ρ", - sigmaf: "ς", - sigma: "σ", - tau: "τ", - upsilon: "υ", - phi: "φ", - chi: "χ", - psi: "ψ", - omega: "ω", - thetasym: "ϑ", - upsih: "ϒ", - piv: "ϖ", - ensp: " ", - emsp: " ", - thinsp: " ", - zwnj: "‌", - zwj: "‍", - lrm: "‎", - rlm: "‏", - ndash: "–", - mdash: "—", - lsquo: "‘", - rsquo: "’", - sbquo: "‚", - ldquo: "“", - rdquo: "”", - bdquo: "„", - dagger: "†", - Dagger: "‡", - bull: "•", - hellip: "…", - permil: "‰", - prime: "′", - Prime: "″", - lsaquo: "‹", - rsaquo: "›", - oline: "‾", - frasl: "⁄", - euro: "€", - image: "ℑ", - weierp: "℘", - real: "ℜ", - trade: "™", - alefsym: "ℵ", - larr: "←", - uarr: "↑", - rarr: "→", - darr: "↓", - harr: "↔", - crarr: "↵", - lArr: "⇐", - uArr: "⇑", - rArr: "⇒", - dArr: "⇓", - hArr: "⇔", - forall: "∀", - part: "∂", - exist: "∃", - empty: "∅", - nabla: "∇", - isin: "∈", - notin: "∉", - ni: "∋", - prod: "∏", - sum: "∑", - minus: "−", - lowast: "∗", - radic: "√", - prop: "∝", - infin: "∞", - ang: "∠", - and: "∧", - or: "∨", - cap: "∩", - cup: "∪", - int: "∫", - there4: "∴", - sim: "∼", - cong: "≅", - asymp: "≈", - ne: "≠", - equiv: "≡", - le: "≤", - ge: "≥", - sub: "⊂", - sup: "⊃", - nsub: "⊄", - sube: "⊆", - supe: "⊇", - oplus: "⊕", - otimes: "⊗", - perp: "⊥", - sdot: "⋅", - lceil: "⌈", - rceil: "⌉", - lfloor: "⌊", - rfloor: "⌋", - lang: "〈", - rang: "〉", - loz: "◊", - spades: "♠", - clubs: "♣", - hearts: "♥", - diams: "♦" -}; - -var hexNumber = /^[\da-fA-F]+$/; -var decimalNumber = /^\d+$/; - -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; + return this.flow_parsePostfixType(); + }; + + pp.flow_parseIntersectionType = function () { + var node = this.startNode(); + var type = this.flow_parsePrefixType(); + node.types = [type]; + while (this.eat(tt.bitwiseAND)) { + node.types.push(this.flow_parsePrefixType()); } - str += ch; - } - if (!entity) { - this.pos = startPos; - return "&"; - } - return entity; -}; + return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); + }; -// 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 start = this.markPosition(); - var name = this.jsx_parseIdentifier(); - if (!this.eat(tt.colon)) return name; - var node = this.startNodeAt(start); - 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 start = this.markPosition(); - var node = this.jsx_parseNamespacedName(); - while (this.eat(tt.dot)) { - var newNode = this.startNodeAt(start); - 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; + pp.flow_parseUnionType = function () { + var node = this.startNode(); + var type = this.flow_parseIntersectionType(); + node.types = [type]; + while (this.eat(tt.bitwiseOR)) { + node.types.push(this.flow_parseIntersectionType()); + } + return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); + }; + + pp.flow_parseType = function () { + var oldInType = this.inType; + this.inType = true; + var type = this.flow_parseUnionType(); + this.inType = oldInType; + return type; + }; - case tt.jsxTagStart: - case tt.string: - return this.parseExprAtom(); + pp.flow_parseTypeAnnotation = function () { + var node = this.startNode(); - default: - this.raise(this.start, "JSX value should be either an expression or a quoted JSX text"); - } -}; + var oldInType = this.inType; + this.inType = true; + this.expect(tt.colon); + node.typeAnnotation = this.flow_parseType(); + this.inType = oldInType; -// 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). + return this.finishNode(node, "TypeAnnotation"); + }; + + pp.flow_parseTypeAnnotatableIdentifier = function (requireTypeAnnotation, canBeOptionalParam) { + var node = this.startNode(); + var ident = this.parseIdent(); + var isOptionalParam = false; -pp.jsx_parseEmptyExpression = function () { - var tmp = this.start; - this.start = this.lastTokEnd; - this.lastTokEnd = tmp; + if (canBeOptionalParam && this.eat(tt.question)) { + this.expect(tt.question); + isOptionalParam = true; + } - tmp = this.startLoc; - this.startLoc = this.lastTokEndLoc; - this.lastTokEndLoc = tmp; + if (requireTypeAnnotation || this.type === tt.colon) { + ident.typeAnnotation = this.flow_parseTypeAnnotation(); + this.finishNode(ident, ident.type); + } - return this.finishNode(this.startNode(), "JSXEmptyExpression"); -}; + if (isOptionalParam) { + ident.optional = true; + this.finishNode(ident, ident.type); + } -// Parses JSX expression enclosed into curly brackets. + return ident; + }; -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"); -}; + acorn.plugins.flow = function (instance) { + // function name(): string {} + instance.extend("parseFunctionBody", function (inner) { + return function (node, allowExpression) { + if (this.type === tt.colon) { + node.returnType = this.flow_parseTypeAnnotation(); + } -// Parses following JSX attribute name-value pair. + return inner.call(this, node, allowExpression); + }; + }); -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 (start) { - var node = this.startNodeAt(start); - 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 '"); - } + instance.extend("parseParenItem", function (inner) { + return function (node, start) { + if (this.type === tt.colon) { + var typeCastNode = this.startNodeAt(start); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.flow_parseTypeAnnotation(); + return this.finishNode(typeCastNode, "TypeCastExpression"); + } else { + return node; + } + }; + }); - node.openingElement = openingElement; - node.closingElement = closingElement; - node.children = children; - return this.finishNode(node, "JSXElement"); -}; + instance.extend("parseClassId", function (inner) { + return function (node, isStatement) { + inner.call(this, node, isStatement); + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + } + }; + }); -// Parses entire JSX element from current position. + instance.extend("readToken", function (inner) { + return function (code) { + if (this.inType && (code === 62 || code === 60)) { + return this.finishOp(tt.relational, 1); + } else { + return inner.call(this, code); + } + }; + }); -pp.jsx_parseElement = function () { - var start = this.markPosition(); - this.next(); - return this.jsx_parseElementAt(start); -}; + instance.extend("jsx_readToken", function (inner) { + return function () { + if (!this.inType) return inner.call(this); + }; + }); -acorn.plugins.jsx = function (instance) { - 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("parseParenArrowList", function (inner) { + return function (start, exprList, isAsync) { + for (var i = 0; i < exprList.length; i++) { + var listItem = exprList[i]; + if (listItem.type === "TypeCastExpression") { + var expr = listItem.expression; + expr.typeAnnotation = listItem.typeAnnotation; + exprList[i] = expr; + } + } + return inner.call(this, start, exprList, isAsync); + }; + }); - instance.extend("readToken", function (inner) { - return function (code) { - var context = this.curContext(); + instance.extend("parseClassProperty", function (inner) { + return function (node) { + if (this.type === tt.colon) { + node.typeAnnotation = this.flow_parseTypeAnnotation(); + } + return inner.call(this, node); + }; + }); + instance.extend("isClassProperty", function (inner) { + return function () { + return this.type === tt.colon || inner.call(this); + }; + }); - if (context === tc.j_expr) return this.jsx_readToken(); + instance.extend("parseClassMethod", function (inner) { + return function (classBody, method, isGenerator, isAsync) { + var typeParameters; + if (this.isRelational("<")) { + typeParameters = this.flow_parseTypeParameterDeclaration(); + } + method.value = this.parseMethod(isGenerator, isAsync); + method.value.typeParameters = typeParameters; + classBody.body.push(this.finishNode(method, "MethodDefinition")); + }; + }); - if (context === tc.j_oTag || context === tc.j_cTag) { - if (acorn.isIdentifierStart(code)) return this.jsx_readWord(); + instance.extend("parseClassSuper", function (inner) { + return function (node, isStatement) { + inner.call(this, node, isStatement); + if (node.superClass && this.isRelational("<")) { + node.superTypeParameters = this.flow_parseTypeParameterInstantiation(); + } + if (this.isContextual("implements")) { + this.next(); + var implemented = node["implements"] = []; + do { + var node = this.startNode(); + node.id = this.parseIdent(); + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + implemented.push(this.finishNode(node, "ClassImplements")); + } while (this.eat(tt.comma)); + } + }; + }); - if (code == 62) { - ++this.pos; - return this.finishToken(tt.jsxTagEnd); + instance.extend("parseObjPropValue", function (inner) { + return function (prop) { + var typeParameters; + if (this.isRelational("<")) { + typeParameters = this.flow_parseTypeParameterDeclaration(); + if (this.type !== tt.parenL) this.unexpected(); } + inner.apply(this, arguments); + prop.value.typeParameters = typeParameters; + }; + }); - if ((code === 34 || code === 39) && context == tc.j_oTag) return this.jsx_readString(code); - } + instance.extend("parseAssignableListItemTypes", function (inner) { + return function (param) { + if (this.eat(tt.question)) { + param.optional = true; + } + if (this.type === tt.colon) { + param.typeAnnotation = this.flow_parseTypeAnnotation(); + } + this.finishNode(param, param.type); + return param; + }; + }); - if (code === 60 && this.exprAllowed) { - ++this.pos; - return this.finishToken(tt.jsxTagStart); - } - return inner.call(this, code); - }; - }); + instance.extend("parseImportSpecifiers", function (inner) { + return function (node) { + node.isType = false; + if (this.isContextual("type")) { + var start = this.markPosition(); + var typeId = this.parseIdent(); + if (this.type === tt.name && this.value !== "from" || this.type === tt.braceL || this.type === tt.star) { + node.isType = true; + } else { + node.specifiers.push(this.parseImportSpecifierDefault(typeId, start)); + if (this.isContextual("from")) return; + this.eat(tt.comma); + } + } + inner.call(this, node); + }; + }); - 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); - } - }; - }); -}; -},{"..":5}],3:[function(require,module,exports){ + // function foo() {} + instance.extend("parseFunctionParams", function (inner) { + return function (node) { + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + } + inner.call(this, node); + }; + }); + + // var foo: string = bar + instance.extend("parseVarHead", function (inner) { + return function (decl) { + inner.call(this, decl); + if (this.type === tt.colon) { + decl.id.typeAnnotation = this.flow_parseTypeAnnotation(); + this.finishNode(decl.id, decl.id.type); + } + }; + }); + }; +},{"../src/index":5}],3:[function(require,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 @@ -1482,50 +876,50 @@ acorn.plugins.jsx = function (instance) { // // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser -"use strict"; + "use strict"; -var tt = require("./tokentype").types; + var _tokentype = require("./tokentype"); -var Parser = require("./state").Parser; + var _state = require("./state"); -var reservedWords = require("./identifier").reservedWords; + var _identifier = require("./identifier"); -var has = require("./util").has; + var _util = require("./util"); -var pp = Parser.prototype; + 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) return; - var key = prop.key, - name = undefined; - switch (key.type) { - case "Identifier": - name = key.name;break; - case "Literal": - name = String(key.value);break; - default: - return; - } - var kind = prop.kind || "init", - other = undefined; - if (has(propHash, name)) { - other = propHash[name]; - var isGetSet = kind !== "init"; - if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property"); - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; + pp.checkPropClash = function (prop, propHash) { + if (this.options.ecmaVersion >= 6) return; + var key = prop.key, + name = undefined; + switch (key.type) { + case "Identifier": + name = key.name;break; + case "Literal": + name = String(key.value);break; + default: + return; + } + var kind = prop.kind || "init", + other = undefined; + if ((0, _util.has)(propHash, name)) { + other = propHash[name]; + var isGetSet = kind !== "init"; + if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property"); + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; + }; // ### Expression parsing @@ -1542,81 +936,86 @@ pp.checkPropClash = function (prop, propHash) { // and object pattern might appear (so it's possible to raise // delayed syntax error at correct position). -pp.parseExpression = function (noIn, refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - if (this.type === tt.comma) { - var node = this.startNodeAt(start); - node.expressions = [expr]; - while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - return this.finishNode(node, "SequenceExpression"); - } - return expr; -}; + pp.parseExpression = function (noIn, refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); + if (this.type === _tokentype.types.comma) { + var node = this.startNodeAt(start); + node.expressions = [expr]; + while (this.eat(_tokentype.types.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); + return this.finishNode(node, "SequenceExpression"); + } + return expr; + }; // Parse an assignment expression. This includes applications of // operators like `+=`. -pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { - if (this.type == tt._yield && this.inGenerator) return this.parseYield(); + pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { + if (this.type == _tokentype.types._yield && this.inGenerator) return this.parseYield(); - var failOnShorthandAssign = undefined; - if (!refShorthandDefaultPos) { - refShorthandDefaultPos = { start: 0 }; - failOnShorthandAssign = true; - } else { - failOnShorthandAssign = false; - } - var start = this.markPosition(); - var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); - if (afterLeftParse) left = afterLeftParse.call(this, left, start); - if (this.type.isAssign) { - var node = this.startNodeAt(start); - node.operator = this.value; - node.left = this.type === tt.eq ? this.toAssignable(left) : left; - refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly - this.checkLVal(left); - if (left.parenthesizedExpression) { - if (left.type === "ObjectPattern") { - this.raise(left.start, "You're trying to assign to a parenthesized expression, instead of `({ foo }) = {}` use `({ foo } = {})`"); - } else { - this.raise(left.start, "Parenthesized left hand expressions are illegal"); + var failOnShorthandAssign = undefined; + if (!refShorthandDefaultPos) { + refShorthandDefaultPos = { start: 0 }; + failOnShorthandAssign = true; + } else { + failOnShorthandAssign = false; + } + var start = this.markPosition(); + if (this.type == _tokentype.types.parenL || this.type == _tokentype.types.name) this.potentialArrowAt = this.start; + var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); + if (afterLeftParse) left = afterLeftParse.call(this, left, start); + if (this.type.isAssign) { + var node = this.startNodeAt(start); + node.operator = this.value; + node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left; + refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly + this.checkLVal(left); + if (left.parenthesizedExpression) { + var errorMsg = undefined; + if (left.type === "ObjectPattern") { + errorMsg = "`({a}) = 0` use `({a} = 0)`"; + } else if (left.type === "ArrayPattern") { + errorMsg = "`([a]) = 0` use `([a] = 0)`"; + } + if (errorMsg) { + this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg); + } } + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression"); + } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); } - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - return left; -}; + return left; + }; // Parse a ternary conditional (`?:`) operator. -pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseExprOps(noIn, refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - if (this.eat(tt.question)) { - var node = this.startNodeAt(start); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(tt.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression"); - } - return expr; -}; + pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseExprOps(noIn, refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + if (this.eat(_tokentype.types.question)) { + var node = this.startNodeAt(start); + 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, refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseMaybeUnary(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseExprOp(expr, start, -1, noIn); -}; + pp.parseExprOps = function (noIn, refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseMaybeUnary(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + return this.parseExprOp(expr, start, -1, noIn); + }; // Parse binary operators with the operator precedence parsing // algorithm. `left` is the left-hand side of the operator. @@ -1624,524 +1023,558 @@ pp.parseExprOps = function (noIn, refShorthandDefaultPos) { // 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, leftStart, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== tt._in)) { - if (prec > minPrec) { - var node = this.startNodeAt(leftStart); - node.left = left; - node.operator = this.value; - var op = this.type; - this.next(); - var start = this.markPosition(); - node.right = this.parseExprOp(this.parseMaybeUnary(), start, op.rightAssociative ? prec - 1 : prec, noIn); - this.finishNode(node, op === tt.logicalOR || op === tt.logicalAND ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(node, leftStart, minPrec, noIn); + pp.parseExprOp = function (left, leftStart, minPrec, noIn) { + var prec = this.type.binop; + if (prec != null && (!noIn || this.type !== _tokentype.types._in)) { + if (prec > minPrec) { + var node = this.startNodeAt(leftStart); + node.left = left; + node.operator = this.value; + var op = this.type; + this.next(); + var _start = this.markPosition(); + node.right = this.parseExprOp(this.parseMaybeUnary(), _start, op.rightAssociative ? prec - 1 : prec, noIn); + this.finishNode(node, op === _tokentype.types.logicalOR || op === _tokentype.types.logicalAND ? "LogicalExpression" : "BinaryExpression"); + return this.parseExprOp(node, leftStart, minPrec, noIn); + } } - } - return left; -}; + return left; + }; // Parse unary operators, both prefix and postfix. -pp.parseMaybeUnary = function (refShorthandDefaultPos) { - if (this.type.prefix) { - var node = this.startNode(), - update = this.type === tt.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); - return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } - var start = this.markPosition(); - var expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - while (this.type.postfix && !this.canInsertSemicolon()) { - var node = this.startNodeAt(start); - node.operator = this.value; - node.prefix = false; - node.argument = expr; - this.checkLVal(expr); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); - } - return expr; -}; + pp.parseMaybeUnary = function (refShorthandDefaultPos) { + 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(); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); + if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); + return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } + var start = this.markPosition(); + var expr = this.parseExprSubscripts(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + while (this.type.postfix && !this.canInsertSemicolon()) { + var node = this.startNodeAt(start); + node.operator = this.value; + node.prefix = false; + node.argument = expr; + this.checkLVal(expr); + this.next(); + expr = this.finishNode(node, "UpdateExpression"); + } + return expr; + }; // Parse call, dot, and `[]`-subscript expressions. -pp.parseExprSubscripts = function (refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseExprAtom(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseSubscripts(expr, start); -}; - -pp.parseSubscripts = function (base, start, noCalls) { - if (this.eat(tt.dot)) { - var node = this.startNodeAt(start); - node.object = base; - node.property = this.parseIdent(true); - node.computed = false; - return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); - } else if (this.eat(tt.bracketL)) { - var node = this.startNodeAt(start); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.expect(tt.bracketR); - return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); - } else if (!noCalls && this.eat(tt.parenL)) { - var node = this.startNodeAt(start); - node.callee = base; - node.arguments = this.parseExprList(tt.parenR, false); - return this.parseSubscripts(this.finishNode(node, "CallExpression"), start, noCalls); - } else if (this.type === tt.backQuote) { - var node = this.startNodeAt(start); - node.tag = base; - node.quasi = this.parseTemplate(); - return this.parseSubscripts(this.finishNode(node, "TaggedTemplateExpression"), start, noCalls); - }return base; -}; + pp.parseExprSubscripts = function (refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseExprAtom(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + return this.parseSubscripts(expr, start); + }; + + pp.parseSubscripts = function (base, start, noCalls) { + if (!noCalls && this.eat(_tokentype.types.doubleColon)) { + var node = this.startNodeAt(start); + node.object = base; + node.callee = this.parseNoCallExpr(); + return this.parseSubscripts(this.finishNode(node, "BindExpression"), start, noCalls); + } else if (this.eat(_tokentype.types.dot)) { + var node = this.startNodeAt(start); + node.object = base; + node.property = this.parseIdent(true); + node.computed = false; + return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); + } else if (this.eat(_tokentype.types.bracketL)) { + var node = this.startNodeAt(start); + node.object = base; + node.property = this.parseExpression(); + node.computed = true; + this.expect(_tokentype.types.bracketR); + return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); + } else if (!noCalls && this.eat(_tokentype.types.parenL)) { + var node = this.startNodeAt(start); + node.callee = base; + node.arguments = this.parseExprList(_tokentype.types.parenR, this.options.features["es7.trailingFunctionCommas"]); + return this.parseSubscripts(this.finishNode(node, "CallExpression"), start, noCalls); + } else if (this.type === _tokentype.types.backQuote) { + var node = this.startNodeAt(start); + node.tag = base; + node.quasi = this.parseTemplate(); + return this.parseSubscripts(this.finishNode(node, "TaggedTemplateExpression"), start, noCalls); + }return base; + }; + +// Parse a no-call expression (like argument of `new` or `::` operators). + + pp.parseNoCallExpr = function () { + var start = this.markPosition(); + return this.parseSubscripts(this.parseExprAtom(), start, true); + }; // Parse an atomic expression — either a single token that is an // expression, an expression started by a keyword like `function` or // `new`, or an expression wrapped in punctuation like `()`, `[]`, // or `{}`. -pp.parseExprAtom = function (refShorthandDefaultPos) { - var node = undefined; - switch (this.type) { - case tt._this: - case tt._super: - var type = this.type === tt._this ? "ThisExpression" : "Super"; - node = this.startNode(); - this.next(); - return this.finishNode(node, type); - - case tt._yield: - if (this.inGenerator) this.unexpected(); - - case tt._do: - if (this.options.features["es7.doExpressions"]) { - var _node = this.startNode(); + pp.parseExprAtom = function (refShorthandDefaultPos) { + var node = undefined, + canBeArrow = this.potentialArrowAt == this.start; + switch (this.type) { + case _tokentype.types._this: + case _tokentype.types._super: + var type = this.type === _tokentype.types._this ? "ThisExpression" : "Super"; + node = this.startNode(); this.next(); - _node.body = this.parseBlock(); - return this.finishNode(_node, "DoExpression"); - } + return this.finishNode(node, type); - case tt.name: - var start = this.markPosition(); - node = this.startNode(); - var id = this.parseIdent(this.type !== tt.name); + case _tokentype.types._yield: + if (this.inGenerator) this.unexpected(); - // - if (this.options.features["es7.asyncFunctions"]) { - // async functions! - if (id.name === "async") { - // arrow functions - if (this.type === tt.parenL) { - var expr = this.parseParenAndDistinguishExpression(start, true); - if (expr && expr.type === "ArrowFunctionExpression") { - return expr; - } else { - node.callee = id; - if (!expr) { - node.arguments = []; - } else if (expr.type === "SequenceExpression") { - node.arguments = expr.expressions; + case _tokentype.types._do: + if (this.options.features["es7.doExpressions"]) { + var _node = this.startNode(); + this.next(); + var oldInFunction = this.inFunction; + var oldLabels = this.labels; + this.labels = []; + this.inFunction = false; + _node.body = this.parseBlock(); + this.inFunction = oldInFunction; + this.labels = oldLabels; + return this.finishNode(_node, "DoExpression"); + } + + case _tokentype.types.name: + var start = this.markPosition(); + node = this.startNode(); + var id = this.parseIdent(this.type !== _tokentype.types.name); + + // + if (this.options.features["es7.asyncFunctions"]) { + // async functions! + if (id.name === "async") { + // arrow functions + if (this.type === _tokentype.types.parenL) { + var expr = this.parseParenAndDistinguishExpression(start, true, true); + if (expr && expr.type === "ArrowFunctionExpression") { + return expr; } else { - node.arguments = [expr]; + node.callee = id; + if (!expr) { + node.arguments = []; + } else if (expr.type === "SequenceExpression") { + node.arguments = expr.expressions; + } else { + node.arguments = [expr]; + } + return this.parseSubscripts(this.finishNode(node, "CallExpression"), start); } - return this.parseSubscripts(this.finishNode(node, "CallExpression"), start); + } else if (this.type === _tokentype.types.name) { + id = this.parseIdent(); + this.expect(_tokentype.types.arrow); + return this.parseArrowExpression(node, [id], true); } - } else if (this.type === tt.name) { - id = this.parseIdent(); - this.expect(tt.arrow); - return this.parseArrowExpression(node, [id], true); - } - // normal functions - if (this.type === tt._function && !this.canInsertSemicolon()) { - this.next(); - return this.parseFunction(node, false, false, true); + // normal functions + if (this.type === _tokentype.types._function && !this.canInsertSemicolon()) { + this.next(); + return this.parseFunction(node, false, false, true); + } + } else if (id.name === "await") { + if (this.inAsync) return this.parseAwait(node); } - } else if (id.name === "await") { - if (this.inAsync) return this.parseAwait(node); } - } - // + // - if (!this.canInsertSemicolon() && this.eat(tt.arrow)) { - return this.parseArrowExpression(this.startNodeAt(start), [id]); - } - return id; + if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) return this.parseArrowExpression(this.startNodeAt(start), [id]); + return id; - case tt.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = { pattern: value.pattern, flags: value.flags }; - return node; + case _tokentype.types.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = { pattern: value.pattern, flags: value.flags }; + return node; - case tt.num:case tt.string: + case _tokentype.types.num:case _tokentype.types.string: return this.parseLiteral(this.value); - case tt._null:case tt._true:case tt._false: + case _tokentype.types._null:case _tokentype.types._true:case _tokentype.types._false: node = this.startNode(); - node.value = this.type === tt._null ? null : this.type === tt._true; + 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 tt.parenL: - return this.parseParenAndDistinguishExpression(); + case _tokentype.types.parenL: + return this.parseParenAndDistinguishExpression(null, null, canBeArrow); - case tt.bracketL: - node = this.startNode(); - this.next(); - // check whether this is array comprehension or regular array - if ((this.options.ecmaVersion >= 7 || this.options.features["es7.comprehensions"]) && this.type === tt._for) { - return this.parseComprehension(node, false); - } - node.elements = this.parseExprList(tt.bracketR, true, true, refShorthandDefaultPos); - return this.finishNode(node, "ArrayExpression"); + case _tokentype.types.bracketL: + node = this.startNode(); + this.next(); + // check whether this is array comprehension or regular array + if ((this.options.ecmaVersion >= 7 || this.options.features["es7.comprehensions"]) && this.type === _tokentype.types._for) { + return this.parseComprehension(node, false); + } + node.elements = this.parseExprList(_tokentype.types.bracketR, true, true, refShorthandDefaultPos); + return this.finishNode(node, "ArrayExpression"); - case tt.braceL: - return this.parseObj(false, refShorthandDefaultPos); + case _tokentype.types.braceL: + return this.parseObj(false, refShorthandDefaultPos); - case tt._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, false); + case _tokentype.types._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, false); - case tt.at: - this.parseDecorators(); + case _tokentype.types.at: + this.parseDecorators(); - case tt._class: - node = this.startNode(); - this.takeDecorators(node); - return this.parseClass(node, false); + case _tokentype.types._class: + node = this.startNode(); + this.takeDecorators(node); + return this.parseClass(node, false); - case tt._new: - return this.parseNew(); + case _tokentype.types._new: + return this.parseNew(); - case tt.backQuote: - return this.parseTemplate(); + 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(tt.parenL); - var val = this.parseExpression(); - this.expect(tt.parenR); - return val; -}; - -pp.parseParenAndDistinguishExpression = function (start, isAsync) { - start = start || this.markPosition(); - var val = undefined; - if (this.options.ecmaVersion >= 6) { - this.next(); + case _tokentype.types.doubleColon: + node = this.startNode(); + this.next(); + node.object = null; + var callee = node.callee = this.parseNoCallExpr(); + if (callee.type !== "MemberExpression") this.raise(callee.start, "Binding should be performed on object property."); + return this.finishNode(node, "BindExpression"); - if ((this.options.features["es7.comprehensions"] || this.options.ecmaVersion >= 7) && this.type === tt._for) { - return this.parseComprehension(this.startNodeAt(start), true); + default: + this.unexpected(); } + }; - var innerStart = this.markPosition(), - exprList = [], - first = true; - var refShorthandDefaultPos = { start: 0 }, - spreadStart = undefined, - innerParenStart = undefined; - while (this.type !== tt.parenR) { - first ? first = false : this.expect(tt.comma); - if (this.type === tt.ellipsis) { - var spreadNodeStart = this.markPosition(); - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStart)); - break; - } else { - if (this.type === tt.parenL && !innerParenStart) { - innerParenStart = this.start; + 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 (start, isAsync, canBeArrow) { + start = start || this.markPosition(); + var val = undefined; + if (this.options.ecmaVersion >= 6) { + this.next(); + + if ((this.options.features["es7.comprehensions"] || this.options.ecmaVersion >= 7) && this.type === _tokentype.types._for) { + return this.parseComprehension(this.startNodeAt(start), true); + } + + var innerStart = this.markPosition(), + exprList = [], + first = true; + var refShorthandDefaultPos = { start: 0 }, + spreadStart = undefined, + innerParenStart = undefined; + while (this.type !== _tokentype.types.parenR) { + first ? first = false : this.expect(_tokentype.types.comma); + if (this.type === _tokentype.types.ellipsis) { + var spreadNodeStart = this.markPosition(); + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStart)); + break; + } else { + if (this.type === _tokentype.types.parenL && !innerParenStart) { + innerParenStart = this.start; + } + exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); } - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); } - } - var innerEnd = this.markPosition(); - this.expect(tt.parenR); + var innerEnd = this.markPosition(); + this.expect(_tokentype.types.parenR); - if (!this.canInsertSemicolon() && this.eat(tt.arrow)) { - if (innerParenStart) this.unexpected(innerParenStart); - return this.parseParenArrowList(start, exprList, isAsync); - } + if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) { + if (innerParenStart) this.unexpected(innerParenStart); + return this.parseParenArrowList(start, exprList, isAsync); + } - if (!exprList.length) { - if (isAsync) { - return; + if (!exprList.length) { + if (isAsync) { + return; + } else { + this.unexpected(this.lastTokStart); + } + } + if (spreadStart) this.unexpected(spreadStart); + if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); + + if (exprList.length > 1) { + val = this.startNodeAt(innerStart); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEnd); } else { - this.unexpected(this.lastTokStart); + val = exprList[0]; } + } else { + val = this.parseParenExpression(); } - if (spreadStart) this.unexpected(spreadStart); - if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - if (exprList.length > 1) { - val = this.startNodeAt(innerStart); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEnd); + if (this.options.preserveParens) { + var par = this.startNodeAt(start); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression"); } else { - val = exprList[0]; + val.parenthesizedExpression = true; + return val; } - } else { - val = this.parseParenExpression(); - } - - if (this.options.preserveParens) { - var par = this.startNodeAt(start); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression"); - } else { - val.parenthesizedExpression = true; - return val; - } -}; + }; -pp.parseParenArrowList = function (start, exprList, isAsync) { - return this.parseArrowExpression(this.startNodeAt(start), exprList, isAsync); -}; + pp.parseParenArrowList = function (start, exprList, isAsync) { + return this.parseArrowExpression(this.startNodeAt(start), exprList, isAsync); + }; -pp.parseParenItem = function (node, start) { - return node; -}; + pp.parseParenItem = function (node, start) { + return node; + }; // New's precedence is slightly tricky. It must allow its argument // to be a `[]` or dot subscript expression, but not a call — at // least, not without wrapping it in parentheses. Thus, it uses the -var empty = []; + var empty = []; -pp.parseNew = function () { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { - node.meta = meta; - node.property = this.parseIdent(true); - if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target"); - return this.finishNode(node, "MetaProperty"); - } - var start = this.markPosition(); - node.callee = this.parseSubscripts(this.parseExprAtom(), start, true); - if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false);else node.arguments = empty; - return this.finishNode(node, "NewExpression"); -}; + 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.raise(node.property.start, "The only valid meta property for new is new.target"); + return this.finishNode(node, "MetaProperty"); + } + node.callee = this.parseNoCallExpr(); + if (this.eat(_tokentype.types.parenL)) node.arguments = this.parseExprList(_tokentype.types.parenR, this.options.features["es7.trailingFunctionCommas"]);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), - cooked: this.value - }; - this.next(); - elem.tail = this.type === tt.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(tt.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(tt.braceR); - node.quasis.push(curElt = this.parseTemplateElement()); - } - this.next(); - return this.finishNode(node, "TemplateLiteral"); -}; + 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, 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 = false, - isAsync = false, - start = undefined; - if (this.options.features["es7.objectRestSpread"] && this.type === tt.ellipsis) { - prop = this.parseSpread(); - prop.type = "SpreadProperty"; - node.properties.push(prop); - continue; - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refShorthandDefaultPos) start = this.markPosition(); - if (!isPattern) isGenerator = this.eat(tt.star); - } - if (this.options.features["es7.asyncFunctions"] && this.isContextual("async")) { - if (isGenerator || isPattern) this.unexpected(); - var asyncId = this.parseIdent(); - if (this.type === tt.colon || this.type === tt.parenL) { - prop.key = asyncId; + pp.parseObj = function (isPattern, refShorthandDefaultPos) { + var node = this.startNode(), + first = true, + propHash = {}; + node.properties = []; + var decorators = []; + 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; + while (this.type === _tokentype.types.at) { + decorators.push(this.parseDecorator()); + } + var prop = this.startNode(), + isGenerator = false, + isAsync = false, + _start2 = undefined; + if (decorators.length) { + prop.decorators = decorators; + decorators = []; + } + if (this.options.features["es7.objectRestSpread"] && this.type === _tokentype.types.ellipsis) { + prop = this.parseSpread(); + prop.type = "SpreadProperty"; + node.properties.push(prop); + continue; + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refShorthandDefaultPos) _start2 = this.markPosition(); + if (!isPattern) isGenerator = this.eat(_tokentype.types.star); + } + if (this.options.features["es7.asyncFunctions"] && this.isContextual("async")) { + if (isGenerator || isPattern) this.unexpected(); + var asyncId = this.parseIdent(); + if (this.type === _tokentype.types.colon || this.type === _tokentype.types.parenL) { + prop.key = asyncId; + } else { + isAsync = true; + this.parsePropertyName(prop); + } } else { - isAsync = true; this.parsePropertyName(prop); } - } else { - this.parsePropertyName(prop); + this.parseObjPropValue(prop, _start2, isGenerator, isAsync, isPattern, refShorthandDefaultPos); + this.checkPropClash(prop, propHash); + node.properties.push(this.finishNode(prop, "Property")); } - this.parseObjPropValue(prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos); - this.checkPropClash(prop, propHash); - node.properties.push(this.finishNode(prop, "Property")); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); -}; - -pp.parseObjPropValue = function (prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos) { - if (this.eat(tt.colon)) { - prop.value = isPattern ? this.parseMaybeDefault() : this.parseMaybeAssign(false, refShorthandDefaultPos); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { - if (isPattern) this.unexpected(); - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator, isAsync); - } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != tt.comma && this.type != tt.braceR)) { - if (isGenerator || isAsync || isPattern) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - prop.kind = "init"; - if (isPattern) { - if (this.isKeyword(prop.key.name) || this.strict && (reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); - prop.value = this.parseMaybeDefault(start, prop.key); - } else if (this.type === tt.eq && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start; - prop.value = this.parseMaybeDefault(start, prop.key); - } else { - prop.value = prop.key; + if (decorators.length) { + this.raise(this.start, "You have trailing decorators with no property"); } - prop.shorthand = true; - } else this.unexpected(); -}; + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); + }; -pp.parsePropertyName = function (prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(tt.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(tt.bracketR); - return; - } else { - prop.computed = false; + pp.parseObjPropValue = function (prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos) { + if (this.eat(_tokentype.types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault() : this.parseMaybeAssign(false, refShorthandDefaultPos); + 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, isAsync); + } 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 || isAsync || isPattern) this.unexpected(); + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + prop.kind = "init"; + if (isPattern) { + if (this.isKeyword(prop.key.name) || this.strict && (_identifier.reservedWords.strictBind(prop.key.name) || _identifier.reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); + prop.value = this.parseMaybeDefault(start, prop.key); + } else if (this.type === _tokentype.types.eq && refShorthandDefaultPos) { + if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start; + prop.value = this.parseMaybeDefault(start, 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; + } else { + prop.computed = false; + } } - } - prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); -}; + 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, isAsync) { - node.id = null; - if (this.options.ecmaVersion >= 6) { - node.generator = false; - node.expression = false; - } - if (this.options.features["es7.asyncFunctions"]) { - node.async = !!isAsync; - } -}; + pp.initFunction = function (node, isAsync) { + node.id = null; + if (this.options.ecmaVersion >= 6) { + node.generator = false; + node.expression = false; + } + if (this.options.features["es7.asyncFunctions"]) { + node.async = !!isAsync; + } + }; // Parse object or class method. -pp.parseMethod = function (isGenerator, isAsync) { - var node = this.startNode(); - this.initFunction(node, isAsync); - this.expect(tt.parenL); - node.params = this.parseBindingList(tt.parenR, false, false); - if (this.options.ecmaVersion >= 6) { - node.generator = isGenerator; - } - this.parseFunctionBody(node); - return this.finishNode(node, "FunctionExpression"); -}; + pp.parseMethod = function (isGenerator, isAsync) { + var node = this.startNode(); + this.initFunction(node, isAsync); + this.expect(_tokentype.types.parenL); + node.params = this.parseBindingList(_tokentype.types.parenR, false, this.options.features["es7.trailingFunctionCommas"]); + if (this.options.ecmaVersion >= 6) { + node.generator = isGenerator; + } + this.parseFunctionBody(node); + return this.finishNode(node, "FunctionExpression"); + }; // Parse arrow function expression with given parameters. -pp.parseArrowExpression = function (node, params, isAsync) { - this.initFunction(node, isAsync); - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true); - return this.finishNode(node, "ArrowFunctionExpression"); -}; + pp.parseArrowExpression = function (node, params, isAsync) { + this.initFunction(node, isAsync); + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true); + return this.finishNode(node, "ArrowFunctionExpression"); + }; // Parse function body and check parameters. -pp.parseFunctionBody = function (node, allowExpression) { - var isExpression = allowExpression && this.type !== tt.braceL; + pp.parseFunctionBody = function (node, allowExpression) { + var isExpression = allowExpression && this.type !== _tokentype.types.braceL; - var oldInAsync = this.inAsync; - this.inAsync = node.async; - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - } else { - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldInFunc = this.inFunction, - oldInGen = this.inGenerator, - oldLabels = this.labels; - this.inFunction = true;this.inGenerator = node.generator;this.labels = []; - node.body = this.parseBlock(true); - node.expression = false; - this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; - } - this.inAsync = oldInAsync; + var oldInAsync = this.inAsync; + this.inAsync = node.async; + if (isExpression) { + node.body = this.parseMaybeAssign(); + node.expression = true; + } else { + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldInFunc = this.inFunction, + oldInGen = this.inGenerator, + oldLabels = this.labels; + this.inFunction = true;this.inGenerator = node.generator;this.labels = []; + node.body = this.parseBlock(true); + node.expression = false; + this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; + } + this.inAsync = oldInAsync; - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { - var nameHash = {}, - oldStrict = this.strict; - this.strict = true; - if (node.id) this.checkLVal(node.id, true); - for (var i = 0; i < node.params.length; i++) { - this.checkLVal(node.params[i], true, nameHash); - }this.strict = oldStrict; - } -}; + // 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 nameHash = {}, + oldStrict = this.strict; + this.strict = true; + if (node.id) this.checkLVal(node.id, true); + for (var i = 0; i < node.params.length; i++) { + this.checkLVal(node.params[i], true, nameHash); + }this.strict = oldStrict; + } + }; // Parses a comma-separated list of expressions, and returns them as // an array. `close` is the token type that ends the list, and @@ -2149,103 +1582,102 @@ pp.parseFunctionBody = function (node, allowExpression) { // nothing in between them to be parsed as `null` (which is needed // for array literals). -pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(tt.comma); - if (allowTrailingComma && this.afterTrailingComma(close)) break; - } else first = false; - - if (allowEmpty && this.type === tt.comma) { - elts.push(null); - } else { - if (this.type === tt.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos)); + pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) { + var elts = [], + first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(_tokentype.types.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) break; + } else first = false; + + if (allowEmpty && this.type === _tokentype.types.comma) { + elts.push(null); + } else { + if (this.type === _tokentype.types.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos)); + } } - } - return elts; -}; + 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 === tt.name) { - if (!liberal && (!this.options.allowReserved && this.isReservedWord(this.value) || this.strict && reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); - 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"); -}; + 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.options.allowReserved && this.isReservedWord(this.value) || this.strict && _identifier.reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); + 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 await expression inside async function. -pp.parseAwait = function (node) { - if (this.eat(tt.semi) || this.canInsertSemicolon()) { - this.unexpected(); - } - node.all = this.eat(tt.star); - node.argument = this.parseMaybeAssign(true); - return this.finishNode(node, "AwaitExpression"); -}; + pp.parseAwait = function (node) { + if (this.eat(_tokentype.types.semi) || this.canInsertSemicolon()) { + this.unexpected(); + } + node.all = this.eat(_tokentype.types.star); + node.argument = this.parseMaybeUnary(); + return this.finishNode(node, "AwaitExpression"); + }; // Parses yield expression inside generator. -pp.parseYield = function () { - var node = this.startNode(); - this.next(); - if (this.type == tt.semi || this.canInsertSemicolon() || this.type != tt.star && !this.type.startsExpr) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(tt.star); - node.argument = this.parseMaybeAssign(); - } - return this.finishNode(node, "YieldExpression"); -}; + 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"); + }; // Parses array and generator comprehensions. -pp.parseComprehension = function (node, isGenerator) { - node.blocks = []; - while (this.type === tt._for) { - var block = this.startNode(); - this.next(); - this.expect(tt.parenL); - block.left = this.parseBindingAtom(); - this.checkLVal(block.left, true); - this.expectContextual("of"); - block.right = this.parseExpression(); - this.expect(tt.parenR); - node.blocks.push(this.finishNode(block, "ComprehensionBlock")); - } - node.filter = this.eat(tt._if) ? this.parseParenExpression() : null; - node.body = this.parseExpression(); - this.expect(isGenerator ? tt.parenR : tt.bracketR); - node.generator = isGenerator; - return this.finishNode(node, "ComprehensionExpression"); -}; + pp.parseComprehension = function (node, isGenerator) { + node.blocks = []; + while (this.type === _tokentype.types._for) { + var block = this.startNode(); + this.next(); + this.expect(_tokentype.types.parenL); + block.left = this.parseBindingAtom(); + this.checkLVal(block.left, true); + this.expectContextual("of"); + block.right = this.parseExpression(); + this.expect(_tokentype.types.parenR); + node.blocks.push(this.finishNode(block, "ComprehensionBlock")); + } + node.filter = this.eat(_tokentype.types._if) ? this.parseParenExpression() : null; + node.body = this.parseExpression(); + this.expect(isGenerator ? _tokentype.types.parenR : _tokentype.types.bracketR); + node.generator = isGenerator; + return this.finishNode(node, "ComprehensionExpression"); + }; },{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){ + "use strict"; + exports.__esModule = true; // Test whether a given character code starts an identifier. -"use strict"; - -exports.isIdentifierStart = isIdentifierStart; + exports.isIdentifierStart = isIdentifierStart; // Test whether a given character is part of an identifier. -exports.isIdentifierChar = isIdentifierChar; -exports.__esModule = true; + exports.isIdentifierChar = isIdentifierChar; // This is a trick taken from Esprima. It turns out that, on // non-Chrome browsers, to check whether a string is in a set, a // predicate containing a big ugly `switch` statement is faster than @@ -2255,71 +1687,34 @@ exports.__esModule = true; // // It starts by sorting the words by length. -function makePredicate(words) { - words = words.split(" "); - var f = "", - cats = []; - out: for (var i = 0; i < words.length; ++i) { - for (var j = 0; j < cats.length; ++j) { - if (cats[j][0].length == words[i].length) { - cats[j].push(words[i]); - continue out; - } - }cats.push([words[i]]); - } - function compareTo(arr) { - if (arr.length == 1) return f += "return str === " + JSON.stringify(arr[0]) + ";"; - f += "switch(str){"; - for (var i = 0; i < arr.length; ++i) { - f += "case " + JSON.stringify(arr[i]) + ":"; - }f += "return true}return false;"; - } - - // When there are more than three length categories, an outer - // switch first dispatches on the lengths, to save on comparisons. - - if (cats.length > 3) { - cats.sort(function (a, b) { - return b.length - a.length; - }); - f += "switch(str.length){"; - for (var i = 0; i < cats.length; ++i) { - var cat = cats[i]; - f += "case " + cat[0].length + ":"; - compareTo(cat); - } - f += "}" - - // Otherwise, simply generate a flat `switch` statement. - - ; - } else { - compareTo(words); + function makePredicate(words) { + words = words.split(" "); + return function (str) { + return words.indexOf(str) >= 0; + }; } - return new Function("str", f); -} // Reserved word lists for various dialects of the language -var reservedWords = { - 3: makePredicate("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: makePredicate("class enum extends super const export import"), - 6: makePredicate("enum await"), - strict: makePredicate("implements interface let package private protected public static yield"), - strictBind: makePredicate("eval arguments") -}; + var reservedWords = { + 3: makePredicate("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: makePredicate("class enum extends super const export import"), + 6: makePredicate("enum await"), + strict: makePredicate("implements interface let package private protected public static yield"), + strictBind: makePredicate("eval arguments") + }; -exports.reservedWords = reservedWords; + 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 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: makePredicate(ecma5AndLessKeywords), - 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super") -}; + var keywords = { + 5: makePredicate(ecma5AndLessKeywords), + 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super") + }; -exports.keywords = keywords; + exports.keywords = keywords; // ## Character categories // Big ugly regular expressions that match characters in the @@ -2328,83 +1723,56 @@ exports.keywords = keywords; // code point above 128. // Generated by `tools/generate-identifier-regex.js`. -var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; -var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_"; + var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; + var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_"; -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + 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 tools/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, 98, 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, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 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, 16355, 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, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 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, 4305, 6, 792618, 239]; + 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, 98, 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, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 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, 16355, 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, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 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, 4305, 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 = 65536; - 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; - } -} -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 <= 65535) return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes); -} - -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 <= 65535) return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} + function isInAstralSet(code, set) { + var pos = 65536; + 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; + } + } + 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 <= 65535) return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); + if (astral === false) return false; + return isInAstralSet(code, astralIdentifierStartCodes); + } + + 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 <= 65535) return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + if (astral === false) return false; + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); + } },{}],5:[function(require,module,exports){ - - -// 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]. -// -// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API - -"use strict"; - -exports.parse = 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. - -exports.parseExpressionAt = parseExpressionAt; - -// Acorn is organized as a tokenizer and a recursive-descent parser. -// The `tokenize` export provides an interface to the tokenizer. -// Because the tokenizer is optimized for being efficiently used by -// the Acorn parser itself, this interface is somewhat crude and not -// very modular. - -exports.tokenizer = tokenizer; -exports.__esModule = true; // Acorn is a tiny, fast JavaScript parser written in JavaScript. // // Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and @@ -2426,86 +1794,110 @@ exports.__esModule = true; // [dammit]: acorn_loose.js // [walk]: util/walk.js -var _state = require("./state"); - -var Parser = _state.Parser; - -var _options = require("./options"); + "use strict"; -var getOptions = _options.getOptions; + exports.__esModule = true; -require("./parseutil"); +// 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]. +// +// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API -require("./statement"); + exports.parse = parse; -require("./lval"); +// 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. + + exports.parseExpressionAt = parseExpressionAt; + +// Acorn is organized as a tokenizer and a recursive-descent parser. +// The `tokenize` export provides an interface to the tokenizer. +// Because the tokenizer is optimized for being efficiently used by +// the Acorn parser itself, this interface is somewhat crude and not +// very modular. + + exports.tokenizer = tokenizer; + + var _state = require("./state"); + + var _options = require("./options"); + + require("./parseutil"); + + require("./statement"); + + require("./lval"); -require("./expression"); + require("./expression"); -require("./lookahead"); + require("./lookahead"); -exports.Parser = _state.Parser; -exports.plugins = _state.plugins; -exports.defaultOptions = _options.defaultOptions; + exports.Parser = _state.Parser; + exports.plugins = _state.plugins; + exports.defaultOptions = _options.defaultOptions; -var _location = require("./location"); + var _location = require("./location"); -exports.SourceLocation = _location.SourceLocation; -exports.getLineInfo = _location.getLineInfo; -exports.Node = require("./node").Node; + exports.SourceLocation = _location.SourceLocation; + exports.getLineInfo = _location.getLineInfo; -var _tokentype = require("./tokentype"); + var _node = require("./node"); -exports.TokenType = _tokentype.TokenType; -exports.tokTypes = _tokentype.types; + exports.Node = _node.Node; -var _tokencontext = require("./tokencontext"); + var _tokentype = require("./tokentype"); -exports.TokContext = _tokencontext.TokContext; -exports.tokContexts = _tokencontext.types; + exports.TokenType = _tokentype.TokenType; + exports.tokTypes = _tokentype.types; -var _identifier = require("./identifier"); + var _tokencontext = require("./tokencontext"); -exports.isIdentifierChar = _identifier.isIdentifierChar; -exports.isIdentifierStart = _identifier.isIdentifierStart; -exports.Token = require("./tokenize").Token; + exports.TokContext = _tokencontext.TokContext; + exports.tokContexts = _tokencontext.types; -var _whitespace = require("./whitespace"); + var _identifier = require("./identifier"); -exports.isNewLine = _whitespace.isNewLine; -exports.lineBreak = _whitespace.lineBreak; -exports.lineBreakG = _whitespace.lineBreakG; + exports.isIdentifierChar = _identifier.isIdentifierChar; + exports.isIdentifierStart = _identifier.isIdentifierStart; -require("../plugins/flow"); + var _tokenize = require("./tokenize"); -require("../plugins/jsx"); + exports.Token = _tokenize.Token; -var version = "1.0.0";exports.version = version; + var _whitespace = require("./whitespace"); -function parse(input, options) { - var p = parser(options, input); - var startPos = p.options.locations ? [p.pos, p.curPosition()] : p.pos; - p.nextToken(); - return p.parseTopLevel(p.options.program || p.startNodeAt(startPos)); -} + exports.isNewLine = _whitespace.isNewLine; + exports.lineBreak = _whitespace.lineBreak; + exports.lineBreakG = _whitespace.lineBreakG; + var version = "1.0.0";exports.version = version; -function parseExpressionAt(input, pos, options) { - var p = parser(options, input, pos); - p.nextToken(); - return p.parseExpression(); -} + function parse(input, options) { + var p = parser(options, input); + var startPos = p.options.locations ? [p.pos, p.curPosition()] : p.pos; + p.nextToken(); + return p.parseTopLevel(p.options.program || p.startNodeAt(startPos)); + } + + function parseExpressionAt(input, pos, options) { + var p = parser(options, input, pos); + p.nextToken(); + return p.parseExpression(); + } -function tokenizer(input, options) { - return parser(options, input); -} + function tokenizer(input, options) { + return parser(options, input); + } -function parser(options, input) { - return new Parser(getOptions(options), String(input)); -} -},{"../plugins/flow":1,"../plugins/jsx":2,"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){ -"use strict"; + function parser(options, input) { + return new _state.Parser((0, _options.getOptions)(options), String(input)); + } +},{"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){ + "use strict"; -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + exports.__esModule = true; // The `getLineInfo` function is mostly useful when the // `locations` option is off (for performance reasons) and you @@ -2513,53 +1905,58 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instance // offset. `input` should be the code string that the offset refers // into. -exports.getLineInfo = getLineInfo; -exports.__esModule = true; + exports.getLineInfo = getLineInfo; -var Parser = require("./state").Parser; + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var lineBreakG = require("./whitespace").lineBreakG; + var _state = require("./state"); + + var _whitespace = require("./whitespace"); // These are used when `options.locations` is on, for the // `startLoc` and `endLoc` properties. -var Position = exports.Position = (function () { - function Position(line, col) { - _classCallCheck(this, Position); + var Position = (function () { + function Position(line, col) { + _classCallCheck(this, Position); - this.line = line; - this.column = col; - } + this.line = line; + this.column = col; + } - Position.prototype.offset = function offset(n) { - return new Position(this.line, this.column + n); - }; + Position.prototype.offset = function offset(n) { + return new Position(this.line, this.column + n); + }; + + return Position; + })(); + + exports.Position = Position; - return Position; -})(); + var SourceLocation = function SourceLocation(p, start, end) { + _classCallCheck(this, SourceLocation); -var SourceLocation = exports.SourceLocation = function SourceLocation(p, start, end) { - _classCallCheck(this, SourceLocation); + this.start = start; + this.end = end; + if (p.sourceFile !== null) this.source = p.sourceFile; + }; - this.start = start; - this.end = end; - if (p.sourceFile !== null) this.source = p.sourceFile; -}; + exports.SourceLocation = SourceLocation; -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur); + 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); + } } } -} -var pp = Parser.prototype; + 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 @@ -2567,630 +1964,629 @@ var pp = Parser.prototype; // of the error message, and then raises a `SyntaxError` with that // message. -pp.raise = function (pos, message) { - var loc = 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.curPosition = function () { - return new Position(this.curLine, this.pos - this.lineStart); -}; - -pp.markPosition = function () { - return this.options.locations ? [this.start, this.startLoc] : this.start; -}; + pp.raise = function (pos, message) { + var loc = 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.curPosition = function () { + return new Position(this.curLine, this.pos - this.lineStart); + }; + + pp.markPosition = function () { + return this.options.locations ? [this.start, this.startLoc] : this.start; + }; },{"./state":12,"./whitespace":18}],7:[function(require,module,exports){ -"use strict"; + "use strict"; -var Parser = require("./state").Parser; + var _state = require("./state"); -var pp = Parser.prototype; + var pp = _state.Parser.prototype; -var STATE_KEYS = ["lastTokStartLoc", "lastTokEndLoc", "lastTokStart", "lastTokEnd", "lineStart", "startLoc", "endLoc", "start", "pos", "end", "type", "value"]; + var STATE_KEYS = ["lastTokStartLoc", "lastTokEndLoc", "lastTokStart", "lastTokEnd", "lineStart", "startLoc", "endLoc", "start", "pos", "end", "type", "value", "exprAllowed", "potentialArrowAt", "currLine", "input"]; -pp.getState = function () { - var state = {}; - for (var i = 0; i < STATE_KEYS.length; i++) { - var key = STATE_KEYS[i]; - state[key] = this[key]; - } - return state; -}; + pp.getState = function () { + var state = {}; + for (var i = 0; i < STATE_KEYS.length; i++) { + var key = STATE_KEYS[i]; + state[key] = this[key]; + } + state.context = this.context.slice(); + return state; + }; -pp.lookahead = function () { - var old = this.getState(); - this.next(); - var curr = this.getState(); - for (var key in old) this[key] = old[key]; - return curr; -}; + pp.lookahead = function () { + var old = this.getState(); + this.isLookahead = true; + this.next(); + this.isLookahead = false; + var curr = this.getState(); + for (var key in old) this[key] = old[key]; + return curr; + }; },{"./state":12}],8:[function(require,module,exports){ -"use strict"; + "use strict"; -var tt = require("./tokentype").types; + var _tokentype = require("./tokentype"); -var Parser = require("./state").Parser; + var _state = require("./state"); -var reservedWords = require("./identifier").reservedWords; + var _identifier = require("./identifier"); -var has = require("./util").has; + var _util = require("./util"); -var pp = Parser.prototype; + 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": - case "AssignmentPattern": - break; + pp.toAssignable = function (node, isBinding) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + 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 "ObjectExpression": + node.type = "ObjectPattern"; + for (var i = 0; i < node.properties.length; i++) { + var prop = node.properties[i]; + if (prop.type === "SpreadProperty") continue; + 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 "ArrayExpression": + node.type = "ArrayPattern"; + this.toAssignableList(node.elements, isBinding); + break; - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - break; + case "AssignmentExpression": + if (node.operator === "=") { + node.type = "AssignmentPattern"; + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); + } + break; - case "MemberExpression": - if (!isBinding) break; + case "MemberExpression": + if (!isBinding) break; - default: - this.raise(node.start, "Assigning to rvalue"); + default: + this.raise(node.start, "Assigning to rvalue"); + } } - } - return node; -}; + 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; + pp.toAssignableList = function (exprList, isBinding) { + var end = exprList.length; + if (end) { + var last = exprList[end - 1]; + if (last && last.type == "RestElement") { + --end; + } else if (last && last.type == "SpreadElement") { + last.type = "RestElement"; + var arg = last.argument; + this.toAssignable(arg, isBinding); + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start); + --end; + } } - } - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) this.toAssignable(elt, isBinding); - } - return exprList; -}; + 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 (refShorthandDefaultPos) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(refShorthandDefaultPos); - return this.finishNode(node, "SpreadElement"); -}; + pp.parseSpread = function (refShorthandDefaultPos) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(refShorthandDefaultPos); + return this.finishNode(node, "SpreadElement"); + }; -pp.parseRest = function () { - var node = this.startNode(); - this.next(); - node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected(); - return this.finishNode(node, "RestElement"); -}; + pp.parseRest = function () { + var node = this.startNode(); + this.next(); + 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 tt.name: - return this.parseIdent(); + pp.parseBindingAtom = function () { + if (this.options.ecmaVersion < 6) return this.parseIdent(); + switch (this.type) { + case _tokentype.types.name: + return this.parseIdent(); - case tt.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(tt.bracketR, true, true); - return this.finishNode(node, "ArrayPattern"); + 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 tt.braceL: - return this.parseObj(true); + case _tokentype.types.braceL: + return this.parseObj(true); - default: - this.unexpected(); - } -}; + default: + this.unexpected(); + } + }; -pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (first) first = false;else this.expect(tt.comma); - if (allowEmpty && this.type === tt.comma) { - elts.push(null); - } else if (allowTrailingComma && this.afterTrailingComma(close)) { - break; - } else if (this.type === tt.ellipsis) { - elts.push(this.parseAssignableListItemTypes(this.parseRest())); - this.expect(close); - break; - } else { - var left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - elts.push(this.parseMaybeDefault(null, left)); + pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { + 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) { + elts.push(this.parseAssignableListItemTypes(this.parseRest())); + this.expect(close); + break; + } else { + var left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left); + elts.push(this.parseMaybeDefault(null, left)); + } } - } - return elts; -}; + return elts; + }; -pp.parseAssignableListItemTypes = function (param) { - return param; -}; + pp.parseAssignableListItemTypes = function (param) { + return param; + }; // Parses assignment pattern around given atom if possible. -pp.parseMaybeDefault = function (startPos, left) { - startPos = startPos || this.markPosition(); - left = left || this.parseBindingAtom(); - if (!this.eat(tt.eq)) return left; - var node = this.startNodeAt(startPos); - node.operator = "="; - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); -}; + pp.parseMaybeDefault = function (startPos, left) { + startPos = startPos || this.markPosition(); + left = left || this.parseBindingAtom(); + if (!this.eat(_tokentype.types.eq)) return left; + var node = this.startNodeAt(startPos); + node.operator = "="; + 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 && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); - if (checkClashes) { - if (has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); - checkClashes[expr.name] = true; - } - break; + pp.checkLVal = function (expr, isBinding, checkClashes) { + switch (expr.type) { + case "Identifier": + if (this.strict && (_identifier.reservedWords.strictBind(expr.name) || _identifier.reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); + if (checkClashes) { + if ((0, _util.has)(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); + checkClashes[expr.name] = true; + } + break; - case "MemberExpression": - if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); - break; + case "MemberExpression": + if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); + break; - case "ObjectPattern": - for (var i = 0; i < expr.properties.length; i++) { - var prop = expr.properties[i]; - if (prop.type === "Property") prop = prop.value; - this.checkLVal(prop, isBinding, checkClashes); - } - break; + case "ObjectPattern": + for (var i = 0; i < expr.properties.length; i++) { + var prop = expr.properties[i]; + if (prop.type === "Property") prop = prop.value; + this.checkLVal(prop, 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 "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 "AssignmentPattern": + this.checkLVal(expr.left, isBinding, checkClashes); + break; - case "SpreadProperty": - case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes); - break; + case "SpreadProperty": + case "RestElement": + this.checkLVal(expr.argument, isBinding, checkClashes); + break; - default: - this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); - } -}; + default: + this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); + } + }; },{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],9:[function(require,module,exports){ -"use strict"; + "use strict"; -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + exports.__esModule = true; -exports.__esModule = true; + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var Parser = require("./state").Parser; + var _state = require("./state"); -var SourceLocation = require("./location").SourceLocation; + var _location = require("./location"); // Start an AST node, attaching a start offset. -var pp = Parser.prototype; - -var Node = exports.Node = function Node() { - _classCallCheck(this, Node); -}; - -pp.startNode = function () { - var node = new Node(); - node.start = this.start; - if (this.options.locations) node.loc = new SourceLocation(this, this.startLoc); - if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; - if (this.options.ranges) node.range = [this.start, 0]; - return node; -}; - -pp.startNodeAt = function (pos) { - var node = new Node(), - start = pos; - if (this.options.locations) { - node.loc = new SourceLocation(this, start[1]); - start = pos[0]; - } - node.start = start; - if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; - if (this.options.ranges) node.range = [start, 0]; - return node; -}; + var pp = _state.Parser.prototype; + + var Node = function Node() { + _classCallCheck(this, Node); + }; + + exports.Node = Node; + + pp.startNode = function () { + var node = new Node(); + node.start = this.start; + if (this.options.locations) node.loc = new _location.SourceLocation(this, this.startLoc); + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [this.start, 0]; + return node; + }; + + pp.startNodeAt = function (pos) { + var node = new Node(), + start = pos; + if (this.options.locations) { + node.loc = new _location.SourceLocation(this, start[1]); + start = pos[0]; + } + node.start = start; + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [start, 0]; + return node; + }; // Finish an AST node, adding `type` and `end` properties. -pp.finishNode = function (node, type) { - node.type = type; - node.end = this.lastTokEnd; - if (this.options.locations) node.loc.end = this.lastTokEndLoc; - if (this.options.ranges) node.range[1] = this.lastTokEnd; - return node; -}; + pp.finishNode = function (node, type) { + node.type = type; + node.end = this.lastTokEnd; + if (this.options.locations) node.loc.end = this.lastTokEndLoc; + if (this.options.ranges) node.range[1] = this.lastTokEnd; + return node; + }; // Finish node at given position -pp.finishNodeAt = function (node, type, pos) { - if (this.options.locations) { - node.loc.end = pos[1];pos = pos[0]; - } - node.type = type; - node.end = pos; - if (this.options.ranges) node.range[1] = pos; - return node; -}; + pp.finishNodeAt = function (node, type, pos) { + if (this.options.locations) { + node.loc.end = pos[1];pos = pos[0]; + } + node.type = type; + node.end = pos; + if (this.options.ranges) node.range[1] = pos; + return node; + }; },{"./location":6,"./state":12}],10:[function(require,module,exports){ + "use strict"; + exports.__esModule = true; // Interpret and default an options object -"use strict"; - -exports.getOptions = getOptions; -exports.__esModule = true; - -var _util = require("./util"); + exports.getOptions = getOptions; -var has = _util.has; -var isArray = _util.isArray; + var _util = require("./util"); -var SourceLocation = require("./location").SourceLocation; + var _location = require("./location"); // 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. - ecmaVersion: 5, - // 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 not enforced. Disable - // `allowReserved` to enforce them. When this option has the - // value "never", reserved words and keywords can also not be - // used as property names. - allowReserved: true, - // 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 tokenize() returns. 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: {}, - // Babel-specific options - features: {}, - strictMode: null -};exports.defaultOptions = defaultOptions; - -function getOptions(opts) { - var options = {}; - for (var opt in defaultOptions) { - options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; - }if (isArray(options.onToken)) { - (function () { - var tokens = options.onToken; - options.onToken = function (token) { - return tokens.push(token); - }; - })(); - } - if (isArray(options.onComment)) options.onComment = pushComment(options, options.onComment); + 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. + ecmaVersion: 5, + // 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 not enforced. Disable + // `allowReserved` to enforce them. When this option has the + // value "never", reserved words and keywords can also not be + // used as property names. + allowReserved: true, + // 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 tokenize() returns. 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: {}, + // Babel-specific options + features: {}, + strictMode: null + };exports.defaultOptions = defaultOptions; + + function getOptions(opts) { + var options = {}; + for (var opt in defaultOptions) { + options[opt] = opts && (0, _util.has)(opts, opt) ? opts[opt] : defaultOptions[opt]; + }if ((0, _util.isArray)(options.onToken)) { + (function () { + var tokens = options.onToken; + options.onToken = function (token) { + return tokens.push(token); + }; + })(); + } + if ((0, _util.isArray)(options.onComment)) options.onComment = pushComment(options, options.onComment); - return options; -} + 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 + 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 _location.SourceLocation(this, startLoc, endLoc); + if (options.ranges) comment.range = [start, end]; + array.push(comment); }; - if (options.locations) comment.loc = new SourceLocation(this, startLoc, endLoc); - if (options.ranges) comment.range = [start, end]; - array.push(comment); - }; -} + } },{"./location":6,"./util":17}],11:[function(require,module,exports){ -"use strict"; + "use strict"; -var tt = require("./tokentype").types; + var _tokentype = require("./tokentype"); -var Parser = require("./state").Parser; + var _state = require("./state"); -var lineBreak = require("./whitespace").lineBreak; + var _whitespace = require("./whitespace"); -var pp = Parser.prototype; + 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.value === "use strict"; -}; + pp.isUseStrict = function (stmt) { + return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.value === "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; - } -}; + 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 === tt.name && this.value === name; -}; + 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(tt.name); -}; + 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(); -}; + 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 === tt.eof || this.type === tt.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); -}; + 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; - } -}; + 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(tt.semi) && !this.insertSemicolon()) this.unexpected(); -}; + 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; - } -}; + 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(); -}; + 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"); -}; + pp.unexpected = function (pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); + }; },{"./state":12,"./tokentype":16,"./whitespace":18}],12:[function(require,module,exports){ -"use strict"; + "use strict"; + + exports.__esModule = true; + exports.Parser = Parser; -exports.Parser = Parser; -exports.__esModule = true; + var _identifier = require("./identifier"); -var _identifier = require("./identifier"); + var _tokentype = require("./tokentype"); + + function Parser(options, input, startPos) { + this.options = options; + this.loadPlugins(this.options.plugins); + this.sourceFile = this.options.sourceFile || null; + this.isKeyword = _identifier.keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; + this.isReservedWord = _identifier.reservedWords[this.options.ecmaVersion]; + this.input = input; + + // 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(_tokentype.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 = null; + + // 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; -var reservedWords = _identifier.reservedWords; -var keywords = _identifier.keywords; + // Figure out if it's a module code. + this.inModule = this.options.sourceType === "module"; + this.strict = this.options.strictMode === false ? false : this.inModule; -var _tokentype = require("./tokentype"); + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; -var tt = _tokentype.types; -var lineBreak = _tokentype.lineBreak; + // Flags to track whether we are in a function, a generator. + this.inFunction = this.inGenerator = false; + // Labels in scope. + this.labels = []; -function Parser(options, input, startPos) { - this.options = options; - this.loadPlugins(this.options.plugins); - this.sourceFile = this.options.sourceFile || null; - this.isKeyword = keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; - this.isReservedWord = reservedWords[this.options.ecmaVersion]; - this.input = input; + this.decorators = []; - // Set up token state + // If enabled, skip leading hashbang line. + if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); + } - // 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(lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = tt.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 = null; - - // 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.inModule = this.options.sourceType === "module"; - this.strict = this.options.strictMode === false ? false : this.inModule; - - // Flags to track whether we are in a function, a generator. - this.inFunction = this.inGenerator = false; - // Labels in scope. - this.labels = []; - - this.decorators = []; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); -} - -Parser.prototype.extend = function (name, f) { - this[name] = f(this[name]); -}; + Parser.prototype.extend = function (name, f) { + this[name] = f(this[name]); + }; // Registered plugins -var plugins = {}; + var plugins = {}; -exports.plugins = plugins; -Parser.prototype.loadPlugins = function (plugins) { - for (var _name in plugins) { - var plugin = exports.plugins[_name]; - if (!plugin) throw new Error("Plugin '" + _name + "' not found"); - plugin(this, plugins[_name]); - } -}; + exports.plugins = plugins; + Parser.prototype.loadPlugins = function (plugins) { + for (var _name in plugins) { + var plugin = exports.plugins[_name]; + if (!plugin) throw new Error("Plugin '" + _name + "' not found"); + plugin(this, plugins[_name]); + } + }; },{"./identifier":4,"./tokentype":16}],13:[function(require,module,exports){ -"use strict"; + "use strict"; -var tt = require("./tokentype").types; + var _tokentype = require("./tokentype"); -var Parser = require("./state").Parser; + var _state = require("./state"); -var lineBreak = require("./whitespace").lineBreak; + var _whitespace = require("./whitespace"); -var pp = Parser.prototype; + var pp = _state.Parser.prototype; // ### Statement parsing @@ -3199,24 +2595,24 @@ var pp = Parser.prototype; // `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 !== tt.eof) { - var stmt = this.parseStatement(true, true); - node.body.push(stmt); - if (first && 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"); -}; + 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 && 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" }; + var loopLabel = { kind: "loop" }, + switchLabel = { kind: "switch" }; // Parse a single statement. // @@ -3225,160 +2621,154 @@ var loopLabel = { kind: "loop" }, // `if (foo) /blah/.exec(foo)`, where looking at the previous token // does not help. -pp.parseStatement = function (declaration, topLevel) { - if (this.type === tt.at) { - this.parseDecorators(true); - } + pp.parseStatement = function (declaration, topLevel) { + if (this.type === _tokentype.types.at) { + this.parseDecorators(true); + } - var starttype = this.type, - node = this.startNode(); + var starttype = this.type, + node = this.startNode(); - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. + // 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 tt._break:case tt._continue: + switch (starttype) { + case _tokentype.types._break:case _tokentype.types._continue: return this.parseBreakContinueStatement(node, starttype.keyword); - case tt._debugger: - return this.parseDebuggerStatement(node); - case tt._do: - return this.parseDoStatement(node); - case tt._for: - return this.parseForStatement(node); - case tt._function: - if (!declaration && this.options.ecmaVersion >= 6) this.unexpected(); - return this.parseFunctionStatement(node); - - case tt._class: - if (!declaration) this.unexpected(); - this.takeDecorators(node); - return this.parseClass(node, true); - - case tt._if: - return this.parseIfStatement(node); - case tt._return: - return this.parseReturnStatement(node); - case tt._switch: - return this.parseSwitchStatement(node); - case tt._throw: - return this.parseThrowStatement(node); - case tt._try: - return this.parseTryStatement(node); - case tt._let:case tt._const: + 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(); + this.takeDecorators(node); + 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._let:case _tokentype.types._const: if (!declaration) this.unexpected(); // NOTE: falls through to _var - case tt._var: - return this.parseVarStatement(node, starttype); - case tt._while: - return this.parseWhileStatement(node); - case tt._with: - return this.parseWithStatement(node); - case tt.braceL: - return this.parseBlock(); - case tt.semi: - return this.parseEmptyStatement(node); - case tt._export: - case tt._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 === tt._import ? this.parseImport(node) : this.parseExport(node); - - case tt.name: - if (this.options.features["es7.asyncFunctions"] && this.value === "async" && this.lookahead().type === tt._function) { - this.next(); - this.expect(tt._function); - return this.parseFunction(node, true, false, true); - } - - // 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 === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr); - } -}; + case _tokentype.types._var: + return this.parseVarStatement(node, starttype); + 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); + + case _tokentype.types.name: + if (this.options.features["es7.asyncFunctions"] && this.value === "async" && this.lookahead().type === _tokentype.types._function) { + this.next(); + this.expect(_tokentype.types._function); + return this.parseFunction(node, true, false, true); + } -pp.takeDecorators = function (node) { - if (this.decorators.length) { - node.decorators = this.decorators; - this.decorators = []; - } -}; + // 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.parseDecorators = function (allowExport) { - while (this.type === tt.at) { - this.decorators.push(this.parseDecorator()); - } + pp.takeDecorators = function (node) { + if (this.decorators.length) { + node.decorators = this.decorators; + this.decorators = []; + } + }; - if (allowExport && this.type === tt._export) { - return; - } + pp.parseDecorators = function (allowExport) { + while (this.type === _tokentype.types.at) { + this.decorators.push(this.parseDecorator()); + } - if (this.type !== tt._class) { - this.raise(this.start, "Leading decorators must be attached to a class declaration"); - } -}; + if (allowExport && this.type === _tokentype.types._export) { + return; + } -pp.parseDecorator = function (allowExport) { - if (!this.options.features["es7.decorators"]) { - this.unexpected(); - } - var node = this.startNode(); - this.next(); - node.expression = this.parseMaybeAssign(); - return this.finishNode(node, "Decorator"); -}; - -pp.parseBreakContinueStatement = function (node, keyword) { - var isBreak = keyword == "break"; - this.next(); - if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== tt.name) this.unexpected();else { - node.label = this.parseIdent(); - this.semicolon(); - } + if (this.type !== _tokentype.types._class) { + this.raise(this.start, "Leading decorators must be attached to a class declaration"); + } + }; - // 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) { - var start = this.markPosition(); - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - if (this.options.features["es7.doExpressions"] && this.type !== tt._while) { - var container = this.startNodeAt(start); - container.expression = this.finishNode(node, "DoExpression"); - this.semicolon(); - return this.finishNode(container, "ExpressionStatement"); - } - this.expect(tt._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) this.eat(tt.semi);else this.semicolon(); - return this.finishNode(node, "DoWhileStatement"); -}; + pp.parseDecorator = function (allowExport) { + if (!this.options.features["es7.decorators"]) { + this.unexpected(); + } + var node = this.startNode(); + this.next(); + node.expression = this.parseMaybeAssign(); + return this.finishNode(node, "Decorator"); + }; + + pp.parseBreakContinueStatement = function (node, keyword) { + var isBreak = keyword == "break"; + this.next(); + if (this.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) { + var start = this.markPosition(); + 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` @@ -3388,870 +2778,866 @@ pp.parseDoStatement = function (node) { // 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(tt.parenL); - if (this.type === tt.semi) return this.parseFor(node, null); - if (this.type === tt._var || this.type === tt._let || this.type === tt._const) { - var _init = this.startNode(), - varKind = this.type; + pp.parseForStatement = function (node) { this.next(); - this.parseVar(_init, true, varKind); - this.finishNode(_init, "VariableDeclaration"); - if ((this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== tt._var && _init.declarations[0].init)) return this.parseForIn(node, _init); - return this.parseFor(node, _init); - } - var refShorthandDefaultPos = { start: 0 }; - var init = this.parseExpression(true, refShorthandDefaultPos); - if (this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { - this.toAssignable(init); - this.checkLVal(init); - return this.parseForIn(node, init); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - 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(tt._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(tt.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(tt.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; this.type != tt.braceR;) { - if (this.type === tt._case || this.type === tt._default) { - var isCase = this.type === tt._case; - if (cur) this.finishNode(cur, "SwitchCase"); - node.cases.push(cur = this.startNode()); - cur.consequent = []; + this.labels.push(loopLabel); + this.expect(_tokentype.types.parenL); + if (this.type === _tokentype.types.semi) return this.parseFor(node, null); + if (this.type === _tokentype.types._var || this.type === _tokentype.types._let || this.type === _tokentype.types._const) { + var _init = this.startNode(), + varKind = this.type; this.next(); - if (isCase) { - cur.test = this.parseExpression(); + this.parseVar(_init, true, varKind); + this.finishNode(_init, "VariableDeclaration"); + if ((this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== _tokentype.types._var && _init.declarations[0].init)) return this.parseForIn(node, _init); + return this.parseFor(node, _init); + } + var refShorthandDefaultPos = { start: 0 }; + var init = this.parseExpression(true, refShorthandDefaultPos); + if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { + this.toAssignable(init); + this.checkLVal(init); + return this.parseForIn(node, init); + } else if (refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + 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; 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.raise(this.lastTokStart, "Multiple default clauses"); + sawDefault = true; + cur.test = null; + } + this.expect(_tokentype.types.colon); } else { - if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses"); - sawDefault = true; - cur.test = null; + if (!cur) this.unexpected(); + cur.consequent.push(this.parseStatement(true)); } - this.expect(tt.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"); -}; + 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 (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"); -}; + 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 = []; + var empty = []; -pp.parseTryStatement = function (node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === tt._catch) { - var clause = this.startNode(); + pp.parseTryStatement = function (node) { this.next(); - this.expect(tt.parenL); - clause.param = this.parseBindingAtom(); - this.checkLVal(clause.param, true); - this.expect(tt.parenR); - clause.guard = null; - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.guardedHandlers = empty; - node.finalizer = this.eat(tt._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 === tt._switch ? "switch" : null; - this.labels.push({ name: maybeName, kind: kind }); - 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"); -}; + 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.guard = null; + clause.body = this.parseBlock(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.guardedHandlers = empty; + 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; + this.labels.push({ name: maybeName, kind: kind }); + 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(tt.braceL); - while (!this.eat(tt.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"); -}; + 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(tt.semi); - node.test = this.type === tt.semi ? null : this.parseExpression(); - this.expect(tt.semi); - node.update = this.type === tt.parenR ? null : this.parseExpression(); - this.expect(tt.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "ForStatement"); -}; + 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 === tt._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - node.left = init; - node.right = this.parseExpression(); - this.expect(tt.parenR); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, type); -}; + 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.keyword; - for (;;) { - var decl = this.startNode(); - this.parseVarHead(decl); - if (this.eat(tt.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === tt._const && !(this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - this.unexpected(); - } else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._in || this.isContextual("of")))) { - this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; + pp.parseVar = function (node, isFor, kind) { + node.declarations = []; + node.kind = kind.keyword; + for (;;) { + var decl = this.startNode(); + this.parseVarHead(decl); + if (this.eat(_tokentype.types.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (kind === _tokentype.types._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; } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(tt.comma)) break; - } - return node; -}; + return node; + }; -pp.parseVarHead = function (decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true); -}; + pp.parseVarHead = function (decl) { + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, true); + }; // Parse a function declaration or literal (depending on the // `isStatement` parameter). -pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync) { - this.initFunction(node, isAsync); - if (this.options.ecmaVersion >= 6) node.generator = this.eat(tt.star); - if (isStatement || this.type === tt.name) node.id = this.parseIdent(); - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody); - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); -}; + pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync) { + this.initFunction(node, isAsync); + if (this.options.ecmaVersion >= 6) node.generator = this.eat(_tokentype.types.star); + if (isStatement || this.type === _tokentype.types.name) node.id = this.parseIdent(); + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody); + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); + }; -pp.parseFunctionParams = function (node) { - this.expect(tt.parenL); - node.params = this.parseBindingList(tt.parenR, false, false); -}; + pp.parseFunctionParams = function (node) { + this.expect(_tokentype.types.parenL); + node.params = this.parseBindingList(_tokentype.types.parenR, false, this.options.features["es7.trailingFunctionCommas"]); + }; // 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(); - classBody.body = []; - this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - if (this.eat(tt.semi)) continue; - if (this.type === tt.at) { - this.decorators.push(this.parseDecorator()); - continue; - } - var method = this.startNode(); - this.takeDecorators(method); - var isGenerator = this.eat(tt.star), - isAsync = false; - this.parsePropertyName(method); - if (this.type !== tt.parenL && !method.computed && method.key.type === "Identifier" && method.key.name === "static") { - if (isGenerator) this.unexpected(); - method["static"] = true; - isGenerator = this.eat(tt.star); - this.parsePropertyName(method); - } else { - method["static"] = false; - } - if (!isGenerator && method.key.type === "Identifier" && !method.computed && this.isClassProperty()) { - classBody.body.push(this.parseClassProperty(method)); - continue; - } - if (this.options.features["es7.asyncFunctions"] && this.type !== tt.parenL && !method.computed && method.key.type === "Identifier" && method.key.name === "async") { - isAsync = true; + pp.parseClass = function (node, isStatement) { + this.next(); + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var classBody = this.startNode(); + classBody.body = []; + this.expect(_tokentype.types.braceL); + var decorators = []; + while (!this.eat(_tokentype.types.braceR)) { + if (this.eat(_tokentype.types.semi)) continue; + if (this.type === _tokentype.types.at) { + decorators.push(this.parseDecorator()); + continue; + } + var method = this.startNode(); + if (decorators.length) { + method.decorators = decorators; + decorators = []; + } + var isGenerator = this.eat(_tokentype.types.star), + isAsync = false; this.parsePropertyName(method); - } - method.kind = "method"; - if (!method.computed && !isGenerator) { - if (method.key.type === "Identifier") { - if (this.type !== tt.parenL && (method.key.name === "get" || method.key.name === "set")) { - method.kind = method.key.name; - this.parsePropertyName(method); - } else if (!method["static"] && method.key.name === "constructor") { + if (this.type !== _tokentype.types.parenL && !method.computed && method.key.type === "Identifier" && method.key.name === "static") { + if (isGenerator) this.unexpected(); + method["static"] = true; + isGenerator = this.eat(_tokentype.types.star); + this.parsePropertyName(method); + } else { + method["static"] = false; + } + if (!isGenerator && method.key.type === "Identifier" && !method.computed && this.isClassProperty()) { + classBody.body.push(this.parseClassProperty(method)); + continue; + } + if (this.options.features["es7.asyncFunctions"] && this.type !== _tokentype.types.parenL && !method.computed && method.key.type === "Identifier" && method.key.name === "async") { + isAsync = true; + this.parsePropertyName(method); + } + method.kind = "method"; + if (!method.computed && !isGenerator && !isAsync) { + if (method.key.type === "Identifier") { + if (this.type !== _tokentype.types.parenL && (method.key.name === "get" || method.key.name === "set")) { + method.kind = method.key.name; + this.parsePropertyName(method); + } else if (!method["static"] && method.key.name === "constructor") { + method.kind = "constructor"; + } + } else if (!method["static"] && method.key.type === "Literal" && method.key.value === "constructor") { method.kind = "constructor"; } - } else if (!method["static"] && method.key.type === "Literal" && method.key.value === "constructor") { - method.kind = "constructor"; } + if (method.kind === "constructor" && method.decorators) { + this.raise(method.start, "You can't attach decorators to a class constructor"); + } + this.parseClassMethod(classBody, method, isGenerator, isAsync); } - if (method.kind === "constructor" && method.decorators) { - this.raise(method.start, "You can't attach decorators to a class constructor"); + if (decorators.length) { + this.raise(this.start, "You have trailing decorators with no method"); } - this.parseClassMethod(classBody, method, isGenerator, isAsync); - } - if (this.decorators.length) { - this.raise(this.start, "You have trailing decorators with no method"); - } - node.body = this.finishNode(classBody, "ClassBody"); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); -}; + node.body = this.finishNode(classBody, "ClassBody"); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); + }; -pp.isClassProperty = function () { - return this.type === tt.eq || (this.type === tt.semi || this.canInsertSemicolon()); -}; + pp.isClassProperty = function () { + return this.type === _tokentype.types.eq || (this.type === _tokentype.types.semi || this.canInsertSemicolon()); + }; -pp.parseClassProperty = function (node) { - if (this.type === tt.eq) { - if (!this.options.features["es7.classProperties"]) this.unexpected(); - this.next(); - node.value = this.parseMaybeAssign(); - } else { - node.value = null; - } - this.semicolon(); - return this.finishNode(node, "ClassProperty"); -}; + pp.parseClassProperty = function (node) { + if (this.type === _tokentype.types.eq) { + if (!this.options.features["es7.classProperties"]) this.unexpected(); + this.next(); + node.value = this.parseMaybeAssign(); + } else { + node.value = null; + } + this.semicolon(); + return this.finishNode(node, "ClassProperty"); + }; -pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) { - method.value = this.parseMethod(isGenerator, isAsync); - classBody.body.push(this.finishNode(method, "MethodDefinition")); -}; + pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) { + method.value = this.parseMethod(isGenerator, isAsync); + classBody.body.push(this.finishNode(method, "MethodDefinition")); + }; -pp.parseClassId = function (node, isStatement) { - node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null; -}; + 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(tt._extends) ? this.parseExprSubscripts() : 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.type === tt.star) { - var specifier = this.startNode(); + pp.parseExport = function (node) { this.next(); - if (this.options.features["es7.exportExtensions"] && this.eatContextual("as")) { - specifier.exported = this.parseIdent(); - node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; - this.parseExportSpecifiersMaybe(node); - this.parseExportFrom(node); - } else { + // export * from '...' + if (this.type === _tokentype.types.star) { + var specifier = this.startNode(); + this.next(); + if (this.options.features["es7.exportExtensions"] && this.eatContextual("as")) { + specifier.exported = this.parseIdent(); + node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; + this.parseExportSpecifiersMaybe(node); + this.parseExportFrom(node); + } else { + this.parseExportFrom(node); + return this.finishNode(node, "ExportAllDeclaration"); + } + } else if (this.options.features["es7.exportExtensions"] && this.isExportDefaultSpecifier()) { + var specifier = this.startNode(); + specifier.exported = this.parseIdent(true); + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + if (this.type === _tokentype.types.comma && this.lookahead().type === _tokentype.types.star) { + this.expect(_tokentype.types.comma); + var _specifier = this.startNode(); + this.expect(_tokentype.types.star); + this.expectContextual("as"); + _specifier.exported = this.parseIdent(); + node.specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier")); + } else { + this.parseExportSpecifiersMaybe(node); + } this.parseExportFrom(node); - return this.finishNode(node, "ExportAllDeclaration"); - } - } else if (this.isExportDefaultSpecifier()) { - var specifier = this.startNode(); - specifier.exported = this.parseIdent(true); - node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - if (this.type === tt.comma && this.lookahead().type === tt.star) { - this.expect(tt.comma); - var _specifier = this.startNode(); - this.expect(tt.star); - this.expectContextual("as"); - _specifier.exported = this.parseIdent(); - node.specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier")); + } else if (this.eat(_tokentype.types._default)) { + // export default ... + var _expr = this.parseMaybeAssign(); + var needsSemi = true; + if (_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(); + this.checkExport(node); + return this.finishNode(node, "ExportDefaultDeclaration"); + } else if (this.type.keyword || this.shouldParseExportDeclaration()) { + node.declaration = this.parseStatement(true); + node.specifiers = []; + node.source = null; } else { - this.parseExportSpecifiersMaybe(node); - } - this.parseExportFrom(node); - } else if (this.eat(tt._default)) { - // export default ... - var expr = this.parseMaybeAssign(); - var needsSemi = true; - if (expr.type == "FunctionExpression" || expr.type == "ClassExpression") { - needsSemi = false; - if (expr.id) { - expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration"; + // 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 { + node.source = null; } + this.semicolon(); } - node.declaration = expr; - if (needsSemi) this.semicolon(); this.checkExport(node); - return this.finishNode(node, "ExportDefaultDeclaration"); - } else if (this.type.keyword || this.shouldParseExportDeclaration()) { - 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 === tt.string ? this.parseExprAtom() : this.unexpected(); - } else { - node.source = null; - } - this.semicolon(); - } - this.checkExport(node); - return this.finishNode(node, "ExportNamedDeclaration"); -}; + return this.finishNode(node, "ExportNamedDeclaration"); + }; -pp.isExportDefaultSpecifier = function () { - if (this.type === tt.name) { - return this.value !== "type" && this.value !== "async"; - } + pp.isExportDefaultSpecifier = function () { + if (this.type === _tokentype.types.name) { + return this.value !== "type" && this.value !== "async"; + } - if (this.type !== tt._default) { - return false; - } + if (this.type !== _tokentype.types._default) { + return false; + } - var lookahead = this.lookahead(); - return lookahead.type === tt.comma || lookahead.type === tt.name && lookahead.value === "from"; -}; + var lookahead = this.lookahead(); + return lookahead.type === _tokentype.types.comma || lookahead.type === _tokentype.types.name && lookahead.value === "from"; + }; -pp.parseExportSpecifiersMaybe = function (node) { - if (this.eat(tt.comma)) { - node.specifiers = node.specifiers.concat(this.parseExportSpecifiers()); - } -}; + pp.parseExportSpecifiersMaybe = function (node) { + if (this.eat(_tokentype.types.comma)) { + node.specifiers = node.specifiers.concat(this.parseExportSpecifiers()); + } + }; -pp.parseExportFrom = function (node) { - this.expectContextual("from"); - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); - this.semicolon(); - this.checkExport(node); -}; + pp.parseExportFrom = function (node) { + this.expectContextual("from"); + node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); + this.semicolon(); + this.checkExport(node); + }; -pp.shouldParseExportDeclaration = function () { - return this.options.features["es7.asyncFunctions"] && this.isContextual("async"); -}; + pp.shouldParseExportDeclaration = function () { + return this.options.features["es7.asyncFunctions"] && this.isContextual("async"); + }; -pp.checkExport = function (node) { - if (this.decorators.length) { - var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); - if (!node.declaration || !isClass) { - this.raise(node.start, "You can only use decorators on an export when exporting a class"); + pp.checkExport = function (node) { + if (this.decorators.length) { + var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); + if (!node.declaration || !isClass) { + this.raise(node.start, "You can only use decorators on an export when exporting a class"); + } + this.takeDecorators(node.declaration); } - this.takeDecorators(node.declaration); - } -}; + }; // Parses a comma-separated list of module exports. -pp.parseExportSpecifiers = function () { - var nodes = [], - first = true; - // export { x, y as z } [from '...'] - this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - if (!first) { - this.expect(tt.comma); - if (this.afterTrailingComma(tt.braceR)) break; - } else first = false; + 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 === tt._default); - node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - return nodes; -}; + 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 === tt.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - node.kind = ""; - } else { - node.specifiers = []; - this.parseImportSpecifiers(node); - this.expectContextual("from"); - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); -}; + 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(node); + 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 (node) { - var first = true; - if (this.type === tt.name) { - // import defaultObj, { x, y as z } from '...' - var start = this.markPosition(); - node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(), start)); - if (!this.eat(tt.comma)) return; - } - if (this.type === tt.star) { - var specifier = this.startNode(); - this.next(); - this.expectContextual("as"); - specifier.local = this.parseIdent(); - this.checkLVal(specifier.local, true); - node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier")); - return; - } - this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - if (!first) { - this.expect(tt.comma); - if (this.afterTrailingComma(tt.braceR)) break; - } else first = false; - - var specifier = this.startNode(); - specifier.imported = this.parseIdent(true); - specifier.local = this.eatContextual("as") ? this.parseIdent() : specifier.imported; - this.checkLVal(specifier.local, true); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - } -}; - -pp.parseImportSpecifierDefault = function (id, start) { - var node = this.startNodeAt(start); - node.local = id; - this.checkLVal(node.local, true); - return this.finishNode(node, "ImportDefaultSpecifier"); -}; -},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,module,exports){ -"use strict"; + pp.parseImportSpecifiers = function (node) { + var first = true; + if (this.type === _tokentype.types.name) { + // import defaultObj, { x, y as z } from '...' + var start = this.markPosition(); + node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(), start)); + if (!this.eat(_tokentype.types.comma)) return; + } + if (this.type === _tokentype.types.star) { + var specifier = this.startNode(); + this.next(); + this.expectContextual("as"); + specifier.local = this.parseIdent(); + this.checkLVal(specifier.local, true); + node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier")); + return; + } + 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 _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + var specifier = this.startNode(); + specifier.imported = this.parseIdent(true); + specifier.local = this.eatContextual("as") ? this.parseIdent() : specifier.imported; + this.checkLVal(specifier.local, true); + node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); + } + }; -exports.__esModule = true; + pp.parseImportSpecifierDefault = function (id, start) { + var node = this.startNodeAt(start); + node.local = id; + this.checkLVal(node.local, true); + return this.finishNode(node, "ImportDefaultSpecifier"); + }; +},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,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 https://github.com/mozilla/sweet.js/wiki/design -var Parser = require("./state").Parser; - -var tt = require("./tokentype").types; - -var lineBreak = require("./whitespace").lineBreak; - -var TokContext = exports.TokContext = function TokContext(token, isExpr, preserveSpace, override) { - _classCallCheck(this, TokContext); - - this.token = token; - this.isExpr = isExpr; - this.preserveSpace = preserveSpace; - this.override = override; -}; - -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 = Parser.prototype; - -pp.initialContext = function () { - return [types.b_stat]; -}; - -pp.braceIsBlock = function (prevType) { - var parent = undefined; - if (prevType === tt.colon && (parent = this.curContext()).token == "{") return !parent.isExpr; - if (prevType === tt._return) return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); - if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof) return true; - if (prevType == tt.braceL) return this.curContext() === types.b_stat; - return !this.exprAllowed; -}; - -pp.updateContext = function (prevType) { - var update = undefined, - type = this.type; - if (type.keyword && prevType == tt.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr; -}; + "use strict"; -// Token-specific context update code + exports.__esModule = true; -tt.parenR.updateContext = tt.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; - } -}; + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -tt.braceL.updateContext = function (prevType) { - this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); - this.exprAllowed = true; -}; + var _state = require("./state"); -tt.dollarBraceL.updateContext = function () { - this.context.push(types.b_tmpl); - this.exprAllowed = true; -}; + var _tokentype = require("./tokentype"); -tt.parenL.updateContext = function (prevType) { - var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while; - this.context.push(statementParens ? types.p_stat : types.p_expr); - this.exprAllowed = true; -}; + var _whitespace = require("./whitespace"); -tt.incDec.updateContext = function () {}; + var TokContext = function TokContext(token, isExpr, preserveSpace, override) { + _classCallCheck(this, TokContext); -tt._function.updateContext = function () { - if (this.curContext() !== types.b_stat) this.context.push(types.f_expr); - this.exprAllowed = false; -}; + this.token = token; + this.isExpr = isExpr; + this.preserveSpace = preserveSpace; + this.override = override; + }; -tt.backQuote.updateContext = function () { - if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); - this.exprAllowed = false; -}; + 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) + }; -// tokExprAllowed stays unchanged -},{"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,module,exports){ -"use strict"; + exports.types = types; + var pp = _state.Parser.prototype; + + pp.initialContext = function () { + return [types.b_stat]; + }; + + pp.braceIsBlock = function (prevType) { + var parent = undefined; + if (prevType === _tokentype.types.colon && (parent = this.curContext()).token == "{") 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) 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 () {}; -var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + _tokentype.types._function.updateContext = function () { + if (this.curContext() !== types.b_stat) this.context.push(types.f_expr); + this.exprAllowed = false; + }; -exports.__esModule = true; + _tokentype.types.backQuote.updateContext = function () { + if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); + this.exprAllowed = false; + }; -var _identifier = require("./identifier"); +// tokExprAllowed stays unchanged +},{"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,module,exports){ + "use strict"; -var isIdentifierStart = _identifier.isIdentifierStart; -var isIdentifierChar = _identifier.isIdentifierChar; + exports.__esModule = true; -var _tokentype = require("./tokentype"); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var tt = _tokentype.types; -var keywordTypes = _tokentype.keywords; + var _identifier = require("./identifier"); -var Parser = require("./state").Parser; + var _tokentype = require("./tokentype"); -var SourceLocation = require("./location").SourceLocation; + var _state = require("./state"); -var _whitespace = require("./whitespace"); + var _location = require("./location"); -var lineBreak = _whitespace.lineBreak; -var lineBreakG = _whitespace.lineBreakG; -var isNewLine = _whitespace.isNewLine; -var nonASCIIwhitespace = _whitespace.nonASCIIwhitespace; + var _whitespace = require("./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 = exports.Token = function Token(p) { - _classCallCheck(this, Token); + 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 _location.SourceLocation(p, p.startLoc, p.endLoc); + if (p.options.ranges) this.range = [p.start, p.end]; + }; - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) this.loc = new SourceLocation(p, p.startLoc, p.endLoc); - if (p.options.ranges) this.range = [p.start, p.end]; -}; + exports.Token = Token; // ## Tokenizer -var pp = Parser.prototype; + var pp = _state.Parser.prototype; // Move to the next token -pp.next = function () { - if (this.options.onToken) this.options.onToken(new Token(this)); + pp.next = function () { + if (this.options.onToken && !this.isLookahead) this.options.onToken(new Token(this)); - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; + 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); -}; + pp.getToken = function () { + this.next(); + return new Token(this); + }; // If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { - var self = this; - return { next: function next() { + if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { + var self = this; + return { next: function next() { var token = self.getToken(); return { - done: token.type === tt.eof, + 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 !== tt.num && this.type !== tt.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; + 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(); -}; + this.nextToken(); + }; -pp.curContext = function () { - return this.context[this.context.length - 1]; -}; + 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(tt.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 (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 <= 55295 || code >= 57344) return code; - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 56613888; -}; - -pp.skipBlockComment = function () { - var startLoc = this.options.onComment && this.options.locations && 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) { - lineBreakG.lastIndex = start; - var match = undefined; - while ((match = 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.options.locations && this.curPosition()); -}; - -pp.skipLineComment = function (startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.options.locations && 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.options.locations && this.curPosition()); -}; + pp.nextToken = function () { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) this.skipSpace(); -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. + this.start = this.pos; + if (this.options.locations) this.startLoc = this.curPosition(); + if (this.pos >= this.input.length) return this.finishToken(_tokentype.types.eof); -pp.skipSpace = function () { - while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - if (ch === 32) { - // ' ' - ++this.pos; - } else if (ch === 13) { - ++this.pos; - var next = this.input.charCodeAt(this.pos); - if (next === 10) { - ++this.pos; - } - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - } else if (ch === 10 || ch === 8232 || ch === 8233) { - ++this.pos; - if (this.options.locations) { + 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 ((0, _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 <= 55295 || code >= 57344) return code; + var next = this.input.charCodeAt(this.pos + 1); + return (code << 10) + next - 56613888; + }; + + pp.skipBlockComment = function () { + var startLoc = this.options.onComment && this.options.locations && 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 = this.pos; + this.lineStart = match.index + match[0].length; } - } else if (ch > 8 && ch < 14) { + } + if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.options.locations && this.curPosition()); + }; + + pp.skipLineComment = function (startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.options.locations && 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; - } else if (ch === 47) { - // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 42) { - // '*' - this.skipBlockComment(); - } else if (next === 47) { + 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.options.locations && this.curPosition()); + }; + +// Called at the start of the parse and after every token. Skips +// whitespace and comments, and. + + pp.skipSpace = function () { + while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + if (ch === 32) { + // ' ' + ++this.pos; + } else if (ch === 13) { + ++this.pos; + var _next = this.input.charCodeAt(this.pos); + if (_next === 10) { + ++this.pos; + } + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + } else if (ch === 10 || ch === 8232 || ch === 8233) { + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + } else if (ch > 8 && ch < 14) { + ++this.pos; + } else if (ch === 47) { // '/' - this.skipLineComment(2); - } else break; - } else if (ch === 160) { - // '\xa0' - ++this.pos; - } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break; + var _next2 = this.input.charCodeAt(this.pos + 1); + if (_next2 === 42) { + // '*' + this.skipBlockComment(); + } else if (_next2 === 47) { + // '/' + this.skipLineComment(2); + } else break; + } else if (ch === 160) { + // '\xa0' + ++this.pos; + } else if (ch >= 5760 && _whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break; + } } - } -}; + }; // 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; + 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); -}; + this.updateContext(prevType); + }; // ### Token reading @@ -4262,491 +3648,499 @@ pp.finishToken = function (type, val) { // // 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(tt.ellipsis); - } else { - ++this.pos; - return this.finishToken(tt.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(tt.assign, 2); - return this.finishOp(tt.slash, 1); -}; - -pp.readToken_mult_modulo = function (code) { - // '%*' - var type = code === 42 ? tt.star : tt.modulo; - var width = 1; - var next = this.input.charCodeAt(this.pos + 1); - - if (next === 42) { - // '*' - width++; - next = this.input.charCodeAt(this.pos + 2); - type = tt.exponent; - } - - if (next === 61) { - width++; - type = tt.assign; - } - - return this.finishOp(type, width); -}; - -pp.readToken_pipe_amp = function (code) { - // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2); - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1); -}; - -pp.readToken_caret = function () { - // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) return this.finishOp(tt.assign, 2); - return this.finishOp(tt.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 && lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { - // A `-->` line comment - this.skipLineComment(3); + 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 = function (code) { + // '%*' + var type = code === 42 ? _tokentype.types.star : _tokentype.types.modulo; + var width = 1; + var next = this.input.charCodeAt(this.pos + 1); + + if (next === 42) { + // '*' + width++; + next = this.input.charCodeAt(this.pos + 2); + type = _tokentype.types.exponent; + } + + if (next === 61) { + width++; + type = _tokentype.types.assign; + } + + return this.finishOp(type, width); + }; + + 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(); + // ` regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) -// Calling the .build method of a Def simultaneously marks the type as -// buildable (by defining builders[getBuilderName(typeName)]) and -// specifies the order of arguments that should be passed to the builder -// function to create an instance of the type. -Dp.build = function(/* param1, param2, ... */) { - var self = this; + this.debug(this.pattern, set) - // Calling Def.prototype.build multiple times has the effect of merely - // redefining this property. - Object.defineProperty(self, "buildParams", { - value: slice.call(arguments), - writable: false, - enumerable: false, - configurable: true - }); + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return -1 === s.indexOf(false) + }) - assert.strictEqual(self.finalized, false); - isString.arrayOf().assert(self.buildParams); + this.debug(this.pattern, set) - if (self.buildable) { - // If this Def is already buildable, update self.buildParams and - // continue using the old builder function. - return self; + this.set = set } - // Every buildable type will have its "type" field filled in - // automatically. This includes types that are not subtypes of Node, - // like SourceLocation, but that seems harmless (TODO?). - self.field("type", self.typeName, function() { return self.typeName }); + Minimatch.prototype.parseNegate = parseNegate + function parseNegate () { + var pattern = this.pattern + , negate = false + , options = this.options + , negateOffset = 0 - // Override Dp.buildable for this Def instance. - Object.defineProperty(self, "buildable", { value: true }); - - Object.defineProperty(builders, getBuilderName(self.typeName), { - enumerable: true, + if (options.nonegate) return - value: function() { - var args = arguments; - var argc = args.length; - var built = Object.create(nodePrototype); + for ( var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === "!" + ; i ++) { + negate = !negate + negateOffset ++ + } - assert.ok( - self.finalized, - "attempting to instantiate unfinalized type " + self.typeName); - - function add(param, i) { - if (hasOwn.call(built, param)) - return; - - var all = self.allFields; - assert.ok(hasOwn.call(all, param), param); - - var field = all[param]; - var type = field.type; - var value; - - if (isNumber.check(i) && i < argc) { - value = args[i]; - } else if (field.defaultFn) { - // Expose the partially-built object to the default - // function as its `this` object. - value = field.defaultFn.call(built); - } else { - var message = "no value or default function given for field " + - JSON.stringify(param) + " of " + self.typeName + "(" + - self.buildParams.map(function(name) { - return all[name]; - }).join(", ") + ")"; - assert.ok(false, message); - } + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate + } - if (!type.check(value)) { - assert.ok( - false, - shallowStringify(value) + - " does not match field " + field + - " of type " + self.typeName - ); - } +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c + minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) + } - // TODO Could attach getters and setters here to enforce - // dynamic type safety. - built[param] = value; - } + Minimatch.prototype.braceExpand = braceExpand - self.buildParams.forEach(function(param, i) { - add(param, i); - }); + function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) + options = this.options + else + options = {} + } - Object.keys(self.allFields).forEach(function(param) { - add(param); // Use the default value. - }); + pattern = typeof pattern === "undefined" + ? this.pattern : pattern - // Make sure that the "type" field was filled automatically. - assert.strictEqual(built.type, self.typeName); + if (typeof pattern === "undefined") { + throw new Error("undefined pattern") + } - return built; - } - }); + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } - return self; // For chaining. -}; + return expand(pattern) + } -function getBuilderName(typeName) { - return typeName.replace(/^[A-Z]+/, function(upperCasePrefix) { - var len = upperCasePrefix.length; - switch (len) { - case 0: return ""; - // If there's only one initial capital letter, just lower-case it. - case 1: return upperCasePrefix.toLowerCase(); - default: - // If there's more than one initial capital letter, lower-case - // all but the last one, so that XMLDefaultDeclaration (for - // example) becomes xmlDefaultDeclaration. - return upperCasePrefix.slice( - 0, len - 1).toLowerCase() + - upperCasePrefix.charAt(len - 1); +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. + Minimatch.prototype.parse = parse + var SUBPARSE = {} + function parse (pattern, isSub) { + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === "**") return GLOBSTAR + if (pattern === "") return "" + + var re = "" + , hasMagic = !!options.nocase + , escaping = false + // ? => one single character + , patternListStack = [] + , plType + , stateChar + , inClass = false + , reClassStart = -1 + , classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + , patternStart = pattern.charAt(0) === "." ? "" // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" + : "(?!\\.)" + , self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case "*": + re += star + hasMagic = true + break + case "?": + re += qmark + hasMagic = true + break + default: + re += "\\"+stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false } - }); -} + } -// The reason fields are specified using .field(...) instead of an object -// literal syntax is somewhat subtle: the object literal syntax would -// support only one key and one value, but with .field(...) we can pass -// any number of arguments to specify the field. -Dp.field = function(name, type, defaultFn, hidden) { - assert.strictEqual(this.finalized, false); - this.ownFields[name] = new Field(name, type, defaultFn, hidden); - return this; // For chaining. -}; + for ( var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i ++ ) { -var namedTypes = {}; -exports.namedTypes = namedTypes; + this.debug("%s\t%s %s %j", pattern, i, re, c) -// Like Object.keys, but aware of what fields each AST type should have. -function getFieldNames(object) { - var d = Def.fromValue(object); - if (d) { - return d.fieldNames.slice(0); - } + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += "\\" + c + escaping = false + continue + } - if ("type" in object) { - assert.ok( - false, - "did not recognize object of type " + - JSON.stringify(object.type) - ); - } + SWITCH: switch (c) { + case "/": + // completely not allowed, even escaped. + // Should already be path-split by now. + return false - return Object.keys(object); -} -exports.getFieldNames = getFieldNames; + case "\\": + clearStateChar() + escaping = true + continue -// Get the value of an object property, taking object.type and default -// functions into account. -function getFieldValue(object, fieldName) { - var d = Def.fromValue(object); - if (d) { - var field = d.allFields[fieldName]; - if (field) { - return field.getValue(object); - } - } + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === "!" && i === classStart + 1) c = "^" + re += c + continue + } - return object[fieldName]; -} -exports.getFieldValue = getFieldValue; + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue -// Iterate over all defined fields of an object, including those missing -// or undefined, passing each field name and effective value (as returned -// by getFieldValue) to the callback. If the object has no corresponding -// Def, the callback will never be called. -exports.eachField = function(object, callback, context) { - getFieldNames(object).forEach(function(name) { - callback.call(this, name, getFieldValue(object, name)); - }, context); -}; + case "(": + if (inClass) { + re += "(" + continue + } -// Similar to eachField, except that iteration stops as soon as the -// callback returns a truthy value. Like Array.prototype.some, the final -// result is either true or false to indicates whether the callback -// returned true for any element or not. -exports.someField = function(object, callback, context) { - return getFieldNames(object).some(function(name) { - return callback.call(this, name, getFieldValue(object, name)); - }, context); -}; + if (!stateChar) { + re += "\\(" + continue + } -// This property will be overridden as true by individual Def instances -// when they are finalized. -Object.defineProperty(Dp, "finalized", { value: false }); + plType = stateChar + patternListStack.push({ type: plType + , start: i - 1 + , reStart: re.length }) + // negation is (?:(?!js)[^/]*) + re += stateChar === "!" ? "(?:(?!" : "(?:" + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue -Dp.finalize = function() { - // It's not an error to finalize a type more than once, but only the - // first call to .finalize does anything. - if (!this.finalized) { - var allFields = this.allFields; - var allSupertypes = this.allSupertypes; - - this.baseNames.forEach(function(name) { - var def = defCache[name]; - def.finalize(); - extend(allFields, def.allFields); - extend(allSupertypes, def.allSupertypes); - }); + case ")": + if (inClass || !patternListStack.length) { + re += "\\)" + continue + } - // TODO Warn if fields are overridden with incompatible types. - extend(allFields, this.ownFields); - allSupertypes[this.typeName] = this; + clearStateChar() + hasMagic = true + re += ")" + plType = patternListStack.pop().type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case "!": + re += "[^/]*?)" + break + case "?": + case "+": + case "*": re += plType + case "@": break // the default anyway + } + continue - this.fieldNames.length = 0; - for (var fieldName in allFields) { - if (hasOwn.call(allFields, fieldName) && - !allFields[fieldName].hidden) { - this.fieldNames.push(fieldName); + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|" + escaping = false + continue } - } - // Types are exported only once they have been finalized. - Object.defineProperty(namedTypes, this.typeName, { - enumerable: true, - value: this.type - }); + clearStateChar() + re += "|" + continue - Object.defineProperty(this, "finalized", { value: true }); + // these are mostly the same in regexp and glob + case "[": + // swallow any state-tracking char before the [ + clearStateChar() - // A linearization of the inheritance hierarchy. - populateSupertypeList(this.typeName, this.supertypeList); - } -}; + if (inClass) { + re += "\\" + c + continue + } -function populateSupertypeList(typeName, list) { - list.length = 0; - list.push(typeName); + inClass = true + classStart = i + reClassStart = re.length + re += c + continue - var lastSeen = Object.create(null); + case "]": + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += "\\" + c + escaping = false + continue + } - for (var pos = 0; pos < list.length; ++pos) { - typeName = list[pos]; - var d = defCache[typeName]; - assert.strictEqual(d.finalized, true); + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + new RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + "\\[" + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } - // If we saw typeName earlier in the breadth-first traversal, - // delete the last-seen occurrence. - if (hasOwn.call(lastSeen, typeName)) { - delete list[lastSeen[typeName]]; - } + // finish up the class. + hasMagic = true + inClass = false + re += c + continue - // Record the new index of the last-seen occurrence of typeName. - lastSeen[typeName] = pos; + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === "^" && inClass)) { + re += "\\" + } - // Enqueue the base names of this type. - list.push.apply(list, d.baseNames); - } + re += c + + } // switch + } // for + + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + var cs = pattern.substr(classStart + 1) + , sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + "\\[" + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + var pl + while (pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = "\\" + } - // Compaction loop to remove array holes. - for (var to = 0, from = to, len = list.length; from < len; ++from) { - if (hasOwn.call(list, from)) { - list[to++] = list[from]; - } - } + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + "|" + }) - list.length = to; -} + this.debug("tail=%j\n %s", tail, tail) + var t = pl.type === "*" ? star + : pl.type === "?" ? qmark + : "\\" + pl.type -function extend(into, from) { - Object.keys(from).forEach(function(name) { - into[name] = from[name]; - }); + hasMagic = true + re = re.slice(0, pl.reStart) + + t + "\\(" + + tail + } - return into; -}; + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += "\\\\" + } -exports.finalize = function() { - Object.keys(defCache).forEach(function(name) { - defCache[name].finalize(); - }); -}; + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case ".": + case "[": + case "(": addPatternStart = true + } -},{"assert":173}],171:[function(require,module,exports){ -var types = require("./lib/types"); + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== "" && hasMagic) re = "(?=.)" + re -// This core module of AST types captures ES5 as it is parsed today by -// git://github.com/ariya/esprima.git#master. -require("./def/core"); + if (addPatternStart) re = patternStart + re -// Feel free to add to or remove from this list of extension modules to -// configure the precise type hierarchy that you need. -require("./def/es6"); -require("./def/es7"); -require("./def/mozilla"); -require("./def/e4x"); -require("./def/fb-harmony"); - -types.finalize(); - -exports.Type = types.Type; -exports.builtInTypes = types.builtInTypes; -exports.namedTypes = types.namedTypes; -exports.builders = types.builders; -exports.defineMethod = types.defineMethod; -exports.getFieldNames = types.getFieldNames; -exports.getFieldValue = types.getFieldValue; -exports.eachField = types.eachField; -exports.someField = types.someField; -exports.getSupertypeNames = types.getSupertypeNames; -exports.astNodesAreEquivalent = require("./lib/equiv"); -exports.finalize = types.finalize; -exports.NodePath = require("./lib/node-path"); -exports.PathVisitor = require("./lib/path-visitor"); -exports.visit = exports.PathVisitor.visit; - -},{"./def/core":158,"./def/e4x":159,"./def/es6":160,"./def/es7":161,"./def/fb-harmony":162,"./def/mozilla":163,"./lib/equiv":164,"./lib/node-path":165,"./lib/path-visitor":166,"./lib/types":170}],172:[function(require,module,exports){ - -},{}],173:[function(require,module,exports){ -// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 -// -// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! -// -// Originally from narwhal.js (http://narwhaljs.org) -// Copyright (c) 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. + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [ re, hasMagic ] + } -// 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/'); + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } -var pSlice = Array.prototype.slice; -var hasOwn = Object.prototype.hasOwnProperty; + var flags = options.nocase ? "i" : "" + , regExp = new RegExp("^" + re + "$", flags) -// 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. + regExp._glob = pattern + regExp._src = re -var assert = module.exports = ok; + return regExp + } -// 2. The AssertionError is defined in assert. -// new assert.AssertionError({ message: message, -// actual: actual, -// expected: expected }) + minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() + } -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; + Minimatch.prototype.makeRe = makeRe + function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp - 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; + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) return this.regexp = false + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + , flags = options.nocase ? "i" : "" + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === "string") ? regExpEscape(p) + : p._src + }).join("\\\/") + }).join("|") + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = "^(?:" + re + ")$" + + // can match anything, as long as it's not this. + if (this.negate) re = "^(?!" + re + ").*$" - // try 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); + try { + return this.regexp = new RegExp(re, flags) + } catch (ex) { + return this.regexp = false } + } - this.stack = out; + minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list } - } -}; -// assert.AssertionError instanceof Error -util.inherits(assert.AssertionError, Error); + Minimatch.prototype.match = match + function match (f, partial) { + this.debug("match", f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === "" -function 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; -} + if (f === "/" && partial) return true -function truncate(s, n) { - if (util.isString(s)) { - return s.length < n ? s : s.slice(0, n); - } else { - return s; - } -} + var options = this.options -function getMessage(self) { - return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + - self.operator + ' ' + - truncate(JSON.stringify(self.expected, replacer), 128); -} + // windows: need to use /, not \ + if (isWindows) + f = f.split("\\").join("/") -// 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. + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, "split", f) -// 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. + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} + var set = this.set + this.debug(this.pattern, "set", set) -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; + // Find the basename of the path by looking for the last non-empty segment + var filename; + for (var i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } -// 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);. + for (var i = 0, l = set.length; i < l; i ++) { + var pattern = set[i], file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } -function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate + } -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. + Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug("matchOne", + { "this": this + , file: file + , pattern: pattern }) + + this.debug("matchOne", file.length, pattern.length) + + for ( var fi = 0 + , pi = 0 + , fl = file.length + , pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi ++, pi ++ ) { + + this.debug("matchOne loop") + var p = pattern[pi] + , f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + , pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for ( ; fi < fl; fi ++) { + if (file[fi] === "." || file[fi] === ".." || + (!options.dot && file[fi].charAt(0) === ".")) return false + } + return true + } -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, '==', assert.equal); -}; + // ok, let's see if we can swallow whatever we can. + WHILE: while (fr < fl) { + var swallowee = file[fr] -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); + this.debug('\nglobstar while', + file, fr, pattern, pr, swallowee) -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === "." || swallowee === ".." || + (!options.dot && swallowee.charAt(0) === ".")) { + this.debug("dot detected!", file, fr, pattern, pr) + break WHILE + } -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr ++ + } + } + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug("\n>>> no match, partial?", file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === "string") { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug("string match", p, f, hit) + } else { + hit = f.match(p) + this.debug("pattern match", p, f, hit) + } -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; + if (!hit) return false + } - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") + return emptyFileEnd + } - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; + // should be unreachable. + throw new Error("wtf?") } - 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); - } -} +// replace stuff like \* with * + function globUnescape (s) { + return s.replace(/\\(.)/g, "$1") + } -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; -} + function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") + } -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); + }).call(this,require('_process')) +},{"_process":213,"brace-expansion":444}],444:[function(require,module,exports){ + var concatMap = require('concat-map'); + var balanced = require('balanced-match'); -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; + module.exports = expandTop; -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); + var escSlash = '\0SLASH'+Math.random()+'\0'; + var escOpen = '\0OPEN'+Math.random()+'\0'; + var escClose = '\0CLOSE'+Math.random()+'\0'; + var escComma = '\0COMMA'+Math.random()+'\0'; + var escPeriod = '\0PERIOD'+Math.random()+'\0'; -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); + function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); } -}; - -// 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 escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); } -}; -function expectedException(actual, expected) { - if (!actual || !expected) { - return false; + function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); } - 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; -} +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} + function parseCommaParts(str) { + if (!str) + return ['']; -function _throws(shouldThrow, block, expected, message) { - var actual; + var parts = []; + var m = balanced('{', '}', str); - if (util.isString(expected)) { - message = expected; - expected = null; - } + if (!m) + return str.split(','); - try { - block(); - } catch (e) { - actual = e; - } + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); - message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + - (message ? ' ' + message : '.'); + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } - if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } + parts.push.apply(parts, p); - if (!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); + return parts; } - if ((shouldThrow && actual && expected && - !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} + function expandTop(str) { + if (!str) + return []; -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); + return expand(escapeBraces(str), true).map(unescapeBraces); + } -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; + function identity(e) { + return e; + } -// 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/":199}],174:[function(require,module,exports){ -arguments[4][172][0].apply(exports,arguments) -},{"dup":172}],175:[function(require,module,exports){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var isArray = require('is-array') - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 -Buffer.poolSize = 8192 // not used by this implementation - -var kMaxLength = 0x3fffffff -var rootParent = {} - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Note: - * - * - Implementation must support adding new properties to `Uint8Array` instances. - * Firefox 4-29 lacked support, fixed in Firefox 30+. - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - * - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will - * get the Object implementation, which is slower but will work correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = (function () { - try { - var buf = new ArrayBuffer(0) - var arr = new Uint8Array(buf) - arr.foo = function () { return 42 } - return arr.foo() === 42 && // typed array instances can be augmented - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -})() - -/** - * Class: Buffer - * ============= - * - * The Buffer constructor returns instances of `Uint8Array` that are augmented - * with function properties for all the node `Buffer` API functions. We use - * `Uint8Array` so that square bracket notation works as expected -- it returns - * a single octet. - * - * By augmenting the instances, we can avoid modifying the `Uint8Array` - * prototype. - */ -function Buffer (subject, encoding) { - var self = this - if (!(self instanceof Buffer)) return new Buffer(subject, encoding) - - var type = typeof subject - var length - - if (type === 'number') { - length = +subject - } else if (type === 'string') { - length = Buffer.byteLength(subject, encoding) - } else if (type === 'object' && subject !== null) { - // assume object is array-like - if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data - length = +subject.length - } else { - throw new TypeError('must start with number, buffer, array or string') + function embrace(str) { + return '{' + str + '}'; + } + function isPadded(el) { + return /^-?0\d/.test(el); } - if (length > kMaxLength) { - throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + - kMaxLength.toString(16) + ' bytes') + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; } - if (length < 0) length = 0 - else length >>>= 0 // coerce to uint32 + function expand(str, isTop) { + var expansions = []; - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Preferred: Return an augmented `Uint8Array` instance for best performance - self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this - } else { - // Fallback: Return THIS instance of Buffer (created by `new`) - self.length = length - self._isBuffer = true - } - - var i - if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') { - // Speed optimization -- use set if we're copying from a typed array - self._set(subject) - } else if (isArrayish(subject)) { - // Treat array-ish objects as a byte array - if (Buffer.isBuffer(subject)) { - for (i = 0; i < length; i++) { - self[i] = subject.readUInt8(i) + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = /^(.*,)+(.+)?$/.test(m.body); + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); } else { - for (i = 0; i < length; i++) { - self[i] = ((subject[i] % 256) + 256) % 256 + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } } } - } else if (type === 'string') { - self.write(subject, 0, encoding) - } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) { - for (i = 0; i < length; i++) { - self[i] = 0 - } - } - - if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent - return self -} + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. -function SlowBuffer (subject, encoding) { - if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; - var buf = new Buffer(subject, encoding) - delete buf.parent - return buf -} + var N; -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } + N = []; - if (a === b) return 0 + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } - var x = a.length - var y = b.length - for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {} - if (i !== len) { - x = a[i] - y = b[i] - } - if (x < y) return -1 - if (y < x) return 1 - return 0 -} + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'raw': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false + return expansions; } -} -Buffer.concat = function concat (list, totalLength) { - if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') - if (list.length === 0) { - return new Buffer(0) - } else if (list.length === 1) { - return list[0] - } +},{"balanced-match":445,"concat-map":446}],445:[function(require,module,exports){ + module.exports = balanced; + function balanced(a, b, str) { + var bal = 0; + var m = {}; + var ended = false; - var i - if (totalLength === undefined) { - totalLength = 0 - for (i = 0; i < list.length; i++) { - totalLength += list[i].length - } - } - - var buf = new Buffer(totalLength) - var pos = 0 - for (i = 0; i < list.length; i++) { - var item = list[i] - item.copy(buf, pos) - pos += item.length - } - return buf -} - -Buffer.byteLength = function byteLength (str, encoding) { - var ret - str = str + '' - switch (encoding || 'utf8') { - case 'ascii': - case 'binary': - case 'raw': - ret = str.length - break - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - ret = str.length * 2 - break - case 'hex': - ret = str.length >>> 1 - break - case 'utf8': - case 'utf-8': - ret = utf8ToBytes(str).length - break - case 'base64': - ret = base64ToBytes(str).length - break - default: - ret = str.length - } - return ret -} + for (var i = 0; i < str.length; i++) { + if (a == str.substr(i, a.length)) { + if (!('start' in m)) m.start = i; + bal++; + } + else if (b == str.substr(i, b.length) && 'start' in m) { + ended = true; + bal--; + if (!bal) { + m.end = i; + m.pre = str.substr(0, m.start); + m.body = (m.end - m.start > 1) + ? str.substring(m.start + a.length, m.end) + : ''; + m.post = str.slice(m.end + b.length); + return m; + } + } + } -// pre-set for values that may exist in the future -Buffer.prototype.length = undefined -Buffer.prototype.parent = undefined + // if we opened more than we closed, find the one we closed + if (bal && ended) { + var start = m.start + a.length; + m = balanced(a, b, str.substr(start)); + if (m) { + m.start += start; + m.end += start; + m.pre = str.slice(0, start) + m.pre; + } + return m; + } + } -// toString(encoding, start=0, end=buffer.length) -Buffer.prototype.toString = function toString (encoding, start, end) { - var loweredCase = false +},{}],446:[function(require,module,exports){ + module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; - start = start >>> 0 - end = end === undefined || end === Infinity ? this.length : end >>> 0 + var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; + }; - if (!encoding) encoding = 'utf8' - if (start < 0) start = 0 - if (end > this.length) end = this.length - if (end <= start) return '' +},{}],447:[function(require,module,exports){ + (function (process){ + 'use strict'; - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) + function posix(path) { + return path.charAt(0) === '/'; + }; - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) + function win32(path) { + // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = !!device && device.charAt(1) !== ':'; - case 'ascii': - return asciiSlice(this, start, end) + // UNC paths are always absolute + return !!result[2] || isUnc; + }; - case 'binary': - return binarySlice(this, start, end) + module.exports = process.platform === 'win32' ? win32 : posix; + module.exports.posix = posix; + module.exports.win32 = win32; - case 'base64': - return base64Slice(this, start, end) + }).call(this,require('_process')) +},{"_process":213}],448:[function(require,module,exports){ + "use strict"; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) + var originalObject = Object; + var originalDefProp = Object.defineProperty; + var originalCreate = Object.create; - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true + function defProp(obj, name, value) { + if (originalDefProp) try { + originalDefProp.call(originalObject, obj, name, { value: value }); + } catch (definePropertyIsBrokenInIE8) { + obj[name] = value; + } else { + obj[name] = value; } } -} -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' +// For functions that will be invoked using .call or .apply, we need to +// define those methods on the function objects themselves, rather than +// inheriting them from Function.prototype, so that a malicious or clumsy +// third party cannot interfere with the functionality of this module by +// redefining Function.prototype.call or .apply. + function makeSafeToCall(fun) { + if (fun) { + defProp(fun, "call", fun.call); + defProp(fun, "apply", fun.apply); + } + return fun; } - return '' -} -Buffer.prototype.compare = function compare (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return 0 - return Buffer.compare(this, b) -} + makeSafeToCall(originalDefProp); + makeSafeToCall(originalCreate); -Buffer.prototype.indexOf = function indexOf (val, byteOffset) { - if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff - else if (byteOffset < -0x80000000) byteOffset = -0x80000000 - byteOffset >>= 0 + var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty); + var numToStr = makeSafeToCall(Number.prototype.toString); + var strSlice = makeSafeToCall(String.prototype.slice); - if (this.length === 0) return -1 - if (byteOffset >= this.length) return -1 + var cloner = function(){}; + function create(prototype) { + if (originalCreate) { + return originalCreate.call(originalObject, prototype); + } + cloner.prototype = prototype || null; + return new cloner; + } - // Negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) + var rand = Math.random; + var uniqueKeys = create(null); - if (typeof val === 'string') { - if (val.length === 0) return -1 // special case: looking for empty string always fails - return String.prototype.indexOf.call(this, val, byteOffset) - } - if (Buffer.isBuffer(val)) { - return arrayIndexOf(this, val, byteOffset) - } - if (typeof val === 'number') { - if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { - return Uint8Array.prototype.indexOf.call(this, val, byteOffset) - } - return arrayIndexOf(this, [ val ], byteOffset) + function makeUniqueKey() { + // Collisions are highly unlikely, but this module is in the business of + // making guarantees rather than safe bets. + do var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2)); + while (hasOwn.call(uniqueKeys, uniqueKey)); + return uniqueKeys[uniqueKey] = uniqueKey; } - function arrayIndexOf (arr, val, byteOffset) { - var foundIndex = -1 - for (var i = 0; byteOffset + i < arr.length; i++) { - if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex - } else { - foundIndex = -1 - } - } - return -1 + function internString(str) { + var obj = {}; + obj[str] = true; + return Object.keys(obj)[0]; } - throw new TypeError('val must be string, number or Buffer') -} +// External users might find this function useful, but it is not necessary +// for the typical use of this module. + defProp(exports, "makeUniqueKey", makeUniqueKey); -// `get` will be removed in Node 0.13+ -Buffer.prototype.get = function get (offset) { - console.log('.get() is deprecated. Access using array indexes instead.') - return this.readUInt8(offset) -} +// Object.getOwnPropertyNames is the only way to enumerate non-enumerable +// properties, so if we wrap it to ignore our secret keys, there should be +// no way (except guessing) to access those properties. + var originalGetOPNs = Object.getOwnPropertyNames; + Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + for (var names = originalGetOPNs(object), + src = 0, + dst = 0, + len = names.length; + src < len; + ++src) { + if (!hasOwn.call(uniqueKeys, names[src])) { + if (src > dst) { + names[dst] = names[src]; + } + ++dst; + } + } + names.length = dst; + return names; + }; -// `set` will be removed in Node 0.13+ -Buffer.prototype.set = function set (v, offset) { - console.log('.set() is deprecated. Access using array indexes instead.') - return this.writeUInt8(v, offset) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } + function defaultCreatorFn(object) { + return create(null); } - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new Error('Invalid hex string') + function makeAccessor(secretCreatorFn) { + var brand = makeUniqueKey(); + var passkey = create(null); - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; i++) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) throw new Error('Invalid hex string') - buf[offset + i] = parsed - } - return i -} + secretCreatorFn = secretCreatorFn || defaultCreatorFn; -function utf8Write (buf, string, offset, length) { - var charsWritten = blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) - return charsWritten -} + function register(object) { + var secret; // Created lazily. -function asciiWrite (buf, string, offset, length) { - var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length) - return charsWritten -} + function vault(key, forget) { + // Only code that has access to the passkey can retrieve (or forget) + // the secret object. + if (key === passkey) { + return forget + ? secret = null + : secret || (secret = secretCreatorFn(object)); + } + } -function binaryWrite (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} + defProp(object, brand, vault); + } -function base64Write (buf, string, offset, length) { - var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length) - return charsWritten -} + function accessor(object) { + if (!hasOwn.call(object, brand)) + register(object); + return object[brand](passkey); + } -function utf16leWrite (buf, string, offset, length) { - var charsWritten = blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) - return charsWritten -} + accessor.forget = function(object) { + if (hasOwn.call(object, brand)) + object[brand](passkey, true); + }; -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Support both (string, offset, length, encoding) - // and the legacy (string, encoding, offset, length) - if (isFinite(offset)) { - if (!isFinite(length)) { - encoding = length - length = undefined - } - } else { // legacy - var swap = encoding - encoding = offset - offset = length - length = swap + return accessor; } - offset = Number(offset) || 0 + defProp(exports, "makeAccessor", makeAccessor); - if (length < 0 || offset < 0 || offset > this.length) { - throw new RangeError('attempt to write outside buffer bounds') - } +},{}],449:[function(require,module,exports){ + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ - var remaining = this.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - encoding = String(encoding || 'utf8').toLowerCase() - - var ret - switch (encoding) { - case 'hex': - ret = hexWrite(this, string, offset, length) - break - case 'utf8': - case 'utf-8': - ret = utf8Write(this, string, offset, length) - break - case 'ascii': - ret = asciiWrite(this, string, offset, length) - break - case 'binary': - ret = binaryWrite(this, string, offset, length) - break - case 'base64': - ret = base64Write(this, string, offset, length) - break - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - ret = utf16leWrite(this, string, offset, length) - break - default: - throw new TypeError('Unknown encoding: ' + encoding) - } - return ret -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) + var assert = require("assert"); + var types = require("recast").types; + var isArray = types.builtInTypes.array; + var b = types.builders; + var n = types.namedTypes; + var leap = require("./leap"); + var meta = require("./meta"); + var util = require("./util"); + var runtimeProperty = util.runtimeProperty; + var hasOwn = Object.prototype.hasOwnProperty; + + function Emitter(contextId) { + assert.ok(this instanceof Emitter); + n.Identifier.assert(contextId); + + // Used to generate unique temporary names. + this.nextTempId = 0; + + Object.defineProperties(this, { + // In order to make sure the context object does not collide with + // anything in the local scope, we might have to rename it, so we + // refer to it symbolically instead of just assuming that it will be + // called "context". + contextId: { value: contextId }, + + // An append-only list of Statements that grows each time this.emit is + // called. + listing: { value: [] }, + + // A sparse array whose keys correspond to locations in this.listing + // that have been marked as branch/jump targets. + marked: { value: [true] }, + + // The last location will be marked when this.getDispatchLoop is + // called. + finalLoc: { value: loc() }, + + // A list of all leap.TryEntry statements emitted. + tryEntries: { value: [] } + }); + + // The .leapManager property needs to be defined by a separate + // defineProperties call so that .finalLoc will be visible to the + // leap.LeapManager constructor. + Object.defineProperties(this, { + // Each time we evaluate the body of a loop, we tell this.leapManager + // to enter a nested loop context that determines the meaning of break + // and continue statements therein. + leapManager: { value: new leap.LeapManager(this) } + }); } -} -function utf8Slice (buf, start, end) { - var res = '' - var tmp = '' - end = Math.min(buf.length, end) + var Ep = Emitter.prototype; + exports.Emitter = Emitter; + +// Offsets into this.listing that could be used as targets for branches or +// jumps are represented as numeric Literal nodes. This representation has +// the amazingly convenient benefit of allowing the exact value of the +// location to be determined at any time, even after generating code that +// refers to the location. + function loc() { + return b.literal(-1); + } - for (var i = start; i < end; i++) { - if (buf[i] <= 0x7F) { - res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) - tmp = '' +// Sets the exact value of the given location to the offset of the next +// Statement emitted. + Ep.mark = function(loc) { + n.Literal.assert(loc); + var index = this.listing.length; + if (loc.value === -1) { + loc.value = index; } else { - tmp += '%' + buf[i].toString(16) + // Locations can be marked redundantly, but their values cannot change + // once set the first time. + assert.strictEqual(loc.value, index); } - } + this.marked[index] = true; + return loc; + }; - return res + decodeUtf8Char(tmp) -} + Ep.emit = function(node) { + if (n.Expression.check(node)) + node = b.expressionStatement(node); + n.Statement.assert(node); + this.listing.push(node); + }; -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) +// Shorthand for emitting assignment statements. This will come in handy +// for assignments to temporary variables. + Ep.emitAssign = function(lhs, rhs) { + this.emit(this.assign(lhs, rhs)); + return lhs; + }; - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} +// Shorthand for an assignment statement. + Ep.assign = function(lhs, rhs) { + return b.expressionStatement( + b.assignmentExpression("=", lhs, rhs)); + }; -function binarySlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) +// Convenience function for generating expressions like context.next, +// context.sent, and context.rval. + Ep.contextProperty = function(name, computed) { + return b.memberExpression( + this.contextId, + computed ? b.literal(name) : b.identifier(name), + !!computed + ); + }; - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i]) - } - return ret -} + var volatileContextPropertyNames = { + prev: true, + next: true, + sent: true, + rval: true + }; + +// A "volatile" context property is a MemberExpression like context.sent +// that should probably be stored in a temporary variable when there's a +// possibility the property will get overwritten. + Ep.isVolatileContextProperty = function(expr) { + if (n.MemberExpression.check(expr)) { + if (expr.computed) { + // If it's a computed property such as context[couldBeAnything], + // assume the worst in terms of volatility. + return true; + } -function hexSlice (buf, start, end) { - var len = buf.length + if (n.Identifier.check(expr.object) && + n.Identifier.check(expr.property) && + expr.object.name === this.contextId.name && + hasOwn.call(volatileContextPropertyNames, + expr.property.name)) { + return true; + } + } - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len + return false; + }; - var out = '' - for (var i = start; i < end; i++) { - out += toHex(buf[i]) - } - return out -} +// Shorthand for setting context.rval and jumping to `context.stop()`. + Ep.stop = function(rval) { + if (rval) { + this.setReturnValue(rval); + } -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} + this.jump(this.finalLoc); + }; -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end + Ep.setReturnValue = function(valuePath) { + n.Expression.assert(valuePath.value); - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } + this.emitAssign( + this.contextProperty("rval"), + this.explodeExpression(valuePath) + ); + }; - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } + Ep.clearPendingException = function(tryLoc, assignee) { + n.Literal.assert(tryLoc); - if (end < start) end = start + var catchCall = b.callExpression( + this.contextProperty("catch", true), + [tryLoc] + ); - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = Buffer._augment(this.subarray(start, end)) - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; i++) { - newBuf[i] = this[i + start] + if (assignee) { + this.emitAssign(assignee, catchCall); + } else { + this.emit(catchCall); } - } + }; - if (newBuf.length) newBuf.parent = this.parent || this +// Emits code for an unconditional jump to the given location, even if the +// exact value of the location is not yet known. + Ep.jump = function(toLoc) { + this.emitAssign(this.contextProperty("next"), toLoc); + this.emit(b.breakStatement()); + }; - return newBuf -} +// Conditional jump. + Ep.jumpIf = function(test, toLoc) { + n.Expression.assert(test); + n.Literal.assert(toLoc); + + this.emit(b.ifStatement( + test, + b.blockStatement([ + this.assign(this.contextProperty("next"), toLoc), + b.breakStatement() + ]) + )); + }; -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} +// Conditional jump, with the condition negated. + Ep.jumpIfNot = function(test, toLoc) { + n.Expression.assert(test); + n.Literal.assert(toLoc); + + var negatedTest; + if (n.UnaryExpression.check(test) && + test.operator === "!") { + // Avoid double negation. + negatedTest = test.argument; + } else { + negatedTest = b.unaryExpression("!", test); + } -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) + this.emit(b.ifStatement( + negatedTest, + b.blockStatement([ + this.assign(this.contextProperty("next"), toLoc), + b.breakStatement() + ]) + )); + }; - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } +// Returns a unique MemberExpression that can be used to store and +// retrieve temporary values. Since the object of the member expression is +// the context object, which is presumed to coexist peacefully with all +// other local variables, and since we just increment `nextTempId` +// monotonically, uniqueness is assured. + Ep.makeTempVar = function() { + return this.contextProperty("t" + this.nextTempId++); + }; - return val -} + Ep.getContextFunction = function(id) { + return b.functionExpression( + id || null/*Anonymous*/, + [this.contextId], + b.blockStatement([this.getDispatchLoop()]), + false, // Not a generator anymore! + false // Nor an expression. + ); + }; -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } +// Turns this.listing into a loop of the form +// +// while (1) switch (context.next) { +// case 0: +// ... +// case n: +// return context.stop(); +// } +// +// Each marked location in this.listing will correspond to one generated +// case statement. + Ep.getDispatchLoop = function() { + var self = this; + var cases = []; + var current; - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } + // If we encounter a break, continue, or return statement in a switch + // case, we can skip the rest of the statements until the next case. + var alreadyEnded = false; - return val -} + self.listing.forEach(function(stmt, i) { + if (self.marked.hasOwnProperty(i)) { + cases.push(b.switchCase( + b.literal(i), + current = [])); + alreadyEnded = false; + } -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} + if (!alreadyEnded) { + current.push(stmt); + if (isSwitchCaseEnder(stmt)) + alreadyEnded = true; + } + }); -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} + // Now that we know how many statements there will be in this.listing, + // we can finally resolve this.finalLoc.value. + this.finalLoc.value = this.listing.length; + + cases.push( + b.switchCase(this.finalLoc, [ + // Intentionally fall through to the "end" case... + ]), + + // So that the runtime can jump to the final location without having + // to know its offset, we provide the "end" case as a synonym. + b.switchCase(b.literal("end"), [ + // This will check/clear both context.thrown and context.rval. + b.returnStatement( + b.callExpression(this.contextProperty("stop"), []) + ) + ]) + ); -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} + return b.whileStatement( + b.literal(1), + b.switchStatement( + b.assignmentExpression( + "=", + this.contextProperty("prev"), + this.contextProperty("next") + ), + cases + ) + ); + }; -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) >>> 0 & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) >>> 0 & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = value - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = value - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = value - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = value - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkInt( - this, value, offset, byteLength, - Math.pow(2, 8 * byteLength - 1) - 1, - -Math.pow(2, 8 * byteLength - 1) - ) - } - - var i = 0 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkInt( - this, value, offset, byteLength, - Math.pow(2, 8 * byteLength - 1) - 1, - -Math.pow(2, 8 * byteLength - 1) - ) - } - - var i = byteLength - 1 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = value - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = value - } else { - objectWriteUInt16(this, value, offset, false) +// See comment above re: alreadyEnded. + function isSwitchCaseEnder(stmt) { + return n.BreakStatement.check(stmt) + || n.ContinueStatement.check(stmt) + || n.ReturnStatement.check(stmt) + || n.ThrowStatement.check(stmt); } - return offset + 2 -} -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = value - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} + Ep.getTryLocsList = function() { + if (this.tryEntries.length === 0) { + // To avoid adding a needless [] to the majority of runtime.wrap + // argument lists, force the caller to handle this case specially. + return null; + } -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') - if (offset < 0) throw new RangeError('index out of range') -} + var lastLocValue = 0; -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} + return b.arrayExpression( + this.tryEntries.map(function(tryEntry) { + var thisLocValue = tryEntry.firstLoc.value; + assert.ok(thisLocValue >= lastLocValue, "try entries out of order"); + lastLocValue = thisLocValue; -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} + var ce = tryEntry.catchEntry; + var fe = tryEntry.finallyEntry; -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} + var locs = [ + tryEntry.firstLoc, + // The null here makes a hole in the array. + ce ? ce.firstLoc : null + ]; -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} + if (fe) { + locs[2] = fe.firstLoc; + locs[3] = fe.afterLoc; + } -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} + return b.arrayExpression(locs); + }) + ); + }; -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} +// All side effects must be realized in order. -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, target_start, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (target_start >= target.length) target_start = target.length - if (!target_start) target_start = 0 - if (end > 0 && end < start) end = start +// If any subexpression harbors a leap, all subexpressions must be +// neutered of side effects. - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 +// No destructive modification of AST nodes. - // Fatal error conditions - if (target_start < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') + Ep.explode = function(path, ignoreResult) { + assert.ok(path instanceof types.NodePath); - // Are we oob? - if (end > this.length) end = this.length - if (target.length - target_start < end - start) { - end = target.length - target_start + start - } + var node = path.value; + var self = this; - var len = end - start + n.Node.assert(node); - if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < len; i++) { - target[i + target_start] = this[i + start] - } - } else { - target._set(this.subarray(start, start + len), target_start) - } + if (n.Statement.check(node)) + return self.explodeStatement(path); - return len -} + if (n.Expression.check(node)) + return self.explodeExpression(path, ignoreResult); -// fill(value, start=0, end=buffer.length) -Buffer.prototype.fill = function fill (value, start, end) { - if (!value) value = 0 - if (!start) start = 0 - if (!end) end = this.length + if (n.Declaration.check(node)) + throw getDeclError(node); - if (end < start) throw new RangeError('end < start') + switch (node.type) { + case "Program": + return path.get("body").map( + self.explodeStatement, + self + ); - // Fill 0 bytes; we're done - if (end === start) return - if (this.length === 0) return + case "VariableDeclarator": + throw getDeclError(node); - if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') - if (end < 0 || end > this.length) throw new RangeError('end out of bounds') + // These node types should be handled by their parent nodes + // (ObjectExpression, SwitchStatement, and TryStatement, respectively). + case "Property": + case "SwitchCase": + case "CatchClause": + throw new Error( + node.type + " nodes should be handled by their parents"); - var i - if (typeof value === 'number') { - for (i = start; i < end; i++) { - this[i] = value - } - } else { - var bytes = utf8ToBytes(value.toString()) - var len = bytes.length - for (i = start; i < end; i++) { - this[i] = bytes[i % len] + default: + throw new Error( + "unknown Node of type " + + JSON.stringify(node.type)); } - } - - return this -} + }; -/** - * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. - * Added in Node 0.12. Only available in browsers that support ArrayBuffer. - */ -Buffer.prototype.toArrayBuffer = function toArrayBuffer () { - if (typeof Uint8Array !== 'undefined') { - if (Buffer.TYPED_ARRAY_SUPPORT) { - return (new Buffer(this)).buffer - } else { - var buf = new Uint8Array(this.length) - for (var i = 0, len = buf.length; i < len; i += 1) { - buf[i] = this[i] - } - return buf.buffer - } - } else { - throw new TypeError('Buffer.toArrayBuffer not supported in this browser') + function getDeclError(node) { + return new Error( + "all declarations should have been transformed into " + + "assignments before the Exploder began its work: " + + JSON.stringify(node)); } -} -// HELPER FUNCTIONS -// ================ + Ep.explodeStatement = function(path, labelId) { + assert.ok(path instanceof types.NodePath); -var BP = Buffer.prototype - -/** - * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods - */ -Buffer._augment = function _augment (arr) { - arr.constructor = Buffer - arr._isBuffer = true - - // save reference to original Uint8Array set method before overwriting - arr._set = arr.set - - // deprecated, will be removed in node 0.13+ - arr.get = BP.get - arr.set = BP.set - - arr.write = BP.write - arr.toString = BP.toString - arr.toLocaleString = BP.toString - arr.toJSON = BP.toJSON - arr.equals = BP.equals - arr.compare = BP.compare - arr.indexOf = BP.indexOf - arr.copy = BP.copy - arr.slice = BP.slice - arr.readUIntLE = BP.readUIntLE - arr.readUIntBE = BP.readUIntBE - arr.readUInt8 = BP.readUInt8 - arr.readUInt16LE = BP.readUInt16LE - arr.readUInt16BE = BP.readUInt16BE - arr.readUInt32LE = BP.readUInt32LE - arr.readUInt32BE = BP.readUInt32BE - arr.readIntLE = BP.readIntLE - arr.readIntBE = BP.readIntBE - arr.readInt8 = BP.readInt8 - arr.readInt16LE = BP.readInt16LE - arr.readInt16BE = BP.readInt16BE - arr.readInt32LE = BP.readInt32LE - arr.readInt32BE = BP.readInt32BE - arr.readFloatLE = BP.readFloatLE - arr.readFloatBE = BP.readFloatBE - arr.readDoubleLE = BP.readDoubleLE - arr.readDoubleBE = BP.readDoubleBE - arr.writeUInt8 = BP.writeUInt8 - arr.writeUIntLE = BP.writeUIntLE - arr.writeUIntBE = BP.writeUIntBE - arr.writeUInt16LE = BP.writeUInt16LE - arr.writeUInt16BE = BP.writeUInt16BE - arr.writeUInt32LE = BP.writeUInt32LE - arr.writeUInt32BE = BP.writeUInt32BE - arr.writeIntLE = BP.writeIntLE - arr.writeIntBE = BP.writeIntBE - arr.writeInt8 = BP.writeInt8 - arr.writeInt16LE = BP.writeInt16LE - arr.writeInt16BE = BP.writeInt16BE - arr.writeInt32LE = BP.writeInt32LE - arr.writeInt32BE = BP.writeInt32BE - arr.writeFloatLE = BP.writeFloatLE - arr.writeFloatBE = BP.writeFloatBE - arr.writeDoubleLE = BP.writeDoubleLE - arr.writeDoubleBE = BP.writeDoubleBE - arr.fill = BP.fill - arr.inspect = BP.inspect - arr.toArrayBuffer = BP.toArrayBuffer - - return arr -} - -var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function isArrayish (subject) { - return isArray(subject) || Buffer.isBuffer(subject) || - subject && typeof subject === 'object' && - typeof subject.length === 'number' -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - var i = 0 - - for (; i < length; i++) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (leadSurrogate) { - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } else { - // valid surrogate pair - codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 - leadSurrogate = null - } - } else { - // no lead yet + var stmt = path.value; + var self = this; - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else { - // valid lead - leadSurrogate = codePoint - continue - } - } - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = null - } + n.Statement.assert(stmt); - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x200000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) + if (labelId) { + n.Identifier.assert(labelId); } else { - throw new Error('Invalid code point') + labelId = null; } - } - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; i++) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; i++) { - if ((units -= 2) < 0) break + // Explode BlockStatement nodes even if they do not contain a yield, + // because we don't want or need the curly braces. + if (n.BlockStatement.check(stmt)) { + return path.get("body").each( + self.explodeStatement, + self + ); + } - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } + if (!meta.containsLeap(stmt)) { + // Technically we should be able to avoid emitting the statement + // altogether if !meta.hasSideEffects(stmt), but that leads to + // confusing generated code (for instance, `while (true) {}` just + // disappears) and is probably a more appropriate job for a dedicated + // dead code elimination pass. + self.emit(stmt); + return; + } - return byteArray -} + switch (stmt.type) { + case "ExpressionStatement": + self.explodeExpression(path.get("expression"), true); + break; -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} + case "LabeledStatement": + var after = loc(); + + // Did you know you can break from any labeled block statement or + // control structure? Well, you can! Note: when a labeled loop is + // encountered, the leap.LabeledEntry created here will immediately + // enclose a leap.LoopEntry on the leap manager's stack, and both + // entries will have the same label. Though this works just fine, it + // may seem a bit redundant. In theory, we could check here to + // determine if stmt knows how to handle its own label; for example, + // stmt happens to be a WhileStatement and so we know it's going to + // establish its own LoopEntry when we explode it (below). Then this + // LabeledEntry would be unnecessary. Alternatively, we might be + // tempted not to pass stmt.label down into self.explodeStatement, + // because we've handled the label here, but that's a mistake because + // labeled loops may contain labeled continue statements, which is not + // something we can handle in this generic case. All in all, I think a + // little redundancy greatly simplifies the logic of this case, since + // it's clear that we handle all possible LabeledStatements correctly + // here, regardless of whether they interact with the leap manager + // themselves. Also remember that labels and break/continue-to-label + // statements are rare, and all of this logic happens at transform + // time, so it has no additional runtime cost. + self.leapManager.withEntry( + new leap.LabeledEntry(after, stmt.label), + function() { + self.explodeStatement(path.get("body"), stmt.label); + } + ); -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; i++) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} + self.mark(after); -function decodeUtf8Char (str) { - try { - return decodeURIComponent(str) - } catch (err) { - return String.fromCharCode(0xFFFD) // UTF 8 invalid char - } -} - -},{"base64-js":176,"ieee754":177,"is-array":178}],176:[function(require,module,exports){ -var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - -;(function (exports) { - 'use strict'; - - var Arr = (typeof Uint8Array !== 'undefined') - ? Uint8Array - : Array - - var PLUS = '+'.charCodeAt(0) - var SLASH = '/'.charCodeAt(0) - var NUMBER = '0'.charCodeAt(0) - var LOWER = 'a'.charCodeAt(0) - var UPPER = 'A'.charCodeAt(0) - var PLUS_URL_SAFE = '-'.charCodeAt(0) - var SLASH_URL_SAFE = '_'.charCodeAt(0) - - function decode (elt) { - var code = elt.charCodeAt(0) - if (code === PLUS || - code === PLUS_URL_SAFE) - return 62 // '+' - if (code === SLASH || - code === SLASH_URL_SAFE) - return 63 // '/' - if (code < NUMBER) - return -1 //no match - if (code < NUMBER + 10) - return code - NUMBER + 26 + 26 - if (code < UPPER + 26) - return code - UPPER - if (code < LOWER + 26) - return code - LOWER + 26 - } - - function b64ToByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - - if (b64.length % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - var len = b64.length - placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(b64.length * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length - - var L = 0 - - function push (v) { - arr[L++] = v - } - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) - push((tmp & 0xFF0000) >> 16) - push((tmp & 0xFF00) >> 8) - push(tmp & 0xFF) - } - - if (placeHolders === 2) { - tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) - push(tmp & 0xFF) - } else if (placeHolders === 1) { - tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) - push((tmp >> 8) & 0xFF) - push(tmp & 0xFF) - } - - return arr - } - - function uint8ToBase64 (uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length - - function encode (num) { - return lookup.charAt(num) - } - - function tripletToBase64 (num) { - return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) - } - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output += tripletToBase64(temp) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1] - output += encode(temp >> 2) - output += encode((temp << 4) & 0x3F) - output += '==' - break - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) - output += encode(temp >> 10) - output += encode((temp >> 4) & 0x3F) - output += encode((temp << 2) & 0x3F) - output += '=' - break - } - - return output - } - - exports.toByteArray = b64ToByteArray - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) - -},{}],177:[function(require,module,exports){ -exports.read = function(buffer, offset, isLE, mLen, nBytes) { - var e, m, - eLen = nBytes * 8 - mLen - 1, - eMax = (1 << eLen) - 1, - eBias = eMax >> 1, - nBits = -7, - i = isLE ? (nBytes - 1) : 0, - d = isLE ? -1 : 1, - s = buffer[offset + i]; - - i += d; - - e = s & ((1 << (-nBits)) - 1); - s >>= (-nBits); - nBits += eLen; - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8); - - m = e & ((1 << (-nBits)) - 1); - e >>= (-nBits); - nBits += mLen; - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8); - - if (e === 0) { - e = 1 - eBias; - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity); - } else { - m = m + Math.pow(2, mLen); - e = e - eBias; - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen); -}; - -exports.write = function(buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c, - eLen = nBytes * 8 - mLen - 1, - eMax = (1 << eLen) - 1, - eBias = eMax >> 1, - rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), - i = isLE ? 0 : (nBytes - 1), - d = isLE ? 1 : -1, - s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; - - value = Math.abs(value); - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0; - e = eMax; - } else { - e = Math.floor(Math.log(value) / Math.LN2); - if (value * (c = Math.pow(2, -e)) < 1) { - e--; - c *= 2; - } - if (e + eBias >= 1) { - value += rt / c; - } else { - value += rt * Math.pow(2, 1 - eBias); - } - if (value * c >= 2) { - e++; - c /= 2; - } + break; - if (e + eBias >= eMax) { - m = 0; - e = eMax; - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen); - e = e + eBias; - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e = 0; - } - } + case "WhileStatement": + var before = loc(); + var after = loc(); - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8); + self.mark(before); + self.jumpIfNot(self.explodeExpression(path.get("test")), after); + self.leapManager.withEntry( + new leap.LoopEntry(after, before, labelId), + function() { self.explodeStatement(path.get("body")); } + ); + self.jump(before); + self.mark(after); - e = (e << mLen) | m; - eLen += mLen; - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8); + break; - buffer[offset + i - d] |= s * 128; -}; + case "DoWhileStatement": + var first = loc(); + var test = loc(); + var after = loc(); -},{}],178:[function(require,module,exports){ + self.mark(first); + self.leapManager.withEntry( + new leap.LoopEntry(after, test, labelId), + function() { self.explode(path.get("body")); } + ); + self.mark(test); + self.jumpIf(self.explodeExpression(path.get("test")), first); + self.mark(after); -/** - * isArray - */ + break; -var isArray = Array.isArray; + case "ForStatement": + var head = loc(); + var update = loc(); + var after = loc(); -/** - * toString - */ + if (stmt.init) { + // We pass true here to indicate that if stmt.init is an expression + // then we do not care about its result. + self.explode(path.get("init"), true); + } -var str = Object.prototype.toString; + self.mark(head); -/** - * Whether or not the given `val` - * is an array. - * - * example: - * - * isArray([]); - * // > true - * isArray(arguments); - * // > false - * isArray(''); - * // > false - * - * @param {mixed} val - * @return {bool} - */ + if (stmt.test) { + self.jumpIfNot(self.explodeExpression(path.get("test")), after); + } else { + // No test means continue unconditionally. + } -module.exports = isArray || function (val) { - return !! val && '[object Array]' == str.call(val); -}; + self.leapManager.withEntry( + new leap.LoopEntry(after, update, labelId), + function() { self.explodeStatement(path.get("body")); } + ); -},{}],179:[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. + self.mark(update); -function EventEmitter() { - this._events = this._events || {}; - this._maxListeners = this._maxListeners || undefined; -} -module.exports = EventEmitter; + if (stmt.update) { + // We pass true here to indicate that if stmt.update is an + // expression then we do not care about its result. + self.explode(path.get("update"), true); + } -// Backwards-compat with node 0.10.x -EventEmitter.EventEmitter = EventEmitter; + self.jump(head); -EventEmitter.prototype._events = undefined; -EventEmitter.prototype._maxListeners = undefined; + self.mark(after); -// 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; + break; -// 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; -}; + case "ForInStatement": + var head = loc(); + var after = loc(); + + var keyIterNextFn = self.makeTempVar(); + self.emitAssign( + keyIterNextFn, + b.callExpression( + runtimeProperty("keys"), + [self.explodeExpression(path.get("right"))] + ) + ); -EventEmitter.prototype.emit = function(type) { - var er, handler, len, args, i, listeners; + self.mark(head); + + var keyInfoTmpVar = self.makeTempVar(); + self.jumpIf( + b.memberExpression( + b.assignmentExpression( + "=", + keyInfoTmpVar, + b.callExpression(keyIterNextFn, []) + ), + b.identifier("done"), + false + ), + after + ); - if (!this._events) - this._events = {}; + self.emitAssign( + stmt.left, + b.memberExpression( + keyInfoTmpVar, + b.identifier("value"), + false + ) + ); - // 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.'); - } - } + self.leapManager.withEntry( + new leap.LoopEntry(after, head, labelId), + function() { self.explodeStatement(path.get("body")); } + ); - handler = this._events[type]; + self.jump(head); - if (isUndefined(handler)) - return false; + self.mark(after); - 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: - len = arguments.length; - args = new Array(len - 1); - for (i = 1; i < len; i++) - args[i - 1] = arguments[i]; - handler.apply(this, args); - } - } else if (isObject(handler)) { - len = arguments.length; - args = new Array(len - 1); - for (i = 1; i < len; i++) - args[i - 1] = arguments[i]; - listeners = handler.slice(); - len = listeners.length; - for (i = 0; i < len; i++) - listeners[i].apply(this, args); - } + case "BreakStatement": + self.emitAbruptCompletion({ + type: "break", + target: self.leapManager.getBreakLoc(stmt.label) + }); - return true; -}; + break; -EventEmitter.prototype.addListener = function(type, listener) { - var m; + case "ContinueStatement": + self.emitAbruptCompletion({ + type: "continue", + target: self.leapManager.getContinueLoc(stmt.label) + }); - if (!isFunction(listener)) - throw TypeError('listener must be a function'); + break; - if (!this._events) - this._events = {}; + case "SwitchStatement": + // Always save the discriminant into a temporary variable in case the + // test expressions overwrite values like context.sent. + var disc = self.emitAssign( + self.makeTempVar(), + self.explodeExpression(path.get("discriminant")) + ); - // 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); + var after = loc(); + var defaultLoc = loc(); + var condition = defaultLoc; + var caseLocs = []; - 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]; + // If there are no cases, .cases might be undefined. + var cases = stmt.cases || []; - // Check for listener leak - if (isObject(this._events[type]) && !this._events[type].warned) { - var m; - if (!isUndefined(this._maxListeners)) { - m = this._maxListeners; - } else { - m = EventEmitter.defaultMaxListeners; - } + for (var i = cases.length - 1; i >= 0; --i) { + var c = cases[i]; + n.SwitchCase.assert(c); - 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(); - } - } - } + if (c.test) { + condition = b.conditionalExpression( + b.binaryExpression("===", disc, c.test), + caseLocs[i] = loc(), + condition + ); + } else { + caseLocs[i] = defaultLoc; + } + } - return this; -}; + self.jump(self.explodeExpression( + new types.NodePath(condition, path, "discriminant") + )); + + self.leapManager.withEntry( + new leap.SwitchEntry(after), + function() { + path.get("cases").each(function(casePath) { + var c = casePath.value; + var i = casePath.name; -EventEmitter.prototype.on = EventEmitter.prototype.addListener; + self.mark(caseLocs[i]); -EventEmitter.prototype.once = function(type, listener) { - if (!isFunction(listener)) - throw TypeError('listener must be a function'); + casePath.get("consequent").each( + self.explodeStatement, + self + ); + }); + } + ); - var fired = false; + self.mark(after); + if (defaultLoc.value === -1) { + self.mark(defaultLoc); + assert.strictEqual(after.value, defaultLoc.value); + } - function g() { - this.removeListener(type, g); + break; - if (!fired) { - fired = true; - listener.apply(this, arguments); - } - } + case "IfStatement": + var elseLoc = stmt.alternate && loc(); + var after = loc(); - g.listener = listener; - this.on(type, g); + self.jumpIfNot( + self.explodeExpression(path.get("test")), + elseLoc || after + ); - return this; -}; + self.explodeStatement(path.get("consequent")); -// emits a 'removeListener' event iff the listener was removed -EventEmitter.prototype.removeListener = function(type, listener) { - var list, position, length, i; + if (elseLoc) { + self.jump(after); + self.mark(elseLoc); + self.explodeStatement(path.get("alternate")); + } - if (!isFunction(listener)) - throw TypeError('listener must be a function'); + self.mark(after); - if (!this._events || !this._events[type]) - return this; + break; - list = this._events[type]; - length = list.length; - position = -1; + case "ReturnStatement": + self.emitAbruptCompletion({ + type: "return", + value: self.explodeExpression(path.get("argument")) + }); - 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; + case "WithStatement": + throw new Error( + node.type + " not supported in generator functions."); - if (list.length === 1) { - list.length = 0; - delete this._events[type]; - } else { - list.splice(position, 1); - } + case "TryStatement": + var after = loc(); - if (this._events.removeListener) - this.emit('removeListener', type, listener); - } + var handler = stmt.handler; + if (!handler && stmt.handlers) { + handler = stmt.handlers[0] || null; + } - return this; -}; + var catchLoc = handler && loc(); + var catchEntry = catchLoc && new leap.CatchEntry( + catchLoc, + handler.param + ); -EventEmitter.prototype.removeAllListeners = function(type) { - var key, listeners; + var finallyLoc = stmt.finalizer && loc(); + var finallyEntry = finallyLoc && + new leap.FinallyEntry(finallyLoc, after); - if (!this._events) - return this; + var tryEntry = new leap.TryEntry( + self.getUnmarkedCurrentLoc(), + catchEntry, + finallyEntry + ); - // 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; - } + self.tryEntries.push(tryEntry); + self.updateContextPrevLoc(tryEntry.firstLoc); - // 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; - } + self.leapManager.withEntry(tryEntry, function() { + self.explodeStatement(path.get("block")); - listeners = this._events[type]; + if (catchLoc) { + if (finallyLoc) { + // If we have both a catch block and a finally block, then + // because we emit the catch block first, we need to jump over + // it to the finally block. + self.jump(finallyLoc); - if (isFunction(listeners)) { - this.removeListener(type, listeners); - } else { - // 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.listenerCount = function(emitter, type) { - var ret; - if (!emitter._events || !emitter._events[type]) - ret = 0; - else if (isFunction(emitter._events[type])) - ret = 1; - else - ret = emitter._events[type].length; - return ret; -}; - -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; -} + } else { + // If there is no finally block, then we need to jump over the + // catch block to the fall-through location. + self.jump(after); + } -},{}],180:[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 - } -} + self.updateContextPrevLoc(self.mark(catchLoc)); -},{}],181:[function(require,module,exports){ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; + var bodyPath = path.get("handler", "body"); + var safeParam = self.makeTempVar(); + self.clearPendingException(tryEntry.firstLoc, safeParam); -},{}],182:[function(require,module,exports){ -(function (process){ -// 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 catchScope = bodyPath.scope; + var catchParamName = handler.param.name; + n.CatchClause.assert(catchScope.node); + assert.strictEqual(catchScope.lookup(catchParamName), catchScope); -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } + types.visit(bodyPath, { + visitIdentifier: function(path) { + if (util.isReference(path, catchParamName) && + path.scope.lookup(catchParamName) === catchScope) { + return safeParam; + } - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } + this.traverse(path); + }, - return parts; -} + visitFunction: function(path) { + if (path.scope.declares(catchParamName)) { + // Don't descend into nested scopes that shadow the catch + // parameter with their own declarations. This isn't + // logically necessary because of the path.scope.lookup we + // do in visitIdentifier, but it saves time. + return false; + } -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var splitPath = function(filename) { - return splitPathRe.exec(filename).slice(1); -}; + this.traverse(path); + } + }); -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; + self.leapManager.withEntry(catchEntry, function() { + self.explodeStatement(bodyPath); + }); + } - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); + if (finallyLoc) { + self.updateContextPrevLoc(self.mark(finallyLoc)); - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } + self.leapManager.withEntry(finallyEntry, function() { + self.explodeStatement(path.get("finalizer")); + }); - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } + self.emit(b.returnStatement(b.callExpression( + self.contextProperty("finish"), + [finallyEntry.firstLoc] + ))); + } + }); - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) + self.mark(after); - // Normalize the path - resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); + break; - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; + case "ThrowStatement": + self.emit(b.throwStatement( + self.explodeExpression(path.get("argument")) + )); -// path.normalize(path) -// posix version -exports.normalize = function(path) { - var isAbsolute = exports.isAbsolute(path), - trailingSlash = substr(path, -1) === '/'; + break; - // Normalize the path - path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); + default: + throw new Error( + "unknown Statement of type " + + JSON.stringify(stmt.type)); + } + }; - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } + Ep.emitAbruptCompletion = function(record) { + if (!isValidCompletion(record)) { + assert.ok( + false, + "invalid completion record: " + + JSON.stringify(record) + ); + } - return (isAbsolute ? '/' : '') + path; -}; + assert.notStrictEqual( + record.type, "normal", + "normal completions are not abrupt" + ); -// posix version -exports.isAbsolute = function(path) { - return path.charAt(0) === '/'; -}; + var abruptArgs = [b.literal(record.type)]; -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - if (typeof p !== 'string') { - throw new TypeError('Arguments to path.join must be strings'); + if (record.type === "break" || + record.type === "continue") { + n.Literal.assert(record.target); + abruptArgs[1] = record.target; + } else if (record.type === "return" || + record.type === "throw") { + if (record.value) { + n.Expression.assert(record.value); + abruptArgs[1] = record.value; + } } - return p; - }).join('/')); -}; + this.emit( + b.returnStatement( + b.callExpression( + this.contextProperty("abrupt"), + abruptArgs + ) + ) + ); + }; -// path.relative(from, to) -// posix version -exports.relative = function(from, to) { - from = exports.resolve(from).substr(1); - to = exports.resolve(to).substr(1); + function isValidCompletion(record) { + var type = record.type; - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; + if (type === "normal") { + return !hasOwn.call(record, "target"); } - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; + if (type === "break" || + type === "continue") { + return !hasOwn.call(record, "value") + && n.Literal.check(record.target); } - if (start > end) return []; - return arr.slice(start, end - start + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; + if (type === "return" || + type === "throw") { + return hasOwn.call(record, "value") + && !hasOwn.call(record, "target"); } - } - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); + return false; } - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -}; -exports.sep = '/'; -exports.delimiter = ':'; +// Not all offsets into emitter.listing are potential jump targets. For +// example, execution typically falls into the beginning of a try block +// without jumping directly there. This method returns the current offset +// without marking it, so that a switch case will not necessarily be +// generated for this offset (I say "not necessarily" because the same +// location might end up being marked in the process of emitting other +// statements). There's no logical harm in marking such locations as jump +// targets, but minimizing the number of switch cases keeps the generated +// code shorter. + Ep.getUnmarkedCurrentLoc = function() { + return b.literal(this.listing.length); + }; -exports.dirname = function(path) { - var result = splitPath(path), - root = result[0], - dir = result[1]; +// The context.prev property takes the value of context.next whenever we +// evaluate the switch statement discriminant, which is generally good +// enough for tracking the last location we jumped to, but sometimes +// context.prev needs to be more precise, such as when we fall +// successfully out of a try block and into a finally block without +// jumping. This method exists to update context.prev to the freshest +// available location. If we were implementing a full interpreter, we +// would know the location of the current instruction with complete +// precision at all times, but we don't have that luxury here, as it would +// be costly and verbose to set context.prev before every statement. + Ep.updateContextPrevLoc = function(loc) { + if (loc) { + n.Literal.assert(loc); - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } + if (loc.value === -1) { + // If an uninitialized location literal was passed in, set its value + // to the current this.listing.length. + loc.value = this.listing.length; + } else { + // Otherwise assert that the location matches the current offset. + assert.strictEqual(loc.value, this.listing.length); + } - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } + } else { + loc = this.getUnmarkedCurrentLoc(); + } - return root + dir; -}; + // Make sure context.prev is up to date in case we fell into this try + // statement without jumping to it. TODO Consider avoiding this + // assignment when we know control must have jumped here. + this.emitAssign(this.contextProperty("prev"), loc); + }; + Ep.explodeExpression = function(path, ignoreResult) { + assert.ok(path instanceof types.NodePath); -exports.basename = function(path, ext) { - var f = splitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; + var expr = path.value; + if (expr) { + n.Expression.assert(expr); + } else { + return expr; + } + var self = this; + var result; // Used optionally by several cases below. -exports.extname = function(path) { - return splitPath(path)[3]; -}; + function finish(expr) { + n.Expression.assert(expr); + if (ignoreResult) { + self.emit(expr); + } else { + return expr; + } + } + + // If the expression does not contain a leap, then we either emit the + // expression as a standalone statement or return it whole. + if (!meta.containsLeap(expr)) { + return finish(expr); + } + + // If any child contains a leap (such as a yield or labeled continue or + // break statement), then any sibling subexpressions will almost + // certainly have to be exploded in order to maintain the order of their + // side effects relative to the leaping child(ren). + var hasLeapingChildren = meta.containsLeap.onlyChildren(expr); + + // In order to save the rest of explodeExpression from a combinatorial + // trainwreck of special cases, explodeViaTempVar is responsible for + // deciding when a subexpression needs to be "exploded," which is my + // very technical term for emitting the subexpression as an assignment + // to a temporary variable and the substituting the temporary variable + // for the original subexpression. Think of exploded view diagrams, not + // Michael Bay movies. The point of exploding subexpressions is to + // control the precise order in which the generated code realizes the + // side effects of those subexpressions. + function explodeViaTempVar(tempVar, childPath, ignoreChildResult) { + assert.ok(childPath instanceof types.NodePath); + + assert.ok( + !ignoreChildResult || !tempVar, + "Ignoring the result of a child expression but forcing it to " + + "be assigned to a temporary variable?" + ); -function filter (xs, f) { - if (xs.filter) return xs.filter(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - if (f(xs[i], i, xs)) res.push(xs[i]); + var result = self.explodeExpression(childPath, ignoreChildResult); + + if (ignoreChildResult) { + // Side effects already emitted above. + + } else if (tempVar || (hasLeapingChildren && + (self.isVolatileContextProperty(result) || + meta.hasSideEffects(result)))) { + // If tempVar was provided, then the result will always be assigned + // to it, even if the result does not otherwise need to be assigned + // to a temporary variable. When no tempVar is provided, we have + // the flexibility to decide whether a temporary variable is really + // necessary. In general, temporary assignment is required only + // when some other child contains a leap and the child in question + // is a context property like $ctx.sent that might get overwritten + // or an expression with side effects that need to occur in proper + // sequence relative to the leap. + result = self.emitAssign( + tempVar || self.makeTempVar(), + result + ); + } + return result; } - return res; -} -// String.prototype.substr - negative index don't work in IE8 -var substr = 'ab'.substr(-1) === 'b' - ? function (str, start, len) { return str.substr(start, len) } - : function (str, start, len) { - if (start < 0) start = str.length + start; - return str.substr(start, len); - } -; + // If ignoreResult is true, then we must take full responsibility for + // emitting the expression with all its side effects, and we should not + // return a result. -}).call(this,require('_process')) -},{"_process":183}],183:[function(require,module,exports){ -// shim for using process in browser + switch (expr.type) { + case "MemberExpression": + return finish(b.memberExpression( + self.explodeExpression(path.get("object")), + expr.computed + ? explodeViaTempVar(null, path.get("property")) + : expr.property, + expr.computed + )); -var process = module.exports = {}; -var queue = []; -var draining = false; + case "CallExpression": + var oldCalleePath = path.get("callee"); + var newCallee = self.explodeExpression(oldCalleePath); + + // If the callee was not previously a MemberExpression, then the + // CallExpression was "unqualified," meaning its `this` object should + // be the global object. If the exploded expression has become a + // MemberExpression, then we need to force it to be unqualified by + // using the (0, object.property)(...) trick; otherwise, it will + // receive the object of the MemberExpression as its `this` object. + if (!n.MemberExpression.check(oldCalleePath.node) && + n.MemberExpression.check(newCallee)) { + newCallee = b.sequenceExpression([ + b.literal(0), + newCallee + ]); + } + + return finish(b.callExpression( + newCallee, + path.get("arguments").map(function(argPath) { + return explodeViaTempVar(null, argPath); + }) + )); -function drainQueue() { - if (draining) { - return; - } - draining = true; - var currentQueue; - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - var i = -1; - while (++i < len) { - currentQueue[i](); - } - len = queue.length; - } - draining = false; -} -process.nextTick = function (fun) { - queue.push(fun); - if (!draining) { - setTimeout(drainQueue, 0); - } -}; + case "NewExpression": + return finish(b.newExpression( + explodeViaTempVar(null, path.get("callee")), + path.get("arguments").map(function(argPath) { + return explodeViaTempVar(null, argPath); + }) + )); + + case "ObjectExpression": + return finish(b.objectExpression( + path.get("properties").map(function(propPath) { + return b.property( + propPath.value.kind, + propPath.value.key, + explodeViaTempVar(null, propPath.get("value")) + ); + }) + )); + + case "ArrayExpression": + return finish(b.arrayExpression( + path.get("elements").map(function(elemPath) { + return explodeViaTempVar(null, elemPath); + }) + )); -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; + case "SequenceExpression": + var lastIndex = expr.expressions.length - 1; -function noop() {} + path.get("expressions").each(function(exprPath) { + if (exprPath.name === lastIndex) { + result = self.explodeExpression(exprPath, ignoreResult); + } else { + self.explodeExpression(exprPath, true); + } + }); -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; + return result; -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; + case "LogicalExpression": + var after = loc(); -// TODO(shtylman) -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; + if (!ignoreResult) { + result = self.makeTempVar(); + } -},{}],184:[function(require,module,exports){ -module.exports = require("./lib/_stream_duplex.js") + var left = explodeViaTempVar(result, path.get("left")); -},{"./lib/_stream_duplex.js":185}],185:[function(require,module,exports){ -(function (process){ -// 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. + if (expr.operator === "&&") { + self.jumpIfNot(left, after); + } else { + assert.strictEqual(expr.operator, "||"); + self.jumpIf(left, after); + } -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. + explodeViaTempVar(result, path.get("right"), ignoreResult); -module.exports = Duplex; + self.mark(after); -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -} -/**/ + return result; + case "ConditionalExpression": + var elseLoc = loc(); + var after = loc(); + var test = self.explodeExpression(path.get("test")); -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ + self.jumpIfNot(test, elseLoc); -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); + if (!ignoreResult) { + result = self.makeTempVar(); + } -util.inherits(Duplex, Readable); + explodeViaTempVar(result, path.get("consequent"), ignoreResult); + self.jump(after); -forEach(objectKeys(Writable.prototype), function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); + self.mark(elseLoc); + explodeViaTempVar(result, path.get("alternate"), ignoreResult); -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); + self.mark(after); - Readable.call(this, options); - Writable.call(this, options); + return result; - if (options && options.readable === false) - this.readable = false; + case "UnaryExpression": + return finish(b.unaryExpression( + expr.operator, + // Can't (and don't need to) break up the syntax of the argument. + // Think about delete a[b]. + self.explodeExpression(path.get("argument")), + !!expr.prefix + )); - if (options && options.writable === false) - this.writable = false; + case "BinaryExpression": + return finish(b.binaryExpression( + expr.operator, + explodeViaTempVar(null, path.get("left")), + explodeViaTempVar(null, path.get("right")) + )); - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; + case "AssignmentExpression": + return finish(b.assignmentExpression( + expr.operator, + self.explodeExpression(path.get("left")), + self.explodeExpression(path.get("right")) + )); - this.once('end', onend); -} + case "UpdateExpression": + return finish(b.updateExpression( + expr.operator, + self.explodeExpression(path.get("argument")), + expr.prefix + )); -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; + case "YieldExpression": + var after = loc(); + var arg = expr.argument && self.explodeExpression(path.get("argument")); - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} + if (arg && expr.delegate) { + var result = self.makeTempVar(); -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} + self.emit(b.returnStatement(b.callExpression( + self.contextProperty("delegateYield"), [ + arg, + b.literal(result.property.name), + after + ] + ))); -}).call(this,require('_process')) -},{"./_stream_readable":187,"./_stream_writable":189,"_process":183,"core-util-is":190,"inherits":180}],186:[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. + self.mark(after); -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. + return result; + } -module.exports = PassThrough; + self.emitAssign(self.contextProperty("next"), after); + self.emit(b.returnStatement(arg || null)); + self.mark(after); -var Transform = require('./_stream_transform'); + return self.contextProperty("sent"); -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ + default: + throw new Error( + "unknown Expression of type " + + JSON.stringify(expr.type)); + } + }; -util.inherits(PassThrough, Transform); +},{"./leap":451,"./meta":452,"./util":453,"assert":203,"recast":480}],450:[function(require,module,exports){ + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); + var assert = require("assert"); + var types = require("recast").types; + var n = types.namedTypes; + var b = types.builders; + var hasOwn = Object.prototype.hasOwnProperty; - Transform.call(this, options); -} +// The hoist function takes a FunctionExpression or FunctionDeclaration +// and replaces any Declaration nodes in its body with assignments, then +// returns a VariableDeclaration containing just the names of the removed +// declarations. + exports.hoist = function(funPath) { + assert.ok(funPath instanceof types.NodePath); + n.Function.assert(funPath.value); -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; + var vars = {}; -},{"./_stream_transform":188,"core-util-is":190,"inherits":180}],187:[function(require,module,exports){ -(function (process){ -// 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 varDeclToExpr(vdec, includeIdentifiers) { + n.VariableDeclaration.assert(vdec); + var exprs = []; -module.exports = Readable; + vdec.declarations.forEach(function(dec) { + vars[dec.id.name] = dec.id; -/**/ -var isArray = require('isarray'); -/**/ + if (dec.init) { + exprs.push(b.assignmentExpression( + "=", dec.id, dec.init + )); + } else if (includeIdentifiers) { + exprs.push(dec.id); + } + }); + if (exprs.length === 0) + return null; -/**/ -var Buffer = require('buffer').Buffer; -/**/ + if (exprs.length === 1) + return exprs[0]; -Readable.ReadableState = ReadableState; + return b.sequenceExpression(exprs); + } -var EE = require('events').EventEmitter; + types.visit(funPath.get("body"), { + visitVariableDeclaration: function(path) { + var expr = varDeclToExpr(path.value, false); + if (expr === null) { + path.replace(); + } else { + // We don't need to traverse this expression any further because + // there can't be any new declarations inside an expression. + return b.expressionStatement(expr); + } -/**/ -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ + // Since the original node has been either removed or replaced, + // avoid traversing it any further. + return false; + }, -var Stream = require('stream'); + visitForStatement: function(path) { + var init = path.value.init; + if (n.VariableDeclaration.check(init)) { + path.get("init").replace(varDeclToExpr(init, false)); + } + this.traverse(path); + }, -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ + visitForInStatement: function(path) { + var left = path.value.left; + if (n.VariableDeclaration.check(left)) { + path.get("left").replace(varDeclToExpr(left, true)); + } + this.traverse(path); + }, -var StringDecoder; + visitFunctionDeclaration: function(path) { + var node = path.value; + vars[node.id.name] = node.id; + + var parentNode = path.parent.node; + var assignment = b.expressionStatement( + b.assignmentExpression( + "=", + node.id, + b.functionExpression( + node.id, + node.params, + node.body, + node.generator, + node.expression + ) + ) + ); + if (n.BlockStatement.check(path.parent.node)) { + // Insert the assignment form before the first statement in the + // enclosing block. + path.parent.get("body").unshift(assignment); -/**/ -var debug = require('util'); -if (debug && debug.debuglog) { - debug = debug.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ + // Remove the function declaration now that we've inserted the + // equivalent assignment form at the beginning of the block. + path.replace(); + } else { + // If the parent node is not a block statement, then we can just + // replace the declaration with the equivalent assignment form + // without worrying about hoisting it. + path.replace(assignment); + } -util.inherits(Readable, Stream); + // Don't hoist variables out of inner functions. + return false; + }, -function ReadableState(options, stream) { - var Duplex = require('./_stream_duplex'); + visitFunctionExpression: function(path) { + // Don't descend into nested function expressions. + return false; + } + }); - options = options || {}; + var paramNames = {}; + funPath.get("params").each(function(paramPath) { + var param = paramPath.value; + if (n.Identifier.check(param)) { + paramNames[param.name] = param; + } else { + // Variables declared by destructuring parameter patterns will be + // harmlessly re-declared. + } + }); - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = options.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; + var declarations = []; - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; + Object.keys(vars).forEach(function(name) { + if (!hasOwn.call(paramNames, name)) { + declarations.push(b.variableDeclarator(vars[name], null)); + } + }); - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; + if (declarations.length === 0) { + return null; // Be sure to handle this case! + } - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; + return b.variableDeclaration("var", declarations); + }; - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; +},{"assert":203,"recast":480}],451:[function(require,module,exports){ + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + var assert = require("assert"); + var types = require("recast").types; + var n = types.namedTypes; + var b = types.builders; + var inherits = require("util").inherits; + var hasOwn = Object.prototype.hasOwnProperty; - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; + function Entry() { + assert.ok(this instanceof Entry); + } - if (stream instanceof Duplex) - this.objectMode = this.objectMode || !!options.readableObjectMode; + function FunctionEntry(returnLoc) { + Entry.call(this); + n.Literal.assert(returnLoc); + this.returnLoc = returnLoc; + } - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; + inherits(FunctionEntry, Entry); + exports.FunctionEntry = FunctionEntry; - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; + function LoopEntry(breakLoc, continueLoc, label) { + Entry.call(this); - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; + n.Literal.assert(breakLoc); + n.Literal.assert(continueLoc); - // if true, a maybeReadMore has been scheduled - this.readingMore = false; + if (label) { + n.Identifier.assert(label); + } else { + label = null; + } - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; + this.breakLoc = breakLoc; + this.continueLoc = continueLoc; + this.label = label; } -} -function Readable(options) { - var Duplex = require('./_stream_duplex'); + inherits(LoopEntry, Entry); + exports.LoopEntry = LoopEntry; - if (!(this instanceof Readable)) - return new Readable(options); + function SwitchEntry(breakLoc) { + Entry.call(this); + n.Literal.assert(breakLoc); + this.breakLoc = breakLoc; + } - this._readableState = new ReadableState(options, this); + inherits(SwitchEntry, Entry); + exports.SwitchEntry = SwitchEntry; - // legacy - this.readable = true; + function TryEntry(firstLoc, catchEntry, finallyEntry) { + Entry.call(this); - Stream.call(this); -} + n.Literal.assert(firstLoc); -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; + if (catchEntry) { + assert.ok(catchEntry instanceof CatchEntry); + } else { + catchEntry = null; + } - if (util.isString(chunk) && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; + if (finallyEntry) { + assert.ok(finallyEntry instanceof FinallyEntry); + } else { + finallyEntry = null; } - } - return readableAddChunk(this, state, chunk, encoding, false); -}; + // Have to have one or the other (or both). + assert.ok(catchEntry || finallyEntry); -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (util.isNullOrUndefined(chunk)) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); + this.firstLoc = firstLoc; + this.catchEntry = catchEntry; + this.finallyEntry = finallyEntry; + } - if (!addToFront) - state.reading = false; + inherits(TryEntry, Entry); + exports.TryEntry = TryEntry; - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) - state.buffer.unshift(chunk); - else - state.buffer.push(chunk); + function CatchEntry(firstLoc, paramId) { + Entry.call(this); - if (state.needReadable) - emitReadable(stream); - } + n.Literal.assert(firstLoc); + n.Identifier.assert(paramId); - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; + this.firstLoc = firstLoc; + this.paramId = paramId; } - return needMoreData(state); -} + inherits(CatchEntry, Entry); + exports.CatchEntry = CatchEntry; + function FinallyEntry(firstLoc, afterLoc) { + Entry.call(this); + n.Literal.assert(firstLoc); + n.Literal.assert(afterLoc); + this.firstLoc = firstLoc; + this.afterLoc = afterLoc; + } + inherits(FinallyEntry, Entry); + exports.FinallyEntry = FinallyEntry; -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} + function LabeledEntry(breakLoc, label) { + Entry.call(this); -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; + n.Literal.assert(breakLoc); + n.Identifier.assert(label); -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; + this.breakLoc = breakLoc; + this.label = label; } - return n; -} -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; + inherits(LabeledEntry, Entry); + exports.LabeledEntry = LabeledEntry; - if (state.objectMode) - return n === 0 ? 0 : 1; + function LeapManager(emitter) { + assert.ok(this instanceof LeapManager); - if (isNaN(n) || util.isNull(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; + var Emitter = require("./emit").Emitter; + assert.ok(emitter instanceof Emitter); + + this.emitter = emitter; + this.entryStack = [new FunctionEntry(emitter.finalLoc)]; } - if (n <= 0) - return 0; + var LMp = LeapManager.prototype; + exports.LeapManager = LeapManager; - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } + LMp.withEntry = function(entry, callback) { + assert.ok(entry instanceof Entry); + this.entryStack.push(entry); + try { + callback.call(this.emitter); + } finally { + var popped = this.entryStack.pop(); + assert.strictEqual(popped, entry); + } + }; - return n; -} + LMp._findLeapLocation = function(property, label) { + for (var i = this.entryStack.length - 1; i >= 0; --i) { + var entry = this.entryStack[i]; + var loc = entry[property]; + if (loc) { + if (label) { + if (entry.label && + entry.label.name === label.name) { + return loc; + } + } else if (entry instanceof LabeledEntry) { + // Ignore LabeledEntry entries unless we are actually breaking to + // a label. + } else { + return loc; + } + } + } -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (!util.isNumber(n) || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) - endReadable(this); - else - emitReadable(this); return null; - } + }; - n = howMuchToRead(n, state); + LMp.getBreakLoc = function(label) { + return this._findLeapLocation("breakLoc", label); + }; - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } + LMp.getContinueLoc = function(label) { + return this._findLeapLocation("continueLoc", label); + }; + +},{"./emit":449,"assert":203,"recast":480,"util":229}],452:[function(require,module,exports){ + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (util.isNull(ret)) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) - endReadable(this); - - if (!util.isNull(ret)) - this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!util.isBuffer(chunk) && - !util.isString(chunk) && - !util.isNullOrUndefined(chunk) && - !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} + var assert = require("assert"); + var m = require("private").makeAccessor(); + var types = require("recast").types; + var isArray = types.builtInTypes.array; + var n = types.namedTypes; + var hasOwn = Object.prototype.hasOwnProperty; -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); + function makePredicate(propertyName, knownTypes) { + function onlyChildren(node) { + n.Node.assert(node); + + // Assume no side effects until we find out otherwise. + var result = false; + + function check(child) { + if (result) { + // Do nothing. + } else if (isArray.check(child)) { + child.some(check); + } else if (n.Node.check(child)) { + assert.strictEqual(result, false); + result = predicate(child); + } + return result; + } + + types.eachField(node, function(name, child) { + check(child); }); - else - emitReadable_(stream); - } -} -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} + return result; + } + function predicate(node) { + n.Node.assert(node); -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); + var meta = m(node); + if (hasOwn.call(meta, propertyName)) + return meta[propertyName]; + + // Certain types are "opaque," which means they have no side + // effects or leaps and we don't care about their subexpressions. + if (hasOwn.call(opaqueTypes, node.type)) + return meta[propertyName] = false; + + if (hasOwn.call(knownTypes, node.type)) + return meta[propertyName] = true; + + return meta[propertyName] = onlyChildren(node); + } + + predicate.onlyChildren = onlyChildren; + + return predicate; } -} -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; + var opaqueTypes = { + FunctionExpression: true + }; + +// These types potentially have side effects regardless of what side +// effects their subexpressions have. + var sideEffectTypes = { + CallExpression: true, // Anything could happen! + ForInStatement: true, // Modifies the key variable. + UnaryExpression: true, // Think delete. + BinaryExpression: true, // Might invoke .toString() or .valueOf(). + AssignmentExpression: true, // Side-effecting by definition. + UpdateExpression: true, // Updates are essentially assignments. + NewExpression: true // Similar to CallExpression. + }; + +// These types are the direct cause of all leaps in control flow. + var leapTypes = { + YieldExpression: true, + BreakStatement: true, + ContinueStatement: true, + ReturnStatement: true, + ThrowStatement: true + }; + +// All leap types are also side effect types. + for (var type in leapTypes) { + if (hasOwn.call(leapTypes, type)) { + sideEffectTypes[type] = leapTypes[type]; + } } - state.readingMore = false; -} -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; + exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes); + exports.containsLeap = makePredicate("containsLeap", leapTypes); + +},{"assert":203,"private":448,"recast":480}],453:[function(require,module,exports){ + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + + var assert = require("assert"); + var types = require("recast").types; + var n = types.namedTypes; + var b = types.builders; + var hasOwn = Object.prototype.hasOwnProperty; + + exports.defaults = function(obj) { + var len = arguments.length; + var extension; + + for (var i = 1; i < len; ++i) { + if ((extension = arguments[i])) { + for (var key in extension) { + if (hasOwn.call(extension, key) && !hasOwn.call(obj, key)) { + obj[key] = extension[key]; + } + } + } + } -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; + return obj; + }; - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + exports.runtimeProperty = function(name) { + return b.memberExpression( + b.identifier("regeneratorRuntime"), + b.identifier(name), + false + ); + }; - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; +// Inspired by the isReference function from ast-util: +// https://github.com/eventualbuddha/ast-util/blob/9bf91c5ce8/lib/index.js#L466-L506 + exports.isReference = function(path, name) { + var node = path.value; - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); + if (!n.Identifier.check(node)) { + return false; + } - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); + if (name && node.name !== name) { + return false; } - } - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && - (!dest._writableState || dest._writableState.needDrain)) - ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - debug('false write response, pause', - src._readableState.awaitDrain); - src._readableState.awaitDrain++; - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; + var parent = path.parent.value; + switch (parent.type) { + case "VariableDeclarator": + return path.name === "init"; + case "MemberExpression": + return path.name === "object" || ( + parent.computed && path.name === "property" + ); - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); + case "FunctionExpression": + case "FunctionDeclaration": + case "ArrowFunctionExpression": + if (path.name === "id") { + return false; + } - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } + if (parent.params === path.parentPath && + parent.params[path.name] === node) { + return false; + } - // tell the dest that it's being piped to - dest.emit('pipe', src); + return true; - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } + case "ClassDeclaration": + case "ClassExpression": + return path.name !== "id"; - return dest; -}; + case "CatchClause": + return path.name !== "param"; -function pipeOnDrain(src) { - return function() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) - state.awaitDrain--; - if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { - state.flowing = true; - flow(src); + case "Property": + case "MethodDefinition": + return path.name !== "key"; + + case "ImportSpecifier": + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "LabeledStatement": + return false; + + default: + return true; } }; -} +},{"assert":203,"recast":480}],454:[function(require,module,exports){ + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + + var assert = require("assert"); + var fs = require("fs"); + var recast = require("recast"); + var types = recast.types; + var n = types.namedTypes; + var b = types.builders; + var isArray = types.builtInTypes.array; + var isObject = types.builtInTypes.object; + var NodePath = types.NodePath; + var hoist = require("./hoist").hoist; + var Emitter = require("./emit").Emitter; + var runtimeProperty = require("./util").runtimeProperty; + var getMarkInfo = require("private").makeAccessor(); -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; + exports.transform = function transform(node, options) { + options = options || {}; - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; + var path = node instanceof NodePath ? node : new NodePath(node); + visitor.visit(path, options); + node = path.value; - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; + if (options.includeRuntime === true || + (options.includeRuntime === 'if used' && visitor.wasChangeReported())) { + injectRuntime(n.File.check(node) ? node.program : node); + } - if (!dest) - dest = state.pipes; + options.madeChanges = visitor.wasChangeReported(); - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } + return node; + }; - // slow case. multiple pipe destinations. + function injectRuntime(program) { + n.Program.assert(program); - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; + // Include the runtime by modifying the AST rather than by concatenating + // strings. This technique will allow for more accurate source mapping. + var runtimePath = require("..").runtime.path; + var runtime = fs.readFileSync(runtimePath, "utf8"); + var runtimeBody = recast.parse(runtime, { + sourceFileName: runtimePath + }).program.body; - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; + var body = program.body; + body.unshift.apply(body, runtimeBody); } - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; + var visitor = types.PathVisitor.fromMethodsObject({ + reset: function(node, options) { + this.options = options; + }, - dest.emit('unpipe', this); + visitFunction: function(path) { + // Calling this.traverse(path) first makes for a post-order traversal. + this.traverse(path); - return this; -}; + var node = path.value; + var shouldTransformAsync = node.async && !this.options.disableAsync; -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - var self = this; - process.nextTick(function() { - debug('readable nexttick read 0'); - self.read(0); - }); - } else if (state.length) { - emitReadable(this, state); + if (!node.generator && !shouldTransformAsync) { + return; } - } - } - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; + this.reportChanged(); -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - if (!state.reading) { - debug('resume read 0'); - this.read(0); - } - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(function() { - resume_(stream, state); - }); - } -} - -function resume_(stream, state) { - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) - stream.read(0); -} - -Readable.prototype.pause = function() { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} + if (node.expression) { + // Transform expression lambdas into normal functions. + node.expression = false; + node.body = b.blockStatement([ + b.returnStatement(node.body) + ]); + } -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; + if (shouldTransformAsync) { + awaitVisitor.visit(path.get("body")); + } - var self = this; - stream.on('end', function() { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } + var outerBody = []; + var innerBody = []; + var bodyPath = path.get("body", "body"); - self.push(null); - }); + bodyPath.each(function(childPath) { + var node = childPath.value; + if (node && node._blockHoist != null) { + outerBody.push(node); + } else { + innerBody.push(node); + } + }); - stream.on('data', function(chunk) { - debug('wrapped data'); - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; + if (outerBody.length > 0) { + // Only replace the inner body if we actually hoisted any statements + // to the outer body. + bodyPath.replace(innerBody); + } + + var outerFnExpr = getOuterFnExpr(path); + // Note that getOuterFnExpr has the side-effect of ensuring that the + // function has a name (so node.id will always be an Identifier), even + // if a temporary name has to be synthesized. + n.Identifier.assert(node.id); + var innerFnId = b.identifier(node.id.name + "$"); + var contextId = path.scope.declareTemporary("context$"); + var argsId = path.scope.declareTemporary("args$"); + var shouldAliasArguments = renameArguments(path, argsId); + var vars = hoist(path); + + if (shouldAliasArguments) { + vars = vars || b.variableDeclaration("var", []); + vars.declarations.push(b.variableDeclarator( + argsId, b.identifier("arguments") + )); + } - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); + var emitter = new Emitter(contextId); + emitter.explode(path.get("body")); - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (util.isFunction(stream[i]) && util.isUndefined(this[i])) { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } + if (vars && vars.declarations.length > 0) { + outerBody.push(vars); + } - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); + var wrapArgs = [ + emitter.getContextFunction(innerFnId), + // Async functions that are not generators don't care about the + // outer function because they don't need it to be marked and don't + // inherit from its .prototype. + node.generator ? outerFnExpr : b.literal(null), + b.thisExpression() + ]; - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; + var tryLocsList = emitter.getTryLocsList(); + if (tryLocsList) { + wrapArgs.push(tryLocsList); + } - return self; -}; + var wrapCall = b.callExpression( + runtimeProperty(shouldTransformAsync ? "async" : "wrap"), + wrapArgs + ); + outerBody.push(b.returnStatement(wrapCall)); + node.body = b.blockStatement(outerBody); + var wasGeneratorFunction = node.generator; + if (wasGeneratorFunction) { + node.generator = false; + } -// exposed for testing purposes only. -Readable._fromList = fromList; + if (shouldTransformAsync) { + node.async = false; + } -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; + if (wasGeneratorFunction && + n.Expression.check(node)) { + return b.callExpression(runtimeProperty("mark"), [node]); + } + }, - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); + visitForOfStatement: function(path) { + this.traverse(path); - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); + var node = path.value; + var tempIterId = path.scope.declareTemporary("t$"); + var tempIterDecl = b.variableDeclarator( + tempIterId, + b.callExpression( + runtimeProperty("values"), + [node.right] + ) + ); - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); + var tempInfoId = path.scope.declareTemporary("t$"); + var tempInfoDecl = b.variableDeclarator(tempInfoId, null); - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); + var init = node.left; + var loopId; + if (n.VariableDeclaration.check(init)) { + loopId = init.declarations[0].id; + init.declarations.push(tempIterDecl, tempInfoDecl); + } else { + loopId = init; + init = b.variableDeclaration("var", [ + tempIterDecl, + tempInfoDecl + ]); + } + n.Identifier.assert(loopId); + + var loopIdAssignExprStmt = b.expressionStatement( + b.assignmentExpression( + "=", + loopId, + b.memberExpression( + tempInfoId, + b.identifier("value"), + false + ) + ) + ); - c += cpy; - } + if (n.BlockStatement.check(node.body)) { + node.body.body.unshift(loopIdAssignExprStmt); + } else { + node.body = b.blockStatement([ + loopIdAssignExprStmt, + node.body + ]); + } + + return b.forStatement( + init, + b.unaryExpression( + "!", + b.memberExpression( + b.assignmentExpression( + "=", + tempInfoId, + b.callExpression( + b.memberExpression( + tempIterId, + b.identifier("next"), + false + ), + [] + ) + ), + b.identifier("done"), + false + ) + ), + null, + node.body + ); } - } + }); - return ret; -} +// Given a NodePath for a Function, return an Expression node that can be +// used to refer reliably to the function object from inside the function. +// This expression is essentially a replacement for arguments.callee, with +// the key advantage that it works in strict mode. + function getOuterFnExpr(funPath) { + var node = funPath.value; + n.Function.assert(node); -function endReadable(stream) { - var state = stream._readableState; + if (node.generator && // Non-generator functions don't need to be marked. + n.FunctionDeclaration.check(node)) { + var pp = funPath.parent; - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); + while (pp && !(n.BlockStatement.check(pp.value) || + n.Program.check(pp.value))) { + pp = pp.parent; + } - if (!state.endEmitted) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); + if (!pp) { + return node.id; } - }); - } -} -function forEach (xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} + var markDecl = getRuntimeMarkDecl(pp); + var markedArray = markDecl.declarations[0].id; + var funDeclIdArray = markDecl.declarations[0].init.callee.object; + n.ArrayExpression.assert(funDeclIdArray); + + var index = funDeclIdArray.elements.length; + funDeclIdArray.elements.push(node.id); + + return b.memberExpression( + markedArray, + b.literal(index), + true + ); + } -function indexOf (xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; + return node.id || ( + node.id = funPath.scope.parent.declareTemporary("callee$") + ); } - return -1; -} -}).call(this,require('_process')) -},{"./_stream_duplex":185,"_process":183,"buffer":175,"core-util-is":190,"events":179,"inherits":180,"isarray":181,"stream":195,"string_decoder/":196,"util":174}],188:[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 getRuntimeMarkDecl(blockPath) { + assert.ok(blockPath instanceof NodePath); + var block = blockPath.node; + isArray.assert(block.body); + var info = getMarkInfo(block); + if (info.decl) { + return info.decl; + } -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. + info.decl = b.variableDeclaration("var", [ + b.variableDeclarator( + blockPath.scope.declareTemporary("marked"), + b.callExpression( + b.memberExpression( + b.arrayExpression([]), + b.identifier("map"), + false + ), + [runtimeProperty("mark")] + ) + ) + ]); + + for (var i = 0; i < block.body.length; ++i) { + if (!shouldNotHoistAbove(blockPath.get("body", i))) { + break; + } + } -module.exports = Transform; + blockPath.get("body").insertAt(i, info.decl); -var Duplex = require('./_stream_duplex'); + return info.decl; + } -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ + function shouldNotHoistAbove(stmtPath) { + var value = stmtPath.value; + n.Statement.assert(value); -util.inherits(Transform, Duplex); + // If the first statement is a "use strict" declaration, make sure to + // insert hoisted declarations afterwards. + return n.ExpressionStatement.check(value) && + n.Literal.check(value.expression) && + value.expression.value === "use strict"; + } + function renameArguments(funcPath, argsId) { + assert.ok(funcPath instanceof types.NodePath); + var func = funcPath.value; + var didReplaceArguments = false; + var hasImplicitArguments = false; -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; + recast.visit(funcPath, { + visitFunction: function(path) { + if (path.value === func) { + hasImplicitArguments = !path.scope.lookup("arguments"); + this.traverse(path); + } else { + return false; + } + }, - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} + visitIdentifier: function(path) { + if (path.value.name === "arguments") { + var isMemberProperty = + n.MemberExpression.check(path.parent.node) && + path.name === "property" && + !path.parent.node.computed; -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; + if (!isMemberProperty) { + path.replace(argsId); + didReplaceArguments = true; + return false; + } + } - var cb = ts.writecb; + this.traverse(path); + } + }); - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); + // If the traversal replaced any arguments identifiers, and those + // identifiers were free variables, then we need to alias the outer + // function's arguments object to the variable named by argsId. + return didReplaceArguments && hasImplicitArguments; + } - ts.writechunk = null; - ts.writecb = null; + var awaitVisitor = types.PathVisitor.fromMethodsObject({ + visitFunction: function(path) { + return false; // Don't descend into nested function scopes. + }, - if (!util.isNullOrUndefined(data)) - stream.push(data); + visitAwaitExpression: function(path) { + // Convert await and await* expressions to yield expressions. + var argument = path.value.argument; + + // If the parser supports await* syntax using a boolean .all property + // (#171), desugar that syntax to yield Promise.all(argument). + if (path.value.all) { + argument = b.callExpression( + b.memberExpression( + b.identifier("Promise"), + b.identifier("all"), + false + ), + [argument] + ); + } - if (cb) - cb(er); + // Transforming `await x` to `yield regeneratorRuntime.awrap(x)` + // causes the argument to be wrapped in such a way that the runtime + // can distinguish between awaited and merely yielded values. + return b.yieldExpression( + b.callExpression( + runtimeProperty("awrap"), + [argument] + ), + false + ); + } + }); - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} +},{"..":455,"./emit":449,"./hoist":450,"./util":453,"assert":203,"fs":202,"private":448,"recast":480}],455:[function(require,module,exports){ + (function (__dirname){ + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + var assert = require("assert"); + var path = require("path"); + var fs = require("fs"); + var through = require("through"); + var transform = require("./lib/visit").transform; + var utils = require("./lib/util"); + var recast = require("recast"); + var types = recast.types; + var genOrAsyncFunExp = /\bfunction\s*\*|\basync\b/; + var blockBindingExp = /\b(let|const)\s+/; -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); + function exports(file, options) { + var data = []; + return through(write, end); - Duplex.call(this, options); + function write(buf) { + data.push(buf); + } - this._transformState = new TransformState(options, this); + function end() { + this.queue(compile(data.join(""), options).code); + this.queue(null); + } + } - // when the writable side finishes, then flush out anything remaining. - var stream = this; +// To get a writable stream for use as a browserify transform, call +// require("regenerator")(). + module.exports = exports; - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; +// To include the runtime globally in the current node process, call +// require("regenerator").runtime(). + function runtime() { + require("./runtime"); + } + exports.runtime = runtime; + runtime.path = path.join(__dirname, "runtime.js"); - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; + function compile(source, options) { + options = normalizeOptions(options); - this.once('prefinish', function() { - if (util.isFunction(this._flush)) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} + if (!genOrAsyncFunExp.test(source)) { + return { + // Shortcut: no generators or async functions to transform. + code: (options.includeRuntime === true ? fs.readFileSync( + path.join(__dirname, "runtime.js"), "utf-8" + ) + "\n" : "") + source + }; + } -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; + var recastOptions = getRecastOptions(options); + var ast = recast.parse(source, recastOptions); + var nodePath = new types.NodePath(ast); + var programPath = nodePath.get("program"); -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; + if (shouldVarify(source, options)) { + // Transpile let/const into var declarations. + varifyAst(programPath.node); + } -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; + transform(programPath, options); + + return recast.print(nodePath, recastOptions); + } - if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; + function normalizeOptions(options) { + options = utils.defaults(options || {}, { + includeRuntime: false, + supportBlockBinding: true + }); + if (!options.esprima) { + options.esprima = require("esprima-fb"); + } -function done(stream, er) { - if (er) - return stream.emit('error', er); + assert.ok( + /harmony/.test(options.esprima.version), + "Bad esprima version: " + options.esprima.version + ); - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; + return options; + } - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); + function getRecastOptions(options) { + var recastOptions = { + range: true + }; - if (ts.transforming) - throw new Error('calling transform done when still transforming'); + function copy(name) { + if (name in options) { + recastOptions[name] = options[name]; + } + } - return stream.push(null); -} + copy("esprima"); + copy("sourceFileName"); + copy("sourceMapName"); + copy("inputSourceMap"); + copy("sourceRoot"); -},{"./_stream_duplex":185,"core-util-is":190,"inherits":180}],189:[function(require,module,exports){ -(function (process){ -// 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. + return recastOptions; + } -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. + function shouldVarify(source, options) { + var supportBlockBinding = !!options.supportBlockBinding; + if (supportBlockBinding) { + if (!blockBindingExp.test(source)) { + supportBlockBinding = false; + } + } -module.exports = Writable; + return supportBlockBinding; + } -/**/ -var Buffer = require('buffer').Buffer; -/**/ + function varify(source, options) { + var recastOptions = getRecastOptions(normalizeOptions(options)); + var ast = recast.parse(source, recastOptions); + varifyAst(ast.program); + return recast.print(ast, recastOptions).code; + } -Writable.WritableState = WritableState; + function varifyAst(ast) { + types.namedTypes.Program.assert(ast); + var defsResult = require("defs")(ast, { + ast: true, + disallowUnknownReferences: false, + disallowDuplicated: false, + disallowVars: false, + loopClosures: "iife" + }); -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ + if (defsResult.errors) { + throw new Error(defsResult.errors.join("\n")) + } -var Stream = require('stream'); + return ast; + } -util.inherits(Writable, Stream); +// Convenience for just translating let/const to var declarations. + exports.varify = varify; -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} +// Transforms a string of source code, returning the { code, map? } result +// from recast.print. + exports.compile = compile; -function WritableState(options, stream) { - var Duplex = require('./_stream_duplex'); +// To modify an AST directly, call require("regenerator").transform(ast). + exports.transform = transform; - options = options || {}; + }).call(this,"/node_modules/regenerator") +},{"./lib/util":453,"./lib/visit":454,"./runtime":482,"assert":203,"defs":456,"esprima-fb":202,"fs":202,"path":212,"recast":480,"through":481}],456:[function(require,module,exports){ + "use strict"; - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = options.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; + var assert = require("assert"); + var is = require("simple-is"); + var fmt = require("simple-fmt"); + var stringmap = require("stringmap"); + var stringset = require("stringset"); + var alter = require("alter"); + var traverse = require("ast-traverse"); + var breakable = require("breakable"); + var Scope = require("./scope"); + var error = require("./error"); + var getline = error.getline; + var options = require("./options"); + var Stats = require("./stats"); + var jshint_vars = require("./jshint_globals/vars.js"); - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - if (stream instanceof Duplex) - this.objectMode = this.objectMode || !!options.writableObjectMode; + function isConstLet(kind) { + return is.someof(kind, ["const", "let"]); + } - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; + function isVarConstLet(kind) { + return is.someof(kind, ["var", "const", "let"]); + } - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; + function isNonFunctionBlock(node) { + return node.type === "BlockStatement" && is.noneof(node.$parent.type, ["FunctionDeclaration", "FunctionExpression"]); + } - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; + function isForWithConstLet(node) { + return node.type === "ForStatement" && node.init && node.init.type === "VariableDeclaration" && isConstLet(node.init.kind); + } - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; + function isForInOfWithConstLet(node) { + return isForInOf(node) && node.left.type === "VariableDeclaration" && isConstLet(node.left.kind); + } - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; + function isForInOf(node) { + return is.someof(node.type, ["ForInStatement", "ForOfStatement"]); + } - // a flag to see when we're in the middle of a write. - this.writing = false; + function isFunction(node) { + return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]); + } - // when true all writes will be buffered until .uncork() call - this.corked = 0; + function isLoop(node) { + return is.someof(node.type, ["ForStatement", "ForInStatement", "ForOfStatement", "WhileStatement", "DoWhileStatement"]); + } - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; + function isReference(node) { + var parent = node.$parent; + return node.$refToScope || + node.type === "Identifier" && + !(parent.type === "VariableDeclarator" && parent.id === node) && // var|let|const $ + !(parent.type === "MemberExpression" && parent.computed === false && parent.property === node) && // obj.$ + !(parent.type === "Property" && parent.key === node) && // {$: ...} + !(parent.type === "LabeledStatement" && parent.label === node) && // $: ... + !(parent.type === "CatchClause" && parent.param === node) && // catch($) + !(isFunction(parent) && parent.id === node) && // function $(.. + !(isFunction(parent) && is.someof(node, parent.params)) && // function f($).. + true; + } - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; + function isLvalue(node) { + return isReference(node) && + ((node.$parent.type === "AssignmentExpression" && node.$parent.left === node) || + (node.$parent.type === "UpdateExpression" && node.$parent.argument === node)); + } - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; + function createScopes(node, parent) { + assert(!node.$scope); - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; + node.$parent = parent; + node.$scope = node.$parent ? node.$parent.$scope : null; // may be overridden - // the amount that is being written when _write is called. - this.writelen = 0; + if (node.type === "Program") { + // Top-level program is a scope + // There's no block-scope under it + node.$scope = new Scope({ + kind: "hoist", + node: node, + parent: null, + }); - this.buffer = []; + } else if (isFunction(node)) { + // Function is a scope, with params in it + // There's no block-scope under it - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; + node.$scope = new Scope({ + kind: "hoist", + node: node, + parent: node.$parent.$scope, + }); - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; + // function has a name + if (node.id) { + assert(node.id.type === "Identifier"); - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} + if (node.type === "FunctionDeclaration") { + // Function name goes in parent scope for declared functions + node.$parent.$scope.add(node.id.name, "fun", node.id, null); + } else if (node.type === "FunctionExpression") { + // Function name goes in function's scope for named function expressions + node.$scope.add(node.id.name, "fun", node.id, null); + } else { + assert(false); + } + } -function Writable(options) { - var Duplex = require('./_stream_duplex'); + node.params.forEach(function(param) { + node.$scope.add(param.name, "param", param, null); + }); - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); + } else if (node.type === "VariableDeclaration") { + // Variable declarations names goes in current scope + assert(isVarConstLet(node.kind)); + node.declarations.forEach(function(declarator) { + assert(declarator.type === "VariableDeclarator"); + var name = declarator.id.name; + if (options.disallowVars && node.kind === "var") { + error(getline(declarator), "var {0} is not allowed (use let or const)", name); + } + node.$scope.add(name, node.kind, declarator.id, declarator.range[1]); + }); - this._writableState = new WritableState(options, this); + } else if (isForWithConstLet(node) || isForInOfWithConstLet(node)) { + // For(In/Of) loop with const|let declaration is a scope, with declaration in it + // There may be a block-scope under it + node.$scope = new Scope({ + kind: "block", + node: node, + parent: node.$parent.$scope, + }); - // legacy. - this.writable = true; + } else if (isNonFunctionBlock(node)) { + // A block node is a scope unless parent is a function + node.$scope = new Scope({ + kind: "block", + node: node, + parent: node.$parent.$scope, + }); - Stream.call(this); -} + } else if (node.type === "CatchClause") { + var identifier = node.param; -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; + node.$scope = new Scope({ + kind: "catch-block", + node: node, + parent: node.$parent.$scope, + }); + node.$scope.add(identifier.name, "caught", identifier, null); + // All hoist-scope keeps track of which variables that are propagated through, + // i.e. an reference inside the scope points to a declaration outside the scope. + // This is used to mark "taint" the name since adding a new variable in the scope, + // with a propagated name, would change the meaning of the existing references. + // + // catch(e) is special because even though e is a variable in its own scope, + // we want to make sure that catch(e){let e} is never transformed to + // catch(e){var e} (but rather var e$0). For that reason we taint the use of e + // in the closest hoist-scope, i.e. where var e$0 belongs. + node.$scope.closestHoistScope().markPropagates(identifier.name); + } + } -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} + function createTopScope(programScope, environments, globals) { + function inject(obj) { + for (var name in obj) { + var writeable = obj[name]; + var kind = (writeable ? "var" : "const"); + if (topScope.hasOwn(name)) { + topScope.remove(name); + } + topScope.add(name, kind, {loc: {start: {line: -1}}}, -1); + } + } -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!util.isBuffer(chunk) && - !util.isString(chunk) && - !util.isNullOrUndefined(chunk) && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); + var topScope = new Scope({ + kind: "hoist", + node: {}, + parent: null, }); - valid = false; - } - return valid; -} -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; + var complementary = { + undefined: false, + Infinity: false, + console: false, + }; + + inject(complementary); + inject(jshint_vars.reservedVars); + inject(jshint_vars.ecmaIdentifiers); + if (environments) { + environments.forEach(function(env) { + if (!jshint_vars[env]) { + error(-1, 'environment "{0}" not found', env); + } else { + inject(jshint_vars[env]); + } + }); + } + if (globals) { + inject(globals); + } + + // link it in + programScope.parent = topScope; + topScope.children.push(programScope); - if (util.isFunction(encoding)) { - cb = encoding; - encoding = null; + return topScope; } - if (util.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; + function setupReferences(ast, allIdentifiers, opts) { + var analyze = (is.own(opts, "analyze") ? opts.analyze : true); - if (!util.isFunction(cb)) - cb = function() {}; + function visit(node) { + if (!isReference(node)) { + return; + } + allIdentifiers.add(node.name); + + var scope = node.$scope.lookup(node.name); + if (analyze && !scope && options.disallowUnknownReferences) { + error(getline(node), "reference to unknown global variable {0}", node.name); + } + // check const and let for referenced-before-declaration + if (analyze && scope && is.someof(scope.getKind(node.name), ["const", "let"])) { + var allowedFromPos = scope.getFromPos(node.name); + var referencedAtPos = node.range[0]; + assert(is.finitenumber(allowedFromPos)); + assert(is.finitenumber(referencedAtPos)); + if (referencedAtPos < allowedFromPos) { + if (!node.$scope.hasFunctionScopeBetween(scope)) { + error(getline(node), "{0} is referenced before its declaration", node.name); + } + } + } + node.$refToScope = scope; + } - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); + traverse(ast, {pre: visit}); } - return ret; -}; +// TODO for loops init and body props are parallel to each other but init scope is outer that of body +// TODO is this a problem? -Writable.prototype.cork = function() { - var state = this._writableState; + function varify(ast, stats, allIdentifiers, changes) { + function unique(name) { + assert(allIdentifiers.has(name)); + for (var cnt = 0; ; cnt++) { + var genName = name + "$" + String(cnt); + if (!allIdentifiers.has(genName)) { + return genName; + } + } + } - state.corked++; -}; + function renameDeclarations(node) { + if (node.type === "VariableDeclaration" && isConstLet(node.kind)) { + var hoistScope = node.$scope.closestHoistScope(); + var origScope = node.$scope; -Writable.prototype.uncork = function() { - var state = this._writableState; + // text change const|let => var + changes.push({ + start: node.range[0], + end: node.range[0] + node.kind.length, + str: "var", + }); - if (state.corked) { - state.corked--; + node.declarations.forEach(function(declarator) { + assert(declarator.type === "VariableDeclarator"); + var name = declarator.id.name; - if (!state.writing && - !state.corked && - !state.finished && - !state.bufferProcessing && - state.buffer.length) - clearBuffer(this, state); - } -}; + stats.declarator(node.kind); -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - util.isString(chunk)) { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} + // rename if + // 1) name already exists in hoistScope, or + // 2) name is already propagated (passed) through hoistScope or manually tainted + var rename = (origScope !== hoistScope && + (hoistScope.hasOwn(name) || hoistScope.doesPropagate(name))); -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (util.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing || state.corked) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, false, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) - stream._writev(chunk, state.onwrite); - else - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - state.pendingcb--; - cb(er); - }); - else { - state.pendingcb--; - cb(er); - } + var newName = (rename ? unique(name) : name); - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} + origScope.remove(name); + hoistScope.add(newName, "var", declarator.id, declarator.range[1]); -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} + origScope.moves = origScope.moves || stringmap(); + origScope.moves.set(name, { + name: newName, + scope: hoistScope, + }); -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; + allIdentifiers.add(newName); - onwriteStateUpdate(state); + if (newName !== name) { + stats.rename(name, newName, getline(declarator)); - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); + declarator.id.originalName = name; + declarator.id.name = newName; - if (!finished && - !state.corked && - !state.bufferProcessing && - state.buffer.length) { - clearBuffer(stream, state); - } + // textchange var x => var x$1 + changes.push({ + start: declarator.id.range[0], + end: declarator.id.range[1], + str: newName, + }); + } + }); - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); + // ast change const|let => var + node.kind = "var"; + } } - } -} -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} + function renameReferences(node) { + if (!node.$refToScope) { + return; + } + var move = node.$refToScope.moves && node.$refToScope.moves.get(node.name); + if (!move) { + return; + } + node.$refToScope = move.scope; -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} + if (node.name !== move.name) { + node.originalName = node.name; + node.name = move.name; + if (node.alterop) { + // node has no range because it is the result of another alter operation + var existingOp = null; + for (var i = 0; i < changes.length; i++) { + var op = changes[i]; + if (op.node === node) { + existingOp = op; + break; + } + } + assert(existingOp); -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - if (stream._writev && state.buffer.length > 1) { - // Fast case, write everything using _writev() - var cbs = []; - for (var c = 0; c < state.buffer.length; c++) - cbs.push(state.buffer[c].callback); - - // count the one we are adding, as well. - // TODO(isaacs) clean this up - state.pendingcb++; - doWrite(stream, state, true, state.length, state.buffer, '', function(err) { - for (var i = 0; i < cbs.length; i++) { - state.pendingcb--; - cbs[i](err); + // modify op + existingOp.str = move.name; + } else { + changes.push({ + start: node.range[0], + end: node.range[1], + str: move.name, + }); + } } - }); + } - // Clear buffer - state.buffer = []; - } else { - // Slow case, write chunks one-by-one - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; + traverse(ast, {pre: renameDeclarations}); + traverse(ast, {pre: renameReferences}); + ast.$scope.traverse({pre: function(scope) { + delete scope.moves; + }}); + } - doWrite(stream, state, false, len, chunk, encoding, cb); - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } + function detectLoopClosures(ast) { + traverse(ast, {pre: visit}); + + function detectIifyBodyBlockers(body, node) { + return breakable(function(brk) { + traverse(body, {pre: function(n) { + // if we hit an inner function of the loop body, don't traverse further + if (isFunction(n)) { + return false; + } + + var err = true; // reset to false in else-statement below + var msg = "loop-variable {0} is captured by a loop-closure that can't be transformed due to use of {1} at line {2}"; + if (n.type === "BreakStatement") { + error(getline(node), msg, node.name, "break", getline(n)); + } else if (n.type === "ContinueStatement") { + error(getline(node), msg, node.name, "continue", getline(n)); + } else if (n.type === "ReturnStatement") { + error(getline(node), msg, node.name, "return", getline(n)); + } else if (n.type === "YieldExpression") { + error(getline(node), msg, node.name, "yield", getline(n)); + } else if (n.type === "Identifier" && n.name === "arguments") { + error(getline(node), msg, node.name, "arguments", getline(n)); + } else if (n.type === "VariableDeclaration" && n.kind === "var") { + error(getline(node), msg, node.name, "var", getline(n)); + } else { + err = false; + } + if (err) { + brk(true); // break traversal + } + }}); + return false; + }); } - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; - } + function visit(node) { + // forbidden pattern: + // * * * * + var loopNode = null; + if (isReference(node) && node.$refToScope && isConstLet(node.$refToScope.getKind(node.name))) { + // traverse nodes up towards root from constlet-def + // if we hit a function (before a loop) - ok! + // if we hit a loop - maybe-ouch + // if we reach root - ok! + for (var n = node.$refToScope.node; ; ) { + if (isFunction(n)) { + // we're ok (function-local) + return; + } else if (isLoop(n)) { + loopNode = n; + // maybe not ok (between loop and function) + break; + } + n = n.$parent; + if (!n) { + // ok (reached root) + return; + } + } + + assert(isLoop(loopNode)); - state.bufferProcessing = false; -} + // traverse scopes from reference-scope up towards definition-scope + // if we hit a function, ouch! + var defScope = node.$refToScope; + var generateIIFE = (options.loopClosures === "iife"); -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); + for (var s = node.$scope; s; s = s.parent) { + if (s === defScope) { + // we're ok + return; + } else if (isFunction(s.node)) { + // not ok (there's a function between the reference and definition) + // may be transformable via IIFE -}; + if (!generateIIFE) { + var msg = "loop-variable {0} is captured by a loop-closure. Tried \"loopClosures\": \"iife\" in defs-config.json?"; + return error(getline(node), msg, node.name); + } -Writable.prototype._writev = null; + // here be dragons + // for (let x = ..; .. ; ..) { (function(){x})() } is forbidden because of current + // spec and VM status + if (loopNode.type === "ForStatement" && defScope.node === loopNode) { + var declarationNode = defScope.getNode(node.name); + return error(getline(declarationNode), "Not yet specced ES6 feature. {0} is declared in for-loop header and then captured in loop closure", declarationNode.name); + } -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; + // speak now or forever hold your peace + if (detectIifyBodyBlockers(loopNode.body, node)) { + // error already generated + return; + } - if (util.isFunction(chunk)) { - cb = chunk; - chunk = null; - encoding = null; - } else if (util.isFunction(encoding)) { - cb = encoding; - encoding = null; + // mark loop for IIFE-insertion + loopNode.$iify = true; + } + } + } + } } - if (!util.isNullOrUndefined(chunk)) - this.write(chunk, encoding); + function transformLoopClosures(root, ops, options) { + function insertOp(pos, str, node) { + var op = { + start: pos, + end: pos, + str: str, + } + if (node) { + op.node = node; + } + ops.push(op); + } - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } + traverse(root, {pre: function(node) { + if (!node.$iify) { + return; + } - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; + var hasBlock = (node.body.type === "BlockStatement"); + var insertHead = (hasBlock ? + node.body.range[0] + 1 : // just after body { + node.body.range[0]); // just before existing expression + var insertFoot = (hasBlock ? + node.body.range[1] - 1 : // just before body } + node.body.range[1]); // just after existing expression -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} + var forInName = (isForInOf(node) && node.left.declarations[0].id.name);; + var iifeHead = fmt("(function({0}){", forInName ? forInName : ""); + var iifeTail = fmt("}).call(this{0});", forInName ? ", " + forInName : ""); -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} + // modify AST + var iifeFragment = options.parse(iifeHead + iifeTail); + var iifeExpressionStatement = iifeFragment.body[0]; + var iifeBlockStatement = iifeExpressionStatement.expression.callee.object.body; -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else - prefinish(stream, state); - } - return need; -} + if (hasBlock) { + var forBlockStatement = node.body; + var tmp = forBlockStatement.body; + forBlockStatement.body = [iifeExpressionStatement]; + iifeBlockStatement.body = tmp; + } else { + var tmp$0 = node.body; + node.body = iifeExpressionStatement; + iifeBlockStatement.body[0] = tmp$0; + } -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); + // create ops + insertOp(insertHead, iifeHead); + + if (forInName) { + insertOp(insertFoot, "}).call(this, "); + + var args = iifeExpressionStatement.expression.arguments; + var iifeArgumentIdentifier = args[1]; + iifeArgumentIdentifier.alterop = true; + insertOp(insertFoot, forInName, iifeArgumentIdentifier); + + insertOp(insertFoot, ");"); + } else { + insertOp(insertFoot, iifeTail); + } + }}); } - state.ended = true; -} -}).call(this,require('_process')) -},{"./_stream_duplex":185,"_process":183,"buffer":175,"core-util-is":190,"inherits":180,"stream":195}],190:[function(require,module,exports){ -(function (Buffer){ -// 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 detectConstAssignment(ast) { + traverse(ast, {pre: function(node) { + if (isLvalue(node)) { + var scope = node.$scope.lookup(node.name); + if (scope && scope.getKind(node.name) === "const") { + error(getline(node), "can't assign to const variable {0}", node.name); + } + } + }}); + } -// 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; - -function isBuffer(arg) { - return Buffer.isBuffer(arg); -} -exports.isBuffer = isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} -}).call(this,require("buffer").Buffer) -},{"buffer":175}],191:[function(require,module,exports){ -module.exports = require("./lib/_stream_passthrough.js") - -},{"./lib/_stream_passthrough.js":186}],192:[function(require,module,exports){ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = require('stream'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); - -},{"./lib/_stream_duplex.js":185,"./lib/_stream_passthrough.js":186,"./lib/_stream_readable.js":187,"./lib/_stream_transform.js":188,"./lib/_stream_writable.js":189,"stream":195}],193:[function(require,module,exports){ -module.exports = require("./lib/_stream_transform.js") - -},{"./lib/_stream_transform.js":188}],194:[function(require,module,exports){ -module.exports = require("./lib/_stream_writable.js") - -},{"./lib/_stream_writable.js":189}],195:[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 detectConstantLets(ast) { + traverse(ast, {pre: function(node) { + if (isLvalue(node)) { + var scope = node.$scope.lookup(node.name); + if (scope) { + scope.markWrite(node.name); + } + } + }}); -module.exports = Stream; + ast.$scope.detectUnmodifiedLets(); + } -var EE = require('events').EventEmitter; -var inherits = require('inherits'); + function setupScopeAndReferences(root, opts) { + // setup scopes + traverse(root, {pre: createScopes}); + var topScope = createTopScope(root.$scope, options.environments, options.globals); -inherits(Stream, EE); -Stream.Readable = require('readable-stream/readable.js'); -Stream.Writable = require('readable-stream/writable.js'); -Stream.Duplex = require('readable-stream/duplex.js'); -Stream.Transform = require('readable-stream/transform.js'); -Stream.PassThrough = require('readable-stream/passthrough.js'); + // allIdentifiers contains all declared and referenced vars + // collect all declaration names (including those in topScope) + var allIdentifiers = stringset(); + topScope.traverse({pre: function(scope) { + allIdentifiers.addMany(scope.decls.keys()); + }}); -// Backwards-compat with node 0.4.x -Stream.Stream = Stream; + // setup node.$refToScope, check for errors. + // also collects all referenced names to allIdentifiers + setupReferences(root, allIdentifiers, opts); + return allIdentifiers; + } + function cleanupTree(root) { + traverse(root, {pre: function(node) { + for (var prop in node) { + if (prop[0] === "$") { + delete node[prop]; + } + } + }}); + } + function run(src, config) { + // alter the options singleton with user configuration + for (var key in config) { + options[key] = config[key]; + } -// old-style streams. Note that the pipe method (the only relevant -// part of this class) is overridden in the Readable class. + var parsed; -function Stream() { - EE.call(this); -} + if (is.object(src)) { + if (!options.ast) { + return { + errors: [ + "Can't produce string output when input is an AST. " + + "Did you forget to set options.ast = true?" + ], + }; + } -Stream.prototype.pipe = function(dest, options) { - var source = this; + // Received an AST object as src, so no need to parse it. + parsed = src; - function ondata(chunk) { - if (dest.writable) { - if (false === dest.write(chunk) && source.pause) { - source.pause(); + } else if (is.string(src)) { + try { + parsed = options.parse(src, { + loc: true, + range: true, + }); + } catch (e) { + return { + errors: [ + fmt("line {0} column {1}: Error during input file parsing\n{2}\n{3}", + e.lineNumber, + e.column, + src.split("\n")[e.lineNumber - 1], + fmt.repeat(" ", e.column - 1) + "^") + ], + }; } + + } else { + return { + errors: ["Input was neither an AST object nor a string."], + }; } - } - source.on('data', ondata); + var ast = parsed; - function ondrain() { - if (source.readable && source.resume) { - source.resume(); - } - } + // TODO detect unused variables (never read) + error.reset(); - dest.on('drain', ondrain); + var allIdentifiers = setupScopeAndReferences(ast, {}); - // If the 'end' option is not supplied, dest.end() will be called when - // source gets the 'end' or 'close' events. Only dest.end() once. - if (!dest._isStdio && (!options || options.end !== false)) { - source.on('end', onend); - source.on('close', onclose); - } + // static analysis passes + detectLoopClosures(ast); + detectConstAssignment(ast); + //detectConstantLets(ast); - var didOnEnd = false; - function onend() { - if (didOnEnd) return; - didOnEnd = true; + var changes = []; + transformLoopClosures(ast, changes, options); - dest.end(); - } + //ast.$scope.print(); process.exit(-1); + if (error.errors.length >= 1) { + return { + errors: error.errors, + }; + } - function onclose() { - if (didOnEnd) return; - didOnEnd = true; + if (changes.length > 0) { + cleanupTree(ast); + allIdentifiers = setupScopeAndReferences(ast, {analyze: false}); + } + assert(error.errors.length === 0); - if (typeof dest.destroy === 'function') dest.destroy(); - } + // change constlet declarations to var, renamed if needed + // varify modifies the scopes and AST accordingly and + // returns a list of change fragments (to use with alter) + var stats = new Stats(); + varify(ast, stats, allIdentifiers, changes); - // don't leave dangling pipes when there are errors. - function onerror(er) { - cleanup(); - if (EE.listenerCount(this, 'error') === 0) { - throw er; // Unhandled stream error in pipe. + if (options.ast) { + // return the modified AST instead of src code + // get rid of all added $ properties first, such as $parent and $scope + cleanupTree(ast); + return { + stats: stats, + ast: ast, + }; + } else { + // apply changes produced by varify and return the transformed src + var transformedSrc = alter(src, changes); + return { + stats: stats, + src: transformedSrc, + }; } } - source.on('error', onerror); - dest.on('error', onerror); + module.exports = run; - // remove all the event listeners that were added. - function cleanup() { - source.removeListener('data', ondata); - dest.removeListener('drain', ondrain); +},{"./error":457,"./jshint_globals/vars.js":458,"./options":459,"./scope":460,"./stats":461,"alter":462,"assert":203,"ast-traverse":464,"breakable":465,"simple-fmt":466,"simple-is":467,"stringmap":468,"stringset":469}],457:[function(require,module,exports){ + "use strict"; - source.removeListener('end', onend); - source.removeListener('close', onclose); + var fmt = require("simple-fmt"); + var assert = require("assert"); - source.removeListener('error', onerror); - dest.removeListener('error', onerror); + function error(line, var_args) { + assert(arguments.length >= 2); - source.removeListener('end', cleanup); - source.removeListener('close', cleanup); + var msg = (arguments.length === 2 ? + String(var_args) : fmt.apply(fmt, Array.prototype.slice.call(arguments, 1))); - dest.removeListener('close', cleanup); + error.errors.push(line === -1 ? msg : fmt("line {0}: {1}", line, msg)); } - source.on('end', cleanup); - source.on('close', cleanup); + error.reset = function() { + error.errors = []; + }; - dest.on('close', cleanup); + error.getline = function(node) { + if (node && node.loc && node.loc.start) { + return node.loc.start.line; + } + return -1; + }; - dest.emit('pipe', source); + error.reset(); - // Allow for unix-like usage: A.pipe(B).pipe(C) - return dest; -}; + module.exports = error; -},{"events":179,"inherits":180,"readable-stream/duplex.js":184,"readable-stream/passthrough.js":191,"readable-stream/readable.js":192,"readable-stream/transform.js":193,"readable-stream/writable.js":194}],196:[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. +},{"assert":203,"simple-fmt":466}],458:[function(require,module,exports){ +// jshint -W001 -var Buffer = require('buffer').Buffer; + "use strict"; -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } +// Identifiers provided by the ECMAScript standard. + + exports.reservedVars = { + arguments : false, + NaN : false + }; + + exports.ecmaIdentifiers = { + Array : false, + Boolean : false, + Date : false, + decodeURI : false, + decodeURIComponent : false, + encodeURI : false, + encodeURIComponent : false, + Error : false, + "eval" : false, + EvalError : false, + Function : false, + hasOwnProperty : false, + isFinite : false, + isNaN : false, + JSON : false, + Math : false, + Map : false, + Number : false, + Object : false, + parseInt : false, + parseFloat : false, + RangeError : false, + ReferenceError : false, + RegExp : false, + Set : false, + String : false, + SyntaxError : false, + TypeError : false, + URIError : false, + WeakMap : false + }; + +// Global variables commonly provided by a web browser environment. + + exports.browser = { + ArrayBuffer : false, + ArrayBufferView : false, + Audio : false, + Blob : false, + addEventListener : false, + applicationCache : false, + atob : false, + blur : false, + btoa : false, + clearInterval : false, + clearTimeout : false, + close : false, + closed : false, + DataView : false, + DOMParser : false, + defaultStatus : false, + document : false, + Element : false, + event : false, + FileReader : false, + Float32Array : false, + Float64Array : false, + FormData : false, + focus : false, + frames : false, + getComputedStyle : false, + HTMLElement : false, + HTMLAnchorElement : false, + HTMLBaseElement : false, + HTMLBlockquoteElement: false, + HTMLBodyElement : false, + HTMLBRElement : false, + HTMLButtonElement : false, + HTMLCanvasElement : false, + HTMLDirectoryElement : false, + HTMLDivElement : false, + HTMLDListElement : false, + HTMLFieldSetElement : false, + HTMLFontElement : false, + HTMLFormElement : false, + HTMLFrameElement : false, + HTMLFrameSetElement : false, + HTMLHeadElement : false, + HTMLHeadingElement : false, + HTMLHRElement : false, + HTMLHtmlElement : false, + HTMLIFrameElement : false, + HTMLImageElement : false, + HTMLInputElement : false, + HTMLIsIndexElement : false, + HTMLLabelElement : false, + HTMLLayerElement : false, + HTMLLegendElement : false, + HTMLLIElement : false, + HTMLLinkElement : false, + HTMLMapElement : false, + HTMLMenuElement : false, + HTMLMetaElement : false, + HTMLModElement : false, + HTMLObjectElement : false, + HTMLOListElement : false, + HTMLOptGroupElement : false, + HTMLOptionElement : false, + HTMLParagraphElement : false, + HTMLParamElement : false, + HTMLPreElement : false, + HTMLQuoteElement : false, + HTMLScriptElement : false, + HTMLSelectElement : false, + HTMLStyleElement : false, + HTMLTableCaptionElement: false, + HTMLTableCellElement : false, + HTMLTableColElement : false, + HTMLTableElement : false, + HTMLTableRowElement : false, + HTMLTableSectionElement: false, + HTMLTextAreaElement : false, + HTMLTitleElement : false, + HTMLUListElement : false, + HTMLVideoElement : false, + history : false, + Int16Array : false, + Int32Array : false, + Int8Array : false, + Image : false, + length : false, + localStorage : false, + location : false, + MessageChannel : false, + MessageEvent : false, + MessagePort : false, + moveBy : false, + moveTo : false, + MutationObserver : false, + name : false, + Node : false, + NodeFilter : false, + navigator : false, + onbeforeunload : true, + onblur : true, + onerror : true, + onfocus : true, + onload : true, + onresize : true, + onunload : true, + open : false, + openDatabase : false, + opener : false, + Option : false, + parent : false, + print : false, + removeEventListener : false, + resizeBy : false, + resizeTo : false, + screen : false, + scroll : false, + scrollBy : false, + scrollTo : false, + sessionStorage : false, + setInterval : false, + setTimeout : false, + SharedWorker : false, + status : false, + top : false, + Uint16Array : false, + Uint32Array : false, + Uint8Array : false, + Uint8ClampedArray : false, + WebSocket : false, + window : false, + Worker : false, + XMLHttpRequest : false, + XMLSerializer : false, + XPathEvaluator : false, + XPathException : false, + XPathExpression : false, + XPathNamespace : false, + XPathNSResolver : false, + XPathResult : false + }; + + exports.devel = { + alert : false, + confirm: false, + console: false, + Debug : false, + opera : false, + prompt : false + }; + + exports.worker = { + importScripts: true, + postMessage : true, + self : true + }; + +// Widely adopted global names that are not part of ECMAScript standard + exports.nonstandard = { + escape : false, + unescape: false + }; + +// Globals provided by popular JavaScript environments. + + exports.couch = { + "require" : false, + respond : false, + getRow : false, + emit : false, + send : false, + start : false, + sum : false, + log : false, + exports : false, + module : false, + provides : false + }; + + exports.node = { + __filename : false, + __dirname : false, + Buffer : false, + DataView : false, + console : false, + exports : true, // In Node it is ok to exports = module.exports = foo(); + GLOBAL : false, + global : false, + module : false, + process : false, + require : false, + setTimeout : false, + clearTimeout : false, + setInterval : false, + clearInterval: false + }; + + exports.phantom = { + phantom : true, + require : true, + WebPage : true + }; + + exports.rhino = { + defineClass : false, + deserialize : false, + gc : false, + help : false, + importPackage: false, + "java" : false, + load : false, + loadClass : false, + print : false, + quit : false, + readFile : false, + readUrl : false, + runCommand : false, + seal : false, + serialize : false, + spawn : false, + sync : false, + toint32 : false, + version : false + }; + + exports.wsh = { + ActiveXObject : true, + Enumerator : true, + GetObject : true, + ScriptEngine : true, + ScriptEngineBuildVersion : true, + ScriptEngineMajorVersion : true, + ScriptEngineMinorVersion : true, + VBArray : true, + WSH : true, + WScript : true, + XDomainRequest : true + }; + +// Globals provided by popular JavaScript libraries. + + exports.dojo = { + dojo : false, + dijit : false, + dojox : false, + define : false, + "require": false + }; + + exports.jquery = { + "$" : false, + jQuery : false + }; + + exports.mootools = { + "$" : false, + "$$" : false, + Asset : false, + Browser : false, + Chain : false, + Class : false, + Color : false, + Cookie : false, + Core : false, + Document : false, + DomReady : false, + DOMEvent : false, + DOMReady : false, + Drag : false, + Element : false, + Elements : false, + Event : false, + Events : false, + Fx : false, + Group : false, + Hash : false, + HtmlTable : false, + Iframe : false, + IframeShim : false, + InputValidator: false, + instanceOf : false, + Keyboard : false, + Locale : false, + Mask : false, + MooTools : false, + Native : false, + Options : false, + OverText : false, + Request : false, + Scroller : false, + Slick : false, + Slider : false, + Sortables : false, + Spinner : false, + Swiff : false, + Tips : false, + Type : false, + typeOf : false, + URI : false, + Window : false + }; + + exports.prototypejs = { + "$" : false, + "$$" : false, + "$A" : false, + "$F" : false, + "$H" : false, + "$R" : false, + "$break" : false, + "$continue" : false, + "$w" : false, + Abstract : false, + Ajax : false, + Class : false, + Enumerable : false, + Element : false, + Event : false, + Field : false, + Form : false, + Hash : false, + Insertion : false, + ObjectRange : false, + PeriodicalExecuter: false, + Position : false, + Prototype : false, + Selector : false, + Template : false, + Toggle : false, + Try : false, + Autocompleter : false, + Builder : false, + Control : false, + Draggable : false, + Draggables : false, + Droppables : false, + Effect : false, + Sortable : false, + SortableObserver : false, + Sound : false, + Scriptaculous : false + }; + + exports.yui = { + YUI : false, + Y : false, + YUI_config: false + }; + + +},{}],459:[function(require,module,exports){ +// default configuration + + module.exports = { + disallowVars: false, + disallowDuplicated: true, + disallowUnknownReferences: true, + parse: require("esprima-fb").parse, + }; + +},{"esprima-fb":202}],460:[function(require,module,exports){ + "use strict"; + var assert = require("assert"); + var stringmap = require("stringmap"); + var stringset = require("stringset"); + var is = require("simple-is"); + var fmt = require("simple-fmt"); + var error = require("./error"); + var getline = error.getline; + var options = require("./options"); -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} + function Scope(args) { + assert(is.someof(args.kind, ["hoist", "block", "catch-block"])); + assert(is.object(args.node)); + assert(args.parent === null || is.object(args.parent)); -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } + // kind === "hoist": function scopes, program scope, injected globals + // kind === "block": ES6 block scopes + // kind === "catch-block": catch block scopes + this.kind = args.kind; - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; + // the AST node the block corresponds to + this.node = args.node; + // parent scope + this.parent = args.parent; -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; + // children scopes for easier traversal (populated internally) + this.children = []; + + // scope declarations. decls[variable_name] = { + // kind: "fun" for functions, + // "param" for function parameters, + // "caught" for catch parameter + // "var", + // "const", + // "let" + // node: the AST node the declaration corresponds to + // from: source code index from which it is visible at earliest + // (only stored for "const", "let" [and "var"] nodes) + // } + this.decls = stringmap(); + + // names of all declarations within this scope that was ever written + // TODO move to decls.w? + // TODO create corresponding read? + this.written = stringset(); + + // names of all variables declared outside this hoist scope but + // referenced in this scope (immediately or in child). + // only stored on hoist scopes for efficiency + // (because we currently generate lots of empty block scopes) + this.propagates = (this.kind === "hoist" ? stringset() : null); + + // scopes register themselves with their parents for easier traversal + if (this.parent) { + this.parent.children.push(this); + } + } + + Scope.prototype.print = function(indent) { + indent = indent || 0; + var scope = this; + var names = this.decls.keys().map(function(name) { + return fmt("{0} [{1}]", name, scope.decls.get(name).kind); + }).join(", "); + var propagates = this.propagates ? this.propagates.items().join(", ") : ""; + console.log(fmt("{0}{1}: {2}. propagates: {3}", fmt.repeat(" ", indent), this.node.type, names, propagates)); + this.children.forEach(function(c) { + c.print(indent + 2); + }); + }; - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; + Scope.prototype.add = function(name, kind, node, referableFromPos) { + assert(is.someof(kind, ["fun", "param", "var", "caught", "const", "let"])); - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; + function isConstLet(kind) { + return is.someof(kind, ["const", "let"]); } - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + var scope = this; - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; + // search nearest hoist-scope for fun, param and var's + // const, let and caught variables go directly in the scope (which may be hoist, block or catch-block) + if (is.someof(kind, ["fun", "param", "var"])) { + while (scope.kind !== "hoist") { + if (scope.decls.has(name) && isConstLet(scope.decls.get(name).kind)) { // could be caught + return error(getline(node), "{0} is already declared", name); + } + scope = scope.parent; + } } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; + // name exists in scope and either new or existing kind is const|let => error + if (scope.decls.has(name) && (options.disallowDuplicated || isConstLet(scope.decls.get(name).kind) || isConstLet(kind))) { + return error(getline(node), "{0} is already declared", name); } - break; - } - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); + var declaration = { + kind: kind, + node: node, + }; + if (referableFromPos) { + assert(is.someof(kind, ["var", "const", "let"])); + declaration.from = referableFromPos; + } + scope.decls.set(name, declaration); + }; - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } + Scope.prototype.getKind = function(name) { + assert(is.string(name)); + var decl = this.decls.get(name); + return decl ? decl.kind : null; + }; - charStr += buffer.toString(this.encoding, 0, end); + Scope.prototype.getNode = function(name) { + assert(is.string(name)); + var decl = this.decls.get(name); + return decl ? decl.node : null; + }; - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } + Scope.prototype.getFromPos = function(name) { + assert(is.string(name)); + var decl = this.decls.get(name); + return decl ? decl.from : null; + }; - // or just emit the charStr - return charStr; -}; + Scope.prototype.hasOwn = function(name) { + return this.decls.has(name); + }; -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; + Scope.prototype.remove = function(name) { + return this.decls.remove(name); + }; - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; + Scope.prototype.doesPropagate = function(name) { + return this.propagates.has(name); + }; - // See http://en.wikipedia.org/wiki/UTF-8#Description + Scope.prototype.markPropagates = function(name) { + this.propagates.add(name); + }; - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; + Scope.prototype.closestHoistScope = function() { + var scope = this; + while (scope.kind !== "hoist") { + scope = scope.parent; } + return scope; + }; - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; + Scope.prototype.hasFunctionScopeBetween = function(outer) { + function isFunction(node) { + return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]); } - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; + for (var scope = this; scope; scope = scope.parent) { + if (scope === outer) { + return false; + } + if (isFunction(scope.node)) { + return true; + } } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} - -},{"buffer":175}],197:[function(require,module,exports){ -exports.isatty = function () { return false; }; - -function ReadStream() { - throw new Error('tty.ReadStream is not implemented'); -} -exports.ReadStream = ReadStream; - -function WriteStream() { - throw new Error('tty.ReadStream is not implemented'); -} -exports.WriteStream = WriteStream; - -},{}],198:[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'; -} -},{}],199:[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); + throw new Error("wasn't inner scope of outer"); + }; + + Scope.prototype.lookup = function(name) { + for (var scope = this; scope; scope = scope.parent) { + if (scope.decls.has(name)) { + return scope; + } else if (scope.kind === "hoist") { + scope.propagates.add(name); + } } - } - return str; -}; + return null; + }; + Scope.prototype.markWrite = function(name) { + assert(is.string(name)); + this.written.add(name); + }; -// 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); - }; - } +// detects let variables that are never modified (ignores top-level) + Scope.prototype.detectUnmodifiedLets = function() { + var outmost = this; - if (process.noDeprecation === true) { - return fn; - } + function detect(scope) { + if (scope !== outmost) { + scope.decls.keys().forEach(function(name) { + if (scope.getKind(name) === "let" && !scope.written.has(name)) { + return error(getline(scope.getNode(name)), "{0} is declared as let but never modified so could be const", name); + } + }); + } - 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); + scope.children.forEach(function(childScope) { + detect(childScope); + }); + } + detect(this); + }; + + Scope.prototype.traverse = function(options) { + options = options || {}; + var pre = options.pre; + var post = options.post; + + function visit(scope) { + if (pre) { + pre(scope); + } + scope.children.forEach(function(childScope) { + visit(childScope); + }); + if (post) { + post(scope); } - warned = true; } - return fn.apply(this, arguments); - } - return deprecated; -}; + visit(this); + }; + + module.exports = Scope; +},{"./error":457,"./options":459,"assert":203,"simple-fmt":466,"simple-is":467,"stringmap":468,"stringset":469}],461:[function(require,module,exports){ + var fmt = require("simple-fmt"); + var is = require("simple-is"); + var assert = require("assert"); -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); - }; + function Stats() { + this.lets = 0; + this.consts = 0; + this.renames = []; + } + + Stats.prototype.declarator = function(kind) { + assert(is.someof(kind, ["const", "let"])); + if (kind === "const") { + this.consts++; } 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; + this.lets++; + } + }; + Stats.prototype.rename = function(oldName, newName, line) { + this.renames.push({ + oldName: oldName, + newName: newName, + line: line, + }); + }; -// http://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] -}; + Stats.prototype.toString = function() { +// console.log("defs.js stats for file {0}:", filename) -// 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; - } -} + var renames = this.renames.map(function(r) { + return r; + }).sort(function(a, b) { + return a.line - b.line; + }); // sort a copy of renames + var renameStr = renames.map(function(rename) { + return fmt("\nline {0}: {1} => {2}", rename.line, rename.oldName, rename.newName); + }).join(""); -function stylizeNoColor(str, styleType) { - return str; -} + var sum = this.consts + this.lets; + var constlets = (sum === 0 ? + "can't calculate const coverage (0 consts, 0 lets)" : + fmt("{0}% const coverage ({1} consts, {2} lets)", + Math.floor(100 * this.consts / sum), this.consts, this.lets)); + return constlets + renameStr + "\n"; + }; -function arrayToHash(array) { - var hash = {}; + module.exports = Stats; - array.forEach(function(val, idx) { - hash[val] = true; - }); +},{"assert":203,"simple-fmt":466,"simple-is":467}],462:[function(require,module,exports){ +// alter.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus - return hash; -} + var assert = require("assert"); + var stableSort = require("stable"); +// fragments is a list of {start: index, end: index, str: string to replace with} + function alter(str, fragments) { + "use strict"; -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; - } + var isArray = Array.isArray || function(v) { + return Object.prototype.toString.call(v) === "[object Array]"; + };; - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } + assert(typeof str === "string"); + assert(isArray(fragments)); - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); + // stableSort isn't in-place so no need to copy array first + var sortedFragments = stableSort(fragments, function(a, b) { + return a.start - b.start; + }); - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } + var outs = []; - // 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); - } + var pos = 0; + for (var i = 0; i < sortedFragments.length; i++) { + var frag = sortedFragments[i]; - // 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'); + assert(pos <= frag.start); + assert(frag.start <= frag.end); + outs.push(str.slice(pos, frag.start)); + outs.push(frag.str); + pos = frag.end; } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); + if (pos < str.length) { + outs.push(str.slice(pos)); } - if (isError(value)) { - return formatError(value); - } - } - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; + return outs.join(""); } - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; + if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = alter; } - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } +},{"assert":203,"stable":463}],463:[function(require,module,exports){ +//! stable.js 0.1.5, https://github.com/Two-Screen/stable +//! © 2014 Angry Bytes and contributors. MIT licensed. - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } + (function() { - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } +// A stable array sort, because `Array#sort()` is not guaranteed stable. +// This is an implementation of merge sort, without recursion. - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } + var stable = function(arr, comp) { + return exec(arr.slice(), comp); + }; - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } + stable.inplace = function(arr, comp) { + var result = exec(arr, comp); + + // This simply copies back if the result isn't in the original array, + // which happens on an odd number of passes. + if (result !== arr) { + pass(result, null, arr.length, arr); + } - ctx.seen.push(value); + return arr; + }; - 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); - }); - } +// Execute the sort using the input array and a second buffer as work space. +// Returns one of those two, containing the final result. + function exec(arr, comp) { + if (typeof(comp) !== 'function') { + comp = function(a, b) { + return String(a).localeCompare(b); + }; + } + + // Short-circuit when there's nothing to sort. + var len = arr.length; + if (len <= 1) { + return arr; + } + + // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. + // Chunks are the size of the left or right hand in merge sort. + // Stop when the left-hand covers all of the array. + var buffer = new Array(len); + for (var chk = 1; chk < len; chk *= 2) { + pass(arr, comp, chk, buffer); + + var tmp = arr; + arr = buffer; + buffer = tmp; + } + + return arr; + } + +// Run a single pass with the given chunk size. + var pass = function(arr, comp, chk, result) { + var len = arr.length; + var i = 0; + // Step size / double chunk size. + var dbl = chk * 2; + // Bounds of the left and right chunks. + var l, r, e; + // Iterators over the left and right chunk. + var li, ri; + + // Iterate over pairs of chunks. + for (l = 0; l < len; l += dbl) { + r = l + chk; + e = r + chk; + if (r > len) r = len; + if (e > len) e = len; + + // Iterate both chunks in parallel. + li = l; + ri = r; + while (true) { + // Compare the chunks. + if (li < r && ri < e) { + // This works for a regular `sort()` compatible comparator, + // but also for a simple comparator like: `a > b` + if (comp(arr[li], arr[ri]) <= 0) { + result[i++] = arr[li++]; + } + else { + result[i++] = arr[ri++]; + } + } + // Nothing to compare, just flush what's left. + else if (li < r) { + result[i++] = arr[li++]; + } + else if (ri < e) { + result[i++] = arr[ri++]; + } + // Both iterators are at the chunk ends. + else { + break; + } + } + } + }; - ctx.seen.pop(); +// Export using CommonJS or to the window. + if (typeof(module) !== 'undefined') { + module.exports = stable; + } + else { + window.stable = stable; + } - return reduceToSingleString(output, base, braces); -} + })(); +},{}],464:[function(require,module,exports){ + function traverse(root, options) { + "use strict"; -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'); -} + options = options || {}; + var pre = options.pre; + var post = options.post; + var skipProperty = options.skipProperty; + function visit(node, parent, prop, idx) { + if (!node || typeof node.type !== "string") { + return; + } + + var res = undefined; + if (pre) { + res = pre(node, parent, prop, idx); + } -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} + if (res !== false) { + for (var prop in node) { + if (skipProperty ? skipProperty(prop, node) : prop[0] === "$") { + continue; + } + var child = node[prop]; -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(''); + if (Array.isArray(child)) { + for (var i = 0; i < child.length; i++) { + visit(child[i], node, prop, i); + } + } else { + visit(child, node, prop); + } + } + } + + if (post) { + post(node, parent, prop, idx); + } } + + visit(root, null); + }; + + if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = traverse; } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} +},{}],465:[function(require,module,exports){ +// breakable.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013-2014 Olov Lassus -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'); + var breakable = (function() { + "use strict"; + + function Val(val, brk) { + this.val = val; + this.brk = brk; } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); + + function make_brk() { + return function brk(val) { + throw new Val(val, brk); + }; } - } - 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'); + + function breakable(fn) { + var brk = make_brk(); + try { + return fn(brk); + } catch (e) { + if (e instanceof Val && e.brk === brk) { + return e.val; } + throw e; } - } 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 breakable; + })(); + + if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = breakable; } - return name + ': ' + str; -} +},{}],466:[function(require,module,exports){ +// simple-fmt.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus + var fmt = (function() { + "use strict"; -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); + function fmt(str, var_args) { + var args = Array.prototype.slice.call(arguments, 1); + return str.replace(/\{(\d+)\}/g, function(s, match) { + return (match in args ? args[match] : s); + }); + } - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } + function obj(str, obj) { + return str.replace(/\{([_$a-zA-Z0-9][_$a-zA-Z0-9]*)\}/g, function(s, match) { + return (match in obj ? obj[match] : s); + }); + } - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} + function repeat(str, n) { + return (new Array(n + 1)).join(str); + } + fmt.fmt = fmt; + fmt.obj = obj; + fmt.repeat = repeat; + return fmt; + })(); -// 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']; + if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = fmt; + } -// 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(' '); -} +},{}],467:[function(require,module,exports){ +// simple-is.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus + var is = (function() { + "use strict"; -// 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":198,"_process":183,"inherits":180}],200:[function(require,module,exports){ -(function (process){ -'use strict'; -var escapeStringRegexp = require('escape-string-regexp'); -var ansiStyles = require('ansi-styles'); -var stripAnsi = require('strip-ansi'); -var hasAnsi = require('has-ansi'); -var supportsColor = require('supports-color'); -var defineProps = Object.defineProperties; - -function Chalk(options) { - // detect mode if not set manually - this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; -} + var hasOwnProperty = Object.prototype.hasOwnProperty; + var toString = Object.prototype.toString; + var _undefined = void 0; -// use bright blue on Windows as the normal blue color is illegible -if (process.platform === 'win32') { - ansiStyles.blue.open = '\u001b[94m'; -} - -function build(_styles) { - var builder = function builder() { - return applyStyle.apply(builder, arguments); - }; - builder._styles = _styles; - builder.enabled = this.enabled; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - builder.__proto__ = proto; - return builder; -} - -var styles = (function () { - var ret = {}; - - Object.keys(ansiStyles).forEach(function (key) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - ret[key] = { - get: function () { - return build.call(this, this._styles.concat(key)); - } - }; - }); - - return ret; -})(); - -var proto = defineProps(function chalk() {}, styles); - -function applyStyle() { - // support varags, but simply cast to string in case there's only one arg - var args = arguments; - var argsLen = args.length; - var str = argsLen !== 0 && String(arguments[0]); - if (argsLen > 1) { - // don't slice `arguments`, it prevents v8 optimizations - for (var a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || !str) { - return str; - } - - /*jshint validthis: true */ - var nestedStyles = this._styles; - - var i = nestedStyles.length; - while (i--) { - var code = ansiStyles[nestedStyles[i]]; - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - } - - return str; -} - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - return build.call(this, [name]); - } - }; - }); - - return ret; -} - -defineProps(Chalk.prototype, init()); - -module.exports = new Chalk(); -module.exports.styles = ansiStyles; -module.exports.hasColor = hasAnsi; -module.exports.stripColor = stripAnsi; -module.exports.supportsColor = supportsColor; - -}).call(this,require('_process')) -},{"_process":183,"ansi-styles":201,"escape-string-regexp":202,"has-ansi":203,"strip-ansi":205,"supports-color":207}],201:[function(require,module,exports){ -'use strict'; - -var styles = module.exports = { - modifiers: { - reset: [0, 0], - bold: [1, 22], // 21 isn't widely supported and 22 does the same thing - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - colors: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39] - }, - bgColors: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] - } -}; + return { + nan: function(v) { + return v !== v; + }, + boolean: function(v) { + return typeof v === "boolean"; + }, + number: function(v) { + return typeof v === "number"; + }, + string: function(v) { + return typeof v === "string"; + }, + fn: function(v) { + return typeof v === "function"; + }, + object: function(v) { + return v !== null && typeof v === "object"; + }, + primitive: function(v) { + var t = typeof v; + return v === null || v === _undefined || + t === "boolean" || t === "number" || t === "string"; + }, + array: Array.isArray || function(v) { + return toString.call(v) === "[object Array]"; + }, + finitenumber: function(v) { + return typeof v === "number" && isFinite(v); + }, + someof: function(v, values) { + return values.indexOf(v) >= 0; + }, + noneof: function(v, values) { + return values.indexOf(v) === -1; + }, + own: function(obj, prop) { + return hasOwnProperty.call(obj, prop); + }, + }; + })(); -// fix humans -styles.colors.grey = styles.colors.gray; + if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = is; + } -Object.keys(styles).forEach(function (groupName) { - var group = styles[groupName]; +},{}],468:[function(require,module,exports){ +// stringmap.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus - Object.keys(group).forEach(function (styleName) { - var style = group[styleName]; + var StringMap = (function() { + "use strict"; - styles[styleName] = group[styleName] = { - open: '\u001b[' + style[0] + 'm', - close: '\u001b[' + style[1] + 'm' - }; - }); + // to save us a few characters + var hasOwnProperty = Object.prototype.hasOwnProperty; - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); -}); + var create = (function() { + function hasOwnEnumerableProps(obj) { + for (var prop in obj) { + if (hasOwnProperty.call(obj, prop)) { + return true; + } + } + return false; + } + // FF <= 3.6: + // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true + // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false + function hasOwnPollutedProps(obj) { + return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__"); + } -},{}],202:[function(require,module,exports){ -'use strict'; + var useObjectCreate = false; + if (typeof Object.create === "function") { + if (!hasOwnEnumerableProps(Object.create(null))) { + useObjectCreate = true; + } + } + if (useObjectCreate === false) { + if (hasOwnEnumerableProps({})) { + throw new Error("StringMap environment error 0, please file a bug at https://github.com/olov/stringmap/issues"); + } + } + // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims) -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + var o = (useObjectCreate ? Object.create(null) : {}); + var useProtoClear = false; + if (hasOwnPollutedProps(o)) { + o.__proto__ = null; + if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) { + throw new Error("StringMap environment error 1, please file a bug at https://github.com/olov/stringmap/issues"); + } + useProtoClear = true; + } + // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims) -module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } + return function() { + var o = (useObjectCreate ? Object.create(null) : {}); + if (useProtoClear) { + o.__proto__ = null; + } + return o; + }; + })(); - return str.replace(matchOperatorsRe, '\\$&'); -}; + // stringmap ctor + function stringmap(optional_object) { + // use with or without new + if (!(this instanceof stringmap)) { + return new stringmap(optional_object); + } + this.obj = create(); + this.hasProto = false; // false (no __proto__ key) or true (has __proto__ key) + this.proto = undefined; // value for __proto__ key when hasProto is true, undefined otherwise -},{}],203:[function(require,module,exports){ -'use strict'; -var ansiRegex = require('ansi-regex'); -var re = new RegExp(ansiRegex().source); // remove the `g` flag -module.exports = re.test.bind(re); - -},{"ansi-regex":204}],204:[function(require,module,exports){ -'use strict'; -module.exports = function () { - return /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g; -}; - -},{}],205:[function(require,module,exports){ -'use strict'; -var ansiRegex = require('ansi-regex')(); - -module.exports = function (str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; -}; - -},{"ansi-regex":206}],206:[function(require,module,exports){ -arguments[4][204][0].apply(exports,arguments) -},{"dup":204}],207:[function(require,module,exports){ -(function (process){ -'use strict'; -var argv = process.argv; - -module.exports = (function () { - if ('FORCE_COLOR' in process.env) { - return true; - } - - if (argv.indexOf('--no-color') !== -1 || - argv.indexOf('--no-colors') !== -1 || - argv.indexOf('--color=false') !== -1) { - return false; - } - - if (argv.indexOf('--color') !== -1 || - argv.indexOf('--colors') !== -1 || - argv.indexOf('--color=true') !== -1 || - argv.indexOf('--color=always') !== -1) { - return true; - } - - if (process.stdout && !process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - if (process.env.TERM === 'dumb') { - return false; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } - - return false; -})(); - -}).call(this,require('_process')) -},{"_process":183}],208:[function(require,module,exports){ -(function (Buffer){ -'use strict'; -var fs = require('fs'); -var path = require('path'); - -var commentRx = /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/mg; -var mapFileCommentRx = - // //# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */ - /(?:\/\/[@#][ \t]+sourceMappingURL=(.+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg - -function decodeBase64(base64) { - return new Buffer(base64, 'base64').toString(); -} - -function stripComment(sm) { - return sm.split(',').pop(); -} - -function readFromFileMap(sm, dir) { - // NOTE: this will only work on the server since it attempts to read the map file - - var r = mapFileCommentRx.exec(sm); - mapFileCommentRx.lastIndex = 0; - - // for some odd reason //# .. captures in 1 and /* .. */ in 2 - var filename = r[1] || r[2]; - var filepath = path.join(dir, filename); + if (optional_object) { + this.setMany(optional_object); + } + }; - try { - return fs.readFileSync(filepath, 'utf8'); - } catch (e) { - throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e); - } -} + // primitive methods that deals with data representation + stringmap.prototype.has = function(key) { + // The type-check of key in has, get, set and delete is important because otherwise an object + // {toString: function() { return "__proto__"; }} can avoid the key === "__proto__" test. + // The alternative to type-checking would be to force string conversion, i.e. key = String(key); + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + return (key === "__proto__" ? + this.hasProto : + hasOwnProperty.call(this.obj, key)); + }; -function Converter(sm, opts) { - opts = opts || {}; + stringmap.prototype.get = function(key) { + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + return (key === "__proto__" ? + this.proto : + (hasOwnProperty.call(this.obj, key) ? this.obj[key] : undefined)); + }; - if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir); - if (opts.hasComment) sm = stripComment(sm); - if (opts.isEncoded) sm = decodeBase64(sm); - if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm); + stringmap.prototype.set = function(key, value) { + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + if (key === "__proto__") { + this.hasProto = true; + this.proto = value; + } else { + this.obj[key] = value; + } + }; - this.sourcemap = sm; -} + stringmap.prototype.remove = function(key) { + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + var didExist = this.has(key); + if (key === "__proto__") { + this.hasProto = false; + this.proto = undefined; + } else { + delete this.obj[key]; + } + return didExist; + }; -function convertFromLargeSource(content) { - var lines = content.split('\n'); - var line; - // find first line which contains a source map starting at end of content - for (var i = lines.length - 1; i > 0; i--) { - line = lines[i] - if (~line.indexOf('sourceMappingURL=data:')) return exports.fromComment(line); - } -} + // alias remove to delete but beware: + // sm.delete("key"); // OK in ES5 and later + // sm['delete']("key"); // OK in all ES versions + // sm.remove("key"); // OK in all ES versions + stringmap.prototype['delete'] = stringmap.prototype.remove; -Converter.prototype.toJSON = function (space) { - return JSON.stringify(this.sourcemap, null, space); -}; + stringmap.prototype.isEmpty = function() { + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + return false; + } + } + return !this.hasProto; + }; -Converter.prototype.toBase64 = function () { - var json = this.toJSON(); - return new Buffer(json).toString('base64'); -}; + stringmap.prototype.size = function() { + var len = 0; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + ++len; + } + } + return (this.hasProto ? len + 1 : len); + }; -Converter.prototype.toComment = function (options) { - var base64 = this.toBase64(); - var data = 'sourceMappingURL=data:application/json;base64,' + base64; - return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; -}; + stringmap.prototype.keys = function() { + var keys = []; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + keys.push(key); + } + } + if (this.hasProto) { + keys.push("__proto__"); + } + return keys; + }; -// returns copy instead of original -Converter.prototype.toObject = function () { - return JSON.parse(this.toJSON()); -}; + stringmap.prototype.values = function() { + var values = []; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + values.push(this.obj[key]); + } + } + if (this.hasProto) { + values.push(this.proto); + } + return values; + }; -Converter.prototype.addProperty = function (key, value) { - if (this.sourcemap.hasOwnProperty(key)) throw new Error('property %s already exists on the sourcemap, use set property instead'); - return this.setProperty(key, value); -}; + stringmap.prototype.items = function() { + var items = []; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + items.push([key, this.obj[key]]); + } + } + if (this.hasProto) { + items.push(["__proto__", this.proto]); + } + return items; + }; -Converter.prototype.setProperty = function (key, value) { - this.sourcemap[key] = value; - return this; -}; -Converter.prototype.getProperty = function (key) { - return this.sourcemap[key]; -}; + // methods that rely on the above primitives + stringmap.prototype.setMany = function(object) { + if (object === null || (typeof object !== "object" && typeof object !== "function")) { + throw new Error("StringMap expected Object"); + } + for (var key in object) { + if (hasOwnProperty.call(object, key)) { + this.set(key, object[key]); + } + } + return this; + }; -exports.fromObject = function (obj) { - return new Converter(obj); -}; + stringmap.prototype.merge = function(other) { + var keys = other.keys(); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + this.set(key, other.get(key)); + } + return this; + }; -exports.fromJSON = function (json) { - return new Converter(json, {isJSON: true}); -}; + stringmap.prototype.map = function(fn) { + var keys = this.keys(); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + keys[i] = fn(this.get(key), key); // re-use keys array for results + } + return keys; + }; -exports.fromBase64 = function (base64) { - return new Converter(base64, {isEncoded: true}); -}; + stringmap.prototype.forEach = function(fn) { + var keys = this.keys(); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + fn(this.get(key), key); + } + }; -exports.fromComment = function (comment) { - comment = comment - .replace(/^\/\*/g, '//') - .replace(/\*\/$/g, ''); + stringmap.prototype.clone = function() { + var other = stringmap(); + return other.merge(this); + }; - return new Converter(comment, {isEncoded: true, hasComment: true}); -}; + stringmap.prototype.toString = function() { + var self = this; + return "{" + this.keys().map(function(key) { + return JSON.stringify(key) + ":" + JSON.stringify(self.get(key)); + }).join(",") + "}"; + }; -exports.fromMapFileComment = function (comment, dir) { - return new Converter(comment, {commentFileDir: dir, isFileComment: true, isJSON: true}); -}; + return stringmap; + })(); -// Finds last sourcemap comment in file or returns null if none was found -exports.fromSource = function (content, largeSource) { - if (largeSource) return convertFromLargeSource(content); + if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = StringMap; + } - var m = content.match(commentRx); - commentRx.lastIndex = 0; - return m ? exports.fromComment(m.pop()) : null; -}; +},{}],469:[function(require,module,exports){ +// stringset.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus -// Finds last sourcemap comment in file or returns null if none was found -exports.fromMapFileSource = function (content, dir) { - var m = content.match(mapFileCommentRx); - mapFileCommentRx.lastIndex = 0; - return m ? exports.fromMapFileComment(m.pop(), dir) : null; -}; - -exports.removeComments = function (src) { - commentRx.lastIndex = 0; - return src.replace(commentRx, ''); -}; - -exports.removeMapFileComments = function (src) { - mapFileCommentRx.lastIndex = 0; - return src.replace(mapFileCommentRx, ''); -}; - -Object.defineProperty(exports, 'commentRegex', function getCommentRegex() { - commentRx.lastIndex = 0; - return commentRx; -}); + var StringSet = (function() { + "use strict"; -Object.defineProperty(exports, 'mapFileCommentRegex', function getMapFileCommentRegex () { - mapFileCommentRx.lastIndex = 0; - return mapFileCommentRx; -}); + // to save us a few characters + var hasOwnProperty = Object.prototype.hasOwnProperty; -}).call(this,require("buffer").Buffer) -},{"buffer":175,"fs":172,"path":182}],209:[function(require,module,exports){ -require('./shim'); -require('./modules/core.dict'); -require('./modules/core.iter-helpers'); -require('./modules/core.$for'); -require('./modules/core.delay'); -require('./modules/core.binding'); -require('./modules/core.object'); -require('./modules/core.array.turn'); -require('./modules/core.number.iterator'); -require('./modules/core.number.math'); -require('./modules/core.string.escape-html'); -require('./modules/core.date'); -require('./modules/core.global'); -require('./modules/core.log'); -module.exports = require('./modules/$').core; -},{"./modules/$":223,"./modules/core.$for":235,"./modules/core.array.turn":236,"./modules/core.binding":237,"./modules/core.date":238,"./modules/core.delay":239,"./modules/core.dict":240,"./modules/core.global":241,"./modules/core.iter-helpers":242,"./modules/core.log":243,"./modules/core.number.iterator":244,"./modules/core.number.math":245,"./modules/core.object":246,"./modules/core.string.escape-html":247,"./shim":291}],210:[function(require,module,exports){ -'use strict'; -// false -> Array#indexOf -// true -> Array#includes -var $ = require('./$'); -module.exports = function(IS_INCLUDES){ - return function(el /*, fromIndex = 0 */){ - var O = $.toObject(this) - , length = $.toLength(O.length) - , index = $.toIndex(arguments[1], length) - , value; - if(IS_INCLUDES && el != el)while(length > index){ - value = O[index++]; - if(value != value)return true; - } else for(;length > index; index++)if(IS_INCLUDES || index in O){ - if(O[index] === el)return IS_INCLUDES || index; - } return !IS_INCLUDES && -1; - }; -}; -},{"./$":223}],211:[function(require,module,exports){ -'use strict'; -// 0 -> Array#forEach -// 1 -> Array#map -// 2 -> Array#filter -// 3 -> Array#some -// 4 -> Array#every -// 5 -> Array#find -// 6 -> Array#findIndex -var $ = require('./$') - , ctx = require('./$.ctx'); -module.exports = function(TYPE){ - var IS_MAP = TYPE == 1 - , IS_FILTER = TYPE == 2 - , IS_SOME = TYPE == 3 - , IS_EVERY = TYPE == 4 - , IS_FIND_INDEX = TYPE == 6 - , NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - return function(callbackfn/*, that = undefined */){ - var O = Object($.assertDefined(this)) - , self = $.ES5Object(O) - , f = ctx(callbackfn, arguments[1], 3) - , length = $.toLength(self.length) - , index = 0 - , result = IS_MAP ? Array(length) : IS_FILTER ? [] : undefined - , val, res; - for(;length > index; index++)if(NO_HOLES || index in self){ - val = self[index]; - res = f(val, index, O); - if(TYPE){ - if(IS_MAP)result[index] = res; // map - else if(res)switch(TYPE){ - case 3: return true; // some - case 5: return val; // find - case 6: return index; // findIndex - case 2: result.push(val); // filter - } else if(IS_EVERY)return false; // every - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; -}; -},{"./$":223,"./$.ctx":218}],212:[function(require,module,exports){ -var $ = require('./$'); -function assert(condition, msg1, msg2){ - if(!condition)throw TypeError(msg2 ? msg1 + msg2 : msg1); -} -assert.def = $.assertDefined; -assert.fn = function(it){ - if(!$.isFunction(it))throw TypeError(it + ' is not a function!'); - return it; -}; -assert.obj = function(it){ - if(!$.isObject(it))throw TypeError(it + ' is not an object!'); - return it; -}; -assert.inst = function(it, Constructor, name){ - if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!"); - return it; -}; -module.exports = assert; -},{"./$":223}],213:[function(require,module,exports){ -var $ = require('./$'); -// 19.1.2.1 Object.assign(target, source, ...) -module.exports = Object.assign || function(target, source){ // eslint-disable-line no-unused-vars - var T = Object($.assertDefined(target)) - , l = arguments.length - , i = 1; - while(l > i){ - var S = $.ES5Object(arguments[i++]) - , keys = $.getKeys(S) - , length = keys.length - , j = 0 - , key; - while(length > j)T[key = keys[j++]] = S[key]; - } - return T; -}; -},{"./$":223}],214:[function(require,module,exports){ -var $ = require('./$') - , TAG = require('./$.wks')('toStringTag') - , toString = {}.toString; -function cof(it){ - return toString.call(it).slice(8, -1); -} -cof.classof = function(it){ - var O, T; - return it == undefined ? it === undefined ? 'Undefined' : 'Null' - : typeof (T = (O = Object(it))[TAG]) == 'string' ? T : cof(O); -}; -cof.set = function(it, tag, stat){ - if(it && !$.has(it = stat ? it : it.prototype, TAG))$.hide(it, TAG, tag); -}; -module.exports = cof; -},{"./$":223,"./$.wks":234}],215:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , ctx = require('./$.ctx') - , safe = require('./$.uid').safe - , assert = require('./$.assert') - , $iter = require('./$.iter') - , has = $.has - , set = $.set - , isObject = $.isObject - , hide = $.hide - , step = $iter.step - , isFrozen = Object.isFrozen || $.core.Object.isFrozen - , ID = safe('id') - , O1 = safe('O1') - , LAST = safe('last') - , FIRST = safe('first') - , ITER = safe('iter') - , SIZE = $.DESC ? safe('size') : 'size' - , id = 0; - -function fastKey(it, create){ - // return primitive with prefix - if(!isObject(it))return (typeof it == 'string' ? 'S' : 'P') + it; - // can't set id to frozen object - if(isFrozen(it))return 'F'; - if(!has(it, ID)){ - // not necessary to add id - if(!create)return 'E'; - // add missing object id - hide(it, ID, ++id); - // return object id with prefix - } return 'O' + it[ID]; -} - -function getEntry(that, key){ - // fast case - var index = fastKey(key), entry; - if(index != 'F')return that[O1][index]; - // frozen object case - for(entry = that[FIRST]; entry; entry = entry.n){ - if(entry.k == key)return entry; - } -} - -module.exports = { - getConstructor: function(NAME, IS_MAP, ADDER){ - function C(iterable){ - var that = assert.inst(this, C, NAME); - set(that, O1, $.create(null)); - set(that, SIZE, 0); - set(that, LAST, undefined); - set(that, FIRST, undefined); - if(iterable != undefined)$iter.forOf(iterable, IS_MAP, that[ADDER], that); - } - $.mix(C.prototype, { - // 23.1.3.1 Map.prototype.clear() - // 23.2.3.2 Set.prototype.clear() - clear: function(){ - for(var that = this, data = that[O1], entry = that[FIRST]; entry; entry = entry.n){ - entry.r = true; - if(entry.p)entry.p = entry.p.n = undefined; - delete data[entry.i]; - } - that[FIRST] = that[LAST] = undefined; - that[SIZE] = 0; - }, - // 23.1.3.3 Map.prototype.delete(key) - // 23.2.3.4 Set.prototype.delete(value) - 'delete': function(key){ - var that = this - , entry = getEntry(that, key); - if(entry){ - var next = entry.n - , prev = entry.p; - delete that[O1][entry.i]; - entry.r = true; - if(prev)prev.n = next; - if(next)next.p = prev; - if(that[FIRST] == entry)that[FIRST] = next; - if(that[LAST] == entry)that[LAST] = prev; - that[SIZE]--; - } return !!entry; - }, - // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) - // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) - forEach: function(callbackfn /*, that = undefined */){ - var f = ctx(callbackfn, arguments[1], 3) - , entry; - while(entry = entry ? entry.n : this[FIRST]){ - f(entry.v, entry.k, this); - // revert to the last existing entry - while(entry && entry.r)entry = entry.p; - } - }, - // 23.1.3.7 Map.prototype.has(key) - // 23.2.3.7 Set.prototype.has(value) - has: function(key){ - return !!getEntry(this, key); - } - }); - if($.DESC)$.setDesc(C.prototype, 'size', { - get: function(){ - return assert.def(this[SIZE]); - } - }); - return C; - }, - def: function(that, key, value){ - var entry = getEntry(that, key) - , prev, index; - // change existing entry - if(entry){ - entry.v = value; - // create new entry - } else { - that[LAST] = entry = { - i: index = fastKey(key, true), // <- index - k: key, // <- key - v: value, // <- value - p: prev = that[LAST], // <- previous entry - n: undefined, // <- next entry - r: false // <- removed - }; - if(!that[FIRST])that[FIRST] = entry; - if(prev)prev.n = entry; - that[SIZE]++; - // add to index - if(index != 'F')that[O1][index] = entry; - } return that; - }, - getEntry: getEntry, - getIterConstructor: function(){ - return function(iterated, kind){ - set(this, ITER, {o: iterated, k: kind}); - }; - }, - next: function(){ - var iter = this[ITER] - , kind = iter.k - , entry = iter.l; - // revert to the last existing entry - while(entry && entry.r)entry = entry.p; - // get next entry - if(!iter.o || !(iter.l = entry = entry ? entry.n : iter.o[FIRST])){ - // or finish the iteration - iter.o = undefined; - return step(1); - } - // return step by kind - if(kind == 'key' )return step(0, entry.k); - if(kind == 'value')return step(0, entry.v); - return step(0, [entry.k, entry.v]); - } -}; -},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.iter":222,"./$.uid":232}],216:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , safe = require('./$.uid').safe - , assert = require('./$.assert') - , forOf = require('./$.iter').forOf - , has = $.has - , isObject = $.isObject - , hide = $.hide - , isFrozen = Object.isFrozen || $.core.Object.isFrozen - , id = 0 - , ID = safe('id') - , WEAK = safe('weak') - , LEAK = safe('leak') - , method = require('./$.array-methods') - , find = method(5) - , findIndex = method(6); -function findFrozen(store, key){ - return find.call(store.array, function(it){ - return it[0] === key; - }); -} -// fallback for frozen keys -function leakStore(that){ - return that[LEAK] || hide(that, LEAK, { - array: [], - get: function(key){ - var entry = findFrozen(this, key); - if(entry)return entry[1]; - }, - has: function(key){ - return !!findFrozen(this, key); - }, - set: function(key, value){ - var entry = findFrozen(this, key); - if(entry)entry[1] = value; - else this.array.push([key, value]); - }, - 'delete': function(key){ - var index = findIndex.call(this.array, function(it){ - return it[0] === key; - }); - if(~index)this.array.splice(index, 1); - return !!~index; - } - })[LEAK]; -} - -module.exports = { - getConstructor: function(NAME, IS_MAP, ADDER){ - function C(iterable){ - $.set(assert.inst(this, C, NAME), ID, id++); - if(iterable != undefined)forOf(iterable, IS_MAP, this[ADDER], this); - } - $.mix(C.prototype, { - // 23.3.3.2 WeakMap.prototype.delete(key) - // 23.4.3.3 WeakSet.prototype.delete(value) - 'delete': function(key){ - if(!isObject(key))return false; - if(isFrozen(key))return leakStore(this)['delete'](key); - return has(key, WEAK) && has(key[WEAK], this[ID]) && delete key[WEAK][this[ID]]; - }, - // 23.3.3.4 WeakMap.prototype.has(key) - // 23.4.3.4 WeakSet.prototype.has(value) - has: function(key){ - if(!isObject(key))return false; - if(isFrozen(key))return leakStore(this).has(key); - return has(key, WEAK) && has(key[WEAK], this[ID]); - } - }); - return C; - }, - def: function(that, key, value){ - if(isFrozen(assert.obj(key))){ - leakStore(that).set(key, value); - } else { - has(key, WEAK) || hide(key, WEAK, {}); - key[WEAK][that[ID]] = value; - } return that; - }, - leakStore: leakStore, - WEAK: WEAK, - ID: ID -}; -},{"./$":223,"./$.array-methods":211,"./$.assert":212,"./$.iter":222,"./$.uid":232}],217:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , $def = require('./$.def') - , $iter = require('./$.iter') - , assertInstance = require('./$.assert').inst; - -module.exports = function(NAME, methods, common, IS_MAP, isWeak){ - var Base = $.g[NAME] - , C = Base - , ADDER = IS_MAP ? 'set' : 'add' - , proto = C && C.prototype - , O = {}; - function fixMethod(KEY, CHAIN){ - var method = proto[KEY]; - if($.FW)proto[KEY] = function(a, b){ - var result = method.call(this, a === 0 ? 0 : a, b); - return CHAIN ? this : result; - }; - } - if(!$.isFunction(C) || !(isWeak || !$iter.BUGGY && proto.forEach && proto.entries)){ - // create collection constructor - C = common.getConstructor(NAME, IS_MAP, ADDER); - $.mix(C.prototype, methods); - } else { - var inst = new C - , chain = inst[ADDER](isWeak ? {} : -0, 1) - , buggyZero; - // wrap for init collections from iterable - if($iter.fail(function(iter){ - new C(iter); // eslint-disable-line no-new - }) || $iter.DANGER_CLOSING){ - C = function(iterable){ - assertInstance(this, C, NAME); - var that = new Base; - if(iterable != undefined)$iter.forOf(iterable, IS_MAP, that[ADDER], that); - return that; - }; - C.prototype = proto; - if($.FW)proto.constructor = C; - } - isWeak || inst.forEach(function(val, key){ - buggyZero = 1 / key === -Infinity; - }); - // fix converting -0 key to +0 - if(buggyZero){ - fixMethod('delete'); - fixMethod('has'); - IS_MAP && fixMethod('get'); - } - // + fix .add & .set for chaining - if(buggyZero || chain !== inst)fixMethod(ADDER, true); - } - - require('./$.cof').set(C, NAME); - require('./$.species')(C); - - O[NAME] = C; - $def($def.G + $def.W + $def.F * (C != Base), O); - - // add .keys, .values, .entries, [@@iterator] - // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 - if(!isWeak)$iter.std( - C, NAME, - common.getIterConstructor(), common.next, - IS_MAP ? 'key+value' : 'value' , !IS_MAP, true - ); - - return C; -}; -},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.def":219,"./$.iter":222,"./$.species":229}],218:[function(require,module,exports){ -// Optional / simple context binding -var assertFunction = require('./$.assert').fn; -module.exports = function(fn, that, length){ - assertFunction(fn); - if(~length && that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } return function(/* ...args */){ - return fn.apply(that, arguments); - }; -}; -},{"./$.assert":212}],219:[function(require,module,exports){ -var $ = require('./$') - , global = $.g - , core = $.core - , isFunction = $.isFunction; -function ctx(fn, that){ - return function(){ - return fn.apply(that, arguments); - }; -} -// type bitmap -$def.F = 1; // forced -$def.G = 2; // global -$def.S = 4; // static -$def.P = 8; // proto -$def.B = 16; // bind -$def.W = 32; // wrap -function $def(type, name, source){ - var key, own, out, exp - , isGlobal = type & $def.G - , target = isGlobal ? global : type & $def.S - ? global[name] : (global[name] || {}).prototype - , exports = isGlobal ? core : core[name] || (core[name] = {}); - if(isGlobal)source = name; - for(key in source){ - // contains in native - own = !(type & $def.F) && target && key in target; - if(own && key in exports)continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - if(isGlobal && !isFunction(target[key]))exp = source[key]; - // bind timers to global for call from export context - else if(type & $def.B && own)exp = ctx(out, global); - // wrap global constructors for prevent change them in library - else if(type & $def.W && target[key] == out)!function(C){ - exp = function(param){ - return this instanceof C ? new C(param) : C(param); - }; - exp.prototype = C.prototype; - }(out); - else exp = type & $def.P && isFunction(out) ? ctx(Function.call, out) : out; - // export - $.hide(exports, key, exp); - } -} -module.exports = $def; -},{"./$":223}],220:[function(require,module,exports){ -module.exports = function($){ - $.FW = false; - $.path = $.core; - return $; -}; -},{}],221:[function(require,module,exports){ -// Fast apply -// http://jsperf.lnkit.com/fast-apply/5 -module.exports = function(fn, args, that){ - var un = that === undefined; - switch(args.length){ - case 0: return un ? fn() - : fn.call(that); - case 1: return un ? fn(args[0]) - : fn.call(that, args[0]); - case 2: return un ? fn(args[0], args[1]) - : fn.call(that, args[0], args[1]); - case 3: return un ? fn(args[0], args[1], args[2]) - : fn.call(that, args[0], args[1], args[2]); - case 4: return un ? fn(args[0], args[1], args[2], args[3]) - : fn.call(that, args[0], args[1], args[2], args[3]); - case 5: return un ? fn(args[0], args[1], args[2], args[3], args[4]) - : fn.call(that, args[0], args[1], args[2], args[3], args[4]); - } return fn.apply(that, args); -}; -},{}],222:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , ctx = require('./$.ctx') - , cof = require('./$.cof') - , $def = require('./$.def') - , assertObject = require('./$.assert').obj - , SYMBOL_ITERATOR = require('./$.wks')('iterator') - , FF_ITERATOR = '@@iterator' - , Iterators = {} - , IteratorPrototype = {}; -// Safari has byggy iterators w/o `next` -var BUGGY = 'keys' in [] && !('next' in [].keys()); -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -setIterator(IteratorPrototype, $.that); -function setIterator(O, value){ - $.hide(O, SYMBOL_ITERATOR, value); - // Add iterator for FF iterator protocol - if(FF_ITERATOR in [])$.hide(O, FF_ITERATOR, value); -} -function defineIterator(Constructor, NAME, value, DEFAULT){ - var proto = Constructor.prototype - , iter = proto[SYMBOL_ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] || value; - // Define iterator - if($.FW)setIterator(proto, iter); - if(iter !== value){ - var iterProto = $.getProto(iter.call(new Constructor)); - // Set @@toStringTag to native iterators - cof.set(iterProto, NAME + ' Iterator', true); - // FF fix - if($.FW)$.has(proto, FF_ITERATOR) && setIterator(iterProto, $.that); - } - // Plug for library - Iterators[NAME] = iter; - // FF & v8 fix - Iterators[NAME + ' Iterator'] = $.that; - return iter; -} -function getIterator(it){ - var Symbol = $.g.Symbol - , ext = it[Symbol && Symbol.iterator || FF_ITERATOR] - , getIter = ext || it[SYMBOL_ITERATOR] || Iterators[cof.classof(it)]; - return assertObject(getIter.call(it)); -} -function closeIterator(iterator){ - var ret = iterator['return']; - if(ret !== undefined)assertObject(ret.call(iterator)); -} -function stepCall(iterator, fn, value, entries){ - try { - return entries ? fn(assertObject(value)[0], value[1]) : fn(value); - } catch(e){ - closeIterator(iterator); - throw e; - } -} -var DANGER_CLOSING = true; -!function(){ - try { - var iter = [1].keys(); - iter['return'] = function(){ DANGER_CLOSING = false; }; - Array.from(iter, function(){ throw 2; }); - } catch(e){ /* empty */ } -}(); -var $iter = module.exports = { - BUGGY: BUGGY, - DANGER_CLOSING: DANGER_CLOSING, - fail: function(exec){ - var fail = true; - try { - var arr = [[{}, 1]] - , iter = arr[SYMBOL_ITERATOR]() - , next = iter.next; - iter.next = function(){ - fail = false; - return next.call(this); - }; - arr[SYMBOL_ITERATOR] = function(){ - return iter; - }; - exec(arr); - } catch(e){ /* empty */ } - return fail; - }, - Iterators: Iterators, - prototype: IteratorPrototype, - step: function(done, value){ - return {value: value, done: !!done}; - }, - stepCall: stepCall, - close: closeIterator, - is: function(it){ - var O = Object(it) - , Symbol = $.g.Symbol - , SYM = Symbol && Symbol.iterator || FF_ITERATOR; - return SYM in O || SYMBOL_ITERATOR in O || $.has(Iterators, cof.classof(O)); - }, - get: getIterator, - set: setIterator, - create: function(Constructor, NAME, next, proto){ - Constructor.prototype = $.create(proto || $iter.prototype, {next: $.desc(1, next)}); - cof.set(Constructor, NAME + ' Iterator'); - }, - define: defineIterator, - std: function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){ - function createIter(kind){ - return function(){ - return new Constructor(this, kind); - }; - } - $iter.create(Constructor, NAME, next); - var entries = createIter('key+value') - , values = createIter('value') - , proto = Base.prototype - , methods, key; - if(DEFAULT == 'value')values = defineIterator(Base, NAME, values, 'values'); - else entries = defineIterator(Base, NAME, entries, 'entries'); - if(DEFAULT){ - methods = { - entries: entries, - keys: IS_SET ? values : createIter('key'), - values: values - }; - $def($def.P + $def.F * BUGGY, NAME, methods); - if(FORCE)for(key in methods){ - if(!(key in proto))$.hide(proto, key, methods[key]); - } - } - }, - forOf: function(iterable, entries, fn, that){ - var iterator = getIterator(iterable) - , f = ctx(fn, that, entries ? 2 : 1) - , step; - while(!(step = iterator.next()).done){ - if(stepCall(iterator, f, step.value, entries) === false){ - return closeIterator(iterator); - } - } - } -}; -},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.ctx":218,"./$.def":219,"./$.wks":234}],223:[function(require,module,exports){ -'use strict'; -var global = typeof self != 'undefined' ? self : Function('return this')() - , core = {} - , defineProperty = Object.defineProperty - , hasOwnProperty = {}.hasOwnProperty - , ceil = Math.ceil - , floor = Math.floor - , max = Math.max - , min = Math.min; -// The engine works fine with descriptors? Thank's IE8 for his funny defineProperty. -var DESC = !!function(){ - try { - return defineProperty({}, 'a', {get: function(){ return 2; }}).a == 2; - } catch(e){ /* empty */ } -}(); -var hide = createDefiner(1); -// 7.1.4 ToInteger -function toInteger(it){ - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -} -function desc(bitmap, value){ - return { - enumerable : !(bitmap & 1), - configurable: !(bitmap & 2), - writable : !(bitmap & 4), - value : value - }; -} -function simpleSet(object, key, value){ - object[key] = value; - return object; -} -function createDefiner(bitmap){ - return DESC ? function(object, key, value){ - return $.setDesc(object, key, desc(bitmap, value)); // eslint-disable-line no-use-before-define - } : simpleSet; -} - -function isObject(it){ - return it !== null && (typeof it == 'object' || typeof it == 'function'); -} -function isFunction(it){ - return typeof it == 'function'; -} -function assertDefined(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); - return it; -} - -var $ = module.exports = require('./$.fw')({ - g: global, - core: core, - html: global.document && document.documentElement, - // http://jsperf.com/core-js-isobject - isObject: isObject, - isFunction: isFunction, - it: function(it){ - return it; - }, - that: function(){ - return this; - }, - // 7.1.4 ToInteger - toInteger: toInteger, - // 7.1.15 ToLength - toLength: function(it){ - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 - }, - toIndex: function(index, length){ - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); - }, - has: function(it, key){ - return hasOwnProperty.call(it, key); - }, - create: Object.create, - getProto: Object.getPrototypeOf, - DESC: DESC, - desc: desc, - getDesc: Object.getOwnPropertyDescriptor, - setDesc: defineProperty, - getKeys: Object.keys, - getNames: Object.getOwnPropertyNames, - getSymbols: Object.getOwnPropertySymbols, - // Dummy, fix for not array-like ES3 string in es5 module - assertDefined: assertDefined, - ES5Object: Object, - toObject: function(it){ - return $.ES5Object(assertDefined(it)); - }, - hide: hide, - def: createDefiner(0), - set: global.Symbol ? simpleSet : hide, - mix: function(target, src){ - for(var key in src)hide(target, key, src[key]); - return target; - }, - each: [].forEach -}); -if(typeof __e != 'undefined')__e = core; -if(typeof __g != 'undefined')__g = global; -},{"./$.fw":220}],224:[function(require,module,exports){ -var $ = require('./$'); -module.exports = function(object, el){ - var O = $.toObject(object) - , keys = $.getKeys(O) - , length = keys.length - , index = 0 - , key; - while(length > index)if(O[key = keys[index++]] === el)return key; -}; -},{"./$":223}],225:[function(require,module,exports){ -var $ = require('./$') - , assertObject = require('./$.assert').obj; -module.exports = function(it){ - assertObject(it); - return $.getSymbols ? $.getNames(it).concat($.getSymbols(it)) : $.getNames(it); -}; -},{"./$":223,"./$.assert":212}],226:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , invoke = require('./$.invoke') - , assertFunction = require('./$.assert').fn; -module.exports = function(/* ...pargs */){ - var fn = assertFunction(this) - , length = arguments.length - , pargs = Array(length) - , i = 0 - , _ = $.path._ - , holder = false; - while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; - return function(/* ...args */){ - var that = this - , _length = arguments.length - , j = 0, k = 0, args; - if(!holder && !_length)return invoke(fn, pargs, that); - args = pargs.slice(); - if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; - while(_length > k)args.push(arguments[k++]); - return invoke(fn, args, that); - }; -}; -},{"./$":223,"./$.assert":212,"./$.invoke":221}],227:[function(require,module,exports){ -'use strict'; -module.exports = function(regExp, replace, isStatic){ - var replacer = replace === Object(replace) ? function(part){ - return replace[part]; - } : replace; - return function(it){ - return String(isStatic ? it : this).replace(regExp, replacer); - }; -}; -},{}],228:[function(require,module,exports){ -// Works with __proto__ only. Old v8 can't works with null proto objects. -/*eslint-disable no-proto */ -var $ = require('./$') - , assert = require('./$.assert'); -module.exports = Object.setPrototypeOf || ('__proto__' in {} // eslint-disable-line - ? function(buggy, set){ - try { - set = require('./$.ctx')(Function.call, $.getDesc(Object.prototype, '__proto__').set, 2); - set({}, []); - } catch(e){ buggy = true; } - return function(O, proto){ - assert.obj(O); - assert(proto === null || $.isObject(proto), proto, ": can't set as prototype!"); - if(buggy)O.__proto__ = proto; - else set(O, proto); - return O; - }; - }() - : undefined); -},{"./$":223,"./$.assert":212,"./$.ctx":218}],229:[function(require,module,exports){ -var $ = require('./$'); -module.exports = function(C){ - if($.DESC && $.FW)$.setDesc(C, require('./$.wks')('species'), { - configurable: true, - get: $.that - }); -}; -},{"./$":223,"./$.wks":234}],230:[function(require,module,exports){ -'use strict'; -// true -> String#at -// false -> String#codePointAt -var $ = require('./$'); -module.exports = function(TO_STRING){ - return function(pos){ - var s = String($.assertDefined(this)) - , i = $.toInteger(pos) - , l = s.length - , a, b; - if(i < 0 || i >= l)return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l - || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; -}; -},{"./$":223}],231:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , ctx = require('./$.ctx') - , cof = require('./$.cof') - , invoke = require('./$.invoke') - , global = $.g - , isFunction = $.isFunction - , setTask = global.setImmediate - , clearTask = global.clearImmediate - , postMessage = global.postMessage - , addEventListener = global.addEventListener - , MessageChannel = global.MessageChannel - , counter = 0 - , queue = {} - , ONREADYSTATECHANGE = 'onreadystatechange' - , defer, channel, port; -function run(){ - var id = +this; - if($.has(queue, id)){ - var fn = queue[id]; - delete queue[id]; - fn(); - } -} -function listner(event){ - run.call(event.data); -} -// Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if(!isFunction(setTask) || !isFunction(clearTask)){ - setTask = function(fn){ - var args = [], i = 1; - while(arguments.length > i)args.push(arguments[i++]); - queue[++counter] = function(){ - invoke(isFunction(fn) ? fn : Function(fn), args); - }; - defer(counter); - return counter; - }; - clearTask = function(id){ - delete queue[id]; - }; - // Node.js 0.8- - if(cof(global.process) == 'process'){ - defer = function(id){ - global.process.nextTick(ctx(run, id, 1)); - }; - // Modern browsers, skip implementation for WebWorkers - // IE8 has postMessage, but it's sync & typeof its postMessage is object - } else if(addEventListener && isFunction(postMessage) && !$.g.importScripts){ - defer = function(id){ - postMessage(id, '*'); - }; - addEventListener('message', listner, false); - // WebWorkers - } else if(isFunction(MessageChannel)){ - channel = new MessageChannel; - port = channel.port2; - channel.port1.onmessage = listner; - defer = ctx(port.postMessage, port, 1); - // IE8- - } else if($.g.document && ONREADYSTATECHANGE in document.createElement('script')){ - defer = function(id){ - $.html.appendChild(document.createElement('script'))[ONREADYSTATECHANGE] = function(){ - $.html.removeChild(this); - run.call(id); - }; - }; - // Rest old browsers - } else { - defer = function(id){ - setTimeout(ctx(run, id, 1), 0); - }; - } -} -module.exports = { - set: setTask, - clear: clearTask -}; -},{"./$":223,"./$.cof":214,"./$.ctx":218,"./$.invoke":221}],232:[function(require,module,exports){ -var sid = 0; -function uid(key){ - return 'Symbol(' + key + ')_' + (++sid + Math.random()).toString(36); -} -uid.safe = require('./$').g.Symbol || uid; -module.exports = uid; -},{"./$":223}],233:[function(require,module,exports){ -// 22.1.3.31 Array.prototype[@@unscopables] -var $ = require('./$') - , UNSCOPABLES = require('./$.wks')('unscopables'); -if($.FW && !(UNSCOPABLES in []))$.hide(Array.prototype, UNSCOPABLES, {}); -module.exports = function(key){ - if($.FW)[][UNSCOPABLES][key] = true; -}; -},{"./$":223,"./$.wks":234}],234:[function(require,module,exports){ -var global = require('./$').g - , store = {}; -module.exports = function(name){ - return store[name] || (store[name] = - global.Symbol && global.Symbol[name] || require('./$.uid').safe('Symbol.' + name)); -}; -},{"./$":223,"./$.uid":232}],235:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , ctx = require('./$.ctx') - , safe = require('./$.uid').safe - , $def = require('./$.def') - , $iter = require('./$.iter') - , ENTRIES = safe('entries') - , FN = safe('fn') - , ITER = safe('iter') - , forOf = $iter.forOf - , stepCall = $iter.stepCall - , getIterator = $iter.get - , setIterator = $iter.set - , createIterator = $iter.create; -function $for(iterable, entries){ - if(!(this instanceof $for))return new $for(iterable, entries); - this[ITER] = getIterator(iterable); - this[ENTRIES] = !!entries; -} - -createIterator($for, 'Wrapper', function(){ - return this[ITER].next(); -}); -var $forProto = $for.prototype; -setIterator($forProto, function(){ - return this[ITER]; // unwrap -}); - -function createChainIterator(next){ - function Iterator(iter, fn, that){ - this[ITER] = getIterator(iter); - this[ENTRIES] = iter[ENTRIES]; - this[FN] = ctx(fn, that, iter[ENTRIES] ? 2 : 1); - } - createIterator(Iterator, 'Chain', next, $forProto); - setIterator(Iterator.prototype, $.that); // override $forProto iterator - return Iterator; -} - -var MapIter = createChainIterator(function(){ - var step = this[ITER].next(); - return step.done - ? step - : $iter.step(0, stepCall(this[ITER], this[FN], step.value, this[ENTRIES])); -}); - -var FilterIter = createChainIterator(function(){ - for(;;){ - var step = this[ITER].next(); - if(step.done || stepCall(this[ITER], this[FN], step.value, this[ENTRIES]))return step; - } -}); - -$.mix($forProto, { - of: function(fn, that){ - forOf(this, this[ENTRIES], fn, that); - }, - array: function(fn, that){ - var result = []; - forOf(fn != undefined ? this.map(fn, that) : this, false, result.push, result); - return result; - }, - filter: function(fn, that){ - return new FilterIter(this, fn, that); - }, - map: function(fn, that){ - return new MapIter(this, fn, that); - } -}); - -$for.isIterable = $iter.is; -$for.getIterator = getIterator; - -$def($def.G + $def.F, {$for: $for}); -},{"./$":223,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.uid":232}],236:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , $def = require('./$.def') - , assertFunction = require('./$.assert').fn; -$def($def.P + $def.F, 'Array', { - turn: function(fn, target /* = [] */){ - assertFunction(fn); - var memo = target == undefined ? [] : Object(target) - , O = $.ES5Object(this) - , length = $.toLength(O.length) - , index = 0; - while(length > index)if(fn(memo, O[index], index++, this) === false)break; - return memo; - } -}); -require('./$.unscope')('turn'); -},{"./$":223,"./$.assert":212,"./$.def":219,"./$.unscope":233}],237:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , ctx = require('./$.ctx') - , $def = require('./$.def') - , invoke = require('./$.invoke') - , hide = $.hide - , assertFunction = require('./$.assert').fn - // IE8- dirty hack - redefined toLocaleString is not enumerable - , _ = $.DESC ? require('./$.uid')('tie') : 'toLocaleString' - , toLocaleString = {}.toLocaleString; - -// Placeholder -$.core._ = $.path._ = $.path._ || {}; - -$def($def.P + $def.F, 'Function', { - part: require('./$.partial'), - only: function(numberArguments, that /* = @ */){ - var fn = assertFunction(this) - , n = $.toLength(numberArguments) - , isThat = arguments.length > 1; - return function(/* ...args */){ - var length = Math.min(n, arguments.length) - , args = Array(length) - , i = 0; - while(length > i)args[i] = arguments[i++]; - return invoke(fn, args, isThat ? that : this); - }; - } -}); - -function tie(key){ - var that = this - , bound = {}; - return hide(that, _, function(key){ // eslint-disable-line no-shadow - if(key === undefined || !(key in that))return toLocaleString.call(that); - return $.has(bound, key) ? bound[key] : bound[key] = ctx(that[key], that, -1); - })[_](key); -} - -hide($.path._, 'toString', function(){ - return _; -}); - -hide(Object.prototype, _, tie); -$.DESC || hide(Array.prototype, _, tie); -},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.def":219,"./$.invoke":221,"./$.partial":226,"./$.uid":232}],238:[function(require,module,exports){ -var $ = require('./$') - , $def = require('./$.def') - , core = $.core - , formatRegExp = /\b\w\w?\b/g - , flexioRegExp = /:(.*)\|(.*)$/ - , locales = {} - , current = 'en' - , SECONDS = 'Seconds' - , MINUTES = 'Minutes' - , HOURS = 'Hours' - , DATE = 'Date' - , MONTH = 'Month' - , YEAR = 'FullYear'; -function lz(num){ - return num > 9 ? num : '0' + num; -} -function createFormat(prefix){ - return function(template, locale /* = current */){ - var that = this - , dict = locales[$.has(locales, locale) ? locale : current]; - function get(unit){ - return that[prefix + unit](); - } - return String(template).replace(formatRegExp, function(part){ - switch(part){ - case 's' : return get(SECONDS); // Seconds : 0-59 - case 'ss' : return lz(get(SECONDS)); // Seconds : 00-59 - case 'm' : return get(MINUTES); // Minutes : 0-59 - case 'mm' : return lz(get(MINUTES)); // Minutes : 00-59 - case 'h' : return get(HOURS); // Hours : 0-23 - case 'hh' : return lz(get(HOURS)); // Hours : 00-23 - case 'D' : return get(DATE); // Date : 1-31 - case 'DD' : return lz(get(DATE)); // Date : 01-31 - case 'W' : return dict[0][get('Day')]; // Day : Понедельник - case 'N' : return get(MONTH) + 1; // Month : 1-12 - case 'NN' : return lz(get(MONTH) + 1); // Month : 01-12 - case 'M' : return dict[2][get(MONTH)]; // Month : Январь - case 'MM' : return dict[1][get(MONTH)]; // Month : Января - case 'Y' : return get(YEAR); // Year : 2014 - case 'YY' : return lz(get(YEAR) % 100); // Year : 14 - } return part; - }); - }; -} -function addLocale(lang, locale){ - function split(index){ - var result = []; - $.each.call(locale.months.split(','), function(it){ - result.push(it.replace(flexioRegExp, '$' + index)); - }); - return result; - } - locales[lang] = [locale.weekdays.split(','), split(1), split(2)]; - return core; -} -$def($def.P + $def.F, DATE, { - format: createFormat('get'), - formatUTC: createFormat('getUTC') -}); -addLocale(current, { - weekdays: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday', - months: 'January,February,March,April,May,June,July,August,September,October,November,December' -}); -addLocale('ru', { - weekdays: 'Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота', - months: 'Январ:я|ь,Феврал:я|ь,Март:а|,Апрел:я|ь,Ма:я|й,Июн:я|ь,' + - 'Июл:я|ь,Август:а|,Сентябр:я|ь,Октябр:я|ь,Ноябр:я|ь,Декабр:я|ь' -}); -core.locale = function(locale){ - return $.has(locales, locale) ? current = locale : current; -}; -core.addLocale = addLocale; -},{"./$":223,"./$.def":219}],239:[function(require,module,exports){ -var $ = require('./$') - , $def = require('./$.def') - , partial = require('./$.partial'); -// https://esdiscuss.org/topic/promise-returning-delay-function -$def($def.G + $def.F, { - delay: function(time){ - return new ($.core.Promise || $.g.Promise)(function(resolve){ - setTimeout(partial.call(resolve, true), time); - }); - } -}); -},{"./$":223,"./$.def":219,"./$.partial":226}],240:[function(require,module,exports){ -var $ = require('./$') - , ctx = require('./$.ctx') - , $def = require('./$.def') - , assign = require('./$.assign') - , keyOf = require('./$.keyof') - , ITER = require('./$.uid').safe('iter') - , assert = require('./$.assert') - , $iter = require('./$.iter') - , step = $iter.step - , getKeys = $.getKeys - , toObject = $.toObject - , has = $.has; - -function Dict(iterable){ - var dict = $.create(null); - if(iterable != undefined){ - if($iter.is(iterable)){ - $iter.forOf(iterable, true, function(key, value){ - dict[key] = value; - }); - } else assign(dict, iterable); - } - return dict; -} -Dict.prototype = null; - -function DictIterator(iterated, kind){ - $.set(this, ITER, {o: toObject(iterated), a: getKeys(iterated), i: 0, k: kind}); -} -$iter.create(DictIterator, 'Dict', function(){ - var iter = this[ITER] - , O = iter.o - , keys = iter.a - , kind = iter.k - , key; - do { - if(iter.i >= keys.length){ - iter.o = undefined; - return step(1); - } - } while(!has(O, key = keys[iter.i++])); - if(kind == 'key' )return step(0, key); - if(kind == 'value')return step(0, O[key]); - return step(0, [key, O[key]]); -}); -function createDictIter(kind){ - return function(it){ - return new DictIterator(it, kind); - }; -} -function generic(A, B){ - // strange IE quirks mode bug -> use typeof instead of isFunction - return typeof A == 'function' ? A : B; -} - -// 0 -> Dict.forEach -// 1 -> Dict.map -// 2 -> Dict.filter -// 3 -> Dict.some -// 4 -> Dict.every -// 5 -> Dict.find -// 6 -> Dict.findKey -// 7 -> Dict.mapPairs -function createDictMethod(TYPE){ - var IS_MAP = TYPE == 1 - , IS_EVERY = TYPE == 4; - return function(object, callbackfn, that /* = undefined */){ - var f = ctx(callbackfn, that, 3) - , O = toObject(object) - , result = IS_MAP || TYPE == 7 || TYPE == 2 ? new (generic(this, Dict)) : undefined - , key, val, res; - for(key in O)if(has(O, key)){ - val = O[key]; - res = f(val, key, object); - if(TYPE){ - if(IS_MAP)result[key] = res; // map - else if(res)switch(TYPE){ - case 2: result[key] = val; break; // filter - case 3: return true; // some - case 5: return val; // find - case 6: return key; // findKey - case 7: result[res[0]] = res[1]; // mapPairs - } else if(IS_EVERY)return false; // every - } - } - return TYPE == 3 || IS_EVERY ? IS_EVERY : result; - }; -} - -// true -> Dict.turn -// false -> Dict.reduce -function createDictReduce(IS_TURN){ - return function(object, mapfn, init){ - assert.fn(mapfn); - var O = toObject(object) - , keys = getKeys(O) - , length = keys.length - , i = 0 - , memo, key, result; - if(IS_TURN){ - memo = init == undefined ? new (generic(this, Dict)) : Object(init); - } else if(arguments.length < 3){ - assert(length, 'Reduce of empty object with no initial value'); - memo = O[keys[i++]]; - } else memo = Object(init); - while(length > i)if(has(O, key = keys[i++])){ - result = mapfn(memo, O[key], key, object); - if(IS_TURN){ - if(result === false)break; - } else memo = result; - } - return memo; - }; -} -var findKey = createDictMethod(6); - -$def($def.G + $def.F, {Dict: $.mix(Dict, { - keys: createDictIter('key'), - values: createDictIter('value'), - entries: createDictIter('key+value'), - forEach: createDictMethod(0), - map: createDictMethod(1), - filter: createDictMethod(2), - some: createDictMethod(3), - every: createDictMethod(4), - find: createDictMethod(5), - findKey: findKey, - mapPairs: createDictMethod(7), - reduce: createDictReduce(false), - turn: createDictReduce(true), - keyOf: keyOf, - includes: function(object, el){ - return (el == el ? keyOf(object, el) : findKey(object, function(it){ - return it != it; - })) !== undefined; - }, - // Has / get / set own property - has: has, - get: function(object, key){ - if(has(object, key))return object[key]; - }, - set: $.def, - isDict: function(it){ - return $.isObject(it) && $.getProto(it) === Dict.prototype; - } -})}); -},{"./$":223,"./$.assert":212,"./$.assign":213,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.keyof":224,"./$.uid":232}],241:[function(require,module,exports){ -var $def = require('./$.def'); -$def($def.G + $def.F, {global: require('./$').g}); -},{"./$":223,"./$.def":219}],242:[function(require,module,exports){ -var core = require('./$').core - , $iter = require('./$.iter'); -core.isIterable = $iter.is; -core.getIterator = $iter.get; -},{"./$":223,"./$.iter":222}],243:[function(require,module,exports){ -var $ = require('./$') - , $def = require('./$.def') - , log = {} - , enabled = true; -// Methods from https://github.com/DeveloperToolsWG/console-object/blob/master/api.md -$.each.call(('assert,clear,count,debug,dir,dirxml,error,exception,' + - 'group,groupCollapsed,groupEnd,info,isIndependentlyComposed,log,' + - 'markTimeline,profile,profileEnd,table,time,timeEnd,timeline,' + - 'timelineEnd,timeStamp,trace,warn').split(','), function(key){ - log[key] = function(){ - if(enabled && $.g.console && $.isFunction(console[key])){ - return Function.apply.call(console[key], console, arguments); - } - }; -}); -$def($def.G + $def.F, {log: require('./$.assign')(log.log, log, { - enable: function(){ - enabled = true; - }, - disable: function(){ - enabled = false; - } -})}); -},{"./$":223,"./$.assign":213,"./$.def":219}],244:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , ITER = require('./$.uid').safe('iter') - , $iter = require('./$.iter') - , step = $iter.step - , NUMBER = 'Number'; -function NumberIterator(iterated){ - $.set(this, ITER, {l: $.toLength(iterated), i: 0}); -} -$iter.create(NumberIterator, NUMBER, function(){ - var iter = this[ITER] - , i = iter.i++; - return i < iter.l ? step(0, i) : step(1); -}); -$iter.define(Number, NUMBER, function(){ - return new NumberIterator(this); -}); -},{"./$":223,"./$.iter":222,"./$.uid":232}],245:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , $def = require('./$.def') - , invoke = require('./$.invoke') - , methods = {}; - -methods.random = function(lim /* = 0 */){ - var a = +this - , b = lim == undefined ? 0 : +lim - , m = Math.min(a, b); - return Math.random() * (Math.max(a, b) - m) + m; -}; - -if($.FW)$.each.call(( - // ES3: - 'round,floor,ceil,abs,sin,asin,cos,acos,tan,atan,exp,sqrt,max,min,pow,atan2,' + - // ES6: - 'acosh,asinh,atanh,cbrt,clz32,cosh,expm1,hypot,imul,log1p,log10,log2,sign,sinh,tanh,trunc' - ).split(','), function(key){ - var fn = Math[key]; - if(fn)methods[key] = function(/* ...args */){ - // ie9- dont support strict mode & convert `this` to object -> convert it to number - var args = [+this] - , i = 0; - while(arguments.length > i)args.push(arguments[i++]); - return invoke(fn, args); - }; - } -); - -$def($def.P + $def.F, 'Number', methods); -},{"./$":223,"./$.def":219,"./$.invoke":221}],246:[function(require,module,exports){ -var $ = require('./$') - , $def = require('./$.def') - , ownKeys = require('./$.own-keys'); -function define(target, mixin){ - var keys = ownKeys($.toObject(mixin)) - , length = keys.length - , i = 0, key; - while(length > i)$.setDesc(target, key = keys[i++], $.getDesc(mixin, key)); - return target; -} -$def($def.S + $def.F, 'Object', { - isObject: $.isObject, - classof: require('./$.cof').classof, - define: define, - make: function(proto, mixin){ - return define($.create(proto), mixin); - } -}); -},{"./$":223,"./$.cof":214,"./$.def":219,"./$.own-keys":225}],247:[function(require,module,exports){ -var $def = require('./$.def') - , replacer = require('./$.replacer'); -var escapeHTMLDict = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}, unescapeHTMLDict = {}, key; -for(key in escapeHTMLDict)unescapeHTMLDict[escapeHTMLDict[key]] = key; -$def($def.P + $def.F, 'String', { - escapeHTML: replacer(/[&<>"']/g, escapeHTMLDict), - unescapeHTML: replacer(/&(?:amp|lt|gt|quot|apos);/g, unescapeHTMLDict) -}); -},{"./$.def":219,"./$.replacer":227}],248:[function(require,module,exports){ -var $ = require('./$') - , cof = require('./$.cof') - , $def = require('./$.def') - , invoke = require('./$.invoke') - , arrayMethod = require('./$.array-methods') - , IE_PROTO = require('./$.uid').safe('__proto__') - , assert = require('./$.assert') - , assertObject = assert.obj - , ObjectProto = Object.prototype - , A = [] - , slice = A.slice - , indexOf = A.indexOf - , classof = cof.classof - , defineProperties = Object.defineProperties - , has = $.has - , defineProperty = $.setDesc - , getOwnDescriptor = $.getDesc - , isFunction = $.isFunction - , toObject = $.toObject - , toLength = $.toLength - , IE8_DOM_DEFINE = false; - -if(!$.DESC){ - try { - IE8_DOM_DEFINE = defineProperty(document.createElement('div'), 'x', - {get: function(){ return 8; }} - ).x == 8; - } catch(e){ /* empty */ } - $.setDesc = function(O, P, Attributes){ - if(IE8_DOM_DEFINE)try { - return defineProperty(O, P, Attributes); - } catch(e){ /* empty */ } - if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); - if('value' in Attributes)assertObject(O)[P] = Attributes.value; - return O; - }; - $.getDesc = function(O, P){ - if(IE8_DOM_DEFINE)try { - return getOwnDescriptor(O, P); - } catch(e){ /* empty */ } - if(has(O, P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]); - }; - defineProperties = function(O, Properties){ - assertObject(O); - var keys = $.getKeys(Properties) - , length = keys.length - , i = 0 - , P; - while(length > i)$.setDesc(O, P = keys[i++], Properties[P]); - return O; - }; -} -$def($def.S + $def.F * !$.DESC, 'Object', { - // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P) - getOwnPropertyDescriptor: $.getDesc, - // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) - defineProperty: $.setDesc, - // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) - defineProperties: defineProperties -}); - - // IE 8- don't enum bug keys -var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' + - 'toLocaleString,toString,valueOf').split(',') - // Additional keys for getOwnPropertyNames - , keys2 = keys1.concat('length', 'prototype') - , keysLen1 = keys1.length; - -// Create object with `null` prototype: use iframe Object with cleared prototype -var createDict = function(){ - // Thrash, waste and sodomy: IE GC bug - var iframe = document.createElement('iframe') - , i = keysLen1 - , iframeDocument; - iframe.style.display = 'none'; - $.html.appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(''); - iframeDocument.close(); - createDict = iframeDocument.F; - while(i--)delete createDict.prototype[keys1[i]]; - return createDict(); -}; -function createGetKeys(names, length){ - return function(object){ - var O = toObject(object) - , i = 0 - , result = [] - , key; - for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while(length > i)if(has(O, key = names[i++])){ - ~indexOf.call(result, key) || result.push(key); - } - return result; - }; -} -function isPrimitive(it){ return !$.isObject(it); } -function Empty(){} -$def($def.S, 'Object', { - // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) - getPrototypeOf: $.getProto = $.getProto || function(O){ - O = Object(assert.def(O)); - if(has(O, IE_PROTO))return O[IE_PROTO]; - if(isFunction(O.constructor) && O instanceof O.constructor){ - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; - }, - // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) - getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true), - // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) - create: $.create = $.create || function(O, /*?*/Properties){ - var result; - if(O !== null){ - Empty.prototype = assertObject(O); - result = new Empty(); - Empty.prototype = null; - // add "__proto__" for Object.getPrototypeOf shim - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : defineProperties(result, Properties); - }, - // 19.1.2.14 / 15.2.3.14 Object.keys(O) - keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false), - // 19.1.2.17 / 15.2.3.8 Object.seal(O) - seal: $.it, // <- cap - // 19.1.2.5 / 15.2.3.9 Object.freeze(O) - freeze: $.it, // <- cap - // 19.1.2.15 / 15.2.3.10 Object.preventExtensions(O) - preventExtensions: $.it, // <- cap - // 19.1.2.13 / 15.2.3.11 Object.isSealed(O) - isSealed: isPrimitive, // <- cap - // 19.1.2.12 / 15.2.3.12 Object.isFrozen(O) - isFrozen: isPrimitive, // <- cap - // 19.1.2.11 / 15.2.3.13 Object.isExtensible(O) - isExtensible: $.isObject // <- cap -}); - -// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) -$def($def.P, 'Function', { - bind: function(that /*, args... */){ - var fn = assert.fn(this) - , partArgs = slice.call(arguments, 1); - function bound(/* args... */){ - var args = partArgs.concat(slice.call(arguments)); - return invoke(fn, args, this instanceof bound ? $.create(fn.prototype) : that); - } - if(fn.prototype)bound.prototype = fn.prototype; - return bound; - } -}); - -// Fix for not array-like ES3 string -function arrayMethodFix(fn){ - return function(){ - return fn.apply($.ES5Object(this), arguments); - }; -} -if(!(0 in Object('z') && 'z'[0] == 'z')){ - $.ES5Object = function(it){ - return cof(it) == 'String' ? it.split('') : Object(it); - }; -} -$def($def.P + $def.F * ($.ES5Object != Object), 'Array', { - slice: arrayMethodFix(slice), - join: arrayMethodFix(A.join) -}); - -// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) -$def($def.S, 'Array', { - isArray: function(arg){ - return cof(arg) == 'Array'; - } -}); -function createArrayReduce(isRight){ - return function(callbackfn, memo){ - assert.fn(callbackfn); - var O = toObject(this) - , length = toLength(O.length) - , index = isRight ? length - 1 : 0 - , i = isRight ? -1 : 1; - if(arguments.length < 2)for(;;){ - if(index in O){ - memo = O[index]; - index += i; - break; - } - index += i; - assert(isRight ? index >= 0 : length > index, 'Reduce of empty array with no initial value'); - } - for(;isRight ? index >= 0 : length > index; index += i)if(index in O){ - memo = callbackfn(memo, O[index], index, this); - } - return memo; - }; -} -$def($def.P, 'Array', { - // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) - forEach: $.each = $.each || arrayMethod(0), - // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) - map: arrayMethod(1), - // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) - filter: arrayMethod(2), - // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) - some: arrayMethod(3), - // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) - every: arrayMethod(4), - // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) - reduce: createArrayReduce(false), - // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) - reduceRight: createArrayReduce(true), - // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) - indexOf: indexOf = indexOf || require('./$.array-includes')(false), - // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) - lastIndexOf: function(el, fromIndex /* = @[*-1] */){ - var O = toObject(this) - , length = toLength(O.length) - , index = length - 1; - if(arguments.length > 1)index = Math.min(index, $.toInteger(fromIndex)); - if(index < 0)index = toLength(length + index); - for(;index >= 0; index--)if(index in O)if(O[index] === el)return index; - return -1; - } -}); - -// 21.1.3.25 / 15.5.4.20 String.prototype.trim() -$def($def.P, 'String', {trim: require('./$.replacer')(/^\s*([\s\S]*\S)?\s*$/, '$1')}); - -// 20.3.3.1 / 15.9.4.4 Date.now() -$def($def.S, 'Date', {now: function(){ - return +new Date; -}}); - -function lz(num){ - return num > 9 ? num : '0' + num; -} -// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() -$def($def.P, 'Date', {toISOString: function(){ - if(!isFinite(this))throw RangeError('Invalid time value'); - var d = this - , y = d.getUTCFullYear() - , m = d.getUTCMilliseconds() - , s = y < 0 ? '-' : y > 9999 ? '+' : ''; - return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + - '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + - 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + - ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; -}}); - -if(classof(function(){ return arguments; }()) == 'Object')cof.classof = function(it){ - var tag = classof(it); - return tag == 'Object' && isFunction(it.callee) ? 'Arguments' : tag; -}; -},{"./$":223,"./$.array-includes":210,"./$.array-methods":211,"./$.assert":212,"./$.cof":214,"./$.def":219,"./$.invoke":221,"./$.replacer":227,"./$.uid":232}],249:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , $def = require('./$.def') - , toIndex = $.toIndex; -$def($def.P, 'Array', { - // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) - copyWithin: function(target/* = 0 */, start /* = 0, end = @length */){ - var O = Object($.assertDefined(this)) - , len = $.toLength(O.length) - , to = toIndex(target, len) - , from = toIndex(start, len) - , end = arguments[2] - , fin = end === undefined ? len : toIndex(end, len) - , count = Math.min(fin - from, len - to) - , inc = 1; - if(from < to && to < from + count){ - inc = -1; - from = from + count - 1; - to = to + count - 1; - } - while(count-- > 0){ - if(from in O)O[to] = O[from]; - else delete O[to]; - to += inc; - from += inc; - } return O; - } -}); -require('./$.unscope')('copyWithin'); -},{"./$":223,"./$.def":219,"./$.unscope":233}],250:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , $def = require('./$.def') - , toIndex = $.toIndex; -$def($def.P, 'Array', { - // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) - fill: function(value /*, start = 0, end = @length */){ - var O = Object($.assertDefined(this)) - , length = $.toLength(O.length) - , index = toIndex(arguments[1], length) - , end = arguments[2] - , endPos = end === undefined ? length : toIndex(end, length); - while(endPos > index)O[index++] = value; - return O; - } -}); -require('./$.unscope')('fill'); -},{"./$":223,"./$.def":219,"./$.unscope":233}],251:[function(require,module,exports){ -var $def = require('./$.def'); -$def($def.P, 'Array', { - // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) - findIndex: require('./$.array-methods')(6) -}); -require('./$.unscope')('findIndex'); -},{"./$.array-methods":211,"./$.def":219,"./$.unscope":233}],252:[function(require,module,exports){ -var $def = require('./$.def'); -$def($def.P, 'Array', { - // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) - find: require('./$.array-methods')(5) -}); -require('./$.unscope')('find'); -},{"./$.array-methods":211,"./$.def":219,"./$.unscope":233}],253:[function(require,module,exports){ -var $ = require('./$') - , ctx = require('./$.ctx') - , $def = require('./$.def') - , $iter = require('./$.iter') - , stepCall = $iter.stepCall; -$def($def.S + $def.F * $iter.DANGER_CLOSING, 'Array', { - // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) - from: function(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ - var O = Object($.assertDefined(arrayLike)) - , mapfn = arguments[1] - , mapping = mapfn !== undefined - , f = mapping ? ctx(mapfn, arguments[2], 2) : undefined - , index = 0 - , length, result, step, iterator; - if($iter.is(O)){ - iterator = $iter.get(O); - // strange IE quirks mode bug -> use typeof instead of isFunction - result = new (typeof this == 'function' ? this : Array); - for(; !(step = iterator.next()).done; index++){ - result[index] = mapping ? stepCall(iterator, f, [step.value, index], true) : step.value; - } - } else { - // strange IE quirks mode bug -> use typeof instead of isFunction - result = new (typeof this == 'function' ? this : Array)(length = $.toLength(O.length)); - for(; length > index; index++){ - result[index] = mapping ? f(O[index], index) : O[index]; - } - } - result.length = index; - return result; - } -}); -},{"./$":223,"./$.ctx":218,"./$.def":219,"./$.iter":222}],254:[function(require,module,exports){ -var $ = require('./$') - , setUnscope = require('./$.unscope') - , ITER = require('./$.uid').safe('iter') - , $iter = require('./$.iter') - , step = $iter.step - , Iterators = $iter.Iterators; - -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -$iter.std(Array, 'Array', function(iterated, kind){ - $.set(this, ITER, {o: $.toObject(iterated), i: 0, k: kind}); -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function(){ - var iter = this[ITER] - , O = iter.o - , kind = iter.k - , index = iter.i++; - if(!O || index >= O.length){ - iter.o = undefined; - return step(1); - } - if(kind == 'key' )return step(0, index); - if(kind == 'value')return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'value'); - -// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) -Iterators.Arguments = Iterators.Array; - -setUnscope('keys'); -setUnscope('values'); -setUnscope('entries'); -},{"./$":223,"./$.iter":222,"./$.uid":232,"./$.unscope":233}],255:[function(require,module,exports){ -var $def = require('./$.def'); -$def($def.S, 'Array', { - // 22.1.2.3 Array.of( ...items) - of: function(/* ...args */){ - var index = 0 - , length = arguments.length - // strange IE quirks mode bug -> use typeof instead of isFunction - , result = new (typeof this == 'function' ? this : Array)(length); - while(length > index)result[index] = arguments[index++]; - result.length = length; - return result; - } -}); -},{"./$.def":219}],256:[function(require,module,exports){ -require('./$.species')(Array); -},{"./$.species":229}],257:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , NAME = 'name' - , setDesc = $.setDesc - , FunctionProto = Function.prototype; -// 19.2.4.2 name -NAME in FunctionProto || $.FW && $.DESC && setDesc(FunctionProto, NAME, { - configurable: true, - get: function(){ - var match = String(this).match(/^\s*function ([^ (]*)/) - , name = match ? match[1] : ''; - $.has(this, NAME) || setDesc(this, NAME, $.desc(5, name)); - return name; - }, - set: function(value){ - $.has(this, NAME) || setDesc(this, NAME, $.desc(0, value)); - } -}); -},{"./$":223}],258:[function(require,module,exports){ -'use strict'; -var strong = require('./$.collection-strong'); - -// 23.1 Map Objects -require('./$.collection')('Map', { - // 23.1.3.6 Map.prototype.get(key) - get: function(key){ - var entry = strong.getEntry(this, key); - return entry && entry.v; - }, - // 23.1.3.9 Map.prototype.set(key, value) - set: function(key, value){ - return strong.def(this, key === 0 ? 0 : key, value); - } -}, strong, true); -},{"./$.collection":217,"./$.collection-strong":215}],259:[function(require,module,exports){ -var Infinity = 1 / 0 - , $def = require('./$.def') - , E = Math.E - , pow = Math.pow - , abs = Math.abs - , exp = Math.exp - , log = Math.log - , sqrt = Math.sqrt - , ceil = Math.ceil - , floor = Math.floor - , sign = Math.sign || function(x){ - return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; - }; - -// 20.2.2.5 Math.asinh(x) -function asinh(x){ - return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1)); -} -// 20.2.2.14 Math.expm1(x) -function expm1(x){ - return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1; -} - -$def($def.S, 'Math', { - // 20.2.2.3 Math.acosh(x) - acosh: function(x){ - return (x = +x) < 1 ? NaN : isFinite(x) ? log(x / E + sqrt(x + 1) * sqrt(x - 1) / E) + 1 : x; - }, - // 20.2.2.5 Math.asinh(x) - asinh: asinh, - // 20.2.2.7 Math.atanh(x) - atanh: function(x){ - return (x = +x) == 0 ? x : log((1 + x) / (1 - x)) / 2; - }, - // 20.2.2.9 Math.cbrt(x) - cbrt: function(x){ - return sign(x = +x) * pow(abs(x), 1 / 3); - }, - // 20.2.2.11 Math.clz32(x) - clz32: function(x){ - return (x >>>= 0) ? 32 - x.toString(2).length : 32; - }, - // 20.2.2.12 Math.cosh(x) - cosh: function(x){ - return (exp(x = +x) + exp(-x)) / 2; - }, - // 20.2.2.14 Math.expm1(x) - expm1: expm1, - // 20.2.2.16 Math.fround(x) - // TODO: fallback for IE9- - fround: function(x){ - return new Float32Array([x])[0]; - }, - // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) - hypot: function(value1, value2){ // eslint-disable-line no-unused-vars - var sum = 0 - , len1 = arguments.length - , len2 = len1 - , args = Array(len1) - , larg = -Infinity - , arg; - while(len1--){ - arg = args[len1] = +arguments[len1]; - if(arg == Infinity || arg == -Infinity)return Infinity; - if(arg > larg)larg = arg; - } - larg = arg || 1; - while(len2--)sum += pow(args[len2] / larg, 2); - return larg * sqrt(sum); - }, - // 20.2.2.18 Math.imul(x, y) - imul: function(x, y){ - var UInt16 = 0xffff - , xn = +x - , yn = +y - , xl = UInt16 & xn - , yl = UInt16 & yn; - return 0 | xl * yl + ((UInt16 & xn >>> 16) * yl + xl * (UInt16 & yn >>> 16) << 16 >>> 0); - }, - // 20.2.2.20 Math.log1p(x) - log1p: function(x){ - return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x); - }, - // 20.2.2.21 Math.log10(x) - log10: function(x){ - return log(x) / Math.LN10; - }, - // 20.2.2.22 Math.log2(x) - log2: function(x){ - return log(x) / Math.LN2; - }, - // 20.2.2.28 Math.sign(x) - sign: sign, - // 20.2.2.30 Math.sinh(x) - sinh: function(x){ - return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2); - }, - // 20.2.2.33 Math.tanh(x) - tanh: function(x){ - var a = expm1(x = +x) - , b = expm1(-x); - return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); - }, - // 20.2.2.34 Math.trunc(x) - trunc: function(it){ - return (it > 0 ? floor : ceil)(it); - } -}); -},{"./$.def":219}],260:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , isObject = $.isObject - , isFunction = $.isFunction - , NUMBER = 'Number' - , Number = $.g[NUMBER] - , Base = Number - , proto = Number.prototype; -function toPrimitive(it){ - var fn, val; - if(isFunction(fn = it.valueOf) && !isObject(val = fn.call(it)))return val; - if(isFunction(fn = it.toString) && !isObject(val = fn.call(it)))return val; - throw TypeError("Can't convert object to number"); -} -function toNumber(it){ - if(isObject(it))it = toPrimitive(it); - if(typeof it == 'string' && it.length > 2 && it.charCodeAt(0) == 48){ - var binary = false; - switch(it.charCodeAt(1)){ - case 66 : case 98 : binary = true; - case 79 : case 111 : return parseInt(it.slice(2), binary ? 2 : 8); - } - } return +it; -} -if($.FW && !(Number('0o1') && Number('0b1'))){ - Number = function Number(it){ - return this instanceof Number ? new Base(toNumber(it)) : toNumber(it); - }; - $.each.call($.DESC ? $.getNames(Base) : ( - // ES3: - 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + - // ES6 (in case, if modules with ES6 Number statics required before): - 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + - 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' - ).split(','), function(key){ - if($.has(Base, key) && !$.has(Number, key)){ - $.setDesc(Number, key, $.getDesc(Base, key)); - } - } - ); - Number.prototype = proto; - proto.constructor = Number; - $.hide($.g, NUMBER, Number); -} -},{"./$":223}],261:[function(require,module,exports){ -var $ = require('./$') - , $def = require('./$.def') - , abs = Math.abs - , floor = Math.floor - , MAX_SAFE_INTEGER = 0x1fffffffffffff; // pow(2, 53) - 1 == 9007199254740991; -function isInteger(it){ - return !$.isObject(it) && isFinite(it) && floor(it) === it; -} -$def($def.S, 'Number', { - // 20.1.2.1 Number.EPSILON - EPSILON: Math.pow(2, -52), - // 20.1.2.2 Number.isFinite(number) - isFinite: function(it){ - return typeof it == 'number' && isFinite(it); - }, - // 20.1.2.3 Number.isInteger(number) - isInteger: isInteger, - // 20.1.2.4 Number.isNaN(number) - isNaN: function(number){ - return number != number; - }, - // 20.1.2.5 Number.isSafeInteger(number) - isSafeInteger: function(number){ - return isInteger(number) && abs(number) <= MAX_SAFE_INTEGER; - }, - // 20.1.2.6 Number.MAX_SAFE_INTEGER - MAX_SAFE_INTEGER: MAX_SAFE_INTEGER, - // 20.1.2.10 Number.MIN_SAFE_INTEGER - MIN_SAFE_INTEGER: -MAX_SAFE_INTEGER, - // 20.1.2.12 Number.parseFloat(string) - parseFloat: parseFloat, - // 20.1.2.13 Number.parseInt(string, radix) - parseInt: parseInt -}); -},{"./$":223,"./$.def":219}],262:[function(require,module,exports){ -// 19.1.3.1 Object.assign(target, source) -var $def = require('./$.def'); -$def($def.S, 'Object', {assign: require('./$.assign')}); -},{"./$.assign":213,"./$.def":219}],263:[function(require,module,exports){ -// 19.1.3.10 Object.is(value1, value2) -var $def = require('./$.def'); -$def($def.S, 'Object', { - is: function(x, y){ - return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; - } -}); -},{"./$.def":219}],264:[function(require,module,exports){ -// 19.1.3.19 Object.setPrototypeOf(O, proto) -var $def = require('./$.def'); -$def($def.S, 'Object', {setPrototypeOf: require('./$.set-proto')}); -},{"./$.def":219,"./$.set-proto":228}],265:[function(require,module,exports){ -var $ = require('./$') - , $def = require('./$.def') - , isObject = $.isObject - , toObject = $.toObject; -function wrapObjectMethod(METHOD, MODE){ - var fn = ($.core.Object || {})[METHOD] || Object[METHOD] - , f = 0 - , o = {}; - o[METHOD] = MODE == 1 ? function(it){ - return isObject(it) ? fn(it) : it; - } : MODE == 2 ? function(it){ - return isObject(it) ? fn(it) : true; - } : MODE == 3 ? function(it){ - return isObject(it) ? fn(it) : false; - } : MODE == 4 ? function(it, key){ - return fn(toObject(it), key); - } : MODE == 5 ? function(it){ - return fn(Object($.assertDefined(it))); - } : function(it){ - return fn(toObject(it)); - }; - try { - fn('z'); - } catch(e){ - f = 1; - } - $def($def.S + $def.F * f, 'Object', o); -} -wrapObjectMethod('freeze', 1); -wrapObjectMethod('seal', 1); -wrapObjectMethod('preventExtensions', 1); -wrapObjectMethod('isFrozen', 2); -wrapObjectMethod('isSealed', 2); -wrapObjectMethod('isExtensible', 3); -wrapObjectMethod('getOwnPropertyDescriptor', 4); -wrapObjectMethod('getPrototypeOf', 5); -wrapObjectMethod('keys'); -wrapObjectMethod('getOwnPropertyNames'); -},{"./$":223,"./$.def":219}],266:[function(require,module,exports){ -'use strict'; -// 19.1.3.6 Object.prototype.toString() -var $ = require('./$') - , cof = require('./$.cof') - , tmp = {}; -tmp[require('./$.wks')('toStringTag')] = 'z'; -if($.FW && cof(tmp) != 'z')$.hide(Object.prototype, 'toString', function(){ - return '[object ' + cof.classof(this) + ']'; -}); -},{"./$":223,"./$.cof":214,"./$.wks":234}],267:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , ctx = require('./$.ctx') - , cof = require('./$.cof') - , $def = require('./$.def') - , assert = require('./$.assert') - , $iter = require('./$.iter') - , SPECIES = require('./$.wks')('species') - , RECORD = require('./$.uid').safe('record') - , forOf = $iter.forOf - , PROMISE = 'Promise' - , global = $.g - , process = global.process - , asap = process && process.nextTick || require('./$.task').set - , Promise = global[PROMISE] - , Base = Promise - , isFunction = $.isFunction - , isObject = $.isObject - , assertFunction = assert.fn - , assertObject = assert.obj - , test; -function getConstructor(C){ - var S = assertObject(C)[SPECIES]; - return S != undefined ? S : C; -} -isFunction(Promise) && isFunction(Promise.resolve) -&& Promise.resolve(test = new Promise(function(){})) == test -|| function(){ - function isThenable(it){ - var then; - if(isObject(it))then = it.then; - return isFunction(then) ? then : false; - } - function handledRejectionOrHasOnRejected(promise){ - var record = promise[RECORD] - , chain = record.c - , i = 0 - , react; - if(record.h)return true; - while(chain.length > i){ - react = chain[i++]; - if(react.fail || handledRejectionOrHasOnRejected(react.P))return true; - } - } - function notify(record, isReject){ - var chain = record.c; - if(isReject || chain.length)asap(function(){ - var promise = record.p - , value = record.v - , ok = record.s == 1 - , i = 0; - if(isReject && !handledRejectionOrHasOnRejected(promise)){ - setTimeout(function(){ - if(!handledRejectionOrHasOnRejected(promise)){ - if(cof(process) == 'process'){ - process.emit('unhandledRejection', value, promise); - } else if(global.console && isFunction(console.error)){ - console.error('Unhandled promise rejection', value); - } - } - }, 1e3); - } else while(chain.length > i)!function(react){ - var cb = ok ? react.ok : react.fail - , ret, then; - try { - if(cb){ - if(!ok)record.h = true; - ret = cb === true ? value : cb(value); - if(ret === react.P){ - react.rej(TypeError(PROMISE + '-chain cycle')); - } else if(then = isThenable(ret)){ - then.call(ret, react.res, react.rej); - } else react.res(ret); - } else react.rej(value); - } catch(err){ - react.rej(err); - } - }(chain[i++]); - chain.length = 0; - }); - } - function reject(value){ - var record = this; - if(record.d)return; - record.d = true; - record = record.r || record; // unwrap - record.v = value; - record.s = 2; - notify(record, true); - } - function resolve(value){ - var record = this - , then, wrapper; - if(record.d)return; - record.d = true; - record = record.r || record; // unwrap - try { - if(then = isThenable(value)){ - wrapper = {r: record, d: false}; // wrap - then.call(value, ctx(resolve, wrapper, 1), ctx(reject, wrapper, 1)); - } else { - record.v = value; - record.s = 1; - notify(record); - } - } catch(err){ - reject.call(wrapper || {r: record, d: false}, err); // wrap - } - } - // 25.4.3.1 Promise(executor) - Promise = function(executor){ - assertFunction(executor); - var record = { - p: assert.inst(this, Promise, PROMISE), // <- promise - c: [], // <- chain - s: 0, // <- state - d: false, // <- done - v: undefined, // <- value - h: false // <- handled rejection - }; - $.hide(this, RECORD, record); - try { - executor(ctx(resolve, record, 1), ctx(reject, record, 1)); - } catch(err){ - reject.call(record, err); - } - }; - $.mix(Promise.prototype, { - // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) - then: function(onFulfilled, onRejected){ - var S = assertObject(assertObject(this).constructor)[SPECIES]; - var react = { - ok: isFunction(onFulfilled) ? onFulfilled : true, - fail: isFunction(onRejected) ? onRejected : false - }; - var P = react.P = new (S != undefined ? S : Promise)(function(res, rej){ - react.res = assertFunction(res); - react.rej = assertFunction(rej); - }); - var record = this[RECORD]; - record.c.push(react); - record.s && notify(record); - return P; - }, - // 25.4.5.1 Promise.prototype.catch(onRejected) - 'catch': function(onRejected){ - return this.then(undefined, onRejected); - } - }); -}(); -$def($def.G + $def.W + $def.F * (Promise != Base), {Promise: Promise}); -$def($def.S, PROMISE, { - // 25.4.4.5 Promise.reject(r) - reject: function(r){ - return new (getConstructor(this))(function(res, rej){ - rej(r); - }); - }, - // 25.4.4.6 Promise.resolve(x) - resolve: function(x){ - return isObject(x) && RECORD in x && $.getProto(x) === this.prototype - ? x : new (getConstructor(this))(function(res){ - res(x); - }); - } -}); -$def($def.S + $def.F * ($iter.fail(function(iter){ - Promise.all(iter)['catch'](function(){}); -}) || $iter.DANGER_CLOSING), PROMISE, { - // 25.4.4.1 Promise.all(iterable) - all: function(iterable){ - var C = getConstructor(this) - , values = []; - return new C(function(resolve, reject){ - forOf(iterable, false, values.push, values); - var remaining = values.length - , results = Array(remaining); - if(remaining)$.each.call(values, function(promise, index){ - C.resolve(promise).then(function(value){ - results[index] = value; - --remaining || resolve(results); - }, reject); - }); - else resolve(results); - }); - }, - // 25.4.4.4 Promise.race(iterable) - race: function(iterable){ - var C = getConstructor(this); - return new C(function(resolve, reject){ - forOf(iterable, false, function(promise){ - C.resolve(promise).then(resolve, reject); - }); - }); - } -}); -cof.set(Promise, PROMISE); -require('./$.species')(Promise); -},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.species":229,"./$.task":231,"./$.uid":232,"./$.wks":234}],268:[function(require,module,exports){ -var $ = require('./$') - , $def = require('./$.def') - , setProto = require('./$.set-proto') - , $iter = require('./$.iter') - , ITER = require('./$.uid').safe('iter') - , step = $iter.step - , assert = require('./$.assert') - , isObject = $.isObject - , getDesc = $.getDesc - , setDesc = $.setDesc - , getProto = $.getProto - , apply = Function.apply - , assertObject = assert.obj - , isExtensible = Object.isExtensible || $.it; -function Enumerate(iterated){ - var keys = [], key; - for(key in iterated)keys.push(key); - $.set(this, ITER, {o: iterated, a: keys, i: 0}); -} -$iter.create(Enumerate, 'Object', function(){ - var iter = this[ITER] - , keys = iter.a - , key; - do { - if(iter.i >= keys.length)return step(1); - } while(!((key = keys[iter.i++]) in iter.o)); - return step(0, key); -}); - -function wrap(fn){ - return function(it){ - assertObject(it); - try { - fn.apply(undefined, arguments); - return true; - } catch(e){ - return false; - } - }; -} - -function reflectGet(target, propertyKey/*, receiver*/){ - var receiver = arguments.length < 3 ? target : arguments[2] - , desc = getDesc(assertObject(target), propertyKey), proto; - if(desc)return $.has(desc, 'value') - ? desc.value - : desc.get === undefined - ? undefined - : desc.get.call(receiver); - return isObject(proto = getProto(target)) - ? reflectGet(proto, propertyKey, receiver) - : undefined; -} -function reflectSet(target, propertyKey, V/*, receiver*/){ - var receiver = arguments.length < 4 ? target : arguments[3] - , ownDesc = getDesc(assertObject(target), propertyKey) - , existingDescriptor, proto; - if(!ownDesc){ - if(isObject(proto = getProto(target))){ - return reflectSet(proto, propertyKey, V, receiver); - } - ownDesc = $.desc(0); - } - if($.has(ownDesc, 'value')){ - if(ownDesc.writable === false || !isObject(receiver))return false; - existingDescriptor = getDesc(receiver, propertyKey) || $.desc(0); - existingDescriptor.value = V; - setDesc(receiver, propertyKey, existingDescriptor); - return true; - } - return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); -} - -var reflect = { - // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) - apply: require('./$.ctx')(Function.call, apply, 3), - // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) - construct: function(target, argumentsList /*, newTarget*/){ - var proto = assert.fn(arguments.length < 3 ? target : arguments[2]).prototype - , instance = $.create(isObject(proto) ? proto : Object.prototype) - , result = apply.call(target, instance, argumentsList); - return isObject(result) ? result : instance; - }, - // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) - defineProperty: wrap(setDesc), - // 26.1.4 Reflect.deleteProperty(target, propertyKey) - deleteProperty: function(target, propertyKey){ - var desc = getDesc(assertObject(target), propertyKey); - return desc && !desc.configurable ? false : delete target[propertyKey]; - }, - // 26.1.5 Reflect.enumerate(target) - enumerate: function(target){ - return new Enumerate(assertObject(target)); - }, - // 26.1.6 Reflect.get(target, propertyKey [, receiver]) - get: reflectGet, - // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) - getOwnPropertyDescriptor: function(target, propertyKey){ - return getDesc(assertObject(target), propertyKey); - }, - // 26.1.8 Reflect.getPrototypeOf(target) - getPrototypeOf: function(target){ - return getProto(assertObject(target)); - }, - // 26.1.9 Reflect.has(target, propertyKey) - has: function(target, propertyKey){ - return propertyKey in target; - }, - // 26.1.10 Reflect.isExtensible(target) - isExtensible: function(target){ - return !!isExtensible(assertObject(target)); - }, - // 26.1.11 Reflect.ownKeys(target) - ownKeys: require('./$.own-keys'), - // 26.1.12 Reflect.preventExtensions(target) - preventExtensions: wrap(Object.preventExtensions || $.it), - // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) - set: reflectSet -}; -// 26.1.14 Reflect.setPrototypeOf(target, proto) -if(setProto)reflect.setPrototypeOf = function(target, proto){ - setProto(assertObject(target), proto); - return true; -}; - -$def($def.G, {Reflect: {}}); -$def($def.S, 'Reflect', reflect); -},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.own-keys":225,"./$.set-proto":228,"./$.uid":232}],269:[function(require,module,exports){ -var $ = require('./$') - , cof = require('./$.cof') - , RegExp = $.g.RegExp - , Base = RegExp - , proto = RegExp.prototype; -if($.FW && $.DESC){ - // RegExp allows a regex with flags as the pattern - if(!function(){try{ return RegExp(/a/g, 'i') == '/a/i'; }catch(e){ /* empty */ }}()){ - RegExp = function RegExp(pattern, flags){ - return new Base(cof(pattern) == 'RegExp' && flags !== undefined - ? pattern.source : pattern, flags); - }; - $.each.call($.getNames(Base), function(key){ - key in RegExp || $.setDesc(RegExp, key, { - configurable: true, - get: function(){ return Base[key]; }, - set: function(it){ Base[key] = it; } - }); - }); - proto.constructor = RegExp; - RegExp.prototype = proto; - $.hide($.g, 'RegExp', RegExp); - } - // 21.2.5.3 get RegExp.prototype.flags() - if(/./g.flags != 'g')$.setDesc(proto, 'flags', { - configurable: true, - get: require('./$.replacer')(/^.*\/(\w*)$/, '$1') - }); -} -require('./$.species')(RegExp); -},{"./$":223,"./$.cof":214,"./$.replacer":227,"./$.species":229}],270:[function(require,module,exports){ -'use strict'; -var strong = require('./$.collection-strong'); - -// 23.2 Set Objects -require('./$.collection')('Set', { - // 23.2.3.1 Set.prototype.add(value) - add: function(value){ - return strong.def(this, value = value === 0 ? 0 : value, value); - } -}, strong); -},{"./$.collection":217,"./$.collection-strong":215}],271:[function(require,module,exports){ -var $def = require('./$.def'); -$def($def.P, 'String', { - // 21.1.3.3 String.prototype.codePointAt(pos) - codePointAt: require('./$.string-at')(false) -}); -},{"./$.def":219,"./$.string-at":230}],272:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , cof = require('./$.cof') - , $def = require('./$.def') - , toLength = $.toLength; - -$def($def.P, 'String', { - // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) - endsWith: function(searchString /*, endPosition = @length */){ - if(cof(searchString) == 'RegExp')throw TypeError(); - var that = String($.assertDefined(this)) - , endPosition = arguments[1] - , len = toLength(that.length) - , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); - searchString += ''; - return that.slice(end - searchString.length, end) === searchString; - } -}); -},{"./$":223,"./$.cof":214,"./$.def":219}],273:[function(require,module,exports){ -var $def = require('./$.def') - , toIndex = require('./$').toIndex - , fromCharCode = String.fromCharCode; - -$def($def.S, 'String', { - // 21.1.2.2 String.fromCodePoint(...codePoints) - fromCodePoint: function(x){ // eslint-disable-line no-unused-vars - var res = [] - , len = arguments.length - , i = 0 - , code; - while(len > i){ - code = +arguments[i++]; - if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); - res.push(code < 0x10000 - ? fromCharCode(code) - : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) - ); - } return res.join(''); - } -}); -},{"./$":223,"./$.def":219}],274:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , cof = require('./$.cof') - , $def = require('./$.def'); - -$def($def.P, 'String', { - // 21.1.3.7 String.prototype.includes(searchString, position = 0) - includes: function(searchString /*, position = 0 */){ - if(cof(searchString) == 'RegExp')throw TypeError(); - return !!~String($.assertDefined(this)).indexOf(searchString, arguments[1]); - } -}); -},{"./$":223,"./$.cof":214,"./$.def":219}],275:[function(require,module,exports){ -var set = require('./$').set - , at = require('./$.string-at')(true) - , ITER = require('./$.uid').safe('iter') - , $iter = require('./$.iter') - , step = $iter.step; - -// 21.1.3.27 String.prototype[@@iterator]() -$iter.std(String, 'String', function(iterated){ - set(this, ITER, {o: String(iterated), i: 0}); -// 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function(){ - var iter = this[ITER] - , O = iter.o - , index = iter.i - , point; - if(index >= O.length)return step(1); - point = at.call(O, index); - iter.i += point.length; - return step(0, point); -}); -},{"./$":223,"./$.iter":222,"./$.string-at":230,"./$.uid":232}],276:[function(require,module,exports){ -var $ = require('./$') - , $def = require('./$.def'); - -$def($def.S, 'String', { - // 21.1.2.4 String.raw(callSite, ...substitutions) - raw: function(callSite){ - var raw = $.toObject(callSite.raw) - , len = $.toLength(raw.length) - , sln = arguments.length - , res = [] - , i = 0; - while(len > i){ - res.push(String(raw[i++])); - if(i < sln)res.push(String(arguments[i])); - } return res.join(''); - } -}); -},{"./$":223,"./$.def":219}],277:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , $def = require('./$.def'); - -$def($def.P, 'String', { - // 21.1.3.13 String.prototype.repeat(count) - repeat: function(count){ - var str = String($.assertDefined(this)) - , res = '' - , n = $.toInteger(count); - if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); - for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; - return res; - } -}); -},{"./$":223,"./$.def":219}],278:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , cof = require('./$.cof') - , $def = require('./$.def'); - -$def($def.P, 'String', { - // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) - startsWith: function(searchString /*, position = 0 */){ - if(cof(searchString) == 'RegExp')throw TypeError(); - var that = String($.assertDefined(this)) - , index = $.toLength(Math.min(arguments[1], that.length)); - searchString += ''; - return that.slice(index, index + searchString.length) === searchString; - } -}); -},{"./$":223,"./$.cof":214,"./$.def":219}],279:[function(require,module,exports){ -'use strict'; -// ECMAScript 6 symbols shim -var $ = require('./$') - , setTag = require('./$.cof').set - , uid = require('./$.uid') - , $def = require('./$.def') - , keyOf = require('./$.keyof') - , has = $.has - , hide = $.hide - , getNames = $.getNames - , toObject = $.toObject - , Symbol = $.g.Symbol - , Base = Symbol - , setter = false - , TAG = uid.safe('tag') - , SymbolRegistry = {} - , AllSymbols = {}; - -function wrap(tag){ - var sym = AllSymbols[tag] = $.set($.create(Symbol.prototype), TAG, tag); - $.DESC && setter && $.setDesc(Object.prototype, tag, { - configurable: true, - set: function(value){ - hide(this, tag, value); - } - }); - return sym; -} - -// 19.4.1.1 Symbol([description]) -if(!$.isFunction(Symbol)){ - Symbol = function(description){ - if(this instanceof Symbol)throw TypeError('Symbol is not a constructor'); - return wrap(uid(description)); - }; - hide(Symbol.prototype, 'toString', function(){ - return this[TAG]; - }); -} -$def($def.G + $def.W, {Symbol: Symbol}); - -var symbolStatics = { - // 19.4.2.1 Symbol.for(key) - 'for': function(key){ - return has(SymbolRegistry, key += '') - ? SymbolRegistry[key] - : SymbolRegistry[key] = Symbol(key); - }, - // 19.4.2.5 Symbol.keyFor(sym) - keyFor: function(key){ - return keyOf(SymbolRegistry, key); - }, - pure: uid.safe, - set: $.set, - useSetter: function(){ setter = true; }, - useSimple: function(){ setter = false; } -}; -// 19.4.2.2 Symbol.hasInstance -// 19.4.2.3 Symbol.isConcatSpreadable -// 19.4.2.4 Symbol.iterator -// 19.4.2.6 Symbol.match -// 19.4.2.8 Symbol.replace -// 19.4.2.9 Symbol.search -// 19.4.2.10 Symbol.species -// 19.4.2.11 Symbol.split -// 19.4.2.12 Symbol.toPrimitive -// 19.4.2.13 Symbol.toStringTag -// 19.4.2.14 Symbol.unscopables -$.each.call(( - 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' + - 'species,split,toPrimitive,toStringTag,unscopables' - ).split(','), function(it){ - var sym = require('./$.wks')(it); - symbolStatics[it] = Symbol === Base ? sym : wrap(sym); - } -); - -setter = true; - -$def($def.S, 'Symbol', symbolStatics); - -$def($def.S + $def.F * (Symbol != Base), 'Object', { - // 19.1.2.7 Object.getOwnPropertyNames(O) - getOwnPropertyNames: function(it){ - var names = getNames(toObject(it)), result = [], key, i = 0; - while(names.length > i)has(AllSymbols, key = names[i++]) || result.push(key); - return result; - }, - // 19.1.2.8 Object.getOwnPropertySymbols(O) - getOwnPropertySymbols: function(it){ - var names = getNames(toObject(it)), result = [], key, i = 0; - while(names.length > i)has(AllSymbols, key = names[i++]) && result.push(AllSymbols[key]); - return result; - } -}); - -setTag(Symbol, 'Symbol'); -// 20.2.1.9 Math[@@toStringTag] -setTag(Math, 'Math', true); -// 24.3.3 JSON[@@toStringTag] -setTag($.g.JSON, 'JSON', true); -},{"./$":223,"./$.cof":214,"./$.def":219,"./$.keyof":224,"./$.uid":232,"./$.wks":234}],280:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , weak = require('./$.collection-weak') - , leakStore = weak.leakStore - , ID = weak.ID - , WEAK = weak.WEAK - , has = $.has - , isObject = $.isObject - , isFrozen = Object.isFrozen || $.core.Object.isFrozen - , tmp = {}; - -// 23.3 WeakMap Objects -var WeakMap = require('./$.collection')('WeakMap', { - // 23.3.3.3 WeakMap.prototype.get(key) - get: function(key){ - if(isObject(key)){ - if(isFrozen(key))return leakStore(this).get(key); - if(has(key, WEAK))return key[WEAK][this[ID]]; - } - }, - // 23.3.3.5 WeakMap.prototype.set(key, value) - set: function(key, value){ - return weak.def(this, key, value); - } -}, weak, true, true); - -// IE11 WeakMap frozen keys fix -if($.FW && new WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ - $.each.call(['delete', 'has', 'get', 'set'], function(key){ - var method = WeakMap.prototype[key]; - WeakMap.prototype[key] = function(a, b){ - // store frozen objects on leaky map - if(isObject(a) && isFrozen(a)){ - var result = leakStore(this)[key](a, b); - return key == 'set' ? this : result; - // store all the rest on native weakmap - } return method.call(this, a, b); - }; - }); -} -},{"./$":223,"./$.collection":217,"./$.collection-weak":216}],281:[function(require,module,exports){ -'use strict'; -var weak = require('./$.collection-weak'); - -// 23.4 WeakSet Objects -require('./$.collection')('WeakSet', { - // 23.4.3.1 WeakSet.prototype.add(value) - add: function(value){ - return weak.def(this, value, true); - } -}, weak, false, true); -},{"./$.collection":217,"./$.collection-weak":216}],282:[function(require,module,exports){ -// https://github.com/domenic/Array.prototype.includes -var $def = require('./$.def'); -$def($def.P, 'Array', { - includes: require('./$.array-includes')(true) -}); -require('./$.unscope')('includes'); -},{"./$.array-includes":210,"./$.def":219,"./$.unscope":233}],283:[function(require,module,exports){ -// https://gist.github.com/WebReflection/9353781 -var $ = require('./$') - , $def = require('./$.def') - , ownKeys = require('./$.own-keys'); - -$def($def.S, 'Object', { - getOwnPropertyDescriptors: function(object){ - var O = $.toObject(object) - , result = {}; - $.each.call(ownKeys(O), function(key){ - $.setDesc(result, key, $.desc(0, $.getDesc(O, key))); - }); - return result; - } -}); -},{"./$":223,"./$.def":219,"./$.own-keys":225}],284:[function(require,module,exports){ -// http://goo.gl/XkBrjD -var $ = require('./$') - , $def = require('./$.def'); -function createObjectToArray(isEntries){ - return function(object){ - var O = $.toObject(object) - , keys = $.getKeys(object) - , length = keys.length - , i = 0 - , result = Array(length) - , key; - if(isEntries)while(length > i)result[i] = [key = keys[i++], O[key]]; - else while(length > i)result[i] = O[keys[i++]]; - return result; - }; -} -$def($def.S, 'Object', { - values: createObjectToArray(false), - entries: createObjectToArray(true) -}); -},{"./$":223,"./$.def":219}],285:[function(require,module,exports){ -// https://gist.github.com/kangax/9698100 -var $def = require('./$.def'); -$def($def.S, 'RegExp', { - escape: require('./$.replacer')(/([\\\-[\]{}()*+?.,^$|])/g, '\\$1', true) -}); -},{"./$.def":219,"./$.replacer":227}],286:[function(require,module,exports){ -// https://github.com/mathiasbynens/String.prototype.at -var $def = require('./$.def'); -$def($def.P, 'String', { - at: require('./$.string-at')(true) -}); -},{"./$.def":219,"./$.string-at":230}],287:[function(require,module,exports){ -// JavaScript 1.6 / Strawman array statics shim -var $ = require('./$') - , $def = require('./$.def') - , core = $.core - , statics = {}; -function setStatics(keys, length){ - $.each.call(keys.split(','), function(key){ - if(length == undefined && key in core.Array)statics[key] = core.Array[key]; - else if(key in [])statics[key] = require('./$.ctx')(Function.call, [][key], length); - }); -} -setStatics('pop,reverse,shift,keys,values,entries', 1); -setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3); -setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' + - 'reduce,reduceRight,copyWithin,fill,turn'); -$def($def.S, 'Array', statics); -},{"./$":223,"./$.ctx":218,"./$.def":219}],288:[function(require,module,exports){ -require('./es6.array.iterator'); -var $ = require('./$') - , Iterators = require('./$.iter').Iterators - , ITERATOR = require('./$.wks')('iterator') - , NodeList = $.g.NodeList; -if($.FW && NodeList && !(ITERATOR in NodeList.prototype)){ - $.hide(NodeList.prototype, ITERATOR, Iterators.Array); -} -Iterators.NodeList = Iterators.Array; -},{"./$":223,"./$.iter":222,"./$.wks":234,"./es6.array.iterator":254}],289:[function(require,module,exports){ -var $def = require('./$.def') - , $task = require('./$.task'); -$def($def.G + $def.B, { - setImmediate: $task.set, - clearImmediate: $task.clear -}); -},{"./$.def":219,"./$.task":231}],290:[function(require,module,exports){ -// ie9- setTimeout & setInterval additional parameters fix -var $ = require('./$') - , $def = require('./$.def') - , invoke = require('./$.invoke') - , partial = require('./$.partial') - , MSIE = !!$.g.navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check -function wrap(set){ - return MSIE ? function(fn, time /*, ...args */){ - return set(invoke( - partial, - [].slice.call(arguments, 2), - $.isFunction(fn) ? fn : Function(fn) - ), time); - } : set; -} -$def($def.G + $def.B + $def.F * MSIE, { - setTimeout: wrap($.g.setTimeout), - setInterval: wrap($.g.setInterval) -}); -},{"./$":223,"./$.def":219,"./$.invoke":221,"./$.partial":226}],291:[function(require,module,exports){ -require('./modules/es5'); -require('./modules/es6.symbol'); -require('./modules/es6.object.assign'); -require('./modules/es6.object.is'); -require('./modules/es6.object.set-prototype-of'); -require('./modules/es6.object.to-string'); -require('./modules/es6.object.statics-accept-primitives'); -require('./modules/es6.function.name'); -require('./modules/es6.number.constructor'); -require('./modules/es6.number.statics'); -require('./modules/es6.math'); -require('./modules/es6.string.from-code-point'); -require('./modules/es6.string.raw'); -require('./modules/es6.string.iterator'); -require('./modules/es6.string.code-point-at'); -require('./modules/es6.string.ends-with'); -require('./modules/es6.string.includes'); -require('./modules/es6.string.repeat'); -require('./modules/es6.string.starts-with'); -require('./modules/es6.array.from'); -require('./modules/es6.array.of'); -require('./modules/es6.array.iterator'); -require('./modules/es6.array.species'); -require('./modules/es6.array.copy-within'); -require('./modules/es6.array.fill'); -require('./modules/es6.array.find'); -require('./modules/es6.array.find-index'); -require('./modules/es6.regexp'); -require('./modules/es6.promise'); -require('./modules/es6.map'); -require('./modules/es6.set'); -require('./modules/es6.weak-map'); -require('./modules/es6.weak-set'); -require('./modules/es6.reflect'); -require('./modules/es7.array.includes'); -require('./modules/es7.string.at'); -require('./modules/es7.regexp.escape'); -require('./modules/es7.object.get-own-property-descriptors'); -require('./modules/es7.object.to-array'); -require('./modules/js.array.statics'); -require('./modules/web.timers'); -require('./modules/web.immediate'); -require('./modules/web.dom.iterable'); -module.exports = require('./modules/$').core; -},{"./modules/$":223,"./modules/es5":248,"./modules/es6.array.copy-within":249,"./modules/es6.array.fill":250,"./modules/es6.array.find":252,"./modules/es6.array.find-index":251,"./modules/es6.array.from":253,"./modules/es6.array.iterator":254,"./modules/es6.array.of":255,"./modules/es6.array.species":256,"./modules/es6.function.name":257,"./modules/es6.map":258,"./modules/es6.math":259,"./modules/es6.number.constructor":260,"./modules/es6.number.statics":261,"./modules/es6.object.assign":262,"./modules/es6.object.is":263,"./modules/es6.object.set-prototype-of":264,"./modules/es6.object.statics-accept-primitives":265,"./modules/es6.object.to-string":266,"./modules/es6.promise":267,"./modules/es6.reflect":268,"./modules/es6.regexp":269,"./modules/es6.set":270,"./modules/es6.string.code-point-at":271,"./modules/es6.string.ends-with":272,"./modules/es6.string.from-code-point":273,"./modules/es6.string.includes":274,"./modules/es6.string.iterator":275,"./modules/es6.string.raw":276,"./modules/es6.string.repeat":277,"./modules/es6.string.starts-with":278,"./modules/es6.symbol":279,"./modules/es6.weak-map":280,"./modules/es6.weak-set":281,"./modules/es7.array.includes":282,"./modules/es7.object.get-own-property-descriptors":283,"./modules/es7.object.to-array":284,"./modules/es7.regexp.escape":285,"./modules/es7.string.at":286,"./modules/js.array.statics":287,"./modules/web.dom.iterable":288,"./modules/web.immediate":289,"./modules/web.timers":290}],292:[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); - } + var create = (function() { + function hasOwnEnumerableProps(obj) { + for (var prop in obj) { + if (hasOwnProperty.call(obj, prop)) { + return true; + } + } + return false; + } - // 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--; + // FF <= 3.6: + // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true + // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false + function hasOwnPollutedProps(obj) { + return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__"); } - 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 useObjectCreate = false; + if (typeof Object.create === "function") { + if (!hasOwnEnumerableProps(Object.create(null))) { + useObjectCreate = true; + } + } + if (useObjectCreate === false) { + if (hasOwnEnumerableProps({})) { + throw new Error("StringSet environment error 0, please file a bug at https://github.com/olov/stringset/issues"); + } + } + // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims) - var fn = exports.enabled(namespace) ? enabled : disabled; + var o = (useObjectCreate ? Object.create(null) : {}); + var useProtoClear = false; + if (hasOwnPollutedProps(o)) { + o.__proto__ = null; + if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) { + throw new Error("StringSet environment error 1, please file a bug at https://github.com/olov/stringset/issues"); + } + useProtoClear = true; + } + // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims) - fn.namespace = namespace; + return function() { + var o = (useObjectCreate ? Object.create(null) : {}); + if (useProtoClear) { + o.__proto__ = null; + } + return o; + }; + })(); - return fn; -} + // stringset ctor + function stringset(optional_array) { + // use with or without new + if (!(this instanceof stringset)) { + return new stringset(optional_array); + } + this.obj = create(); + this.hasProto = false; // false (no __proto__ item) or true (has __proto__ item) -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ + if (optional_array) { + this.addMany(optional_array); + } + }; -function enable(namespaces) { - exports.save(namespaces); + // primitive methods that deals with data representation + stringset.prototype.has = function(item) { + // The type-check of item in has, get, set and delete is important because otherwise an object + // {toString: function() { return "__proto__"; }} can avoid the item === "__proto__" test. + // The alternative to type-checking would be to force string conversion, i.e. item = String(item); + if (typeof item !== "string") { + throw new Error("StringSet expected string item"); + } + return (item === "__proto__" ? + this.hasProto : + hasOwnProperty.call(this.obj, item)); + }; - var split = (namespaces || '').split(/[\s,]+/); - var len = split.length; + stringset.prototype.add = function(item) { + if (typeof item !== "string") { + throw new Error("StringSet expected string item"); + } + if (item === "__proto__") { + this.hasProto = true; + } else { + this.obj[item] = true; + } + }; - 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 + '$')); - } - } -} + stringset.prototype.remove = function(item) { + if (typeof item !== "string") { + throw new Error("StringSet expected string item"); + } + var didExist = this.has(item); + if (item === "__proto__") { + this.hasProto = false; + } else { + delete this.obj[item]; + } + return didExist; + }; -/** - * Disable debug output. - * - * @api public - */ + // alias remove to delete but beware: + // ss.delete("key"); // OK in ES5 and later + // ss['delete']("key"); // OK in all ES versions + // ss.remove("key"); // OK in all ES versions + stringset.prototype['delete'] = stringset.prototype.remove; -function disable() { - exports.enable(''); -} + stringset.prototype.isEmpty = function() { + for (var item in this.obj) { + if (hasOwnProperty.call(this.obj, item)) { + return false; + } + } + return !this.hasProto; + }; -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ + stringset.prototype.size = function() { + var len = 0; + for (var item in this.obj) { + if (hasOwnProperty.call(this.obj, item)) { + ++len; + } + } + return (this.hasProto ? len + 1 : len); + }; + + stringset.prototype.items = function() { + var items = []; + for (var item in this.obj) { + if (hasOwnProperty.call(this.obj, item)) { + items.push(item); + } + } + if (this.hasProto) { + items.push("__proto__"); + } + return items; + }; -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":294}],293:[function(require,module,exports){ -(function (process){ - -/** - * Module dependencies. - */ - -var tty = require('tty'); -var util = require('util'); - -/** - * This is the Node.js 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; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -/** - * The file descriptor to write the `debug()` calls to. - * Set the `DEBUG_FD` env variable to override with another value. i.e.: - * - * $ DEBUG_FD=3 node script.js 3>debug.log - */ - -var fd = parseInt(process.env.DEBUG_FD, 10) || 2; -var stream = 1 === fd ? process.stdout : - 2 === fd ? process.stderr : - createWritableStdioStream(fd); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase(); - if (0 === debugColors.length) { - return tty.isatty(fd); - } else { - return '0' !== debugColors - && 'no' !== debugColors - && 'false' !== debugColors - && 'disabled' !== debugColors; - } -} - -/** - * Map %o to `util.inspect()`, since Node doesn't do that out of the box. - */ - -var inspect = (4 === util.inspect.length ? - // node <= 0.8.x - function (v, colors) { - return util.inspect(v, void 0, void 0, colors); - } : - // node > 0.8.x - function (v, colors) { - return util.inspect(v, { colors: colors }); - } -); - -exports.formatters.o = function(v) { - return inspect(v, this.useColors) - .replace(/\s*\n\s*/g, ' '); -}; - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs() { - var args = arguments; - var useColors = this.useColors; - var name = this.namespace; - - if (useColors) { - var c = this.color; - - args[0] = ' \u001b[3' + c + ';1m' + name + ' ' - + '\u001b[0m' - + args[0] + '\u001b[3' + c + 'm' - + ' +' + exports.humanize(this.diff) + '\u001b[0m'; - } else { - args[0] = new Date().toUTCString() - + ' ' + name + ' ' + args[0]; - } - return args; -} - -/** - * Invokes `console.error()` with the specified arguments. - */ - -function log() { - return stream.write(util.format.apply(this, arguments) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } -} -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ + // methods that rely on the above primitives + stringset.prototype.addMany = function(items) { + if (!Array.isArray(items)) { + throw new Error("StringSet expected array"); + } + for (var i = 0; i < items.length; i++) { + this.add(items[i]); + } + return this; + }; -function load() { - return process.env.DEBUG; -} + stringset.prototype.merge = function(other) { + this.addMany(other.items()); + return this; + }; -/** - * Copied from `node/src/node.js`. - * - * XXX: It's lame that node doesn't expose this API out-of-the-box. It also - * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. - */ + stringset.prototype.clone = function() { + var other = stringset(); + return other.merge(this); + }; -function createWritableStdioStream (fd) { - var stream; - var tty_wrap = process.binding('tty_wrap'); + stringset.prototype.toString = function() { + return "{" + this.items().map(JSON.stringify).join(",") + "}"; + }; - // Note stream._type is used for test-module-load-list.js + return stringset; + })(); - switch (tty_wrap.guessHandleType(fd)) { - case 'TTY': - stream = new tty.WriteStream(fd); - stream._type = 'tty'; + if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = StringSet; + } + +},{}],470:[function(require,module,exports){ + var assert = require("assert"); + var types = require("./types"); + var n = types.namedTypes; + var isArray = types.builtInTypes.array; + var isObject = types.builtInTypes.object; + var linesModule = require("./lines"); + var fromString = linesModule.fromString; + var Lines = linesModule.Lines; + var concat = linesModule.concat; + var util = require("./util"); + var comparePos = util.comparePos; + var childNodesCacheKey = require("private").makeUniqueKey(); + +// TODO Move a non-caching implementation of this function into ast-types, +// and implement a caching wrapper function here. + function getSortedChildNodes(node, resultArray) { + if (!node) { + return; + } - // Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); + // The .loc checks below are sensitive to some of the problems that + // are fixed by this utility function. Specifically, if it decides to + // set node.loc to null, indicating that the node's .loc information + // is unreliable, then we don't want to add node to the resultArray. + util.fixFaultyLocations(node); + + if (resultArray) { + if (n.Node.check(node) && + n.SourceLocation.check(node.loc)) { + // This reverse insertion sort almost always takes constant + // time because we almost always (maybe always?) append the + // nodes in order anyway. + for (var i = resultArray.length - 1; i >= 0; --i) { + if (comparePos(resultArray[i].loc.end, + node.loc.start) <= 0) { + break; + } + } + resultArray.splice(i + 1, 0, node); + return; } - break; + } else if (node[childNodesCacheKey]) { + return node[childNodesCacheKey]; + } - case 'FILE': - var fs = require('fs'); - stream = new fs.SyncWriteStream(fd, { autoClose: false }); - stream._type = 'fs'; - break; + var names; + if (isArray.check(node)) { + names = Object.keys(node); + } else if (isObject.check(node)) { + names = types.getFieldNames(node); + } else { + return; + } - case 'PIPE': - case 'TCP': - var net = require('net'); - stream = new net.Socket({ - fd: fd, - readable: false, - writable: true + if (!resultArray) { + Object.defineProperty(node, childNodesCacheKey, { + value: resultArray = [], + enumerable: false }); + } - // FIXME Should probably have an option in net.Socket to create a - // stream from an existing fd which is writable only. But for now - // we'll just add this hack and set the `readable` member to false. - // Test: ./node test/fixtures/echo.js < /etc/passwd - stream.readable = false; - stream.read = null; - stream._type = 'pipe'; - - // FIXME Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; + for (var i = 0, nameCount = names.length; i < nameCount; ++i) { + getSortedChildNodes(node[names[i]], resultArray); + } - default: - // Probably an error on in uv_guess_handle() - throw new Error('Implement me. Unknown stream file type!'); - } - - // For supporting legacy API we put the FD here. - stream.fd = fd; - - stream._isStdio = true; - - return stream; -} - -/** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - -exports.enable(load()); - -}).call(this,require('_process')) -},{"./debug":292,"_process":183,"fs":172,"net":172,"tty":197,"util":199}],294:[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) { - 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; + return resultArray; } -} - -/** - * 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'; -} - -},{}],295:[function(require,module,exports){ -'use strict'; -var repeating = require('repeating'); -// detect either spaces or tabs but not both to properly handle tabs -// for indentation and spaces for alignment -var INDENT_RE = /^(?:( )+|\t+)/; - -function getMostUsed(indents) { - var result = 0; - var maxUsed = 0; - var maxWeight = 0; - - for (var n in indents) { - var indent = indents[n]; - var u = indent[0]; - var w = indent[1]; - - if (u > maxUsed || u === maxUsed && w > maxWeight) { - maxUsed = u; - maxWeight = w; - result = +n; - } - } - - return result; -} - -module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - // used to see if tabs or spaces are the most used - var tabs = 0; - var spaces = 0; - - // remember the size of previous line's indentation - var prev = 0; - - // remember how many indents/unindents as occurred for a given size - // and how much lines follow a given indentation - // - // indents = { - // 3: [1, 0], - // 4: [1, 5], - // 5: [1, 0], - // 12: [1, 0], - // } - var indents = {}; - - // pointer to the array of last used indent - var current; - - // whether the last action was an indent (opposed to an unindent) - var isIndent; - - str.split(/\n/g).forEach(function (line) { - if (!line) { - // ignore empty lines - return; - } - - var indent; - var matches = line.match(INDENT_RE); - - if (!matches) { - indent = 0; - } else { - indent = matches[0].length; - - if (matches[1]) { - spaces++; - } else { - tabs++; - } - } - - var diff = indent - prev; - prev = indent; - - if (diff) { - // an indent or unindent has been detected - - isIndent = diff > 0; - - current = indents[isIndent ? diff : -diff]; - - if (current) { - current[0]++; - } else { - current = indents[diff] = [1, 0]; - } - } else if (current) { - // if the last action was an indent, increment the weight - current[1] += +isIndent; - } - }); - - var amount = getMostUsed(indents); - - var type; - var actual; - if (!amount) { - type = null; - actual = ''; - } else if (spaces >= tabs) { - type = 'space'; - actual = repeating(' ', amount); - } else { - type = 'tab'; - actual = repeating('\t', amount); - } - - return { - amount: amount, - type: type, - indent: actual - }; -}; - -},{"repeating":437}],296:[function(require,module,exports){ -/* - Copyright (C) 2012-2013 Yusuke Suzuki - Copyright (C) 2012 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*jslint vars:false, bitwise:true*/ -/*jshint indent:4*/ -/*global exports:true, define:true*/ -(function (root, factory) { - 'use strict'; +// As efficiently as possible, decorate the comment object with +// .precedingNode, .enclosingNode, and/or .followingNode properties, at +// least one of which is guaranteed to be defined. + function decorateComment(node, comment) { + var childNodes = getSortedChildNodes(node); - // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, - // and plain browser loading, - if (typeof define === 'function' && define.amd) { - define(['exports'], factory); - } else if (typeof exports !== 'undefined') { - factory(exports); - } else { - factory((root.estraverse = {})); - } -}(this, function clone(exports) { - 'use strict'; + // Time to dust off the old binary search robes and wizard hat. + var left = 0, right = childNodes.length; + while (left < right) { + var middle = (left + right) >> 1; + var child = childNodes[middle]; - var Syntax, - isArray, - VisitorOption, - VisitorKeys, - objectCreate, - objectKeys, - BREAK, - SKIP, - REMOVE; + if (comparePos(child.loc.start, comment.loc.start) <= 0 && + comparePos(comment.loc.end, child.loc.end) <= 0) { + // The comment is completely contained by this child node. + decorateComment(comment.enclosingNode = child, comment); + return; // Abandon the binary search at this level. + } - function ignoreJSHintError() { } + if (comparePos(child.loc.end, comment.loc.start) <= 0) { + // This child node falls completely before the comment. + // Because we will never consider this node or any nodes + // before it again, this node must be the closest preceding + // node we have encountered so far. + var precedingNode = child; + left = middle + 1; + continue; + } - isArray = Array.isArray; - if (!isArray) { - isArray = function isArray(array) { - return Object.prototype.toString.call(array) === '[object Array]'; - }; + if (comparePos(comment.loc.end, child.loc.start) <= 0) { + // This child node falls completely after the comment. + // Because we will never consider this node or any nodes after + // it again, this node must be the closest following node we + // have encountered so far. + var followingNode = child; + right = middle; + continue; + } + + throw new Error("Comment location overlaps with node location"); + } + + if (precedingNode) { + comment.precedingNode = precedingNode; } - 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; + if (followingNode) { + comment.followingNode = followingNode; } + } - function shallowCopy(obj) { - var ret = {}, key; - for (key in obj) { - if (obj.hasOwnProperty(key)) { - ret[key] = obj[key]; - } - } - return ret; + exports.attach = function(comments, ast, lines) { + if (!isArray.check(comments)) { + return; } - ignoreJSHintError(shallowCopy); - // based on LLVM libc++ upper_bound / lower_bound - // MIT License + var tiesToBreak = []; - function upperBound(array, func) { - var diff, len, i, current; + comments.forEach(function(comment) { + comment.loc.lines = lines; + decorateComment(ast, comment); - len = array.length; - i = 0; + var pn = comment.precedingNode; + var en = comment.enclosingNode; + var fn = comment.followingNode; - while (len) { - diff = len >>> 1; - current = i + diff; - if (func(array[current])) { - len = diff; - } else { - i = current + 1; - len -= diff + 1; - } + if (pn && fn) { + var tieCount = tiesToBreak.length; + if (tieCount > 0) { + var lastTie = tiesToBreak[tieCount - 1]; + + assert.strictEqual( + lastTie.precedingNode === comment.precedingNode, + lastTie.followingNode === comment.followingNode + ); + + if (lastTie.followingNode !== comment.followingNode) { + breakTies(tiesToBreak, lines); + } } - return i; + + tiesToBreak.push(comment); + + } else if (pn) { + // No contest: we have a trailing comment. + breakTies(tiesToBreak, lines); + addTrailingComment(pn, comment); + + } else if (fn) { + // No contest: we have a leading comment. + breakTies(tiesToBreak, lines); + addLeadingComment(fn, comment); + + } else if (en) { + // The enclosing node has no child nodes at all, so what we + // have here is a dangling comment, e.g. [/* crickets */]. + breakTies(tiesToBreak, lines); + addDanglingComment(en, comment); + + } else { + throw new Error("AST contains no nodes at all?"); + } + }); + + breakTies(tiesToBreak, lines); + + comments.forEach(function(comment) { + // These node references were useful for breaking ties, but we + // don't need them anymore, and they create cycles in the AST that + // may lead to infinite recursion if we don't delete them here. + delete comment.precedingNode; + delete comment.enclosingNode; + delete comment.followingNode; + }); + }; + + function breakTies(tiesToBreak, lines) { + var tieCount = tiesToBreak.length; + if (tieCount === 0) { + return; } - function lowerBound(array, func) { - var diff, len, i, current; + var pn = tiesToBreak[0].precedingNode; + var fn = tiesToBreak[0].followingNode; + var gapEndPos = fn.loc.start; + + // Iterate backwards through tiesToBreak, examining the gaps + // between the tied comments. In order to qualify as leading, a + // comment must be separated from fn by an unbroken series of + // whitespace-only gaps (or other comments). + for (var indexOfFirstLeadingComment = tieCount; + indexOfFirstLeadingComment > 0; + --indexOfFirstLeadingComment) { + var comment = tiesToBreak[indexOfFirstLeadingComment - 1]; + assert.strictEqual(comment.precedingNode, pn); + assert.strictEqual(comment.followingNode, fn); + + var gap = lines.sliceString(comment.loc.end, gapEndPos); + if (/\S/.test(gap)) { + // The gap string contained something other than whitespace. + break; + } - len = array.length; - i = 0; + gapEndPos = comment.loc.start; + } - while (len) { - diff = len >>> 1; - current = i + diff; - if (func(array[current])) { - i = current + 1; - len -= diff + 1; - } else { - len = diff; - } - } - return i; + while (indexOfFirstLeadingComment <= tieCount && + (comment = tiesToBreak[indexOfFirstLeadingComment]) && + // If the comment is a //-style comment and indented more + // deeply than the node itself, reconsider it as trailing. + comment.type === "Line" && + comment.loc.start.column > fn.loc.start.column) { + ++indexOfFirstLeadingComment; } - ignoreJSHintError(lowerBound); - objectCreate = Object.create || (function () { - function F() { } + tiesToBreak.forEach(function(comment, i) { + if (i < indexOfFirstLeadingComment) { + addTrailingComment(pn, comment); + } else { + addLeadingComment(fn, comment); + } + }); - return function (o) { - F.prototype = o; - return new F(); - }; - })(); + tiesToBreak.length = 0; + } - objectKeys = Object.keys || function (o) { - var keys = [], key; - for (key in o) { - keys.push(key); - } - return keys; - }; + function addCommentHelper(node, comment) { + var comments = node.comments || (node.comments = []); + comments.push(comment); + } - 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; - } + function addLeadingComment(node, comment) { + comment.leading = true; + comment.trailing = false; + addCommentHelper(node, comment); + } - Syntax = { - AssignmentExpression: 'AssignmentExpression', - 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', - ExportBatchSpecifier: 'ExportBatchSpecifier', - ExportDeclaration: 'ExportDeclaration', - 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', - MethodDefinition: 'MethodDefinition', - ModuleSpecifier: 'ModuleSpecifier', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - ObjectPattern: 'ObjectPattern', - Program: 'Program', - Property: 'Property', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SpreadElement: 'SpreadElement', - 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' - }; + function addDanglingComment(node, comment) { + comment.leading = false; + comment.trailing = false; + addCommentHelper(node, comment); + } - VisitorKeys = { - AssignmentExpression: ['left', 'right'], - ArrayExpression: ['elements'], - ArrayPattern: ['elements'], - ArrowFunctionExpression: ['params', 'defaults', 'rest', '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', 'body', 'superClass'], - ClassExpression: ['id', 'body', 'superClass'], - 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: [], - ExportBatchSpecifier: [], - ExportDeclaration: ['declaration', 'specifiers', 'source'], - ExportSpecifier: ['id', 'name'], - ExpressionStatement: ['expression'], - ForStatement: ['init', 'test', 'update', 'body'], - ForInStatement: ['left', 'right', 'body'], - ForOfStatement: ['left', 'right', 'body'], - FunctionDeclaration: ['id', 'params', 'defaults', 'rest', 'body'], - FunctionExpression: ['id', 'params', 'defaults', 'rest', 'body'], - GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. - Identifier: [], - IfStatement: ['test', 'consequent', 'alternate'], - ImportDeclaration: ['specifiers', 'source'], - ImportDefaultSpecifier: ['id'], - ImportNamespaceSpecifier: ['id'], - ImportSpecifier: ['id', 'name'], - Literal: [], - LabeledStatement: ['label', 'body'], - LogicalExpression: ['left', 'right'], - MemberExpression: ['object', 'property'], - MethodDefinition: ['key', 'value'], - ModuleSpecifier: [], - NewExpression: ['callee', 'arguments'], - ObjectExpression: ['properties'], - ObjectPattern: ['properties'], - Program: ['body'], - Property: ['key', 'value'], - ReturnStatement: ['argument'], - SequenceExpression: ['expressions'], - SpreadElement: ['argument'], - SwitchStatement: ['discriminant', 'cases'], - SwitchCase: ['test', 'consequent'], - TaggedTemplateExpression: ['tag', 'quasi'], - TemplateElement: [], - TemplateLiteral: ['quasis', 'expressions'], - ThisExpression: [], - ThrowStatement: ['argument'], - TryStatement: ['block', 'handlers', 'handler', 'guardedHandlers', 'finalizer'], - UnaryExpression: ['argument'], - UpdateExpression: ['argument'], - VariableDeclaration: ['declarations'], - VariableDeclarator: ['id', 'init'], - WhileStatement: ['test', 'body'], - WithStatement: ['object', 'body'], - YieldExpression: ['argument'] - }; + function addTrailingComment(node, comment) { + comment.leading = false; + comment.trailing = true; + addCommentHelper(node, comment); + } - // unique id - BREAK = {}; - SKIP = {}; - REMOVE = {}; + function printLeadingComment(commentPath, print) { + var comment = commentPath.getValue(); + n.Comment.assert(comment); - VisitorOption = { - Break: BREAK, - Skip: SKIP, - Remove: REMOVE - }; + var loc = comment.loc; + var lines = loc && loc.lines; + var parts = [print(commentPath)]; - function Reference(parent, key) { - this.parent = parent; - this.key = key; - } + if (comment.trailing) { + // When we print trailing comments as leading comments, we don't + // want to bring any trailing spaces along. + parts.push("\n"); - Reference.prototype.replace = function replace(node) { - this.parent[this.key] = node; - }; + } else if (lines instanceof Lines) { + var trailingSpace = lines.slice( + loc.end, + lines.skipSpaces(loc.end) + ); - Reference.prototype.remove = function remove() { - if (isArray(this.parent)) { - this.parent.splice(this.key, 1); - return true; - } else { - this.replace(null); - return false; - } - }; + if (trailingSpace.length === 1) { + // If the trailing space contains no newlines, then we want to + // preserve it exactly as we found it. + parts.push(trailingSpace); + } else { + // If the trailing space contains newlines, then replace it + // with just that many newlines, with all other spaces removed. + parts.push(new Array(trailingSpace.length).join("\n")); + } - function Element(node, path, wrap, ref) { - this.node = node; - this.path = path; - this.wrap = wrap; - this.ref = ref; + } else { + parts.push("\n"); } - function Controller() { } + return concat(parts); + } - // API: - // return property path array from root to current node - Controller.prototype.path = function path() { - var i, iz, j, jz, result, element; + function printTrailingComment(commentPath, print) { + var comment = commentPath.getValue(commentPath); + n.Comment.assert(comment); - function addToPath(result, path) { - if (isArray(path)) { - for (j = 0, jz = path.length; j < jz; ++j) { - result.push(path[j]); - } - } else { - result.push(path); - } - } + var loc = comment.loc; + var lines = loc && loc.lines; + var parts = []; - // root node - if (!this.__current.path) { - return null; - } + if (lines instanceof Lines) { + var fromPos = lines.skipSpaces(loc.start, true) || lines.firstPos(); + var leadingSpace = lines.slice(fromPos, loc.start); - // 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; - }; + if (leadingSpace.length === 1) { + // If the leading space contains no newlines, then we want to + // preserve it exactly as we found it. + parts.push(leadingSpace); + } else { + // If the leading space contains newlines, then replace it + // with just that many newlines, sans all other spaces. + parts.push(new Array(leadingSpace.length).join("\n")); + } + } - // API: - // return type of current node - Controller.prototype.type = function () { - var node = this.current(); - return node.type || this.__current.wrap; - }; + parts.push(print(commentPath)); - // API: - // return array of parent elements - Controller.prototype.parents = function parents() { - var i, iz, result; + return concat(parts); + } - // first node is sentinel - result = []; - for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { - result.push(this.__leavelist[i].node); - } + exports.printComments = function(path, print) { + var value = path.getValue(); + var innerLines = print(path); + var comments = n.Node.check(value) && + types.getFieldValue(value, "comments"); - return result; - }; + if (!comments || comments.length === 0) { + return innerLines; + } - // API: - // return current node - Controller.prototype.current = function current() { - return this.__current.node; - }; + var leadingParts = []; + var trailingParts = [innerLines]; - Controller.prototype.__execute = function __execute(callback, element) { - var previous, result; + path.each(function(commentPath) { + var comment = commentPath.getValue(); + var leading = types.getFieldValue(comment, "leading"); + var trailing = types.getFieldValue(comment, "trailing"); - result = undefined; + if (leading || (trailing && comment.type !== "Block")) { + leadingParts.push(printLeadingComment(commentPath, print)); + } else if (trailing) { + assert.strictEqual(comment.type, "Block"); + trailingParts.push(printTrailingComment(commentPath, print)); + } + }, "comments"); - 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; + leadingParts.push.apply(leadingParts, trailingParts); + return concat(leadingParts); + }; - return result; - }; +},{"./lines":472,"./types":478,"./util":479,"assert":203,"private":448}],471:[function(require,module,exports){ + var assert = require("assert"); + var types = require("./types"); + var n = types.namedTypes; + var Node = n.Node; + var isArray = types.builtInTypes.array; + var isNumber = types.builtInTypes.number; - // API: - // notify control skip / break - Controller.prototype.notify = function notify(flag) { - this.__state = flag; - }; + function FastPath(value) { + assert.ok(this instanceof FastPath); + this.stack = [value]; + } - // API: - // skip child nodes of current node - Controller.prototype.skip = function () { - this.notify(SKIP); - }; + var FPp = FastPath.prototype; + module.exports = FastPath; - // API: - // break traversals - Controller.prototype['break'] = function () { - this.notify(BREAK); - }; +// Static convenience function for coercing a value to a FastPath. + FastPath.from = function(obj) { + if (obj instanceof FastPath) { + // Return a defensive copy of any existing FastPath instances. + return obj.copy(); + } - // API: - // remove node - Controller.prototype.remove = function () { - this.notify(REMOVE); - }; + if (obj instanceof types.NodePath) { + // For backwards compatibility, unroll NodePath instances into + // lightweight FastPath [..., name, value] stacks. + var copy = Object.create(FastPath.prototype); + var stack = [obj.value]; + for (var pp; (pp = obj.parentPath); obj = pp) + stack.push(obj.name, pp.value); + copy.stack = stack.reverse(); + return copy; + } - 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); - } - }; + // Otherwise use obj as the value of the new FastPath instance. + return new FastPath(obj); + }; - function isNode(node) { - if (node == null) { - return false; - } - return typeof node === 'object' && typeof node.type === 'string'; + FPp.copy = function copy() { + var copy = Object.create(FastPath.prototype); + copy.stack = this.stack.slice(0); + return copy; + }; + +// The name of the current property is always the penultimate element of +// this.stack, and always a String. + FPp.getName = function getName() { + var s = this.stack; + var len = s.length; + if (len > 1) { + return s[len - 2]; } + // Since the name is always a string, null is a safe sentinel value to + // return if we do not know the name of the (root) value. + return null; + }; - function isProperty(nodeType, key) { - return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; +// The value of the current property is always the final element of +// this.stack. + FPp.getValue = function getValue() { + var s = this.stack; + return s[s.length - 1]; + }; + + function getNodeHelper(path, count) { + var s = path.stack; + + for (var i = s.length - 1; i >= 0; i -= 2) { + var value = s[i]; + if (n.Node.check(value) && --count < 0) { + return value; + } } - Controller.prototype.traverse = function traverse(root, visitor) { - var worklist, - leavelist, - element, - node, - nodeType, - ret, - key, - current, - current2, - candidates, - candidate, - sentinel; + return null; + } - this.__initialize(root, visitor); + FPp.getNode = function getNode(count) { + return getNodeHelper(this, ~~count); + }; - sentinel = {}; + FPp.getParentNode = function getParentNode(count) { + return getNodeHelper(this, ~~count + 1); + }; - // reference - worklist = this.__worklist; - leavelist = this.__leavelist; +// The length of the stack can be either even or odd, depending on whether +// or not we have a name for the root value. The difference between the +// index of the root value and the index of the final value is always +// even, though, which allows us to return the root value in constant time +// (i.e. without iterating backwards through the stack). + FPp.getRootValue = function getRootValue() { + var s = this.stack; + if (s.length % 2 === 0) { + return s[1]; + } + return s[0]; + }; - // initialize - worklist.push(new Element(root, null, null, null)); - leavelist.push(new Element(null, null, null, null)); +// Temporarily push properties named by string arguments given after the +// callback function onto this.stack, then call the callback with a +// reference to this (modified) FastPath object. Note that the stack will +// be restored to its original state after the callback is finished, so it +// is probably a mistake to retain a reference to the path. + FPp.call = function call(callback/*, name1, name2, ... */) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + var result = callback(this); + s.length = origLen; + return result; + }; - while (worklist.length) { - element = worklist.pop(); +// Similar to FastPath.prototype.call, except that the value obtained by +// accessing this.getValue()[name1][name2]... should be array-like. The +// callback will be called with a reference to this path object for each +// element of the array. + FPp.each = function each(callback/*, name1, name2, ... */) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; - if (element === sentinel) { - element = leavelist.pop(); + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } - ret = this.__execute(visitor.leave, element); + for (var i = 0; i < value.length; ++i) { + if (i in value) { + s.push(i, value[i]); + // If the callback needs to know the value of i, call + // path.getName(), assuming path is the parameter name. + callback(this); + s.length -= 2; + } + } - if (this.__state === BREAK || ret === BREAK) { - return; - } - continue; - } + s.length = origLen; + }; - if (element.node) { +// Similar to FastPath.prototype.each, except that the results of the +// callback function invocations are stored in an array and returned at +// the end of the iteration. + FPp.map = function map(callback/*, name1, name2, ... */) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; - ret = this.__execute(visitor.enter, element); + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } - if (this.__state === BREAK || ret === BREAK) { - return; - } + var result = new Array(value.length); - worklist.push(sentinel); - leavelist.push(element); + for (var i = 0; i < value.length; ++i) { + if (i in value) { + s.push(i, value[i]); + result[i] = callback(this, i); + s.length -= 2; + } + } - if (this.__state === SKIP || ret === SKIP) { - continue; - } + s.length = origLen; - node = element.node; - nodeType = element.wrap || node.type; - candidates = this.__keys[nodeType]; - if (!candidates) { - if (this.__fallback) { - candidates = objectKeys(node); - } else { - throw new Error('Unknown node type ' + nodeType + '.'); - } - } + return result; + }; - current = candidates.length; - while ((current -= 1) >= 0) { - key = candidates[current]; - candidate = node[key]; - if (!candidate) { - continue; - } +// Inspired by require("ast-types").NodePath.prototype.needsParens, but +// more efficient because we're iterating backwards through a stack. + FPp.needsParens = function(assumeExpressionContext) { + var parent = this.getParentNode(); + if (!parent) { + return false; + } - 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)); - } - } - } - } - }; + var name = this.getName(); + var node = this.getNode(); - 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; - } - } - } - } + // If the value of this path is some child of a Node and not a Node + // itself, then it doesn't need parentheses. Only Node objects (in + // fact, only Expression nodes) need parentheses. + if (this.getValue() !== node) { + return false; + } - var worklist, - leavelist, - node, - nodeType, - target, - element, - current, - current2, - candidates, - candidate, - sentinel, - outer, - key; + // Only expressions need parentheses. + if (!n.Expression.check(node)) { + return false; + } - this.__initialize(root, visitor); + // Identifiers never need parentheses. + if (node.type === "Identifier") { + return false; + } - sentinel = {}; + switch (node.type) { + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + return parent.type === "MemberExpression" + && name === "object" + && parent.object === node; - // reference - worklist = this.__worklist; - leavelist = this.__leavelist; + case "BinaryExpression": + case "LogicalExpression": + switch (parent.type) { + case "CallExpression": + return name === "callee" + && parent.callee === node; - // initialize - outer = { - root: root - }; - element = new Element(root, null, null, new Reference(outer, 'root')); - worklist.push(element); - leavelist.push(element); + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + return true; - while (worklist.length) { - element = worklist.pop(); + case "MemberExpression": + return name === "object" + && parent.object === node; - if (element === sentinel) { - element = leavelist.pop(); + case "BinaryExpression": + case "LogicalExpression": + var po = parent.operator; + var pp = PRECEDENCE[po]; + var no = node.operator; + var np = PRECEDENCE[no]; - target = this.__execute(visitor.leave, element); + if (pp > np) { + return true; + } - // 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 (pp === np && name === "right") { + assert.strictEqual(parent.right, node); + return true; + } + + default: + return false; + } + + case "SequenceExpression": + switch (parent.type) { + case "ForStatement": + // Although parentheses wouldn't hurt around sequence + // expressions in the head of for loops, traditional style + // dictates that e.g. i++, j++ should not be wrapped with + // parentheses. + return false; - if (this.__state === REMOVE || target === REMOVE) { - removeElem(element); - } + case "ExpressionStatement": + return name !== "expression"; - if (this.__state === BREAK || target === BREAK) { - return outer.root; - } - continue; - } + default: + // Otherwise err on the side of overparenthesization, adding + // explicit exceptions above if this proves overzealous. + return true; + } - target = this.__execute(visitor.enter, element); + case "YieldExpression": + switch (parent.type) { + case "BinaryExpression": + case "LogicalExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "CallExpression": + case "MemberExpression": + case "NewExpression": + case "ConditionalExpression": + case "YieldExpression": + return true; - // 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; - } + default: + return false; + } - if (this.__state === REMOVE || target === REMOVE) { - removeElem(element); - element.node = null; - } + case "Literal": + return parent.type === "MemberExpression" + && isNumber.check(node.value) + && name === "object" + && parent.object === node; - if (this.__state === BREAK || target === BREAK) { - return outer.root; - } + case "AssignmentExpression": + case "ConditionalExpression": + switch (parent.type) { + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + return true; - // node may be null - node = element.node; - if (!node) { - continue; - } + case "CallExpression": + return name === "callee" + && parent.callee === node; - worklist.push(sentinel); - leavelist.push(element); + case "ConditionalExpression": + return name === "test" + && parent.test === node; - if (this.__state === SKIP || target === SKIP) { - continue; - } + case "MemberExpression": + return name === "object" + && parent.object === node; - nodeType = element.wrap || node.type; - candidates = this.__keys[nodeType]; - if (!candidates) { - if (this.__fallback) { - candidates = objectKeys(node); - } else { - throw new Error('Unknown node type ' + nodeType + '.'); - } - } + default: + return false; + } - current = candidates.length; - while ((current -= 1) >= 0) { - key = candidates[current]; - candidate = node[key]; - if (!candidate) { - continue; - } + case "ArrowFunctionExpression": + return isBinary(parent); - 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))); - } - } + case "ObjectExpression": + if (parent.type === "ArrowFunctionExpression" && + name === "body") { + return true; } - return outer.root; - }; - - function traverse(root, visitor) { - var controller = new Controller(); - return controller.traverse(root, visitor); + default: + if (parent.type === "NewExpression" && + name === "callee" && + parent.callee === node) { + return containsCallExpression(node); + } } - function replace(root, visitor) { - var controller = new Controller(); - return controller.replace(root, visitor); - } + if (assumeExpressionContext !== true && + !this.canBeFirstInStatement() && + this.firstInStatement()) + return true; - function extendCommentRange(comment, tokens) { - var target; + return false; + }; - target = upperBound(tokens, function search(token) { - return token.range[0] > comment.range[0]; - }); + function isBinary(node) { + return n.BinaryExpression.check(node) + || n.LogicalExpression.check(node); + } - comment.extendedRange = [comment.range[0], comment.range[1]]; + function isUnaryLike(node) { + return n.UnaryExpression.check(node) + // I considered making SpreadElement and SpreadProperty subtypes + // of UnaryExpression, but they're not really Expression nodes. + || (n.SpreadElement && n.SpreadElement.check(node)) + || (n.SpreadProperty && n.SpreadProperty.check(node)); + } - if (target !== tokens.length) { - comment.extendedRange[1] = tokens[target].range[0]; - } + var PRECEDENCE = {}; + [["||"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"] + ].forEach(function(tier, i) { + tier.forEach(function(op) { + PRECEDENCE[op] = i; + }); + }); - target -= 1; - if (target >= 0) { - comment.extendedRange[0] = tokens[target].range[1]; - } + function containsCallExpression(node) { + if (n.CallExpression.check(node)) { + return true; + } - return comment; + if (isArray.check(node)) { + return node.some(containsCallExpression); } - function attachComments(tree, providedComments, tokens) { - // At first, we should calculate extended comment ranges. - var comments = [], comment, len, i, cursor; + if (n.Node.check(node)) { + return types.someField(node, function(name, child) { + return containsCallExpression(child); + }); + } - if (!tree.range) { - throw new Error('attachComments needs range information'); - } + return false; + } - // 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; - } + FPp.canBeFirstInStatement = function() { + var node = this.getNode(); + return !n.FunctionExpression.check(node) + && !n.ObjectExpression.check(node); + }; - for (i = 0, len = providedComments.length; i < len; i += 1) { - comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); - } + FPp.firstInStatement = function() { + var s = this.stack; + var parentName, parent; + var childName, child; - // This is based on John Freeman's implementation. - cursor = 0; - traverse(tree, { - enter: function (node) { - var comment; + for (var i = s.length - 1; i >= 0; i -= 2) { + if (n.Node.check(s[i])) { + childName = parentName; + child = parent; + parentName = s[i - 1]; + parent = s[i]; + } - while (cursor < comments.length) { - comment = comments[cursor]; - if (comment.extendedRange[1] > node.range[0]) { - break; - } + if (!parent || !child) { + continue; + } - if (comment.extendedRange[1] === node.range[0]) { - if (!node.leadingComments) { - node.leadingComments = []; - } - node.leadingComments.push(comment); - comments.splice(cursor, 1); - } else { - cursor += 1; - } - } + if (n.BlockStatement.check(parent) && + parentName === "body" && + childName === 0) { + assert.strictEqual(parent.body[0], child); + return true; + } - // already out of owned node - if (cursor === comments.length) { - return VisitorOption.Break; - } + if (n.ExpressionStatement.check(parent) && + childName === "expression") { + assert.strictEqual(parent.expression, child); + return true; + } - if (comments[cursor].extendedRange[0] > node.range[1]) { - return VisitorOption.Skip; - } - } - }); + if (n.SequenceExpression.check(parent) && + parentName === "expressions" && + childName === 0) { + assert.strictEqual(parent.expressions[0], child); + continue; + } - cursor = 0; - traverse(tree, { - leave: function (node) { - var comment; + if (n.CallExpression.check(parent) && + childName === "callee") { + assert.strictEqual(parent.callee, child); + continue; + } - while (cursor < comments.length) { - comment = comments[cursor]; - if (node.range[1] < comment.extendedRange[0]) { - break; - } + if (n.MemberExpression.check(parent) && + childName === "object") { + assert.strictEqual(parent.object, child); + continue; + } - if (node.range[1] === comment.extendedRange[0]) { - if (!node.trailingComments) { - node.trailingComments = []; - } - node.trailingComments.push(comment); - comments.splice(cursor, 1); - } else { - cursor += 1; - } - } + if (n.ConditionalExpression.check(parent) && + childName === "test") { + assert.strictEqual(parent.test, child); + continue; + } - // already out of owned node - if (cursor === comments.length) { - return VisitorOption.Break; - } + if (isBinary(parent) && + childName === "left") { + assert.strictEqual(parent.left, child); + continue; + } - if (comments[cursor].extendedRange[0] > node.range[1]) { - return VisitorOption.Skip; - } - } - }); + if (n.UnaryExpression.check(parent) && + !parent.prefix && + childName === "argument") { + assert.strictEqual(parent.argument, child); + continue; + } - return tree; + return false; } - exports.version = '1.8.1-dev'; - 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 true; + }; - return exports; -})); -/* vim: set sw=4 ts=4 et tw=80 : */ - -},{}],297:[function(require,module,exports){ -/* - Copyright (C) 2013 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -(function () { - 'use strict'; +},{"./types":478,"assert":203}],472:[function(require,module,exports){ + var assert = require("assert"); + var sourceMap = require("source-map"); + var normalizeOptions = require("./options").normalize; + var secretKey = require("private").makeUniqueKey(); + var types = require("./types"); + var isString = types.builtInTypes.string; + var comparePos = require("./util").comparePos; + var Mapping = require("./mapping"); - 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; - } +// Goals: +// 1. Minimize new string creation. +// 2. Keep (de)identation O(lines) time. +// 3. Permit negative indentations. +// 4. Enforce immutability. +// 5. No newline characters. - function isIterationStatement(node) { - if (node == null) { return false; } - switch (node.type) { - case 'DoWhileStatement': - case 'ForInStatement': - case 'ForStatement': - case 'WhileStatement': - return true; - } - return false; - } + function getSecret(lines) { + return lines[secretKey]; + } - 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 Lines(infos, sourceFileName) { + assert.ok(this instanceof Lines); + assert.ok(infos.length > 0); - function isSourceElement(node) { - return isStatement(node) || node != null && node.type === 'FunctionDeclaration'; + if (sourceFileName) { + isString.assert(sourceFileName); + } else { + sourceFileName = null; } - function trailingStatement(node) { - switch (node.type) { - case 'IfStatement': - if (node.alternate != null) { - return node.alternate; - } - return node.consequent; + Object.defineProperty(this, secretKey, { + value: { + infos: infos, + mappings: [], + name: sourceFileName, + cachedSourceMap: null + } + }); - case 'LabeledStatement': - case 'ForStatement': - case 'ForInStatement': - case 'WhileStatement': - case 'WithStatement': - return node.body; - } - return null; + if (sourceFileName) { + getSecret(this).mappings.push(new Mapping(this, { + start: this.firstPos(), + end: this.lastPos() + })); } + } - function isProblematicIfStatement(node) { - var current; +// Exposed for instanceof checks. The fromString function should be used +// to create new Lines objects. + exports.Lines = Lines; + var Lp = Lines.prototype; - 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); +// These properties used to be assigned to each new object in the Lines +// constructor, but we can more efficiently stuff them into the secret and +// let these lazy accessors compute their values on-the-fly. + Object.defineProperties(Lp, { + length: { + get: function() { + return getSecret(this).infos.length; + } + }, - return false; + name: { + get: function() { + return getSecret(this).name; + } } + }); - module.exports = { - isExpression: isExpression, - isStatement: isStatement, - isIterationStatement: isIterationStatement, - isSourceElement: isSourceElement, - isProblematicIfStatement: isProblematicIfStatement, - - trailingStatement: trailingStatement - }; -}()); -/* vim: set sw=4 ts=4 et tw=80 : */ - -},{}],298:[function(require,module,exports){ -/* - Copyright (C) 2013-2014 Yusuke Suzuki - Copyright (C) 2014 Ivan Nikulin - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -(function () { - 'use strict'; + function copyLineInfo(info) { + return { + line: info.line, + indent: info.indent, + sliceStart: info.sliceStart, + sliceEnd: info.sliceEnd + }; + } - var Regex, NON_ASCII_WHITESPACES; + var fromStringCache = {}; + var hasOwn = fromStringCache.hasOwnProperty; + var maxCacheKeyLen = 10; - // 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 countSpaces(spaces, tabWidth) { + var count = 0; + var len = spaces.length; - function isDecimalDigit(ch) { - return (ch >= 48 && ch <= 57); // 0..9 - } + for (var i = 0; i < len; ++i) { + switch (spaces.charCodeAt(i)) { + case 9: // '\t' + assert.strictEqual(typeof tabWidth, "number"); + assert.ok(tabWidth > 0); + + var next = Math.ceil(count / tabWidth) * tabWidth; + if (next === count) { + count += tabWidth; + } else { + count = next; + } - function isHexDigit(ch) { - return isDecimalDigit(ch) || // 0..9 - (97 <= ch && ch <= 102) || // a..f - (65 <= ch && ch <= 70); // A..F - } + break; - function isOctalDigit(ch) { - return (ch >= 48 && ch <= 55); // 0..7 + case 11: // '\v' + case 12: // '\f' + case 13: // '\r' + case 0xfeff: // zero-width non-breaking space + // These characters contribute nothing to indentation. + break; + + case 32: // ' ' + default: // Treat all other whitespace like ' '. + count += 1; + break; + } } - // 7.2 White Space + return count; + } + exports.countSpaces = countSpaces; - NON_ASCII_WHITESPACES = [ - 0x1680, 0x180E, - 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, - 0x202F, 0x205F, - 0x3000, - 0xFEFF - ]; + var leadingSpaceExp = /^\s*/; - function isWhiteSpace(ch) { - return (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) || - (ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0); - } + /** + * @param {Object} options - Options object that configures printing. + */ + function fromString(string, options) { + if (string instanceof Lines) + return string; - // 7.3 Line Terminators + string += ""; - function isLineTerminator(ch) { - return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029); - } + var tabWidth = options && options.tabWidth; + var tabless = string.indexOf("\t") < 0; + var cacheable = !options && tabless && (string.length <= maxCacheKeyLen); - // 7.6 Identifier Names and Identifiers + assert.ok(tabWidth || tabless, "No tab width specified but encountered tabs in string\n" + string); - 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))); - } + if (cacheable && hasOwn.call(fromStringCache, string)) + return fromStringCache[string]; - 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))); - } + var lines = new Lines(string.split("\n").map(function(line) { + var spaces = leadingSpaceExp.exec(line)[0]; + return { + line: line, + indent: countSpaces(spaces, tabWidth), + sliceStart: spaces.length, + sliceEnd: line.length + }; + }), normalizeOptions(options).sourceFileName); - 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 : */ - -},{}],299:[function(require,module,exports){ -/* - Copyright (C) 2013 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -(function () { - 'use strict'; + if (cacheable) + fromStringCache[string] = lines; - var code = require('./code'); + return lines; + } + exports.fromString = fromString; - 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 isOnlyWhitespace(string) { + return !/\S/.test(string); + } + + Lp.toString = function(options) { + return this.sliceString(this.firstPos(), this.lastPos(), options); + }; - 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); + Lp.getSourceMap = function(sourceMapName, sourceRoot) { + if (!sourceMapName) { + // Although we could make up a name or generate an anonymous + // source map, instead we assume that any consumer who does not + // provide a name does not actually want a source map. + return null; } - function isKeywordES6(id, strict) { - if (strict && isStrictModeReservedWordES6(id)) { - return true; - } + var targetLines = this; - 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 updateJSON(json) { + json = json || {}; - function isReservedWordES5(id, strict) { - return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict); - } + isString.assert(sourceMapName); + json.file = sourceMapName; - function isReservedWordES6(id, strict) { - return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict); + if (sourceRoot) { + isString.assert(sourceRoot); + json.sourceRoot = sourceRoot; + } + + return json; } - function isRestrictedWord(id) { - return id === 'eval' || id === 'arguments'; + var secret = getSecret(targetLines); + if (secret.cachedSourceMap) { + // Since Lines objects are immutable, we can reuse any source map + // that was previously generated. Nevertheless, we return a new + // JSON object here to protect the cached source map from outside + // modification. + return updateJSON(secret.cachedSourceMap.toJSON()); } - function isIdentifierName(id) { - var i, iz, ch; + var smg = new sourceMap.SourceMapGenerator(updateJSON()); + var sourcesToContents = {}; - if (id.length === 0) { - return false; - } + secret.mappings.forEach(function(mapping) { + var sourceCursor = mapping.sourceLines.skipSpaces( + mapping.sourceLoc.start + ) || mapping.sourceLines.lastPos(); - ch = id.charCodeAt(0); - if (!code.isIdentifierStart(ch) || ch === 92) { // \ (backslash) - return false; - } + var targetCursor = targetLines.skipSpaces( + mapping.targetLoc.start + ) || targetLines.lastPos(); - for (i = 1, iz = id.length; i < iz; ++i) { - ch = id.charCodeAt(i); - if (!code.isIdentifierPart(ch) || ch === 92) { // \ (backslash) - return false; - } + while (comparePos(sourceCursor, mapping.sourceLoc.end) < 0 && + comparePos(targetCursor, mapping.targetLoc.end) < 0) { + + var sourceChar = mapping.sourceLines.charAt(sourceCursor); + var targetChar = targetLines.charAt(targetCursor); + assert.strictEqual(sourceChar, targetChar); + + var sourceName = mapping.sourceLines.name; + + // Add mappings one character at a time for maximum resolution. + smg.addMapping({ + source: sourceName, + original: { line: sourceCursor.line, + column: sourceCursor.column }, + generated: { line: targetCursor.line, + column: targetCursor.column } + }); + + if (!hasOwn.call(sourcesToContents, sourceName)) { + var sourceContent = mapping.sourceLines.toString(); + smg.setSourceContent(sourceName, sourceContent); + sourcesToContents[sourceName] = sourceContent; } - return true; - } - function isIdentifierES5(id, strict) { - return isIdentifierName(id) && !isReservedWordES5(id, strict); - } + targetLines.nextPos(targetCursor, true); + mapping.sourceLines.nextPos(sourceCursor, true); + } + }); - function isIdentifierES6(id, strict) { - return isIdentifierName(id) && !isReservedWordES6(id, strict); - } + secret.cachedSourceMap = smg; - 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":298}],300:[function(require,module,exports){ -/* - Copyright (C) 2013 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -(function () { - 'use strict'; + return smg.toJSON(); + }; - exports.ast = require('./ast'); - exports.code = require('./code'); - exports.keyword = require('./keyword'); -}()); -/* vim: set sw=4 ts=4 et tw=80 : */ - -},{"./ast":297,"./code":298,"./keyword":299}],301:[function(require,module,exports){ -module.exports={ - "builtin": { - "Array": false, - "ArrayBuffer": false, - "Boolean": false, - "constructor": false, - "Date": false, - "decodeURI": false, - "decodeURIComponent": false, - "encodeURI": false, - "encodeURIComponent": false, - "Error": 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, - "URIError": false, - "valueOf": false, - "WeakMap": false, - "WeakSet": false - }, - "nonstandard": { - "escape": false, - "unescape": false - }, - "browser": { - "addEventListener": false, - "alert": false, - "applicationCache": false, - "atob": false, - "Audio": false, - "AudioProcessingEvent": false, - "BeforeUnloadEvent": false, - "Blob": false, - "blur": false, - "btoa": false, - "cancelAnimationFrame": false, - "CanvasGradient": false, - "CanvasPattern": false, - "CanvasRenderingContext2D": false, - "clearInterval": false, - "clearTimeout": false, - "close": false, - "closed": false, - "CloseEvent": false, - "Comment": false, - "CompositionEvent": false, - "confirm": false, - "console": false, - "crypto": false, - "CSS": false, - "CustomEvent": false, - "DataView": false, - "Debug": false, - "defaultStatus": false, - "devicePixelRatio": false, - "dispatchEvent": false, - "document": false, - "Document": false, - "DocumentFragment": false, - "DOMParser": false, - "DragEvent": false, - "Element": false, - "ElementTimeControl": false, - "ErrorEvent": false, - "event": false, - "Event": false, - "FileReader": false, - "fetch": false, - "find": false, - "focus": false, - "FocusEvent": false, - "FormData": false, - "frameElement": false, - "frames": false, - "GamepadEvent": false, - "getComputedStyle": false, - "getSelection": false, - "HashChangeEvent": false, - "Headers": false, - "history": false, - "HTMLAnchorElement": false, - "HTMLBaseElement": false, - "HTMLBlockquoteElement": false, - "HTMLBodyElement": false, - "HTMLBRElement": false, - "HTMLButtonElement": false, - "HTMLCanvasElement": false, - "HTMLDirectoryElement": false, - "HTMLDivElement": false, - "HTMLDListElement": false, - "HTMLElement": false, - "HTMLFieldSetElement": false, - "HTMLFontElement": false, - "HTMLFormElement": false, - "HTMLFrameElement": false, - "HTMLFrameSetElement": false, - "HTMLHeadElement": false, - "HTMLHeadingElement": false, - "HTMLHRElement": false, - "HTMLHtmlElement": false, - "HTMLIFrameElement": false, - "HTMLImageElement": false, - "HTMLInputElement": false, - "HTMLIsIndexElement": false, - "HTMLLabelElement": false, - "HTMLLayerElement": false, - "HTMLLegendElement": false, - "HTMLLIElement": false, - "HTMLLinkElement": false, - "HTMLMapElement": false, - "HTMLMenuElement": false, - "HTMLMetaElement": false, - "HTMLModElement": false, - "HTMLObjectElement": false, - "HTMLOListElement": false, - "HTMLOptGroupElement": false, - "HTMLOptionElement": false, - "HTMLParagraphElement": false, - "HTMLParamElement": false, - "HTMLPreElement": false, - "HTMLQuoteElement": false, - "HTMLScriptElement": false, - "HTMLSelectElement": false, - "HTMLStyleElement": false, - "HTMLTableCaptionElement": false, - "HTMLTableCellElement": false, - "HTMLTableColElement": false, - "HTMLTableElement": false, - "HTMLTableRowElement": false, - "HTMLTableSectionElement": false, - "HTMLTextAreaElement": false, - "HTMLTitleElement": false, - "HTMLUListElement": 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, - "indexedDB": false, - "innerHeight": false, - "innerWidth": false, - "InputEvent": false, - "Intl": false, - "KeyboardEvent": false, - "length": false, - "localStorage": false, - "location": false, - "matchMedia": false, - "MessageChannel": false, - "MessageEvent": false, - "MessagePort": false, - "MouseEvent": false, - "moveBy": false, - "moveTo": false, - "MutationObserver": false, - "name": false, - "navigator": false, - "Node": false, - "NodeFilter": false, - "NodeList": false, - "Notification": false, - "OfflineAudioCompletionEvent": 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, - "outerHeight": false, - "outerWidth": false, - "PageTransitionEvent": false, - "pageXOffset": false, - "pageYOffset": false, - "parent": false, - "PopStateEvent": false, - "postMessage": false, - "print": false, - "ProgressEvent": false, - "prompt": false, - "Range": false, - "Request": false, - "Response": false, - "removeEventListener": false, - "requestAnimationFrame": false, - "resizeBy": false, - "resizeTo": false, - "screen": false, - "screenX": false, - "screenY": false, - "scroll": false, - "scrollbars": false, - "scrollBy": false, - "scrollTo": false, - "scrollX": false, - "scrollY": false, - "self": false, - "sessionStorage": false, - "setInterval": false, - "setTimeout": false, - "SharedWorker": false, - "showModalDialog": false, - "status": false, - "stop": false, - "StorageEvent": 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, - "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, - "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, - "SVGGlyphElement": false, - "SVGGlyphRefElement": false, - "SVGGradientElement": 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, - "Text": false, - "TextDecoder": false, - "TextEncoder": false, - "TimeEvent": false, - "top": false, - "TouchEvent": false, - "UIEvent": false, - "URL": 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, - "XMLHttpRequest": false, - "XMLSerializer": false, - "XPathEvaluator": false, - "XPathException": false, - "XPathExpression": false, - "XPathNamespace": false, - "XPathNSResolver": false, - "XPathResult": false - }, - "worker": { - "importScripts": true, - "postMessage": true, - "self": true - }, - "node": { - "__dirname": false, - "__filename": false, - "arguments": false, - "Buffer": false, - "clearImmediate": false, - "clearInterval": false, - "clearTimeout": false, - "console": false, - "DataView": false, - "exports": true, - "GLOBAL": false, - "global": false, - "module": false, - "process": false, - "require": false, - "setImmediate": false, - "setInterval": false, - "setTimeout": false - }, - "amd": { - "define": false, - "require": false - }, - "mocha": { - "after": false, - "afterEach": false, - "before": false, - "beforeEach": false, - "context": false, - "describe": false, - "it": 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 - }, - "qunit": { - "asyncTest": false, - "deepEqual": false, - "equal": false, - "expect": false, - "module": false, - "notDeepEqual": false, - "notEqual": 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 - }, - "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, - "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, - "App": false, - "Assets": false, - "Blaze": false, - "check": false, - "Cordova": false, - "DDP": false, - "DDPServer": 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, - "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, - "listFiles": false, - "load": false, - "ls": false, - "md5sumFile": false, - "mkdir": false, - "Mongo": false, - "ObjectId": false, - "PlanCache": 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 - } -} - -},{}],302:[function(require,module,exports){ -module.exports = require('./globals.json'); - -},{"./globals.json":301}],303:[function(require,module,exports){ -// https://github.com/paulmillr/es6-shim -// http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger -var isNaN = require("is-nan"); -var isFinite = require("is-finite"); -module.exports = Number.isInteger || function(val) { - return typeof val === "number" && - ! isNaN(val) && - isFinite(val) && - parseInt(val, 10) === val; -}; + Lp.bootstrapCharAt = function(pos) { + assert.strictEqual(typeof pos, "object"); + assert.strictEqual(typeof pos.line, "number"); + assert.strictEqual(typeof pos.column, "number"); -},{"is-finite":304,"is-nan":305}],304:[function(require,module,exports){ -'use strict'; -module.exports = Number.isFinite || function (val) { - // Number.isNaN() => val !== val - if (typeof val !== 'number' || val !== val || val === Infinity || val === -Infinity) { - return false; - } + var line = pos.line, + column = pos.column, + strings = this.toString().split("\n"), + string = strings[line - 1]; - return true; -}; + if (typeof string === "undefined") + return ""; -},{}],305:[function(require,module,exports){ -"use strict"; + if (column === string.length && + line < strings.length) + return "\n"; -/* https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan */ + if (column >= string.length) + return ""; -module.exports = function isNaN(value) { - return value !== value; -}; + return string.charAt(column); + }; + Lp.charAt = function(pos) { + assert.strictEqual(typeof pos, "object"); + assert.strictEqual(typeof pos.line, "number"); + assert.strictEqual(typeof pos.column, "number"); -},{}],306:[function(require,module,exports){ -// Copyright 2014, 2015 Simon Lydell -// X11 (“MIT”) Licensed. (See LICENSE.) + var line = pos.line, + column = pos.column, + secret = getSecret(this), + infos = secret.infos, + info = infos[line - 1], + c = column; -// This regex comes from regex.coffee, and is inserted here by generate-index.js -// (run `npm run build`). -module.exports = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g - -module.exports.matchToToken = function(match) { - token = {type: "invalid", value: match[0]} - if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4]) - else if (match[ 5]) token.type = "comment" - else if (match[ 6]) token.type = "comment", token.closed = !!match[7] - else if (match[ 8]) token.type = "regex" - else if (match[ 9]) token.type = "number" - else if (match[10]) token.type = "name" - else if (match[11]) token.type = "punctuator" - else if (match[12]) token.type = "whitespace" - return token -} - -},{}],307:[function(require,module,exports){ -// intentionally commented out as it makes it slower... -//'use strict'; + if (typeof info === "undefined" || c < 0) + return ""; -var arr = []; -var charCodeCache = []; - -module.exports = function (a, b) { - if (a === b) { - return 0; - } - - var aLen = a.length; - var bLen = b.length; - - if (aLen === 0) { - return bLen; - } - - if (bLen === 0) { - return aLen; - } - - var bCharCode; - var ret; - var tmp; - var tmp2; - var i = 0; - var j = 0; - - while (i < aLen) { - charCodeCache[i] = a.charCodeAt(i); - arr[i] = ++i; - } - - while (j < bLen) { - bCharCode = b.charCodeAt(j); - tmp = j++; - ret = j; - - for (i = 0; i < aLen; i++) { - tmp2 = bCharCode === charCodeCache[i] ? tmp : tmp + 1; - tmp = arr[i]; - ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2; - } - } - - return ret; -}; - -},{}],308:[function(require,module,exports){ -// Copyright 2014, 2015 Simon Lydell -// X11 (“MIT”) Licensed. (See LICENSE.) + var indent = this.getIndentAt(line); + if (c < indent) + return " "; -var leftPad = require("left-pad") - -function get(options, key, defaultValue) { - return (key in options ? options[key] : defaultValue) -} - -function lineNumbers(code, options) { - var getOption = get.bind(null, options || {}) - var transform = getOption("transform", Function.prototype) - var padding = getOption("padding", " ") - var before = getOption("before", " ") - var after = getOption("after", " | ") - var start = getOption("start", 1) - var isArray = Array.isArray(code) - var lines = (isArray ? code : code.split("\n")) - var end = start + lines.length - 1 - var width = String(end).length - var numbered = lines.map(function(line, index) { - var number = start + index - var params = {before: before, number: number, width: width, after: after, - line: line} - transform(params) - return params.before + leftPad(params.number, width, padding) + - params.after + params.line - }) - return (isArray ? numbered : numbered.join("\n")) -} - -module.exports = lineNumbers - -},{"left-pad":309}],309:[function(require,module,exports){ -module.exports = leftpad; - -function leftpad (str, len, ch) { - str = String(str); - - var i = -1; - - ch || (ch = ' '); - len = len - str.length; - - - while (++i < len) { - str = ch + str; - } - - return str; -} - -},{}],310:[function(require,module,exports){ -/** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @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 = -1, - result = []; + c += info.sliceStart - indent; - while (++index < length) { - var value = array[index]; - if (value) { - result[++resIndex] = value; - } - } - return result; -} - -module.exports = compact; - -},{}],311:[function(require,module,exports){ -var baseFlatten = require('../internal/baseFlatten'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Flattens a nested array. If `isDeep` is `true` the array is recursively - * flattened, otherwise it is only flattened a single level. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, 3, [4]]]); - * // => [1, 2, 3, [4]] - * - * // using `isDeep` - * _.flatten([1, [2, 3, [4]]], true); - * // => [1, 2, 3, 4] - */ -function flatten(array, isDeep, guard) { - var length = array ? array.length : 0; - if (guard && isIterateeCall(array, isDeep, guard)) { - isDeep = false; - } - return length ? baseFlatten(array, isDeep) : []; -} - -module.exports = flatten; - -},{"../internal/baseFlatten":339,"../internal/isIterateeCall":382}],312:[function(require,module,exports){ -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @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; -} - -module.exports = last; - -},{}],313:[function(require,module,exports){ -var baseIndexOf = require('../internal/baseIndexOf'); - -/** Used for native method references. */ -var arrayProto = Array.prototype; - -/** Native method references. */ -var splice = arrayProto.splice; - -/** - * Removes all provided values from `array` using `SameValueZero` for equality - * comparisons. - * - * **Notes:** - * - Unlike `_.without`, this method mutates `array` - * - [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * comparisons are like strict equality comparisons, e.g. `===`, except - * that `NaN` matches `NaN` - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3, 1, 2, 3]; - * - * _.pull(array, 2, 3); - * console.log(array); - * // => [1, 1] - */ -function pull() { - var args = arguments, - array = args[0]; - - if (!(array && array.length)) { - return array; - } - var index = 0, - indexOf = baseIndexOf, - length = args.length; - - while (++index < length) { - var fromIndex = 0, - value = args[index]; - - while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { - splice.call(array, fromIndex, 1); - } - } - return array; -} - -module.exports = pull; - -},{"../internal/baseIndexOf":345}],314:[function(require,module,exports){ -var baseCallback = require('../internal/baseCallback'), - baseUniq = require('../internal/baseUniq'), - isIterateeCall = require('../internal/isIterateeCall'), - sortedUniq = require('../internal/sortedUniq'); - -/** - * Creates a duplicate-value-free version of an array using `SameValueZero` - * for equality comparisons. Providing `true` for `isSorted` performs a faster - * search algorithm for sorted arrays. If an iteratee function is provided it - * is invoked for each value in the array to generate the criterion by which - * uniqueness is computed. The `iteratee` is bound to `thisArg` and invoked - * with three arguments: (value, index, array). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * **Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * comparisons are like strict equality comparisons, e.g. `===`, except that - * `NaN` matches `NaN`. - * - * @static - * @memberOf _ - * @alias unique - * @category Array - * @param {Array} array The array to inspect. - * @param {boolean} [isSorted] Specify the array is sorted. - * @param {Function|Object|string} [iteratee] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new duplicate-value-free array. - * @example - * - * _.uniq([1, 2, 1]); - * // => [1, 2] - * - * // using `isSorted` - * _.uniq([1, 1, 2], true); - * // => [1, 2] - * - * // using an iteratee function - * _.uniq([1, 2.5, 1.5, 2], function(n) { - * return this.floor(n); - * }, Math); - * // => [1, 2.5] - * - * // using the `_.property` callback shorthand - * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ -function uniq(array, isSorted, iteratee, thisArg) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (isSorted != null && typeof isSorted != 'boolean') { - thisArg = iteratee; - iteratee = isIterateeCall(array, isSorted, thisArg) ? null : isSorted; - isSorted = false; - } - iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3); - return (isSorted) - ? sortedUniq(array, iteratee) - : baseUniq(array, iteratee); -} - -module.exports = uniq; - -},{"../internal/baseCallback":333,"../internal/baseUniq":360,"../internal/isIterateeCall":382,"../internal/sortedUniq":388}],315:[function(require,module,exports){ -module.exports = require('./includes'); - -},{"./includes":319}],316:[function(require,module,exports){ -module.exports = require('./forEach'); - -},{"./forEach":317}],317:[function(require,module,exports){ -var arrayEach = require('../internal/arrayEach'), - baseEach = require('../internal/baseEach'), - createForEach = require('../internal/createForEach'); - -/** - * Iterates over elements of `collection` invoking `iteratee` for each element. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). Iterator 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 `_.forIn` or `_.forOwn` - * may be used for object iteration. - * - * @static - * @memberOf _ - * @alias each - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array|Object|string} Returns `collection`. - * @example - * - * _([1, 2]).forEach(function(n) { - * console.log(n); - * }).value(); - * // => logs each value from left to right and returns the array - * - * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { - * console.log(n, key); - * }); - * // => logs each value-key pair and returns the object (iteration order is not guaranteed) - */ -var forEach = createForEach(arrayEach, baseEach); - -module.exports = forEach; - -},{"../internal/arrayEach":327,"../internal/baseEach":337,"../internal/createForEach":372}],318:[function(require,module,exports){ -var createAggregator = require('../internal/createAggregator'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an object composed of keys generated from the results of running - * each element of `collection` through `iteratee`. The corresponding value - * of each key is an array of the elements responsible for generating the key. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([4.2, 6.1, 6.4], function(n) { - * return Math.floor(n); - * }); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * _.groupBy([4.2, 6.1, 6.4], function(n) { - * return this.floor(n); - * }, Math); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * // using the `_.property` callback 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]; - } -}); + if (c === info.sliceEnd && + line < this.length) + return "\n"; -module.exports = groupBy; - -},{"../internal/createAggregator":367}],319:[function(require,module,exports){ -var baseIndexOf = require('../internal/baseIndexOf'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'), - isLength = require('../internal/isLength'), - isString = require('../lang/isString'), - values = require('../object/values'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Checks if `value` is in `collection` using `SameValueZero` for equality - * comparisons. If `fromIndex` is negative, it is used as the offset from - * the end of `collection`. - * - * **Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * comparisons are like strict equality comparisons, e.g. `===`, except that - * `NaN` matches `NaN`. - * - * @static - * @memberOf _ - * @alias contains, include - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {*} target The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {boolean} Returns `true` if a matching element 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, target, fromIndex, guard) { - var length = collection ? collection.length : 0; - if (!isLength(length)) { - collection = values(collection); - length = collection.length; - } - if (!length) { - return false; - } - if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { - fromIndex = 0; - } else { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); - } - return (typeof collection == 'string' || !isArray(collection) && isString(collection)) - ? (fromIndex < length && collection.indexOf(target, fromIndex) > -1) - : (baseIndexOf(collection, target, fromIndex) > -1); -} - -module.exports = includes; - -},{"../internal/baseIndexOf":345,"../internal/isIterateeCall":382,"../internal/isLength":383,"../lang/isArray":392,"../lang/isString":401,"../object/values":411}],320:[function(require,module,exports){ -var arrayMap = require('../internal/arrayMap'), - baseCallback = require('../internal/baseCallback'), - baseMap = require('../internal/baseMap'), - isArray = require('../lang/isArray'); - -/** - * Creates an array of values by running each element in `collection` through - * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * Many lodash methods are guarded to work as interatees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, `drop`, - * `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, `parseInt`, - * `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, `trimLeft`, - * `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, `uniq`, and `words` - * - * @static - * @memberOf _ - * @alias collect - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * create a `_.property` or `_.matches` style callback respectively. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new mapped array. - * @example - * - * function timesThree(n) { - * return n * 3; - * } - * - * _.map([1, 2], timesThree); - * // => [3, 6] - * - * _.map({ 'a': 1, 'b': 2 }, timesThree); - * // => [3, 6] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // using the `_.property` callback shorthand - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee, thisArg) { - var func = isArray(collection) ? arrayMap : baseMap; - iteratee = baseCallback(iteratee, thisArg, 3); - return func(collection, iteratee); -} - -module.exports = map; - -},{"../internal/arrayMap":328,"../internal/baseCallback":333,"../internal/baseMap":350,"../lang/isArray":392}],321:[function(require,module,exports){ -var arrayReduceRight = require('../internal/arrayReduceRight'), - baseEachRight = require('../internal/baseEachRight'), - createReduce = require('../internal/createReduce'); - -/** - * This method is like `_.reduce` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @alias foldr - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {*} Returns the accumulated value. - * @example - * - * var array = [[0, 1], [2, 3], [4, 5]]; - * - * _.reduceRight(array, function(flattened, other) { - * return flattened.concat(other); - * }, []); - * // => [4, 5, 2, 3, 0, 1] - */ -var reduceRight = createReduce(arrayReduceRight, baseEachRight); - -module.exports = reduceRight; - -},{"../internal/arrayReduceRight":329,"../internal/baseEachRight":338,"../internal/createReduce":373}],322:[function(require,module,exports){ -var arraySome = require('../internal/arraySome'), - baseCallback = require('../internal/baseCallback'), - baseSome = require('../internal/baseSome'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * The function returns as soon as it finds a passing value and does not iterate - * over the entire collection. The predicate is bound to `thisArg` and invoked - * with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias any - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @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 } - * ]; - * - * // using the `_.matches` callback shorthand - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.some(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.some(users, 'active'); - * // => true - */ -function some(collection, predicate, thisArg) { - var func = isArray(collection) ? arraySome : baseSome; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = null; - } - if (typeof predicate != 'function' || typeof thisArg != 'undefined') { - predicate = baseCallback(predicate, thisArg, 3); - } - return func(collection, predicate); -} - -module.exports = some; - -},{"../internal/arraySome":330,"../internal/baseCallback":333,"../internal/baseSome":357,"../internal/isIterateeCall":382,"../lang/isArray":392}],323:[function(require,module,exports){ -var baseCallback = require('../internal/baseCallback'), - baseEach = require('../internal/baseEach'), - baseSortBy = require('../internal/baseSortBy'), - compareAscending = require('../internal/compareAscending'), - isIterateeCall = require('../internal/isIterateeCall'), - isLength = require('../internal/isLength'); - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection through `iteratee`. This method performs - * a stable sort, that is, it preserves the original sort order of equal elements. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Array|Function|Object|string} [iteratee=_.identity] The function - * invoked per iteration. If a property name or an object is provided it is - * used to create a `_.property` or `_.matches` style callback respectively. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new sorted array. - * @example - * - * _.sortBy([1, 2, 3], function(n) { - * return Math.sin(n); - * }); - * // => [3, 1, 2] - * - * _.sortBy([1, 2, 3], function(n) { - * return this.sin(n); - * }, Math); - * // => [3, 1, 2] - * - * var users = [ - * { 'user': 'fred' }, - * { 'user': 'pebbles' }, - * { 'user': 'barney' } - * ]; - * - * // using the `_.property` callback shorthand - * _.pluck(_.sortBy(users, 'user'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ -function sortBy(collection, iteratee, thisArg) { - if (collection == null) { - return []; - } - var index = -1, - length = collection.length, - result = isLength(length) ? Array(length) : []; - - if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { - iteratee = null; - } - iteratee = baseCallback(iteratee, thisArg, 3); - baseEach(collection, function(value, key, collection) { - result[++index] = { 'criteria': iteratee(value, key, collection), 'index': index, 'value': value }; - }); - return baseSortBy(result, compareAscending); -} - -module.exports = sortBy; - -},{"../internal/baseCallback":333,"../internal/baseEach":337,"../internal/baseSortBy":358,"../internal/compareAscending":366,"../internal/isIterateeCall":382,"../internal/isLength":383}],324:[function(require,module,exports){ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * 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://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). - * - * @static - * @memberOf _ - * @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 = _.restParam(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ -function restParam(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(typeof start == 'undefined' ? (func.length - 1) : (+start || 0), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - rest = Array(length); + if (c >= info.sliceEnd) + return ""; - while (++index < length) { - rest[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, rest); - case 1: return func.call(this, args[0], rest); - case 2: return func.call(this, args[0], args[1], rest); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = rest; - return func.apply(this, otherArgs); + return info.line.charAt(c); }; -} - -module.exports = restParam; -},{}],325:[function(require,module,exports){ -(function (global){ -var cachePush = require('./cachePush'), - isNative = require('../lang/isNative'); + Lp.stripMargin = function(width, skipFirstLine) { + if (width === 0) + return this; -/** Native method references. */ -var Set = isNative(Set = global.Set) && Set; + assert.ok(width > 0, "negative margin: " + width); -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate; + if (skipFirstLine && this.length === 1) + return this; -/** - * - * Creates a cache object to store unique values. - * - * @private - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var length = values ? values.length : 0; + var secret = getSecret(this); - this.data = { 'hash': nativeCreate(null), 'set': new Set }; - while (length--) { - this.push(values[length]); - } -} + var lines = new Lines(secret.infos.map(function(info, i) { + if (info.line && (i > 0 || !skipFirstLine)) { + info = copyLineInfo(info); + info.indent = Math.max(0, info.indent - width); + } + return info; + })); -// Add functions to the `Set` cache. -SetCache.prototype.push = cachePush; - -module.exports = SetCache; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../lang/isNative":396,"./cachePush":365}],326:[function(require,module,exports){ -/** - * 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 arrayCopy(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -module.exports = arrayCopy; - -},{}],327:[function(require,module,exports){ -/** - * A specialized version of `_.forEach` for arrays without support for callback - * shorthands and `this` binding. - * - * @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.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + newMappings.push(mapping.indent(width, skipFirstLine, true)); + }); } - } - return array; -} -module.exports = arrayEach; + return lines; + }; -},{}],328:[function(require,module,exports){ -/** - * A specialized version of `_.map` for arrays without support for callback - * shorthands and `this` binding. - * - * @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.length, - result = Array(length); + Lp.indent = function(by) { + if (by === 0) + return this; - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} + var secret = getSecret(this); -module.exports = arrayMap; + var lines = new Lines(secret.infos.map(function(info) { + if (info.line) { + info = copyLineInfo(info); + info.indent += by; + } + return info + })); -},{}],329:[function(require,module,exports){ -/** - * A specialized version of `_.reduceRight` for arrays without support for - * callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initFromArray] Specify using the last element of `array` - * as the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduceRight(array, iteratee, accumulator, initFromArray) { - var length = array.length; - if (initFromArray && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); - } - return accumulator; -} - -module.exports = arrayReduceRight; - -},{}],330:[function(require,module,exports){ -/** - * A specialized version of `_.some` for arrays without support for callback - * shorthands and `this` binding. - * - * @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.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + newMappings.push(mapping.indent(by)); + }); } - } - return false; -} -module.exports = arraySome; + return lines; + }; -},{}],331:[function(require,module,exports){ -/** - * Used by `_.defaults` to customize its `_.assign` use. - * - * @private - * @param {*} objectValue The destination object property value. - * @param {*} sourceValue The source object property value. - * @returns {*} Returns the value to assign to the destination object. - */ -function assignDefaults(objectValue, sourceValue) { - return typeof objectValue == 'undefined' ? sourceValue : objectValue; -} + Lp.indentTail = function(by) { + if (by === 0) + return this; -module.exports = assignDefaults; + if (this.length < 2) + return this; -},{}],332:[function(require,module,exports){ -var baseCopy = require('./baseCopy'), - keys = require('../object/keys'); - -/** - * The base implementation of `_.assign` without support for argument juggling, - * multiple sources, and `this` binding `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} [customizer] The function to customize assigning values. - * @returns {Object} Returns the destination object. - */ -function baseAssign(object, source, customizer) { - var props = keys(source); - if (!customizer) { - return baseCopy(source, object, props); - } - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index], - value = object[key], - result = customizer(value, source[key], key, object, source); - - if ((result === result ? (result !== value) : (value === value)) || - (typeof value == 'undefined' && !(key in object))) { - object[key] = result; + var secret = getSecret(this); + + var lines = new Lines(secret.infos.map(function(info, i) { + if (i > 0 && info.line) { + info = copyLineInfo(info); + info.indent += by; + } + + return info; + })); + + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + newMappings.push(mapping.indent(by, true)); + }); } - } - return object; -} - -module.exports = baseAssign; - -},{"../object/keys":408,"./baseCopy":336}],333:[function(require,module,exports){ -var baseMatches = require('./baseMatches'), - baseMatchesProperty = require('./baseMatchesProperty'), - baseProperty = require('./baseProperty'), - bindCallback = require('./bindCallback'), - identity = require('../utility/identity'); - -/** - * The base implementation of `_.callback` which supports specifying the - * number of arguments to provide to `func`. - * - * @private - * @param {*} [func=_.identity] The value to convert to a callback. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ -function baseCallback(func, thisArg, argCount) { - var type = typeof func; - if (type == 'function') { - return typeof thisArg == 'undefined' - ? func - : bindCallback(func, thisArg, argCount); - } - if (func == null) { - return identity; - } - if (type == 'object') { - return baseMatches(func); - } - return typeof thisArg == 'undefined' - ? baseProperty(func + '') - : baseMatchesProperty(func + '', thisArg); -} - -module.exports = baseCallback; - -},{"../utility/identity":415,"./baseMatches":351,"./baseMatchesProperty":352,"./baseProperty":355,"./bindCallback":362}],334:[function(require,module,exports){ -var arrayCopy = require('./arrayCopy'), - arrayEach = require('./arrayEach'), - baseCopy = require('./baseCopy'), - baseForOwn = require('./baseForOwn'), - initCloneArray = require('./initCloneArray'), - initCloneByTag = require('./initCloneByTag'), - initCloneObject = require('./initCloneObject'), - isArray = require('../lang/isArray'), - isObject = require('../lang/isObject'), - keys = require('../object/keys'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = -cloneableTags[dateTag] = cloneableTags[float32Tag] = -cloneableTags[float64Tag] = cloneableTags[int8Tag] = -cloneableTags[int16Tag] = cloneableTags[int32Tag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[stringTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[mapTag] = cloneableTags[setTag] = -cloneableTags[weakMapTag] = false; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * The base implementation of `_.clone` without support for argument juggling - * and `this` binding `customizer` functions. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The object `value` belongs to. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates clones with source counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { - var result; - if (customizer) { - result = object ? customizer(value, key, object) : customizer(value); - } - if (typeof result != 'undefined') { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return arrayCopy(value, result); + + return lines; + }; + + Lp.getIndentAt = function(line) { + assert.ok(line >= 1, "no line " + line + " (line numbers start from 1)"); + var secret = getSecret(this), + info = secret.infos[line - 1]; + return Math.max(info.indent, 0); + }; + + Lp.guessTabWidth = function() { + var secret = getSecret(this); + if (hasOwn.call(secret, "cachedTabWidth")) { + return secret.cachedTabWidth; } - } else { - var tag = objToString.call(value), - isFunc = tag == funcTag; - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return baseCopy(value, result, keys(value)); + var counts = []; // Sparse array. + var lastIndent = 0; + + for (var line = 1, last = this.length; line <= last; ++line) { + var info = secret.infos[line - 1]; + var sliced = info.line.slice(info.sliceStart, info.sliceEnd); + + // Whitespace-only lines don't tell us much about the likely tab + // width of this code. + if (isOnlyWhitespace(sliced)) { + continue; } - } else { - return cloneableTags[tag] - ? initCloneByTag(value, tag, isDeep) - : (object ? value : {}); + + var diff = Math.abs(info.indent - lastIndent); + counts[diff] = ~~counts[diff] + 1; + lastIndent = info.indent; } - } - // Check for circular references and return corresponding clone. - stackA || (stackA = []); - stackB || (stackB = []); - var length = stackA.length; - while (length--) { - if (stackA[length] == value) { - return stackB[length]; + var maxCount = -1; + var result = 2; + + for (var tabWidth = 1; + tabWidth < counts.length; + tabWidth += 1) { + if (hasOwn.call(counts, tabWidth) && + counts[tabWidth] > maxCount) { + maxCount = counts[tabWidth]; + result = tabWidth; + } } - } - // Add the source value to the stack of traversed objects and associate it with its clone. - stackA.push(value); - stackB.push(result); - // Recursively populate clone (susceptible to call stack limits). - (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { - result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); - }); - return result; -} - -module.exports = baseClone; - -},{"../lang/isArray":392,"../lang/isObject":398,"../object/keys":408,"./arrayCopy":326,"./arrayEach":327,"./baseCopy":336,"./baseForOwn":342,"./initCloneArray":378,"./initCloneByTag":379,"./initCloneObject":380}],335:[function(require,module,exports){ -/** - * The base implementation of `compareAscending` which compares values and - * sorts them in ascending order without guaranteeing a stable sort. - * - * @private - * @param {*} value The value to compare to `other`. - * @param {*} other The value to compare to `value`. - * @returns {number} Returns the sort order indicator for `value`. - */ -function baseCompareAscending(value, other) { - if (value !== other) { - var valIsReflexive = value === value, - othIsReflexive = other === other; - - if (value > other || !valIsReflexive || (typeof value == 'undefined' && othIsReflexive)) { - return 1; - } - if (value < other || !othIsReflexive || (typeof other == 'undefined' && valIsReflexive)) { - return -1; + return secret.cachedTabWidth = result; + }; + + Lp.isOnlyWhitespace = function() { + return isOnlyWhitespace(this.toString()); + }; + + Lp.isPrecededOnlyByWhitespace = function(pos) { + var secret = getSecret(this); + var info = secret.infos[pos.line - 1]; + var indent = Math.max(info.indent, 0); + + var diff = pos.column - indent; + if (diff <= 0) { + // If pos.column does not exceed the indentation amount, then + // there must be only whitespace before it. + return true; } - } - return 0; -} -module.exports = baseCompareAscending; + var start = info.sliceStart; + var end = Math.min(start + diff, info.sliceEnd); + var prefix = info.line.slice(start, end); -},{}],336:[function(require,module,exports){ -/** - * Copies the properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Object} [object={}] The object to copy properties to. - * @param {Array} props The property names to copy. - * @returns {Object} Returns `object`. - */ -function baseCopy(source, object, props) { - if (!props) { - props = object; - object = {}; - } - var index = -1, - length = props.length; + return isOnlyWhitespace(prefix); + }; - while (++index < length) { - var key = props[index]; - object[key] = source[key]; - } - return object; -} + Lp.getLineLength = function(line) { + var secret = getSecret(this), + info = secret.infos[line - 1]; + return this.getIndentAt(line) + info.sliceEnd - info.sliceStart; + }; -module.exports = baseCopy; + Lp.nextPos = function(pos, skipSpaces) { + var l = Math.max(pos.line, 0), + c = Math.max(pos.column, 0); -},{}],337:[function(require,module,exports){ -var baseForOwn = require('./baseForOwn'), - createBaseEach = require('./createBaseEach'); - -/** - * The base implementation of `_.forEach` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object|string} Returns `collection`. - */ -var baseEach = createBaseEach(baseForOwn); - -module.exports = baseEach; - -},{"./baseForOwn":342,"./createBaseEach":369}],338:[function(require,module,exports){ -var baseForOwnRight = require('./baseForOwnRight'), - createBaseEach = require('./createBaseEach'); - -/** - * The base implementation of `_.forEachRight` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object|string} Returns `collection`. - */ -var baseEachRight = createBaseEach(baseForOwnRight, true); - -module.exports = baseEachRight; - -},{"./baseForOwnRight":343,"./createBaseEach":369}],339:[function(require,module,exports){ -var isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isLength = require('./isLength'), - isObjectLike = require('./isObjectLike'); - -/** - * The base implementation of `_.flatten` with added support for restricting - * flattening and specifying the start index. - * - * @private - * @param {Array} array The array to flatten. - * @param {boolean} isDeep Specify a deep flatten. - * @param {boolean} isStrict Restrict flattening to arrays and `arguments` objects. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, isDeep, isStrict) { - var index = -1, - length = array.length, - resIndex = -1, - result = []; + if (c < this.getLineLength(l)) { + pos.column += 1; - while (++index < length) { - var value = array[index]; - - if (isObjectLike(value) && isLength(value.length) && (isArray(value) || isArguments(value))) { - if (isDeep) { - // Recursively flatten arrays (susceptible to call stack limits). - value = baseFlatten(value, isDeep, isStrict); - } - var valIndex = -1, - valLength = value.length; - - result.length += valLength; - while (++valIndex < valLength) { - result[++resIndex] = value[valIndex]; - } - } else if (!isStrict) { - result[++resIndex] = value; - } - } - return result; -} - -module.exports = baseFlatten; - -},{"../lang/isArguments":391,"../lang/isArray":392,"./isLength":383,"./isObjectLike":384}],340:[function(require,module,exports){ -var createBaseFor = require('./createBaseFor'); - -/** - * The base implementation of `baseForIn` and `baseForOwn` which iterates - * over `object` properties returned by `keysFunc` invoking `iteratee` for - * each property. Iterator functions may exit iteration early by explicitly - * returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -module.exports = baseFor; - -},{"./createBaseFor":370}],341:[function(require,module,exports){ -var baseFor = require('./baseFor'), - keysIn = require('../object/keysIn'); - -/** - * The base implementation of `_.forIn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForIn(object, iteratee) { - return baseFor(object, iteratee, keysIn); -} - -module.exports = baseForIn; - -},{"../object/keysIn":409,"./baseFor":340}],342:[function(require,module,exports){ -var baseFor = require('./baseFor'), - keys = require('../object/keys'); - -/** - * The base implementation of `_.forOwn` without support for callback - * shorthands and `this` binding. - * - * @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 baseFor(object, iteratee, keys); -} - -module.exports = baseForOwn; - -},{"../object/keys":408,"./baseFor":340}],343:[function(require,module,exports){ -var baseForRight = require('./baseForRight'), - keys = require('../object/keys'); - -/** - * The base implementation of `_.forOwnRight` without support for callback - * shorthands and `this` binding. - * - * @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 baseForRight(object, iteratee, keys); -} - -module.exports = baseForOwnRight; - -},{"../object/keys":408,"./baseForRight":344}],344:[function(require,module,exports){ -var createBaseFor = require('./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); - -module.exports = baseForRight; - -},{"./createBaseFor":370}],345:[function(require,module,exports){ -var indexOfNaN = require('./indexOfNaN'); - -/** - * The base implementation of `_.indexOf` without support for binary searches. - * - * @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; -} - -module.exports = baseIndexOf; - -},{"./indexOfNaN":377}],346:[function(require,module,exports){ -var baseIsEqualDeep = require('./baseIsEqualDeep'); - -/** - * The base implementation of `_.isEqual` without support for `this` binding - * `customizer` functions. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { - // Exit early for identical values. - if (value === other) { - // Treat `+0` vs. `-0` as not equal. - return value !== 0 || (1 / value == 1 / other); - } - var valType = typeof value, - othType = typeof other; - - // Exit early for unlike primitive values. - if ((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') || - value == null || other == null) { - // Return `false` unless both values are `NaN`. - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); -} - -module.exports = baseIsEqual; - -},{"./baseIsEqualDeep":347}],347:[function(require,module,exports){ -var equalArrays = require('./equalArrays'), - equalByTag = require('./equalByTag'), - equalObjects = require('./equalObjects'), - isArray = require('../lang/isArray'), - isTypedArray = require('../lang/isTypedArray'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - funcTag = '[object Function]', - objectTag = '[object Object]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * 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 comparing objects. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `value` objects. - * @param {Array} [stackB=[]] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = arrayTag, - othTag = arrayTag; - - if (!objIsArr) { - objTag = objToString.call(object); - if (objTag == argsTag) { - objTag = objectTag; - } else if (objTag != objectTag) { - objIsArr = isTypedArray(object); - } - } - if (!othIsArr) { - othTag = objToString.call(other); - if (othTag == argsTag) { - othTag = objectTag; - } else if (othTag != objectTag) { - othIsArr = isTypedArray(other); - } - } - var objIsObj = (objTag == objectTag || (isLoose && objTag == funcTag)), - othIsObj = (othTag == objectTag || (isLoose && othTag == funcTag)), - isSameTag = objTag == othTag; - - if (isSameTag && !(objIsArr || objIsObj)) { - return equalByTag(object, other, objTag); - } - if (isLoose) { - if (!isSameTag && !(objIsObj && othIsObj)) { - return false; + return skipSpaces + ? !!this.skipSpaces(pos, false, true) + : true; } - } else { - var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - if (valWrapped || othWrapped) { - return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); + if (l < this.length) { + pos.line += 1; + pos.column = 0; + + return skipSpaces + ? !!this.skipSpaces(pos, false, true) + : true; } - if (!isSameTag) { - return false; + + return false; + }; + + Lp.prevPos = function(pos, skipSpaces) { + var l = pos.line, + c = pos.column; + + if (c < 1) { + l -= 1; + + if (l < 1) + return false; + + c = this.getLineLength(l); + + } else { + c = Math.min(c - 1, this.getLineLength(l)); } - } - // Assume cyclic values are equal. - // For more information on detecting circular references see https://es5.github.io/#JO. - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == object) { - return stackB[length] == other; - } - } - // Add `object` and `other` to the stack of traversed objects. - stackA.push(object); - stackB.push(other); - - var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); - - stackA.pop(); - stackB.pop(); - - return result; -} - -module.exports = baseIsEqualDeep; - -},{"../lang/isArray":392,"../lang/isTypedArray":402,"./equalArrays":374,"./equalByTag":375,"./equalObjects":376}],348:[function(require,module,exports){ -/** - * The base implementation of `_.isFunction` without support for environments - * with incorrect `typeof` results. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - */ -function baseIsFunction(value) { - // Avoid a Chakra JIT bug in compatibility modes of IE 11. - // See https://github.com/jashkenas/underscore/issues/1621 for more details. - return typeof value == 'function' || false; -} - -module.exports = baseIsFunction; - -},{}],349:[function(require,module,exports){ -var baseIsEqual = require('./baseIsEqual'); - -/** - * The base implementation of `_.isMatch` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} props The source property names to match. - * @param {Array} values The source values to match. - * @param {Array} strictCompareFlags Strict comparison flags for source values. - * @param {Function} [customizer] The function to customize comparing objects. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, props, values, strictCompareFlags, customizer) { - var index = -1, - length = props.length, - noCustomizer = !customizer; - - while (++index < length) { - if ((noCustomizer && strictCompareFlags[index]) - ? values[index] !== object[props[index]] - : !(props[index] in object) - ) { - return false; + + pos.line = l; + pos.column = c; + + return skipSpaces + ? !!this.skipSpaces(pos, true, true) + : true; + }; + + Lp.firstPos = function() { + // Trivial, but provided for completeness. + return { line: 1, column: 0 }; + }; + + Lp.lastPos = function() { + return { + line: this.length, + column: this.getLineLength(this.length) + }; + }; + + Lp.skipSpaces = function(pos, backward, modifyInPlace) { + if (pos) { + pos = modifyInPlace ? pos : { + line: pos.line, + column: pos.column + }; + } else if (backward) { + pos = this.lastPos(); + } else { + pos = this.firstPos(); } - } - index = -1; - while (++index < length) { - var key = props[index], - objValue = object[key], - srcValue = values[index]; - if (noCustomizer && strictCompareFlags[index]) { - var result = typeof objValue != 'undefined' || (key in object); + if (backward) { + while (this.prevPos(pos)) { + if (!isOnlyWhitespace(this.charAt(pos)) && + this.nextPos(pos)) { + return pos; + } + } + + return null; + } else { - result = customizer ? customizer(objValue, srcValue, key) : undefined; - if (typeof result == 'undefined') { - result = baseIsEqual(srcValue, objValue, customizer, true); + while (isOnlyWhitespace(this.charAt(pos))) { + if (!this.nextPos(pos)) { + return null; + } } + + return pos; } - if (!result) { - return false; - } - } - return true; -} + }; -module.exports = baseIsMatch; + Lp.trimLeft = function() { + var pos = this.skipSpaces(this.firstPos(), false, true); + return pos ? this.slice(pos) : emptyLines; + }; -},{"./baseIsEqual":346}],350:[function(require,module,exports){ -var baseEach = require('./baseEach'); + Lp.trimRight = function() { + var pos = this.skipSpaces(this.lastPos(), true, true); + return pos ? this.slice(this.firstPos(), pos) : emptyLines; + }; -/** - * The base implementation of `_.map` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array|Object|string} 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 result = []; - baseEach(collection, function(value, key, collection) { - result.push(iteratee(value, key, collection)); - }); - return result; -} - -module.exports = baseMap; - -},{"./baseEach":337}],351:[function(require,module,exports){ -var baseIsMatch = require('./baseIsMatch'), - constant = require('../utility/constant'), - isStrictComparable = require('./isStrictComparable'), - keys = require('../object/keys'), - toObject = require('./toObject'); - -/** - * The base implementation of `_.matches` which does not clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. - */ -function baseMatches(source) { - var props = keys(source), - length = props.length; - - if (!length) { - return constant(true); - } - if (length == 1) { - var key = props[0], - value = source[key]; + Lp.trim = function() { + var start = this.skipSpaces(this.firstPos(), false, true); + if (start === null) + return emptyLines; - if (isStrictComparable(value)) { - return function(object) { - return object != null && object[key] === value && - (typeof value != 'undefined' || (key in toObject(object))); - }; - } - } - var values = Array(length), - strictCompareFlags = Array(length); + var end = this.skipSpaces(this.lastPos(), true, true); + assert.notStrictEqual(end, null); - while (length--) { - value = source[props[length]]; - values[length] = value; - strictCompareFlags[length] = isStrictComparable(value); - } - return function(object) { - return object != null && baseIsMatch(toObject(object), props, values, strictCompareFlags); + return this.slice(start, end); }; -} -module.exports = baseMatches; + Lp.eachPos = function(callback, startPos, skipSpaces) { + var pos = this.firstPos(); -},{"../object/keys":408,"../utility/constant":414,"./baseIsMatch":349,"./isStrictComparable":385,"./toObject":389}],352:[function(require,module,exports){ -var baseIsEqual = require('./baseIsEqual'), - isStrictComparable = require('./isStrictComparable'), - toObject = require('./toObject'); + if (startPos) { + pos.line = startPos.line, + pos.column = startPos.column + } -/** - * The base implementation of `_.matchesProperty` which does not coerce `key` - * to a string. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} value The value to compare. - * @returns {Function} Returns the new function. - */ -function baseMatchesProperty(key, value) { - if (isStrictComparable(value)) { - return function(object) { - return object != null && object[key] === value && - (typeof value != 'undefined' || (key in toObject(object))); - }; - } - return function(object) { - return object != null && baseIsEqual(value, object[key], null, true); - }; -} - -module.exports = baseMatchesProperty; - -},{"./baseIsEqual":346,"./isStrictComparable":385,"./toObject":389}],353:[function(require,module,exports){ -var arrayEach = require('./arrayEach'), - baseForOwn = require('./baseForOwn'), - baseMergeDeep = require('./baseMergeDeep'), - isArray = require('../lang/isArray'), - isLength = require('./isLength'), - isObject = require('../lang/isObject'), - isObjectLike = require('./isObjectLike'), - isTypedArray = require('../lang/isTypedArray'); - -/** - * The base implementation of `_.merge` without support for argument juggling, - * multiple sources, and `this` binding `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} [customizer] The function to customize merging properties. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. - * @returns {Object} Returns the destination object. - */ -function baseMerge(object, source, customizer, stackA, stackB) { - if (!isObject(object)) { - return object; - } - var isSrcArr = isLength(source.length) && (isArray(source) || isTypedArray(source)); - (isSrcArr ? arrayEach : baseForOwn)(source, function(srcValue, key, source) { - if (isObjectLike(srcValue)) { - stackA || (stackA = []); - stackB || (stackB = []); - return baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); + if (skipSpaces && !this.skipSpaces(pos, false, true)) { + return; // Encountered nothing but spaces. } - var value = object[key], - result = customizer ? customizer(value, srcValue, key, object, source) : undefined, - isCommon = typeof result == 'undefined'; - if (isCommon) { - result = srcValue; + do callback.call(this, pos); + while (this.nextPos(pos, skipSpaces)); + }; + + Lp.bootstrapSlice = function(start, end) { + var strings = this.toString().split("\n").slice( + start.line - 1, end.line); + + strings.push(strings.pop().slice(0, end.column)); + strings[0] = strings[0].slice(start.column); + + return fromString(strings.join("\n")); + }; + + Lp.slice = function(start, end) { + if (!end) { + if (!start) { + // The client seems to want a copy of this Lines object, but + // Lines objects are immutable, so it's perfectly adequate to + // return the same object. + return this; + } + + // Slice to the end if no end position was provided. + end = this.lastPos(); } - if ((isSrcArr || typeof result != 'undefined') && - (isCommon || (result === result ? (result !== value) : (value === value)))) { - object[key] = result; + + var secret = getSecret(this); + var sliced = secret.infos.slice(start.line - 1, end.line); + + if (start.line === end.line) { + sliced[0] = sliceInfo(sliced[0], start.column, end.column); + } else { + assert.ok(start.line < end.line); + sliced[0] = sliceInfo(sliced[0], start.column); + sliced.push(sliceInfo(sliced.pop(), 0, end.column)); } - }); - return object; -} - -module.exports = baseMerge; - -},{"../lang/isArray":392,"../lang/isObject":398,"../lang/isTypedArray":402,"./arrayEach":327,"./baseForOwn":342,"./baseMergeDeep":354,"./isLength":383,"./isObjectLike":384}],354:[function(require,module,exports){ -var arrayCopy = require('./arrayCopy'), - isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isLength = require('./isLength'), - isPlainObject = require('../lang/isPlainObject'), - isTypedArray = require('../lang/isTypedArray'), - toPlainObject = require('../lang/toPlainObject'); - -/** - * 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 {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize merging properties. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { - var length = stackA.length, - srcValue = source[key]; - - while (length--) { - if (stackA[length] == srcValue) { - object[key] = stackB[length]; - return; + + var lines = new Lines(sliced); + + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + var sliced = mapping.slice(this, start, end); + if (sliced) { + newMappings.push(sliced); + } + }, this); } - } - var value = object[key], - result = customizer ? customizer(value, srcValue, key, object, source) : undefined, - isCommon = typeof result == 'undefined'; - if (isCommon) { - result = srcValue; - if (isLength(srcValue.length) && (isArray(srcValue) || isTypedArray(srcValue))) { - result = isArray(value) - ? value - : ((value && value.length) ? arrayCopy(value) : []); + return lines; + }; + + function sliceInfo(info, startCol, endCol) { + var sliceStart = info.sliceStart; + var sliceEnd = info.sliceEnd; + var indent = Math.max(info.indent, 0); + var lineLength = indent + sliceEnd - sliceStart; + + if (typeof endCol === "undefined") { + endCol = lineLength; } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - result = isArguments(value) - ? toPlainObject(value) - : (isPlainObject(value) ? value : {}); + + startCol = Math.max(startCol, 0); + endCol = Math.min(endCol, lineLength); + endCol = Math.max(endCol, startCol); + + if (endCol < indent) { + indent = endCol; + sliceEnd = sliceStart; + } else { + sliceEnd -= lineLength - endCol; } - else { - isCommon = false; + + lineLength = endCol; + lineLength -= startCol; + + if (startCol < indent) { + indent -= startCol; + } else { + startCol -= indent; + indent = 0; + sliceStart += startCol; } - } - // Add the source value to the stack of traversed objects and associate - // it with its merged value. - stackA.push(srcValue); - stackB.push(result); - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); - } else if (result === result ? (result !== value) : (value === value)) { - object[key] = result; - } -} + assert.ok(indent >= 0); + assert.ok(sliceStart <= sliceEnd); + assert.strictEqual(lineLength, indent + sliceEnd - sliceStart); + + if (info.indent === indent && + info.sliceStart === sliceStart && + info.sliceEnd === sliceEnd) { + return info; + } -module.exports = baseMergeDeep; + return { + line: info.line, + indent: indent, + sliceStart: sliceStart, + sliceEnd: sliceEnd + }; + } -},{"../lang/isArguments":391,"../lang/isArray":392,"../lang/isPlainObject":399,"../lang/isTypedArray":402,"../lang/toPlainObject":403,"./arrayCopy":326,"./isLength":383}],355:[function(require,module,exports){ -/** - * The base implementation of `_.property` which does not coerce `key` to a string. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; + Lp.bootstrapSliceString = function(start, end, options) { + return this.slice(start, end).toString(options); }; -} -module.exports = baseProperty; + Lp.sliceString = function(start, end, options) { + if (!end) { + if (!start) { + // The client seems to want a copy of this Lines object, but + // Lines objects are immutable, so it's perfectly adequate to + // return the same object. + return this; + } -},{}],356:[function(require,module,exports){ -/** - * The base implementation of `_.reduce` and `_.reduceRight` without support - * for callback shorthands and `this` binding, which iterates over `collection` - * using the provided `eachFunc`. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initFromCollection 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, initFromCollection, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initFromCollection - ? (initFromCollection = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} + // Slice to the end if no end position was provided. + end = this.lastPos(); + } -module.exports = baseReduce; + options = normalizeOptions(options); -},{}],357:[function(require,module,exports){ -var baseEach = require('./baseEach'); - -/** - * The base implementation of `_.some` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array|Object|string} 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; -} - -module.exports = baseSome; - -},{"./baseEach":337}],358:[function(require,module,exports){ -/** - * 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; -} - -module.exports = baseSortBy; - -},{}],359:[function(require,module,exports){ -/** - * Converts `value` to a string if it is not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - if (typeof value == 'string') { - return value; - } - return value == null ? '' : (value + ''); -} - -module.exports = baseToString; - -},{}],360:[function(require,module,exports){ -var baseIndexOf = require('./baseIndexOf'), - cacheIndexOf = require('./cacheIndexOf'), - createCache = require('./createCache'); - -/** - * The base implementation of `_.uniq` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate-value-free array. - */ -function baseUniq(array, iteratee) { - var index = -1, - indexOf = baseIndexOf, - length = array.length, - isCommon = true, - isLarge = isCommon && length >= 200, - seen = isLarge ? createCache() : null, - result = []; + var infos = getSecret(this).infos; + var parts = []; + var tabWidth = options.tabWidth; - if (seen) { - indexOf = cacheIndexOf; - isCommon = false; - } else { - isLarge = false; - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value, index, array) : value; + for (var line = start.line; line <= end.line; ++line) { + var info = infos[line - 1]; - if (isCommon && value === value) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; + if (line === start.line) { + if (line === end.line) { + info = sliceInfo(info, start.column, end.column); + } else { + info = sliceInfo(info, start.column); } + } else if (line === end.line) { + info = sliceInfo(info, 0, end.column); } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (indexOf(seen, computed, 0) < 0) { - if (iteratee || isLarge) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} -module.exports = baseUniq; + var indent = Math.max(info.indent, 0); -},{"./baseIndexOf":345,"./cacheIndexOf":364,"./createCache":371}],361:[function(require,module,exports){ -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * returned by `keysFunc`. - * - * @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) { - var index = -1, - length = props.length, - result = Array(length); + var before = info.line.slice(0, info.sliceStart); + if (options.reuseWhitespace && + isOnlyWhitespace(before) && + countSpaces(before, options.tabWidth) === indent) { + // Reuse original spaces if the indentation is correct. + parts.push(info.line.slice(0, info.sliceEnd)); + continue; + } - while (++index < length) { - result[index] = object[props[index]]; - } - return result; -} + var tabs = 0; + var spaces = indent; -module.exports = baseValues; + if (options.useTabs) { + tabs = Math.floor(indent / tabWidth); + spaces -= tabs * tabWidth; + } -},{}],362:[function(require,module,exports){ -var identity = require('../utility/identity'); - -/** - * A specialized version of `baseCallback` which only supports `this` binding - * and specifying the number of arguments to provide to `func`. - * - * @private - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ -function bindCallback(func, thisArg, argCount) { - if (typeof func != 'function') { - return identity; - } - if (typeof thisArg == 'undefined') { - return func; - } - switch (argCount) { - case 1: return function(value) { - return func.call(thisArg, value); - }; - case 3: return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(thisArg, accumulator, value, index, collection); - }; - case 5: return function(value, other, key, object, source) { - return func.call(thisArg, value, other, key, object, source); - }; - } - return function() { - return func.apply(thisArg, arguments); - }; -} - -module.exports = bindCallback; - -},{"../utility/identity":415}],363:[function(require,module,exports){ -(function (global){ -var constant = require('../utility/constant'), - isNative = require('../lang/isNative'); - -/** Native method references. */ -var ArrayBuffer = isNative(ArrayBuffer = global.ArrayBuffer) && ArrayBuffer, - bufferSlice = isNative(bufferSlice = ArrayBuffer && new ArrayBuffer(0).slice) && bufferSlice, - floor = Math.floor, - Uint8Array = isNative(Uint8Array = global.Uint8Array) && Uint8Array; - -/** Used to clone array buffers. */ -var Float64Array = (function() { - // Safari 5 errors when using an array buffer to initialize a typed array - // where the array buffer's `byteLength` is not a multiple of the typed - // array's `BYTES_PER_ELEMENT`. - try { - var func = isNative(func = global.Float64Array) && func, - result = new func(new ArrayBuffer(10), 0, 1) && func; - } catch(e) {} - return result; -}()); - -/** Used as the size, in bytes, of each `Float64Array` element. */ -var FLOAT64_BYTES_PER_ELEMENT = Float64Array ? Float64Array.BYTES_PER_ELEMENT : 0; - -/** - * Creates a clone of the given array buffer. - * - * @private - * @param {ArrayBuffer} buffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function bufferClone(buffer) { - return bufferSlice.call(buffer, 0); -} -if (!bufferSlice) { - // PhantomJS has `ArrayBuffer` and `Uint8Array` but not `Float64Array`. - bufferClone = !(ArrayBuffer && Uint8Array) ? constant(null) : function(buffer) { - var byteLength = buffer.byteLength, - floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0, - offset = floatLength * FLOAT64_BYTES_PER_ELEMENT, - result = new ArrayBuffer(byteLength); - - if (floatLength) { - var view = new Float64Array(result, 0, floatLength); - view.set(new Float64Array(buffer, 0, floatLength)); - } - if (byteLength != offset) { - view = new Uint8Array(result, offset); - view.set(new Uint8Array(buffer, offset)); - } - return result; - }; -} - -module.exports = bufferClone; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../lang/isNative":396,"../utility/constant":414}],364:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * Checks if `value` is in `cache` mimicking the return signature of - * `_.indexOf` by returning `0` if the value is found, else `-1`. - * - * @private - * @param {Object} cache The cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `0` if `value` is found, else `-1`. - */ -function cacheIndexOf(cache, value) { - var data = cache.data, - result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; - - return result ? 0 : -1; -} - -module.exports = cacheIndexOf; - -},{"../lang/isObject":398}],365:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * Adds `value` to the cache. - * - * @private - * @name push - * @memberOf SetCache - * @param {*} value The value to cache. - */ -function cachePush(value) { - var data = this.data; - if (typeof value == 'string' || isObject(value)) { - data.set.add(value); - } else { - data.hash[value] = true; - } -} - -module.exports = cachePush; - -},{"../lang/isObject":398}],366:[function(require,module,exports){ -var baseCompareAscending = require('./baseCompareAscending'); - -/** - * Used by `_.sortBy` to compare transformed elements of a collection and stable - * sort them in ascending order. - * - * @private - * @param {Object} object The object to compare to `other`. - * @param {Object} other The object to compare to `object`. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareAscending(object, other) { - return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index); -} - -module.exports = compareAscending; - -},{"./baseCompareAscending":335}],367:[function(require,module,exports){ -var baseCallback = require('./baseCallback'), - baseEach = require('./baseEach'), - isArray = require('../lang/isArray'); - -/** - * Creates a function that aggregates a collection, creating an accumulator - * object composed from the results of running each element in the collection - * through an iteratee. - * - * **Note:** This function is used to create `_.countBy`, `_.groupBy`, `_.indexBy`, - * and `_.partition`. - * - * @private - * @param {Function} setter The function to set keys and values of the accumulator object. - * @param {Function} [initializer] The function to initialize the accumulator object. - * @returns {Function} Returns the new aggregator function. - */ -function createAggregator(setter, initializer) { - return function(collection, iteratee, thisArg) { - var result = initializer ? initializer() : {}; - iteratee = baseCallback(iteratee, thisArg, 3); + var result = ""; - if (isArray(collection)) { - var index = -1, - length = collection.length; + if (tabs > 0) { + result += new Array(tabs + 1).join("\t"); + } - while (++index < length) { - var value = collection[index]; - setter(result, value, iteratee(value, index, collection), collection); + if (spaces > 0) { + result += new Array(spaces + 1).join(" "); } - } else { - baseEach(collection, function(value, key, collection) { - setter(result, value, iteratee(value, key, collection), collection); - }); - } - return result; - }; -} - -module.exports = createAggregator; - -},{"../lang/isArray":392,"./baseCallback":333,"./baseEach":337}],368:[function(require,module,exports){ -var bindCallback = require('./bindCallback'), - isIterateeCall = require('./isIterateeCall'); - -/** - * Creates a function that assigns properties of source object(s) to a given - * destination object. - * - * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return function() { - var args = arguments, - length = args.length, - object = args[0]; - if (length < 2 || object == null) { - return object; - } - var customizer = args[length - 2], - thisArg = args[length - 1], - guard = args[3]; + result += info.line.slice(info.sliceStart, info.sliceEnd); - if (length > 3 && typeof customizer == 'function') { - customizer = bindCallback(customizer, thisArg, 5); - length -= 2; - } else { - customizer = (length > 2 && typeof thisArg == 'function') ? thisArg : null; - length -= (customizer ? 1 : 0); - } - if (guard && isIterateeCall(args[1], args[2], guard)) { - customizer = length == 3 ? null : customizer; - length = 2; - } - var index = 0; - while (++index < length) { - var source = args[index]; - if (source) { - assigner(object, source, customizer); - } + parts.push(result); } - return object; + + return parts.join("\n"); }; -} -module.exports = createAssigner; + Lp.isEmpty = function() { + return this.length < 2 && this.getLineLength(1) < 1; + }; -},{"./bindCallback":362,"./isIterateeCall":382}],369:[function(require,module,exports){ -var isLength = require('./isLength'), - toObject = require('./toObject'); + Lp.join = function(elements) { + var separator = this; + var separatorSecret = getSecret(separator); + var infos = []; + var mappings = []; + var prevInfo; -/** - * 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) { - var length = collection ? collection.length : 0; - if (!isLength(length)) { - return eachFunc(collection, iteratee); - } - var index = fromRight ? length : -1, - iterable = toObject(collection); + function appendSecret(secret) { + if (secret === null) + return; - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} + if (prevInfo) { + var info = secret.infos[0]; + var indent = new Array(info.indent + 1).join(" "); + var prevLine = infos.length; + var prevColumn = Math.max(prevInfo.indent, 0) + + prevInfo.sliceEnd - prevInfo.sliceStart; -module.exports = createBaseEach; + prevInfo.line = prevInfo.line.slice( + 0, prevInfo.sliceEnd) + indent + info.line.slice( + info.sliceStart, info.sliceEnd); -},{"./isLength":383,"./toObject":389}],370:[function(require,module,exports){ -var toObject = require('./toObject'); + prevInfo.sliceEnd = prevInfo.line.length; -/** - * Creates a base function for `_.forIn` or `_.forInRight`. - * - * @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 iterable = toObject(object), - props = keysFunc(object), - length = props.length, - index = fromRight ? length : -1; + if (secret.mappings.length > 0) { + secret.mappings.forEach(function(mapping) { + mappings.push(mapping.add(prevLine, prevColumn)); + }); + } - while ((fromRight ? index-- : ++index < length)) { - var key = props[index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; + } else if (secret.mappings.length > 0) { + mappings.push.apply(mappings, secret.mappings); } - } - return object; - }; -} - -module.exports = createBaseFor; - -},{"./toObject":389}],371:[function(require,module,exports){ -(function (global){ -var SetCache = require('./SetCache'), - constant = require('../utility/constant'), - isNative = require('../lang/isNative'); - -/** Native method references. */ -var Set = isNative(Set = global.Set) && Set; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate; - -/** - * Creates a `Set` cache object to optimize linear searches of large arrays. - * - * @private - * @param {Array} [values] The values to cache. - * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. - */ -var createCache = !(nativeCreate && Set) ? constant(null) : function(values) { - return new SetCache(values); -}; - -module.exports = createCache; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../lang/isNative":396,"../utility/constant":414,"./SetCache":325}],372:[function(require,module,exports){ -var bindCallback = require('./bindCallback'), - isArray = require('../lang/isArray'); - -/** - * Creates a function for `_.forEach` or `_.forEachRight`. - * - * @private - * @param {Function} arrayFunc The function to iterate over an array. - * @param {Function} eachFunc The function to iterate over a collection. - * @returns {Function} Returns the new each function. - */ -function createForEach(arrayFunc, eachFunc) { - return function(collection, iteratee, thisArg) { - return (typeof iteratee == 'function' && typeof thisArg == 'undefined' && isArray(collection)) - ? arrayFunc(collection, iteratee) - : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); - }; -} - -module.exports = createForEach; - -},{"../lang/isArray":392,"./bindCallback":362}],373:[function(require,module,exports){ -var baseCallback = require('./baseCallback'), - baseReduce = require('./baseReduce'), - isArray = require('../lang/isArray'); - -/** - * Creates a function for `_.reduce` or `_.reduceRight`. - * - * @private - * @param {Function} arrayFunc The function to iterate over an array. - * @param {Function} eachFunc The function to iterate over a collection. - * @returns {Function} Returns the new each function. - */ -function createReduce(arrayFunc, eachFunc) { - return function(collection, iteratee, accumulator, thisArg) { - var initFromArray = arguments.length < 3; - return (typeof iteratee == 'function' && typeof thisArg == 'undefined' && isArray(collection)) - ? arrayFunc(collection, iteratee, accumulator, initFromArray) - : baseReduce(collection, baseCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc); - }; -} - -module.exports = createReduce; - -},{"../lang/isArray":392,"./baseCallback":333,"./baseReduce":356}],374:[function(require,module,exports){ -/** - * 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 comparing arrays. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { - var index = -1, - arrLength = array.length, - othLength = other.length, - result = true; - - if (arrLength != othLength && !(isLoose && othLength > arrLength)) { - return false; - } - // Deep compare the contents, ignoring non-numeric properties. - while (result && ++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - result = undefined; - if (customizer) { - result = isLoose - ? customizer(othValue, arrValue, index) - : customizer(arrValue, othValue, index); - } - if (typeof result == 'undefined') { - // Recursively compare arrays (susceptible to call stack limits). - if (isLoose) { - var othIndex = othLength; - while (othIndex--) { - othValue = other[othIndex]; - result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); - if (result) { - break; - } + secret.infos.forEach(function(info, i) { + if (!prevInfo || i > 0) { + prevInfo = copyLineInfo(info); + infos.push(prevInfo); } - } else { - result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); - } + }); } - } - return !!result; -} -module.exports = equalArrays; + function appendWithSeparator(secret, i) { + if (i > 0) + appendSecret(separatorSecret); + appendSecret(secret); + } -},{}],375:[function(require,module,exports){ -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - -/** - * 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} value The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag) { - switch (tag) { - 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 - // But, treat `-0` vs. `+0` as not equal. - : (object == 0 ? ((1 / object) == (1 / other)) : object == +other); - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. - return object == (other + ''); - } - return false; -} - -module.exports = equalByTag; - -},{}],376:[function(require,module,exports){ -var keys = require('../object/keys'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * 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 comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; - - if (objLength != othLength && !isLoose) { - return false; - } - var skipCtor = isLoose, - index = -1; + elements.map(function(elem) { + var lines = fromString(elem); + if (lines.isEmpty()) + return null; + return getSecret(lines); + }).forEach(separator.isEmpty() + ? appendSecret + : appendWithSeparator); - while (++index < objLength) { - var key = objProps[index], - result = isLoose ? key in other : hasOwnProperty.call(other, key); + if (infos.length < 1) + return emptyLines; - if (result) { - var objValue = object[key], - othValue = other[key]; + var lines = new Lines(infos); - result = undefined; - if (customizer) { - result = isLoose - ? customizer(othValue, objValue, key) - : customizer(objValue, othValue, key); - } - if (typeof result == 'undefined') { - // Recursively compare objects (susceptible to call stack limits). - result = (objValue && objValue === othValue) || equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB); - } - } - if (!result) { - return false; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (!skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; + getSecret(lines).mappings = mappings; - // 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)) { - return false; - } - } - return true; -} - -module.exports = equalObjects; - -},{"../object/keys":408}],377:[function(require,module,exports){ -/** - * 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 ? 0 : -1); - - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; + return lines; + }; + + exports.concat = function(elements) { + return emptyLines.join(elements); + }; + + Lp.concat = function(other) { + var args = arguments, + list = [this]; + list.push.apply(list, args); + assert.strictEqual(list.length, args.length + 1); + return emptyLines.join(list); + }; + +// The emptyLines object needs to be created all the way down here so that +// Lines.prototype will be fully populated. + var emptyLines = fromString(""); + +},{"./mapping":473,"./options":474,"./types":478,"./util":479,"assert":203,"private":448,"source-map":493}],473:[function(require,module,exports){ + var assert = require("assert"); + var types = require("./types"); + var isString = types.builtInTypes.string; + var isNumber = types.builtInTypes.number; + var SourceLocation = types.namedTypes.SourceLocation; + var Position = types.namedTypes.Position; + var linesModule = require("./lines"); + var comparePos = require("./util").comparePos; + + function Mapping(sourceLines, sourceLoc, targetLoc) { + assert.ok(this instanceof Mapping); + assert.ok(sourceLines instanceof linesModule.Lines); + SourceLocation.assert(sourceLoc); + + if (targetLoc) { + // In certain cases it's possible for targetLoc.{start,end}.column + // values to be negative, which technically makes them no longer + // valid SourceLocation nodes, so we need to be more forgiving. + assert.ok( + isNumber.check(targetLoc.start.line) && + isNumber.check(targetLoc.start.column) && + isNumber.check(targetLoc.end.line) && + isNumber.check(targetLoc.end.column) + ); + } else { + // Assume identity mapping if no targetLoc specified. + targetLoc = sourceLoc; } + + Object.defineProperties(this, { + sourceLines: { value: sourceLines }, + sourceLoc: { value: sourceLoc }, + targetLoc: { value: targetLoc } + }); } - return -1; -} - -module.exports = indexOfNaN; - -},{}],378:[function(require,module,exports){ -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * 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 = new array.constructor(length); - - // Add array 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; -} - -module.exports = initCloneArray; - -},{}],379:[function(require,module,exports){ -var bufferClone = require('./bufferClone'); - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - -var arrayBufferTag = '[object ArrayBuffer]', - 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 `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * 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 {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return bufferClone(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - var buffer = object.buffer; - return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - var result = new Ctor(object.source, reFlags.exec(object)); - result.lastIndex = object.lastIndex; - } - return result; -} - -module.exports = initCloneByTag; - -},{"./bufferClone":363}],380:[function(require,module,exports){ -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - var Ctor = object.constructor; - if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { - Ctor = Object; - } - return new Ctor; -} - -module.exports = initCloneObject; - -},{}],381:[function(require,module,exports){ -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; - -/** - * 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) { - value = +value; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -module.exports = isIndex; + var Mp = Mapping.prototype; + module.exports = Mapping; -},{}],382:[function(require,module,exports){ -var isIndex = require('./isIndex'), - isLength = require('./isLength'), - isObject = require('../lang/isObject'); - -/** - * Checks if the provided 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') { - var length = object.length, - prereq = isLength(length) && isIndex(index, length); - } else { - prereq = type == 'string' && index in object; - } - if (prereq) { - var other = object[index]; - return value === value ? (value === other) : (other !== other); - } - return false; -} - -module.exports = isIterateeCall; - -},{"../lang/isObject":398,"./isIndex":381,"./isLength":383}],383:[function(require,module,exports){ -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -module.exports = isLength; - -},{}],384:[function(require,module,exports){ -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -module.exports = isObjectLike; + Mp.slice = function(lines, start, end) { + assert.ok(lines instanceof linesModule.Lines); + Position.assert(start); -},{}],385:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * 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 && (value === 0 ? ((1 / value) > 0) : !isObject(value)); -} - -module.exports = isStrictComparable; - -},{"../lang/isObject":398}],386:[function(require,module,exports){ -var baseForIn = require('./baseForIn'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * A fallback implementation of `_.isPlainObject` which checks if `value` - * is an object created by the `Object` constructor or has a `[[Prototype]]` - * of `null`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - */ -function shimIsPlainObject(value) { - var Ctor; - - // Exit early for non `Object` objects. - if (!(isObjectLike(value) && objToString.call(value) == objectTag) || - (!hasOwnProperty.call(value, 'constructor') && - (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { - return false; - } - // IE < 9 iterates inherited properties before own properties. If the first - // iterated property is an object's own property then there are no inherited - // enumerable properties. - var result; - // In most environments an object's own properties are iterated before - // its inherited properties. If the last iterated property is an object's - // own property then there are no inherited enumerable properties. - baseForIn(value, function(subValue, key) { - result = key; - }); - return typeof result == 'undefined' || hasOwnProperty.call(value, result); -} - -module.exports = shimIsPlainObject; - -},{"./baseForIn":341,"./isObjectLike":384}],387:[function(require,module,exports){ -var isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isIndex = require('./isIndex'), - isLength = require('./isLength'), - keysIn = require('../object/keysIn'), - support = require('../support'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A fallback implementation of `Object.keys` which creates an array of the - * own enumerable property names of `object`. - * - * @private - * @param {Object} object The object to inspect. - * @returns {Array} Returns the array of property names. - */ -function shimKeys(object) { - var props = keysIn(object), - propsLength = props.length, - length = propsLength && object.length; - - var allowIndexes = length && isLength(length) && - (isArray(object) || (support.nonEnumArgs && isArguments(object))); - - var index = -1, - result = []; + if (end) { + Position.assert(end); + } else { + end = lines.lastPos(); + } - while (++index < propsLength) { - var key = props[index]; - if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { - result.push(key); - } - } - return result; -} - -module.exports = shimKeys; - -},{"../lang/isArguments":391,"../lang/isArray":392,"../object/keysIn":409,"../support":413,"./isIndex":381,"./isLength":383}],388:[function(require,module,exports){ -/** - * An implementation of `_.uniq` optimized for sorted arrays without support - * for callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate-value-free array. - */ -function sortedUniq(array, iteratee) { - var seen, - index = -1, - length = array.length, - resIndex = -1, - result = []; + var sourceLines = this.sourceLines; + var sourceLoc = this.sourceLoc; + var targetLoc = this.targetLoc; - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value, index, array) : value; - - if (!index || seen !== computed) { - seen = computed; - result[++resIndex] = value; - } - } - return result; -} - -module.exports = sortedUniq; - -},{}],389:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * Converts `value` to an object if it is not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} - -module.exports = toObject; - -},{"../lang/isObject":398}],390:[function(require,module,exports){ -var baseClone = require('../internal/baseClone'), - bindCallback = require('../internal/bindCallback'); - -/** - * Creates a deep clone of `value`. If `customizer` is provided it is invoked - * to produce the cloned values. If `customizer` returns `undefined` cloning - * is handled by the method instead. The `customizer` is bound to `thisArg` - * and invoked with two argument; (value [, index|key, object]). - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). - * The enumerable properties of `arguments` objects and objects created by - * constructors other than `Object` are cloned to plain `Object` objects. An - * empty object is returned for uncloneable values such as functions, DOM nodes, - * Maps, Sets, and WeakMaps. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {*} Returns the deep cloned value. - * @example - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * var deep = _.cloneDeep(users); - * deep[0] === users[0]; - * // => false - * - * // using a customizer callback - * var el = _.cloneDeep(document.body, function(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * }); - * - * el === document.body - * // => false - * el.nodeName - * // => BODY - * el.childNodes.length; - * // => 20 - */ -function cloneDeep(value, customizer, thisArg) { - customizer = typeof customizer == 'function' && bindCallback(customizer, thisArg, 1); - return baseClone(value, true, customizer); -} - -module.exports = cloneDeep; - -},{"../internal/baseClone":334,"../internal/bindCallback":362}],391:[function(require,module,exports){ -var isLength = require('../internal/isLength'), - isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as an `arguments` object. - * - * @static - * @memberOf _ - * @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) { - var length = isObjectLike(value) ? value.length : undefined; - return isLength(length) && objToString.call(value) == argsTag; -} - -module.exports = isArguments; - -},{"../internal/isLength":383,"../internal/isObjectLike":384}],392:[function(require,module,exports){ -var isLength = require('../internal/isLength'), - isNative = require('./isNative'), - isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var arrayTag = '[object Array]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray; - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @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(function() { return arguments; }()); - * // => false - */ -var isArray = nativeIsArray || function(value) { - return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; -}; - -module.exports = isArray; - -},{"../internal/isLength":383,"../internal/isObjectLike":384,"./isNative":396}],393:[function(require,module,exports){ -var isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @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) && objToString.call(value) == boolTag); -} - -module.exports = isBoolean; - -},{"../internal/isObjectLike":384}],394:[function(require,module,exports){ -var isArguments = require('./isArguments'), - isArray = require('./isArray'), - isFunction = require('./isFunction'), - isLength = require('../internal/isLength'), - isObjectLike = require('../internal/isObjectLike'), - isString = require('./isString'), - keys = require('../object/keys'); - -/** - * Checks if `value` is empty. A value is considered empty unless it is an - * `arguments` object, array, string, or jQuery-like collection with a length - * greater than `0` or an object with own enumerable properties. - * - * @static - * @memberOf _ - * @category Lang - * @param {Array|Object|string} value The value to inspect. - * @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 (value == null) { - return true; - } - var length = value.length; - if (isLength(length) && (isArray(value) || isString(value) || isArguments(value) || - (isObjectLike(value) && isFunction(value.splice)))) { - return !length; - } - return !keys(value).length; -} - -module.exports = isEmpty; - -},{"../internal/isLength":383,"../internal/isObjectLike":384,"../object/keys":408,"./isArguments":391,"./isArray":392,"./isFunction":395,"./isString":401}],395:[function(require,module,exports){ -(function (global){ -var baseIsFunction = require('../internal/baseIsFunction'), - isNative = require('./isNative'); - -/** `Object#toString` result references. */ -var funcTag = '[object Function]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** Native method references. */ -var Uint8Array = isNative(Uint8Array = global.Uint8Array) && Uint8Array; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @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 - */ -var isFunction = !(baseIsFunction(/x/) || (Uint8Array && !baseIsFunction(Uint8Array))) ? baseIsFunction : function(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 equivalents which return 'object' for typed array constructors. - return objToString.call(value) == funcTag; -}; - -module.exports = isFunction; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../internal/baseIsFunction":348,"./isNative":396}],396:[function(require,module,exports){ -var escapeRegExp = require('../string/escapeRegExp'), - isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var funcTag = '[object Function]'; - -/** Used to detect host constructors (Safari > 5). */ -var reHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var fnToString = Function.prototype.toString; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** Used to detect if a method is native. */ -var reNative = RegExp('^' + - escapeRegExp(objToString) - .replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @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 (value == null) { - return false; - } - if (objToString.call(value) == funcTag) { - return reNative.test(fnToString.call(value)); - } - return isObjectLike(value) && reHostCtor.test(value); -} - -module.exports = isNative; - -},{"../internal/isObjectLike":384,"../string/escapeRegExp":412}],397:[function(require,module,exports){ -var isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var numberTag = '[object Number]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * 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 _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isNumber(8.4); - * // => true - * - * _.isNumber(NaN); - * // => true - * - * _.isNumber('8.4'); - * // => false - */ -function isNumber(value) { - return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag); -} - -module.exports = isNumber; - -},{"../internal/isObjectLike":384}],398:[function(require,module,exports){ -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @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(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return type == 'function' || (!!value && type == 'object'); -} - -module.exports = isObject; - -},{}],399:[function(require,module,exports){ -var isNative = require('./isNative'), - shimIsPlainObject = require('../internal/shimIsPlainObject'); - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** Native method references. */ -var getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf; - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * **Note:** This method assumes objects created by the `Object` constructor - * have no inherited enumerable properties. - * - * @static - * @memberOf _ - * @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 - */ -var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { - if (!(value && objToString.call(value) == objectTag)) { - return false; - } - var valueOf = value.valueOf, - objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); - - return objProto - ? (value == objProto || getPrototypeOf(value) == objProto) - : shimIsPlainObject(value); -}; - -module.exports = isPlainObject; - -},{"../internal/shimIsPlainObject":386,"./isNative":396}],400:[function(require,module,exports){ -var isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var regexpTag = '[object RegExp]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @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 (isObjectLike(value) && objToString.call(value) == regexpTag) || false; -} - -module.exports = isRegExp; - -},{"../internal/isObjectLike":384}],401:[function(require,module,exports){ -var isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @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' || (isObjectLike(value) && objToString.call(value) == stringTag); -} - -module.exports = isString; - -},{"../internal/isObjectLike":384}],402:[function(require,module,exports){ -var isLength = require('../internal/isLength'), - isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values 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[dateTag] = typedArrayTags[errorTag] = -typedArrayTags[funcTag] = typedArrayTags[mapTag] = -typedArrayTags[numberTag] = typedArrayTags[objectTag] = -typedArrayTags[regexpTag] = typedArrayTags[setTag] = -typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @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[objToString.call(value)]; -} - -module.exports = isTypedArray; - -},{"../internal/isLength":383,"../internal/isObjectLike":384}],403:[function(require,module,exports){ -var baseCopy = require('../internal/baseCopy'), - keysIn = require('../object/keysIn'); - -/** - * Converts `value` to a plain object flattening inherited enumerable - * properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @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 baseCopy(value, keysIn(value)); -} - -module.exports = toPlainObject; - -},{"../internal/baseCopy":336,"../object/keysIn":409}],404:[function(require,module,exports){ -var baseAssign = require('../internal/baseAssign'), - createAssigner = require('../internal/createAssigner'); - -/** - * Assigns own enumerable properties of source object(s) to the destination - * object. Subsequent sources overwrite property assignments of previous sources. - * If `customizer` is provided it is invoked to produce the assigned values. - * The `customizer` is bound to `thisArg` and invoked with five arguments: - * (objectValue, sourceValue, key, object, source). - * - * @static - * @memberOf _ - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @param {Function} [customizer] The function to customize assigning values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {Object} Returns `object`. - * @example - * - * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); - * // => { 'user': 'fred', 'age': 40 } - * - * // using a customizer callback - * var defaults = _.partialRight(_.assign, function(value, other) { - * return typeof value == 'undefined' ? other : value; - * }); - * - * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } - */ -var assign = createAssigner(baseAssign); - -module.exports = assign; - -},{"../internal/baseAssign":332,"../internal/createAssigner":368}],405:[function(require,module,exports){ -var assign = require('./assign'), - assignDefaults = require('../internal/assignDefaults'), - restParam = require('../function/restParam'); - -/** - * Assigns own enumerable properties of source object(s) to the destination - * object for all destination properties that resolve to `undefined`. Once a - * property is set, additional values of the same property are ignored. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } - */ -var defaults = restParam(function(args) { - var object = args[0]; - if (object == null) { - return object; - } - args.push(assignDefaults); - return assign.apply(undefined, args); -}); + function skip(name) { + var sourceFromPos = sourceLoc[name]; + var targetFromPos = targetLoc[name]; + var targetToPos = start; -module.exports = defaults; - -},{"../function/restParam":324,"../internal/assignDefaults":331,"./assign":404}],406:[function(require,module,exports){ -module.exports = require('./assign'); - -},{"./assign":404}],407:[function(require,module,exports){ -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Checks if `key` exists as a direct property of `object` instead of an - * inherited property. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @param {string} key The key to check. - * @returns {boolean} Returns `true` if `key` is a direct property, else `false`. - * @example - * - * var object = { 'a': 1, 'b': 2, 'c': 3 }; - * - * _.has(object, 'b'); - * // => true - */ -function has(object, key) { - return object ? hasOwnProperty.call(object, key) : false; -} - -module.exports = has; - -},{}],408:[function(require,module,exports){ -var isLength = require('../internal/isLength'), - isNative = require('../lang/isNative'), - isObject = require('../lang/isObject'), - shimKeys = require('../internal/shimKeys'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys; - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys) - * for more details. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @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'] - */ -var keys = !nativeKeys ? shimKeys : function(object) { - if (object) { - var Ctor = object.constructor, - length = object.length; - } - if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object != 'function' && (length && isLength(length)))) { - return shimKeys(object); - } - return isObject(object) ? nativeKeys(object) : []; -}; - -module.exports = keys; - -},{"../internal/isLength":383,"../internal/shimKeys":387,"../lang/isNative":396,"../lang/isObject":398}],409:[function(require,module,exports){ -var isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isIndex = require('../internal/isIndex'), - isLength = require('../internal/isLength'), - isObject = require('../lang/isObject'), - support = require('../support'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @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) { - if (object == null) { - return []; - } - if (!isObject(object)) { - object = Object(object); - } - var length = object.length; - length = (length && isLength(length) && - (isArray(object) || (support.nonEnumArgs && isArguments(object))) && length) || 0; - - var Ctor = object.constructor, - index = -1, - isProto = typeof Ctor == 'function' && Ctor.prototype === object, - result = Array(length), - skipIndexes = length > 0; - - while (++index < length) { - result[index] = (index + ''); - } - for (var key in object) { - if (!(skipIndexes && isIndex(key, length)) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -module.exports = keysIn; - -},{"../internal/isIndex":381,"../internal/isLength":383,"../lang/isArguments":391,"../lang/isArray":392,"../lang/isObject":398,"../support":413}],410:[function(require,module,exports){ -var baseMerge = require('../internal/baseMerge'), - createAssigner = require('../internal/createAssigner'); - -/** - * Recursively merges own enumerable properties of the source object(s), that - * don't resolve to `undefined` into the destination object. Subsequent sources - * overwrite property assignments of previous sources. If `customizer` is - * provided it 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 bound to `thisArg` and invoked - * with five arguments: (objectValue, sourceValue, key, object, source). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @param {Function} [customizer] The function to customize merging properties. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @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 }] } - * - * // using a customizer callback - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; - * - * _.merge(object, other, function(a, b) { - * if (_.isArray(a)) { - * return a.concat(b); - * } - * }); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } - */ -var merge = createAssigner(baseMerge); - -module.exports = merge; - -},{"../internal/baseMerge":353,"../internal/createAssigner":368}],411:[function(require,module,exports){ -var baseValues = require('../internal/baseValues'), - keys = require('./keys'); - -/** - * Creates an array of the own enumerable property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @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 baseValues(object, keys(object)); -} - -module.exports = values; - -},{"../internal/baseValues":361,"./keys":408}],412:[function(require,module,exports){ -var baseToString = require('../internal/baseToString'); - -/** - * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special). - * In addition to special characters the forward slash is escaped to allow for - * easier `eval` use and `Function` compilation. - */ -var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g, - reHasRegExpChars = RegExp(reRegExpChars.source); - -/** - * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?", - * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. - * - * @static - * @memberOf _ - * @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 = baseToString(string); - return (string && reHasRegExpChars.test(string)) - ? string.replace(reRegExpChars, '\\$&') - : string; -} - -module.exports = escapeRegExp; - -},{"../internal/baseToString":359}],413:[function(require,module,exports){ -(function (global){ -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to detect DOM support. */ -var document = (document = global.window) && document.document; - -/** Native method references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * An object environment feature flags. - * - * @static - * @memberOf _ - * @type Object - */ -var support = {}; - -(function(x) { + if (name === "end") { + targetToPos = end; + } else { + assert.strictEqual(name, "start"); + } - /** - * Detect if functions can be decompiled by `Function#toString` - * (all but Firefox OS certified apps, older Opera mobile browsers, and - * the PlayStation 3; forced `false` for Windows 8 apps). - * - * @memberOf _.support - * @type boolean - */ - support.funcDecomp = /\bthis\b/.test(function() { return this; }); + return skipChars( + sourceLines, sourceFromPos, + lines, targetFromPos, targetToPos + ); + } - /** - * Detect if `Function#name` is supported (all but IE). - * - * @memberOf _.support - * @type boolean - */ - support.funcNames = typeof Function.name == 'string'; + if (comparePos(start, targetLoc.start) <= 0) { + if (comparePos(targetLoc.end, end) <= 0) { + targetLoc = { + start: subtractPos(targetLoc.start, start.line, start.column), + end: subtractPos(targetLoc.end, start.line, start.column) + }; - /** - * Detect if the DOM is supported. - * - * @memberOf _.support - * @type boolean - */ - try { - support.dom = document.createDocumentFragment().nodeType === 11; - } catch(e) { - support.dom = false; - } + // The sourceLoc can stay the same because the contents of the + // targetLoc have not changed. - /** - * Detect if `arguments` object indexes are non-enumerable. - * - * In Firefox < 4, IE < 9, PhantomJS, and Safari < 5.1 `arguments` object - * indexes are non-enumerable. Chrome < 25 and Node.js < 0.11.0 treat - * `arguments` object indexes as non-enumerable and fail `hasOwnProperty` - * checks for indexes that exceed their function's formal parameters with - * associated values of `0`. - * - * @memberOf _.support - * @type boolean - */ - try { - support.nonEnumArgs = !propertyIsEnumerable.call(arguments, 1); - } catch(e) { - support.nonEnumArgs = true; - } -}(0, 0)); + } else if (comparePos(end, targetLoc.start) <= 0) { + return null; -module.exports = support; + } else { + sourceLoc = { + start: sourceLoc.start, + end: skip("end") + }; -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],414:[function(require,module,exports){ -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @category Utility - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new function. - * @example - * - * var object = { 'user': 'fred' }; - * var getter = _.constant(object); - * - * getter() === object; - * // => true - */ -function constant(value) { - return function() { - return value; - }; -} - -module.exports = constant; - -},{}],415:[function(require,module,exports){ -/** - * This method returns the first argument provided to it. - * - * @static - * @memberOf _ - * @category Utility - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'user': 'fred' }; - * - * _.identity(object) === object; - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; - -},{}],416:[function(require,module,exports){ -(function (process){ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var isWindows = false -if (typeof process !== 'undefined' && process.platform === 'win32') - isWindows = true - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} - , expand = require("brace-expansion") - - // any single thing other than / - // don't need to escape / when using new RegExp() - , qmark = "[^/]" - - // * => any number of characters - , star = qmark + "*?" - - // ** when dots are allowed. Anything goes, except .. and . - // not (^ or / followed by one or two dots followed by $ or /), - // followed by anything, any number of times. - , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" - - // not a ^ or / followed by a dot, - // followed by anything, any number of times. - , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" - - // characters that need to be escaped in RegExp. - , reSpecials = charSet("().*{}+?[]^$\\!") + targetLoc = { + start: subtractPos(targetLoc.start, start.line, start.column), + end: subtractPos(end, start.line, start.column) + }; + } -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split("").reduce(function (set, c) { - set[c] = true - return set - }, {}) -} + } else { + if (comparePos(targetLoc.end, start) <= 0) { + return null; + } -// normalizes slashes. -var slashSplit = /\/+/ + if (comparePos(targetLoc.end, end) <= 0) { + sourceLoc = { + start: skip("start"), + end: sourceLoc.end + }; -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} + targetLoc = { + // Same as subtractPos(start, start.line, start.column): + start: { line: 1, column: 0 }, + end: subtractPos(targetLoc.end, start.line, start.column) + }; + + } else { + sourceLoc = { + start: skip("start"), + end: skip("end") + }; -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} + targetLoc = { + // Same as subtractPos(start, start.line, start.column): + start: { line: 1, column: 0 }, + end: subtractPos(end, start.line, start.column) + }; + } + } -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch + return new Mapping(this.sourceLines, sourceLoc, targetLoc); + }; - var orig = minimatch + Mp.add = function(line, column) { + return new Mapping(this.sourceLines, this.sourceLoc, { + start: addPos(this.targetLoc.start, line, column), + end: addPos(this.targetLoc.end, line, column) + }); + }; - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) + function addPos(toPos, line, column) { + return { + line: toPos.line + line - 1, + column: (toPos.line === 1) + ? toPos.column + column + : toPos.column + }; } - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) + Mp.subtract = function(line, column) { + return new Mapping(this.sourceLines, this.sourceLoc, { + start: subtractPos(this.targetLoc.start, line, column), + end: subtractPos(this.targetLoc.end, line, column) + }); + }; + + function subtractPos(fromPos, line, column) { + return { + line: fromPos.line - line + 1, + column: (fromPos.line === line) + ? fromPos.column - column + : fromPos.column + }; } - return m -} + Mp.indent = function(by, skipFirstLine, noNegativeColumns) { + if (by === 0) { + return this; + } + + var targetLoc = this.targetLoc; + var startLine = targetLoc.start.line; + var endLine = targetLoc.end.line; -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} + if (skipFirstLine && startLine === 1 && endLine === 1) { + return this; + } + targetLoc = { + start: targetLoc.start, + end: targetLoc.end + }; -function minimatch (p, pattern, options) { - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } + if (!skipFirstLine || startLine > 1) { + var startColumn = targetLoc.start.column + by; + targetLoc.start = { + line: startLine, + column: noNegativeColumns + ? Math.max(0, startColumn) + : startColumn + }; + } + + if (!skipFirstLine || endLine > 1) { + var endColumn = targetLoc.end.column + by; + targetLoc.end = { + line: endLine, + column: noNegativeColumns + ? Math.max(0, endColumn) + : endColumn + }; + } - if (!options) options = {} + return new Mapping(this.sourceLines, this.sourceLoc, targetLoc); + }; - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - return false - } + function skipChars( + sourceLines, sourceFromPos, + targetLines, targetFromPos, targetToPos + ) { + assert.ok(sourceLines instanceof linesModule.Lines); + assert.ok(targetLines instanceof linesModule.Lines); + Position.assert(sourceFromPos); + Position.assert(targetFromPos); + Position.assert(targetToPos); - // "" only matches "" - if (pattern.trim() === "") return p === "" + var targetComparison = comparePos(targetFromPos, targetToPos); + if (targetComparison === 0) { + // Trivial case: no characters to skip. + return sourceFromPos; + } - return new Minimatch(pattern, options).match(p) -} + if (targetComparison < 0) { + // Skipping forward. -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } + var sourceCursor = sourceLines.skipSpaces(sourceFromPos); + var targetCursor = targetLines.skipSpaces(targetFromPos); - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } + var lineDiff = targetToPos.line - targetCursor.line; + sourceCursor.line += lineDiff; + targetCursor.line += lineDiff; - if (!options) options = {} - pattern = pattern.trim() + if (lineDiff > 0) { + // If jumping to later lines, reset columns to the beginnings + // of those lines. + sourceCursor.column = 0; + targetCursor.column = 0; + } else { + assert.strictEqual(lineDiff, 0); + } - // windows support: need to use /, not \ - if (isWindows) - pattern = pattern.split("\\").join("/") + while (comparePos(targetCursor, targetToPos) < 0 && + targetLines.nextPos(targetCursor, true)) { + assert.ok(sourceLines.nextPos(sourceCursor, true)); + assert.strictEqual( + sourceLines.charAt(sourceCursor), + targetLines.charAt(targetCursor) + ); + } - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false + } else { + // Skipping backward. - // make the set of regexps etc. - this.make() -} + var sourceCursor = sourceLines.skipSpaces(sourceFromPos, true); + var targetCursor = targetLines.skipSpaces(targetFromPos, true); -Minimatch.prototype.debug = function() {} + var lineDiff = targetToPos.line - targetCursor.line; + sourceCursor.line += lineDiff; + targetCursor.line += lineDiff; -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return + if (lineDiff < 0) { + // If jumping to earlier lines, reset columns to the ends of + // those lines. + sourceCursor.column = sourceLines.getLineLength(sourceCursor.line); + targetCursor.column = targetLines.getLineLength(targetCursor.line); + } else { + assert.strictEqual(lineDiff, 0); + } - var pattern = this.pattern - var options = this.options + while (comparePos(targetToPos, targetCursor) < 0 && + targetLines.prevPos(targetCursor, true)) { + assert.ok(sourceLines.prevPos(sourceCursor, true)); + assert.strictEqual( + sourceLines.charAt(sourceCursor), + targetLines.charAt(targetCursor) + ); + } + } - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return + return sourceCursor; } - // step 1: figure out negation, etc. - this.parseNegate() +},{"./lines":472,"./types":478,"./util":479,"assert":203}],474:[function(require,module,exports){ + var defaults = { + // If you want to use a different branch of esprima, or any other + // module that supports a .parse function, pass that module object to + // recast.parse as options.esprima. + esprima: require("esprima-fb"), - // step 2: expand braces - var set = this.globSet = this.braceExpand() + // Number of spaces the pretty-printer should use per tab for + // indentation. If you do not pass this option explicitly, it will be + // (quite reliably!) inferred from the original code. + tabWidth: 4, - if (options.debug) this.debug = console.error + // If you really want the pretty-printer to use tabs instead of + // spaces, make this option true. + useTabs: false, - this.debug(this.pattern, set) + // The reprinting code leaves leading whitespace untouched unless it + // has to reindent a line, or you pass false for this option. + reuseWhitespace: true, - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) + // Some of the pretty-printer code (such as that for printing function + // parameter lists) makes a valiant attempt to prevent really long + // lines. You can adjust the limit by changing this option; however, + // there is no guarantee that line length will fit inside this limit. + wrapColumn: 74, // Aspirational for now. - this.debug(this.pattern, set) + // Pass a string as options.sourceFileName to recast.parse to tell the + // reprinter to keep track of reused code so that it can construct a + // source map automatically. + sourceFileName: null, - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) + // Pass a string as options.sourceMapName to recast.print, and + // (provided you passed options.sourceFileName earlier) the + // PrintResult of recast.print will have a .map property for the + // generated source map. + sourceMapName: null, - this.debug(this.pattern, set) + // If provided, this option will be passed along to the source map + // generator as a root directory for relative source file paths. + sourceRoot: null, - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return -1 === s.indexOf(false) - }) + // If you provide a source map that was generated from a previous call + // to recast.print as options.inputSourceMap, the old source map will + // be composed with the new source map. + inputSourceMap: null, - this.debug(this.pattern, set) + // If you want esprima to generate .range information (recast only + // uses .loc internally), pass true for this option. + range: false, - this.set = set -} + // If you want esprima not to throw exceptions when it encounters + // non-fatal errors, keep this option true. + tolerant: true, -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - , negate = false - , options = this.options - , negateOffset = 0 + // If you want to override the quotes used in string literals, specify + // either "single", "double", or "auto" here ("auto" will select the one + // which results in the shorter literal) + // Otherwise, the input marks will be preserved + quote: null, + }, hasOwn = defaults.hasOwnProperty; - if (options.nonegate) return +// Copy options and fill in default values. + exports.normalize = function(options) { + options = options || defaults; - for ( var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === "!" - ; i ++) { - negate = !negate - negateOffset ++ - } + function get(key) { + return hasOwn.call(options, key) + ? options[key] + : defaults[key]; + } - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} + return { + tabWidth: +get("tabWidth"), + useTabs: !!get("useTabs"), + reuseWhitespace: !!get("reuseWhitespace"), + wrapColumn: Math.max(get("wrapColumn"), 0), + sourceFileName: get("sourceFileName"), + sourceMapName: get("sourceMapName"), + sourceRoot: get("sourceRoot"), + inputSourceMap: get("inputSourceMap"), + esprima: get("esprima"), + range: get("range"), + tolerant: get("tolerant"), + quote: get("quote"), + }; + }; -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} +},{"esprima-fb":202}],475:[function(require,module,exports){ + var assert = require("assert"); + var types = require("./types"); + var n = types.namedTypes; + var b = types.builders; + var isObject = types.builtInTypes.object; + var isArray = types.builtInTypes.array; + var isFunction = types.builtInTypes.function; + var Patcher = require("./patcher").Patcher; + var normalizeOptions = require("./options").normalize; + var fromString = require("./lines").fromString; + var attachComments = require("./comments").attach; + var util = require("./util"); + + exports.parse = function parse(source, options) { + options = normalizeOptions(options); + + var lines = fromString(source, options); + + var sourceWithoutTabs = lines.toString({ + tabWidth: options.tabWidth, + reuseWhitespace: false, + useTabs: false + }); -Minimatch.prototype.braceExpand = braceExpand + var program = options.esprima.parse(sourceWithoutTabs, { + loc: true, + range: options.range, + comment: true, + tolerant: options.tolerant, + sourceType: 'module' + }); -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) - options = this.options - else - options = {} - } + // Expand the Program node's .loc to include all comments, since + // typically its .loc.start and .loc.end will coincide with those of + // the first and last statements, respectively, excluding any comments + // that fall outside that region. + program.loc = util.getTrueLoc(program); + + var comments = program.comments; + delete program.comments; + + // In order to ensure we reprint leading and trailing program + // comments, wrap the original Program node with a File node. + var file = b.file(program); + file.loc = { + lines: lines, + indent: 0, + start: lines.firstPos(), + end: lines.lastPos() + }; - pattern = typeof pattern === "undefined" - ? this.pattern : pattern + // Passing file.program here instead of just file means that initial + // comments will be attached to program.body[0] instead of program. + attachComments( + comments, + program.body.length ? file.program : file, + lines + ); - if (typeof pattern === "undefined") { - throw new Error("undefined pattern") - } + // Return a copy of the original AST so that any changes made may be + // compared to the original. + return new TreeCopier(lines).copy(file); + }; - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] + function TreeCopier(lines) { + assert.ok(this instanceof TreeCopier); + this.lines = lines; + this.indent = 0; } - return expand(pattern) -} + var TCp = TreeCopier.prototype; -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === "**") return GLOBSTAR - if (pattern === "") return "" - - var re = "" - , hasMagic = !!options.nocase - , escaping = false - // ? => one single character - , patternListStack = [] - , plType - , stateChar - , inClass = false - , reClassStart = -1 - , classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - , patternStart = pattern.charAt(0) === "." ? "" // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" - : "(?!\\.)" - , self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case "*": - re += star - hasMagic = true - break - case "?": - re += qmark - hasMagic = true - break - default: - re += "\\"+stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false + TCp.copy = function(node) { + if (isArray.check(node)) { + return node.map(this.copy, this); } - } - for ( var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i ++ ) { + if (!isObject.check(node)) { + return node; + } - this.debug("%s\t%s %s %j", pattern, i, re, c) + util.fixFaultyLocations(node); - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += "\\" + c - escaping = false - continue - } + var copy = Object.create(Object.getPrototypeOf(node), { + original: { // Provide a link from the copy to the original. + value: node, + configurable: false, + enumerable: false, + writable: true + } + }); - SWITCH: switch (c) { - case "/": - // completely not allowed, even escaped. - // Should already be path-split by now. - return false + var loc = node.loc; + var oldIndent = this.indent; + var newIndent = oldIndent; - case "\\": - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === "!" && i === classStart + 1) c = "^" - re += c - continue - } + if (loc) { + // When node is a comment, we set node.loc.indent to + // node.loc.start.column so that, when/if we print the comment by + // itself, we can strip that much whitespace from the left margin + // of the comment. This only really matters for multiline Block + // comments, but it doesn't hurt for Line comments. + if (node.type === "Block" || node.type === "Line" || + this.lines.isPrecededOnlyByWhitespace(loc.start)) { + newIndent = this.indent = loc.start.column; + } + + loc.lines = this.lines; + loc.indent = newIndent; + } + + var keys = Object.keys(node); + var keyCount = keys.length; + for (var i = 0; i < keyCount; ++i) { + var key = keys[i]; + if (key === "loc") { + copy[key] = node[key]; + } else { + copy[key] = this.copy(node[key]); + } + } - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case "(": - if (inClass) { - re += "(" - continue - } + this.indent = oldIndent; - if (!stateChar) { - re += "\\(" - continue - } + return copy; + }; - plType = stateChar - patternListStack.push({ type: plType - , start: i - 1 - , reStart: re.length }) - // negation is (?:(?!js)[^/]*) - re += stateChar === "!" ? "(?:(?!" : "(?:" - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue +},{"./comments":470,"./lines":472,"./options":474,"./patcher":476,"./types":478,"./util":479,"assert":203}],476:[function(require,module,exports){ + var assert = require("assert"); + var linesModule = require("./lines"); + var types = require("./types"); + var getFieldValue = types.getFieldValue; + var Printable = types.namedTypes.Printable; + var Expression = types.namedTypes.Expression; + var SourceLocation = types.namedTypes.SourceLocation; + var util = require("./util"); + var comparePos = util.comparePos; + var FastPath = require("./fast-path"); + var isObject = types.builtInTypes.object; + var isArray = types.builtInTypes.array; + var isString = types.builtInTypes.string; + var riskyAdjoiningCharExp = /[0-9a-z_$]/i; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)" - continue - } + function Patcher(lines) { + assert.ok(this instanceof Patcher); + assert.ok(lines instanceof linesModule.Lines); - clearStateChar() - hasMagic = true - re += ")" - plType = patternListStack.pop().type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case "!": - re += "[^/]*?)" - break - case "?": - case "+": - case "*": re += plType - case "@": break // the default anyway - } - continue + var self = this, + replacements = []; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|" - escaping = false - continue - } + self.replace = function(loc, lines) { + if (isString.check(lines)) + lines = linesModule.fromString(lines); - clearStateChar() - re += "|" - continue + replacements.push({ + lines: lines, + start: loc.start, + end: loc.end + }); + }; - // these are mostly the same in regexp and glob - case "[": - // swallow any state-tracking char before the [ - clearStateChar() + self.get = function(loc) { + // If no location is provided, return the complete Lines object. + loc = loc || { + start: { line: 1, column: 0 }, + end: { line: lines.length, + column: lines.getLineLength(lines.length) } + }; - if (inClass) { - re += "\\" + c - continue - } + var sliceFrom = loc.start, + toConcat = []; - inClass = true - classStart = i - reClassStart = re.length - re += c - continue + function pushSlice(from, to) { + assert.ok(comparePos(from, to) <= 0); + toConcat.push(lines.slice(from, to)); + } - case "]": - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += "\\" + c - escaping = false - continue + replacements.sort(function(a, b) { + return comparePos(a.start, b.start); + }).forEach(function(rep) { + if (comparePos(sliceFrom, rep.start) > 0) { + // Ignore nested replacement ranges. + } else { + pushSlice(sliceFrom, rep.start); + toConcat.push(rep.lines); + sliceFrom = rep.end; } + }); - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - new RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } + pushSlice(sliceFrom, loc.end); - // finish up the class. - hasMagic = true - inClass = false - re += c - continue + return linesModule.concat(toConcat); + }; + } + exports.Patcher = Patcher; - default: - // swallow any state char that wasn't consumed - clearStateChar() + var Pp = Patcher.prototype; - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === "^" && inClass)) { - re += "\\" - } - - re += c - - } // switch - } // for - - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - var cs = pattern.substr(classStart + 1) - , sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - var pl - while (pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = "\\" - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + "|" - }) + Pp.tryToReprintComments = function(newNode, oldNode, print) { + var patcher = this; - this.debug("tail=%j\n %s", tail, tail) - var t = pl.type === "*" ? star - : pl.type === "?" ? qmark - : "\\" + pl.type + if (!newNode.comments && + !oldNode.comments) { + // We were (vacuously) able to reprint all the comments! + return true; + } - hasMagic = true - re = re.slice(0, pl.reStart) - + t + "\\(" - + tail - } + var newPath = FastPath.from(newNode); + var oldPath = FastPath.from(oldNode); - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += "\\\\" - } + newPath.stack.push("comments", getSurroundingComments(newNode)); + oldPath.stack.push("comments", getSurroundingComments(oldNode)); - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case ".": - case "[": - case "(": addPatternStart = true - } + var reprints = []; + var ableToReprintComments = + findArrayReprints(newPath, oldPath, reprints); - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== "" && hasMagic) re = "(?=.)" + re + // No need to pop anything from newPath.stack or oldPath.stack, since + // newPath and oldPath are fresh local variables. - if (addPatternStart) re = patternStart + re + if (ableToReprintComments && reprints.length > 0) { + reprints.forEach(function(reprint) { + var oldComment = reprint.oldPath.getValue(); + assert.ok(oldComment.leading || oldComment.trailing); + patcher.replace( + oldComment.loc, + // Comments can't have .comments, so it doesn't matter + // whether we print with comments or without. + print(reprint.newPath).indentTail(oldComment.loc.indent) + ); + }); + } - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [ re, hasMagic ] - } + return ableToReprintComments; + }; - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) +// Get all comments that are either leading or trailing, ignoring any +// comments that occur inside node.loc. Returns an empty array for nodes +// with no leading or trailing comments. + function getSurroundingComments(node) { + var result = []; + if (node.comments && + node.comments.length > 0) { + node.comments.forEach(function(comment) { + if (comment.leading || comment.trailing) { + result.push(comment); + } + }); + } + return result; } - var flags = options.nocase ? "i" : "" - , regExp = new RegExp("^" + re + "$", flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} + Pp.deleteComments = function(node) { + if (!node.comments) { + return; + } -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp + var patcher = this; - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set + node.comments.forEach(function(comment) { + if (comment.leading) { + // Delete leading comments along with any trailing whitespace + // they might have. + patcher.replace({ + start: comment.loc.start, + end: node.loc.lines.skipSpaces( + comment.loc.end, false, false) + }, ""); - if (!set.length) return this.regexp = false - var options = this.options + } else if (comment.trailing) { + // Delete trailing comments along with any leading whitespace + // they might have. + patcher.replace({ + start: node.loc.lines.skipSpaces( + comment.loc.start, true, false), + end: comment.loc.end + }, ""); + } + }); + }; - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - , flags = options.nocase ? "i" : "" + exports.getReprinter = function(path) { + assert.ok(path instanceof FastPath); - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === "string") ? regExpEscape(p) - : p._src - }).join("\\\/") - }).join("|") + // Make sure that this path refers specifically to a Node, rather than + // some non-Node subproperty of a Node. + var node = path.getValue(); + if (!Printable.check(node)) + return; - // must match entire pattern - // ending in a * or ** will make it less strict. - re = "^(?:" + re + ")$" + var orig = node.original; + var origLoc = orig && orig.loc; + var lines = origLoc && origLoc.lines; + var reprints = []; - // can match anything, as long as it's not this. - if (this.negate) re = "^(?!" + re + ").*$" + if (!lines || !findReprints(path, reprints)) + return; - try { - return this.regexp = new RegExp(re, flags) - } catch (ex) { - return this.regexp = false - } -} + return function(print) { + var patcher = new Patcher(lines); -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} + reprints.forEach(function(reprint) { + var newNode = reprint.newPath.getValue(); + var oldNode = reprint.oldPath.getValue(); -Minimatch.prototype.match = match -function match (f, partial) { - this.debug("match", f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === "" + SourceLocation.assert(oldNode.loc, true); - if (f === "/" && partial) return true + var needToPrintNewPathWithComments = + !patcher.tryToReprintComments(newNode, oldNode, print) - var options = this.options + if (needToPrintNewPathWithComments) { + // Since we were not able to preserve all leading/trailing + // comments, we delete oldNode's comments, print newPath + // with comments, and then patch the resulting lines where + // oldNode used to be. + patcher.deleteComments(oldNode); + } - // windows: need to use /, not \ - if (isWindows) - f = f.split("\\").join("/") + var pos = util.copyPos(oldNode.loc.start); + var needsLeadingSpace = lines.prevPos(pos) && + riskyAdjoiningCharExp.test(lines.charAt(pos)); - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, "split", f) + var newLines = print( + reprint.newPath, + needToPrintNewPathWithComments + ).indentTail(oldNode.loc.indent); - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. + var needsTrailingSpace = + riskyAdjoiningCharExp.test(lines.charAt(oldNode.loc.end)); - var set = this.set - this.debug(this.pattern, "set", set) + // If we try to replace the argument of a ReturnStatement like + // return"asdf" with e.g. a literal null expression, we run + // the risk of ending up with returnnull, so we need to add an + // extra leading space in situations where that might + // happen. Likewise for "asdf"in obj. See #170. + if (needsLeadingSpace || needsTrailingSpace) { + var newParts = []; + needsLeadingSpace && newParts.push(" "); + newParts.push(newLines); + needsTrailingSpace && newParts.push(" "); + newLines = linesModule.concat(newParts); + } - // Find the basename of the path by looking for the last non-empty segment - var filename; - for (var i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } + patcher.replace(oldNode.loc, newLines); + }); - for (var i = 0, l = set.length; i < l; i ++) { - var pattern = set[i], file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } + // Recall that origLoc is the .loc of an ancestor node that is + // guaranteed to contain all the reprinted nodes and comments. + return patcher.get(origLoc).indentTail(-orig.loc.indent); + }; + }; - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} + function findReprints(newPath, reprints) { + var newNode = newPath.getValue(); + Printable.assert(newNode); -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug("matchOne", - { "this": this - , file: file - , pattern: pattern }) - - this.debug("matchOne", file.length, pattern.length) - - for ( var fi = 0 - , pi = 0 - , fl = file.length - , pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi ++, pi ++ ) { - - this.debug("matchOne loop") - var p = pattern[pi] - , f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - , pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for ( ; fi < fl; fi ++) { - if (file[fi] === "." || file[fi] === ".." || - (!options.dot && file[fi].charAt(0) === ".")) return false - } - return true - } + var oldNode = newNode.original; + Printable.assert(oldNode); - // ok, let's see if we can swallow whatever we can. - WHILE: while (fr < fl) { - var swallowee = file[fr] + assert.deepEqual(reprints, []); - this.debug('\nglobstar while', - file, fr, pattern, pr, swallowee) + if (newNode.type !== oldNode.type) { + return false; + } - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === "." || swallowee === ".." || - (!options.dot && swallowee.charAt(0) === ".")) { - this.debug("dot detected!", file, fr, pattern, pr) - break WHILE - } + var oldPath = new FastPath(oldNode); + var canReprint = findChildReprints(newPath, oldPath, reprints); - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr ++ - } - } - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug("\n>>> no match, partial?", file, fr, pattern, pr) - if (fr === fl) return true - } - return false + if (!canReprint) { + // Make absolutely sure the calling code does not attempt to reprint + // any nodes. + reprints.length = 0; } - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === "string") { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug("string match", p, f, hit) - } else { - hit = f.match(p) - this.debug("pattern match", p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") - return emptyFileEnd - } - - // should be unreachable. - throw new Error("wtf?") -} + return canReprint; + } + function findAnyReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + var oldNode = oldPath.getValue(); -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, "$1") -} - - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") -} - -}).call(this,require('_process')) -},{"_process":183,"brace-expansion":417}],417:[function(require,module,exports){ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} + if (newNode === oldNode) + return true; + if (isArray.check(newNode)) + return findArrayReprints(newPath, oldPath, reprints); -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; + if (isObject.check(newNode)) + return findObjectReprints(newPath, oldPath, reprints); - var parts = []; - var m = balanced('{', '}', str); + return false; + } - if (!m) - return str.split(','); + function findArrayReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + var oldNode = oldPath.getValue(); + isArray.assert(newNode); + var len = newNode.length; - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); + if (!(isArray.check(oldNode) && + oldNode.length === len)) + return false; - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } + for (var i = 0; i < len; ++i) { + newPath.stack.push(i, newNode[i]); + oldPath.stack.push(i, oldNode[i]); + var canReprint = findAnyReprints(newPath, oldPath, reprints); + newPath.stack.length -= 2; + oldPath.stack.length -= 2; + if (!canReprint) { + return false; + } + } - parts.push.apply(parts, p); + return true; + } - return parts; -} + function findObjectReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + isObject.assert(newNode); -function expandTop(str) { - if (!str) - return []; + if (newNode.original === null) { + // If newNode.original node was set to null, reprint the node. + return false; + } - return expand(escapeBraces(str), true).map(unescapeBraces); -} + var oldNode = oldPath.getValue(); + if (!isObject.check(oldNode)) + return false; -function identity(e) { - return e; -} + if (Printable.check(newNode)) { + if (!Printable.check(oldNode)) { + return false; + } -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} + // Here we need to decide whether the reprinted code for newNode + // is appropriate for patching into the location of oldNode. -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} + if (newNode.type === oldNode.type) { + var childReprints = []; -function expand(str, isTop) { - var expansions = []; + if (findChildReprints(newPath, oldPath, childReprints)) { + reprints.push.apply(reprints, childReprints); + } else if (oldNode.loc) { + // If we have no .loc information for oldNode, then we + // won't be able to reprint it. + reprints.push({ + oldPath: oldPath.copy(), + newPath: newPath.copy() + }); + } else { + return false; + } - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; + return true; + } - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = /^(.*,)+(.+)?$/.test(m.body); - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } + if (Expression.check(newNode) && + Expression.check(oldNode) && + // If we have no .loc information for oldNode, then we won't + // be able to reprint it. + oldNode.loc) { - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; + // If both nodes are subtypes of Expression, then we should be + // able to fill the location occupied by the old node with + // code printed for the new node with no ill consequences. + reprints.push({ + oldPath: oldPath.copy(), + newPath: newPath.copy() }); + + return true; } + + // The nodes have different types, and at least one of the types + // is not a subtype of the Expression type, so we cannot safely + // assume the nodes are syntactically interchangeable. + return false; } + + return findChildReprints(newPath, oldPath, reprints); } - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. +// This object is reused in hasOpeningParen and hasClosingParen to avoid +// having to allocate a temporary object. + var reusablePos = { line: 1, column: 0 }; + var nonSpaceExp = /\S/; - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; + function hasOpeningParen(oldPath) { + var oldNode = oldPath.getValue(); + var loc = oldNode.loc; + var lines = loc && loc.lines; - var N; + if (lines) { + var pos = reusablePos; + pos.line = loc.start.line; + pos.column = loc.start.column; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); + while (lines.prevPos(pos)) { + var ch = lines.charAt(pos); - N = []; + if (ch === "(") { + // If we found an opening parenthesis but it occurred before + // the start of the original subtree for this reprinting, then + // we must not return true for hasOpeningParen(oldPath). + return comparePos(oldPath.getRootValue().loc.start, pos) <= 0; + } - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } + if (nonSpaceExp.test(ch)) { + return false; } } - N.push(c); } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } + return false; } - return expansions; -} + function hasClosingParen(oldPath) { + var oldNode = oldPath.getValue(); + var loc = oldNode.loc; + var lines = loc && loc.lines; + if (lines) { + var pos = reusablePos; + pos.line = loc.end.line; + pos.column = loc.end.column; -},{"balanced-match":418,"concat-map":419}],418:[function(require,module,exports){ -module.exports = balanced; -function balanced(a, b, str) { - var bal = 0; - var m = {}; - var ended = false; + do { + var ch = lines.charAt(pos); - for (var i = 0; i < str.length; i++) { - if (a == str.substr(i, a.length)) { - if (!('start' in m)) m.start = i; - bal++; - } - else if (b == str.substr(i, b.length) && 'start' in m) { - ended = true; - bal--; - if (!bal) { - m.end = i; - m.pre = str.substr(0, m.start); - m.body = (m.end - m.start > 1) - ? str.substring(m.start + a.length, m.end) - : ''; - m.post = str.slice(m.end + b.length); - return m; - } - } - } + if (ch === ")") { + // If we found a closing parenthesis but it occurred after the + // end of the original subtree for this reprinting, then we + // must not return true for hasClosingParen(oldPath). + return comparePos(pos, oldPath.getRootValue().loc.end) <= 0; + } + + if (nonSpaceExp.test(ch)) { + return false; + } - // if we opened more than we closed, find the one we closed - if (bal && ended) { - var start = m.start + a.length; - m = balanced(a, b, str.substr(start)); - if (m) { - m.start += start; - m.end += start; - m.pre = str.slice(0, start) + m.pre; + } while (lines.nextPos(pos)); } - return m; + + return false; } -} -},{}],419:[function(require,module,exports){ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -},{}],420:[function(require,module,exports){ -(function (process){ -'use strict'; - -function posix(path) { - return path.charAt(0) === '/'; -}; - -function win32(path) { - // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = !!device && device.charAt(1) !== ':'; - - // UNC paths are always absolute - return !!result[2] || isUnc; -}; - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; - -}).call(this,require('_process')) -},{"_process":183}],421:[function(require,module,exports){ -"use strict"; - -var originalObject = Object; -var originalDefProp = Object.defineProperty; -var originalCreate = Object.create; - -function defProp(obj, name, value) { - if (originalDefProp) try { - originalDefProp.call(originalObject, obj, name, { value: value }); - } catch (definePropertyIsBrokenInIE8) { - obj[name] = value; - } else { - obj[name] = value; + function hasParens(oldPath) { + // This logic can technically be fooled if the node has parentheses + // but there are comments intervening between the parentheses and the + // node. In such cases the node will be harmlessly wrapped in an + // additional layer of parentheses. + return hasOpeningParen(oldPath) && hasClosingParen(oldPath); } -} -// For functions that will be invoked using .call or .apply, we need to -// define those methods on the function objects themselves, rather than -// inheriting them from Function.prototype, so that a malicious or clumsy -// third party cannot interfere with the functionality of this module by -// redefining Function.prototype.call or .apply. -function makeSafeToCall(fun) { - if (fun) { - defProp(fun, "call", fun.call); - defProp(fun, "apply", fun.apply); - } - return fun; -} - -makeSafeToCall(originalDefProp); -makeSafeToCall(originalCreate); - -var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty); -var numToStr = makeSafeToCall(Number.prototype.toString); -var strSlice = makeSafeToCall(String.prototype.slice); - -var cloner = function(){}; -function create(prototype) { - if (originalCreate) { - return originalCreate.call(originalObject, prototype); - } - cloner.prototype = prototype || null; - return new cloner; -} - -var rand = Math.random; -var uniqueKeys = create(null); - -function makeUniqueKey() { - // Collisions are highly unlikely, but this module is in the business of - // making guarantees rather than safe bets. - do var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2)); - while (hasOwn.call(uniqueKeys, uniqueKey)); - return uniqueKeys[uniqueKey] = uniqueKey; -} - -function internString(str) { - var obj = {}; - obj[str] = true; - return Object.keys(obj)[0]; -} + function findChildReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + var oldNode = oldPath.getValue(); -// External users might find this function useful, but it is not necessary -// for the typical use of this module. -defProp(exports, "makeUniqueKey", makeUniqueKey); + isObject.assert(newNode); + isObject.assert(oldNode); -// Object.getOwnPropertyNames is the only way to enumerate non-enumerable -// properties, so if we wrap it to ignore our secret keys, there should be -// no way (except guessing) to access those properties. -var originalGetOPNs = Object.getOwnPropertyNames; -Object.getOwnPropertyNames = function getOwnPropertyNames(object) { - for (var names = originalGetOPNs(object), - src = 0, - dst = 0, - len = names.length; - src < len; - ++src) { - if (!hasOwn.call(uniqueKeys, names[src])) { - if (src > dst) { - names[dst] = names[src]; - } - ++dst; + if (newNode.original === null) { + // If newNode.original node was set to null, reprint the node. + return false; } - } - names.length = dst; - return names; -}; -function defaultCreatorFn(object) { - return create(null); -} + // If this type of node cannot come lexically first in its enclosing + // statement (e.g. a function expression or object literal), and it + // seems to be doing so, then the only way we can ignore this problem + // and save ourselves from falling back to the pretty printer is if an + // opening parenthesis happens to precede the node. For example, + // (function(){ ... }()); does not need to be reprinted, even though + // the FunctionExpression comes lexically first in the enclosing + // ExpressionStatement and fails the hasParens test, because the + // parent CallExpression passes the hasParens test. If we relied on + // the path.needsParens() && !hasParens(oldNode) check below, the + // absence of a closing parenthesis after the FunctionExpression would + // trigger pretty-printing unnecessarily. + if (!newPath.canBeFirstInStatement() && + newPath.firstInStatement() && + !hasOpeningParen(oldPath)) + return false; -function makeAccessor(secretCreatorFn) { - var brand = makeUniqueKey(); - var passkey = create(null); + // If this node needs parentheses and will not be wrapped with + // parentheses when reprinted, then return false to skip reprinting + // and let it be printed generically. + if (newPath.needsParens(true) && !hasParens(oldPath)) { + return false; + } - secretCreatorFn = secretCreatorFn || defaultCreatorFn; + for (var k in util.getUnionOfKeys(newNode, oldNode)) { + if (k === "loc") + continue; - function register(object) { - var secret; // Created lazily. + newPath.stack.push(k, types.getFieldValue(newNode, k)); + oldPath.stack.push(k, types.getFieldValue(oldNode, k)); + var canReprint = findAnyReprints(newPath, oldPath, reprints); + newPath.stack.length -= 2; + oldPath.stack.length -= 2; - function vault(key, forget) { - // Only code that has access to the passkey can retrieve (or forget) - // the secret object. - if (key === passkey) { - return forget - ? secret = null - : secret || (secret = secretCreatorFn(object)); + if (!canReprint) { + return false; } } - defProp(object, brand, vault); - } - - function accessor(object) { - if (!hasOwn.call(object, brand)) - register(object); - return object[brand](passkey); - } - - accessor.forget = function(object) { - if (hasOwn.call(object, brand)) - object[brand](passkey, true); - }; - - return accessor; -} - -defProp(exports, "makeAccessor", makeAccessor); - -},{}],422:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -var assert = require("assert"); -var types = require("ast-types"); -var isArray = types.builtInTypes.array; -var b = types.builders; -var n = types.namedTypes; -var leap = require("./leap"); -var meta = require("./meta"); -var util = require("./util"); -var hasOwn = Object.prototype.hasOwnProperty; + return true; + } -function Emitter(contextId) { - assert.ok(this instanceof Emitter); - n.Identifier.assert(contextId); +},{"./fast-path":471,"./lines":472,"./types":478,"./util":479,"assert":203}],477:[function(require,module,exports){ + var assert = require("assert"); + var sourceMap = require("source-map"); + var printComments = require("./comments").printComments; + var linesModule = require("./lines"); + var fromString = linesModule.fromString; + var concat = linesModule.concat; + var normalizeOptions = require("./options").normalize; + var getReprinter = require("./patcher").getReprinter; + var types = require("./types"); + var namedTypes = types.namedTypes; + var isString = types.builtInTypes.string; + var isObject = types.builtInTypes.object; + var FastPath = require("./fast-path"); + var util = require("./util"); + + function PrintResult(code, sourceMap) { + assert.ok(this instanceof PrintResult); + + isString.assert(code); + this.code = code; - Object.defineProperties(this, { - // In order to make sure the context object does not collide with - // anything in the local scope, we might have to rename it, so we - // refer to it symbolically instead of just assuming that it will be - // called "context". - contextId: { value: contextId }, + if (sourceMap) { + isObject.assert(sourceMap); + this.map = sourceMap; + } + } - // An append-only list of Statements that grows each time this.emit is - // called. - listing: { value: [] }, + var PRp = PrintResult.prototype; + var warnedAboutToString = false; - // A sparse array whose keys correspond to locations in this.listing - // that have been marked as branch/jump targets. - marked: { value: [true] }, + PRp.toString = function() { + if (!warnedAboutToString) { + console.warn( + "Deprecation warning: recast.print now returns an object with " + + "a .code property. You appear to be treating the object as a " + + "string, which might still work but is strongly discouraged." + ); - // The last location will be marked when this.getDispatchLoop is - // called. - finalLoc: { value: loc() }, + warnedAboutToString = true; + } - // A list of all leap.TryEntry statements emitted. - tryEntries: { value: [] } - }); + return this.code; + }; - // The .leapManager property needs to be defined by a separate - // defineProperties call so that .finalLoc will be visible to the - // leap.LeapManager constructor. - Object.defineProperties(this, { - // Each time we evaluate the body of a loop, we tell this.leapManager - // to enter a nested loop context that determines the meaning of break - // and continue statements therein. - leapManager: { value: new leap.LeapManager(this) } - }); -} + var emptyPrintResult = new PrintResult(""); -var Ep = Emitter.prototype; -exports.Emitter = Emitter; + function Printer(originalOptions) { + assert.ok(this instanceof Printer); -// Offsets into this.listing that could be used as targets for branches or -// jumps are represented as numeric Literal nodes. This representation has -// the amazingly convenient benefit of allowing the exact value of the -// location to be determined at any time, even after generating code that -// refers to the location. -function loc() { - return b.literal(-1); -} + var explicitTabWidth = originalOptions && originalOptions.tabWidth; + var options = normalizeOptions(originalOptions); + assert.notStrictEqual(options, originalOptions); -// Sets the exact value of the given location to the offset of the next -// Statement emitted. -Ep.mark = function(loc) { - n.Literal.assert(loc); - var index = this.listing.length; - if (loc.value === -1) { - loc.value = index; - } else { - // Locations can be marked redundantly, but their values cannot change - // once set the first time. - assert.strictEqual(loc.value, index); - } - this.marked[index] = true; - return loc; -}; + // It's common for client code to pass the same options into both + // recast.parse and recast.print, but the Printer doesn't need (and + // can be confused by) options.sourceFileName, so we null it out. + options.sourceFileName = null; -Ep.emit = function(node) { - if (n.Expression.check(node)) - node = b.expressionStatement(node); - n.Statement.assert(node); - this.listing.push(node); -}; + function printWithComments(path) { + assert.ok(path instanceof FastPath); + return printComments(path, print); + } -// Shorthand for emitting assignment statements. This will come in handy -// for assignments to temporary variables. -Ep.emitAssign = function(lhs, rhs) { - this.emit(this.assign(lhs, rhs)); - return lhs; -}; + function print(path, includeComments) { + if (includeComments) + return printWithComments(path); -// Shorthand for an assignment statement. -Ep.assign = function(lhs, rhs) { - return b.expressionStatement( - b.assignmentExpression("=", lhs, rhs)); -}; + assert.ok(path instanceof FastPath); -// Convenience function for generating expressions like context.next, -// context.sent, and context.rval. -Ep.contextProperty = function(name, computed) { - return b.memberExpression( - this.contextId, - computed ? b.literal(name) : b.identifier(name), - !!computed - ); -}; + if (!explicitTabWidth) { + var oldTabWidth = options.tabWidth; + var loc = path.getNode().loc; + if (loc && loc.lines && loc.lines.guessTabWidth) { + options.tabWidth = loc.lines.guessTabWidth(); + var lines = maybeReprint(path); + options.tabWidth = oldTabWidth; + return lines; + } + } -var volatileContextPropertyNames = { - prev: true, - next: true, - sent: true, - rval: true -}; + return maybeReprint(path); + } -// A "volatile" context property is a MemberExpression like context.sent -// that should probably be stored in a temporary variable when there's a -// possibility the property will get overwritten. -Ep.isVolatileContextProperty = function(expr) { - if (n.MemberExpression.check(expr)) { - if (expr.computed) { - // If it's a computed property such as context[couldBeAnything], - // assume the worst in terms of volatility. - return true; + function maybeReprint(path) { + var reprinter = getReprinter(path); + if (reprinter) + return maybeAddParens(path, reprinter(print)); + return printRootGenerically(path); } - if (n.Identifier.check(expr.object) && - n.Identifier.check(expr.property) && - expr.object.name === this.contextId.name && - hasOwn.call(volatileContextPropertyNames, - expr.property.name)) { - return true; + // Print the root node generically, but then resume reprinting its + // children non-generically. + function printRootGenerically(path) { + return genericPrint(path, options, printWithComments); } - } - return false; -}; + // Print the entire AST generically. + function printGenerically(path) { + return genericPrint(path, options, printGenerically); + } -// Shorthand for setting context.rval and jumping to `context.stop()`. -Ep.stop = function(rval) { - if (rval) { - this.setReturnValue(rval); - } + this.print = function(ast) { + if (!ast) { + return emptyPrintResult; + } - this.jump(this.finalLoc); -}; + var lines = print(FastPath.from(ast), true); -Ep.setReturnValue = function(valuePath) { - n.Expression.assert(valuePath.value); + return new PrintResult( + lines.toString(options), + util.composeSourceMaps( + options.inputSourceMap, + lines.getSourceMap( + options.sourceMapName, + options.sourceRoot + ) + ) + ); + }; - this.emitAssign( - this.contextProperty("rval"), - this.explodeExpression(valuePath) - ); -}; + this.printGenerically = function(ast) { + if (!ast) { + return emptyPrintResult; + } -Ep.clearPendingException = function(tryLoc, assignee) { - n.Literal.assert(tryLoc); + var path = FastPath.from(ast); + var oldReuseWhitespace = options.reuseWhitespace; - var catchCall = b.callExpression( - this.contextProperty("catch", true), - [tryLoc] - ); + // Do not reuse whitespace (or anything else, for that matter) + // when printing generically. + options.reuseWhitespace = false; - if (assignee) { - this.emitAssign(assignee, catchCall); - } else { - this.emit(catchCall); + // TODO Allow printing of comments? + var pr = new PrintResult(printGenerically(path).toString(options)); + options.reuseWhitespace = oldReuseWhitespace; + return pr; + }; } -}; - -// Emits code for an unconditional jump to the given location, even if the -// exact value of the location is not yet known. -Ep.jump = function(toLoc) { - this.emitAssign(this.contextProperty("next"), toLoc); - this.emit(b.breakStatement()); -}; -// Conditional jump. -Ep.jumpIf = function(test, toLoc) { - n.Expression.assert(test); - n.Literal.assert(toLoc); - - this.emit(b.ifStatement( - test, - b.blockStatement([ - this.assign(this.contextProperty("next"), toLoc), - b.breakStatement() - ]) - )); -}; + exports.Printer = Printer; -// Conditional jump, with the condition negated. -Ep.jumpIfNot = function(test, toLoc) { - n.Expression.assert(test); - n.Literal.assert(toLoc); - - var negatedTest; - if (n.UnaryExpression.check(test) && - test.operator === "!") { - // Avoid double negation. - negatedTest = test.argument; - } else { - negatedTest = b.unaryExpression("!", test); + function maybeAddParens(path, lines) { + return path.needsParens() ? concat(["(", lines, ")"]) : lines; } - this.emit(b.ifStatement( - negatedTest, - b.blockStatement([ - this.assign(this.contextProperty("next"), toLoc), - b.breakStatement() - ]) - )); -}; - -// Returns a unique MemberExpression that can be used to store and -// retrieve temporary values. Since the object of the member expression is -// the context object, which is presumed to coexist peacefully with all -// other local variables, and since we just increment `nextTempId` -// monotonically, uniqueness is assured. -var nextTempId = 0; -Ep.makeTempVar = function() { - return this.contextProperty("t" + nextTempId++); -}; - -Ep.getContextFunction = function(id) { - var func = b.functionExpression( - id || null/*Anonymous*/, - [this.contextId], - b.blockStatement([this.getDispatchLoop()]), - false, // Not a generator anymore! - false // Nor an expression. - ); - func._aliasFunction = true; - return func; -}; - -// Turns this.listing into a loop of the form -// -// while (1) switch (context.next) { -// case 0: -// ... -// case n: -// return context.stop(); -// } -// -// Each marked location in this.listing will correspond to one generated -// case statement. -Ep.getDispatchLoop = function() { - var self = this; - var cases = []; - var current; + function genericPrint(path, options, printPath) { + assert.ok(path instanceof FastPath); + return maybeAddParens(path, genericPrintNoParens(path, options, printPath)); + } - // If we encounter a break, continue, or return statement in a switch - // case, we can skip the rest of the statements until the next case. - var alreadyEnded = false; + function genericPrintNoParens(path, options, print) { + var n = path.getValue(); - self.listing.forEach(function(stmt, i) { - if (self.marked.hasOwnProperty(i)) { - cases.push(b.switchCase( - b.literal(i), - current = [])); - alreadyEnded = false; + if (!n) { + return fromString(""); } - if (!alreadyEnded) { - current.push(stmt); - if (isSwitchCaseEnder(stmt)) - alreadyEnded = true; + if (typeof n === "string") { + return fromString(n, options); } - }); - // Now that we know how many statements there will be in this.listing, - // we can finally resolve this.finalLoc.value. - this.finalLoc.value = this.listing.length; - - cases.push( - b.switchCase(this.finalLoc, [ - // Intentionally fall through to the "end" case... - ]), - - // So that the runtime can jump to the final location without having - // to know its offset, we provide the "end" case as a synonym. - b.switchCase(b.literal("end"), [ - // This will check/clear both context.thrown and context.rval. - b.returnStatement( - b.callExpression(this.contextProperty("stop"), []) - ) - ]) - ); + namedTypes.Printable.assert(n); - return b.whileStatement( - b.literal(1), - b.switchStatement( - b.assignmentExpression( - "=", - this.contextProperty("prev"), - this.contextProperty("next") - ), - cases - ) - ); -}; + switch (n.type) { + case "File": + return path.call(print, "program"); -// See comment above re: alreadyEnded. -function isSwitchCaseEnder(stmt) { - return n.BreakStatement.check(stmt) - || n.ContinueStatement.check(stmt) - || n.ReturnStatement.check(stmt) - || n.ThrowStatement.check(stmt); -} - -Ep.getTryLocsList = function() { - if (this.tryEntries.length === 0) { - // To avoid adding a needless [] to the majority of runtime.wrap - // argument lists, force the caller to handle this case specially. - return null; - } + case "Program": + return maybeAddSemicolon(path.call(function(bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body")); - var lastLocValue = 0; + case "EmptyStatement": + return fromString(""); - return b.arrayExpression( - this.tryEntries.map(function(tryEntry) { - var thisLocValue = tryEntry.firstLoc.value; - assert.ok(thisLocValue >= lastLocValue, "try entries out of order"); - lastLocValue = thisLocValue; + case "ExpressionStatement": + return concat([path.call(print, "expression"), ";"]); - var ce = tryEntry.catchEntry; - var fe = tryEntry.finallyEntry; + case "BinaryExpression": + case "LogicalExpression": + case "AssignmentExpression": + return fromString(" ").join([ + path.call(print, "left"), + n.operator, + path.call(print, "right") + ]); - var locs = [ - tryEntry.firstLoc, - // The null here makes a hole in the array. - ce ? ce.firstLoc : null - ]; + case "AssignmentPattern": + return concat([ + path.call(print, "left"), + "=", + path.call(print, "right") + ]); - if (fe) { - locs[2] = fe.firstLoc; - locs[3] = fe.afterLoc; - } + case "MemberExpression": + var parts = [path.call(print, "object")]; - return b.arrayExpression(locs); - }) - ); -}; + var property = path.call(print, "property"); + if (n.computed) { + parts.push("[", property, "]"); + } else { + parts.push(".", property); + } -// All side effects must be realized in order. + return concat(parts); -// If any subexpression harbors a leap, all subexpressions must be -// neutered of side effects. + case "Path": + return fromString(".").join(n.body); -// No destructive modification of AST nodes. + case "Identifier": + return concat([ + fromString(n.name, options), + path.call(print, "typeAnnotation") + ]); + + case "SpreadElement": + case "SpreadElementPattern": + case "SpreadProperty": + case "SpreadPropertyPattern": + case "RestElement": + return concat(["...", path.call(print, "argument")]); + + case "FunctionDeclaration": + case "FunctionExpression": + var parts = []; + + if (n.async) + parts.push("async "); + + parts.push("function"); + + if (n.generator) + parts.push("*"); + + if (n.id) { + parts.push( + " ", + path.call(print, "id"), + path.call(print, "typeParameters") + ); + } -Ep.explode = function(path, ignoreResult) { - assert.ok(path instanceof types.NodePath); + parts.push( + "(", + printFunctionParams(path, options, print), + ")", + path.call(print, "returnType"), + " ", + path.call(print, "body") + ); - var node = path.value; - var self = this; + return concat(parts); - n.Node.assert(node); + case "ArrowFunctionExpression": + var parts = []; - if (n.Statement.check(node)) - return self.explodeStatement(path); + if (n.async) + parts.push("async "); - if (n.Expression.check(node)) - return self.explodeExpression(path, ignoreResult); + if (n.params.length === 1 && !n.rest) { + parts.push(path.call(print, "params", 0)); + } else { + parts.push( + "(", + printFunctionParams(path, options, print), + ")" + ); + } - if (n.Declaration.check(node)) - throw getDeclError(node); + parts.push(" => ", path.call(print, "body")); - switch (node.type) { - case "Program": - return path.get("body").map( - self.explodeStatement, - self - ); + return concat(parts); - case "VariableDeclarator": - throw getDeclError(node); + case "MethodDefinition": + var parts = []; - // These node types should be handled by their parent nodes - // (ObjectExpression, SwitchStatement, and TryStatement, respectively). - case "Property": - case "SwitchCase": - case "CatchClause": - throw new Error( - node.type + " nodes should be handled by their parents"); + if (n.static) { + parts.push("static "); + } - default: - throw new Error( - "unknown Node of type " + - JSON.stringify(node.type)); - } -}; + parts.push(printMethod(path, options, print)); -function getDeclError(node) { - return new Error( - "all declarations should have been transformed into " + - "assignments before the Exploder began its work: " + - JSON.stringify(node)); -} + return concat(parts); -Ep.explodeStatement = function(path, labelId) { - assert.ok(path instanceof types.NodePath); + case "YieldExpression": + var parts = ["yield"]; - var stmt = path.value; - var self = this; + if (n.delegate) + parts.push("*"); - n.Statement.assert(stmt); + if (n.argument) + parts.push(" ", path.call(print, "argument")); - if (labelId) { - n.Identifier.assert(labelId); - } else { - labelId = null; - } + return concat(parts); - // Explode BlockStatement nodes even if they do not contain a yield, - // because we don't want or need the curly braces. - if (n.BlockStatement.check(stmt)) { - return path.get("body").each( - self.explodeStatement, - self - ); - } + case "AwaitExpression": + var parts = ["await"]; - if (!meta.containsLeap(stmt)) { - // Technically we should be able to avoid emitting the statement - // altogether if !meta.hasSideEffects(stmt), but that leads to - // confusing generated code (for instance, `while (true) {}` just - // disappears) and is probably a more appropriate job for a dedicated - // dead code elimination pass. - self.emit(stmt); - return; - } + if (n.all) + parts.push("*"); - switch (stmt.type) { - case "ExpressionStatement": - self.explodeExpression(path.get("expression"), true); - break; - - case "LabeledStatement": - var after = loc(); - - // Did you know you can break from any labeled block statement or - // control structure? Well, you can! Note: when a labeled loop is - // encountered, the leap.LabeledEntry created here will immediately - // enclose a leap.LoopEntry on the leap manager's stack, and both - // entries will have the same label. Though this works just fine, it - // may seem a bit redundant. In theory, we could check here to - // determine if stmt knows how to handle its own label; for example, - // stmt happens to be a WhileStatement and so we know it's going to - // establish its own LoopEntry when we explode it (below). Then this - // LabeledEntry would be unnecessary. Alternatively, we might be - // tempted not to pass stmt.label down into self.explodeStatement, - // because we've handled the label here, but that's a mistake because - // labeled loops may contain labeled continue statements, which is not - // something we can handle in this generic case. All in all, I think a - // little redundancy greatly simplifies the logic of this case, since - // it's clear that we handle all possible LabeledStatements correctly - // here, regardless of whether they interact with the leap manager - // themselves. Also remember that labels and break/continue-to-label - // statements are rare, and all of this logic happens at transform - // time, so it has no additional runtime cost. - self.leapManager.withEntry( - new leap.LabeledEntry(after, stmt.label), - function() { - self.explodeStatement(path.get("body"), stmt.label); - } - ); + if (n.argument) + parts.push(" ", path.call(print, "argument")); - self.mark(after); + return concat(parts); - break; + case "ModuleDeclaration": + var parts = ["module", path.call(print, "id")]; - case "WhileStatement": - var before = loc(); - var after = loc(); + if (n.source) { + assert.ok(!n.body); + parts.push("from", path.call(print, "source")); + } else { + parts.push(path.call(print, "body")); + } - self.mark(before); - self.jumpIfNot(self.explodeExpression(path.get("test")), after); - self.leapManager.withEntry( - new leap.LoopEntry(after, before, labelId), - function() { self.explodeStatement(path.get("body")); } - ); - self.jump(before); - self.mark(after); + return fromString(" ").join(parts); - break; + case "ImportSpecifier": + case "ExportSpecifier": + var parts = [path.call(print, "id")]; - case "DoWhileStatement": - var first = loc(); - var test = loc(); - var after = loc(); + if (n.name) + parts.push(" as ", path.call(print, "name")); - self.mark(first); - self.leapManager.withEntry( - new leap.LoopEntry(after, test, labelId), - function() { self.explode(path.get("body")); } - ); - self.mark(test); - self.jumpIf(self.explodeExpression(path.get("test")), first); - self.mark(after); + return concat(parts); - break; + case "ExportBatchSpecifier": + return fromString("*"); - case "ForStatement": - var head = loc(); - var update = loc(); - var after = loc(); + case "ImportNamespaceSpecifier": + return concat(["* as ", path.call(print, "id")]); - if (stmt.init) { - // We pass true here to indicate that if stmt.init is an expression - // then we do not care about its result. - self.explode(path.get("init"), true); - } + case "ImportDefaultSpecifier": + return path.call(print, "id"); - self.mark(head); + case "ExportDeclaration": + var parts = ["export"]; - if (stmt.test) { - self.jumpIfNot(self.explodeExpression(path.get("test")), after); - } else { - // No test means continue unconditionally. - } + if (n["default"]) { + parts.push(" default"); - self.leapManager.withEntry( - new leap.LoopEntry(after, update, labelId), - function() { self.explodeStatement(path.get("body")); } - ); + } else if (n.specifiers && + n.specifiers.length > 0) { - self.mark(update); + if (n.specifiers.length === 1 && + n.specifiers[0].type === "ExportBatchSpecifier") { + parts.push(" *"); + } else { + parts.push( + " { ", + fromString(", ").join(path.map(print, "specifiers")), + " }" + ); + } - if (stmt.update) { - // We pass true here to indicate that if stmt.update is an - // expression then we do not care about its result. - self.explode(path.get("update"), true); - } + if (n.source) + parts.push(" from ", path.call(print, "source")); - self.jump(head); + parts.push(";"); - self.mark(after); + return concat(parts); + } - break; + if (n.declaration) { + if (!namedTypes.Node.check(n.declaration)) { + console.log(JSON.stringify(n, null, 2)); + } + var decLines = path.call(print, "declaration"); + parts.push(" ", decLines); + if (lastNonSpaceCharacter(decLines) !== ";") { + parts.push(";"); + } + } - case "ForInStatement": - n.Identifier.assert(stmt.left); + return concat(parts); - var head = loc(); - var after = loc(); + case "ImportDeclaration": + var parts = ["import "]; - var keyIterNextFn = self.makeTempVar(); - self.emitAssign( - keyIterNextFn, - b.callExpression( - util.runtimeProperty("keys"), - [self.explodeExpression(path.get("right"))] - ) - ); + if (n.specifiers && + n.specifiers.length > 0) { - self.mark(head); + var foundImportSpecifier = false; - var keyInfoTmpVar = self.makeTempVar(); - self.jumpIf( - b.memberExpression( - b.assignmentExpression( - "=", - keyInfoTmpVar, - b.callExpression(keyIterNextFn, []) - ), - b.identifier("done"), - false - ), - after - ); + path.each(function(specifierPath) { + var i = specifierPath.getName(); + if (i > 0) { + parts.push(", "); + } - self.emitAssign( - stmt.left, - b.memberExpression( - keyInfoTmpVar, - b.identifier("value"), - false - ) - ); + var value = specifierPath.getValue(); - self.leapManager.withEntry( - new leap.LoopEntry(after, head, labelId), - function() { self.explodeStatement(path.get("body")); } - ); + if (namedTypes.ImportDefaultSpecifier.check(value) || + namedTypes.ImportNamespaceSpecifier.check(value)) { + assert.strictEqual(foundImportSpecifier, false); + } else { + namedTypes.ImportSpecifier.assert(value); + if (!foundImportSpecifier) { + foundImportSpecifier = true; + parts.push("{"); + } + } - self.jump(head); + parts.push(print(specifierPath)); + }, "specifiers"); - self.mark(after); + if (foundImportSpecifier) { + parts.push("}"); + } - break; + parts.push(" from "); + } - case "BreakStatement": - self.emitAbruptCompletion({ - type: "break", - target: self.leapManager.getBreakLoc(stmt.label) - }); + parts.push(path.call(print, "source"), ";"); - break; + return concat(parts); - case "ContinueStatement": - self.emitAbruptCompletion({ - type: "continue", - target: self.leapManager.getContinueLoc(stmt.label) - }); + case "BlockStatement": + var naked = path.call(function(bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body"); - break; + if (naked.isEmpty()) { + return fromString("{}"); + } - case "SwitchStatement": - // Always save the discriminant into a temporary variable in case the - // test expressions overwrite values like context.sent. - var disc = self.emitAssign( - self.makeTempVar(), - self.explodeExpression(path.get("discriminant")) - ); + return concat([ + "{\n", + naked.indent(options.tabWidth), + "\n}" + ]); - var after = loc(); - var defaultLoc = loc(); - var condition = defaultLoc; - var caseLocs = []; + case "ReturnStatement": + var parts = ["return"]; - // If there are no cases, .cases might be undefined. - var cases = stmt.cases || []; + if (n.argument) { + var argLines = path.call(print, "argument"); + if (argLines.length > 1 && + (namedTypes.XJSElement && + namedTypes.XJSElement.check(n.argument) || + namedTypes.JSXElement && + namedTypes.JSXElement.check(n.argument))) { + parts.push( + " (\n", + argLines.indent(options.tabWidth), + "\n)" + ); + } else { + parts.push(" ", argLines); + } + } - for (var i = cases.length - 1; i >= 0; --i) { - var c = cases[i]; - n.SwitchCase.assert(c); + parts.push(";"); - if (c.test) { - condition = b.conditionalExpression( - b.binaryExpression("===", disc, c.test), - caseLocs[i] = loc(), - condition - ); - } else { - caseLocs[i] = defaultLoc; - } - } + return concat(parts); - self.jump(self.explodeExpression( - new types.NodePath(condition, path, "discriminant") - )); + case "CallExpression": + return concat([ + path.call(print, "callee"), + printArgumentsList(path, options, print) + ]); - self.leapManager.withEntry( - new leap.SwitchEntry(after), - function() { - path.get("cases").each(function(casePath) { - var c = casePath.value; - var i = casePath.name; + case "ObjectExpression": + case "ObjectPattern": + case "ObjectTypeAnnotation": + var allowBreak = false; + var isTypeAnnotation = n.type === "ObjectTypeAnnotation"; + var separator = isTypeAnnotation ? ';' : ','; + var fields = []; - self.mark(caseLocs[i]); + if (isTypeAnnotation) { + fields.push("indexers", "callProperties"); + } - casePath.get("consequent").each( - self.explodeStatement, - self - ); - }); - } - ); + fields.push("properties"); - self.mark(after); - if (defaultLoc.value === -1) { - self.mark(defaultLoc); - assert.strictEqual(after.value, defaultLoc.value); - } + var len = 0; + fields.forEach(function(field) { + len += n[field].length; + }); - break; + var oneLine = (isTypeAnnotation && len === 1) || len === 0; + var parts = [oneLine ? "{" : "{\n"]; - case "IfStatement": - var elseLoc = stmt.alternate && loc(); - var after = loc(); + fields.forEach(function(field) { + path.map(function(childPath) { + var i = childPath.getName(); + var prop = childPath.getValue(); + var lines = print(childPath); - self.jumpIfNot( - self.explodeExpression(path.get("test")), - elseLoc || after - ); + if (!oneLine) { + lines = lines.indent(options.tabWidth); + } - self.explodeStatement(path.get("consequent")); + var multiLine = !isTypeAnnotation && lines.length > 1; + if (multiLine && allowBreak) { + // Similar to the logic for BlockStatement. + parts.push("\n"); + } - if (elseLoc) { - self.jump(after); - self.mark(elseLoc); - self.explodeStatement(path.get("alternate")); - } + parts.push(lines); - self.mark(after); + if (i < len - 1) { + // Add an extra line break if the previous object property + // had a multi-line value. + parts.push(separator + (multiLine ? "\n\n" : "\n")); + allowBreak = !multiLine; + } else if (len !== 1 && isTypeAnnotation) { + parts.push(separator); + } + }, field); + }); - break; + parts.push(oneLine ? "}" : "\n}"); - case "ReturnStatement": - self.emitAbruptCompletion({ - type: "return", - value: self.explodeExpression(path.get("argument")) - }); + return concat(parts); - break; + case "PropertyPattern": + return concat([ + path.call(print, "key"), + ": ", + path.call(print, "pattern") + ]); - case "WithStatement": - throw new Error( - node.type + " not supported in generator functions."); + case "Property": // Non-standard AST node type. + if (n.method || n.kind === "get" || n.kind === "set") { + return printMethod(path, options, print); + } - case "TryStatement": - var after = loc(); + var key = path.call(print, "key"); + if (n.computed) { + key = concat(["[", key, "]"]); + } - var handler = stmt.handler; - if (!handler && stmt.handlers) { - handler = stmt.handlers[0] || null; - } + if (n.shorthand) { + return key; + } - var catchLoc = handler && loc(); - var catchEntry = catchLoc && new leap.CatchEntry( - catchLoc, - handler.param - ); + return concat([key, ": ", path.call(print, "value")]); - var finallyLoc = stmt.finalizer && loc(); - var finallyEntry = finallyLoc && - new leap.FinallyEntry(finallyLoc, after); + case "ArrayExpression": + case "ArrayPattern": + var elems = n.elements, + len = elems.length, + parts = ["["]; + + path.each(function(elemPath) { + var i = elemPath.getName(); + var elem = elemPath.getValue(); + if (!elem) { + // If the array expression ends with a hole, that hole + // will be ignored by the interpreter, but if it ends with + // two (or more) holes, we need to write out two (or more) + // commas so that the resulting code is interpreted with + // both (all) of the holes. + parts.push(","); + } else { + if (i > 0) + parts.push(" "); + parts.push(print(elemPath)); + if (i < len - 1) + parts.push(","); + } + }, "elements"); - var tryEntry = new leap.TryEntry( - self.getUnmarkedCurrentLoc(), - catchEntry, - finallyEntry - ); + parts.push("]"); - self.tryEntries.push(tryEntry); - self.updateContextPrevLoc(tryEntry.firstLoc); + return concat(parts); - self.leapManager.withEntry(tryEntry, function() { - self.explodeStatement(path.get("block")); + case "SequenceExpression": + return fromString(", ").join(path.map(print, "expressions")); - if (catchLoc) { - if (finallyLoc) { - // If we have both a catch block and a finally block, then - // because we emit the catch block first, we need to jump over - // it to the finally block. - self.jump(finallyLoc); + case "ThisExpression": + return fromString("this"); - } else { - // If there is no finally block, then we need to jump over the - // catch block to the fall-through location. - self.jump(after); - } + case "Literal": + if (typeof n.value !== "string") + return fromString(n.value, options); - self.updateContextPrevLoc(self.mark(catchLoc)); + // intentionally fall through... - var bodyPath = path.get("handler", "body"); - var safeParam = self.makeTempVar(); - self.clearPendingException(tryEntry.firstLoc, safeParam); + case "ModuleSpecifier": + return fromString(nodeStr(n.value, options), options); - var catchScope = bodyPath.scope; - var catchParamName = handler.param.name; - n.CatchClause.assert(catchScope.node); - assert.strictEqual(catchScope.lookup(catchParamName), catchScope); + case "UnaryExpression": + var parts = [n.operator]; + if (/[a-z]$/.test(n.operator)) + parts.push(" "); + parts.push(path.call(print, "argument")); + return concat(parts); - types.visit(bodyPath, { - visitIdentifier: function(path) { - if (util.isReference(path, catchParamName) && - path.scope.lookup(catchParamName) === catchScope) { - return safeParam; - } + case "UpdateExpression": + var parts = [path.call(print, "argument"), n.operator]; - this.traverse(path); - }, + if (n.prefix) + parts.reverse(); - visitFunction: function(path) { - if (path.scope.declares(catchParamName)) { - // Don't descend into nested scopes that shadow the catch - // parameter with their own declarations. This isn't - // logically necessary because of the path.scope.lookup we - // do in visitIdentifier, but it saves time. - return false; - } + return concat(parts); - this.traverse(path); - } - }); + case "ConditionalExpression": + return concat([ + "(", path.call(print, "test"), + " ? ", path.call(print, "consequent"), + " : ", path.call(print, "alternate"), ")" + ]); - self.leapManager.withEntry(catchEntry, function() { - self.explodeStatement(bodyPath); - }); - } + case "NewExpression": + var parts = ["new ", path.call(print, "callee")]; + var args = n.arguments; + if (args) { + parts.push(printArgumentsList(path, options, print)); + } - if (finallyLoc) { - self.updateContextPrevLoc(self.mark(finallyLoc)); + return concat(parts); - self.leapManager.withEntry(finallyEntry, function() { - self.explodeStatement(path.get("finalizer")); - }); + case "VariableDeclaration": + var parts = [n.kind, " "]; + var maxLen = 0; + var printed = path.map(function(childPath) { + var lines = print(childPath); + maxLen = Math.max(lines.length, maxLen); + return lines; + }, "declarations"); - self.emit(b.returnStatement(b.callExpression( - self.contextProperty("finish"), - [finallyEntry.firstLoc] - ))); - } - }); + if (maxLen === 1) { + parts.push(fromString(", ").join(printed)); + } else if (printed.length > 1 ) { + parts.push( + fromString(",\n").join(printed) + .indentTail(n.kind.length + 1) + ); + } else { + parts.push(printed[0]); + } + + // We generally want to terminate all variable declarations with a + // semicolon, except when they are children of for loops. + var parentNode = path.getParentNode(); + if (!namedTypes.ForStatement.check(parentNode) && + !namedTypes.ForInStatement.check(parentNode) && + !(namedTypes.ForOfStatement && + namedTypes.ForOfStatement.check(parentNode))) { + parts.push(";"); + } + + return concat(parts); + + case "VariableDeclarator": + return n.init ? fromString(" = ").join([ + path.call(print, "id"), + path.call(print, "init") + ]) : path.call(print, "id"); + + case "WithStatement": + return concat([ + "with (", + path.call(print, "object"), + ") ", + path.call(print, "body") + ]); + + case "IfStatement": + var con = adjustClause(path.call(print, "consequent"), options), + parts = ["if (", path.call(print, "test"), ")", con]; + + if (n.alternate) + parts.push( + endsWithBrace(con) ? " else" : "\nelse", + adjustClause(path.call(print, "alternate"), options)); + + return concat(parts); + + case "ForStatement": + // TODO Get the for (;;) case right. + var init = path.call(print, "init"), + sep = init.length > 1 ? ";\n" : "; ", + forParen = "for (", + indented = fromString(sep).join([ + init, + path.call(print, "test"), + path.call(print, "update") + ]).indentTail(forParen.length), + head = concat([forParen, indented, ")"]), + clause = adjustClause(path.call(print, "body"), options), + parts = [head]; + + if (head.length > 1) { + parts.push("\n"); + clause = clause.trimLeft(); + } + + parts.push(clause); + + return concat(parts); + + case "WhileStatement": + return concat([ + "while (", + path.call(print, "test"), + ")", + adjustClause(path.call(print, "body"), options) + ]); + + case "ForInStatement": + // Note: esprima can't actually parse "for each (". + return concat([ + n.each ? "for each (" : "for (", + path.call(print, "left"), + " in ", + path.call(print, "right"), + ")", + adjustClause(path.call(print, "body"), options) + ]); + + case "ForOfStatement": + return concat([ + "for (", + path.call(print, "left"), + " of ", + path.call(print, "right"), + ")", + adjustClause(path.call(print, "body"), options) + ]); + + case "DoWhileStatement": + var doBody = concat([ + "do", + adjustClause(path.call(print, "body"), options) + ]), parts = [doBody]; + + if (endsWithBrace(doBody)) + parts.push(" while"); + else + parts.push("\nwhile"); - self.mark(after); + parts.push(" (", path.call(print, "test"), ");"); - break; + return concat(parts); - case "ThrowStatement": - self.emit(b.throwStatement( - self.explodeExpression(path.get("argument")) - )); + case "BreakStatement": + var parts = ["break"]; + if (n.label) + parts.push(" ", path.call(print, "label")); + parts.push(";"); + return concat(parts); - break; + case "ContinueStatement": + var parts = ["continue"]; + if (n.label) + parts.push(" ", path.call(print, "label")); + parts.push(";"); + return concat(parts); - default: - throw new Error( - "unknown Statement of type " + - JSON.stringify(stmt.type)); - } -}; + case "LabeledStatement": + return concat([ + path.call(print, "label"), + ":\n", + path.call(print, "body") + ]); -Ep.emitAbruptCompletion = function(record) { - if (!isValidCompletion(record)) { - assert.ok( - false, - "invalid completion record: " + - JSON.stringify(record) - ); - } + case "TryStatement": + var parts = [ + "try ", + path.call(print, "block") + ]; - assert.notStrictEqual( - record.type, "normal", - "normal completions are not abrupt" - ); + if (n.handler) { + parts.push(" ", path.call(print, "handler")); + } else if (n.handlers) { + path.each(function(handlerPath) { + parts.push(" ", print(handlerPath)); + }, "handlers"); + } - var abruptArgs = [b.literal(record.type)]; + if (n.finalizer) { + parts.push(" finally ", path.call(print, "finalizer")); + } - if (record.type === "break" || - record.type === "continue") { - n.Literal.assert(record.target); - abruptArgs[1] = record.target; - } else if (record.type === "return" || - record.type === "throw") { - if (record.value) { - n.Expression.assert(record.value); - abruptArgs[1] = record.value; - } - } + return concat(parts); - this.emit( - b.returnStatement( - b.callExpression( - this.contextProperty("abrupt"), - abruptArgs - ) - ) - ); -}; + case "CatchClause": + var parts = ["catch (", path.call(print, "param")]; -function isValidCompletion(record) { - var type = record.type; + if (n.guard) + // Note: esprima does not recognize conditional catch clauses. + parts.push(" if ", path.call(print, "guard")); - if (type === "normal") { - return !hasOwn.call(record, "target"); - } + parts.push(") ", path.call(print, "body")); - if (type === "break" || - type === "continue") { - return !hasOwn.call(record, "value") - && n.Literal.check(record.target); - } + return concat(parts); - if (type === "return" || - type === "throw") { - return hasOwn.call(record, "value") - && !hasOwn.call(record, "target"); - } + case "ThrowStatement": + return concat(["throw ", path.call(print, "argument"), ";"]); - return false; -} + case "SwitchStatement": + return concat([ + "switch (", + path.call(print, "discriminant"), + ") {\n", + fromString("\n").join(path.map(print, "cases")), + "\n}" + ]); + // Note: ignoring n.lexical because it has no printing consequences. -// Not all offsets into emitter.listing are potential jump targets. For -// example, execution typically falls into the beginning of a try block -// without jumping directly there. This method returns the current offset -// without marking it, so that a switch case will not necessarily be -// generated for this offset (I say "not necessarily" because the same -// location might end up being marked in the process of emitting other -// statements). There's no logical harm in marking such locations as jump -// targets, but minimizing the number of switch cases keeps the generated -// code shorter. -Ep.getUnmarkedCurrentLoc = function() { - return b.literal(this.listing.length); -}; + case "SwitchCase": + var parts = []; -// The context.prev property takes the value of context.next whenever we -// evaluate the switch statement discriminant, which is generally good -// enough for tracking the last location we jumped to, but sometimes -// context.prev needs to be more precise, such as when we fall -// successfully out of a try block and into a finally block without -// jumping. This method exists to update context.prev to the freshest -// available location. If we were implementing a full interpreter, we -// would know the location of the current instruction with complete -// precision at all times, but we don't have that luxury here, as it would -// be costly and verbose to set context.prev before every statement. -Ep.updateContextPrevLoc = function(loc) { - if (loc) { - n.Literal.assert(loc); + if (n.test) + parts.push("case ", path.call(print, "test"), ":"); + else + parts.push("default:"); - if (loc.value === -1) { - // If an uninitialized location literal was passed in, set its value - // to the current this.listing.length. - loc.value = this.listing.length; - } else { - // Otherwise assert that the location matches the current offset. - assert.strictEqual(loc.value, this.listing.length); - } + if (n.consequent.length > 0) { + parts.push("\n", path.call(function(consequentPath) { + return printStatementSequence(consequentPath, options, print); + }, "consequent").indent(options.tabWidth)); + } - } else { - loc = this.getUnmarkedCurrentLoc(); - } + return concat(parts); - // Make sure context.prev is up to date in case we fell into this try - // statement without jumping to it. TODO Consider avoiding this - // assignment when we know control must have jumped here. - this.emitAssign(this.contextProperty("prev"), loc); -}; + case "DebuggerStatement": + return fromString("debugger;"); -Ep.explodeExpression = function(path, ignoreResult) { - assert.ok(path instanceof types.NodePath); + // JSX extensions below. - var expr = path.value; - if (expr) { - n.Expression.assert(expr); - } else { - return expr; - } + case "XJSAttribute": + case "JSXAttribute": + var parts = [path.call(print, "name")]; + if (n.value) + parts.push("=", path.call(print, "value")); + return concat(parts); - var self = this; - var result; // Used optionally by several cases below. + case "XJSIdentifier": + case "JSXIdentifier": + return fromString(n.name, options); - function finish(expr) { - n.Expression.assert(expr); - if (ignoreResult) { - self.emit(expr); - } else { - return expr; - } - } + case "XJSNamespacedName": + case "JSXNamespacedName": + return fromString(":").join([ + path.call(print, "namespace"), + path.call(print, "name") + ]); - // If the expression does not contain a leap, then we either emit the - // expression as a standalone statement or return it whole. - if (!meta.containsLeap(expr)) { - return finish(expr); - } + case "XJSMemberExpression": + case "JSXMemberExpression": + return fromString(".").join([ + path.call(print, "object"), + path.call(print, "property") + ]); - // If any child contains a leap (such as a yield or labeled continue or - // break statement), then any sibling subexpressions will almost - // certainly have to be exploded in order to maintain the order of their - // side effects relative to the leaping child(ren). - var hasLeapingChildren = meta.containsLeap.onlyChildren(expr); + case "XJSSpreadAttribute": + case "JSXSpreadAttribute": + return concat(["{...", path.call(print, "argument"), "}"]); - // In order to save the rest of explodeExpression from a combinatorial - // trainwreck of special cases, explodeViaTempVar is responsible for - // deciding when a subexpression needs to be "exploded," which is my - // very technical term for emitting the subexpression as an assignment - // to a temporary variable and the substituting the temporary variable - // for the original subexpression. Think of exploded view diagrams, not - // Michael Bay movies. The point of exploding subexpressions is to - // control the precise order in which the generated code realizes the - // side effects of those subexpressions. - function explodeViaTempVar(tempVar, childPath, ignoreChildResult) { - assert.ok(childPath instanceof types.NodePath); + case "XJSExpressionContainer": + case "JSXExpressionContainer": + return concat(["{", path.call(print, "expression"), "}"]); - assert.ok( - !ignoreChildResult || !tempVar, - "Ignoring the result of a child expression but forcing it to " + - "be assigned to a temporary variable?" - ); + case "XJSElement": + case "JSXElement": + var openingLines = path.call(print, "openingElement"); - var result = self.explodeExpression(childPath, ignoreChildResult); - - if (ignoreChildResult) { - // Side effects already emitted above. - - } else if (tempVar || (hasLeapingChildren && - (self.isVolatileContextProperty(result) || - meta.hasSideEffects(result)))) { - // If tempVar was provided, then the result will always be assigned - // to it, even if the result does not otherwise need to be assigned - // to a temporary variable. When no tempVar is provided, we have - // the flexibility to decide whether a temporary variable is really - // necessary. In general, temporary assignment is required only - // when some other child contains a leap and the child in question - // is a context property like $ctx.sent that might get overwritten - // or an expression with side effects that need to occur in proper - // sequence relative to the leap. - result = self.emitAssign( - tempVar || self.makeTempVar(), - result - ); - } - return result; - } + if (n.openingElement.selfClosing) { + assert.ok(!n.closingElement); + return openingLines; + } - // If ignoreResult is true, then we must take full responsibility for - // emitting the expression with all its side effects, and we should not - // return a result. + var childLines = concat( + path.map(function(childPath) { + var child = childPath.getValue(); - switch (expr.type) { - case "MemberExpression": - return finish(b.memberExpression( - self.explodeExpression(path.get("object")), - expr.computed - ? explodeViaTempVar(null, path.get("property")) - : expr.property, - expr.computed - )); + if (namedTypes.Literal.check(child) && + typeof child.value === "string") { + if (/\S/.test(child.value)) { + return child.value.replace(/^\s+|\s+$/g, ""); + } else if (/\n/.test(child.value)) { + return "\n"; + } + } - case "CallExpression": - var oldCalleePath = path.get("callee"); - var newCallee = self.explodeExpression(oldCalleePath); - - // If the callee was not previously a MemberExpression, then the - // CallExpression was "unqualified," meaning its `this` object should - // be the global object. If the exploded expression has become a - // MemberExpression, then we need to force it to be unqualified by - // using the (0, object.property)(...) trick; otherwise, it will - // receive the object of the MemberExpression as its `this` object. - if (!n.MemberExpression.check(oldCalleePath.node) && - n.MemberExpression.check(newCallee)) { - newCallee = b.sequenceExpression([ - b.literal(0), - newCallee - ]); - } - - return finish(b.callExpression( - newCallee, - path.get("arguments").map(function(argPath) { - return explodeViaTempVar(null, argPath); - }) - )); + return print(childPath); + }, "children") + ).indentTail(options.tabWidth); - case "NewExpression": - return finish(b.newExpression( - explodeViaTempVar(null, path.get("callee")), - path.get("arguments").map(function(argPath) { - return explodeViaTempVar(null, argPath); - }) - )); + var closingLines = path.call(print, "closingElement"); - case "ObjectExpression": - return finish(b.objectExpression( - path.get("properties").map(function(propPath) { - return b.property( - propPath.value.kind, - propPath.value.key, - explodeViaTempVar(null, propPath.get("value")) - ); - }) - )); + return concat([ + openingLines, + childLines, + closingLines + ]); - case "ArrayExpression": - return finish(b.arrayExpression( - path.get("elements").map(function(elemPath) { - return explodeViaTempVar(null, elemPath); - }) - )); + case "XJSOpeningElement": + case "JSXOpeningElement": + var parts = ["<", path.call(print, "name")]; + var attrParts = []; - case "SequenceExpression": - var lastIndex = expr.expressions.length - 1; + path.each(function(attrPath) { + attrParts.push(" ", print(attrPath)); + }, "attributes"); - path.get("expressions").each(function(exprPath) { - if (exprPath.name === lastIndex) { - result = self.explodeExpression(exprPath, ignoreResult); - } else { - self.explodeExpression(exprPath, true); - } - }); + var attrLines = concat(attrParts); - return result; + var needLineWrap = ( + attrLines.length > 1 || + attrLines.getLineLength(1) > options.wrapColumn + ); - case "LogicalExpression": - var after = loc(); + if (needLineWrap) { + attrParts.forEach(function(part, i) { + if (part === " ") { + assert.strictEqual(i % 2, 0); + attrParts[i] = "\n"; + } + }); - if (!ignoreResult) { - result = self.makeTempVar(); - } + attrLines = concat(attrParts).indentTail(options.tabWidth); + } - var left = explodeViaTempVar(result, path.get("left")); + parts.push(attrLines, n.selfClosing ? " />" : ">"); - if (expr.operator === "&&") { - self.jumpIfNot(left, after); - } else { - assert.strictEqual(expr.operator, "||"); - self.jumpIf(left, after); - } + return concat(parts); - explodeViaTempVar(result, path.get("right"), ignoreResult); + case "XJSClosingElement": + case "JSXClosingElement": + return concat([""]); - self.mark(after); + case "XJSText": + case "JSXText": + return fromString(n.value, options); - return result; + case "XJSEmptyExpression": + case "JSXEmptyExpression": + return fromString(""); - case "ConditionalExpression": - var elseLoc = loc(); - var after = loc(); - var test = self.explodeExpression(path.get("test")); + case "TypeAnnotatedIdentifier": + return concat([ + path.call(print, "annotation"), + " ", + path.call(print, "identifier") + ]); - self.jumpIfNot(test, elseLoc); + case "ClassBody": + if (n.body.length === 0) { + return fromString("{}"); + } - if (!ignoreResult) { - result = self.makeTempVar(); - } + return concat([ + "{\n", + path.call(function(bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body").indent(options.tabWidth), + "\n}" + ]); - explodeViaTempVar(result, path.get("consequent"), ignoreResult); - self.jump(after); + case "ClassPropertyDefinition": + var parts = ["static ", path.call(print, "definition")]; + if (!namedTypes.MethodDefinition.check(n.definition)) + parts.push(";"); + return concat(parts); - self.mark(elseLoc); - explodeViaTempVar(result, path.get("alternate"), ignoreResult); + case "ClassProperty": + return concat([ + path.call(print, "key"), + path.call(print, "typeAnnotation"), + ";" + ]); - self.mark(after); + case "ClassDeclaration": + case "ClassExpression": + var parts = ["class"]; - return result; + if (n.id) { + parts.push( + " ", + path.call(print, "id"), + path.call(print, "typeParameters") + ); + } - case "UnaryExpression": - return finish(b.unaryExpression( - expr.operator, - // Can't (and don't need to) break up the syntax of the argument. - // Think about delete a[b]. - self.explodeExpression(path.get("argument")), - !!expr.prefix - )); + if (n.superClass) { + parts.push( + " extends ", + path.call(print, "superClass"), + path.call(print, "superTypeParameters") + ); + } - case "BinaryExpression": - return finish(b.binaryExpression( - expr.operator, - explodeViaTempVar(null, path.get("left")), - explodeViaTempVar(null, path.get("right")) - )); + if (n["implements"]) { + parts.push( + " implements ", + fromString(", ").join(path.map(print, "implements")) + ); + } - case "AssignmentExpression": - return finish(b.assignmentExpression( - expr.operator, - self.explodeExpression(path.get("left")), - self.explodeExpression(path.get("right")) - )); + parts.push(" ", path.call(print, "body")); + + return concat(parts); + + // These types are unprintable because they serve as abstract + // supertypes for other (printable) types. + case "Node": + case "Printable": + case "SourceLocation": + case "Position": + case "Statement": + case "Function": + case "Pattern": + case "Expression": + case "Declaration": + case "Specifier": + case "NamedSpecifier": + case "Comment": // Supertype of Block and Line. + case "MemberTypeAnnotation": // Flow + case "TupleTypeAnnotation": // Flow + case "Type": // Flow + throw new Error("unprintable type: " + JSON.stringify(n.type)); + + case "Block": // Block comment. + return concat(["/*", fromString(n.value, options), "*/"]); + + case "Line": // Line comment. + return concat(["//", fromString(n.value, options)]); + + // Type Annotations for Facebook Flow, typically stripped out or + // transformed away before printing. + case "TypeAnnotation": + var parts = []; + + if (n.typeAnnotation) { + if (n.typeAnnotation.type !== "FunctionTypeAnnotation") { + parts.push(": "); + } + parts.push(path.call(print, "typeAnnotation")); + return concat(parts); + } + + return fromString(""); + + case "AnyTypeAnnotation": + return fromString("any", options); + + case "ArrayTypeAnnotation": + return concat([ + path.call(print, "elementType"), + "[]" + ]); + + case "BooleanTypeAnnotation": + return fromString("boolean", options); + + case "DeclareClass": + return concat([ + fromString("declare class ", options), + path.call(print, "id"), + " ", + path.call(print, "body"), + ]); + + case "DeclareFunction": + return concat([ + fromString("declare function ", options), + path.call(print, "id") + ]); + + case "DeclareModule": + return concat([ + fromString("declare module ", options), + path.call(print, "id"), + " ", + path.call(print, "body"), + ]); + + case "DeclareVariable": + return concat([ + fromString("declare var ", options), + path.call(print, "id") + ]); + + case "FunctionTypeAnnotation": + // FunctionTypeAnnotation is ambiguous: + // declare function(a: B): void; OR + // var A: (a: B) => void; + var parts = []; + var parent = path.getParentNode(0); + var isArrowFunctionTypeAnnotation = !( + namedTypes.ObjectTypeCallProperty.check(parent) || + namedTypes.DeclareFunction.check(path.getParentNode(2)) + ); - case "UpdateExpression": - return finish(b.updateExpression( - expr.operator, - self.explodeExpression(path.get("argument")), - expr.prefix - )); + var needsColon = + isArrowFunctionTypeAnnotation && + !namedTypes.FunctionTypeParam.check(parent); - case "YieldExpression": - var after = loc(); - var arg = expr.argument && self.explodeExpression(path.get("argument")); + if (needsColon) { + parts.push(": "); + } - if (arg && expr.delegate) { - var result = self.makeTempVar(); + parts.push( + "(", + fromString(", ").join(path.map(print, "params")), + ")" + ); - self.emit(b.returnStatement(b.callExpression( - self.contextProperty("delegateYield"), [ - arg, - b.literal(result.property.name), - after - ] - ))); + // The returnType is not wrapped in a TypeAnnotation, so the colon + // needs to be added separately. + if (n.returnType) { + parts.push( + isArrowFunctionTypeAnnotation ? " => " : ": ", + path.call(print, "returnType") + ); + } - self.mark(after); + return concat(parts); + + case "FunctionTypeParam": + return concat([ + path.call(print, "name"), + ": ", + path.call(print, "typeAnnotation"), + ]); + + case "GenericTypeAnnotation": + return concat([ + path.call(print, "id"), + path.call(print, "typeParameters") + ]); + + case "InterfaceDeclaration": + var parts = [ + fromString("interface ", options), + path.call(print, "id"), + path.call(print, "typeParameters"), + " " + ]; + + if (n["extends"]) { + parts.push( + "extends ", + fromString(", ").join(path.map(print, "extends")) + ); + } - return result; + parts.push(path.call(print, "body")); + + return concat(parts); + + case "ClassImplements": + case "InterfaceExtends": + return concat([ + path.call(print, "id"), + path.call(print, "typeParameters") + ]); + + case "IntersectionTypeAnnotation": + return fromString(" & ").join(path.map(print, "types")); + + case "NullableTypeAnnotation": + return concat([ + "?", + path.call(print, "typeAnnotation") + ]); + + case "NumberTypeAnnotation": + return fromString("number", options); + + case "ObjectTypeCallProperty": + return path.call(print, "value"); + + case "ObjectTypeIndexer": + return concat([ + "[", + path.call(print, "id"), + ": ", + path.call(print, "key"), + "]: ", + path.call(print, "value") + ]); + + case "ObjectTypeProperty": + return concat([ + path.call(print, "key"), + ": ", + path.call(print, "value") + ]); + + case "QualifiedTypeIdentifier": + return concat([ + path.call(print, "qualification"), + ".", + path.call(print, "id") + ]); + + case "StringLiteralTypeAnnotation": + return fromString(nodeStr(n.value, options), options); + + case "StringTypeAnnotation": + return fromString("string", options); + + case "TypeAlias": + return concat([ + "type ", + path.call(print, "id"), + " = ", + path.call(print, "right") + ]); + + case "TypeCastExpression": + return concat([ + "(", + path.call(print, "expression"), + path.call(print, "typeAnnotation"), + ")" + ]); + + case "TypeParameterDeclaration": + case "TypeParameterInstantiation": + return concat([ + "<", + fromString(", ").join(path.map(print, "params")), + ">" + ]); + + case "TypeofTypeAnnotation": + return concat([ + fromString("typeof ", options), + path.call(print, "argument") + ]); + + case "UnionTypeAnnotation": + return fromString(" | ").join(path.map(print, "types")); + + case "VoidTypeAnnotation": + return fromString("void", options); + + // Unhandled types below. If encountered, nodes of these types should + // be either left alone or desugared into AST types that are fully + // supported by the pretty-printer. + case "ClassHeritage": // TODO + case "ComprehensionBlock": // TODO + case "ComprehensionExpression": // TODO + case "Glob": // TODO + case "TaggedTemplateExpression": // TODO + case "TemplateElement": // TODO + case "TemplateLiteral": // TODO + case "GeneratorExpression": // TODO + case "LetStatement": // TODO + case "LetExpression": // TODO + case "GraphExpression": // TODO + case "GraphIndexExpression": // TODO + + // XML types that nobody cares about or needs to print. + case "XMLDefaultDeclaration": + case "XMLAnyName": + case "XMLQualifiedIdentifier": + case "XMLFunctionQualifiedIdentifier": + case "XMLAttributeSelector": + case "XMLFilterExpression": + case "XML": + case "XMLElement": + case "XMLList": + case "XMLEscape": + case "XMLText": + case "XMLStartTag": + case "XMLEndTag": + case "XMLPointTag": + case "XMLName": + case "XMLAttribute": + case "XMLCdata": + case "XMLComment": + case "XMLProcessingInstruction": + default: + debugger; + throw new Error("unknown type: " + JSON.stringify(n.type)); } - self.emitAssign(self.contextProperty("next"), after); - self.emit(b.returnStatement(arg || null)); - self.mark(after); + return p; + } - return self.contextProperty("sent"); + function printStatementSequence(path, options, print) { + var inClassBody = + namedTypes.ClassBody && + namedTypes.ClassBody.check(path.getParentNode()); - default: - throw new Error( - "unknown Expression of type " + - JSON.stringify(expr.type)); - } -}; + var filtered = []; + path.each(function(stmtPath) { + var i = stmtPath.getName(); + var stmt = stmtPath.getValue(); -},{"./leap":424,"./meta":425,"./util":426,"assert":173,"ast-types":171}],423:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ + // Just in case the AST has been modified to contain falsy + // "statements," it's safer simply to skip them. + if (!stmt) { + return; + } -var assert = require("assert"); -var types = require("ast-types"); -var n = types.namedTypes; -var b = types.builders; -var hasOwn = Object.prototype.hasOwnProperty; + // Skip printing EmptyStatement nodes to avoid leaving stray + // semicolons lying around. + if (stmt.type === "EmptyStatement") { + return; + } -// The hoist function takes a FunctionExpression or FunctionDeclaration -// and replaces any Declaration nodes in its body with assignments, then -// returns a VariableDeclaration containing just the names of the removed -// declarations. -exports.hoist = function(funPath) { - assert.ok(funPath instanceof types.NodePath); - n.Function.assert(funPath.value); + if (!inClassBody) { + namedTypes.Statement.assert(stmt); + } - var vars = {}; + // We can't hang onto stmtPath outside of this function, because + // it's just a reference to a mutable FastPath object, so we have + // to go ahead and print it here. + filtered.push({ + node: stmt, + printed: print(stmtPath) + }); + }); - function varDeclToExpr(vdec, includeIdentifiers) { - n.VariableDeclaration.assert(vdec); - var exprs = []; + var prevTrailingSpace = null; + var len = filtered.length; + var parts = []; - vdec.declarations.forEach(function(dec) { - vars[dec.id.name] = dec.id; + filtered.forEach(function(info, i) { + var printed = info.printed; + var stmt = info.node; + var needSemicolon = true; + var multiLine = printed.length > 1; + var notFirst = i > 0; + var notLast = i < len - 1; + var leadingSpace; + var trailingSpace; - if (dec.init) { - exprs.push(b.assignmentExpression( - "=", dec.id, dec.init - )); - } else if (includeIdentifiers) { - exprs.push(dec.id); + if (inClassBody) { + if (namedTypes.MethodDefinition.check(stmt) || + (namedTypes.ClassPropertyDefinition.check(stmt) && + namedTypes.MethodDefinition.check(stmt.definition))) { + needSemicolon = false; + } } - }); - if (exprs.length === 0) - return null; + if (needSemicolon) { + // Try to add a semicolon to anything that isn't a method in a + // class body. + printed = maybeAddSemicolon(printed); + } - if (exprs.length === 1) - return exprs[0]; + var trueLoc = options.reuseWhitespace && util.getTrueLoc(stmt); + var lines = trueLoc && trueLoc.lines; - return b.sequenceExpression(exprs); - } + if (notFirst) { + if (lines) { + var beforeStart = lines.skipSpaces(trueLoc.start, true); + var beforeStartLine = beforeStart ? beforeStart.line : 1; + var leadingGap = trueLoc.start.line - beforeStartLine; + leadingSpace = Array(leadingGap + 1).join("\n"); + } else { + leadingSpace = multiLine ? "\n\n" : "\n"; + } + } else { + leadingSpace = ""; + } - types.visit(funPath.get("body"), { - visitVariableDeclaration: function(path) { - var expr = varDeclToExpr(path.value, false); - if (expr === null) { - path.replace(); + if (notLast) { + if (lines) { + var afterEnd = lines.skipSpaces(trueLoc.end); + var afterEndLine = afterEnd ? afterEnd.line : lines.length; + var trailingGap = afterEndLine - trueLoc.end.line; + trailingSpace = Array(trailingGap + 1).join("\n"); + } else { + trailingSpace = multiLine ? "\n\n" : "\n"; + } } else { - // We don't need to traverse this expression any further because - // there can't be any new declarations inside an expression. - return b.expressionStatement(expr); + trailingSpace = ""; } - // Since the original node has been either removed or replaced, - // avoid traversing it any further. - return false; - }, + parts.push( + maxSpace(prevTrailingSpace, leadingSpace), + printed + ); - visitForStatement: function(path) { - var init = path.value.init; - if (n.VariableDeclaration.check(init)) { - path.get("init").replace(varDeclToExpr(init, false)); + if (notLast) { + prevTrailingSpace = trailingSpace; + } else if (trailingSpace) { + parts.push(trailingSpace); } - this.traverse(path); - }, + }); - visitForInStatement: function(path) { - var left = path.value.left; - if (n.VariableDeclaration.check(left)) { - path.get("left").replace(varDeclToExpr(left, true)); - } - this.traverse(path); - }, + return concat(parts); + } - visitFunctionDeclaration: function(path) { - var node = path.value; - vars[node.id.name] = node.id; + function maxSpace(s1, s2) { + if (!s1 && !s2) { + return fromString(""); + } - var parentNode = path.parent.node; - var assignment = b.expressionStatement( - b.assignmentExpression( - "=", - node.id, - b.functionExpression( - node.id, - node.params, - node.body, - node.generator, - node.expression - ) - ) - ); + if (!s1) { + return fromString(s2); + } - if (n.BlockStatement.check(path.parent.node)) { - // Insert the assignment form before the first statement in the - // enclosing block. - path.parent.get("body").unshift(assignment); + if (!s2) { + return fromString(s1); + } - // Remove the function declaration now that we've inserted the - // equivalent assignment form at the beginning of the block. - path.replace(); + var spaceLines1 = fromString(s1); + var spaceLines2 = fromString(s2); - } else { - // If the parent node is not a block statement, then we can just - // replace the declaration with the equivalent assignment form - // without worrying about hoisting it. - path.replace(assignment); - } + if (spaceLines2.length > spaceLines1.length) { + return spaceLines2; + } - // Don't hoist variables out of inner functions. - return false; - }, + return spaceLines1; + } - visitFunctionExpression: function(path) { - // Don't descend into nested function expressions. - return false; + function printMethod(path, options, print) { + var node = path.getNode(); + var kind = node.kind; + var parts = []; + + namedTypes.FunctionExpression.assert(node.value); + + if (node.value.async) { + parts.push("async "); } - }); - var paramNames = {}; - funPath.get("params").each(function(paramPath) { - var param = paramPath.value; - if (n.Identifier.check(param)) { - paramNames[param.name] = param; + if (!kind || kind === "init") { + if (node.value.generator) { + parts.push("*"); + } } else { - // Variables declared by destructuring parameter patterns will be - // harmlessly re-declared. + assert.ok(kind === "get" || kind === "set"); + parts.push(kind, " "); } - }); - var declarations = []; + var key = path.call(print, "key"); + if (node.computed) { + key = concat(["[", key, "]"]); + } + + parts.push( + key, + path.call(print, "value", "typeParameters"), + "(", + path.call(function(valuePath) { + return printFunctionParams(valuePath, options, print); + }, "value"), + ")", + path.call(print, "value", "returnType"), + " ", + path.call(print, "value", "body") + ); + + return concat(parts); + } + + function printArgumentsList(path, options, print) { + var printed = path.map(print, "arguments"); - Object.keys(vars).forEach(function(name) { - if (!hasOwn.call(paramNames, name)) { - declarations.push(b.variableDeclarator(vars[name], null)); + var joined = fromString(", ").join(printed); + if (joined.getLineLength(1) > options.wrapColumn) { + joined = fromString(",\n").join(printed); + return concat(["(\n", joined.indent(options.tabWidth), "\n)"]); } - }); - if (declarations.length === 0) { - return null; // Be sure to handle this case! + return concat(["(", joined, ")"]); } - return b.variableDeclaration("var", declarations); -}; + function printFunctionParams(path, options, print) { + var fun = path.getValue(); + namedTypes.Function.assert(fun); + + var printed = path.map(print, "params"); -},{"assert":173,"ast-types":171}],424:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ + if (fun.defaults) { + path.each(function(defExprPath) { + var i = defExprPath.getName(); + var p = printed[i]; + if (p && defExprPath.getValue()) { + printed[i] = concat([p, "=", print(defExprPath)]); + } + }, "defaults"); + } + + if (fun.rest) { + printed.push(concat(["...", path.call(print, "rest")])); + } -var assert = require("assert"); -var types = require("ast-types"); -var n = types.namedTypes; -var b = types.builders; -var inherits = require("util").inherits; -var hasOwn = Object.prototype.hasOwnProperty; + var joined = fromString(", ").join(printed); + if (joined.length > 1 || + joined.getLineLength(1) > options.wrapColumn) { + joined = fromString(",\n").join(printed); + return concat(["\n", joined.indent(options.tabWidth)]); + } + + return joined; + } -function Entry() { - assert.ok(this instanceof Entry); -} + function adjustClause(clause, options) { + if (clause.length > 1) + return concat([" ", clause]); -function FunctionEntry(returnLoc) { - Entry.call(this); - n.Literal.assert(returnLoc); - this.returnLoc = returnLoc; -} + return concat([ + "\n", + maybeAddSemicolon(clause).indent(options.tabWidth) + ]); + } -inherits(FunctionEntry, Entry); -exports.FunctionEntry = FunctionEntry; + function lastNonSpaceCharacter(lines) { + var pos = lines.lastPos(); + do { + var ch = lines.charAt(pos); + if (/\S/.test(ch)) + return ch; + } while (lines.prevPos(pos)); + } -function LoopEntry(breakLoc, continueLoc, label) { - Entry.call(this); + function endsWithBrace(lines) { + return lastNonSpaceCharacter(lines) === "}"; + } - n.Literal.assert(breakLoc); - n.Literal.assert(continueLoc); + function swapQuotes(str) { + return str.replace(/['"]/g, function(m) { + return m === '"' ? '\'' : '"'; + }); + } - if (label) { - n.Identifier.assert(label); - } else { - label = null; + function nodeStr(str, options) { + isString.assert(str); + switch (options.quote) { + case "auto": + var double = JSON.stringify(str); + var single = swapQuotes(JSON.stringify(swapQuotes(str))); + return double.length > single.length ? single : double; + case "single": + return swapQuotes(JSON.stringify(swapQuotes(str))); + case "double": + default: + return JSON.stringify(str); + } } - this.breakLoc = breakLoc; - this.continueLoc = continueLoc; - this.label = label; -} + function maybeAddSemicolon(lines) { + var eoc = lastNonSpaceCharacter(lines); + if (!eoc || "\n};".indexOf(eoc) < 0) + return concat([lines, ";"]); + return lines; + } -inherits(LoopEntry, Entry); -exports.LoopEntry = LoopEntry; +},{"./comments":470,"./fast-path":471,"./lines":472,"./options":474,"./patcher":476,"./types":478,"./util":479,"assert":203,"source-map":493}],478:[function(require,module,exports){ + var types = require("ast-types"); + var def = types.Type.def; -function SwitchEntry(breakLoc) { - Entry.call(this); - n.Literal.assert(breakLoc); - this.breakLoc = breakLoc; -} + def("File") + .bases("Node") + .build("program") + .field("program", def("Program")); -inherits(SwitchEntry, Entry); -exports.SwitchEntry = SwitchEntry; + types.finalize(); -function TryEntry(firstLoc, catchEntry, finallyEntry) { - Entry.call(this); + module.exports = types; - n.Literal.assert(firstLoc); +},{"ast-types":201}],479:[function(require,module,exports){ + var assert = require("assert"); + var types = require("./types"); + var getFieldValue = types.getFieldValue; + var n = types.namedTypes; + var sourceMap = require("source-map"); + var SourceMapConsumer = sourceMap.SourceMapConsumer; + var SourceMapGenerator = sourceMap.SourceMapGenerator; + var hasOwn = Object.prototype.hasOwnProperty; - if (catchEntry) { - assert.ok(catchEntry instanceof CatchEntry); - } else { - catchEntry = null; + function getUnionOfKeys() { + var result = {}; + var argc = arguments.length; + for (var i = 0; i < argc; ++i) { + var keys = Object.keys(arguments[i]); + var keyCount = keys.length; + for (var j = 0; j < keyCount; ++j) { + result[keys[j]] = true; + } + } + return result; } + exports.getUnionOfKeys = getUnionOfKeys; - if (finallyEntry) { - assert.ok(finallyEntry instanceof FinallyEntry); - } else { - finallyEntry = null; + function comparePos(pos1, pos2) { + return (pos1.line - pos2.line) || (pos1.column - pos2.column); } + exports.comparePos = comparePos; - // Have to have one or the other (or both). - assert.ok(catchEntry || finallyEntry); - - this.firstLoc = firstLoc; - this.catchEntry = catchEntry; - this.finallyEntry = finallyEntry; -} + function copyPos(pos) { + return { + line: pos.line, + column: pos.column + }; + } + exports.copyPos = copyPos; -inherits(TryEntry, Entry); -exports.TryEntry = TryEntry; + exports.composeSourceMaps = function(formerMap, latterMap) { + if (formerMap) { + if (!latterMap) { + return formerMap; + } + } else { + return latterMap || null; + } -function CatchEntry(firstLoc, paramId) { - Entry.call(this); + var smcFormer = new SourceMapConsumer(formerMap); + var smcLatter = new SourceMapConsumer(latterMap); + var smg = new SourceMapGenerator({ + file: latterMap.file, + sourceRoot: latterMap.sourceRoot + }); - n.Literal.assert(firstLoc); - n.Identifier.assert(paramId); + var sourcesToContents = {}; - this.firstLoc = firstLoc; - this.paramId = paramId; -} + smcLatter.eachMapping(function(mapping) { + var origPos = smcFormer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); -inherits(CatchEntry, Entry); -exports.CatchEntry = CatchEntry; + var sourceName = origPos.source; + if (sourceName === null) { + return; + } -function FinallyEntry(firstLoc, afterLoc) { - Entry.call(this); - n.Literal.assert(firstLoc); - n.Literal.assert(afterLoc); - this.firstLoc = firstLoc; - this.afterLoc = afterLoc; -} + smg.addMapping({ + source: sourceName, + original: copyPos(origPos), + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + }, + name: mapping.name + }); -inherits(FinallyEntry, Entry); -exports.FinallyEntry = FinallyEntry; + var sourceContent = smcFormer.sourceContentFor(sourceName); + if (sourceContent && !hasOwn.call(sourcesToContents, sourceName)) { + sourcesToContents[sourceName] = sourceContent; + smg.setSourceContent(sourceName, sourceContent); + } + }); -function LabeledEntry(breakLoc, label) { - Entry.call(this); + return smg.toJSON(); + }; - n.Literal.assert(breakLoc); - n.Identifier.assert(label); + exports.getTrueLoc = function(node) { + // It's possible that node is newly-created (not parsed by Esprima), + // in which case it probably won't have a .loc property (or an + // .original property for that matter). That's fine; we'll just + // pretty-print it as usual. + if (!node.loc) { + return null; + } - this.breakLoc = breakLoc; - this.label = label; -} + if (!node.comments) { + // If the node has no comments, regard node.loc as true. + return node.loc; + } -inherits(LabeledEntry, Entry); -exports.LabeledEntry = LabeledEntry; + var start = node.loc.start; + var end = node.loc.end; -function LeapManager(emitter) { - assert.ok(this instanceof LeapManager); + // If the node has any comments, their locations might contribute to + // the true start/end positions of the node. + node.comments.forEach(function(comment) { + if (comment.loc) { + if (comparePos(comment.loc.start, start) < 0) { + start = comment.loc.start; + } - var Emitter = require("./emit").Emitter; - assert.ok(emitter instanceof Emitter); + if (comparePos(end, comment.loc.end) < 0) { + end = comment.loc.end; + } + } + }); - this.emitter = emitter; - this.entryStack = [new FunctionEntry(emitter.finalLoc)]; -} + return { + lines: node.loc.lines, + start: start, + end: end + }; + }; -var LMp = LeapManager.prototype; -exports.LeapManager = LeapManager; + exports.fixFaultyLocations = function(node) { + if ((n.MethodDefinition && n.MethodDefinition.check(node)) || + (n.Property.check(node) && (node.method || node.shorthand))) { + // If the node is a MethodDefinition or a .method or .shorthand + // Property, then the location information stored in + // node.value.loc is very likely untrustworthy (just the {body} + // part of a method, or nothing in the case of shorthand + // properties), so we null out that information to prevent + // accidental reuse of bogus source code during reprinting. + node.value.loc = null; -LMp.withEntry = function(entry, callback) { - assert.ok(entry instanceof Entry); - this.entryStack.push(entry); - try { - callback.call(this.emitter); - } finally { - var popped = this.entryStack.pop(); - assert.strictEqual(popped, entry); - } -}; + if (n.FunctionExpression.check(node.value)) { + // FunctionExpression method values should be anonymous, + // because their .id fields are ignored anyway. + node.value.id = null; + } + } -LMp._findLeapLocation = function(property, label) { - for (var i = this.entryStack.length - 1; i >= 0; --i) { - var entry = this.entryStack[i]; - var loc = entry[property]; + var loc = node.loc; if (loc) { - if (label) { - if (entry.label && - entry.label.name === label.name) { - return loc; - } - } else if (entry instanceof LabeledEntry) { - // Ignore LabeledEntry entries unless we are actually breaking to - // a label. - } else { - return loc; + if (loc.start.line < 1) { + loc.start.line = 1; + } + + if (loc.end.line < 1) { + loc.end.line = 1; } } - } + }; - return null; -}; +},{"./types":478,"assert":203,"source-map":493}],480:[function(require,module,exports){ + (function (process){ + var types = require("./lib/types"); + var parse = require("./lib/parser").parse; + var Printer = require("./lib/printer").Printer; -LMp.getBreakLoc = function(label) { - return this._findLeapLocation("breakLoc", label); -}; + function print(node, options) { + return new Printer(options).print(node); + } -LMp.getContinueLoc = function(label) { - return this._findLeapLocation("continueLoc", label); -}; + function prettyPrint(node, options) { + return new Printer(options).printGenerically(node); + } -},{"./emit":422,"assert":173,"ast-types":171,"util":199}],425:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ + function run(transformer, options) { + return runFile(process.argv[2], transformer, options); + } -var assert = require("assert"); -var m = require("private").makeAccessor(); -var types = require("ast-types"); -var isArray = types.builtInTypes.array; -var n = types.namedTypes; -var hasOwn = Object.prototype.hasOwnProperty; + function runFile(path, transformer, options) { + require("fs").readFile(path, "utf-8", function(err, code) { + if (err) { + console.error(err); + return; + } -function makePredicate(propertyName, knownTypes) { - function onlyChildren(node) { - n.Node.assert(node); + runString(code, transformer, options); + }); + } - // Assume no side effects until we find out otherwise. - var result = false; + function defaultWriteback(output) { + process.stdout.write(output); + } - function check(child) { - if (result) { - // Do nothing. - } else if (isArray.check(child)) { - child.some(check); - } else if (n.Node.check(child)) { - assert.strictEqual(result, false); - result = predicate(child); - } - return result; + function runString(code, transformer, options) { + var writeback = options && options.writeback || defaultWriteback; + transformer(parse(code, options), function(node) { + writeback(print(node, options).code); + }); } - types.eachField(node, function(name, child) { - check(child); - }); + Object.defineProperties(exports, { + /** + * Parse a string of code into an augmented syntax tree suitable for + * arbitrary modification and reprinting. + */ + parse: { + enumerable: true, + value: parse + }, - return result; - } + /** + * Traverse and potentially modify an abstract syntax tree using a + * convenient visitor syntax: + * + * recast.visit(ast, { + * names: [], + * visitIdentifier: function(path) { + * var node = path.value; + * this.visitor.names.push(node.name); + * this.traverse(path); + * } + * }); + */ + visit: { + enumerable: true, + value: types.visit + }, - function predicate(node) { - n.Node.assert(node); + /** + * Reprint a modified syntax tree using as much of the original source + * code as possible. + */ + print: { + enumerable: true, + value: print + }, - var meta = m(node); - if (hasOwn.call(meta, propertyName)) - return meta[propertyName]; + /** + * Print without attempting to reuse any original source code. + */ + prettyPrint: { + enumerable: false, + value: prettyPrint + }, - // Certain types are "opaque," which means they have no side - // effects or leaps and we don't care about their subexpressions. - if (hasOwn.call(opaqueTypes, node.type)) - return meta[propertyName] = false; + /** + * Customized version of require("ast-types"). + */ + types: { + enumerable: false, + value: types + }, - if (hasOwn.call(knownTypes, node.type)) - return meta[propertyName] = true; + /** + * Convenient command-line interface (see e.g. example/add-braces). + */ + run: { + enumerable: false, + value: run + } + }); - return meta[propertyName] = onlyChildren(node); - } + }).call(this,require('_process')) +},{"./lib/parser":475,"./lib/printer":477,"./lib/types":478,"_process":213,"fs":202}],481:[function(require,module,exports){ + (function (process){ + var Stream = require('stream') - predicate.onlyChildren = onlyChildren; +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) - return predicate; -} + exports = module.exports = through + through.through = through -var opaqueTypes = { - FunctionExpression: true -}; +//create a readable writable stream. -// These types potentially have side effects regardless of what side -// effects their subexpressions have. -var sideEffectTypes = { - CallExpression: true, // Anything could happen! - ForInStatement: true, // Modifies the key variable. - UnaryExpression: true, // Think delete. - BinaryExpression: true, // Might invoke .toString() or .valueOf(). - AssignmentExpression: true, // Side-effecting by definition. - UpdateExpression: true, // Updates are essentially assignments. - NewExpression: true // Similar to CallExpression. -}; + function through (write, end, opts) { + write = write || function (data) { this.queue(data) } + end = end || function () { this.queue(null) } -// These types are the direct cause of all leaps in control flow. -var leapTypes = { - YieldExpression: true, - BreakStatement: true, - ContinueStatement: true, - ReturnStatement: true, - ThrowStatement: true -}; + var ended = false, destroyed = false, buffer = [], _ended = false + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false -// All leap types are also side effect types. -for (var type in leapTypes) { - if (hasOwn.call(leapTypes, type)) { - sideEffectTypes[type] = leapTypes[type]; - } -} +// stream.autoPause = !(opts && opts.autoPause === false) + stream.autoDestroy = !(opts && opts.autoDestroy === false) + + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = stream.push = function (data) { +// console.error(ended) + if(_ended) return stream + if(data === null) _ended = true + buffer.push(data) + drain() + return stream + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable && stream.autoDestroy) + process.nextTick(function () { + stream.destroy() + }) + }) -exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes); -exports.containsLeap = makePredicate("containsLeap", leapTypes); + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable && stream.autoDestroy) + stream.destroy() + } -},{"assert":173,"ast-types":171,"private":421}],426:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ + stream.end = function (data) { + if(ended) return + ended = true + if(arguments.length) stream.write(data) + _end() // will emit or queue + return stream + } -var assert = require("assert"); -var types = require("ast-types"); -var n = types.namedTypes; -var b = types.builders; -var hasOwn = Object.prototype.hasOwnProperty; + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + return stream + } -exports.defaults = function(obj) { - var len = arguments.length; - var extension; + stream.pause = function () { + if(stream.paused) return + stream.paused = true + return stream + } - for (var i = 1; i < len; ++i) { - if ((extension = arguments[i])) { - for (var key in extension) { - if (hasOwn.call(extension, key) && !hasOwn.call(obj, key)) { - obj[key] = extension[key]; + stream.resume = function () { + if(stream.paused) { + stream.paused = false + stream.emit('resume') } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + return stream } + return stream } - } - return obj; -}; -exports.runtimeProperty = function(name) { - return b.memberExpression( - b.identifier("regeneratorRuntime"), - b.identifier(name), - false - ); -}; + }).call(this,require('_process')) +},{"_process":213,"stream":225}],482:[function(require,module,exports){ + (function (process,global){ + /** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ -// Inspired by the isReference function from ast-util: -// https://github.com/eventualbuddha/ast-util/blob/9bf91c5ce8/lib/index.js#L466-L506 -exports.isReference = function(path, name) { - var node = path.value; + !(function(global) { + "use strict"; - if (!n.Identifier.check(node)) { - return false; - } + var hasOwn = Object.prototype.hasOwnProperty; + var undefined; // More compressible than void 0. + var iteratorSymbol = + typeof Symbol === "function" && Symbol.iterator || "@@iterator"; - if (name && node.name !== name) { - return false; - } + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided, then outerFn.prototype instanceof Generator. + var generator = Object.create((outerFn || Generator).prototype); - var parent = path.parent.value; + generator._invoke = makeInvokeMethod( + innerFn, self || null, + new Context(tryLocsList || []) + ); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } - switch (parent.type) { - case "VariableDeclarator": - return path.name === "init"; + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; - case "MemberExpression": - return path.name === "object" || ( - parent.computed && path.name === "property" - ); + runtime.mark = function(genFun) { + genFun.__proto__ = GeneratorFunctionPrototype; + genFun.prototype = Object.create(Gp); + return genFun; + }; - case "FunctionExpression": - case "FunctionDeclaration": - case "ArrowFunctionExpression": - if (path.name === "id") { - return false; - } + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `value instanceof AwaitArgument` to determine if the yielded value is + // meant to be awaited. Some may consider the name of this method too + // cutesy, but they are curmudgeons. + runtime.awrap = function(arg) { + return new AwaitArgument(arg); + }; - if (parent.params === path.parentPath && - parent.params[path.name] === node) { - return false; - } + function AwaitArgument(arg) { + this.arg = arg; + } + + function AsyncIterator(generator) { + // This invoke function is written in a style that assumes some + // calling function (or Promise) will handle exceptions. + function invoke(method, arg) { + var result = generator[method](arg); + var value = result.value; + return value instanceof AwaitArgument + ? Promise.resolve(value.arg).then(invokeNext, invokeThrow) + : result; + } + + if (typeof process === "object" && process.domain) { + invoke = process.domain.bind(invoke); + } + + var invokeNext = invoke.bind(generator, "next"); + var invokeThrow = invoke.bind(generator, "throw"); + var invokeReturn = invoke.bind(generator, "return"); + var previousPromise; + + function enqueue(method, arg) { + var enqueueResult = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then(function() { + return invoke(method, arg); + }) : new Promise(function(resolve) { + resolve(invoke(method, arg)); + }); + + // Avoid propagating enqueueResult failures to Promises returned by + // later invocations of the iterator, and call generator.return() to + // allow the generator a chance to clean up. + previousPromise = enqueueResult["catch"](invokeReturn); + + return enqueueResult; + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); - return true; + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; - case "ClassDeclaration": - case "ClassExpression": - return path.name !== "id"; + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; - case "CatchClause": - return path.name !== "param"; + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } - case "Property": - case "MethodDefinition": - return path.name !== "key"; + if (state === GenStateCompleted) { + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } - case "ImportSpecifier": - case "ImportDefaultSpecifier": - case "ImportNamespaceSpecifier": - case "LabeledStatement": - return false; + while (true) { + var delegate = context.delegate; + if (delegate) { + if (method === "return" || + (method === "throw" && delegate.iterator[method] === undefined)) { + // A return or throw (when the delegate iterator has no throw + // method) always terminates the yield* loop. + context.delegate = null; + + // If the delegate iterator has a return method, give it a + // chance to clean up. + var returnMethod = delegate.iterator["return"]; + if (returnMethod) { + var record = tryCatch(returnMethod, delegate.iterator, arg); + if (record.type === "throw") { + // If the return method threw an exception, let that + // exception prevail over the original return or throw. + method = "throw"; + arg = record.arg; + continue; + } + } - default: - return true; - } -}; - -},{"assert":173,"ast-types":171}],427:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -var assert = require("assert"); -var fs = require("fs"); -var types = require("ast-types"); -var n = types.namedTypes; -var b = types.builders; -var isArray = types.builtInTypes.array; -var isObject = types.builtInTypes.object; -var NodePath = types.NodePath; -var hoist = require("./hoist").hoist; -var Emitter = require("./emit").Emitter; -var runtimeProperty = require("./util").runtimeProperty; - -exports.transform = function transform(node, options) { - options = options || {}; - - var path = node instanceof NodePath ? node : new NodePath(node); - visitor.visit(path, options); - node = path.value; - - options.madeChanges = visitor.wasChangeReported(); - - return node; -}; - -var visitor = types.PathVisitor.fromMethodsObject({ - reset: function(node, options) { - this.options = options; - }, + if (method === "return") { + // Continue with the outer return, now that the delegate + // iterator has been terminated. + continue; + } + } - visitFunction: function(path) { - // Calling this.traverse(path) first makes for a post-order traversal. - this.traverse(path); + var record = tryCatch( + delegate.iterator[method], + delegate.iterator, + arg + ); - var node = path.value; - var shouldTransformAsync = node.async && !this.options.disableAsync; + if (record.type === "throw") { + context.delegate = null; - if (!node.generator && !shouldTransformAsync) { - return; - } + // Like returning generator.throw(uncaught), but without the + // overhead of an extra function call. + method = "throw"; + arg = record.arg; + continue; + } - this.reportChanged(); + // Delegate generator ran and handled its own exceptions so + // regardless of what the method was, we continue as if it is + // "next" with an undefined arg. + method = "next"; + arg = undefined; - node.generator = false; + var info = record.arg; + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + } else { + state = GenStateSuspendedYield; + return info; + } - if (node.expression) { - // Transform expression lambdas into normal functions. - node.expression = false; - node.body = b.blockStatement([ - b.returnStatement(node.body) - ]); - } + context.delegate = null; + } - if (shouldTransformAsync) { - awaitVisitor.visit(path.get("body")); - } + if (method === "next") { + if (state === GenStateSuspendedYield) { + context.sent = arg; + } else { + delete context.sent; + } - var outerFnId = node.id || ( - node.id = path.scope.parent.declareTemporary("callee$") - ); + } else if (method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw arg; + } - var outerBody = []; - var bodyBlock = path.value.body; - bodyBlock.body = bodyBlock.body.filter(function (node) { - if (node && node._blockHoist != null) { - outerBody.push(node); - return false; - } else { - return true; - } - }); + if (context.dispatchException(arg)) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + method = "next"; + arg = undefined; + } - var innerFnId = b.identifier(node.id.name + "$"); - var contextId = path.scope.declareTemporary("context$"); - var vars = hoist(path); + } else if (method === "return") { + context.abrupt("return", arg); + } - var emitter = new Emitter(contextId); - emitter.explode(path.get("body")); + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + var info = { + value: record.arg, + done: context.done + }; + + if (record.arg === ContinueSentinel) { + if (context.delegate && method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + arg = undefined; + } + } else { + return info; + } - if (vars && vars.declarations.length > 0) { - outerBody.push(vars); - } + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(arg) call above. + method = "throw"; + arg = record.arg; + } + } + }; + } - var wrapArgs = [ - emitter.getContextFunction(innerFnId), - // Async functions don't care about the outer function because they - // don't need it to be marked and don't inherit from its .prototype. - shouldTransformAsync ? b.literal(null) : outerFnId, - b.thisExpression() - ]; + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); - var tryLocsList = emitter.getTryLocsList(); - if (tryLocsList) { - wrapArgs.push(tryLocsList); - } + Gp[iteratorSymbol] = function() { + return this; + }; - var wrapCall = b.callExpression( - shouldTransformAsync ? runtimeProperty("async") : runtimeProperty("wrap"), - wrapArgs - ); + Gp.toString = function() { + return "[object Generator]"; + }; - outerBody.push(b.returnStatement(wrapCall)); - node.body = b.blockStatement(outerBody); - node.body._declarations = bodyBlock._declarations; + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; - if (shouldTransformAsync) { - node.async = false; - return; - } + if (1 in locs) { + entry.catchLoc = locs[1]; + } - if (n.FunctionDeclaration.check(node)) { - var pp = path.parent; + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } - while (pp && !(n.BlockStatement.check(pp.value) || - n.Program.check(pp.value))) { - pp = pp.parent; + this.tryEntries.push(entry); } - if (!pp) { - return; + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; } - // Here we turn the FunctionDeclaration into a named - // FunctionExpression that will be assigned to a variable of the - // same name at the top of the enclosing block. This is important - // for a very subtle reason: named function expressions can refer to - // themselves by name without fear that the binding may change due - // to code executing outside the function, whereas function - // declarations are vulnerable to the following rebinding: - // - // function f() { return f } - // var g = f; - // f = "asdf"; - // g(); // "asdf" - // - // One way to prevent the problem illustrated above is to transform - // the function declaration thus: - // - // var f = function f() { return f }; - // var g = f; - // f = "asdf"; - // g(); // f - // g()()()()(); // f - // - // In the code below, we transform generator function declarations - // in the following way: - // - // gen().next(); // { value: gen, done: true } - // function *gen() { - // return gen; - // } - // - // becomes something like - // - // var gen = runtime.mark(function *gen() { - // return gen; - // }); - // gen().next(); // { value: gen, done: true } - // - // which ensures that the generator body can always reliably refer - // to gen by name. + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(); + } - // Remove the FunctionDeclaration so that we can add it back as a - // FunctionExpression passed to runtime.mark. - path.replace(); + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); - // Change the type of the function to be an expression instead of a - // declaration. Note that all the other fields are the same. - node.type = "FunctionExpression"; + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } - var varDecl = b.variableDeclaration("var", [ - b.variableDeclarator( - node.id, - b.callExpression(runtimeProperty("mark"), [node]) - ) - ]); + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; - if (node.comments) { - // Copy any comments preceding the function declaration to the - // variable declaration, to avoid weird formatting consequences. - varDecl.leadingComments = node.leadingComments; - varDecl.trailingComments = node.trailingComments; - node.leadingComments = null; - node.trailingComments = null; - } + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } - varDecl._blockHoist = 3; + if (typeof iterable.next === "function") { + return iterable; + } - var bodyPath = pp.get("body"); - var bodyLen = bodyPath.value.length; + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } - bodyPath.push(varDecl); + next.value = undefined; + next.done = true; - } else { - n.FunctionExpression.assert(node); - return b.callExpression(runtimeProperty("mark"), [node]); - } - } -}); + return next; + }; -function shouldNotHoistAbove(stmtPath) { - var value = stmtPath.value; - n.Statement.assert(value); + return next.next = next; + } + } - // If the first statement is a "use strict" declaration, make sure to - // insert hoisted declarations afterwards. - if (n.ExpressionStatement.check(value) && - n.Literal.check(value.expression) && - value.expression.value === "use strict") { - return true; - } + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; - if (n.VariableDeclaration.check(value)) { - for (var i = 0; i < value.declarations.length; ++i) { - var decl = value.declarations[i]; - if (n.CallExpression.check(decl.init) && - types.astNodesAreEquivalent(decl.init.callee, - runtimeProperty("mark"))) { - return true; + function doneResult() { + return { value: undefined, done: true }; } - } - } - return false; -} + Context.prototype = { + constructor: Context, -var awaitVisitor = types.PathVisitor.fromMethodsObject({ - visitFunction: function(path) { - return false; // Don't descend into nested function scopes. - }, + reset: function() { + this.prev = 0; + this.next = 0; + this.sent = undefined; + this.done = false; + this.delegate = null; - visitAwaitExpression: function(path) { - // Convert await and await* expressions to yield expressions. - var argument = path.value.argument; + this.tryEntries.forEach(resetTryEntry); - // If the parser supports await* syntax using a boolean .all property - // (#171), desugar that syntax to yield Promise.all(argument). - if (path.value.all) { - argument = b.callExpression( - b.memberExpression( - b.identifier("Promise"), - b.identifier("all"), - false - ), - [argument] - ); - } + // Pre-initialize at least 20 temporary variables to enable hidden + // class optimizations for simple generators. + for (var tempIndex = 0, tempName; + hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20; + ++tempIndex) { + this[tempName] = null; + } + }, - return b.yieldExpression(argument, false); - } -}); + stop: function() { + this.done = true; -},{"./emit":422,"./hoist":423,"./util":426,"assert":173,"ast-types":171,"fs":172}],428:[function(require,module,exports){ -(function (__dirname){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -var assert = require("assert"); -var path = require("path"); -var fs = require("fs"); -var through = require("through"); -var transform = require("./lib/visit").transform; -var utils = require("./lib/util"); -var types = require("ast-types"); -var genOrAsyncFunExp = /\bfunction\s*\*|\basync\b/; -var blockBindingExp = /\b(let|const)\s+/; - -function exports(file, options) { - var data = []; - return through(write, end); - - function write(buf) { - data.push(buf); - } - - function end() { - this.queue(compile(data.join(""), options).code); - this.queue(null); - } -} + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } -// To get a writable stream for use as a browserify transform, call -// require("regenerator")(). -module.exports = exports; + return this.rval; + }, -// To include the runtime globally in the current node process, call -// require("regenerator").runtime(). -function runtime() { - require("./runtime"); -} -exports.runtime = runtime; -runtime.path = path.join(__dirname, "runtime.js"); + dispatchException: function(exception) { + if (this.done) { + throw exception; + } -// To modify an AST directly, call require("regenerator").transform(ast). -exports.transform = transform; + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + return !!caught; + } -}).call(this,"/node_modules/regenerator-babel") -},{"./lib/util":426,"./lib/visit":427,"./runtime":430,"assert":173,"ast-types":171,"fs":172,"path":182,"through":429}],429:[function(require,module,exports){ -(function (process){ -var Stream = require('stream') + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; -// through -// -// a stream that does nothing but re-emit the input. -// useful for aggregating a series of changing but not ending streams into one stream) + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } -exports = module.exports = through -through.through = through + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); -//create a readable writable stream. + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } -function through (write, end, opts) { - write = write || function (data) { this.queue(data) } - end = end || function () { this.queue(null) } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } - var ended = false, destroyed = false, buffer = [], _ended = false - var stream = new Stream() - stream.readable = stream.writable = true - stream.paused = false + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } -// stream.autoPause = !(opts && opts.autoPause === false) - stream.autoDestroy = !(opts && opts.autoDestroy === false) + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, - stream.write = function (data) { - write.call(this, data) - return !stream.paused - } + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } - function drain() { - while(buffer.length && !stream.paused) { - var data = buffer.shift() - if(null === data) - return stream.emit('end') - else - stream.emit('data', data) - } - } + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } - stream.queue = stream.push = function (data) { -// console.error(ended) - if(_ended) return stream - if(data === null) _ended = true - buffer.push(data) - drain() - return stream - } - - //this will be registered as the first 'end' listener - //must call destroy next tick, to make sure we're after any - //stream piped from here. - //this is only a problem if end is not emitted synchronously. - //a nicer way to do this is to make sure this is the last listener for 'end' - - stream.on('end', function () { - stream.readable = false - if(!stream.writable && stream.autoDestroy) - process.nextTick(function () { - stream.destroy() - }) - }) + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; - function _end () { - stream.writable = false - end.call(stream) - if(!stream.readable && stream.autoDestroy) - stream.destroy() - } + if (finallyEntry) { + this.next = finallyEntry.finallyLoc; + } else { + this.complete(record); + } - stream.end = function (data) { - if(ended) return - ended = true - if(arguments.length) stream.write(data) - _end() // will emit or queue - return stream - } + return ContinueSentinel; + }, - stream.destroy = function () { - if(destroyed) return - destroyed = true - ended = true - buffer.length = 0 - stream.writable = stream.readable = false - stream.emit('close') - return stream - } + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } - stream.pause = function () { - if(stream.paused) return - stream.paused = true - return stream - } + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = record.arg; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + }, - stream.resume = function () { - if(stream.paused) { - stream.paused = false - stream.emit('resume') - } - drain() - //may have become paused again, - //as drain emits 'data'. - if(!stream.paused) - stream.emit('drain') - return stream - } - return stream -} - - -}).call(this,require('_process')) -},{"_process":183,"stream":195}],430:[function(require,module,exports){ -(function (global){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - -!(function(global) { - "use strict"; + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, - var hasOwn = Object.prototype.hasOwnProperty; - var undefined; // More compressible than void 0. - var iteratorSymbol = - typeof Symbol === "function" && Symbol.iterator || "@@iterator"; - - var inModule = typeof module === "object"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - // If regeneratorRuntime is defined globally and we're in a module, - // make the exports object identical to regeneratorRuntime. - module.exports = runtime; - } - // Don't bother evaluating the rest of this file if the runtime was - // already defined globally. - return; - } + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } - // Define the runtime globally (as expected by generated code) as either - // module.exports (if we're in a module) or a new, empty object. - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, - function wrap(innerFn, outerFn, self, tryLocsList) { - return new Generator(innerFn, outerFn, self || null, tryLocsList || []); - } - runtime.wrap = wrap; + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } + return ContinueSentinel; + } + }; + })( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this + ); - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; + }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"_process":213}],483:[function(require,module,exports){ +// Generated by `/scripts/character-class-escape-sets.js`. Do not edit. + var regenerate = require('regenerate'); + + exports.REGULAR = { + 'd': regenerate() + .addRange(0x30, 0x39), + 'D': regenerate() + .addRange(0x0, 0x2F) + .addRange(0x3A, 0xFFFF), + 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) + .addRange(0x9, 0xD) + .addRange(0x2000, 0x200A) + .addRange(0x2028, 0x2029), + 'S': regenerate() + .addRange(0x0, 0x8) + .addRange(0xE, 0x1F) + .addRange(0x21, 0x9F) + .addRange(0xA1, 0x167F) + .addRange(0x1681, 0x180D) + .addRange(0x180F, 0x1FFF) + .addRange(0x200B, 0x2027) + .addRange(0x202A, 0x202E) + .addRange(0x2030, 0x205E) + .addRange(0x2060, 0x2FFF) + .addRange(0x3001, 0xFEFE) + .addRange(0xFF00, 0xFFFF), + 'w': regenerate(0x5F) + .addRange(0x30, 0x39) + .addRange(0x41, 0x5A) + .addRange(0x61, 0x7A), + 'W': regenerate(0x60) + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x40) + .addRange(0x5B, 0x5E) + .addRange(0x7B, 0xFFFF) + }; + + exports.UNICODE = { + 'd': regenerate() + .addRange(0x30, 0x39), + 'D': regenerate() + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x10FFFF), + 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) + .addRange(0x9, 0xD) + .addRange(0x2000, 0x200A) + .addRange(0x2028, 0x2029), + 'S': regenerate() + .addRange(0x0, 0x8) + .addRange(0xE, 0x1F) + .addRange(0x21, 0x9F) + .addRange(0xA1, 0x167F) + .addRange(0x1681, 0x180D) + .addRange(0x180F, 0x1FFF) + .addRange(0x200B, 0x2027) + .addRange(0x202A, 0x202E) + .addRange(0x2030, 0x205E) + .addRange(0x2060, 0x2FFF) + .addRange(0x3001, 0xFEFE) + .addRange(0xFF00, 0x10FFFF), + 'w': regenerate(0x5F) + .addRange(0x30, 0x39) + .addRange(0x41, 0x5A) + .addRange(0x61, 0x7A), + 'W': regenerate(0x60) + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x40) + .addRange(0x5B, 0x5E) + .addRange(0x7B, 0x10FFFF) + }; + + exports.UNICODE_IGNORE_CASE = { + 'd': regenerate() + .addRange(0x30, 0x39), + 'D': regenerate() + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x10FFFF), + 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) + .addRange(0x9, 0xD) + .addRange(0x2000, 0x200A) + .addRange(0x2028, 0x2029), + 'S': regenerate() + .addRange(0x0, 0x8) + .addRange(0xE, 0x1F) + .addRange(0x21, 0x9F) + .addRange(0xA1, 0x167F) + .addRange(0x1681, 0x180D) + .addRange(0x180F, 0x1FFF) + .addRange(0x200B, 0x2027) + .addRange(0x202A, 0x202E) + .addRange(0x2030, 0x205E) + .addRange(0x2060, 0x2FFF) + .addRange(0x3001, 0xFEFE) + .addRange(0xFF00, 0x10FFFF), + 'w': regenerate(0x5F, 0x17F, 0x212A) + .addRange(0x30, 0x39) + .addRange(0x41, 0x5A) + .addRange(0x61, 0x7A), + 'W': regenerate(0x4B, 0x53, 0x60) + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x40) + .addRange(0x5B, 0x5E) + .addRange(0x7B, 0x10FFFF) + }; + +},{"regenerate":485}],484:[function(require,module,exports){ + module.exports={ + "75": 8490, + "83": 383, + "107": 8490, + "115": 383, + "181": 924, + "197": 8491, + "383": 83, + "452": 453, + "453": 452, + "455": 456, + "456": 455, + "458": 459, + "459": 458, + "497": 498, + "498": 497, + "837": 8126, + "914": 976, + "917": 1013, + "920": 1012, + "921": 8126, + "922": 1008, + "924": 181, + "928": 982, + "929": 1009, + "931": 962, + "934": 981, + "937": 8486, + "962": 931, + "976": 914, + "977": 1012, + "981": 934, + "982": 928, + "1008": 922, + "1009": 929, + "1012": [ + 920, + 977 + ], + "1013": 917, + "7776": 7835, + "7835": 7776, + "8126": [ + 837, + 921 + ], + "8486": 937, + "8490": 75, + "8491": 197, + "66560": 66600, + "66561": 66601, + "66562": 66602, + "66563": 66603, + "66564": 66604, + "66565": 66605, + "66566": 66606, + "66567": 66607, + "66568": 66608, + "66569": 66609, + "66570": 66610, + "66571": 66611, + "66572": 66612, + "66573": 66613, + "66574": 66614, + "66575": 66615, + "66576": 66616, + "66577": 66617, + "66578": 66618, + "66579": 66619, + "66580": 66620, + "66581": 66621, + "66582": 66622, + "66583": 66623, + "66584": 66624, + "66585": 66625, + "66586": 66626, + "66587": 66627, + "66588": 66628, + "66589": 66629, + "66590": 66630, + "66591": 66631, + "66592": 66632, + "66593": 66633, + "66594": 66634, + "66595": 66635, + "66596": 66636, + "66597": 66637, + "66598": 66638, + "66599": 66639, + "66600": 66560, + "66601": 66561, + "66602": 66562, + "66603": 66563, + "66604": 66564, + "66605": 66565, + "66606": 66566, + "66607": 66567, + "66608": 66568, + "66609": 66569, + "66610": 66570, + "66611": 66571, + "66612": 66572, + "66613": 66573, + "66614": 66574, + "66615": 66575, + "66616": 66576, + "66617": 66577, + "66618": 66578, + "66619": 66579, + "66620": 66580, + "66621": 66581, + "66622": 66582, + "66623": 66583, + "66624": 66584, + "66625": 66585, + "66626": 66586, + "66627": 66587, + "66628": 66588, + "66629": 66589, + "66630": 66590, + "66631": 66591, + "66632": 66592, + "66633": 66593, + "66634": 66594, + "66635": 66595, + "66636": 66596, + "66637": 66597, + "66638": 66598, + "66639": 66599, + "71840": 71872, + "71841": 71873, + "71842": 71874, + "71843": 71875, + "71844": 71876, + "71845": 71877, + "71846": 71878, + "71847": 71879, + "71848": 71880, + "71849": 71881, + "71850": 71882, + "71851": 71883, + "71852": 71884, + "71853": 71885, + "71854": 71886, + "71855": 71887, + "71856": 71888, + "71857": 71889, + "71858": 71890, + "71859": 71891, + "71860": 71892, + "71861": 71893, + "71862": 71894, + "71863": 71895, + "71864": 71896, + "71865": 71897, + "71866": 71898, + "71867": 71899, + "71868": 71900, + "71869": 71901, + "71870": 71902, + "71871": 71903, + "71872": 71840, + "71873": 71841, + "71874": 71842, + "71875": 71843, + "71876": 71844, + "71877": 71845, + "71878": 71846, + "71879": 71847, + "71880": 71848, + "71881": 71849, + "71882": 71850, + "71883": 71851, + "71884": 71852, + "71885": 71853, + "71886": 71854, + "71887": 71855, + "71888": 71856, + "71889": 71857, + "71890": 71858, + "71891": 71859, + "71892": 71860, + "71893": 71861, + "71894": 71862, + "71895": 71863, + "71896": 71864, + "71897": 71865, + "71898": 71866, + "71899": 71867, + "71900": 71868, + "71901": 71869, + "71902": 71870, + "71903": 71871 + } + +},{}],485:[function(require,module,exports){ + (function (global){ + /*! https://mths.be/regenerate v1.2.0 by @mathias | MIT license */ + ;(function(root) { + + // Detect free variables `exports`. + var freeExports = typeof exports == 'object' && exports; + + // Detect free variable `module`. + var freeModule = typeof module == 'object' && module && + module.exports == freeExports && module; + + // Detect free variable `global`, from Node.js or Browserified code, + // and use it as `root`. + var freeGlobal = typeof global == 'object' && global; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + var ERRORS = { + 'rangeOrder': 'A range\u2019s `stop` value must be greater than or equal ' + + 'to the `start` value.', + 'codePointRange': 'Invalid code point value. Code points range from ' + + 'U+000000 to U+10FFFF.' + }; - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs + var HIGH_SURROGATE_MIN = 0xD800; + var HIGH_SURROGATE_MAX = 0xDBFF; + var LOW_SURROGATE_MIN = 0xDC00; + var LOW_SURROGATE_MAX = 0xDFFF; + + // In Regenerate output, `\0` will never be preceded by `\` because we sort + // by code point value, so let’s keep this regular expression simple. + var regexNull = /\\x00([^0123456789]|$)/g; + + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + var extend = function(destination, source) { + var key; + for (key in source) { + if (hasOwnProperty.call(source, key)) { + destination[key] = source[key]; + } + } + return destination; + }; - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} + var forEach = function(array, callback) { + var index = -1; + var length = array.length; + while (++index < length) { + callback(array[index], index); + } + }; - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunction.displayName = "GeneratorFunction"; + var toString = object.toString; + var isArray = function(value) { + return toString.call(value) == '[object Array]'; + }; + var isNumber = function(value) { + return typeof value == 'number' || + toString.call(value) == '[object Number]'; + }; - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; + // This assumes that `number` is a positive integer that `toString()`s nicely + // (which is the case for all code point values). + var zeroes = '0000'; + var pad = function(number, totalCharacters) { + var string = String(number); + return string.length < totalCharacters + ? (zeroes + string).slice(-totalCharacters) + : string; + }; - runtime.mark = function(genFun) { - genFun.__proto__ = GeneratorFunctionPrototype; - genFun.prototype = Object.create(Gp); - return genFun; - }; + var hex = function(number) { + return Number(number).toString(16).toUpperCase(); + }; - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - return new Promise(function(resolve, reject) { - var generator = wrap(innerFn, outerFn, self, tryLocsList); - var callNext = step.bind(generator.next); - var callThrow = step.bind(generator["throw"]); + var slice = [].slice; + + /*--------------------------------------------------------------------------*/ + + var dataFromCodePoints = function(codePoints) { + var index = -1; + var length = codePoints.length; + var max = length - 1; + var result = []; + var isStart = true; + var tmp; + var previous = 0; + while (++index < length) { + tmp = codePoints[index]; + if (isStart) { + result.push(tmp); + previous = tmp; + isStart = false; + } else { + if (tmp == previous + 1) { + if (index != max) { + previous = tmp; + continue; + } else { + isStart = true; + result.push(tmp + 1); + } + } else { + // End the previous range and start a new one. + result.push(previous + 1, tmp); + previous = tmp; + } + } + } + if (!isStart) { + result.push(tmp + 1); + } + return result; + }; - function step(arg) { - var record = tryCatch(this, null, arg); - if (record.type === "throw") { - reject(record.arg); - return; + var dataRemove = function(data, codePoint) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1]; + if (codePoint >= start && codePoint < end) { + // Modify this pair. + if (codePoint == start) { + if (end == start + 1) { + // Just remove `start` and `end`. + data.splice(index, 2); + return data; + } else { + // Just replace `start` with a new value. + data[index] = codePoint + 1; + return data; + } + } else if (codePoint == end - 1) { + // Just replace `end` with a new value. + data[index + 1] = codePoint; + return data; + } else { + // Replace `[start, end]` with `[startA, endA, startB, endB]`. + data.splice(index, 2, start, codePoint, codePoint + 1, end); + return data; + } + } + index += 2; } + return data; + }; - var info = record.arg; - if (info.done) { - resolve(info.value); - } else { - Promise.resolve(info.value).then(callNext, callThrow); + var dataRemoveRange = function(data, rangeStart, rangeEnd) { + if (rangeEnd < rangeStart) { + throw Error(ERRORS.rangeOrder); + } + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + while (index < data.length) { + start = data[index]; + end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. + + // Exit as soon as no more matching pairs can be found. + if (start > rangeEnd) { + return data; + } + + // Check if this range pair is equal to, or forms a subset of, the range + // to be removed. + // E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`. + // E.g. we have `[40, 51]` and want to remove 0-100 → `[]`. + if (rangeStart <= start && rangeEnd >= end) { + // Remove this pair. + data.splice(index, 2); + continue; + } + + // Check if both `rangeStart` and `rangeEnd` are within the bounds of + // this pair. + // E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`. + if (rangeStart >= start && rangeEnd < end) { + if (rangeStart == start) { + // Replace `[start, end]` with `[startB, endB]`. + data[index] = rangeEnd + 1; + data[index + 1] = end + 1; + return data; + } + // Replace `[start, end]` with `[startA, endA, startB, endB]`. + data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1); + return data; + } + + // Check if only `rangeStart` is within the bounds of this pair. + // E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`. + if (rangeStart >= start && rangeStart <= end) { + // Replace `end` with `rangeStart`. + data[index + 1] = rangeStart; + // Note: we cannot `return` just yet, in case any following pairs still + // contain matching code points. + // E.g. we have `[0, 11, 14, 31]` and want to remove 4-20 + // → `[0, 4, 21, 31]`. + } + + // Check if only `rangeEnd` is within the bounds of this pair. + // E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`. + else if (rangeEnd >= start && rangeEnd <= end) { + // Just replace `start`. + data[index] = rangeEnd + 1; + return data; + } + + index += 2; } - } + return data; + }; - callNext(); - }); - }; + var dataAdd = function(data, codePoint) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var lastIndex = null; + var length = data.length; + if (codePoint < 0x0 || codePoint > 0x10FFFF) { + throw RangeError(ERRORS.codePointRange); + } + while (index < length) { + start = data[index]; + end = data[index + 1]; + + // Check if the code point is already in the set. + if (codePoint >= start && codePoint < end) { + return data; + } - function Generator(innerFn, outerFn, self, tryLocsList) { - var generator = outerFn ? Object.create(outerFn.prototype) : this; - var context = new Context(tryLocsList); - var state = GenStateSuspendedStart; + if (codePoint == start - 1) { + // Just replace `start` with a new value. + data[index] = codePoint; + return data; + } - function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } + // At this point, if `start` is `greater` than `codePoint`, insert a new + // `[start, end]` pair before the current pair, or after the current pair + // if there is a known `lastIndex`. + if (start > codePoint) { + data.splice( + lastIndex != null ? lastIndex + 2 : 0, + 0, + codePoint, + codePoint + 1 + ); + return data; + } - if (state === GenStateCompleted) { - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); - } + if (codePoint == end) { + // Check if adding this code point causes two separate ranges to become + // a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`. + if (codePoint + 1 == data[index + 2]) { + data.splice(index, 4, start, data[index + 3]); + return data; + } + // Else, just replace `end` with a new value. + data[index + 1] = codePoint + 1; + return data; + } + lastIndex = index; + index += 2; + } + // The loop has finished; add the new pair to the end of the data set. + data.push(codePoint, codePoint + 1); + return data; + }; - while (true) { - var delegate = context.delegate; - if (delegate) { - var record = tryCatch( - delegate.iterator[method], - delegate.iterator, - arg - ); + var dataAddData = function(dataA, dataB) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var data = dataA.slice(); + var length = dataB.length; + while (index < length) { + start = dataB[index]; + end = dataB[index + 1] - 1; + if (start == end) { + data = dataAdd(data, start); + } else { + data = dataAddRange(data, start, end); + } + index += 2; + } + return data; + }; - if (record.type === "throw") { - context.delegate = null; + var dataRemoveData = function(dataA, dataB) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var data = dataA.slice(); + var length = dataB.length; + while (index < length) { + start = dataB[index]; + end = dataB[index + 1] - 1; + if (start == end) { + data = dataRemove(data, start); + } else { + data = dataRemoveRange(data, start, end); + } + index += 2; + } + return data; + }; + + var dataAddRange = function(data, rangeStart, rangeEnd) { + if (rangeEnd < rangeStart) { + throw Error(ERRORS.rangeOrder); + } + if ( + rangeStart < 0x0 || rangeStart > 0x10FFFF || + rangeEnd < 0x0 || rangeEnd > 0x10FFFF + ) { + throw RangeError(ERRORS.codePointRange); + } + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var added = false; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1]; + + if (added) { + // The range has already been added to the set; at this point, we just + // need to get rid of the following ranges in case they overlap. + + // Check if this range can be combined with the previous range. + if (start == rangeEnd + 1) { + data.splice(index - 1, 2); + return data; + } - // Like returning generator.throw(uncaught), but without the - // overhead of an extra function call. - method = "throw"; - arg = record.arg; + // Exit as soon as no more possibly overlapping pairs can be found. + if (start > rangeEnd) { + return data; + } - continue; - } + // E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have + // `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the + // `0,16` range that was previously added. + if (start >= rangeStart && start <= rangeEnd) { + // `start` lies within the range that was previously added. + + if (end > rangeStart && end - 1 <= rangeEnd) { + // `end` lies within the range that was previously added as well, + // so remove this pair. + data.splice(index, 2); + index -= 2; + // Note: we cannot `return` just yet, as there may still be other + // overlapping pairs. + } else { + // `start` lies within the range that was previously added, but + // `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so + // now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`. + // Remove the previously added `end` and the current `start`. + data.splice(index - 1, 2); + index -= 2; + } - // Delegate generator ran and handled its own exceptions so - // regardless of what the method was, we continue as if it is - // "next" with an undefined arg. - method = "next"; - arg = undefined; + // Note: we cannot return yet. + } - var info = record.arg; - if (info.done) { - context[delegate.resultName] = info.value; - context.next = delegate.nextLoc; - } else { - state = GenStateSuspendedYield; - return info; } - context.delegate = null; - } + else if (start == rangeEnd + 1) { + data[index] = rangeStart; + return data; + } - if (method === "next") { - if (state === GenStateSuspendedStart && - typeof arg !== "undefined") { - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - throw new TypeError( - "attempt to send " + JSON.stringify(arg) + " to newborn generator" - ); + // Check if a new pair must be inserted *before* the current one. + else if (start > rangeEnd) { + data.splice(index, 0, rangeStart, rangeEnd + 1); + return data; } - if (state === GenStateSuspendedYield) { - context.sent = arg; - } else { - delete context.sent; + else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) { + // The new range lies entirely within an existing range pair. No action + // needed. + return data; } - } else if (method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw arg; + else if ( + // E.g. `[0, 11]` and you add 5-15 → `[0, 16]`. + (rangeStart >= start && rangeStart < end) || + // E.g. `[0, 3]` and you add 3-6 → `[0, 7]`. + end == rangeStart + ) { + // Replace `end` with the new value. + data[index + 1] = rangeEnd + 1; + // Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]` + // and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part. + added = true; + // Note: we cannot `return` just yet. } - if (context.dispatchException(arg)) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - method = "next"; - arg = undefined; + else if (rangeStart <= start && rangeEnd + 1 >= end) { + // The new range is a superset of the old range. + data[index] = rangeStart; + data[index + 1] = rangeEnd + 1; + added = true; } - } else if (method === "return") { - context.abrupt("return", arg); + index += 2; } + // The loop has finished without doing anything; add the new pair to the end + // of the data set. + if (!added) { + data.push(rangeStart, rangeEnd + 1); + } + return data; + }; - state = GenStateExecuting; - - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; - - var info = { - value: record.arg, - done: context.done - }; - - if (record.arg === ContinueSentinel) { - if (context.delegate && method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - arg = undefined; - } - } else { - return info; + var dataContains = function(data, codePoint) { + var index = 0; + var length = data.length; + // Exit early if `codePoint` is not within `data`’s overall range. + var start = data[index]; + var end = data[length - 1]; + if (length >= 2) { + if (codePoint < start || codePoint > end) { + return false; } - - } else if (record.type === "throw") { - state = GenStateCompleted; - - if (method === "next") { - context.dispatchException(record.arg); - } else { - arg = record.arg; + } + // Iterate over the data per `(start, end)` pair. + while (index < length) { + start = data[index]; + end = data[index + 1]; + if (codePoint >= start && codePoint < end) { + return true; } + index += 2; } - } - } - - generator.next = invoke.bind(generator, "next"); - generator["throw"] = invoke.bind(generator, "throw"); - generator["return"] = invoke.bind(generator, "return"); + return false; + }; - return generator; - } + var dataIntersection = function(data, codePoints) { + var index = 0; + var length = codePoints.length; + var codePoint; + var result = []; + while (index < length) { + codePoint = codePoints[index]; + if (dataContains(data, codePoint)) { + result.push(codePoint); + } + ++index; + } + return dataFromCodePoints(result); + }; - Gp[iteratorSymbol] = function() { - return this; - }; + var dataIsEmpty = function(data) { + return !data.length; + }; - Gp.toString = function() { - return "[object Generator]"; - }; + var dataIsSingleton = function(data) { + // Check if the set only represents a single code point. + return data.length == 2 && data[0] + 1 == data[1]; + }; - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; + var dataToArray = function(data) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var result = []; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1]; + while (start < end) { + result.push(start); + ++start; + } + index += 2; + } + return result; + }; - if (1 in locs) { - entry.catchLoc = locs[1]; - } + /*--------------------------------------------------------------------------*/ - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + var floor = Math.floor; + var highSurrogate = function(codePoint) { + return parseInt( + floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, + 10 + ); + }; - this.tryEntries.push(entry); - } + var lowSurrogate = function(codePoint) { + return parseInt( + (codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, + 10 + ); + }; - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } + var stringFromCharCode = String.fromCharCode; + var codePointToString = function(codePoint) { + var string; + // https://mathiasbynens.be/notes/javascript-escapes#single + // Note: the `\b` escape sequence for U+0008 BACKSPACE in strings has a + // different meaning in regular expressions (word boundary), so it cannot + // be used here. + if (codePoint == 0x09) { + string = '\\t'; + } + // Note: IE < 9 treats `'\v'` as `'v'`, so avoid using it. + // else if (codePoint == 0x0B) { + // string = '\\v'; + // } + else if (codePoint == 0x0A) { + string = '\\n'; + } + else if (codePoint == 0x0C) { + string = '\\f'; + } + else if (codePoint == 0x0D) { + string = '\\r'; + } + else if (codePoint == 0x5C) { + string = '\\\\'; + } + else if ( + codePoint == 0x24 || + (codePoint >= 0x28 && codePoint <= 0x2B) || + codePoint == 0x2D || codePoint == 0x2E || codePoint == 0x3F || + (codePoint >= 0x5B && codePoint <= 0x5E) || + (codePoint >= 0x7B && codePoint <= 0x7D) + ) { + // The code point maps to an unsafe printable ASCII character; + // backslash-escape it. Here’s the list of those symbols: + // + // $()*+-.?[\]^{|} + // + // See #7 for more info. + string = '\\' + stringFromCharCode(codePoint); + } + else if (codePoint >= 0x20 && codePoint <= 0x7E) { + // The code point maps to one of these printable ASCII symbols + // (including the space character): + // + // !"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO + // PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~ + // + // These can safely be used directly. + string = stringFromCharCode(codePoint); + } + else if (codePoint <= 0xFF) { + // https://mathiasbynens.be/notes/javascript-escapes#hexadecimal + string = '\\x' + pad(hex(codePoint), 2); + } + else { // `codePoint <= 0xFFFF` holds true. + // https://mathiasbynens.be/notes/javascript-escapes#unicode + string = '\\u' + pad(hex(codePoint), 4); + } + + // There’s no need to account for astral symbols / surrogate pairs here, + // since `codePointToString` is private and only used for BMP code points. + // But if that’s what you need, just add an `else` block with this code: + // + // string = '\\u' + pad(hex(highSurrogate(codePoint)), 4) + // + '\\u' + pad(hex(lowSurrogate(codePoint)), 4); + + return string; + }; - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(); - } + var symbolToCodePoint = function(symbol) { + var length = symbol.length; + var first = symbol.charCodeAt(0); + var second; + if ( + first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && + length > 1 // There is a next code unit. + ) { + // `first` is a high surrogate, and there is a next character. Assume + // it’s a low surrogate (else it’s invalid usage of Regenerate anyway). + second = symbol.charCodeAt(1); + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - HIGH_SURROGATE_MIN) * 0x400 + + second - LOW_SURROGATE_MIN + 0x10000; + } + return first; + }; - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; + var createBMPCharacterClasses = function(data) { + // Iterate over the data per `(start, end)` pair. + var result = ''; + var index = 0; + var start; + var end; + var length = data.length; + if (dataIsSingleton(data)) { + return codePointToString(data[0]); + } + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. + if (start == end) { + result += codePointToString(start); + } else if (start + 1 == end) { + result += codePointToString(start) + codePointToString(end); + } else { + result += codePointToString(start) + '-' + codePointToString(end); + } + index += 2; } - } - - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; - - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - - if (typeof iterable.next === "function") { - return iterable; - } + return '[' + result + ']'; + }; - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; + var splitAtBMP = function(data) { + // Iterate over the data per `(start, end)` pair. + var loneHighSurrogates = []; + var loneLowSurrogates = []; + var bmp = []; + var astral = []; + var index = 0; + var start; + var end; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. + + if (start < HIGH_SURROGATE_MIN) { + + // The range starts and ends before the high surrogate range. + // E.g. (0, 0x10). + if (end < HIGH_SURROGATE_MIN) { + bmp.push(start, end + 1); } - } - next.value = undefined; - next.done = true; + // The range starts before the high surrogate range and ends within it. + // E.g. (0, 0xD855). + if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1); + } - return next; - }; + // The range starts before the high surrogate range and ends in the low + // surrogate range. E.g. (0, 0xDCFF). + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); + } - return next.next = next; - } - } + // The range starts before the high surrogate range and ends after the + // low surrogate range. E.g. (0, 0x10FFFF). + if (end > LOW_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } - // Return an iterator with no values. - return { next: doneResult }; - } - runtime.values = values; + } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) { - function doneResult() { - return { value: undefined, done: true }; - } + // The range starts and ends in the high surrogate range. + // E.g. (0xD855, 0xD866). + if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { + loneHighSurrogates.push(start, end + 1); + } - Context.prototype = { - constructor: Context, + // The range starts in the high surrogate range and ends in the low + // surrogate range. E.g. (0xD855, 0xDCFF). + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); + } - reset: function() { - this.prev = 0; - this.next = 0; - this.sent = undefined; - this.done = false; - this.delegate = null; + // The range starts in the high surrogate range and ends after the low + // surrogate range. E.g. (0xD855, 0x10FFFF). + if (end > LOW_SURROGATE_MAX) { + loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } - this.tryEntries.forEach(resetTryEntry); + } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) { - // Pre-initialize at least 20 temporary variables to enable hidden - // class optimizations for simple generators. - for (var tempIndex = 0, tempName; - hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20; - ++tempIndex) { - this[tempName] = null; - } - }, + // The range starts and ends in the low surrogate range. + // E.g. (0xDCFF, 0xDDFF). + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + loneLowSurrogates.push(start, end + 1); + } - stop: function() { - this.done = true; + // The range starts in the low surrogate range and ends after the low + // surrogate range. E.g. (0xDCFF, 0x10FFFF). + if (end > LOW_SURROGATE_MAX) { + loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1); + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } + } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) { - return this.rval; - }, + // The range starts and ends after the low surrogate range. + // E.g. (0xFFAA, 0x10FFFF). + if (end <= 0xFFFF) { + bmp.push(start, end + 1); + } else { + bmp.push(start, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } - dispatchException: function(exception) { - if (this.done) { - throw exception; - } + } else { - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - return !!caught; - } + // The range starts and ends in the astral range. + astral.push(start, end + 1); - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; + } - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); + index += 2; } + return { + 'loneHighSurrogates': loneHighSurrogates, + 'loneLowSurrogates': loneLowSurrogates, + 'bmp': bmp, + 'astral': astral + }; + }; - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); + var optimizeSurrogateMappings = function(surrogateMappings) { + var result = []; + var tmpLow = []; + var addLow = false; + var mapping; + var nextMapping; + var highSurrogates; + var lowSurrogates; + var nextHighSurrogates; + var nextLowSurrogates; + var index = -1; + var length = surrogateMappings.length; + while (++index < length) { + mapping = surrogateMappings[index]; + nextMapping = surrogateMappings[index + 1]; + if (!nextMapping) { + result.push(mapping); + continue; + } + highSurrogates = mapping[0]; + lowSurrogates = mapping[1]; + nextHighSurrogates = nextMapping[0]; + nextLowSurrogates = nextMapping[1]; + + // Check for identical high surrogate ranges. + tmpLow = lowSurrogates; + while ( + nextHighSurrogates && + highSurrogates[0] == nextHighSurrogates[0] && + highSurrogates[1] == nextHighSurrogates[1] + ) { + // Merge with the next item. + if (dataIsSingleton(nextLowSurrogates)) { + tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]); + } else { + tmpLow = dataAddRange( + tmpLow, + nextLowSurrogates[0], + nextLowSurrogates[1] - 1 + ); } - - } else { - throw new Error("try statement without catch or finally"); + ++index; + mapping = surrogateMappings[index]; + highSurrogates = mapping[0]; + lowSurrogates = mapping[1]; + nextMapping = surrogateMappings[index + 1]; + nextHighSurrogates = nextMapping && nextMapping[0]; + nextLowSurrogates = nextMapping && nextMapping[1]; + addLow = true; } + result.push([ + highSurrogates, + addLow ? tmpLow : lowSurrogates + ]); + addLow = false; } - } - }, + return optimizeByLowSurrogates(result); + }; - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; + var optimizeByLowSurrogates = function(surrogateMappings) { + if (surrogateMappings.length == 1) { + return surrogateMappings; + } + var index = -1; + var innerIndex = -1; + while (++index < surrogateMappings.length) { + var mapping = surrogateMappings[index]; + var lowSurrogates = mapping[1]; + var lowSurrogateStart = lowSurrogates[0]; + var lowSurrogateEnd = lowSurrogates[1]; + innerIndex = index; // Note: the loop starts at the next index. + while (++innerIndex < surrogateMappings.length) { + var otherMapping = surrogateMappings[innerIndex]; + var otherLowSurrogates = otherMapping[1]; + var otherLowSurrogateStart = otherLowSurrogates[0]; + var otherLowSurrogateEnd = otherLowSurrogates[1]; + if ( + lowSurrogateStart == otherLowSurrogateStart && + lowSurrogateEnd == otherLowSurrogateEnd + ) { + // Add the code points in the other item to this one. + if (dataIsSingleton(otherMapping[0])) { + mapping[0] = dataAdd(mapping[0], otherMapping[0][0]); + } else { + mapping[0] = dataAddRange( + mapping[0], + otherMapping[0][0], + otherMapping[0][1] - 1 + ); + } + // Remove the other, now redundant, item. + surrogateMappings.splice(innerIndex, 1); + --innerIndex; + } + } } - } + return surrogateMappings; + }; - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg < finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } + var surrogateSet = function(data) { + // Exit early if `data` is an empty set. + if (!data.length) { + return []; + } + + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var startHigh; + var startLow; + var prevStartHigh = 0; + var prevEndHigh = 0; + var tmpLow = []; + var endHigh; + var endLow; + var surrogateMappings = []; + var length = data.length; + var dataHigh = []; + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; + + startHigh = highSurrogate(start); + startLow = lowSurrogate(start); + endHigh = highSurrogate(end); + endLow = lowSurrogate(end); + + var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN; + var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX; + var complete = false; + + // Append the previous high-surrogate-to-low-surrogate mappings. + // Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`. + if ( + startHigh == endHigh || + startsWithLowestLowSurrogate && endsWithHighestLowSurrogate + ) { + surrogateMappings.push([ + [startHigh, endHigh + 1], + [startLow, endLow + 1] + ]); + complete = true; + } else { + surrogateMappings.push([ + [startHigh, startHigh + 1], + [startLow, LOW_SURROGATE_MAX + 1] + ]); + } - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; + // Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to + // `(endHigh - 1, LOW_SURROGATE_MAX)`. + if (!complete && startHigh + 1 < endHigh) { + if (endsWithHighestLowSurrogate) { + // Combine step 2 and step 3. + surrogateMappings.push([ + [startHigh + 1, endHigh + 1], + [LOW_SURROGATE_MIN, endLow + 1] + ]); + complete = true; + } else { + surrogateMappings.push([ + [startHigh + 1, endHigh], + [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1] + ]); + } + } - if (finallyEntry) { - this.next = finallyEntry.finallyLoc; - } else { - this.complete(record); - } + // Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`. + if (!complete) { + surrogateMappings.push([ + [endHigh, endHigh + 1], + [LOW_SURROGATE_MIN, endLow + 1] + ]); + } - return ContinueSentinel; - }, + prevStartHigh = startHigh; + prevEndHigh = endHigh; - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } + index += 2; + } - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = record.arg; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } + // The format of `surrogateMappings` is as follows: + // + // [ surrogateMapping1, surrogateMapping2 ] + // + // i.e.: + // + // [ + // [ highSurrogates1, lowSurrogates1 ], + // [ highSurrogates2, lowSurrogates2 ] + // ] + return optimizeSurrogateMappings(surrogateMappings); + }; - return ContinueSentinel; - }, + var createSurrogateCharacterClasses = function(surrogateMappings) { + var result = []; + forEach(surrogateMappings, function(surrogateMapping) { + var highSurrogates = surrogateMapping[0]; + var lowSurrogates = surrogateMapping[1]; + result.push( + createBMPCharacterClasses(highSurrogates) + + createBMPCharacterClasses(lowSurrogates) + ); + }); + return result.join('|'); + }; - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - return this.complete(entry.completion, entry.afterLoc); + var createCharacterClassesFromData = function(data, bmpOnly) { + var result = []; + + var parts = splitAtBMP(data); + var loneHighSurrogates = parts.loneHighSurrogates; + var loneLowSurrogates = parts.loneLowSurrogates; + var bmp = parts.bmp; + var astral = parts.astral; + var hasAstral = !dataIsEmpty(parts.astral); + var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates); + var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates); + + var surrogateMappings = surrogateSet(astral); + + if (bmpOnly) { + bmp = dataAddData(bmp, loneHighSurrogates); + hasLoneHighSurrogates = false; + bmp = dataAddData(bmp, loneLowSurrogates); + hasLoneLowSurrogates = false; + } + + if (!dataIsEmpty(bmp)) { + // The data set contains BMP code points that are not high surrogates + // needed for astral code points in the set. + result.push(createBMPCharacterClasses(bmp)); + } + if (surrogateMappings.length) { + // The data set contains astral code points; append character classes + // based on their surrogate pairs. + result.push(createSurrogateCharacterClasses(surrogateMappings)); + } + // https://gist.github.com/mathiasbynens/bbe7f870208abcfec860 + if (hasLoneHighSurrogates) { + result.push( + createBMPCharacterClasses(loneHighSurrogates) + + // Make sure the high surrogates aren’t part of a surrogate pair. + '(?![\\uDC00-\\uDFFF])' + ); } - } - }, - - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; + if (hasLoneLowSurrogates) { + result.push( + // Make sure the low surrogates aren’t part of a surrogate pair. + '(?:[^\\uD800-\\uDBFF]|^)' + + createBMPCharacterClasses(loneLowSurrogates) + ); } - } - - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, - - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc + return result.join('|'); }; - return ContinueSentinel; - } - }; -})( - // Among the various tricks for obtaining a reference to the global - // object, this seems to be the most reliable technique that does not - // use indirect eval (which violates Content Security Policy). - typeof global === "object" ? global : - typeof window === "object" ? window : this -); - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],431:[function(require,module,exports){ -// Generated by `/scripts/character-class-escape-sets.js`. Do not edit. -var regenerate = require('regenerate'); - -exports.REGULAR = { - 'd': regenerate() - .addRange(0x30, 0x39), - 'D': regenerate() - .addRange(0x0, 0x2F) - .addRange(0x3A, 0xFFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) - .addRange(0x9, 0xD) - .addRange(0x2000, 0x200A) - .addRange(0x2028, 0x2029), - 'S': regenerate() - .addRange(0x0, 0x8) - .addRange(0xE, 0x1F) - .addRange(0x21, 0x9F) - .addRange(0xA1, 0x167F) - .addRange(0x1681, 0x180D) - .addRange(0x180F, 0x1FFF) - .addRange(0x200B, 0x2027) - .addRange(0x202A, 0x202E) - .addRange(0x2030, 0x205E) - .addRange(0x2060, 0x2FFF) - .addRange(0x3001, 0xFEFE) - .addRange(0xFF00, 0xFFFF), - 'w': regenerate(0x5F) - .addRange(0x30, 0x39) - .addRange(0x41, 0x5A) - .addRange(0x61, 0x7A), - 'W': regenerate(0x60) - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x40) - .addRange(0x5B, 0x5E) - .addRange(0x7B, 0xFFFF) -}; - -exports.UNICODE = { - 'd': regenerate() - .addRange(0x30, 0x39), - 'D': regenerate() - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x10FFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) - .addRange(0x9, 0xD) - .addRange(0x2000, 0x200A) - .addRange(0x2028, 0x2029), - 'S': regenerate() - .addRange(0x0, 0x8) - .addRange(0xE, 0x1F) - .addRange(0x21, 0x9F) - .addRange(0xA1, 0x167F) - .addRange(0x1681, 0x180D) - .addRange(0x180F, 0x1FFF) - .addRange(0x200B, 0x2027) - .addRange(0x202A, 0x202E) - .addRange(0x2030, 0x205E) - .addRange(0x2060, 0x2FFF) - .addRange(0x3001, 0xFEFE) - .addRange(0xFF00, 0x10FFFF), - 'w': regenerate(0x5F) - .addRange(0x30, 0x39) - .addRange(0x41, 0x5A) - .addRange(0x61, 0x7A), - 'W': regenerate(0x60) - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x40) - .addRange(0x5B, 0x5E) - .addRange(0x7B, 0x10FFFF) -}; - -exports.UNICODE_IGNORE_CASE = { - 'd': regenerate() - .addRange(0x30, 0x39), - 'D': regenerate() - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x10FFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) - .addRange(0x9, 0xD) - .addRange(0x2000, 0x200A) - .addRange(0x2028, 0x2029), - 'S': regenerate() - .addRange(0x0, 0x8) - .addRange(0xE, 0x1F) - .addRange(0x21, 0x9F) - .addRange(0xA1, 0x167F) - .addRange(0x1681, 0x180D) - .addRange(0x180F, 0x1FFF) - .addRange(0x200B, 0x2027) - .addRange(0x202A, 0x202E) - .addRange(0x2030, 0x205E) - .addRange(0x2060, 0x2FFF) - .addRange(0x3001, 0xFEFE) - .addRange(0xFF00, 0x10FFFF), - 'w': regenerate(0x5F, 0x17F, 0x212A) - .addRange(0x30, 0x39) - .addRange(0x41, 0x5A) - .addRange(0x61, 0x7A), - 'W': regenerate(0x4B, 0x53, 0x60) - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x40) - .addRange(0x5B, 0x5E) - .addRange(0x7B, 0x10FFFF) -}; - -},{"regenerate":433}],432:[function(require,module,exports){ -module.exports={ - "75": 8490, - "83": 383, - "107": 8490, - "115": 383, - "181": 924, - "197": 8491, - "383": 83, - "452": 453, - "453": 452, - "455": 456, - "456": 455, - "458": 459, - "459": 458, - "497": 498, - "498": 497, - "837": 8126, - "914": 976, - "917": 1013, - "920": 1012, - "921": 8126, - "922": 1008, - "924": 181, - "928": 982, - "929": 1009, - "931": 962, - "934": 981, - "937": 8486, - "962": 931, - "976": 914, - "977": 1012, - "981": 934, - "982": 928, - "1008": 922, - "1009": 929, - "1012": [ - 920, - 977 - ], - "1013": 917, - "7776": 7835, - "7835": 7776, - "8126": [ - 837, - 921 - ], - "8486": 937, - "8490": 75, - "8491": 197, - "66560": 66600, - "66561": 66601, - "66562": 66602, - "66563": 66603, - "66564": 66604, - "66565": 66605, - "66566": 66606, - "66567": 66607, - "66568": 66608, - "66569": 66609, - "66570": 66610, - "66571": 66611, - "66572": 66612, - "66573": 66613, - "66574": 66614, - "66575": 66615, - "66576": 66616, - "66577": 66617, - "66578": 66618, - "66579": 66619, - "66580": 66620, - "66581": 66621, - "66582": 66622, - "66583": 66623, - "66584": 66624, - "66585": 66625, - "66586": 66626, - "66587": 66627, - "66588": 66628, - "66589": 66629, - "66590": 66630, - "66591": 66631, - "66592": 66632, - "66593": 66633, - "66594": 66634, - "66595": 66635, - "66596": 66636, - "66597": 66637, - "66598": 66638, - "66599": 66639, - "66600": 66560, - "66601": 66561, - "66602": 66562, - "66603": 66563, - "66604": 66564, - "66605": 66565, - "66606": 66566, - "66607": 66567, - "66608": 66568, - "66609": 66569, - "66610": 66570, - "66611": 66571, - "66612": 66572, - "66613": 66573, - "66614": 66574, - "66615": 66575, - "66616": 66576, - "66617": 66577, - "66618": 66578, - "66619": 66579, - "66620": 66580, - "66621": 66581, - "66622": 66582, - "66623": 66583, - "66624": 66584, - "66625": 66585, - "66626": 66586, - "66627": 66587, - "66628": 66588, - "66629": 66589, - "66630": 66590, - "66631": 66591, - "66632": 66592, - "66633": 66593, - "66634": 66594, - "66635": 66595, - "66636": 66596, - "66637": 66597, - "66638": 66598, - "66639": 66599, - "71840": 71872, - "71841": 71873, - "71842": 71874, - "71843": 71875, - "71844": 71876, - "71845": 71877, - "71846": 71878, - "71847": 71879, - "71848": 71880, - "71849": 71881, - "71850": 71882, - "71851": 71883, - "71852": 71884, - "71853": 71885, - "71854": 71886, - "71855": 71887, - "71856": 71888, - "71857": 71889, - "71858": 71890, - "71859": 71891, - "71860": 71892, - "71861": 71893, - "71862": 71894, - "71863": 71895, - "71864": 71896, - "71865": 71897, - "71866": 71898, - "71867": 71899, - "71868": 71900, - "71869": 71901, - "71870": 71902, - "71871": 71903, - "71872": 71840, - "71873": 71841, - "71874": 71842, - "71875": 71843, - "71876": 71844, - "71877": 71845, - "71878": 71846, - "71879": 71847, - "71880": 71848, - "71881": 71849, - "71882": 71850, - "71883": 71851, - "71884": 71852, - "71885": 71853, - "71886": 71854, - "71887": 71855, - "71888": 71856, - "71889": 71857, - "71890": 71858, - "71891": 71859, - "71892": 71860, - "71893": 71861, - "71894": 71862, - "71895": 71863, - "71896": 71864, - "71897": 71865, - "71898": 71866, - "71899": 71867, - "71900": 71868, - "71901": 71869, - "71902": 71870, - "71903": 71871 -} - -},{}],433:[function(require,module,exports){ -(function (global){ -/*! https://mths.be/regenerate v1.2.0 by @mathias | MIT license */ -;(function(root) { - - // Detect free variables `exports`. - var freeExports = typeof exports == 'object' && exports; - - // Detect free variable `module`. - var freeModule = typeof module == 'object' && module && - module.exports == freeExports && module; - - // Detect free variable `global`, from Node.js or Browserified code, - // and use it as `root`. - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - var ERRORS = { - 'rangeOrder': 'A range\u2019s `stop` value must be greater than or equal ' + - 'to the `start` value.', - 'codePointRange': 'Invalid code point value. Code points range from ' + - 'U+000000 to U+10FFFF.' - }; - - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs - var HIGH_SURROGATE_MIN = 0xD800; - var HIGH_SURROGATE_MAX = 0xDBFF; - var LOW_SURROGATE_MIN = 0xDC00; - var LOW_SURROGATE_MAX = 0xDFFF; - - // In Regenerate output, `\0` will never be preceded by `\` because we sort - // by code point value, so let’s keep this regular expression simple. - var regexNull = /\\x00([^0123456789]|$)/g; - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - var extend = function(destination, source) { - var key; - for (key in source) { - if (hasOwnProperty.call(source, key)) { - destination[key] = source[key]; - } - } - return destination; - }; - - var forEach = function(array, callback) { - var index = -1; - var length = array.length; - while (++index < length) { - callback(array[index], index); - } - }; - - var toString = object.toString; - var isArray = function(value) { - return toString.call(value) == '[object Array]'; - }; - var isNumber = function(value) { - return typeof value == 'number' || - toString.call(value) == '[object Number]'; - }; - - // This assumes that `number` is a positive integer that `toString()`s nicely - // (which is the case for all code point values). - var zeroes = '0000'; - var pad = function(number, totalCharacters) { - var string = String(number); - return string.length < totalCharacters - ? (zeroes + string).slice(-totalCharacters) - : string; - }; - - var hex = function(number) { - return Number(number).toString(16).toUpperCase(); - }; - - var slice = [].slice; - - /*--------------------------------------------------------------------------*/ - - var dataFromCodePoints = function(codePoints) { - var index = -1; - var length = codePoints.length; - var max = length - 1; - var result = []; - var isStart = true; - var tmp; - var previous = 0; - while (++index < length) { - tmp = codePoints[index]; - if (isStart) { - result.push(tmp); - previous = tmp; - isStart = false; - } else { - if (tmp == previous + 1) { - if (index != max) { - previous = tmp; - continue; - } else { - isStart = true; - result.push(tmp + 1); - } - } else { - // End the previous range and start a new one. - result.push(previous + 1, tmp); - previous = tmp; - } - } - } - if (!isStart) { - result.push(tmp + 1); - } - return result; - }; - - var dataRemove = function(data, codePoint) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - if (codePoint >= start && codePoint < end) { - // Modify this pair. - if (codePoint == start) { - if (end == start + 1) { - // Just remove `start` and `end`. - data.splice(index, 2); - return data; - } else { - // Just replace `start` with a new value. - data[index] = codePoint + 1; - return data; - } - } else if (codePoint == end - 1) { - // Just replace `end` with a new value. - data[index + 1] = codePoint; - return data; - } else { - // Replace `[start, end]` with `[startA, endA, startB, endB]`. - data.splice(index, 2, start, codePoint, codePoint + 1, end); - return data; - } - } - index += 2; - } - return data; - }; - - var dataRemoveRange = function(data, rangeStart, rangeEnd) { - if (rangeEnd < rangeStart) { - throw Error(ERRORS.rangeOrder); - } - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - while (index < data.length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - - // Exit as soon as no more matching pairs can be found. - if (start > rangeEnd) { - return data; - } - - // Check if this range pair is equal to, or forms a subset of, the range - // to be removed. - // E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`. - // E.g. we have `[40, 51]` and want to remove 0-100 → `[]`. - if (rangeStart <= start && rangeEnd >= end) { - // Remove this pair. - data.splice(index, 2); - continue; - } - - // Check if both `rangeStart` and `rangeEnd` are within the bounds of - // this pair. - // E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`. - if (rangeStart >= start && rangeEnd < end) { - if (rangeStart == start) { - // Replace `[start, end]` with `[startB, endB]`. - data[index] = rangeEnd + 1; - data[index + 1] = end + 1; - return data; - } - // Replace `[start, end]` with `[startA, endA, startB, endB]`. - data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1); - return data; - } - - // Check if only `rangeStart` is within the bounds of this pair. - // E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`. - if (rangeStart >= start && rangeStart <= end) { - // Replace `end` with `rangeStart`. - data[index + 1] = rangeStart; - // Note: we cannot `return` just yet, in case any following pairs still - // contain matching code points. - // E.g. we have `[0, 11, 14, 31]` and want to remove 4-20 - // → `[0, 4, 21, 31]`. - } - - // Check if only `rangeEnd` is within the bounds of this pair. - // E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`. - else if (rangeEnd >= start && rangeEnd <= end) { - // Just replace `start`. - data[index] = rangeEnd + 1; - return data; - } - - index += 2; - } - return data; - }; - - var dataAdd = function(data, codePoint) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var lastIndex = null; - var length = data.length; - if (codePoint < 0x0 || codePoint > 0x10FFFF) { - throw RangeError(ERRORS.codePointRange); - } - while (index < length) { - start = data[index]; - end = data[index + 1]; - - // Check if the code point is already in the set. - if (codePoint >= start && codePoint < end) { - return data; - } - - if (codePoint == start - 1) { - // Just replace `start` with a new value. - data[index] = codePoint; - return data; - } - - // At this point, if `start` is `greater` than `codePoint`, insert a new - // `[start, end]` pair before the current pair, or after the current pair - // if there is a known `lastIndex`. - if (start > codePoint) { - data.splice( - lastIndex != null ? lastIndex + 2 : 0, - 0, - codePoint, - codePoint + 1 - ); - return data; - } - - if (codePoint == end) { - // Check if adding this code point causes two separate ranges to become - // a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`. - if (codePoint + 1 == data[index + 2]) { - data.splice(index, 4, start, data[index + 3]); - return data; - } - // Else, just replace `end` with a new value. - data[index + 1] = codePoint + 1; - return data; - } - lastIndex = index; - index += 2; - } - // The loop has finished; add the new pair to the end of the data set. - data.push(codePoint, codePoint + 1); - return data; - }; - - var dataAddData = function(dataA, dataB) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var data = dataA.slice(); - var length = dataB.length; - while (index < length) { - start = dataB[index]; - end = dataB[index + 1] - 1; - if (start == end) { - data = dataAdd(data, start); - } else { - data = dataAddRange(data, start, end); - } - index += 2; - } - return data; - }; - - var dataRemoveData = function(dataA, dataB) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var data = dataA.slice(); - var length = dataB.length; - while (index < length) { - start = dataB[index]; - end = dataB[index + 1] - 1; - if (start == end) { - data = dataRemove(data, start); - } else { - data = dataRemoveRange(data, start, end); - } - index += 2; - } - return data; - }; - - var dataAddRange = function(data, rangeStart, rangeEnd) { - if (rangeEnd < rangeStart) { - throw Error(ERRORS.rangeOrder); - } - if ( - rangeStart < 0x0 || rangeStart > 0x10FFFF || - rangeEnd < 0x0 || rangeEnd > 0x10FFFF - ) { - throw RangeError(ERRORS.codePointRange); - } - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var added = false; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - - if (added) { - // The range has already been added to the set; at this point, we just - // need to get rid of the following ranges in case they overlap. - - // Check if this range can be combined with the previous range. - if (start == rangeEnd + 1) { - data.splice(index - 1, 2); - return data; - } - - // Exit as soon as no more possibly overlapping pairs can be found. - if (start > rangeEnd) { - return data; - } - - // E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have - // `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the - // `0,16` range that was previously added. - if (start >= rangeStart && start <= rangeEnd) { - // `start` lies within the range that was previously added. - - if (end > rangeStart && end - 1 <= rangeEnd) { - // `end` lies within the range that was previously added as well, - // so remove this pair. - data.splice(index, 2); - index -= 2; - // Note: we cannot `return` just yet, as there may still be other - // overlapping pairs. - } else { - // `start` lies within the range that was previously added, but - // `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so - // now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`. - // Remove the previously added `end` and the current `start`. - data.splice(index - 1, 2); - index -= 2; - } - - // Note: we cannot return yet. - } - - } - - else if (start == rangeEnd + 1) { - data[index] = rangeStart; - return data; - } - - // Check if a new pair must be inserted *before* the current one. - else if (start > rangeEnd) { - data.splice(index, 0, rangeStart, rangeEnd + 1); - return data; - } - - else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) { - // The new range lies entirely within an existing range pair. No action - // needed. - return data; - } - - else if ( - // E.g. `[0, 11]` and you add 5-15 → `[0, 16]`. - (rangeStart >= start && rangeStart < end) || - // E.g. `[0, 3]` and you add 3-6 → `[0, 7]`. - end == rangeStart - ) { - // Replace `end` with the new value. - data[index + 1] = rangeEnd + 1; - // Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]` - // and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part. - added = true; - // Note: we cannot `return` just yet. - } - - else if (rangeStart <= start && rangeEnd + 1 >= end) { - // The new range is a superset of the old range. - data[index] = rangeStart; - data[index + 1] = rangeEnd + 1; - added = true; - } - - index += 2; - } - // The loop has finished without doing anything; add the new pair to the end - // of the data set. - if (!added) { - data.push(rangeStart, rangeEnd + 1); - } - return data; - }; - - var dataContains = function(data, codePoint) { - var index = 0; - var length = data.length; - // Exit early if `codePoint` is not within `data`’s overall range. - var start = data[index]; - var end = data[length - 1]; - if (length >= 2) { - if (codePoint < start || codePoint > end) { - return false; - } - } - // Iterate over the data per `(start, end)` pair. - while (index < length) { - start = data[index]; - end = data[index + 1]; - if (codePoint >= start && codePoint < end) { - return true; - } - index += 2; - } - return false; - }; - - var dataIntersection = function(data, codePoints) { - var index = 0; - var length = codePoints.length; - var codePoint; - var result = []; - while (index < length) { - codePoint = codePoints[index]; - if (dataContains(data, codePoint)) { - result.push(codePoint); - } - ++index; - } - return dataFromCodePoints(result); - }; - - var dataIsEmpty = function(data) { - return !data.length; - }; - - var dataIsSingleton = function(data) { - // Check if the set only represents a single code point. - return data.length == 2 && data[0] + 1 == data[1]; - }; - - var dataToArray = function(data) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var result = []; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - while (start < end) { - result.push(start); - ++start; - } - index += 2; - } - return result; - }; - - /*--------------------------------------------------------------------------*/ - - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var floor = Math.floor; - var highSurrogate = function(codePoint) { - return parseInt( - floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, - 10 - ); - }; - - var lowSurrogate = function(codePoint) { - return parseInt( - (codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, - 10 - ); - }; - - var stringFromCharCode = String.fromCharCode; - var codePointToString = function(codePoint) { - var string; - // https://mathiasbynens.be/notes/javascript-escapes#single - // Note: the `\b` escape sequence for U+0008 BACKSPACE in strings has a - // different meaning in regular expressions (word boundary), so it cannot - // be used here. - if (codePoint == 0x09) { - string = '\\t'; - } - // Note: IE < 9 treats `'\v'` as `'v'`, so avoid using it. - // else if (codePoint == 0x0B) { - // string = '\\v'; - // } - else if (codePoint == 0x0A) { - string = '\\n'; - } - else if (codePoint == 0x0C) { - string = '\\f'; - } - else if (codePoint == 0x0D) { - string = '\\r'; - } - else if (codePoint == 0x5C) { - string = '\\\\'; - } - else if ( - codePoint == 0x24 || - (codePoint >= 0x28 && codePoint <= 0x2B) || - codePoint == 0x2D || codePoint == 0x2E || codePoint == 0x3F || - (codePoint >= 0x5B && codePoint <= 0x5E) || - (codePoint >= 0x7B && codePoint <= 0x7D) - ) { - // The code point maps to an unsafe printable ASCII character; - // backslash-escape it. Here’s the list of those symbols: - // - // $()*+-.?[\]^{|} - // - // See #7 for more info. - string = '\\' + stringFromCharCode(codePoint); - } - else if (codePoint >= 0x20 && codePoint <= 0x7E) { - // The code point maps to one of these printable ASCII symbols - // (including the space character): - // - // !"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO - // PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~ - // - // These can safely be used directly. - string = stringFromCharCode(codePoint); - } - else if (codePoint <= 0xFF) { - // https://mathiasbynens.be/notes/javascript-escapes#hexadecimal - string = '\\x' + pad(hex(codePoint), 2); - } - else { // `codePoint <= 0xFFFF` holds true. - // https://mathiasbynens.be/notes/javascript-escapes#unicode - string = '\\u' + pad(hex(codePoint), 4); - } - - // There’s no need to account for astral symbols / surrogate pairs here, - // since `codePointToString` is private and only used for BMP code points. - // But if that’s what you need, just add an `else` block with this code: - // - // string = '\\u' + pad(hex(highSurrogate(codePoint)), 4) - // + '\\u' + pad(hex(lowSurrogate(codePoint)), 4); - - return string; - }; - - var symbolToCodePoint = function(symbol) { - var length = symbol.length; - var first = symbol.charCodeAt(0); - var second; - if ( - first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && - length > 1 // There is a next code unit. - ) { - // `first` is a high surrogate, and there is a next character. Assume - // it’s a low surrogate (else it’s invalid usage of Regenerate anyway). - second = symbol.charCodeAt(1); - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - HIGH_SURROGATE_MIN) * 0x400 + - second - LOW_SURROGATE_MIN + 0x10000; - } - return first; - }; - - var createBMPCharacterClasses = function(data) { - // Iterate over the data per `(start, end)` pair. - var result = ''; - var index = 0; - var start; - var end; - var length = data.length; - if (dataIsSingleton(data)) { - return codePointToString(data[0]); - } - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - if (start == end) { - result += codePointToString(start); - } else if (start + 1 == end) { - result += codePointToString(start) + codePointToString(end); - } else { - result += codePointToString(start) + '-' + codePointToString(end); - } - index += 2; - } - return '[' + result + ']'; - }; - - var splitAtBMP = function(data) { - // Iterate over the data per `(start, end)` pair. - var loneHighSurrogates = []; - var loneLowSurrogates = []; - var bmp = []; - var astral = []; - var index = 0; - var start; - var end; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - - if (start < HIGH_SURROGATE_MIN) { - - // The range starts and ends before the high surrogate range. - // E.g. (0, 0x10). - if (end < HIGH_SURROGATE_MIN) { - bmp.push(start, end + 1); - } - - // The range starts before the high surrogate range and ends within it. - // E.g. (0, 0xD855). - if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1); - } - - // The range starts before the high surrogate range and ends in the low - // surrogate range. E.g. (0, 0xDCFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); - } - - // The range starts before the high surrogate range and ends after the - // low surrogate range. E.g. (0, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - - } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) { - - // The range starts and ends in the high surrogate range. - // E.g. (0xD855, 0xD866). - if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { - loneHighSurrogates.push(start, end + 1); - } - - // The range starts in the high surrogate range and ends in the low - // surrogate range. E.g. (0xD855, 0xDCFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); - } - - // The range starts in the high surrogate range and ends after the low - // surrogate range. E.g. (0xD855, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - - } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) { - - // The range starts and ends in the low surrogate range. - // E.g. (0xDCFF, 0xDDFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - loneLowSurrogates.push(start, end + 1); - } - - // The range starts in the low surrogate range and ends after the low - // surrogate range. E.g. (0xDCFF, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - - } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) { - - // The range starts and ends after the low surrogate range. - // E.g. (0xFFAA, 0x10FFFF). - if (end <= 0xFFFF) { - bmp.push(start, end + 1); - } else { - bmp.push(start, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - - } else { - - // The range starts and ends in the astral range. - astral.push(start, end + 1); - - } - - index += 2; - } - return { - 'loneHighSurrogates': loneHighSurrogates, - 'loneLowSurrogates': loneLowSurrogates, - 'bmp': bmp, - 'astral': astral - }; - }; - - var optimizeSurrogateMappings = function(surrogateMappings) { - var result = []; - var tmpLow = []; - var addLow = false; - var mapping; - var nextMapping; - var highSurrogates; - var lowSurrogates; - var nextHighSurrogates; - var nextLowSurrogates; - var index = -1; - var length = surrogateMappings.length; - while (++index < length) { - mapping = surrogateMappings[index]; - nextMapping = surrogateMappings[index + 1]; - if (!nextMapping) { - result.push(mapping); - continue; - } - highSurrogates = mapping[0]; - lowSurrogates = mapping[1]; - nextHighSurrogates = nextMapping[0]; - nextLowSurrogates = nextMapping[1]; - - // Check for identical high surrogate ranges. - tmpLow = lowSurrogates; - while ( - nextHighSurrogates && - highSurrogates[0] == nextHighSurrogates[0] && - highSurrogates[1] == nextHighSurrogates[1] - ) { - // Merge with the next item. - if (dataIsSingleton(nextLowSurrogates)) { - tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]); - } else { - tmpLow = dataAddRange( - tmpLow, - nextLowSurrogates[0], - nextLowSurrogates[1] - 1 - ); - } - ++index; - mapping = surrogateMappings[index]; - highSurrogates = mapping[0]; - lowSurrogates = mapping[1]; - nextMapping = surrogateMappings[index + 1]; - nextHighSurrogates = nextMapping && nextMapping[0]; - nextLowSurrogates = nextMapping && nextMapping[1]; - addLow = true; - } - result.push([ - highSurrogates, - addLow ? tmpLow : lowSurrogates - ]); - addLow = false; - } - return optimizeByLowSurrogates(result); - }; - - var optimizeByLowSurrogates = function(surrogateMappings) { - if (surrogateMappings.length == 1) { - return surrogateMappings; - } - var index = -1; - var innerIndex = -1; - while (++index < surrogateMappings.length) { - var mapping = surrogateMappings[index]; - var lowSurrogates = mapping[1]; - var lowSurrogateStart = lowSurrogates[0]; - var lowSurrogateEnd = lowSurrogates[1]; - innerIndex = index; // Note: the loop starts at the next index. - while (++innerIndex < surrogateMappings.length) { - var otherMapping = surrogateMappings[innerIndex]; - var otherLowSurrogates = otherMapping[1]; - var otherLowSurrogateStart = otherLowSurrogates[0]; - var otherLowSurrogateEnd = otherLowSurrogates[1]; - if ( - lowSurrogateStart == otherLowSurrogateStart && - lowSurrogateEnd == otherLowSurrogateEnd - ) { - // Add the code points in the other item to this one. - if (dataIsSingleton(otherMapping[0])) { - mapping[0] = dataAdd(mapping[0], otherMapping[0][0]); - } else { - mapping[0] = dataAddRange( - mapping[0], - otherMapping[0][0], - otherMapping[0][1] - 1 - ); - } - // Remove the other, now redundant, item. - surrogateMappings.splice(innerIndex, 1); - --innerIndex; - } - } - } - return surrogateMappings; - }; - - var surrogateSet = function(data) { - // Exit early if `data` is an empty set. - if (!data.length) { - return []; - } - - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var startHigh; - var startLow; - var prevStartHigh = 0; - var prevEndHigh = 0; - var tmpLow = []; - var endHigh; - var endLow; - var surrogateMappings = []; - var length = data.length; - var dataHigh = []; - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; - - startHigh = highSurrogate(start); - startLow = lowSurrogate(start); - endHigh = highSurrogate(end); - endLow = lowSurrogate(end); - - var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN; - var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX; - var complete = false; - - // Append the previous high-surrogate-to-low-surrogate mappings. - // Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`. - if ( - startHigh == endHigh || - startsWithLowestLowSurrogate && endsWithHighestLowSurrogate - ) { - surrogateMappings.push([ - [startHigh, endHigh + 1], - [startLow, endLow + 1] - ]); - complete = true; - } else { - surrogateMappings.push([ - [startHigh, startHigh + 1], - [startLow, LOW_SURROGATE_MAX + 1] - ]); - } - - // Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to - // `(endHigh - 1, LOW_SURROGATE_MAX)`. - if (!complete && startHigh + 1 < endHigh) { - if (endsWithHighestLowSurrogate) { - // Combine step 2 and step 3. - surrogateMappings.push([ - [startHigh + 1, endHigh + 1], - [LOW_SURROGATE_MIN, endLow + 1] - ]); - complete = true; - } else { - surrogateMappings.push([ - [startHigh + 1, endHigh], - [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1] - ]); - } - } - - // Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`. - if (!complete) { - surrogateMappings.push([ - [endHigh, endHigh + 1], - [LOW_SURROGATE_MIN, endLow + 1] - ]); - } - - prevStartHigh = startHigh; - prevEndHigh = endHigh; - - index += 2; - } - - // The format of `surrogateMappings` is as follows: - // - // [ surrogateMapping1, surrogateMapping2 ] - // - // i.e.: - // - // [ - // [ highSurrogates1, lowSurrogates1 ], - // [ highSurrogates2, lowSurrogates2 ] - // ] - return optimizeSurrogateMappings(surrogateMappings); - }; - - var createSurrogateCharacterClasses = function(surrogateMappings) { - var result = []; - forEach(surrogateMappings, function(surrogateMapping) { - var highSurrogates = surrogateMapping[0]; - var lowSurrogates = surrogateMapping[1]; - result.push( - createBMPCharacterClasses(highSurrogates) + - createBMPCharacterClasses(lowSurrogates) - ); - }); - return result.join('|'); - }; - - var createCharacterClassesFromData = function(data, bmpOnly) { - var result = []; - - var parts = splitAtBMP(data); - var loneHighSurrogates = parts.loneHighSurrogates; - var loneLowSurrogates = parts.loneLowSurrogates; - var bmp = parts.bmp; - var astral = parts.astral; - var hasAstral = !dataIsEmpty(parts.astral); - var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates); - var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates); - - var surrogateMappings = surrogateSet(astral); - - if (bmpOnly) { - bmp = dataAddData(bmp, loneHighSurrogates); - hasLoneHighSurrogates = false; - bmp = dataAddData(bmp, loneLowSurrogates); - hasLoneLowSurrogates = false; - } - - if (!dataIsEmpty(bmp)) { - // The data set contains BMP code points that are not high surrogates - // needed for astral code points in the set. - result.push(createBMPCharacterClasses(bmp)); - } - if (surrogateMappings.length) { - // The data set contains astral code points; append character classes - // based on their surrogate pairs. - result.push(createSurrogateCharacterClasses(surrogateMappings)); - } - // https://gist.github.com/mathiasbynens/bbe7f870208abcfec860 - if (hasLoneHighSurrogates) { - result.push( - createBMPCharacterClasses(loneHighSurrogates) + - // Make sure the high surrogates aren’t part of a surrogate pair. - '(?![\\uDC00-\\uDFFF])' - ); - } - if (hasLoneLowSurrogates) { - result.push( - // Make sure the low surrogates aren’t part of a surrogate pair. - '(?:[^\\uD800-\\uDBFF]|^)' + - createBMPCharacterClasses(loneLowSurrogates) - ); - } - return result.join('|'); - }; - - /*--------------------------------------------------------------------------*/ - - // `regenerate` can be used as a constructor (and new methods can be added to - // its prototype) but also as a regular function, the latter of which is the - // documented and most common usage. For that reason, it’s not capitalized. - var regenerate = function(value) { - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (this instanceof regenerate) { - this.data = []; - return value ? this.add(value) : this; - } - return (new regenerate).add(value); - }; - - regenerate.version = '1.2.0'; - - var proto = regenerate.prototype; - extend(proto, { - 'add': function(value) { - var $this = this; - if (value == null) { - return $this; - } - if (value instanceof regenerate) { - // Allow passing other Regenerate instances. - $this.data = dataAddData($this.data, value.data); - return $this; - } - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (isArray(value)) { - forEach(value, function(item) { - $this.add(item); - }); - return $this; - } - $this.data = dataAdd( - $this.data, - isNumber(value) ? value : symbolToCodePoint(value) - ); - return $this; - }, - 'remove': function(value) { - var $this = this; - if (value == null) { - return $this; - } - if (value instanceof regenerate) { - // Allow passing other Regenerate instances. - $this.data = dataRemoveData($this.data, value.data); - return $this; - } - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (isArray(value)) { - forEach(value, function(item) { - $this.remove(item); - }); - return $this; - } - $this.data = dataRemove( - $this.data, - isNumber(value) ? value : symbolToCodePoint(value) - ); - return $this; - }, - 'addRange': function(start, end) { - var $this = this; - $this.data = dataAddRange($this.data, - isNumber(start) ? start : symbolToCodePoint(start), - isNumber(end) ? end : symbolToCodePoint(end) - ); - return $this; - }, - 'removeRange': function(start, end) { - var $this = this; - var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start); - var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end); - $this.data = dataRemoveRange( - $this.data, - startCodePoint, - endCodePoint - ); - return $this; - }, - 'intersection': function(argument) { - var $this = this; - // Allow passing other Regenerate instances. - // TODO: Optimize this by writing and using `dataIntersectionData()`. - var array = argument instanceof regenerate ? - dataToArray(argument.data) : - argument; - $this.data = dataIntersection($this.data, array); - return $this; - }, - 'contains': function(codePoint) { - return dataContains( - this.data, - isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint) - ); - }, - 'clone': function() { - var set = new regenerate; - set.data = this.data.slice(0); - return set; - }, - 'toString': function(options) { - var result = createCharacterClassesFromData( - this.data, - options ? options.bmpOnly : false - ); - // Use `\0` instead of `\x00` where possible. - return result.replace(regexNull, '\\0$1'); - }, - 'toRegExp': function(flags) { - return RegExp(this.toString(), flags || ''); - }, - 'valueOf': function() { // Note: `valueOf` is aliased as `toArray`. - return dataToArray(this.data); - } - }); - - proto.toArray = proto.valueOf; - - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define(function() { - return regenerate; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = regenerate; - } else { // in Narwhal or RingoJS v0.7.0- - freeExports.regenerate = regenerate; - } - } else { // in Rhino or a web browser - root.regenerate = regenerate; - } - -}(this)); - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],434:[function(require,module,exports){ -(function (global){ -/*! - * RegJSGen - * Copyright 2014 Benjamin Tan - * Available under MIT license - */ -;(function() { - 'use strict'; + /*--------------------------------------------------------------------------*/ - /** Used to determine if values are of the language type `Object` */ - var objectTypes = { - 'function': true, - 'object': true - }; + // `regenerate` can be used as a constructor (and new methods can be added to + // its prototype) but also as a regular function, the latter of which is the + // documented and most common usage. For that reason, it’s not capitalized. + var regenerate = function(value) { + if (arguments.length > 1) { + value = slice.call(arguments); + } + if (this instanceof regenerate) { + this.data = []; + return value ? this.add(value) : this; + } + return (new regenerate).add(value); + }; - /** Used as a reference to the global object */ - var root = (objectTypes[typeof window] && window) || this; + regenerate.version = '1.2.0'; - /** Backup possible global object */ - var oldRoot = root; + var proto = regenerate.prototype; + extend(proto, { + 'add': function(value) { + var $this = this; + if (value == null) { + return $this; + } + if (value instanceof regenerate) { + // Allow passing other Regenerate instances. + $this.data = dataAddData($this.data, value.data); + return $this; + } + if (arguments.length > 1) { + value = slice.call(arguments); + } + if (isArray(value)) { + forEach(value, function(item) { + $this.add(item); + }); + return $this; + } + $this.data = dataAdd( + $this.data, + isNumber(value) ? value : symbolToCodePoint(value) + ); + return $this; + }, + 'remove': function(value) { + var $this = this; + if (value == null) { + return $this; + } + if (value instanceof regenerate) { + // Allow passing other Regenerate instances. + $this.data = dataRemoveData($this.data, value.data); + return $this; + } + if (arguments.length > 1) { + value = slice.call(arguments); + } + if (isArray(value)) { + forEach(value, function(item) { + $this.remove(item); + }); + return $this; + } + $this.data = dataRemove( + $this.data, + isNumber(value) ? value : symbolToCodePoint(value) + ); + return $this; + }, + 'addRange': function(start, end) { + var $this = this; + $this.data = dataAddRange($this.data, + isNumber(start) ? start : symbolToCodePoint(start), + isNumber(end) ? end : symbolToCodePoint(end) + ); + return $this; + }, + 'removeRange': function(start, end) { + var $this = this; + var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start); + var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end); + $this.data = dataRemoveRange( + $this.data, + startCodePoint, + endCodePoint + ); + return $this; + }, + 'intersection': function(argument) { + var $this = this; + // Allow passing other Regenerate instances. + // TODO: Optimize this by writing and using `dataIntersectionData()`. + var array = argument instanceof regenerate ? + dataToArray(argument.data) : + argument; + $this.data = dataIntersection($this.data, array); + return $this; + }, + 'contains': function(codePoint) { + return dataContains( + this.data, + isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint) + ); + }, + 'clone': function() { + var set = new regenerate; + set.data = this.data.slice(0); + return set; + }, + 'toString': function(options) { + var result = createCharacterClassesFromData( + this.data, + options ? options.bmpOnly : false + ); + // Use `\0` instead of `\x00` where possible. + return result.replace(regexNull, '\\0$1'); + }, + 'toRegExp': function(flags) { + return RegExp(this.toString(), flags || ''); + }, + 'valueOf': function() { // Note: `valueOf` is aliased as `toArray`. + return dataToArray(this.data); + } + }); - /** Detect free variable `exports` */ - var freeExports = objectTypes[typeof exports] && exports; + proto.toArray = proto.valueOf; - /** Detect free variable `module` */ - var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define(function() { + return regenerate; + }); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = regenerate; + } else { // in Narwhal or RingoJS v0.7.0- + freeExports.regenerate = regenerate; + } + } else { // in Rhino or a web browser + root.regenerate = regenerate; + } - /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ - var freeGlobal = freeExports && freeModule && typeof global == 'object' && global; - if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) { - root = freeGlobal; - } + }(this)); - /*--------------------------------------------------------------------------*/ + }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],486:[function(require,module,exports){ + (function (global){ + /*! + * RegJSGen + * Copyright 2014 Benjamin Tan + * Available under MIT license + */ + ;(function() { + 'use strict'; - /*! Based on https://mths.be/fromcodepoint v0.2.0 by @mathias */ + /** Used to determine if values are of the language type `Object` */ + var objectTypes = { + 'function': true, + 'object': true + }; - var stringFromCharCode = String.fromCharCode; - var floor = Math.floor; - function fromCodePoint() { - var MAX_SIZE = 0x4000; - var codeUnits = []; - var highSurrogate; - var lowSurrogate; - var index = -1; - var length = arguments.length; - if (!length) { - return ''; - } - var result = ''; - while (++index < length) { - var codePoint = Number(arguments[index]); - if ( - !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity` - codePoint < 0 || // not a valid Unicode code point - codePoint > 0x10FFFF || // not a valid Unicode code point - floor(codePoint) != codePoint // not an integer - ) { - throw RangeError('Invalid code point: ' + codePoint); - } - if (codePoint <= 0xFFFF) { - // BMP code point - codeUnits.push(codePoint); - } else { - // Astral code point; split in surrogate halves - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - codePoint -= 0x10000; - highSurrogate = (codePoint >> 10) + 0xD800; - lowSurrogate = (codePoint % 0x400) + 0xDC00; - codeUnits.push(highSurrogate, lowSurrogate); - } - if (index + 1 == length || codeUnits.length > MAX_SIZE) { - result += stringFromCharCode.apply(null, codeUnits); - codeUnits.length = 0; + /** Used as a reference to the global object */ + var root = (objectTypes[typeof window] && window) || this; + + /** Backup possible global object */ + var oldRoot = root; + + /** Detect free variable `exports` */ + var freeExports = objectTypes[typeof exports] && exports; + + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ + var freeGlobal = freeExports && freeModule && typeof global == 'object' && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + /*! Based on https://mths.be/fromcodepoint v0.2.0 by @mathias */ + + var stringFromCharCode = String.fromCharCode; + var floor = Math.floor; + function fromCodePoint() { + var MAX_SIZE = 0x4000; + var codeUnits = []; + var highSurrogate; + var lowSurrogate; + var index = -1; + var length = arguments.length; + if (!length) { + return ''; + } + var result = ''; + while (++index < length) { + var codePoint = Number(arguments[index]); + if ( + !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity` + codePoint < 0 || // not a valid Unicode code point + codePoint > 0x10FFFF || // not a valid Unicode code point + floor(codePoint) != codePoint // not an integer + ) { + throw RangeError('Invalid code point: ' + codePoint); + } + if (codePoint <= 0xFFFF) { + // BMP code point + codeUnits.push(codePoint); + } else { + // Astral code point; split in surrogate halves + // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + codePoint -= 0x10000; + highSurrogate = (codePoint >> 10) + 0xD800; + lowSurrogate = (codePoint % 0x400) + 0xDC00; + codeUnits.push(highSurrogate, lowSurrogate); + } + if (index + 1 == length || codeUnits.length > MAX_SIZE) { + result += stringFromCharCode.apply(null, codeUnits); + codeUnits.length = 0; + } + } + return result; } - } - return result; - } - function assertType(type, expected) { - if (expected.indexOf('|') == -1) { - if (type == expected) { - return; - } + function assertType(type, expected) { + if (expected.indexOf('|') == -1) { + if (type == expected) { + return; + } - throw Error('Invalid node type: ' + type); - } + throw Error('Invalid node type: ' + type); + } - expected = assertType.hasOwnProperty(expected) - ? assertType[expected] - : (assertType[expected] = RegExp('^(?:' + expected + ')$')); + expected = assertType.hasOwnProperty(expected) + ? assertType[expected] + : (assertType[expected] = RegExp('^(?:' + expected + ')$')); - if (expected.test(type)) { - return; - } + if (expected.test(type)) { + return; + } - throw Error('Invalid node type: ' + type); - } + throw Error('Invalid node type: ' + type); + } - /*--------------------------------------------------------------------------*/ + /*--------------------------------------------------------------------------*/ - function generate(node) { - var type = node.type; + function generate(node) { + var type = node.type; - if (generate.hasOwnProperty(type) && typeof generate[type] == 'function') { - return generate[type](node); - } + if (generate.hasOwnProperty(type) && typeof generate[type] == 'function') { + return generate[type](node); + } - throw Error('Invalid node type: ' + type); - } + throw Error('Invalid node type: ' + type); + } - /*--------------------------------------------------------------------------*/ + /*--------------------------------------------------------------------------*/ - function generateAlternative(node) { - assertType(node.type, 'alternative'); + function generateAlternative(node) { + assertType(node.type, 'alternative'); - var terms = node.body, - length = terms ? terms.length : 0; + var terms = node.body, + length = terms ? terms.length : 0; - if (length == 1) { - return generateTerm(terms[0]); - } else { - var i = -1, - result = ''; + if (length == 1) { + return generateTerm(terms[0]); + } else { + var i = -1, + result = ''; - while (++i < length) { - result += generateTerm(terms[i]); + while (++i < length) { + result += generateTerm(terms[i]); + } + + return result; + } } - return result; - } - } + function generateAnchor(node) { + assertType(node.type, 'anchor'); - function generateAnchor(node) { - assertType(node.type, 'anchor'); + switch (node.kind) { + case 'start': + return '^'; + case 'end': + return '$'; + case 'boundary': + return '\\b'; + case 'not-boundary': + return '\\B'; + default: + throw Error('Invalid assertion'); + } + } - switch (node.kind) { - case 'start': - return '^'; - case 'end': - return '$'; - case 'boundary': - return '\\b'; - case 'not-boundary': - return '\\B'; - default: - throw Error('Invalid assertion'); - } - } + function generateAtom(node) { + assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value'); - function generateAtom(node) { - assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value'); + return generate(node); + } - return generate(node); - } + function generateCharacterClass(node) { + assertType(node.type, 'characterClass'); - function generateCharacterClass(node) { - assertType(node.type, 'characterClass'); + var classRanges = node.body, + length = classRanges ? classRanges.length : 0; - var classRanges = node.body, - length = classRanges ? classRanges.length : 0; + var i = -1, + result = '['; - var i = -1, - result = '['; + if (node.negative) { + result += '^'; + } - if (node.negative) { - result += '^'; - } + while (++i < length) { + result += generateClassAtom(classRanges[i]); + } - while (++i < length) { - result += generateClassAtom(classRanges[i]); - } + result += ']'; - result += ']'; + return result; + } - return result; - } + function generateCharacterClassEscape(node) { + assertType(node.type, 'characterClassEscape'); - function generateCharacterClassEscape(node) { - assertType(node.type, 'characterClassEscape'); + return '\\' + node.value; + } - return '\\' + node.value; - } + function generateCharacterClassRange(node) { + assertType(node.type, 'characterClassRange'); - function generateCharacterClassRange(node) { - assertType(node.type, 'characterClassRange'); + var min = node.min, + max = node.max; - var min = node.min, - max = node.max; + if (min.type == 'characterClassRange' || max.type == 'characterClassRange') { + throw Error('Invalid character class range'); + } - if (min.type == 'characterClassRange' || max.type == 'characterClassRange') { - throw Error('Invalid character class range'); - } + return generateClassAtom(min) + '-' + generateClassAtom(max); + } - return generateClassAtom(min) + '-' + generateClassAtom(max); - } + function generateClassAtom(node) { + assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value'); - function generateClassAtom(node) { - assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value'); + return generate(node); + } - return generate(node); - } + function generateDisjunction(node) { + assertType(node.type, 'disjunction'); - function generateDisjunction(node) { - assertType(node.type, 'disjunction'); + var body = node.body, + length = body ? body.length : 0; - var body = node.body, - length = body ? body.length : 0; + if (length == 0) { + throw Error('No body'); + } else if (length == 1) { + return generate(body[0]); + } else { + var i = -1, + result = ''; - if (length == 0) { - throw Error('No body'); - } else if (length == 1) { - return generate(body[0]); - } else { - var i = -1, - result = ''; + while (++i < length) { + if (i != 0) { + result += '|'; + } + result += generate(body[i]); + } - while (++i < length) { - if (i != 0) { - result += '|'; + return result; } - result += generate(body[i]); } - return result; - } - } - - function generateDot(node) { - assertType(node.type, 'dot'); + function generateDot(node) { + assertType(node.type, 'dot'); - return '.'; - } + return '.'; + } - function generateGroup(node) { - assertType(node.type, 'group'); + function generateGroup(node) { + assertType(node.type, 'group'); - var result = '('; + var result = '('; - switch (node.behavior) { - case 'normal': - break; - case 'ignore': - result += '?:'; - break; - case 'lookahead': - result += '?='; - break; - case 'negativeLookahead': - result += '?!'; - break; - default: - throw Error('Invalid behaviour: ' + node.behaviour); - } + switch (node.behavior) { + case 'normal': + break; + case 'ignore': + result += '?:'; + break; + case 'lookahead': + result += '?='; + break; + case 'negativeLookahead': + result += '?!'; + break; + default: + throw Error('Invalid behaviour: ' + node.behaviour); + } - var body = node.body, - length = body ? body.length : 0; + var body = node.body, + length = body ? body.length : 0; - if (length == 1) { - result += generate(body[0]); - } else { - var i = -1; + if (length == 1) { + result += generate(body[0]); + } else { + var i = -1; - while (++i < length) { - result += generate(body[i]); - } - } + while (++i < length) { + result += generate(body[i]); + } + } - result += ')'; + result += ')'; - return result; - } + return result; + } - function generateQuantifier(node) { - assertType(node.type, 'quantifier'); + function generateQuantifier(node) { + assertType(node.type, 'quantifier'); - var quantifier = '', - min = node.min, - max = node.max; + var quantifier = '', + min = node.min, + max = node.max; - switch (max) { - case undefined: - case null: - switch (min) { - case 0: - quantifier = '*' - break; - case 1: - quantifier = '+'; + switch (max) { + case undefined: + case null: + switch (min) { + case 0: + quantifier = '*' + break; + case 1: + quantifier = '+'; + break; + default: + quantifier = '{' + min + ',}'; + break; + } break; default: - quantifier = '{' + min + ',}'; + if (min == max) { + quantifier = '{' + min + '}'; + } + else if (min == 0 && max == 1) { + quantifier = '?'; + } else { + quantifier = '{' + min + ',' + max + '}'; + } break; } - break; - default: - if (min == max) { - quantifier = '{' + min + '}'; - } - else if (min == 0 && max == 1) { - quantifier = '?'; - } else { - quantifier = '{' + min + ',' + max + '}'; - } - break; - } - if (!node.greedy) { - quantifier += '?'; - } + if (!node.greedy) { + quantifier += '?'; + } - return generateAtom(node.body[0]) + quantifier; - } + return generateAtom(node.body[0]) + quantifier; + } - function generateReference(node) { - assertType(node.type, 'reference'); + function generateReference(node) { + assertType(node.type, 'reference'); - return '\\' + node.matchIndex; - } + return '\\' + node.matchIndex; + } - function generateTerm(node) { - assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value'); + function generateTerm(node) { + assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value'); - return generate(node); - } + return generate(node); + } - function generateValue(node) { - assertType(node.type, 'value'); + function generateValue(node) { + assertType(node.type, 'value'); - var kind = node.kind, - codePoint = node.codePoint; + var kind = node.kind, + codePoint = node.codePoint; - switch (kind) { - case 'controlLetter': - return '\\c' + fromCodePoint(codePoint + 64); - case 'hexadecimalEscape': - return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2); - case 'identifier': - return '\\' + fromCodePoint(codePoint); - case 'null': - return '\\' + codePoint; - case 'octal': - return '\\' + codePoint.toString(8); - case 'singleEscape': - switch (codePoint) { - case 0x0008: - return '\\b'; - case 0x009: - return '\\t'; - case 0x00A: - return '\\n'; - case 0x00B: - return '\\v'; - case 0x00C: - return '\\f'; - case 0x00D: - return '\\r'; + switch (kind) { + case 'controlLetter': + return '\\c' + fromCodePoint(codePoint + 64); + case 'hexadecimalEscape': + return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2); + case 'identifier': + return '\\' + fromCodePoint(codePoint); + case 'null': + return '\\' + codePoint; + case 'octal': + return '\\' + codePoint.toString(8); + case 'singleEscape': + switch (codePoint) { + case 0x0008: + return '\\b'; + case 0x009: + return '\\t'; + case 0x00A: + return '\\n'; + case 0x00B: + return '\\v'; + case 0x00C: + return '\\f'; + case 0x00D: + return '\\r'; + default: + throw Error('Invalid codepoint: ' + codePoint); + } + case 'symbol': + return fromCodePoint(codePoint); + case 'unicodeEscape': + return '\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4); + case 'unicodeCodePointEscape': + return '\\u{' + codePoint.toString(16).toUpperCase() + '}'; default: - throw Error('Invalid codepoint: ' + codePoint); - } - case 'symbol': - return fromCodePoint(codePoint); - case 'unicodeEscape': - return '\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4); - case 'unicodeCodePointEscape': - return '\\u{' + codePoint.toString(16).toUpperCase() + '}'; - default: - throw Error('Unsupported node kind: ' + kind); - } - } + throw Error('Unsupported node kind: ' + kind); + } + } - /*--------------------------------------------------------------------------*/ + /*--------------------------------------------------------------------------*/ - generate.alternative = generateAlternative; - generate.anchor = generateAnchor; - generate.characterClass = generateCharacterClass; - generate.characterClassEscape = generateCharacterClassEscape; - generate.characterClassRange = generateCharacterClassRange; - generate.disjunction = generateDisjunction; - generate.dot = generateDot; - generate.group = generateGroup; - generate.quantifier = generateQuantifier; - generate.reference = generateReference; - generate.value = generateValue; + generate.alternative = generateAlternative; + generate.anchor = generateAnchor; + generate.characterClass = generateCharacterClass; + generate.characterClassEscape = generateCharacterClassEscape; + generate.characterClassRange = generateCharacterClassRange; + generate.disjunction = generateDisjunction; + generate.dot = generateDot; + generate.group = generateGroup; + generate.quantifier = generateQuantifier; + generate.reference = generateReference; + generate.value = generateValue; - /*--------------------------------------------------------------------------*/ + /*--------------------------------------------------------------------------*/ - // export regjsgen - // some AMD build optimizers, like r.js, check for condition patterns like the following: - if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { - // define as an anonymous module so, through path mapping, it can be aliased - define(function() { - return { - 'generate': generate - }; - }); - } - // check for `exports` after `define` in case a build optimizer adds an `exports` object - else if (freeExports && freeModule) { - // in Narwhal, Node.js, Rhino -require, or RingoJS - freeExports.generate = generate; - } - // in a browser or Rhino - else { - root.regjsgen = { - 'generate': generate - }; - } -}.call(this)); + // export regjsgen + // 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 aliased + define(function() { + return { + 'generate': generate + }; + }); + } + // check for `exports` after `define` in case a build optimizer adds an `exports` object + else if (freeExports && freeModule) { + // in Narwhal, Node.js, Rhino -require, or RingoJS + freeExports.generate = generate; + } + // in a browser or Rhino + else { + root.regjsgen = { + 'generate': generate + }; + } + }.call(this)); -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],435:[function(require,module,exports){ + }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],487:[function(require,module,exports){ // regjsparser // // ================================================================== @@ -45773,1831 +59899,1831 @@ module.exports={ // CharacterEscape // CharacterClassEscape -(function() { + (function() { - function parse(str, flags) { - function addRaw(node) { - node.raw = str.substring(node.range[0], node.range[1]); - return node; - } - - function updateRawStart(node, start) { - node.range[0] = start; - return addRaw(node); - } + function parse(str, flags) { + function addRaw(node) { + node.raw = str.substring(node.range[0], node.range[1]); + return node; + } - function createAnchor(kind, rawLength) { - return addRaw({ - type: 'anchor', - kind: kind, - range: [ - pos - rawLength, - pos - ] - }); - } + function updateRawStart(node, start) { + node.range[0] = start; + return addRaw(node); + } - function createValue(kind, codePoint, from, to) { - return addRaw({ - type: 'value', - kind: kind, - codePoint: codePoint, - range: [from, to] - }); - } + function createAnchor(kind, rawLength) { + return addRaw({ + type: 'anchor', + kind: kind, + range: [ + pos - rawLength, + pos + ] + }); + } - function createEscaped(kind, codePoint, value, fromOffset) { - fromOffset = fromOffset || 0; - return createValue(kind, codePoint, pos - (value.length + fromOffset), pos); - } + function createValue(kind, codePoint, from, to) { + return addRaw({ + type: 'value', + kind: kind, + codePoint: codePoint, + range: [from, to] + }); + } - function createCharacter(matches) { - var _char = matches[0]; - var first = _char.charCodeAt(0); - if (hasUnicodeFlag) { - var second; - if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) { - second = lookahead().charCodeAt(0); - if (second >= 0xDC00 && second <= 0xDFFF) { - // Unicode surrogate pair - pos++; - return createValue( - 'symbol', - (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000, - pos - 2, pos); + function createEscaped(kind, codePoint, value, fromOffset) { + fromOffset = fromOffset || 0; + return createValue(kind, codePoint, pos - (value.length + fromOffset), pos); + } + + function createCharacter(matches) { + var _char = matches[0]; + var first = _char.charCodeAt(0); + if (hasUnicodeFlag) { + var second; + if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) { + second = lookahead().charCodeAt(0); + if (second >= 0xDC00 && second <= 0xDFFF) { + // Unicode surrogate pair + pos++; + return createValue( + 'symbol', + (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000, + pos - 2, pos); + } } } + return createValue('symbol', first, pos - 1, pos); } - return createValue('symbol', first, pos - 1, pos); - } - - function createDisjunction(alternatives, from, to) { - return addRaw({ - type: 'disjunction', - body: alternatives, - range: [ - from, - to - ] - }); - } - - function createDot() { - return addRaw({ - type: 'dot', - range: [ - pos - 1, - pos - ] - }); - } - - function createCharacterClassEscape(value) { - return addRaw({ - type: 'characterClassEscape', - value: value, - range: [ - pos - 2, - pos - ] - }); - } - function createReference(matchIndex) { - return addRaw({ - type: 'reference', - matchIndex: parseInt(matchIndex, 10), - range: [ - pos - 1 - matchIndex.length, - pos - ] - }); - } + function createDisjunction(alternatives, from, to) { + return addRaw({ + type: 'disjunction', + body: alternatives, + range: [ + from, + to + ] + }); + } - function createGroup(behavior, disjunction, from, to) { - return addRaw({ - type: 'group', - behavior: behavior, - body: disjunction, - range: [ - from, - to - ] - }); - } + function createDot() { + return addRaw({ + type: 'dot', + range: [ + pos - 1, + pos + ] + }); + } - function createQuantifier(min, max, from, to) { - if (to == null) { - from = pos - 1; - to = pos; + function createCharacterClassEscape(value) { + return addRaw({ + type: 'characterClassEscape', + value: value, + range: [ + pos - 2, + pos + ] + }); } - return addRaw({ - type: 'quantifier', - min: min, - max: max, - greedy: true, - body: null, // set later on, - range: [ - from, - to - ] - }); - } + function createReference(matchIndex) { + return addRaw({ + type: 'reference', + matchIndex: parseInt(matchIndex, 10), + range: [ + pos - 1 - matchIndex.length, + pos + ] + }); + } - function createAlternative(terms, from, to) { - return addRaw({ - type: 'alternative', - body: terms, - range: [ - from, - to - ] - }); - } + function createGroup(behavior, disjunction, from, to) { + return addRaw({ + type: 'group', + behavior: behavior, + body: disjunction, + range: [ + from, + to + ] + }); + } - function createCharacterClass(classRanges, negative, from, to) { - return addRaw({ - type: 'characterClass', - body: classRanges, - negative: negative, - range: [ - from, - to - ] - }); - } + function createQuantifier(min, max, from, to) { + if (to == null) { + from = pos - 1; + to = pos; + } - function createClassRange(min, max, from, to) { - // See 15.10.2.15: - if (min.codePoint > max.codePoint) { - throw SyntaxError('invalid range in character class'); + return addRaw({ + type: 'quantifier', + min: min, + max: max, + greedy: true, + body: null, // set later on, + range: [ + from, + to + ] + }); } - return addRaw({ - type: 'characterClassRange', - min: min, - max: max, - range: [ - from, - to - ] - }); - } + function createAlternative(terms, from, to) { + return addRaw({ + type: 'alternative', + body: terms, + range: [ + from, + to + ] + }); + } - function flattenBody(body) { - if (body.type === 'alternative') { - return body.body; - } else { - return [body]; + function createCharacterClass(classRanges, negative, from, to) { + return addRaw({ + type: 'characterClass', + body: classRanges, + negative: negative, + range: [ + from, + to + ] + }); } - } - function isEmpty(obj) { - return obj.type === 'empty'; - } + function createClassRange(min, max, from, to) { + // See 15.10.2.15: + if (min.codePoint > max.codePoint) { + throw SyntaxError('invalid range in character class'); + } - function incr(amount) { - amount = (amount || 1); - var res = str.substring(pos, pos + amount); - pos += (amount || 1); - return res; - } + return addRaw({ + type: 'characterClassRange', + min: min, + max: max, + range: [ + from, + to + ] + }); + } - function skip(value) { - if (!match(value)) { - throw SyntaxError('character: ' + value); + function flattenBody(body) { + if (body.type === 'alternative') { + return body.body; + } else { + return [body]; + } } - } - function match(value) { - if (str.indexOf(value, pos) === pos) { - return incr(value.length); + function isEmpty(obj) { + return obj.type === 'empty'; } - } - function lookahead() { - return str[pos]; - } + function incr(amount) { + amount = (amount || 1); + var res = str.substring(pos, pos + amount); + pos += (amount || 1); + return res; + } - function current(value) { - return str.indexOf(value, pos) === pos; - } + function skip(value) { + if (!match(value)) { + throw SyntaxError('character: ' + value); + } + } - function next(value) { - return str[pos + 1] === value; - } + function match(value) { + if (str.indexOf(value, pos) === pos) { + return incr(value.length); + } + } - function matchReg(regExp) { - var subStr = str.substring(pos); - var res = subStr.match(regExp); - if (res) { - res.range = []; - res.range[0] = pos; - incr(res[0].length); - res.range[1] = pos; + function lookahead() { + return str[pos]; } - return res; - } - function parseDisjunction() { - // Disjunction :: - // Alternative - // Alternative | Disjunction - var res = [], from = pos; - res.push(parseAlternative()); + function current(value) { + return str.indexOf(value, pos) === pos; + } - while (match('|')) { - res.push(parseAlternative()); + function next(value) { + return str[pos + 1] === value; } - if (res.length === 1) { - return res[0]; + function matchReg(regExp) { + var subStr = str.substring(pos); + var res = subStr.match(regExp); + if (res) { + res.range = []; + res.range[0] = pos; + incr(res[0].length); + res.range[1] = pos; + } + return res; } - return createDisjunction(res, from, pos); - } + function parseDisjunction() { + // Disjunction :: + // Alternative + // Alternative | Disjunction + var res = [], from = pos; + res.push(parseAlternative()); - function parseAlternative() { - var res = [], from = pos; - var term; + while (match('|')) { + res.push(parseAlternative()); + } - // Alternative :: - // [empty] - // Alternative Term - while (term = parseTerm()) { - res.push(term); - } + if (res.length === 1) { + return res[0]; + } - if (res.length === 1) { - return res[0]; + return createDisjunction(res, from, pos); } - return createAlternative(res, from, pos); - } + function parseAlternative() { + var res = [], from = pos; + var term; - function parseTerm() { - // Term :: - // Anchor - // Atom - // Atom Quantifier + // Alternative :: + // [empty] + // Alternative Term + while (term = parseTerm()) { + res.push(term); + } + + if (res.length === 1) { + return res[0]; + } - if (pos >= str.length || current('|') || current(')')) { - return null; /* Means: The term is empty */ + return createAlternative(res, from, pos); } - var anchor = parseAnchor(); + function parseTerm() { + // Term :: + // Anchor + // Atom + // Atom Quantifier - if (anchor) { - return anchor; - } + if (pos >= str.length || current('|') || current(')')) { + return null; /* Means: The term is empty */ + } - var atom = parseAtom(); - if (!atom) { - throw SyntaxError('Expected atom') - } - var quantifier = parseQuantifier() || false; - if (quantifier) { - quantifier.body = flattenBody(atom); - // The quantifier contains the atom. Therefore, the beginning of the - // quantifier range is given by the beginning of the atom. - updateRawStart(quantifier, atom.range[0]); - return quantifier; - } - return atom; - } + var anchor = parseAnchor(); - function parseGroup(matchA, typeA, matchB, typeB) { - var type = null, from = pos; + if (anchor) { + return anchor; + } - if (match(matchA)) { - type = typeA; - } else if (match(matchB)) { - type = typeB; - } else { - return false; + var atom = parseAtom(); + if (!atom) { + throw SyntaxError('Expected atom') + } + var quantifier = parseQuantifier() || false; + if (quantifier) { + quantifier.body = flattenBody(atom); + // The quantifier contains the atom. Therefore, the beginning of the + // quantifier range is given by the beginning of the atom. + updateRawStart(quantifier, atom.range[0]); + return quantifier; + } + return atom; } - var body = parseDisjunction(); - if (!body) { - throw SyntaxError('Expected disjunction'); - } - skip(')'); - var group = createGroup(type, flattenBody(body), from, pos); + function parseGroup(matchA, typeA, matchB, typeB) { + var type = null, from = pos; - if (type == 'normal') { - // Keep track of the number of closed groups. This is required for - // parseDecimalEscape(). In case the string is parsed a second time the - // value already holds the total count and no incrementation is required. - if (firstIteration) { - closedCaptureCounter++; + if (match(matchA)) { + type = typeA; + } else if (match(matchB)) { + type = typeB; + } else { + return false; } - } - return group; - } - function parseAnchor() { - // Anchor :: - // ^ - // $ - // \ b - // \ B - // ( ? = Disjunction ) - // ( ? ! Disjunction ) - var res, from = pos; + var body = parseDisjunction(); + if (!body) { + throw SyntaxError('Expected disjunction'); + } + skip(')'); + var group = createGroup(type, flattenBody(body), from, pos); - if (match('^')) { - return createAnchor('start', 1 /* rawLength */); - } else if (match('$')) { - return createAnchor('end', 1 /* rawLength */); - } else if (match('\\b')) { - return createAnchor('boundary', 2 /* rawLength */); - } else if (match('\\B')) { - return createAnchor('not-boundary', 2 /* rawLength */); - } else { - return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead'); + if (type == 'normal') { + // Keep track of the number of closed groups. This is required for + // parseDecimalEscape(). In case the string is parsed a second time the + // value already holds the total count and no incrementation is required. + if (firstIteration) { + closedCaptureCounter++; + } + } + return group; + } + + function parseAnchor() { + // Anchor :: + // ^ + // $ + // \ b + // \ B + // ( ? = Disjunction ) + // ( ? ! Disjunction ) + var res, from = pos; + + if (match('^')) { + return createAnchor('start', 1 /* rawLength */); + } else if (match('$')) { + return createAnchor('end', 1 /* rawLength */); + } else if (match('\\b')) { + return createAnchor('boundary', 2 /* rawLength */); + } else if (match('\\B')) { + return createAnchor('not-boundary', 2 /* rawLength */); + } else { + return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead'); + } } - } - function parseQuantifier() { - // Quantifier :: - // QuantifierPrefix - // QuantifierPrefix ? - // - // QuantifierPrefix :: - // * - // + - // ? - // { DecimalDigits } - // { DecimalDigits , } - // { DecimalDigits , DecimalDigits } + function parseQuantifier() { + // Quantifier :: + // QuantifierPrefix + // QuantifierPrefix ? + // + // QuantifierPrefix :: + // * + // + + // ? + // { DecimalDigits } + // { DecimalDigits , } + // { DecimalDigits , DecimalDigits } - var res; - var quantifier; - var min, max; + var res; + var quantifier; + var min, max; - if (match('*')) { - quantifier = createQuantifier(0); - } - else if (match('+')) { - quantifier = createQuantifier(1); - } - else if (match('?')) { - quantifier = createQuantifier(0, 1); - } - else if (res = matchReg(/^\{([0-9]+)\}/)) { - min = parseInt(res[1], 10); - quantifier = createQuantifier(min, min, res.range[0], res.range[1]); - } - else if (res = matchReg(/^\{([0-9]+),\}/)) { - min = parseInt(res[1], 10); - quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]); - } - else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) { - min = parseInt(res[1], 10); - max = parseInt(res[2], 10); - if (min > max) { - throw SyntaxError('numbers out of order in {} quantifier'); + if (match('*')) { + quantifier = createQuantifier(0); } - quantifier = createQuantifier(min, max, res.range[0], res.range[1]); - } - - if (quantifier) { - if (match('?')) { - quantifier.greedy = false; - quantifier.range[1] += 1; + else if (match('+')) { + quantifier = createQuantifier(1); + } + else if (match('?')) { + quantifier = createQuantifier(0, 1); + } + else if (res = matchReg(/^\{([0-9]+)\}/)) { + min = parseInt(res[1], 10); + quantifier = createQuantifier(min, min, res.range[0], res.range[1]); + } + else if (res = matchReg(/^\{([0-9]+),\}/)) { + min = parseInt(res[1], 10); + quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]); + } + else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) { + min = parseInt(res[1], 10); + max = parseInt(res[2], 10); + if (min > max) { + throw SyntaxError('numbers out of order in {} quantifier'); + } + quantifier = createQuantifier(min, max, res.range[0], res.range[1]); } - } - - return quantifier; - } - function parseAtom() { - // Atom :: - // PatternCharacter - // . - // \ AtomEscape - // CharacterClass - // ( Disjunction ) - // ( ? : Disjunction ) + if (quantifier) { + if (match('?')) { + quantifier.greedy = false; + quantifier.range[1] += 1; + } + } - var res; + return quantifier; + } - // jviereck: allow ']', '}' here as well to be compatible with browser's - // implementations: ']'.match(/]/); - // if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) { - if (res = matchReg(/^[^^$\\.*+?(){[|]/)) { + function parseAtom() { + // Atom :: // PatternCharacter - return createCharacter(res); - } - else if (match('.')) { // . - return createDot(); - } - else if (match('\\')) { // \ AtomEscape - res = parseAtomEscape(); - if (!res) { - throw SyntaxError('atomEscape'); - } - return res; - } - else if (res = parseCharacterClass()) { - return res; - } - else { + // CharacterClass // ( Disjunction ) // ( ? : Disjunction ) - return parseGroup('(?:', 'ignore', '(', 'normal'); - } - } - - function parseUnicodeSurrogatePairEscape(firstEscape) { - if (hasUnicodeFlag) { - var first, second; - if (firstEscape.kind == 'unicodeEscape' && - (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF && - current('\\') && next('u') ) { - var prevPos = pos; - pos++; - var secondEscape = parseClassEscape(); - if (secondEscape.kind == 'unicodeEscape' && - (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) { - // Unicode surrogate pair - firstEscape.range[1] = secondEscape.range[1]; - firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - firstEscape.type = 'value'; - firstEscape.kind = 'unicodeCodePointEscape'; - addRaw(firstEscape); + + var res; + + // jviereck: allow ']', '}' here as well to be compatible with browser's + // implementations: ']'.match(/]/); + // if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) { + if (res = matchReg(/^[^^$\\.*+?(){[|]/)) { + // PatternCharacter + return createCharacter(res); + } + else if (match('.')) { + // . + return createDot(); + } + else if (match('\\')) { + // \ AtomEscape + res = parseAtomEscape(); + if (!res) { + throw SyntaxError('atomEscape'); } - else { - pos = prevPos; + return res; + } + else if (res = parseCharacterClass()) { + return res; + } + else { + // ( Disjunction ) + // ( ? : Disjunction ) + return parseGroup('(?:', 'ignore', '(', 'normal'); + } + } + + function parseUnicodeSurrogatePairEscape(firstEscape) { + if (hasUnicodeFlag) { + var first, second; + if (firstEscape.kind == 'unicodeEscape' && + (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF && + current('\\') && next('u') ) { + var prevPos = pos; + pos++; + var secondEscape = parseClassEscape(); + if (secondEscape.kind == 'unicodeEscape' && + (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) { + // Unicode surrogate pair + firstEscape.range[1] = secondEscape.range[1]; + firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + firstEscape.type = 'value'; + firstEscape.kind = 'unicodeCodePointEscape'; + addRaw(firstEscape); + } + else { + pos = prevPos; + } } } + return firstEscape; } - return firstEscape; - } - function parseClassEscape() { - return parseAtomEscape(true); - } + function parseClassEscape() { + return parseAtomEscape(true); + } - function parseAtomEscape(insideCharacterClass) { - // AtomEscape :: - // DecimalEscape - // CharacterEscape - // CharacterClassEscape + function parseAtomEscape(insideCharacterClass) { + // AtomEscape :: + // DecimalEscape + // CharacterEscape + // CharacterClassEscape - var res; + var res; - res = parseDecimalEscape(); - if (res) { - return res; - } + res = parseDecimalEscape(); + if (res) { + return res; + } - // For ClassEscape - if (insideCharacterClass) { - if (match('b')) { - // 15.10.2.19 - // The production ClassEscape :: b evaluates by returning the - // CharSet containing the one character (Unicode value 0008). - return createEscaped('singleEscape', 0x0008, '\\b'); - } else if (match('B')) { - throw SyntaxError('\\B not possible inside of CharacterClass'); + // For ClassEscape + if (insideCharacterClass) { + if (match('b')) { + // 15.10.2.19 + // The production ClassEscape :: b evaluates by returning the + // CharSet containing the one character (Unicode value 0008). + return createEscaped('singleEscape', 0x0008, '\\b'); + } else if (match('B')) { + throw SyntaxError('\\B not possible inside of CharacterClass'); + } } - } - res = parseCharacterEscape(); + res = parseCharacterEscape(); - return res; - } + return res; + } - function parseDecimalEscape() { - // DecimalEscape :: - // DecimalIntegerLiteral [lookahead ∉ DecimalDigit] - // CharacterClassEscape :: one of d D s S w W + function parseDecimalEscape() { + // DecimalEscape :: + // DecimalIntegerLiteral [lookahead ∉ DecimalDigit] + // CharacterClassEscape :: one of d D s S w W - var res, match; + var res, match; - if (res = matchReg(/^(?!0)\d+/)) { - match = res[0]; - var refIdx = parseInt(res[0], 10); - if (refIdx <= closedCaptureCounter) { - // If the number is smaller than the normal-groups found so - // far, then it is a reference... - return createReference(res[0]); - } else { - // ... otherwise it needs to be interpreted as a octal (if the - // number is in an octal format). If it is NOT octal format, - // then the slash is ignored and the number is matched later - // as normal characters. - - // Recall the negative decision to decide if the input must be parsed - // a second time with the total normal-groups. - backrefDenied.push(refIdx); - - // Reset the position again, as maybe only parts of the previous - // matched numbers are actual octal numbers. E.g. in '019' only - // the '01' should be matched. - incr(-res[0].length); - if (res = matchReg(/^[0-7]{1,3}/)) { - return createEscaped('octal', parseInt(res[0], 8), res[0], 1); + if (res = matchReg(/^(?!0)\d+/)) { + match = res[0]; + var refIdx = parseInt(res[0], 10); + if (refIdx <= closedCaptureCounter) { + // If the number is smaller than the normal-groups found so + // far, then it is a reference... + return createReference(res[0]); + } else { + // ... otherwise it needs to be interpreted as a octal (if the + // number is in an octal format). If it is NOT octal format, + // then the slash is ignored and the number is matched later + // as normal characters. + + // Recall the negative decision to decide if the input must be parsed + // a second time with the total normal-groups. + backrefDenied.push(refIdx); + + // Reset the position again, as maybe only parts of the previous + // matched numbers are actual octal numbers. E.g. in '019' only + // the '01' should be matched. + incr(-res[0].length); + if (res = matchReg(/^[0-7]{1,3}/)) { + return createEscaped('octal', parseInt(res[0], 8), res[0], 1); + } else { + // If we end up here, we have a case like /\91/. Then the + // first slash is to be ignored and the 9 & 1 to be treated + // like ordinary characters. Create a character for the + // first number only here - other number-characters + // (if available) will be matched later. + res = createCharacter(matchReg(/^[89]/)); + return updateRawStart(res, res.range[0] - 1); + } + } + } + // Only allow octal numbers in the following. All matched numbers start + // with a zero (if the do not, the previous if-branch is executed). + // If the number is not octal format and starts with zero (e.g. `091`) + // then only the zeros `0` is treated here and the `91` are ordinary + // characters. + // Example: + // /\091/.exec('\091')[0].length === 3 + else if (res = matchReg(/^[0-7]{1,3}/)) { + match = res[0]; + if (/^0{1,3}$/.test(match)) { + // If they are all zeros, then only take the first one. + return createEscaped('null', 0x0000, '0', match.length + 1); } else { - // If we end up here, we have a case like /\91/. Then the - // first slash is to be ignored and the 9 & 1 to be treated - // like ordinary characters. Create a character for the - // first number only here - other number-characters - // (if available) will be matched later. - res = createCharacter(matchReg(/^[89]/)); - return updateRawStart(res, res.range[0] - 1); - } - } - } - // Only allow octal numbers in the following. All matched numbers start - // with a zero (if the do not, the previous if-branch is executed). - // If the number is not octal format and starts with zero (e.g. `091`) - // then only the zeros `0` is treated here and the `91` are ordinary - // characters. - // Example: - // /\091/.exec('\091')[0].length === 3 - else if (res = matchReg(/^[0-7]{1,3}/)) { - match = res[0]; - if (/^0{1,3}$/.test(match)) { - // If they are all zeros, then only take the first one. - return createEscaped('null', 0x0000, '0', match.length + 1); + return createEscaped('octal', parseInt(match, 8), match, 1); + } + } else if (res = matchReg(/^[dDsSwW]/)) { + return createCharacterClassEscape(res[0]); + } + return false; + } + + function parseCharacterEscape() { + // CharacterEscape :: + // ControlEscape + // c ControlLetter + // HexEscapeSequence + // UnicodeEscapeSequence + // IdentityEscape + + var res; + if (res = matchReg(/^[fnrtv]/)) { + // ControlEscape + var codePoint = 0; + switch (res[0]) { + case 't': codePoint = 0x009; break; + case 'n': codePoint = 0x00A; break; + case 'v': codePoint = 0x00B; break; + case 'f': codePoint = 0x00C; break; + case 'r': codePoint = 0x00D; break; + } + return createEscaped('singleEscape', codePoint, '\\' + res[0]); + } else if (res = matchReg(/^c([a-zA-Z])/)) { + // c ControlLetter + return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2); + } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) { + // HexEscapeSequence + return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2); + } else if (res = matchReg(/^u([0-9a-fA-F]{4})/)) { + // UnicodeEscapeSequence + return parseUnicodeSurrogatePairEscape( + createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2) + ); + } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) { + // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape) + return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4); } else { - return createEscaped('octal', parseInt(match, 8), match, 1); + // IdentityEscape + return parseIdentityEscape(); } - } else if (res = matchReg(/^[dDsSwW]/)) { - return createCharacterClassEscape(res[0]); } - return false; - } - function parseCharacterEscape() { - // CharacterEscape :: - // ControlEscape - // c ControlLetter - // HexEscapeSequence - // UnicodeEscapeSequence - // IdentityEscape - - var res; - if (res = matchReg(/^[fnrtv]/)) { - // ControlEscape - var codePoint = 0; - switch (res[0]) { - case 't': codePoint = 0x009; break; - case 'n': codePoint = 0x00A; break; - case 'v': codePoint = 0x00B; break; - case 'f': codePoint = 0x00C; break; - case 'r': codePoint = 0x00D; break; - } - return createEscaped('singleEscape', codePoint, '\\' + res[0]); - } else if (res = matchReg(/^c([a-zA-Z])/)) { - // c ControlLetter - return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2); - } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) { - // HexEscapeSequence - return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2); - } else if (res = matchReg(/^u([0-9a-fA-F]{4})/)) { - // UnicodeEscapeSequence - return parseUnicodeSurrogatePairEscape( - createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2) - ); - } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) { - // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape) - return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4); - } else { - // IdentityEscape - return parseIdentityEscape(); + // Taken from the Esprima parser. + function isIdentifierPart(ch) { + // Generated by `tools/generate-identifier-regex.js`. + var NonAsciiIdentifierPart = new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]'); + + return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) + (ch >= 65 && ch <= 90) || // A..Z + (ch >= 97 && ch <= 122) || // a..z + (ch >= 48 && ch <= 57) || // 0..9 + (ch === 92) || // \ (backslash) + ((ch >= 0x80) && NonAsciiIdentifierPart.test(String.fromCharCode(ch))); } - } - // Taken from the Esprima parser. - function isIdentifierPart(ch) { - // Generated by `tools/generate-identifier-regex.js`. - var NonAsciiIdentifierPart = new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]'); + function parseIdentityEscape() { + // IdentityEscape :: + // SourceCharacter but not IdentifierPart + // + // - return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) - (ch >= 65 && ch <= 90) || // A..Z - (ch >= 97 && ch <= 122) || // a..z - (ch >= 48 && ch <= 57) || // 0..9 - (ch === 92) || // \ (backslash) - ((ch >= 0x80) && NonAsciiIdentifierPart.test(String.fromCharCode(ch))); - } + var ZWJ = '\u200C'; + var ZWNJ = '\u200D'; - function parseIdentityEscape() { - // IdentityEscape :: - // SourceCharacter but not IdentifierPart - // - // + var res; + var tmp; - var ZWJ = '\u200C'; - var ZWNJ = '\u200D'; + if (!isIdentifierPart(lookahead())) { + tmp = incr(); + return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1); + } - var res; - var tmp; + if (match(ZWJ)) { + // + return createEscaped('identifier', 0x200C, ZWJ); + } else if (match(ZWNJ)) { + // + return createEscaped('identifier', 0x200D, ZWNJ); + } - if (!isIdentifierPart(lookahead())) { - tmp = incr(); - return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1); + return null; } - if (match(ZWJ)) { - // - return createEscaped('identifier', 0x200C, ZWJ); - } else if (match(ZWNJ)) { - // - return createEscaped('identifier', 0x200D, ZWNJ); - } + function parseCharacterClass() { + // CharacterClass :: + // [ [lookahead ∉ {^}] ClassRanges ] + // [ ^ ClassRanges ] - return null; - } + var res, from = pos; + if (res = matchReg(/^\[\^/)) { + res = parseClassRanges(); + skip(']'); + return createCharacterClass(res, true, from, pos); + } else if (match('[')) { + res = parseClassRanges(); + skip(']'); + return createCharacterClass(res, false, from, pos); + } + + return null; + } - function parseCharacterClass() { - // CharacterClass :: - // [ [lookahead ∉ {^}] ClassRanges ] - // [ ^ ClassRanges ] + function parseClassRanges() { + // ClassRanges :: + // [empty] + // NonemptyClassRanges - var res, from = pos; - if (res = matchReg(/^\[\^/)) { - res = parseClassRanges(); - skip(']'); - return createCharacterClass(res, true, from, pos); - } else if (match('[')) { - res = parseClassRanges(); - skip(']'); - return createCharacterClass(res, false, from, pos); + var res; + if (current(']')) { + // Empty array means nothing insinde of the ClassRange. + return []; + } else { + res = parseNonemptyClassRanges(); + if (!res) { + throw SyntaxError('nonEmptyClassRanges'); + } + return res; + } } - return null; - } + function parseHelperClassRanges(atom) { + var from, to, res; + if (current('-') && !next(']')) { + // ClassAtom - ClassAtom ClassRanges + skip('-'); - function parseClassRanges() { - // ClassRanges :: - // [empty] - // NonemptyClassRanges + res = parseClassAtom(); + if (!res) { + throw SyntaxError('classAtom'); + } + to = pos; + var classRanges = parseClassRanges(); + if (!classRanges) { + throw SyntaxError('classRanges'); + } + from = atom.range[0]; + if (classRanges.type === 'empty') { + return [createClassRange(atom, res, from, to)]; + } + return [createClassRange(atom, res, from, to)].concat(classRanges); + } - var res; - if (current(']')) { - // Empty array means nothing insinde of the ClassRange. - return []; - } else { - res = parseNonemptyClassRanges(); + res = parseNonemptyClassRangesNoDash(); if (!res) { - throw SyntaxError('nonEmptyClassRanges'); + throw SyntaxError('nonEmptyClassRangesNoDash'); } - return res; + + return [atom].concat(res); } - } - function parseHelperClassRanges(atom) { - var from, to, res; - if (current('-') && !next(']')) { - // ClassAtom - ClassAtom ClassRanges - skip('-'); + function parseNonemptyClassRanges() { + // NonemptyClassRanges :: + // ClassAtom + // ClassAtom NonemptyClassRangesNoDash + // ClassAtom - ClassAtom ClassRanges - res = parseClassAtom(); - if (!res) { + var atom = parseClassAtom(); + if (!atom) { throw SyntaxError('classAtom'); } - to = pos; - var classRanges = parseClassRanges(); - if (!classRanges) { - throw SyntaxError('classRanges'); - } - from = atom.range[0]; - if (classRanges.type === 'empty') { - return [createClassRange(atom, res, from, to)]; + + if (current(']')) { + // ClassAtom + return [atom]; } - return [createClassRange(atom, res, from, to)].concat(classRanges); - } - res = parseNonemptyClassRangesNoDash(); - if (!res) { - throw SyntaxError('nonEmptyClassRangesNoDash'); + // ClassAtom NonemptyClassRangesNoDash + // ClassAtom - ClassAtom ClassRanges + return parseHelperClassRanges(atom); } - return [atom].concat(res); - } + function parseNonemptyClassRangesNoDash() { + // NonemptyClassRangesNoDash :: + // ClassAtom + // ClassAtomNoDash NonemptyClassRangesNoDash + // ClassAtomNoDash - ClassAtom ClassRanges - function parseNonemptyClassRanges() { - // NonemptyClassRanges :: - // ClassAtom - // ClassAtom NonemptyClassRangesNoDash - // ClassAtom - ClassAtom ClassRanges + var res = parseClassAtom(); + if (!res) { + throw SyntaxError('classAtom'); + } + if (current(']')) { + // ClassAtom + return res; + } - var atom = parseClassAtom(); - if (!atom) { - throw SyntaxError('classAtom'); + // ClassAtomNoDash NonemptyClassRangesNoDash + // ClassAtomNoDash - ClassAtom ClassRanges + return parseHelperClassRanges(res); } - if (current(']')) { - // ClassAtom - return [atom]; + function parseClassAtom() { + // ClassAtom :: + // - + // ClassAtomNoDash + if (match('-')) { + return createCharacter('-'); + } else { + return parseClassAtomNoDash(); + } } - // ClassAtom NonemptyClassRangesNoDash - // ClassAtom - ClassAtom ClassRanges - return parseHelperClassRanges(atom); - } + function parseClassAtomNoDash() { + // ClassAtomNoDash :: + // SourceCharacter but not one of \ or ] or - + // \ ClassEscape - function parseNonemptyClassRangesNoDash() { - // NonemptyClassRangesNoDash :: - // ClassAtom - // ClassAtomNoDash NonemptyClassRangesNoDash - // ClassAtomNoDash - ClassAtom ClassRanges + var res; + if (res = matchReg(/^[^\\\]-]/)) { + return createCharacter(res[0]); + } else if (match('\\')) { + res = parseClassEscape(); + if (!res) { + throw SyntaxError('classEscape'); + } - var res = parseClassAtom(); - if (!res) { - throw SyntaxError('classAtom'); - } - if (current(']')) { - // ClassAtom - return res; + return parseUnicodeSurrogatePairEscape(res); + } } - // ClassAtomNoDash NonemptyClassRangesNoDash - // ClassAtomNoDash - ClassAtom ClassRanges - return parseHelperClassRanges(res); - } + var backrefDenied = []; + var closedCaptureCounter = 0; + var firstIteration = true; + var hasUnicodeFlag = (flags || "").indexOf("u") !== -1; + var pos = 0; - function parseClassAtom() { - // ClassAtom :: - // - - // ClassAtomNoDash - if (match('-')) { - return createCharacter('-'); - } else { - return parseClassAtomNoDash(); + // Convert the input to a string and treat the empty string special. + str = String(str); + if (str === '') { + str = '(?:)'; } - } - function parseClassAtomNoDash() { - // ClassAtomNoDash :: - // SourceCharacter but not one of \ or ] or - - // \ ClassEscape + var result = parseDisjunction(); - var res; - if (res = matchReg(/^[^\\\]-]/)) { - return createCharacter(res[0]); - } else if (match('\\')) { - res = parseClassEscape(); - if (!res) { - throw SyntaxError('classEscape'); - } + if (result.range[1] !== str.length) { + throw SyntaxError('Could not parse entire input - got stuck: ' + str); + } - return parseUnicodeSurrogatePairEscape(res); + // The spec requires to interpret the `\2` in `/\2()()/` as backreference. + // As the parser collects the number of capture groups as the string is + // parsed it is impossible to make these decisions at the point the `\2` is + // handled. In case the local decision turns out to be wrongq after the + // parsing has finished, the input string is parsed a second time with the + // total count of capture groups set. + // + // SEE: https://github.com/jviereck/regjsparser/issues/70 + for (var i = 0; i < backrefDenied.length; i++) { + if (backrefDenied[i] <= closedCaptureCounter) { + // Parse the input a second time. + pos = 0; + firstIteration = false; + return parseDisjunction(); + } } - } - var backrefDenied = []; - var closedCaptureCounter = 0; - var firstIteration = true; - var hasUnicodeFlag = (flags || "").indexOf("u") !== -1; - var pos = 0; + return result; + }; - // Convert the input to a string and treat the empty string special. - str = String(str); - if (str === '') { - str = '(?:)'; + var regjsparser = { + parse: parse + }; + + if (typeof module !== 'undefined' && module.exports) { + module.exports = regjsparser; + } else { + window.regjsparser = regjsparser; } - var result = parseDisjunction(); + }()); - if (result.range[1] !== str.length) { - throw SyntaxError('Could not parse entire input - got stuck: ' + str); - } +},{}],488:[function(require,module,exports){ + var generate = require('regjsgen').generate; + var parse = require('regjsparser').parse; + var regenerate = require('regenerate'); + var iuMappings = require('./data/iu-mappings.json'); + var ESCAPE_SETS = require('./data/character-class-escape-sets.js'); - // The spec requires to interpret the `\2` in `/\2()()/` as backreference. - // As the parser collects the number of capture groups as the string is - // parsed it is impossible to make these decisions at the point the `\2` is - // handled. In case the local decision turns out to be wrongq after the - // parsing has finished, the input string is parsed a second time with the - // total count of capture groups set. - // - // SEE: https://github.com/jviereck/regjsparser/issues/70 - for (var i = 0; i < backrefDenied.length; i++) { - if (backrefDenied[i] <= closedCaptureCounter) { - // Parse the input a second time. - pos = 0; - firstIteration = false; - return parseDisjunction(); + function getCharacterClassEscapeSet(character) { + if (unicode) { + if (ignoreCase) { + return ESCAPE_SETS.UNICODE_IGNORE_CASE[character]; } + return ESCAPE_SETS.UNICODE[character]; } + return ESCAPE_SETS.REGULAR[character]; + } - return result; - }; - - var regjsparser = { - parse: parse - }; - - if (typeof module !== 'undefined' && module.exports) { - module.exports = regjsparser; - } else { - window.regjsparser = regjsparser; - } - -}()); - -},{}],436:[function(require,module,exports){ -var generate = require('regjsgen').generate; -var parse = require('regjsparser').parse; -var regenerate = require('regenerate'); -var iuMappings = require('./data/iu-mappings.json'); -var ESCAPE_SETS = require('./data/character-class-escape-sets.js'); - -function getCharacterClassEscapeSet(character) { - if (unicode) { - if (ignoreCase) { - return ESCAPE_SETS.UNICODE_IGNORE_CASE[character]; - } - return ESCAPE_SETS.UNICODE[character]; - } - return ESCAPE_SETS.REGULAR[character]; -} - -var object = {}; -var hasOwnProperty = object.hasOwnProperty; -function has(object, property) { - return hasOwnProperty.call(object, property); -} + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + function has(object, property) { + return hasOwnProperty.call(object, property); + } // Prepare a Regenerate set containing all code points, used for negative // character classes (if any). -var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF); + var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF); // Without the `u` flag, the range stops at 0xFFFF. // https://mths.be/es6#sec-pattern-semantics -var BMP_SET = regenerate().addRange(0x0, 0xFFFF); + var BMP_SET = regenerate().addRange(0x0, 0xFFFF); // Prepare a Regenerate set containing all code points that are supposed to be // matched by `/./u`. https://mths.be/es6#sec-atom -var DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points - .remove( - // minus `LineTerminator`s (https://mths.be/es6#sec-line-terminators): - 0x000A, // Line Feed - 0x000D, // Carriage Return - 0x2028, // Line Separator - 0x2029 // Paragraph Separator - ); + var DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points + .remove( + // minus `LineTerminator`s (https://mths.be/es6#sec-line-terminators): + 0x000A, // Line Feed + 0x000D, // Carriage Return + 0x2028, // Line Separator + 0x2029 // Paragraph Separator + ); // Prepare a Regenerate set containing all code points that are supposed to be // matched by `/./` (only BMP code points). -var DOT_SET = DOT_SET_UNICODE.clone() - .intersection(BMP_SET); + var DOT_SET = DOT_SET_UNICODE.clone() + .intersection(BMP_SET); // Add a range of code points + any case-folded code points in that range to a // set. -regenerate.prototype.iuAddRange = function(min, max) { - var $this = this; - do { - var folded = caseFold(min); - if (folded) { - $this.add(folded); - } - } while (++min <= max); - return $this; -}; - -function assign(target, source) { - for (var key in source) { - // Note: `hasOwnProperty` is not needed here. - target[key] = source[key]; - } -} - -function update(item, pattern) { - // TODO: Test if memoizing `pattern` here is worth the effort. - if (!pattern) { - return; - } - var tree = parse(pattern, ''); - switch (tree.type) { - case 'characterClass': - case 'group': - case 'value': - // No wrapping needed. - break; - default: - // Wrap the pattern in a non-capturing group. - tree = wrap(tree, pattern); - } - assign(item, tree); -} - -function wrap(tree, pattern) { - // Wrap the pattern in a non-capturing group. - return { - 'type': 'group', - 'behavior': 'ignore', - 'body': [tree], - 'raw': '(?:' + pattern + ')' - }; -} - -function caseFold(codePoint) { - return has(iuMappings, codePoint) ? iuMappings[codePoint] : false; -} - -var ignoreCase = false; -var unicode = false; -function processCharacterClass(characterClassItem) { - var set = regenerate(); - var body = characterClassItem.body.forEach(function(item) { - switch (item.type) { - case 'value': - set.add(item.codePoint); - if (ignoreCase && unicode) { - var folded = caseFold(item.codePoint); - if (folded) { - set.add(folded); - } - } - break; - case 'characterClassRange': - var min = item.min.codePoint; - var max = item.max.codePoint; - set.addRange(min, max); - if (ignoreCase && unicode) { - set.iuAddRange(min, max); - } - break; - case 'characterClassEscape': - set.add(getCharacterClassEscapeSet(item.value)); - break; - // The `default` clause is only here as a safeguard; it should never be - // reached. Code coverage tools should ignore it. - /* istanbul ignore next */ - default: - throw Error('Unknown term type: ' + item.type); - } - }); - if (characterClassItem.negative) { - set = (unicode ? UNICODE_SET : BMP_SET).clone().remove(set); - } - update(characterClassItem, set.toString()); - return characterClassItem; -} - -function processTerm(item) { - switch (item.type) { - case 'dot': - update( - item, - (unicode ? DOT_SET_UNICODE : DOT_SET).toString() - ); - break; - case 'characterClass': - item = processCharacterClass(item); - break; - case 'characterClassEscape': - update( - item, - getCharacterClassEscapeSet(item.value).toString() - ); - break; - case 'alternative': - case 'disjunction': - case 'group': - case 'quantifier': - item.body = item.body.map(processTerm); - break; - case 'value': - var codePoint = item.codePoint; - var set = regenerate(codePoint); - if (ignoreCase && unicode) { - var folded = caseFold(codePoint); - if (folded) { - set.add(folded); - } - } - update(item, set.toString()); - break; - case 'anchor': - case 'empty': - case 'group': - case 'reference': - // Nothing to do here. - break; - // The `default` clause is only here as a safeguard; it should never be - // reached. Code coverage tools should ignore it. - /* istanbul ignore next */ - default: - throw Error('Unknown term type: ' + item.type); - } - return item; -}; - -module.exports = function(pattern, flags) { - var tree = parse(pattern, flags); - ignoreCase = flags ? flags.indexOf('i') > -1 : false; - unicode = flags ? flags.indexOf('u') > -1 : false; - assign(tree, processTerm(tree)); - return generate(tree); -}; - -},{"./data/character-class-escape-sets.js":431,"./data/iu-mappings.json":432,"regenerate":433,"regjsgen":434,"regjsparser":435}],437:[function(require,module,exports){ -'use strict'; -var isFinite = require('is-finite'); - -module.exports = function (str, n) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string as the first argument'); - } - - if (n < 0 || !isFinite(n)) { - throw new TypeError('Expected a finite positive number'); - } - - var ret = ''; - - do { - if (n & 1) { - ret += str; - } - - str += str; - } while (n = n >> 1); - - return ret; -}; - -},{"is-finite":438}],438:[function(require,module,exports){ -arguments[4][304][0].apply(exports,arguments) -},{"dup":304}],439:[function(require,module,exports){ -'use strict'; -module.exports = /^#!.*/; - -},{}],440:[function(require,module,exports){ -'use strict'; -module.exports = function (str) { - var isExtendedLengthPath = /^\\\\\?\\/.test(str); - var hasNonAscii = /[^\x00-\x80]+/.test(str); - - if (isExtendedLengthPath || hasNonAscii) { - return str; - } - - return str.replace(/\\/g, '/'); -}; + regenerate.prototype.iuAddRange = function(min, max) { + var $this = this; + do { + var folded = caseFold(min); + if (folded) { + $this.add(folded); + } + } while (++min <= max); + return $this; + }; -},{}],441:[function(require,module,exports){ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./source-map/source-node').SourceNode; - -},{"./source-map/source-map-consumer":447,"./source-map/source-map-generator":448,"./source-map/source-node":449}],442:[function(require,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { + function assign(target, source) { + for (var key in source) { + // Note: `hasOwnProperty` is not needed here. + target[key] = source[key]; + } + } - var util = require('./util'); + function update(item, pattern) { + // TODO: Test if memoizing `pattern` here is worth the effort. + if (!pattern) { + return; + } + var tree = parse(pattern, ''); + switch (tree.type) { + case 'characterClass': + case 'group': + case 'value': + // No wrapping needed. + break; + default: + // Wrap the pattern in a non-capturing group. + tree = wrap(tree, pattern); + } + assign(item, tree); + } - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = {}; + function wrap(tree, pattern) { + // Wrap the pattern in a non-capturing group. + return { + 'type': 'group', + 'behavior': 'ignore', + 'body': [tree], + 'raw': '(?:' + pattern + ')' + }; } - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; + function caseFold(codePoint) { + return has(iuMappings, codePoint) ? iuMappings[codePoint] : false; + } - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var isDuplicate = this.has(aStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); + var ignoreCase = false; + var unicode = false; + function processCharacterClass(characterClassItem) { + var set = regenerate(); + var body = characterClassItem.body.forEach(function(item) { + switch (item.type) { + case 'value': + set.add(item.codePoint); + if (ignoreCase && unicode) { + var folded = caseFold(item.codePoint); + if (folded) { + set.add(folded); + } + } + break; + case 'characterClassRange': + var min = item.min.codePoint; + var max = item.max.codePoint; + set.addRange(min, max); + if (ignoreCase && unicode) { + set.iuAddRange(min, max); + } + break; + case 'characterClassEscape': + set.add(getCharacterClassEscapeSet(item.value)); + break; + // The `default` clause is only here as a safeguard; it should never be + // reached. Code coverage tools should ignore it. + /* istanbul ignore next */ + default: + throw Error('Unknown term type: ' + item.type); + } + }); + if (characterClassItem.negative) { + set = (unicode ? UNICODE_SET : BMP_SET).clone().remove(set); } - if (!isDuplicate) { - this._set[util.toSetString(aStr)] = idx; + update(characterClassItem, set.toString()); + return characterClassItem; + } + + function processTerm(item) { + switch (item.type) { + case 'dot': + update( + item, + (unicode ? DOT_SET_UNICODE : DOT_SET).toString() + ); + break; + case 'characterClass': + item = processCharacterClass(item); + break; + case 'characterClassEscape': + update( + item, + getCharacterClassEscapeSet(item.value).toString() + ); + break; + case 'alternative': + case 'disjunction': + case 'group': + case 'quantifier': + item.body = item.body.map(processTerm); + break; + case 'value': + var codePoint = item.codePoint; + var set = regenerate(codePoint); + if (ignoreCase && unicode) { + var folded = caseFold(codePoint); + if (folded) { + set.add(folded); + } + } + update(item, set.toString()); + break; + case 'anchor': + case 'empty': + case 'group': + case 'reference': + // Nothing to do here. + break; + // The `default` clause is only here as a safeguard; it should never be + // reached. Code coverage tools should ignore it. + /* istanbul ignore next */ + default: + throw Error('Unknown term type: ' + item.type); } + return item; }; - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - return Object.prototype.hasOwnProperty.call(this._set, - util.toSetString(aStr)); + module.exports = function(pattern, flags) { + var tree = parse(pattern, flags); + ignoreCase = flags ? flags.indexOf('i') > -1 : false; + unicode = flags ? flags.indexOf('u') > -1 : false; + assign(tree, processTerm(tree)); + return generate(tree); }; - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (this.has(aStr)) { - return this._set[util.toSetString(aStr)]; +},{"./data/character-class-escape-sets.js":483,"./data/iu-mappings.json":484,"regenerate":485,"regjsgen":486,"regjsparser":487}],489:[function(require,module,exports){ + 'use strict'; + var isFinite = require('is-finite'); + + module.exports = function (str, n) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string as the first argument'); + } + + if (n < 0 || !isFinite(n)) { + throw new TypeError('Expected a finite positive number'); } - throw new Error('"' + aStr + '" is not in the set.'); + + var ret = ''; + + do { + if (n & 1) { + ret += str; + } + + str += str; + } while (n = n >> 1); + + return ret; }; - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; +},{"is-finite":490}],490:[function(require,module,exports){ + arguments[4][331][0].apply(exports,arguments) +},{"dup":331}],491:[function(require,module,exports){ + 'use strict'; + module.exports = /^#!.*/; + +},{}],492:[function(require,module,exports){ + 'use strict'; + module.exports = function (str) { + var isExtendedLengthPath = /^\\\\\?\\/.test(str); + var hasNonAscii = /[^\x00-\x80]+/.test(str); + + if (isExtendedLengthPath || hasNonAscii) { + return str; } - throw new Error('No element indexed by ' + aIdx); + + return str.replace(/\\/g, '/'); }; - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. +},{}],493:[function(require,module,exports){ + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; + exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; + exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; + exports.SourceNode = require('./source-map/source-node').SourceNode; + +},{"./source-map/source-map-consumer":499,"./source-map/source-map-generator":500,"./source-map/source-node":501}],494:[function(require,module,exports){ + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + if (typeof define !== 'function') { + var define = require('amdefine')(module, require); + } + define(function (require, exports, module) { - exports.ArraySet = ArraySet; + var util = require('./util'); -}); + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = {}; + } -},{"./util":450,"amdefine":451}],443:[function(require,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS 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. - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; - var base64 = require('./base64'); + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var isDuplicate = this.has(aStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[util.toSetString(aStr)] = idx; + } + }; - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + return Object.prototype.hasOwnProperty.call(this._set, + util.toSetString(aStr)); + }; - var VLQ_BASE_SHIFT = 5; + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (this.has(aStr)) { + return this._set[util.toSetString(aStr)]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; + exports.ArraySet = ArraySet; - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } + }); - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 +},{"./util":502,"amdefine":503}],495:[function(require,module,exports){ + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. 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. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 THE COPYRIGHT + * OWNER OR CONTRIBUTORS 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 fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; + if (typeof define !== 'function') { + var define = require('amdefine')(module, require); } + define(function (require, exports, module) { - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; + var base64 = require('./base64'); - var vlq = toVLQSigned(aValue); + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); + var VLQ_BASE_SHIFT = 5; - return encoded; - }; + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - digit = base64.decode(aStr.charAt(aIndex++)); - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charAt(aIndex++)); + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; -}); + }); -},{"./base64":444,"amdefine":451}],444:[function(require,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { +},{"./base64":496,"amdefine":503}],496:[function(require,module,exports){ + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + if (typeof define !== 'function') { var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { + } + define(function (require, exports, module) { - var charToIntMap = {}; - var intToCharMap = {}; + var charToIntMap = {}; + var intToCharMap = {}; - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' - .split('') - .forEach(function (ch, index) { - charToIntMap[ch] = index; - intToCharMap[index] = ch; - }); + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + .split('') + .forEach(function (ch, index) { + charToIntMap[ch] = index; + intToCharMap[index] = ch; + }); - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function base64_encode(aNumber) { - if (aNumber in intToCharMap) { - return intToCharMap[aNumber]; - } - throw new TypeError("Must be between 0 and 63: " + aNumber); - }; + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function base64_encode(aNumber) { + if (aNumber in intToCharMap) { + return intToCharMap[aNumber]; + } + throw new TypeError("Must be between 0 and 63: " + aNumber); + }; - /** - * Decode a single base 64 digit to an integer. - */ - exports.decode = function base64_decode(aChar) { - if (aChar in charToIntMap) { - return charToIntMap[aChar]; - } - throw new TypeError("Not a valid base 64 digit: " + aChar); - }; + /** + * Decode a single base 64 digit to an integer. + */ + exports.decode = function base64_decode(aChar) { + if (aChar in charToIntMap) { + return charToIntMap[aChar]; + } + throw new TypeError("Not a valid base 64 digit: " + aChar); + }; -}); + }); -},{"amdefine":451}],445:[function(require,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { +},{"amdefine":503}],497:[function(require,module,exports){ + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + if (typeof define !== 'function') { var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { + } + define(function (require, exports, module) { - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. return mid; } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } } - --index; } - return index; - }; + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } -}); + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } -},{"amdefine":451}],446:[function(require,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } - var util = require('./util'); + return index; + }; - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositions(mappingA, mappingB) <= 0; - } + }); - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. +},{"amdefine":503}],498:[function(require,module,exports){ + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; + if (typeof define !== 'function') { + var define = require('amdefine')(module, require); } + define(function (require, exports, module) { - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; + var util = require('./util'); - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - var mapping; - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositions(mappingA, mappingB) <= 0; } - }; - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositions); + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; } - return this._array; - }; - exports.MappingList = MappingList; - -}); + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; -},{"./util":450,"amdefine":451}],447:[function(require,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + var mapping; + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; - var util = require('./util'); - var binarySearch = require('./binary-search'); - var ArraySet = require('./array-set').ArraySet; - var base64VLQ = require('./base64-vlq'); + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositions); + this._sorted = true; + } + return this._array; + }; - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } + exports.MappingList = MappingList; - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } + }); - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); +},{"./util":502,"amdefine":503}],499:[function(require,module,exports){ + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + if (typeof define !== 'function') { + var define = require('amdefine')(module, require); } + define(function (require, exports, module) { - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this.__generatedMappings = []; - this.__originalMappings = []; - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); + var util = require('./util'); + var binarySearch = require('./binary-search'); + var ArraySet = require('./array-set').ArraySet; + var base64VLQ = require('./base64-vlq'); - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this.__generatedMappings = []; - this.__originalMappings = []; - this._parseMappings(this._mappings, this.sourceRoot); + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); } - return this.__originalMappings; + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); } - }); - SourceMapConsumer.prototype._nextCharIsMappingSeparator = - function SourceMapConsumer_nextCharIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); + return this.__generatedMappings; } + }); - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source; - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._nextCharIsMappingSeparator = + function SourceMapConsumer_nextCharIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; }; - }).forEach(aCallback, context); - }; - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a single line. Otherwise, returns all mappings - * corresponding to a single line and column. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column', 0) - }; + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - var originalLine = mapping.originalLine; - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line. Since mappings are sorted, this is - // guaranteed to find all mappings for the line we are searching for. - while (mapping && mapping.originalLine === originalLine && - (aArgs.column === undefined || - mapping.originalColumn === originalColumn)) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; - mapping = this._originalMappings[++index]; - } - } + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; - return mappings; - }; + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } - exports.SourceMapConsumer = SourceMapConsumer; + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source; + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name + }; + }).forEach(aCallback, context); + }; - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a single line. Otherwise, returns all mappings + * corresponding to a single line and column. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + var originalLine = mapping.originalLine; + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line. Since mappings are sorted, this is + // guaranteed to find all mappings for the line we are searching for. + while (mapping && mapping.originalLine === originalLine && + (aArgs.column === undefined || + mapping.originalColumn === originalColumn)) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { * version : 3, * file: "out.js", * sourceRoot : "", @@ -47605,446 +61731,446 @@ define(function (require, exports, module) { * names: ["src", "maps", "are", "fun"], * mappings: "AA,AB;;ABCDE;" * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - sources = sources.map(util.normalize); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names, true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } - smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + sources = sources.map(util.normalize); - smc.__generatedMappings = aSourceMap._mappings.toArray().slice(); - smc.__originalMappings = aSourceMap._mappings.toArray().slice() - .sort(util.compareByOriginalPositions); + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names, true); + this._sources = ArraySet.fromArray(sources, true); - return smc; - }; + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + smc.__generatedMappings = aSourceMap._mappings.toArray().slice(); + smc.__originalMappings = aSourceMap._mappings.toArray().slice() + .sort(util.compareByOriginalPositions); + + return smc; + }; - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedValues = {}; - var temp = {}; - var mapping, str, values, end, value; + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - ++index; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - ++index; - } - else { - mapping = {}; - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; ++end) { - if (this._nextCharIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); - values = cachedValues[str]; - if (values) { - index += str.length; - } else { - values = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - values.push(value); + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedValues = {}; + var temp = {}; + var mapping, str, values, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + ++index; + previousGeneratedColumn = 0; } - cachedValues[str] = values; - } + else if (aStr.charAt(index) === ',') { + ++index; + } + else { + mapping = {}; + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; ++end) { + if (this._nextCharIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + values[0]; - previousGeneratedColumn = mapping.generatedColumn; + values = cachedValues[str]; + if (values) { + index += str.length; + } else { + values = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + values.push(value); + } + cachedValues[str] = values; + } - if (values.length > 1) { - // Original source. - mapping.source = this._sources.at(previousSource + values[1]); - previousSource += values[1]; - if (values.length === 2) { - throw new Error('Found a source, but no line and column'); - } + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + values[0]; + previousGeneratedColumn = mapping.generatedColumn; - // Original line. - mapping.originalLine = previousOriginalLine + values[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - if (values.length === 3) { - throw new Error('Found a source and line, but no column'); - } + if (values.length > 1) { + // Original source. + mapping.source = this._sources.at(previousSource + values[1]); + previousSource += values[1]; + if (values.length === 2) { + throw new Error('Found a source, but no line and column'); + } - // Original column. - mapping.originalColumn = previousOriginalColumn + values[3]; - previousOriginalColumn = mapping.originalColumn; + // Original line. + mapping.originalLine = previousOriginalLine + values[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + if (values.length === 3) { + throw new Error('Found a source and line, but no column'); + } - if (values.length > 4) { - // Original name. - mapping.name = this._names.at(previousName + values[4]); - previousName += values[4]; - } - } + // Original column. + mapping.originalColumn = previousOriginalColumn + values[3]; + previousOriginalColumn = mapping.originalColumn; + + if (values.length > 4) { + // Original name. + mapping.name = this._names.at(previousName + values[4]); + previousName += values[4]; + } + } - this.__generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - this.__originalMappings.push(mapping); + this.__generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + this.__originalMappings.push(mapping); + } + } } - } - } - this.__generatedMappings.sort(util.compareByGeneratedPositions); - this.__originalMappings.sort(util.compareByOriginalPositions); - }; + this.__generatedMappings.sort(util.compareByGeneratedPositions); + this.__originalMappings.sort(util.compareByOriginalPositions); + }; - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; + }; - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); - if (index >= 0) { - var mapping = this._generatedMappings[index]; + if (index >= 0) { + var mapping = this._generatedMappings[index]; - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source != null && this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source != null && this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: util.getArg(mapping, 'name', null) + }; + } } + return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: util.getArg(mapping, 'name', null) + source: null, + line: null, + column: null, + name: null }; - } - } + }; - return { - source: null, - line: null, - column: null, - name: null - }; - }; + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * availible. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * availible. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); + if (index >= 0) { + var mapping = this._originalMappings[index]; - if (index >= 0) { - var mapping = this._originalMappings[index]; + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } - if (mapping.source === needle.source) { return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + line: null, + column: null, + lastColumn: null }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; + }; - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { * version : 3, * file: "app.js", * sections: [{ @@ -48058,1043 +62184,1006 @@ define(function (require, exports, module) { * } * }], * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) + if (version != this._version) { + throw new Error('Unsupported version: ' + version); } - }); - } - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) } - }; - return sources; + }); } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; - if (!section) { - return { - source: null, - line: null, - column: null, - name: null + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } }; + return sources; } + }); - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; - return { - line: null, - column: null - }; - }; + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[i]; - - var source = mapping.source; - var sourceRoot = section.consumer.sourceRoot; - - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.column + - (section.generatedOffset.generatedLine === mapping.generatedLine) - ? section.generatedOffset.generatedColumn - 1 - : 0, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name + return { + line: null, + column: null }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } }; - }; - this.__generatedMappings.sort(util.compareByGeneratedPositions); - this.__originalMappings.sort(util.compareByOriginalPositions); - }; + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[i]; + + var source = mapping.source; + var sourceRoot = section.consumer.sourceRoot; + + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.column + + (section.generatedOffset.generatedLine === mapping.generatedLine) + ? section.generatedOffset.generatedColumn - 1 + : 0, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + }; + }; -}); + this.__generatedMappings.sort(util.compareByGeneratedPositions); + this.__originalMappings.sort(util.compareByOriginalPositions); + }; -},{"./array-set":442,"./base64-vlq":443,"./binary-search":445,"./util":450,"amdefine":451}],448:[function(require,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - var base64VLQ = require('./base64-vlq'); - var util = require('./util'); - var ArraySet = require('./array-set').ArraySet; - var MappingList = require('./mapping-list').MappingList; + }); - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. +},{"./array-set":494,"./base64-vlq":495,"./binary-search":497,"./util":502,"amdefine":503}],500:[function(require,module,exports){ + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; + if (typeof define !== 'function') { + var define = require('amdefine')(module, require); } + define(function (require, exports, module) { - SourceMapGenerator.prototype._version = 3; + var base64VLQ = require('./base64-vlq'); + var util = require('./util'); + var ArraySet = require('./array-set').ArraySet; + var MappingList = require('./mapping-list').MappingList; - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } + SourceMapGenerator.prototype._version = 3; - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; - if (source != null && !this._sources.has(source)) { - this._sources.add(source); - } + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } - if (name != null && !this._names.has(name)) { - this._names.add(name); - } + if (source != null && !this._sources.has(source)) { + this._sources.add(source); + } - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; + if (name != null && !this._names.has(name)) { + this._names.add(name); + } - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = {}; - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = {}; } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; } } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; + }; - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. if (sourceRoot != null) { sourceFile = util.relative(sourceRoot, sourceFile); } - this.setSourceContent(sourceFile, content); - } - }, this); - }; + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var mapping; + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } - var mappings = this._mappings.toArray(); + }, this); + this._sources = newSources; + this._names = newNames; - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - result += ';'; - previousGeneratedLine++; + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositions(mapping, mappings[i - 1])) { - continue; - } - result += ','; + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; } - } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var mapping; + + var mappings = this._mappings.toArray(); + + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + result += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositions(mapping, mappings[i - 1])) { + continue; + } + result += ','; + } + } - result += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; + result += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; - if (mapping.source != null) { - result += base64VLQ.encode(this._sources.indexOf(mapping.source) - - previousSource); - previousSource = this._sources.indexOf(mapping.source); + if (mapping.source != null) { + result += base64VLQ.encode(this._sources.indexOf(mapping.source) + - previousSource); + previousSource = this._sources.indexOf(mapping.source); - // lines are stored 0-based in SourceMap spec version 3 - result += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; + // lines are stored 0-based in SourceMap spec version 3 + result += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; - result += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; + result += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; - if (mapping.name != null) { - result += base64VLQ.encode(this._names.indexOf(mapping.name) - - previousName); - previousName = this._names.indexOf(mapping.name); + if (mapping.name != null) { + result += base64VLQ.encode(this._names.indexOf(mapping.name) + - previousName); + previousName = this._names.indexOf(mapping.name); + } + } } - } - } - return result; - }; + return result; + }; - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, - key) - ? this._sourcesContents[key] - : null; - }, this); - }; + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, + key) + ? this._sourcesContents[key] + : null; + }, this); + }; - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } - return map; - }; + return map; + }; - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; - exports.SourceMapGenerator = SourceMapGenerator; + exports.SourceMapGenerator = SourceMapGenerator; -}); + }); -},{"./array-set":442,"./base64-vlq":443,"./mapping-list":446,"./util":450,"amdefine":451}],449:[function(require,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { +},{"./array-set":494,"./base64-vlq":495,"./mapping-list":498,"./util":502,"amdefine":503}],501:[function(require,module,exports){ + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + if (typeof define !== 'function') { var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { + } + define(function (require, exports, module) { - var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; - var util = require('./util'); + var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; + var util = require('./util'); - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are removed from this array, by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var shiftNextLine = function() { - var lineContents = remainingLines.shift(); - // The last line of a file might not have a newline. - var newLine = remainingLines.shift() || ""; - return lineContents + newLine; - }; + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - var code = ""; - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[0]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[0] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + var code = ""; + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } lastMapping = mapping; - return; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[0]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[0] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLines.length > 0) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.join("")); - } - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); - return node; + return node; - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); } } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; + return this; + }; - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); } else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); } - } - }; + return this; + }; - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; }; - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); } + newChildren.push(this.children[i]); + this.children = newChildren; } + return this; + }; - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); } + return this; }; - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { map.addMapping({ source: original.source, original: { @@ -49108,738 +63197,851 @@ define(function (require, exports, module) { name: original.name }); } - } else { - generated.column++; + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); - return { code: generated.code, map: map }; - }; + return { code: generated.code, map: map }; + }; - exports.SourceNode = SourceNode; + exports.SourceNode = SourceNode; -}); + }); -},{"./source-map-generator":448,"./util":450,"amdefine":451}],450:[function(require,module,exports){ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { +},{"./source-map-generator":500,"./util":502,"amdefine":503}],502:[function(require,module,exports){ + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + if (typeof define !== 'function') { var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { + } + define(function (require, exports, module) { - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } } - } - exports.getArg = getArg; + exports.getArg = getArg; - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; + exports.urlParse = urlParse; - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; } - if (aParsedUrl.path) { - url += aParsedUrl.path; + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consequtive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = (path.charAt(0) === '/'); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; } - return url; - } - exports.urlGenerate = urlGenerate; + exports.normalize = normalize; - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consequtive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; } - path = url.path; - } - var isAbsolute = (path.charAt(0) === '/'); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; } + return urlGenerate(aPathUrl); } - } - path = parts.join('/'); - if (path === '') { - path = isAbsolute ? '/' : '.'; - } + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; + aRootUrl.path = joined; + return urlGenerate(aRootUrl); } - return urlGenerate(aPathUrl); + return joined; } + exports.join = join; - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } + aRoot = aRoot.replace(/\/$/, ''); - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + // XXX: It is possible to remove this block, and the tests still pass! + var url = urlParse(aRoot); + if (aPath.charAt(0) == "/" && url && url.path == "/") { + return aPath.slice(1); + } - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); + return aPath.indexOf(aRoot + '/') === 0 + ? aPath.substr(aRoot.length + 1) + : aPath; } - return joined; - } - exports.join = join; + exports.relative = relative; - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + return '$' + aStr; } + exports.toSetString = toSetString; - aRoot = aRoot.replace(/\/$/, ''); - - // XXX: It is possible to remove this block, and the tests still pass! - var url = urlParse(aRoot); - if (aPath.charAt(0) == "/" && url && url.path == "/") { - return aPath.slice(1); + function fromSetString(aStr) { + return aStr.substr(1); } + exports.fromSetString = fromSetString; - return aPath.indexOf(aRoot + '/') === 0 - ? aPath.substr(aRoot.length + 1) - : aPath; - } - exports.relative = relative; - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - return '$' + aStr; - } - exports.toSetString = toSetString; - - function fromSetString(aStr) { - return aStr.substr(1); - } - exports.fromSetString = fromSetString; + function strcmp(aStr1, aStr2) { + var s1 = aStr1 || ""; + var s2 = aStr2 || ""; + return (s1 > s2) - (s1 < s2); + } - function strcmp(aStr1, aStr2) { - var s1 = aStr1 || ""; - var s2 = aStr2 || ""; - return (s1 > s2) - (s1 < s2); - } + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp; - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp; + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp || onlyCompareOriginal) { + return cmp; + } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp || onlyCompareOriginal) { - return cmp; - } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp) { + return cmp; + } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp) { - return cmp; - } + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } + return strcmp(mappingA.name, mappingB.name); + }; + exports.compareByOriginalPositions = compareByOriginalPositions; - return strcmp(mappingA.name, mappingB.name); - }; - exports.compareByOriginalPositions = compareByOriginalPositions; + /** + * Comparator between two mappings where the generated positions are + * compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { + var cmp; - /** - * Comparator between two mappings where the generated positions are - * compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { - var cmp; + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp || onlyCompareGenerated) { + return cmp; + } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp || onlyCompareGenerated) { - return cmp; - } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp) { + return cmp; + } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp) { - return cmp; - } + return strcmp(mappingA.name, mappingB.name); + }; + exports.compareByGeneratedPositions = compareByGeneratedPositions; - return strcmp(mappingA.name, mappingB.name); - }; - exports.compareByGeneratedPositions = compareByGeneratedPositions; + }); -}); +},{"amdefine":503}],503:[function(require,module,exports){ + (function (process,__filename){ + /** vim: et:ts=4:sw=4:sts=4 + * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/amdefine for details + */ -},{"amdefine":451}],451:[function(require,module,exports){ -(function (process,__filename){ -/** vim: et:ts=4:sw=4:sts=4 - * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/amdefine for details - */ - -/*jslint node: true */ -/*global module, process */ -'use strict'; - -/** - * Creates a define for node. - * @param {Object} module the "module" object that is defined by Node for the - * current module. - * @param {Function} [requireFn]. Node's require function for the current module. - * It only needs to be passed in Node versions before 0.5, when module.require - * did not exist. - * @returns {Function} a define function that is usable for the current node - * module. - */ -function amdefine(module, requireFn) { + /*jslint node: true */ + /*global module, process */ 'use strict'; - var defineCache = {}, - loaderCache = {}, - alreadyCalled = false, - path = require('path'), - makeRequire, stringRequire; /** - * Trims the . and .. from an array of path segments. - * It will keep a leading path segment if a .. will become - * the first path segment, to help with module name lookups, - * which act like paths, but can be remapped. But the end result, - * all paths that use this function should look normalized. - * NOTE: this method MODIFIES the input array. - * @param {Array} ary the array of path segments. + * Creates a define for node. + * @param {Object} module the "module" object that is defined by Node for the + * current module. + * @param {Function} [requireFn]. Node's require function for the current module. + * It only needs to be passed in Node versions before 0.5, when module.require + * did not exist. + * @returns {Function} a define function that is usable for the current node + * module. */ - function trimDots(ary) { + function amdefine(module, requireFn) { + 'use strict'; + var defineCache = {}, + loaderCache = {}, + alreadyCalled = false, + path = require('path'), + makeRequire, stringRequire; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { var i, part; for (i = 0; ary[i]; i+= 1) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { - //End of the line. Keep at least one non-dot - //path segment at the front so it can be mapped - //correctly to disk. Otherwise, there is likely - //no path mapping for a path starting with '..'. - //This can still fail, but catches the most reasonable - //uses of .. - break; - } else if (i > 0) { - ary.splice(i - 1, 2); - i -= 2; - } + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { + //End of the line. Keep at least one non-dot + //path segment at the front so it can be mapped + //correctly to disk. Otherwise, there is likely + //no path mapping for a path starting with '..'. + //This can still fail, but catches the most reasonable + //uses of .. + break; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; } + } } - } + } - function normalize(name, baseName) { + function normalize(name, baseName) { var baseParts; //Adjust any relative paths. if (name && name.charAt(0) === '.') { - //If have a base name, try to normalize against it, - //otherwise, assume it is a top-level require that will - //be relative to baseUrl in the end. - if (baseName) { - baseParts = baseName.split('/'); - baseParts = baseParts.slice(0, baseParts.length - 1); - baseParts = baseParts.concat(name.split('/')); - trimDots(baseParts); - name = baseParts.join('/'); - } + //If have a base name, try to normalize against it, + //otherwise, assume it is a top-level require that will + //be relative to baseUrl in the end. + if (baseName) { + baseParts = baseName.split('/'); + baseParts = baseParts.slice(0, baseParts.length - 1); + baseParts = baseParts.concat(name.split('/')); + trimDots(baseParts); + name = baseParts.join('/'); + } } return name; - } + } - /** - * Create the normalize() function passed to a loader plugin's - * normalize method. - */ - function makeNormalize(relName) { + /** + * Create the normalize() function passed to a loader plugin's + * normalize method. + */ + function makeNormalize(relName) { return function (name) { - return normalize(name, relName); + return normalize(name, relName); }; - } + } - function makeLoad(id) { + function makeLoad(id) { function load(value) { - loaderCache[id] = value; + loaderCache[id] = value; } load.fromText = function (id, text) { - //This one is difficult because the text can/probably uses - //define, and any relative paths and requires should be relative - //to that id was it would be found on disk. But this would require - //bootstrapping a module/require fairly deeply from node core. - //Not sure how best to go about that yet. - throw new Error('amdefine does not implement load.fromText'); + //This one is difficult because the text can/probably uses + //define, and any relative paths and requires should be relative + //to that id was it would be found on disk. But this would require + //bootstrapping a module/require fairly deeply from node core. + //Not sure how best to go about that yet. + throw new Error('amdefine does not implement load.fromText'); }; return load; - } + } - makeRequire = function (systemRequire, exports, module, relId) { + makeRequire = function (systemRequire, exports, module, relId) { function amdRequire(deps, callback) { - if (typeof deps === 'string') { - //Synchronous, single module require('') - return stringRequire(systemRequire, exports, module, deps, relId); - } else { - //Array of dependencies with a callback. + if (typeof deps === 'string') { + //Synchronous, single module require('') + return stringRequire(systemRequire, exports, module, deps, relId); + } else { + //Array of dependencies with a callback. - //Convert the dependencies to modules. - deps = deps.map(function (depName) { - return stringRequire(systemRequire, exports, module, depName, relId); - }); + //Convert the dependencies to modules. + deps = deps.map(function (depName) { + return stringRequire(systemRequire, exports, module, depName, relId); + }); - //Wait for next tick to call back the require call. - process.nextTick(function () { - callback.apply(null, deps); - }); - } + //Wait for next tick to call back the require call. + process.nextTick(function () { + callback.apply(null, deps); + }); + } } amdRequire.toUrl = function (filePath) { - if (filePath.indexOf('.') === 0) { - return normalize(filePath, path.dirname(module.filename)); - } else { - return filePath; - } + if (filePath.indexOf('.') === 0) { + return normalize(filePath, path.dirname(module.filename)); + } else { + return filePath; + } }; return amdRequire; - }; + }; - //Favor explicit value, passed in if the module wants to support Node 0.4. - requireFn = requireFn || function req() { - return module.require.apply(module, arguments); - }; + //Favor explicit value, passed in if the module wants to support Node 0.4. + requireFn = requireFn || function req() { + return module.require.apply(module, arguments); + }; - function runFactory(id, deps, factory) { + function runFactory(id, deps, factory) { var r, e, m, result; if (id) { - e = loaderCache[id] = {}; - m = { - id: id, - uri: __filename, - exports: e - }; - r = makeRequire(requireFn, e, m, id); + e = loaderCache[id] = {}; + m = { + id: id, + uri: __filename, + exports: e + }; + r = makeRequire(requireFn, e, m, id); } else { - //Only support one define call per file - if (alreadyCalled) { - throw new Error('amdefine with no module ID cannot be called more than once per file.'); - } - alreadyCalled = true; + //Only support one define call per file + if (alreadyCalled) { + throw new Error('amdefine with no module ID cannot be called more than once per file.'); + } + alreadyCalled = true; - //Use the real variables from node - //Use module.exports for exports, since - //the exports in here is amdefine exports. - e = module.exports; - m = module; - r = makeRequire(requireFn, e, m, module.id); + //Use the real variables from node + //Use module.exports for exports, since + //the exports in here is amdefine exports. + e = module.exports; + m = module; + r = makeRequire(requireFn, e, m, module.id); } //If there are dependencies, they are strings, so need //to convert them to dependency values. if (deps) { - deps = deps.map(function (depName) { - return r(depName); - }); + deps = deps.map(function (depName) { + return r(depName); + }); } //Call the factory with the right dependencies. if (typeof factory === 'function') { - result = factory.apply(m.exports, deps); + result = factory.apply(m.exports, deps); } else { - result = factory; + result = factory; } if (result !== undefined) { - m.exports = result; - if (id) { - loaderCache[id] = m.exports; - } + m.exports = result; + if (id) { + loaderCache[id] = m.exports; + } } - } + } - stringRequire = function (systemRequire, exports, module, id, relId) { + stringRequire = function (systemRequire, exports, module, id, relId) { //Split the ID by a ! so that var index = id.indexOf('!'), originalId = id, prefix, plugin; if (index === -1) { - id = normalize(id, relId); - - //Straight module lookup. If it is one of the special dependencies, - //deal with it, otherwise, delegate to node. - if (id === 'require') { - return makeRequire(systemRequire, exports, module, relId); - } else if (id === 'exports') { - return exports; - } else if (id === 'module') { - return module; - } else if (loaderCache.hasOwnProperty(id)) { - return loaderCache[id]; - } else if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; + id = normalize(id, relId); + + //Straight module lookup. If it is one of the special dependencies, + //deal with it, otherwise, delegate to node. + if (id === 'require') { + return makeRequire(systemRequire, exports, module, relId); + } else if (id === 'exports') { + return exports; + } else if (id === 'module') { + return module; + } else if (loaderCache.hasOwnProperty(id)) { + return loaderCache[id]; + } else if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } else { + if(systemRequire) { + return systemRequire(originalId); } else { - if(systemRequire) { - return systemRequire(originalId); - } else { - throw new Error('No module with ID: ' + id); - } + throw new Error('No module with ID: ' + id); } + } } else { - //There is a plugin in play. - prefix = id.substring(0, index); - id = id.substring(index + 1, id.length); + //There is a plugin in play. + prefix = id.substring(0, index); + id = id.substring(index + 1, id.length); - plugin = stringRequire(systemRequire, exports, module, prefix, relId); + plugin = stringRequire(systemRequire, exports, module, prefix, relId); - if (plugin.normalize) { - id = plugin.normalize(id, makeNormalize(relId)); - } else { - //Normalize the ID normally. - id = normalize(id, relId); - } + if (plugin.normalize) { + id = plugin.normalize(id, makeNormalize(relId)); + } else { + //Normalize the ID normally. + id = normalize(id, relId); + } - if (loaderCache[id]) { - return loaderCache[id]; - } else { - plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); + if (loaderCache[id]) { + return loaderCache[id]; + } else { + plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); - return loaderCache[id]; - } + return loaderCache[id]; + } } - }; + }; - //Create a define function specific to the module asking for amdefine. - function define(id, deps, factory) { + //Create a define function specific to the module asking for amdefine. + function define(id, deps, factory) { if (Array.isArray(id)) { - factory = deps; - deps = id; - id = undefined; + factory = deps; + deps = id; + id = undefined; } else if (typeof id !== 'string') { - factory = id; - id = deps = undefined; + factory = id; + id = deps = undefined; } if (deps && !Array.isArray(deps)) { - factory = deps; - deps = undefined; + factory = deps; + deps = undefined; } if (!deps) { - deps = ['require', 'exports', 'module']; + deps = ['require', 'exports', 'module']; } //Set up properties for this module. If an ID, then use //internal cache. If no ID, then use the external variables //for this node module. if (id) { - //Put the module in deep freeze until there is a - //require call for it. - defineCache[id] = [id, deps, factory]; + //Put the module in deep freeze until there is a + //require call for it. + defineCache[id] = [id, deps, factory]; } else { - runFactory(id, deps, factory); + runFactory(id, deps, factory); } - } + } - //define.require, which has access to all the values in the - //cache. Useful for AMD modules that all have IDs in the file, - //but need to finally export a value to node based on one of those - //IDs. - define.require = function (id) { + //define.require, which has access to all the values in the + //cache. Useful for AMD modules that all have IDs in the file, + //but need to finally export a value to node based on one of those + //IDs. + define.require = function (id) { if (loaderCache[id]) { - return loaderCache[id]; + return loaderCache[id]; } if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; } - }; + }; + + define.amd = {}; + + return define; + } + + module.exports = amdefine; + + }).call(this,require('_process'),"/node_modules/source-map/node_modules/amdefine/amdefine.js") +},{"_process":213,"path":212}],504:[function(require,module,exports){ + /*! + strip-json-comments + Strip comments from JSON. Lets you use comments in your JSON files! + https://github.com/sindresorhus/strip-json-comments + by Sindre Sorhus + MIT License + */ + (function () { + 'use strict'; - define.amd = {}; - - return define; -} - -module.exports = amdefine; - -}).call(this,require('_process'),"/node_modules/source-map/node_modules/amdefine/amdefine.js") -},{"_process":183,"path":182}],452:[function(require,module,exports){ -'use strict'; -module.exports = function toFastProperties(obj) { - /*jshint -W027*/ - function f() {} - f.prototype = obj; - new f(); - return; - eval(obj); -}; - -},{}],453:[function(require,module,exports){ -'use strict'; -module.exports = function (str) { - return str.replace(/[\s\uFEFF\xA0]+$/g, ''); -}; - -},{}],454:[function(require,module,exports){ -module.exports={ - "name": "babel-core", - "description": "Turn ES6 code into readable vanilla ES5 with source maps", - "version": "5.0.9", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "repository": "babel/babel", - "main": "lib/babel/api/node.js", - "browser": { - "./lib/babel/api/register/node.js": "./lib/babel/api/register/browser.js" - }, - "keywords": [ - "harmony", - "classes", - "modules", - "let", - "const", - "var", - "es6", - "transpile", - "transpiler", - "6to5", - "babel" - ], - "scripts": { - "bench": "make bench", - "test": "make test" - }, - "dependencies": { - "ast-types": "~0.7.0", - "chalk": "^1.0.0", - "convert-source-map": "hipertracker/convert-source-map", - "core-js": "^0.8.1", - "debug": "^2.1.1", - "detect-indent": "^3.0.0", - "estraverse": "^1.9.1", - "esutils": "^1.1.6", - "fs-readdir-recursive": "^0.1.0", - "globals": "^6.2.0", - "is-integer": "^1.0.4", - "js-tokens": "1.0.0", - "leven": "^1.0.1", - "line-numbers": "0.2.0", - "lodash": "^3.2.0", - "minimatch": "^2.0.3", - "output-file-sync": "^1.1.0", - "path-is-absolute": "^1.0.0", - "private": "^0.1.6", - "regenerator-babel": "0.8.13-2", - "regexpu": "^1.1.2", - "repeating": "^1.1.2", - "shebang-regex": "^1.0.0", - "slash": "^1.0.0", - "source-map": "^0.4.0", - "source-map-support": "^0.2.9", - "to-fast-properties": "^1.0.0", - "trim-right": "^1.0.0" - }, - "devDependencies": { - "babel": "4.7.13", - "browserify": "^9.0.3", - "chai": "^2.0.0", - "eslint": "^0.15.1", - "babel-eslint": "^1.0.1", - "esvalid": "^1.1.0", - "istanbul": "^0.3.5", - "matcha": "^0.6.0", - "mocha": "^2.1.0", - "rimraf": "^2.2.8", - "uglify-js": "^2.4.16" - } -} - -},{}],455:[function(require,module,exports){ -module.exports={"abstract-expression-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-delete":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceDelete","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"abstract-expression-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceSet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-comprehension-container":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-from":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"array-push":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"STATEMENT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call-instance-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INITIALIZERS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call-static-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CONSTRUCTOR","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INITIALIZERS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CONSTRUCTOR","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CONTEXT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"DECORATOR","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-super-constructor-call-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"class-super-constructor-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"corejs-is-iterator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CORE_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isIterable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"corejs-iterator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CORE_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getIterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"default-parameter":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"DEFAULT_VALUE","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"let","type":"VariableDeclaration","end":null}],"type":"Program","end":null},"exports-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-default-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-from-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"INIT","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-module-declaration-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"exports-module-declaration":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"value":"__esModule","raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"for-of-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARR","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"for-of-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":null,"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"operator":">=","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"for-of":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-async-to-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"next","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"throw","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":null,"type":"ReturnStatement","end":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":null,"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"then","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-bind":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Function","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-class-call-check":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},"operator":"instanceof","right":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot call a class as a function","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-create-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-create-decorated-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"The decorator for method ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is of the invalid type ","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-default-props":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-defaults":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyNames","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-define-property":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-extends":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"assign","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":1,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-has-own":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-inherits":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"Super expression must either be null or a function, not ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"create","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__proto__","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-interop-require-wildcard":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"value":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-interop-require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-object-destructuring-empty":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot destructure undefined","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-object-without-properties":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"right":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"indexOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":">=","right":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForInStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-self-global":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"self","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-slice":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"slice","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-sliced-to-array-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-sliced-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"leadingComments":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"CatchClause","end":null,"_scopeInfo":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-tagged-template-literal-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-tagged-template-literal":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null}],"type":"CallExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-temporal-assert-defined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"ReferenceError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is not defined - temporal dead zone","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-temporal-undefined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null,"parenthesizedExpression":true},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-to-consumable-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"helper-typeof":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"value":"symbol","raw":null,"type":"Literal","end":null},"alternate":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"let-scoping-return":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"v","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null},"ludicrous-in":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"RIGHT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"LEFT","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"named-function":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"GET_OUTER_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"property-method-assignment-wrapper-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":true,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"delegate":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"YieldExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"property-method-assignment-wrapper":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionDeclaration","end":null,"_scopeInfo":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"prototype-identifier":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CLASS_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"require-assign-key":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null}],"type":"Program","end":null},"require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"rest":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"ARRAY_LEN","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"START","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARRAY_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"ForStatement","end":null,"_scopeInfo":null,"_paths":null}],"type":"Program","end":null},"self-contained-helpers-head":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"HELPER","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"system":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"System","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"register","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"MODULE_DEPENDENCIES","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"EXPORT_IDENTIFIER","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"setters","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"SETTERS","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"execute","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"EXECUTE","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"tail-call-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"body":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BLOCK","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"WhileStatement","end":null,"_scopeInfo":null,"_paths":null},"label":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"LabeledStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null}],"type":"Program","end":null},"test-exports":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"test-module":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"umd-commonjs-strict":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"root","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"UMD_ROOT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FACTORY_PARAMETERS","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"FACTORY_BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"_scopeInfo":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null},"umd-runner-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"COMMON_TEST","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"GLOBAL_ARG","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_scopeInfo":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_scopeInfo":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null}} + function stripJsonComments(str) { + var currentChar; + var nextChar; + var insideString = false; + var insideComment = false; + var ret = ''; + + for (var i = 0; i < str.length; i++) { + currentChar = str[i]; + nextChar = str[i + 1]; + + if (!insideComment && str[i - 1] !== '\\' && currentChar === '"') { + insideString = !insideString; + } + + if (insideString) { + ret += currentChar; + continue; + } + + if (!insideComment && currentChar + nextChar === '//') { + insideComment = 'single'; + i++; + } else if (insideComment === 'single' && currentChar + nextChar === '\r\n') { + insideComment = false; + i++; + ret += currentChar; + ret += nextChar; + continue; + } else if (insideComment === 'single' && currentChar === '\n') { + insideComment = false; + } else if (!insideComment && currentChar + nextChar === '/*') { + insideComment = 'multi'; + i++; + continue; + } else if (insideComment === 'multi' && currentChar + nextChar === '*/') { + insideComment = false; + i++; + continue; + } + + if (insideComment) { + continue; + } + + ret += currentChar; + } + + return ret; + } + + if (typeof module !== 'undefined' && module.exports) { + module.exports = stripJsonComments; + } else { + window.stripJsonComments = stripJsonComments; + } + })(); + +},{}],505:[function(require,module,exports){ + 'use strict'; + module.exports = function toFastProperties(obj) { + /*jshint -W027*/ + function f() {} + f.prototype = obj; + new f(); + return; + eval(obj); + }; + +},{}],506:[function(require,module,exports){ + 'use strict'; + module.exports = function (str) { + return str.replace(/[\s\uFEFF\xA0]+$/g, ''); + }; + +},{}],507:[function(require,module,exports){ + module.exports={ + "name": "babel-core", + "description": "A compiler for writing next generation JavaScript", + "version": "5.5.5", + "author": "Sebastian McKenzie ", + "homepage": "https://babeljs.io/", + "license": "MIT", + "repository": "babel/babel", + "main": "lib/babel/api/node.js", + "browser": { + "./lib/babel/api/register/node.js": "./lib/babel/api/register/browser.js" + }, + "keywords": [ + "harmony", + "classes", + "modules", + "let", + "const", + "var", + "es6", + "transpile", + "transpiler", + "6to5", + "babel" + ], + "scripts": { + "bench": "make bench", + "test": "make test" + }, + "dependencies": { + "acorn-jsx": "^1.0.0", + "ast-types": "~0.7.0", + "bluebird": "^2.9.25", + "chalk": "^1.0.0", + "convert-source-map": "^1.1.0", + "core-js": "^0.9.0", + "debug": "^2.1.1", + "detect-indent": "^3.0.0", + "esquery": "^0.4.0", + "estraverse": "^4.0.0", + "esutils": "^2.0.0", + "fs-readdir-recursive": "^0.1.0", + "globals": "^6.4.0", + "home-or-tmp": "^1.0.0", + "is-integer": "^1.0.4", + "js-tokens": "1.0.0", + "leven": "^1.0.1", + "line-numbers": "0.2.0", + "lodash": "^3.6.0", + "minimatch": "^2.0.3", + "output-file-sync": "^1.1.0", + "path-is-absolute": "^1.0.0", + "private": "^0.1.6", + "regenerator": "0.8.28", + "regexpu": "^1.1.2", + "repeating": "^1.1.2", + "resolve": "^1.1.6", + "shebang-regex": "^1.0.0", + "slash": "^1.0.0", + "source-map": "^0.4.0", + "source-map-support": "^0.2.10", + "strip-json-comments": "^1.0.2", + "to-fast-properties": "^1.0.0", + "trim-right": "^1.0.0" + }, + "devDependencies": { + "babel": "5.3.1", + "browserify": "^9.0.8", + "chai": "^2.2.0", + "eslint": "^0.21.2", + "babel-eslint": "^3.1.9", + "esvalid": "^1.1.0", + "istanbul": "^0.3.5", + "matcha": "^0.6.0", + "mocha": "2.2.0", + "rimraf": "^2.3.2", + "uglify-js": "^2.4.16" + } + } + +},{}],508:[function(require,module,exports){ + module.exports={"abstract-expression-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"abstract-expression-delete":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceDelete","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"abstract-expression-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"abstract-expression-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceSet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"array-comprehension-container":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"array-from":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"array-push":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"STATEMENT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CONTEXT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"class-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"DECORATOR","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"class-super-constructor-call-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"class-super-constructor-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"class-super-native-constructor-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"NATIVE_REF","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"type":"SpreadElement","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"NATIVE_REF","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__proto__","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CLASS_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"NATIVE_REF","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"default-parameter-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"DEFAULT_VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"default-parameter":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"DEFAULT_VALUE","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"let","type":"VariableDeclaration","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"exports-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"exports-default-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"exports-from-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"INIT","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"exports-module-declaration-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"exports-module-declaration":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"value":"__esModule","raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"for-of-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARR","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"for-of-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":null,"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"operator":">=","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"for-of":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[],"type":"BlockStatement","end":null},"type":"ForStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"CatchClause","end":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"TryStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-async-to-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"next","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"throw","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":null,"type":"ReturnStatement","end":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"CatchClause","end":null,"_paths":null},"guardedHandlers":[],"finalizer":null,"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"then","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-bind":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Function","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-class-call-check":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},"operator":"instanceof","right":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot call a class as a function","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-create-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-create-decorated-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"The decorator for method ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is of the invalid type ","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-create-decorated-object":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"The decorator for method ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is of the invalid type ","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-default-props":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForInStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-defaults":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyNames","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-define-decorated-property-descriptor":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"_descriptor","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":null,"type":"ReturnStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_key","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"_descriptor","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"_key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"_key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForInStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-define-property":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-extends":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"assign","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":1,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForInStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-has-own":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-inherits":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"Super expression must either be null or a function, not ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"create","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__proto__","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-instanceof":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"left","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"right","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"right","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"right","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"hasInstance","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"right","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"hasInstance","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"left","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"left","type":"Identifier","end":null},"operator":"instanceof","right":{"start":null,"loc":null,"range":null,"name":"right","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-interop-require-default":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"value":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-interop-require-wildcard":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"newObj","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"newObj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForInStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"newObj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"newObj","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-interop-require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-object-destructuring-empty":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot destructure undefined","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-object-without-properties":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"indexOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":">=","right":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForInStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-self-global":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"self","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-slice":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"slice","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-sliced-to-array-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-sliced-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"CatchClause","end":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-tagged-template-literal-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-tagged-template-literal":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-temporal-assert-defined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"ReferenceError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is not defined - temporal dead zone","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-temporal-undefined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null,"parenthesizedExpression":true},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-to-consumable-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-typeof":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"value":"symbol","raw":null,"type":"Literal","end":null},"alternate":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"let-scoping-return":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"v","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"named-function":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"GET_OUTER_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"property-method-assignment-wrapper-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":true,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"delegate":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"YieldExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"property-method-assignment-wrapper":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"prototype-identifier":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CLASS_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"require-assign-key":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"rest":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"ARRAY_LEN","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"START","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARRAY_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"self-contained-helpers-head":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"HELPER","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"system":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"System","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"register","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"MODULE_DEPENDENCIES","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"EXPORT_IDENTIFIER","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"setters","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"SETTERS","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"execute","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"EXECUTE","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"tail-call-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"body":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BLOCK","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"WhileStatement","end":null,"_paths":null},"label":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"LabeledStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"test-exports":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"test-module":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"umd-commonjs-strict":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"root","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"UMD_ROOT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FACTORY_PARAMETERS","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"FACTORY_BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"umd-runner-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"COMMON_TEST","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"GLOBAL_ARG","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null}} },{}]},{},[19])(19) -}); \ No newline at end of file +}); diff --git a/babel.min.js b/babel.min.js index 71d0169..d7aee65 100644 --- a/babel.min.js +++ b/babel.min.js @@ -1,49 +1,62 @@ -(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.babel=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o")){node.params.push(this.flow_parseTypeAnnotatableIdentifier());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");return this.finishNode(node,"TypeParameterDeclaration")};pp.flow_parseTypeParameterInstantiation=function(){var node=this.startNode(),oldInType=this.inType;node.params=[];this.inType=true;this.expectRelational("<");while(!this.isRelational(">")){node.params.push(this.flow_parseType());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");this.inType=oldInType;return this.finishNode(node,"TypeParameterInstantiation")};pp.flow_parseObjectPropertyKey=function(){return this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.flow_parseObjectTypeIndexer=function(node,isStatic){node["static"]=isStatic;this.expect(tt.bracketL);node.id=this.flow_parseObjectPropertyKey();this.expect(tt.colon);node.key=this.flow_parseType();this.expect(tt.bracketR);this.expect(tt.colon);node.value=this.flow_parseType();this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeIndexer")};pp.flow_parseObjectTypeMethodish=function(node){node.params=[];node.rest=null;node.typeParameters=null;if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}this.expect(tt.parenL);while(this.type===tt.name){node.params.push(this.flow_parseFunctionTypeParam());if(this.type!==tt.parenR){this.expect(tt.comma)}}if(this.eat(tt.ellipsis)){node.rest=this.flow_parseFunctionTypeParam()}this.expect(tt.parenR);this.expect(tt.colon);node.returnType=this.flow_parseType();return this.finishNode(node,"FunctionTypeAnnotation")};pp.flow_parseObjectTypeMethod=function(start,isStatic,key){var node=this.startNodeAt(start);node.value=this.flow_parseObjectTypeMethodish(this.startNodeAt(start));node["static"]=isStatic;node.key=key;node.optional=false;this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeProperty")};pp.flow_parseObjectTypeCallProperty=function(node,isStatic){var valueNode=this.startNode();node["static"]=isStatic;node.value=this.flow_parseObjectTypeMethodish(valueNode);this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeCallProperty")};pp.flow_parseObjectType=function(allowStatic){var nodeStart=this.startNode();var node;var optional=false;var property;var propertyKey;var propertyTypeAnnotation;var token;var isStatic;nodeStart.callProperties=[];nodeStart.properties=[];nodeStart.indexers=[];this.expect(tt.braceL);while(this.type!==tt.braceR){var start=this.markPosition();node=this.startNode();if(allowStatic&&this.isContextual("static")){this.next();isStatic=true}if(this.type===tt.bracketL){nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node,isStatic))}else if(this.type===tt.parenL||this.isRelational("<")){nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node,allowStatic))}else{if(isStatic&&this.type===tt.colon){propertyKey=this.parseIdent()}else{propertyKey=this.flow_parseObjectPropertyKey()}if(this.isRelational("<")||this.type===tt.parenL){nodeStart.properties.push(this.flow_parseObjectTypeMethod(start,isStatic,propertyKey))}else{if(this.eat(tt.question)){optional=true}this.expect(tt.colon);node.key=propertyKey;node.value=this.flow_parseType();node.optional=optional;node["static"]=isStatic;this.flow_objectTypeSemicolon();nodeStart.properties.push(this.finishNode(node,"ObjectTypeProperty"))}}}this.expect(tt.braceR);return this.finishNode(nodeStart,"ObjectTypeAnnotation")};pp.flow_objectTypeSemicolon=function(){if(!this.eat(tt.semi)&&this.type!==tt.braceR){this.unexpected()}};pp.flow_parseGenericType=function(start,id){var node=this.startNodeAt(start);node.typeParameters=null;node.id=id;while(this.eat(tt.dot)){var node2=this.startNodeAt(start);node2.qualification=node.id;node2.id=this.parseIdent();node.id=this.finishNode(node2,"QualifiedTypeIdentifier")}if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterInstantiation()}return this.finishNode(node,"GenericTypeAnnotation")};pp.flow_parseVoidType=function(){var node=this.startNode();this.expect(tt._void);return this.finishNode(node,"VoidTypeAnnotation")};pp.flow_parseTypeofType=function(){var node=this.startNode();this.expect(tt._typeof);node.argument=this.flow_parsePrimaryType();return this.finishNode(node,"TypeofTypeAnnotation")};pp.flow_parseTupleType=function(){var node=this.startNode();node.types=[];this.expect(tt.bracketL);while(this.pos. It looks like "+"you are trying to write a function type, but you ended up "+"writing a grouped type followed by an =>, which is a syntax "+"error. Remember, function type parameters are named so function "+"types look like (name1: type1, name2: type2) => returnType. You "+"probably wrote (type1) => returnType")}return type}tmp=this.flow_parseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;this.expect(tt.parenR);this.expect(tt.arrow);node.returnType=this.flow_parseType();node.typeParameters=null;return this.finishNode(node,"FunctionTypeAnnotation");case tt.string:node.value=this.value;node.raw=this.input.slice(this.start,this.end);this.next();return this.finishNode(node,"StringLiteralTypeAnnotation");default:if(this.type.keyword){switch(this.type.keyword){case"void":return this.flow_parseVoidType();case"typeof":return this.flow_parseTypeofType()}}}this.unexpected()};pp.flow_parsePostfixType=function(){var node=this.startNode();var type=node.elementType=this.flow_parsePrimaryType();if(this.type===tt.bracketL){this.expect(tt.bracketL);this.expect(tt.bracketR);return this.finishNode(node,"ArrayTypeAnnotation")}return type};pp.flow_parsePrefixType=function(){var node=this.startNode();if(this.eat(tt.question)){node.typeAnnotation=this.flow_parsePrefixType();return this.finishNode(node,"NullableTypeAnnotation")}return this.flow_parsePostfixType()};pp.flow_parseIntersectionType=function(){var node=this.startNode();var type=this.flow_parsePrefixType();node.types=[type];while(this.eat(tt.bitwiseAND)){node.types.push(this.flow_parsePrefixType())}return node.types.length===1?type:this.finishNode(node,"IntersectionTypeAnnotation")};pp.flow_parseUnionType=function(){var node=this.startNode();var type=this.flow_parseIntersectionType();node.types=[type];while(this.eat(tt.bitwiseOR)){node.types.push(this.flow_parseIntersectionType())}return node.types.length===1?type:this.finishNode(node,"UnionTypeAnnotation")};pp.flow_parseType=function(){var oldInType=this.inType;this.inType=true;var type=this.flow_parseUnionType();this.inType=oldInType;return type};pp.flow_parseTypeAnnotation=function(){var node=this.startNode();var oldInType=this.inType;this.inType=true;this.expect(tt.colon);node.typeAnnotation=this.flow_parseType();this.inType=oldInType;return this.finishNode(node,"TypeAnnotation")};pp.flow_parseTypeAnnotatableIdentifier=function(requireTypeAnnotation,canBeOptionalParam){var node=this.startNode();var ident=this.parseIdent();var isOptionalParam=false;if(canBeOptionalParam&&this.eat(tt.question)){this.expect(tt.question);isOptionalParam=true}if(requireTypeAnnotation||this.type===tt.colon){ident.typeAnnotation=this.flow_parseTypeAnnotation();this.finishNode(ident,ident.type)}if(isOptionalParam){ident.optional=true;this.finishNode(ident,ident.type)}return ident};acorn.plugins.flow=function(instance){instance.extend("parseFunctionBody",function(inner){return function(node,allowExpression){if(this.type===tt.colon){node.returnType=this.flow_parseTypeAnnotation()}return inner.call(this,node,allowExpression)}});instance.extend("parseStatement",function(inner){return function(declaration,topLevel){if(this.strict&&this.type===tt.name&&this.value==="interface"){var node=this.startNode();this.next();return this.flow_parseInterface(node)}else{return inner.call(this,declaration,topLevel)}}});instance.extend("parseExpressionStatement",function(inner){return function(node,expr){if(expr.type==="Identifier"){if(expr.name==="declare"){if(this.type===tt._class||this.type===tt.name||this.type===tt._function||this.type===tt._var){return this.flow_parseDeclare(node)}}else if(this.type===tt.name){if(expr.name==="interface"){return this.flow_parseInterface(node)}else if(expr.name==="type"){return this.flow_parseTypeAlias(node)}}}return inner.call(this,node,expr)}});instance.extend("shouldParseExportDeclaration",function(inner){return function(){return this.isContextual("type")||inner.call(this)}});instance.extend("parseParenItem",function(inner){return function(node,start){if(this.type===tt.colon){var typeCastNode=this.startNodeAt(start);typeCastNode.expression=node;typeCastNode.typeAnnotation=this.flow_parseTypeAnnotation();return this.finishNode(typeCastNode,"TypeCastExpression")}else{return node}}});instance.extend("parseClassId",function(inner){return function(node,isStatement){inner.call(this,node,isStatement);if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}}});instance.extend("readToken",function(inner){return function(code){if(this.inType&&(code===62||code===60)){return this.finishOp(tt.relational,1)}else{return inner.call(this,code)}}});instance.extend("jsx_readToken",function(inner){return function(){if(!this.inType)return inner.call(this)}});instance.extend("parseParenArrowList",function(inner){return function(start,exprList,isAsync){for(var i=0;i...",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);this.context.push(tc.j_oTag);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;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);++this.pos;if(ch===13&&this.input.charCodeAt(this.pos)===10){++this.pos;out+="\n"}else{out+=String.fromCharCode(ch)}if(this.options.locations){++this.curLine;this.lineStart=this.pos}chunkStart=this.pos}else{++this.pos}}}};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{++this.pos}}out+=this.input.slice(chunkStart,this.pos++);return this.finishToken(tt.string,out)};var XHTMLEntities={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};var hexNumber=/^[\da-fA-F]+$/;var decimalNumber=/^\d+$/;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")}node.openingElement=openingElement;node.closingElement=closingElement;node.children=children;return this.finishNode(node,"JSXElement")};pp.jsx_parseElement=function(){var start=this.markPosition();this.next();return this.jsx_parseElementAt(start)};acorn.plugins.jsx=function(instance){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;this.context.push(tc.j_cTag);this.exprAllowed=false}else{return inner.call(this,prevType)}}})}},{"..":5}],3:[function(require,module,exports){"use strict";var tt=require("./tokentype").types;var Parser=require("./state").Parser;var reservedWords=require("./identifier").reservedWords;var has=require("./util").has;var pp=Parser.prototype;pp.checkPropClash=function(prop,propHash){if(this.options.ecmaVersion>=6)return;var key=prop.key,name=undefined;switch(key.type){case"Identifier":name=key.name;break;case"Literal":name=String(key.value);break;default:return}var kind=prop.kind||"init",other=undefined;if(has(propHash,name)){other=propHash[name];var isGetSet=kind!=="init";if((this.strict||isGetSet)&&other[kind]||!(isGetSet^other.init))this.raise(key.start,"Redefinition of property")}else{other=propHash[name]={init:false,get:false,set:false}}other[kind]=true};pp.parseExpression=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeAssign(noIn,refShorthandDefaultPos);if(this.type===tt.comma){var node=this.startNodeAt(start);node.expressions=[expr];while(this.eat(tt.comma))node.expressions.push(this.parseMaybeAssign(noIn,refShorthandDefaultPos));return this.finishNode(node,"SequenceExpression")}return expr};pp.parseMaybeAssign=function(noIn,refShorthandDefaultPos,afterLeftParse){if(this.type==tt._yield&&this.inGenerator)return this.parseYield();var failOnShorthandAssign=undefined;if(!refShorthandDefaultPos){refShorthandDefaultPos={start:0};failOnShorthandAssign=true}else{failOnShorthandAssign=false}var start=this.markPosition();var left=this.parseMaybeConditional(noIn,refShorthandDefaultPos);if(afterLeftParse)left=afterLeftParse.call(this,left,start);if(this.type.isAssign){var node=this.startNodeAt(start);node.operator=this.value;node.left=this.type===tt.eq?this.toAssignable(left):left;refShorthandDefaultPos.start=0;this.checkLVal(left);if(left.parenthesizedExpression){if(left.type==="ObjectPattern"){this.raise(left.start,"You're trying to assign to a parenthesized expression, instead of `({ foo }) = {}` use `({ foo } = {})`")}else{this.raise(left.start,"Parenthesized left hand expressions are illegal")}}this.next();node.right=this.parseMaybeAssign(noIn);return this.finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return left};pp.parseMaybeConditional=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;if(this.eat(tt.question)){var node=this.startNodeAt(start);node.test=expr;node.consequent=this.parseMaybeAssign();this.expect(tt.colon);node.alternate=this.parseMaybeAssign(noIn); +(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.babel=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o")){node.params.push(this.flow_parseTypeAnnotatableIdentifier());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");return this.finishNode(node,"TypeParameterDeclaration")};pp.flow_parseTypeParameterInstantiation=function(){var node=this.startNode(),oldInType=this.inType;node.params=[];this.inType=true;this.expectRelational("<");while(!this.isRelational(">")){node.params.push(this.flow_parseType());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");this.inType=oldInType;return this.finishNode(node,"TypeParameterInstantiation")};pp.flow_parseObjectPropertyKey=function(){return this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.flow_parseObjectTypeIndexer=function(node,isStatic){node["static"]=isStatic;this.expect(tt.bracketL);node.id=this.flow_parseObjectPropertyKey();this.expect(tt.colon);node.key=this.flow_parseType();this.expect(tt.bracketR);this.expect(tt.colon);node.value=this.flow_parseType();this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeIndexer")};pp.flow_parseObjectTypeMethodish=function(node){node.params=[];node.rest=null;node.typeParameters=null;if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}this.expect(tt.parenL);while(this.type===tt.name){node.params.push(this.flow_parseFunctionTypeParam());if(this.type!==tt.parenR){this.expect(tt.comma)}}if(this.eat(tt.ellipsis)){node.rest=this.flow_parseFunctionTypeParam()}this.expect(tt.parenR);this.expect(tt.colon);node.returnType=this.flow_parseType();return this.finishNode(node,"FunctionTypeAnnotation")};pp.flow_parseObjectTypeMethod=function(start,isStatic,key){var node=this.startNodeAt(start);node.value=this.flow_parseObjectTypeMethodish(this.startNodeAt(start));node["static"]=isStatic;node.key=key;node.optional=false;this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeProperty")};pp.flow_parseObjectTypeCallProperty=function(node,isStatic){var valueNode=this.startNode();node["static"]=isStatic;node.value=this.flow_parseObjectTypeMethodish(valueNode);this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeCallProperty")};pp.flow_parseObjectType=function(allowStatic){var nodeStart=this.startNode();var node;var optional=false;var property;var propertyKey;var propertyTypeAnnotation;var token;var isStatic;nodeStart.callProperties=[];nodeStart.properties=[];nodeStart.indexers=[];this.expect(tt.braceL);while(this.type!==tt.braceR){var start=this.markPosition();node=this.startNode();if(allowStatic&&this.isContextual("static")){this.next();isStatic=true}if(this.type===tt.bracketL){nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node,isStatic))}else if(this.type===tt.parenL||this.isRelational("<")){nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node,allowStatic))}else{if(isStatic&&this.type===tt.colon){propertyKey=this.parseIdent()}else{propertyKey=this.flow_parseObjectPropertyKey()}if(this.isRelational("<")||this.type===tt.parenL){nodeStart.properties.push(this.flow_parseObjectTypeMethod(start,isStatic,propertyKey))}else{if(this.eat(tt.question)){optional=true}this.expect(tt.colon);node.key=propertyKey;node.value=this.flow_parseType();node.optional=optional;node["static"]=isStatic;this.flow_objectTypeSemicolon();nodeStart.properties.push(this.finishNode(node,"ObjectTypeProperty"))}}}this.expect(tt.braceR);return this.finishNode(nodeStart,"ObjectTypeAnnotation")};pp.flow_objectTypeSemicolon=function(){if(!this.eat(tt.semi)&&!this.eat(tt.comma)&&this.type!==tt.braceR){this.unexpected()}};pp.flow_parseGenericType=function(start,id){var node=this.startNodeAt(start);node.typeParameters=null;node.id=id;while(this.eat(tt.dot)){var node2=this.startNodeAt(start);node2.qualification=node.id;node2.id=this.parseIdent();node.id=this.finishNode(node2,"QualifiedTypeIdentifier")}if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterInstantiation()}return this.finishNode(node,"GenericTypeAnnotation")};pp.flow_parseVoidType=function(){var node=this.startNode();this.expect(tt._void);return this.finishNode(node,"VoidTypeAnnotation")};pp.flow_parseTypeofType=function(){var node=this.startNode();this.expect(tt._typeof);node.argument=this.flow_parsePrimaryType();return this.finishNode(node,"TypeofTypeAnnotation")};pp.flow_parseTupleType=function(){var node=this.startNode();node.types=[];this.expect(tt.bracketL);while(this.pos. It looks like "+"you are trying to write a function type, but you ended up "+"writing a grouped type followed by an =>, which is a syntax "+"error. Remember, function type parameters are named so function "+"types look like (name1: type1, name2: type2) => returnType. You "+"probably wrote (type1) => returnType")}return type}tmp=this.flow_parseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;this.expect(tt.parenR);this.expect(tt.arrow);node.returnType=this.flow_parseType();node.typeParameters=null;return this.finishNode(node,"FunctionTypeAnnotation");case tt.string:node.value=this.value;node.raw=this.input.slice(this.start,this.end);this.next();return this.finishNode(node,"StringLiteralTypeAnnotation");default:if(this.type.keyword){switch(this.type.keyword){case"void":return this.flow_parseVoidType();case"typeof":return this.flow_parseTypeofType()}}}this.unexpected()};pp.flow_parsePostfixType=function(){var node=this.startNode();var type=node.elementType=this.flow_parsePrimaryType();if(this.type===tt.bracketL){this.expect(tt.bracketL);this.expect(tt.bracketR);return this.finishNode(node,"ArrayTypeAnnotation")}return type};pp.flow_parsePrefixType=function(){var node=this.startNode();if(this.eat(tt.question)){node.typeAnnotation=this.flow_parsePrefixType();return this.finishNode(node,"NullableTypeAnnotation")}return this.flow_parsePostfixType()};pp.flow_parseIntersectionType=function(){var node=this.startNode();var type=this.flow_parsePrefixType();node.types=[type];while(this.eat(tt.bitwiseAND)){node.types.push(this.flow_parsePrefixType())}return node.types.length===1?type:this.finishNode(node,"IntersectionTypeAnnotation")};pp.flow_parseUnionType=function(){var node=this.startNode();var type=this.flow_parseIntersectionType();node.types=[type];while(this.eat(tt.bitwiseOR)){node.types.push(this.flow_parseIntersectionType())}return node.types.length===1?type:this.finishNode(node,"UnionTypeAnnotation")};pp.flow_parseType=function(){var oldInType=this.inType;this.inType=true;var type=this.flow_parseUnionType();this.inType=oldInType;return type};pp.flow_parseTypeAnnotation=function(){var node=this.startNode();var oldInType=this.inType;this.inType=true;this.expect(tt.colon);node.typeAnnotation=this.flow_parseType();this.inType=oldInType;return this.finishNode(node,"TypeAnnotation")};pp.flow_parseTypeAnnotatableIdentifier=function(requireTypeAnnotation,canBeOptionalParam){var node=this.startNode();var ident=this.parseIdent();var isOptionalParam=false;if(canBeOptionalParam&&this.eat(tt.question)){this.expect(tt.question);isOptionalParam=true}if(requireTypeAnnotation||this.type===tt.colon){ident.typeAnnotation=this.flow_parseTypeAnnotation();this.finishNode(ident,ident.type)}if(isOptionalParam){ident.optional=true;this.finishNode(ident,ident.type)}return ident};acorn.plugins.flow=function(instance){instance.extend("parseFunctionBody",function(inner){return function(node,allowExpression){if(this.type===tt.colon){node.returnType=this.flow_parseTypeAnnotation()}return inner.call(this,node,allowExpression)}});instance.extend("parseStatement",function(inner){return function(declaration,topLevel){if(this.strict&&this.type===tt.name&&this.value==="interface"){var node=this.startNode();this.next();return this.flow_parseInterface(node)}else{return inner.call(this,declaration,topLevel)}}});instance.extend("parseExpressionStatement",function(inner){return function(node,expr){if(expr.type==="Identifier"){if(expr.name==="declare"){if(this.type===tt._class||this.type===tt.name||this.type===tt._function||this.type===tt._var){return this.flow_parseDeclare(node)}}else if(this.type===tt.name){if(expr.name==="interface"){return this.flow_parseInterface(node)}else if(expr.name==="type"){return this.flow_parseTypeAlias(node)}}}return inner.call(this,node,expr)}});instance.extend("shouldParseExportDeclaration",function(inner){return function(){return this.isContextual("type")||inner.call(this)}});instance.extend("parseParenItem",function(inner){return function(node,start){if(this.type===tt.colon){var typeCastNode=this.startNodeAt(start);typeCastNode.expression=node;typeCastNode.typeAnnotation=this.flow_parseTypeAnnotation();return this.finishNode(typeCastNode,"TypeCastExpression")}else{return node}}});instance.extend("parseClassId",function(inner){return function(node,isStatement){inner.call(this,node,isStatement);if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}}});instance.extend("readToken",function(inner){return function(code){if(this.inType&&(code===62||code===60)){return this.finishOp(tt.relational,1)}else{return inner.call(this,code)}}});instance.extend("jsx_readToken",function(inner){return function(){if(!this.inType)return inner.call(this)}});instance.extend("parseParenArrowList",function(inner){return function(start,exprList,isAsync){for(var i=0;i=6)return;var key=prop.key,name=undefined;switch(key.type){case"Identifier":name=key.name;break;case"Literal":name=String(key.value);break;default:return}var kind=prop.kind||"init",other=undefined;if((0,_util.has)(propHash,name)){other=propHash[name];var isGetSet=kind!=="init";if((this.strict||isGetSet)&&other[kind]||!(isGetSet^other.init))this.raise(key.start,"Redefinition of property")}else{other=propHash[name]={init:false,get:false,set:false}}other[kind]=true};pp.parseExpression=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeAssign(noIn,refShorthandDefaultPos);if(this.type===_tokentype.types.comma){var node=this.startNodeAt(start);node.expressions=[expr];while(this.eat(_tokentype.types.comma))node.expressions.push(this.parseMaybeAssign(noIn,refShorthandDefaultPos));return this.finishNode(node,"SequenceExpression")}return expr};pp.parseMaybeAssign=function(noIn,refShorthandDefaultPos,afterLeftParse){if(this.type==_tokentype.types._yield&&this.inGenerator)return this.parseYield();var failOnShorthandAssign=undefined;if(!refShorthandDefaultPos){refShorthandDefaultPos={start:0};failOnShorthandAssign=true}else{failOnShorthandAssign=false}var start=this.markPosition();if(this.type==_tokentype.types.parenL||this.type==_tokentype.types.name)this.potentialArrowAt=this.start;var left=this.parseMaybeConditional(noIn,refShorthandDefaultPos);if(afterLeftParse)left=afterLeftParse.call(this,left,start);if(this.type.isAssign){var node=this.startNodeAt(start);node.operator=this.value;node.left=this.type===_tokentype.types.eq?this.toAssignable(left):left;refShorthandDefaultPos.start=0;this.checkLVal(left);if(left.parenthesizedExpression){var errorMsg=undefined;if(left.type==="ObjectPattern"){errorMsg="`({a}) = 0` use `({a} = 0)`"}else if(left.type==="ArrayPattern"){errorMsg="`([a]) = 0` use `([a] = 0)`"}if(errorMsg){this.raise(left.start,"You're trying to assign to a parenthesized expression, eg. instead of "+errorMsg)}}this.next();node.right=this.parseMaybeAssign(noIn);return this.finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return left};pp.parseMaybeConditional=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;if(this.eat(_tokentype.types.question)){var node=this.startNodeAt(start);node.test=expr;node.consequent=this.parseMaybeAssign();this.expect(_tokentype.types.colon);node.alternate=this.parseMaybeAssign(noIn);return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseExprOp(expr,start,-1,noIn)};pp.parseExprOp=function(left,leftStart,minPrec,noIn){var prec=this.type.binop;if(prec!=null&&(!noIn||this.type!==_tokentype.types._in)){if(prec>minPrec){var node=this.startNodeAt(leftStart);node.left=left;node.operator=this.value;var op=this.type;this.next();var _start=this.markPosition();node.right=this.parseExprOp(this.parseMaybeUnary(),_start,op.rightAssociative?prec-1:prec,noIn);this.finishNode(node,op===_tokentype.types.logicalOR||op===_tokentype.types.logicalAND?"LogicalExpression":"BinaryExpression");return this.parseExprOp(node,leftStart,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){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();if(refShorthandDefaultPos&&refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(update)this.checkLVal(node.argument);else if(this.strict&&node.operator==="delete"&&node.argument.type==="Identifier")this.raise(node.start,"Deleting local variable in strict mode");return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var start=this.markPosition();var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.type.postfix&&!this.canInsertSemicolon()){var node=this.startNodeAt(start);node.operator=this.value;node.prefix=false;node.argument=expr;this.checkLVal(expr);this.next();expr=this.finishNode(node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprAtom(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseSubscripts(expr,start)};pp.parseSubscripts=function(base,start,noCalls){if(!noCalls&&this.eat(_tokentype.types.doubleColon)){var node=this.startNodeAt(start);node.object=base;node.callee=this.parseNoCallExpr();return this.parseSubscripts(this.finishNode(node,"BindExpression"),start,noCalls)}else if(this.eat(_tokentype.types.dot)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseIdent(true);node.computed=false;return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(this.eat(_tokentype.types.bracketL)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseExpression();node.computed=true;this.expect(_tokentype.types.bracketR);return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(!noCalls&&this.eat(_tokentype.types.parenL)){var node=this.startNodeAt(start);node.callee=base;node.arguments=this.parseExprList(_tokentype.types.parenR,this.options.features["es7.trailingFunctionCommas"]);return this.parseSubscripts(this.finishNode(node,"CallExpression"),start,noCalls)}else if(this.type===_tokentype.types.backQuote){var node=this.startNodeAt(start);node.tag=base;node.quasi=this.parseTemplate();return this.parseSubscripts(this.finishNode(node,"TaggedTemplateExpression"),start,noCalls)}return base};pp.parseNoCallExpr=function(){var start=this.markPosition();return this.parseSubscripts(this.parseExprAtom(),start,true)};pp.parseExprAtom=function(refShorthandDefaultPos){var node=undefined,canBeArrow=this.potentialArrowAt==this.start;switch(this.type){case _tokentype.types._this:case _tokentype.types._super:var type=this.type===_tokentype.types._this?"ThisExpression":"Super";node=this.startNode();this.next();return this.finishNode(node,type);case _tokentype.types._yield:if(this.inGenerator)this.unexpected();case _tokentype.types._do:if(this.options.features["es7.doExpressions"]){var _node=this.startNode();this.next();var oldInFunction=this.inFunction;var oldLabels=this.labels;this.labels=[];this.inFunction=false;_node.body=this.parseBlock();this.inFunction=oldInFunction;this.labels=oldLabels;return this.finishNode(_node,"DoExpression")}case _tokentype.types.name:var start=this.markPosition();node=this.startNode();var id=this.parseIdent(this.type!==_tokentype.types.name);if(this.options.features["es7.asyncFunctions"]){if(id.name==="async"){if(this.type===_tokentype.types.parenL){var expr=this.parseParenAndDistinguishExpression(start,true,true);if(expr&&expr.type==="ArrowFunctionExpression"){return expr}else{node.callee=id;if(!expr){node.arguments=[]}else if(expr.type==="SequenceExpression"){node.arguments=expr.expressions}else{node.arguments=[expr]}return this.parseSubscripts(this.finishNode(node,"CallExpression"),start)}}else if(this.type===_tokentype.types.name){id=this.parseIdent();this.expect(_tokentype.types.arrow);return this.parseArrowExpression(node,[id],true)}if(this.type===_tokentype.types._function&&!this.canInsertSemicolon()){this.next();return this.parseFunction(node,false,false,true)}}else if(id.name==="await"){if(this.inAsync)return this.parseAwait(node)}}if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokentype.types.arrow))return this.parseArrowExpression(this.startNodeAt(start),[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(null,null,canBeArrow);case _tokentype.types.bracketL:node=this.startNode();this.next();if((this.options.ecmaVersion>=7||this.options.features["es7.comprehensions"])&&this.type===_tokentype.types._for){return this.parseComprehension(node,false)}node.elements=this.parseExprList(_tokentype.types.bracketR,true,true,refShorthandDefaultPos);return this.finishNode(node,"ArrayExpression");case _tokentype.types.braceL:return this.parseObj(false,refShorthandDefaultPos);case _tokentype.types._function:node=this.startNode();this.next();return this.parseFunction(node,false);case _tokentype.types.at:this.parseDecorators();case _tokentype.types._class:node=this.startNode();this.takeDecorators(node);return this.parseClass(node,false);case _tokentype.types._new:return this.parseNew();case _tokentype.types.backQuote:return this.parseTemplate();case _tokentype.types.doubleColon:node=this.startNode();this.next();node.object=null;var callee=node.callee=this.parseNoCallExpr();if(callee.type!=="MemberExpression")this.raise(callee.start,"Binding should be performed on object property.");return this.finishNode(node,"BindExpression");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(start,isAsync,canBeArrow){start=start||this.markPosition();var val=undefined;if(this.options.ecmaVersion>=6){this.next();if((this.options.features["es7.comprehensions"]||this.options.ecmaVersion>=7)&&this.type===_tokentype.types._for){return this.parseComprehension(this.startNodeAt(start),true)}var innerStart=this.markPosition(),exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=undefined,innerParenStart=undefined;while(this.type!==_tokentype.types.parenR){first?first=false:this.expect(_tokentype.types.comma);if(this.type===_tokentype.types.ellipsis){var spreadNodeStart=this.markPosition();spreadStart=this.start;exprList.push(this.parseParenItem(this.parseRest(),spreadNodeStart));break}else{if(this.type===_tokentype.types.parenL&&!innerParenStart){innerParenStart=this.start}exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem))}}var innerEnd=this.markPosition();this.expect(_tokentype.types.parenR);if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokentype.types.arrow)){if(innerParenStart)this.unexpected(innerParenStart);return this.parseParenArrowList(start,exprList,isAsync)}if(!exprList.length){if(isAsync){return}else{this.unexpected(this.lastTokStart)}}if(spreadStart)this.unexpected(spreadStart);if(refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(exprList.length>1){val=this.startNodeAt(innerStart);val.expressions=exprList;this.finishNodeAt(val,"SequenceExpression",innerEnd)}else{val=exprList[0]}}else{val=this.parseParenExpression()}if(this.options.preserveParens){var par=this.startNodeAt(start);par.expression=val;return this.finishNode(par,"ParenthesizedExpression")}else{val.parenthesizedExpression=true; -return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseExprOp(expr,start,-1,noIn)};pp.parseExprOp=function(left,leftStart,minPrec,noIn){var prec=this.type.binop;if(prec!=null&&(!noIn||this.type!==tt._in)){if(prec>minPrec){var node=this.startNodeAt(leftStart);node.left=left;node.operator=this.value;var op=this.type;this.next();var start=this.markPosition();node.right=this.parseExprOp(this.parseMaybeUnary(),start,op.rightAssociative?prec-1:prec,noIn);this.finishNode(node,op===tt.logicalOR||op===tt.logicalAND?"LogicalExpression":"BinaryExpression");return this.parseExprOp(node,leftStart,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){if(this.type.prefix){var node=this.startNode(),update=this.type===tt.incDec;node.operator=this.value;node.prefix=true;this.next();node.argument=this.parseMaybeUnary();if(refShorthandDefaultPos&&refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(update)this.checkLVal(node.argument);else if(this.strict&&node.operator==="delete"&&node.argument.type==="Identifier")this.raise(node.start,"Deleting local variable in strict mode");return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var start=this.markPosition();var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.type.postfix&&!this.canInsertSemicolon()){var node=this.startNodeAt(start);node.operator=this.value;node.prefix=false;node.argument=expr;this.checkLVal(expr);this.next();expr=this.finishNode(node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprAtom(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseSubscripts(expr,start)};pp.parseSubscripts=function(base,start,noCalls){if(this.eat(tt.dot)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseIdent(true);node.computed=false;return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(this.eat(tt.bracketL)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseExpression();node.computed=true;this.expect(tt.bracketR);return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(!noCalls&&this.eat(tt.parenL)){var node=this.startNodeAt(start);node.callee=base;node.arguments=this.parseExprList(tt.parenR,false);return this.parseSubscripts(this.finishNode(node,"CallExpression"),start,noCalls)}else if(this.type===tt.backQuote){var node=this.startNodeAt(start);node.tag=base;node.quasi=this.parseTemplate();return this.parseSubscripts(this.finishNode(node,"TaggedTemplateExpression"),start,noCalls)}return base};pp.parseExprAtom=function(refShorthandDefaultPos){var node=undefined;switch(this.type){case tt._this:case tt._super:var type=this.type===tt._this?"ThisExpression":"Super";node=this.startNode();this.next();return this.finishNode(node,type);case tt._yield:if(this.inGenerator)this.unexpected();case tt._do:if(this.options.features["es7.doExpressions"]){var _node=this.startNode();this.next();_node.body=this.parseBlock();return this.finishNode(_node,"DoExpression")}case tt.name:var start=this.markPosition();node=this.startNode();var id=this.parseIdent(this.type!==tt.name);if(this.options.features["es7.asyncFunctions"]){if(id.name==="async"){if(this.type===tt.parenL){var expr=this.parseParenAndDistinguishExpression(start,true);if(expr&&expr.type==="ArrowFunctionExpression"){return expr}else{node.callee=id;if(!expr){node.arguments=[]}else if(expr.type==="SequenceExpression"){node.arguments=expr.expressions}else{node.arguments=[expr]}return this.parseSubscripts(this.finishNode(node,"CallExpression"),start)}}else if(this.type===tt.name){id=this.parseIdent();this.expect(tt.arrow);return this.parseArrowExpression(node,[id],true)}if(this.type===tt._function&&!this.canInsertSemicolon()){this.next();return this.parseFunction(node,false,false,true)}}else if(id.name==="await"){if(this.inAsync)return this.parseAwait(node)}}if(!this.canInsertSemicolon()&&this.eat(tt.arrow)){return this.parseArrowExpression(this.startNodeAt(start),[id])}return id;case tt.regexp:var value=this.value;node=this.parseLiteral(value.value);node.regex={pattern:value.pattern,flags:value.flags};return node;case tt.num:case tt.string:return this.parseLiteral(this.value);case tt._null:case tt._true:case tt._false:node=this.startNode();node.value=this.type===tt._null?null:this.type===tt._true;node.raw=this.type.keyword;this.next();return this.finishNode(node,"Literal");case tt.parenL:return this.parseParenAndDistinguishExpression();case tt.bracketL:node=this.startNode();this.next();if((this.options.ecmaVersion>=7||this.options.features["es7.comprehensions"])&&this.type===tt._for){return this.parseComprehension(node,false)}node.elements=this.parseExprList(tt.bracketR,true,true,refShorthandDefaultPos);return this.finishNode(node,"ArrayExpression");case tt.braceL:return this.parseObj(false,refShorthandDefaultPos);case tt._function:node=this.startNode();this.next();return this.parseFunction(node,false);case tt.at:this.parseDecorators();case tt._class:node=this.startNode();this.takeDecorators(node);return this.parseClass(node,false);case tt._new:return this.parseNew();case tt.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(tt.parenL);var val=this.parseExpression();this.expect(tt.parenR);return val};pp.parseParenAndDistinguishExpression=function(start,isAsync){start=start||this.markPosition();var val=undefined;if(this.options.ecmaVersion>=6){this.next();if((this.options.features["es7.comprehensions"]||this.options.ecmaVersion>=7)&&this.type===tt._for){return this.parseComprehension(this.startNodeAt(start),true)}var innerStart=this.markPosition(),exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=undefined,innerParenStart=undefined;while(this.type!==tt.parenR){first?first=false:this.expect(tt.comma);if(this.type===tt.ellipsis){var spreadNodeStart=this.markPosition();spreadStart=this.start;exprList.push(this.parseParenItem(this.parseRest(),spreadNodeStart));break}else{if(this.type===tt.parenL&&!innerParenStart){innerParenStart=this.start}exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem))}}var innerEnd=this.markPosition();this.expect(tt.parenR);if(!this.canInsertSemicolon()&&this.eat(tt.arrow)){if(innerParenStart)this.unexpected(innerParenStart);return this.parseParenArrowList(start,exprList,isAsync)}if(!exprList.length){if(isAsync){return}else{this.unexpected(this.lastTokStart)}}if(spreadStart)this.unexpected(spreadStart);if(refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(exprList.length>1){val=this.startNodeAt(innerStart);val.expressions=exprList;this.finishNodeAt(val,"SequenceExpression",innerEnd)}else{val=exprList[0]}}else{val=this.parseParenExpression()}if(this.options.preserveParens){var par=this.startNodeAt(start);par.expression=val;return this.finishNode(par,"ParenthesizedExpression")}else{val.parenthesizedExpression=true;return val}};pp.parseParenArrowList=function(start,exprList,isAsync){return this.parseArrowExpression(this.startNodeAt(start),exprList,isAsync)};pp.parseParenItem=function(node,start){return node};var empty=[];pp.parseNew=function(){var node=this.startNode();var meta=this.parseIdent(true);if(this.options.ecmaVersion>=6&&this.eat(tt.dot)){node.meta=meta;node.property=this.parseIdent(true);if(node.property.name!=="target")this.raise(node.property.start,"The only valid meta property for new is new.target");return this.finishNode(node,"MetaProperty")}var start=this.markPosition();node.callee=this.parseSubscripts(this.parseExprAtom(),start,true);if(this.eat(tt.parenL))node.arguments=this.parseExprList(tt.parenR,false);else node.arguments=empty;return this.finishNode(node,"NewExpression")};pp.parseTemplateElement=function(){var elem=this.startNode();elem.value={raw:this.input.slice(this.start,this.end),cooked:this.value};this.next();elem.tail=this.type===tt.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(tt.dollarBraceL);node.expressions.push(this.parseExpression());this.expect(tt.braceR);node.quasis.push(curElt=this.parseTemplateElement())}this.next();return this.finishNode(node,"TemplateLiteral")};pp.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=false,isAsync=false,start=undefined;if(this.options.features["es7.objectRestSpread"]&&this.type===tt.ellipsis){prop=this.parseSpread();prop.type="SpreadProperty";node.properties.push(prop);continue}if(this.options.ecmaVersion>=6){prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos)start=this.markPosition();if(!isPattern)isGenerator=this.eat(tt.star)}if(this.options.features["es7.asyncFunctions"]&&this.isContextual("async")){if(isGenerator||isPattern)this.unexpected();var asyncId=this.parseIdent();if(this.type===tt.colon||this.type===tt.parenL){prop.key=asyncId}else{isAsync=true;this.parsePropertyName(prop)}}else{this.parsePropertyName(prop)}this.parseObjPropValue(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos);this.checkPropClash(prop,propHash);node.properties.push(this.finishNode(prop,"Property"))}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")};pp.parseObjPropValue=function(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos){if(this.eat(tt.colon)){prop.value=isPattern?this.parseMaybeDefault():this.parseMaybeAssign(false,refShorthandDefaultPos);prop.kind="init"}else if(this.options.ecmaVersion>=6&&this.type===tt.parenL){if(isPattern)this.unexpected();prop.kind="init";prop.method=true;prop.value=this.parseMethod(isGenerator,isAsync)}else if(this.options.ecmaVersion>=5&&!prop.computed&&prop.key.type==="Identifier"&&(prop.key.name==="get"||prop.key.name==="set")&&(this.type!=tt.comma&&this.type!=tt.braceR)){if(isGenerator||isAsync||isPattern)this.unexpected();prop.kind=prop.key.name;this.parsePropertyName(prop);prop.value=this.parseMethod(false)}else if(this.options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"){prop.kind="init";if(isPattern){if(this.isKeyword(prop.key.name)||this.strict&&(reservedWords.strictBind(prop.key.name)||reservedWords.strict(prop.key.name))||!this.options.allowReserved&&this.isReservedWord(prop.key.name))this.raise(prop.key.start,"Binding "+prop.key.name);prop.value=this.parseMaybeDefault(start,prop.key)}else if(this.type===tt.eq&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start)refShorthandDefaultPos.start=this.start;prop.value=this.parseMaybeDefault(start,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(tt.bracketL)){prop.computed=true;prop.key=this.parseMaybeAssign();this.expect(tt.bracketR);return}else{prop.computed=false}}prop.key=this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.initFunction=function(node,isAsync){node.id=null;if(this.options.ecmaVersion>=6){node.generator=false;node.expression=false}if(this.options.features["es7.asyncFunctions"]){node.async=!!isAsync}};pp.parseMethod=function(isGenerator,isAsync){var node=this.startNode();this.initFunction(node,isAsync);this.expect(tt.parenL);node.params=this.parseBindingList(tt.parenR,false,false);if(this.options.ecmaVersion>=6){node.generator=isGenerator}this.parseFunctionBody(node);return this.finishNode(node,"FunctionExpression")};pp.parseArrowExpression=function(node,params,isAsync){this.initFunction(node,isAsync);node.params=this.toAssignableList(params,true);this.parseFunctionBody(node,true);return this.finishNode(node,"ArrowFunctionExpression")};pp.parseFunctionBody=function(node,allowExpression){var isExpression=allowExpression&&this.type!==tt.braceL;var oldInAsync=this.inAsync;this.inAsync=node.async;if(isExpression){node.body=this.parseMaybeAssign();node.expression=true}else{var oldInFunc=this.inFunction,oldInGen=this.inGenerator,oldLabels=this.labels;this.inFunction=true;this.inGenerator=node.generator;this.labels=[];node.body=this.parseBlock(true);node.expression=false;this.inFunction=oldInFunc;this.inGenerator=oldInGen;this.labels=oldLabels}this.inAsync=oldInAsync;if(this.strict||!isExpression&&node.body.body.length&&this.isUseStrict(node.body.body[0])){var nameHash={},oldStrict=this.strict;this.strict=true;if(node.id)this.checkLVal(node.id,true);for(var i=0;i=6||this.input.slice(this.start,this.end).indexOf("\\")==-1)))this.raise(this.start,"The keyword '"+this.value+"' is reserved");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")};pp.parseAwait=function(node){if(this.eat(tt.semi)||this.canInsertSemicolon()){this.unexpected()}node.all=this.eat(tt.star);node.argument=this.parseMaybeAssign(true);return this.finishNode(node,"AwaitExpression")};pp.parseYield=function(){var node=this.startNode();this.next();if(this.type==tt.semi||this.canInsertSemicolon()||this.type!=tt.star&&!this.type.startsExpr){node.delegate=false;node.argument=null}else{node.delegate=this.eat(tt.star);node.argument=this.parseMaybeAssign()}return this.finishNode(node,"YieldExpression")};pp.parseComprehension=function(node,isGenerator){node.blocks=[];while(this.type===tt._for){var block=this.startNode();this.next();this.expect(tt.parenL);block.left=this.parseBindingAtom();this.checkLVal(block.left,true);this.expectContextual("of");block.right=this.parseExpression();this.expect(tt.parenR);node.blocks.push(this.finishNode(block,"ComprehensionBlock"))}node.filter=this.eat(tt._if)?this.parseParenExpression():null;node.body=this.parseExpression();this.expect(isGenerator?tt.parenR:tt.bracketR);node.generator=isGenerator;return this.finishNode(node,"ComprehensionExpression")}},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){"use strict";exports.isIdentifierStart=isIdentifierStart;exports.isIdentifierChar=isIdentifierChar;exports.__esModule=true;function makePredicate(words){words=words.split(" ");var f="",cats=[];out:for(var i=0;i3){cats.sort(function(a,b){return b.length-a.length});f+="switch(str.length){";for(var i=0;icode)return false;pos+=set[i+1];if(pos>=code)return true}}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<=65535)return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)}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<=65535)return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}},{}],5:[function(require,module,exports){"use strict";exports.parse=parse;exports.parseExpressionAt=parseExpressionAt;exports.tokenizer=tokenizer;exports.__esModule=true;var _state=require("./state");var Parser=_state.Parser;var _options=require("./options");var getOptions=_options.getOptions;require("./parseutil");require("./statement");require("./lval");require("./expression");require("./lookahead");exports.Parser=_state.Parser;exports.plugins=_state.plugins;exports.defaultOptions=_options.defaultOptions;var _location=require("./location");exports.SourceLocation=_location.SourceLocation;exports.getLineInfo=_location.getLineInfo;exports.Node=require("./node").Node;var _tokentype=require("./tokentype");exports.TokenType=_tokentype.TokenType;exports.tokTypes=_tokentype.types;var _tokencontext=require("./tokencontext");exports.TokContext=_tokencontext.TokContext;exports.tokContexts=_tokencontext.types;var _identifier=require("./identifier");exports.isIdentifierChar=_identifier.isIdentifierChar;exports.isIdentifierStart=_identifier.isIdentifierStart;exports.Token=require("./tokenize").Token;var _whitespace=require("./whitespace");exports.isNewLine=_whitespace.isNewLine;exports.lineBreak=_whitespace.lineBreak;exports.lineBreakG=_whitespace.lineBreakG;require("../plugins/flow");require("../plugins/jsx");var version="1.0.0";exports.version=version;function parse(input,options){var p=parser(options,input);var startPos=p.options.locations?[p.pos,p.curPosition()]:p.pos;p.nextToken();return p.parseTopLevel(p.options.program||p.startNodeAt(startPos))}function parseExpressionAt(input,pos,options){var p=parser(options,input,pos);p.nextToken();return p.parseExpression()}function tokenizer(input,options){return parser(options,input)}function parser(options,input){return new Parser(getOptions(options),String(input))}},{"../plugins/flow":1,"../plugins/jsx":2,"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.getLineInfo=getLineInfo;exports.__esModule=true;var Parser=require("./state").Parser;var lineBreakG=require("./whitespace").lineBreakG;var Position=exports.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}();var SourceLocation=exports.SourceLocation=function SourceLocation(p,start,end){_classCallCheck(this,SourceLocation);this.start=start;this.end=end;if(p.sourceFile!==null)this.source=p.sourceFile};function getLineInfo(input,offset){for(var line=1,cur=0;;){lineBreakG.lastIndex=cur;var match=lineBreakG.exec(input);if(match&&match.index=6&&node){switch(node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var i=0;i=6){node.sourceType=this.options.sourceType}return this.finishNode(node,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp.parseStatement=function(declaration,topLevel){if(this.type===tt.at){this.parseDecorators(true)}var starttype=this.type,node=this.startNode();switch(starttype){case tt._break:case tt._continue:return this.parseBreakContinueStatement(node,starttype.keyword);case tt._debugger:return this.parseDebuggerStatement(node);case tt._do:return this.parseDoStatement(node);case tt._for:return this.parseForStatement(node);case tt._function:if(!declaration&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(node);case tt._class:if(!declaration)this.unexpected();this.takeDecorators(node);return this.parseClass(node,true);case tt._if:return this.parseIfStatement(node);case tt._return:return this.parseReturnStatement(node);case tt._switch:return this.parseSwitchStatement(node);case tt._throw:return this.parseThrowStatement(node);case tt._try:return this.parseTryStatement(node);case tt._let:case tt._const:if(!declaration)this.unexpected();case tt._var:return this.parseVarStatement(node,starttype);case tt._while:return this.parseWhileStatement(node);case tt._with:return this.parseWithStatement(node);case tt.braceL:return this.parseBlock();case tt.semi:return this.parseEmptyStatement(node);case tt._export:case tt._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===tt._import?this.parseImport(node):this.parseExport(node);case tt.name:if(this.options.features["es7.asyncFunctions"]&&this.value==="async"&&this.lookahead().type===tt._function){this.next();this.expect(tt._function);return this.parseFunction(node,true,false,true)}default:var maybeName=this.value,expr=this.parseExpression();if(starttype===tt.name&&expr.type==="Identifier"&&this.eat(tt.colon))return this.parseLabeledStatement(node,maybeName,expr);else return this.parseExpressionStatement(node,expr)}};pp.takeDecorators=function(node){if(this.decorators.length){node.decorators=this.decorators;this.decorators=[]}};pp.parseDecorators=function(allowExport){while(this.type===tt.at){this.decorators.push(this.parseDecorator())}if(allowExport&&this.type===tt._export){return}if(this.type!==tt._class){this.raise(this.start,"Leading decorators must be attached to a class declaration")}};pp.parseDecorator=function(allowExport){if(!this.options.features["es7.decorators"]){this.unexpected()}var node=this.startNode();this.next();node.expression=this.parseMaybeAssign();return this.finishNode(node,"Decorator")};pp.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword=="break";this.next();if(this.eat(tt.semi)||this.insertSemicolon())node.label=null;else if(this.type!==tt.name)this.unexpected();else{node.label=this.parseIdent();this.semicolon()}for(var i=0;i=6)this.eat(tt.semi);else this.semicolon();return this.finishNode(node,"DoWhileStatement")};pp.parseForStatement=function(node){this.next();this.labels.push(loopLabel);this.expect(tt.parenL);if(this.type===tt.semi)return this.parseFor(node,null);if(this.type===tt._var||this.type===tt._let||this.type===tt._const){var _init=this.startNode(),varKind=this.type;this.next();this.parseVar(_init,true,varKind);this.finishNode(_init,"VariableDeclaration");if((this.type===tt._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&_init.declarations.length===1&&!(varKind!==tt._var&&_init.declarations[0].init))return this.parseForIn(node,_init);return this.parseFor(node,_init)}var refShorthandDefaultPos={start:0};var init=this.parseExpression(true,refShorthandDefaultPos);if(this.type===tt._in||this.options.ecmaVersion>=6&&this.isContextual("of")){this.toAssignable(init);this.checkLVal(init);return this.parseForIn(node,init)}else if(refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}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(tt._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();if(this.eat(tt.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(tt.braceL);this.labels.push(switchLabel);for(var cur,sawDefault;this.type!=tt.braceR;){if(this.type===tt._case||this.type===tt._default){var isCase=this.type===tt._case;if(cur)this.finishNode(cur,"SwitchCase");node.cases.push(cur=this.startNode());cur.consequent=[];this.next();if(isCase){cur.test=this.parseExpression()}else{if(sawDefault)this.raise(this.lastTokStart,"Multiple default clauses");sawDefault=true;cur.test=null}this.expect(tt.colon)}else{if(!cur)this.unexpected();cur.consequent.push(this.parseStatement(true))}}if(cur)this.finishNode(cur,"SwitchCase");this.next();this.labels.pop();return this.finishNode(node,"SwitchStatement")};pp.parseThrowStatement=function(node){this.next();if(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")};var empty=[];pp.parseTryStatement=function(node){this.next();node.block=this.parseBlock();node.handler=null;if(this.type===tt._catch){var clause=this.startNode();this.next();this.expect(tt.parenL);clause.param=this.parseBindingAtom();this.checkLVal(clause.param,true);this.expect(tt.parenR);clause.guard=null;clause.body=this.parseBlock();node.handler=this.finishNode(clause,"CatchClause")}node.guardedHandlers=empty;node.finalizer=this.eat(tt._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=6&&this.isContextual("of"))){this.unexpected()}else if(decl.id.type!="Identifier"&&!(isFor&&(this.type===tt._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(tt.comma))break}return node};pp.parseVarHead=function(decl){decl.id=this.parseBindingAtom();this.checkLVal(decl.id,true)};pp.parseFunction=function(node,isStatement,allowExpressionBody,isAsync){this.initFunction(node,isAsync);if(this.options.ecmaVersion>=6)node.generator=this.eat(tt.star);if(isStatement||this.type===tt.name)node.id=this.parseIdent();this.parseFunctionParams(node);this.parseFunctionBody(node,allowExpressionBody);return this.finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")};pp.parseFunctionParams=function(node){this.expect(tt.parenL);node.params=this.parseBindingList(tt.parenR,false,false)};pp.parseClass=function(node,isStatement){this.next();this.parseClassId(node,isStatement);this.parseClassSuper(node);var classBody=this.startNode();classBody.body=[];this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(this.eat(tt.semi))continue;if(this.type===tt.at){this.decorators.push(this.parseDecorator());continue}var method=this.startNode();this.takeDecorators(method);var isGenerator=this.eat(tt.star),isAsync=false;this.parsePropertyName(method);if(this.type!==tt.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="static"){if(isGenerator)this.unexpected();method["static"]=true;isGenerator=this.eat(tt.star);this.parsePropertyName(method)}else{method["static"]=false}if(!isGenerator&&method.key.type==="Identifier"&&!method.computed&&this.isClassProperty()){classBody.body.push(this.parseClassProperty(method));continue}if(this.options.features["es7.asyncFunctions"]&&this.type!==tt.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async"){isAsync=true;this.parsePropertyName(method)}method.kind="method";if(!method.computed&&!isGenerator){if(method.key.type==="Identifier"){if(this.type!==tt.parenL&&(method.key.name==="get"||method.key.name==="set")){method.kind=method.key.name;this.parsePropertyName(method)}else if(!method["static"]&&method.key.name==="constructor"){method.kind="constructor"}}else if(!method["static"]&&method.key.type==="Literal"&&method.key.value==="constructor"){method.kind="constructor"}}if(method.kind==="constructor"&&method.decorators){this.raise(method.start,"You can't attach decorators to a class constructor")}this.parseClassMethod(classBody,method,isGenerator,isAsync)}if(this.decorators.length){this.raise(this.start,"You have trailing decorators with no method")}node.body=this.finishNode(classBody,"ClassBody");return this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")};pp.isClassProperty=function(){return this.type===tt.eq||(this.type===tt.semi||this.canInsertSemicolon())};pp.parseClassProperty=function(node){if(this.type===tt.eq){if(!this.options.features["es7.classProperties"])this.unexpected();this.next();node.value=this.parseMaybeAssign()}else{node.value=null}this.semicolon();return this.finishNode(node,"ClassProperty")};pp.parseClassMethod=function(classBody,method,isGenerator,isAsync){method.value=this.parseMethod(isGenerator,isAsync);classBody.body.push(this.finishNode(method,"MethodDefinition"))};pp.parseClassId=function(node,isStatement){node.id=this.type===tt.name?this.parseIdent():isStatement?this.unexpected():null};pp.parseClassSuper=function(node){node.superClass=this.eat(tt._extends)?this.parseExprSubscripts():null};pp.parseExport=function(node){this.next();if(this.type===tt.star){var specifier=this.startNode();this.next();if(this.options.features["es7.exportExtensions"]&&this.eatContextual("as")){specifier.exported=this.parseIdent();node.specifiers=[this.finishNode(specifier,"ExportNamespaceSpecifier")];this.parseExportSpecifiersMaybe(node);this.parseExportFrom(node)}else{this.parseExportFrom(node);return this.finishNode(node,"ExportAllDeclaration")}}else if(this.isExportDefaultSpecifier()){var specifier=this.startNode();specifier.exported=this.parseIdent(true);node.specifiers=[this.finishNode(specifier,"ExportDefaultSpecifier")];if(this.type===tt.comma&&this.lookahead().type===tt.star){this.expect(tt.comma);var _specifier=this.startNode();this.expect(tt.star);this.expectContextual("as");_specifier.exported=this.parseIdent();node.specifiers.push(this.finishNode(_specifier,"ExportNamespaceSpecifier"))}else{this.parseExportSpecifiersMaybe(node)}this.parseExportFrom(node)}else if(this.eat(tt._default)){var expr=this.parseMaybeAssign();var needsSemi=true;if(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();this.checkExport(node);return this.finishNode(node,"ExportDefaultDeclaration")}else if(this.type.keyword||this.shouldParseExportDeclaration()){node.declaration=this.parseStatement(true);node.specifiers=[];node.source=null}else{node.declaration=null;node.specifiers=this.parseExportSpecifiers();if(this.eatContextual("from")){node.source=this.type===tt.string?this.parseExprAtom():this.unexpected()}else{node.source=null}this.semicolon()}this.checkExport(node);return this.finishNode(node,"ExportNamedDeclaration")};pp.isExportDefaultSpecifier=function(){if(this.type===tt.name){return this.value!=="type"&&this.value!=="async"}if(this.type!==tt._default){return false}var lookahead=this.lookahead();return lookahead.type===tt.comma||lookahead.type===tt.name&&lookahead.value==="from"};pp.parseExportSpecifiersMaybe=function(node){if(this.eat(tt.comma)){node.specifiers=node.specifiers.concat(this.parseExportSpecifiers())}};pp.parseExportFrom=function(node){this.expectContextual("from");node.source=this.type===tt.string?this.parseExprAtom():this.unexpected();this.semicolon();this.checkExport(node)};pp.shouldParseExportDeclaration=function(){return this.options.features["es7.asyncFunctions"]&&this.isContextual("async")};pp.checkExport=function(node){if(this.decorators.length){var isClass=node.declaration&&(node.declaration.type==="ClassDeclaration"||node.declaration.type==="ClassExpression");if(!node.declaration||!isClass){this.raise(node.start,"You can only use decorators on an export when exporting a class")}this.takeDecorators(node.declaration)}};pp.parseExportSpecifiers=function(){var nodes=[],first=true;this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(!first){this.expect(tt.comma);if(this.afterTrailingComma(tt.braceR))break}else first=false;var node=this.startNode();node.local=this.parseIdent(this.type===tt._default);node.exported=this.eatContextual("as")?this.parseIdent(true):node.local;nodes.push(this.finishNode(node,"ExportSpecifier"))}return nodes};pp.parseImport=function(node){this.next();if(this.type===tt.string){node.specifiers=empty;node.source=this.parseExprAtom();node.kind=""}else{node.specifiers=[];this.parseImportSpecifiers(node);this.expectContextual("from");node.source=this.type===tt.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(node,"ImportDeclaration")};pp.parseImportSpecifiers=function(node){var first=true;if(this.type===tt.name){var start=this.markPosition();node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(),start));if(!this.eat(tt.comma))return}if(this.type===tt.star){var specifier=this.startNode();this.next();this.expectContextual("as");specifier.local=this.parseIdent();this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportNamespaceSpecifier"));return}this.expect(tt.braceL);while(!this.eat(tt.braceR)){if(!first){this.expect(tt.comma);if(this.afterTrailingComma(tt.braceR))break}else first=false;var specifier=this.startNode();specifier.imported=this.parseIdent(true);specifier.local=this.eatContextual("as")?this.parseIdent():specifier.imported;this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportSpecifier"))}};pp.parseImportSpecifierDefault=function(id,start){var node=this.startNodeAt(start);node.local=id;this.checkLVal(node.local,true);return this.finishNode(node,"ImportDefaultSpecifier")}},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var Parser=require("./state").Parser;var tt=require("./tokentype").types;var lineBreak=require("./whitespace").lineBreak;var TokContext=exports.TokContext=function TokContext(token,isExpr,preserveSpace,override){_classCallCheck(this,TokContext);this.token=token;this.isExpr=isExpr;this.preserveSpace=preserveSpace;this.override=override};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=Parser.prototype;pp.initialContext=function(){return[types.b_stat]};pp.braceIsBlock=function(prevType){var parent=undefined;if(prevType===tt.colon&&(parent=this.curContext()).token=="{")return!parent.isExpr;if(prevType===tt._return)return lineBreak.test(this.input.slice(this.lastTokEnd,this.start));if(prevType===tt._else||prevType===tt.semi||prevType===tt.eof)return true;if(prevType==tt.braceL)return this.curContext()===types.b_stat;return!this.exprAllowed};pp.updateContext=function(prevType){var update=undefined,type=this.type;if(type.keyword&&prevType==tt.dot)this.exprAllowed=false;else if(update=type.updateContext)update.call(this,prevType);else this.exprAllowed=type.beforeExpr};tt.parenR.updateContext=tt.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}};tt.braceL.updateContext=function(prevType){this.context.push(this.braceIsBlock(prevType)?types.b_stat:types.b_expr);this.exprAllowed=true};tt.dollarBraceL.updateContext=function(){this.context.push(types.b_tmpl);this.exprAllowed=true};tt.parenL.updateContext=function(prevType){var statementParens=prevType===tt._if||prevType===tt._for||prevType===tt._with||prevType===tt._while;this.context.push(statementParens?types.p_stat:types.p_expr);this.exprAllowed=true};tt.incDec.updateContext=function(){};tt._function.updateContext=function(){if(this.curContext()!==types.b_stat)this.context.push(types.f_expr);this.exprAllowed=false};tt.backQuote.updateContext=function(){if(this.curContext()===types.q_tmpl)this.context.pop();else this.context.push(types.q_tmpl);this.exprAllowed=false}},{"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var _identifier=require("./identifier");var isIdentifierStart=_identifier.isIdentifierStart;var isIdentifierChar=_identifier.isIdentifierChar;var _tokentype=require("./tokentype");var tt=_tokentype.types;var keywordTypes=_tokentype.keywords;var Parser=require("./state").Parser;var SourceLocation=require("./location").SourceLocation;var _whitespace=require("./whitespace");var lineBreak=_whitespace.lineBreak;var lineBreakG=_whitespace.lineBreakG;var isNewLine=_whitespace.isNewLine;var nonASCIIwhitespace=_whitespace.nonASCIIwhitespace;var Token=exports.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 SourceLocation(p,p.startLoc,p.endLoc);if(p.options.ranges)this.range=[p.start,p.end]};var pp=Parser.prototype;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(typeof Symbol!=="undefined")pp[Symbol.iterator]=function(){var self=this;return{next:function next(){var token=self.getToken();return{done:token.type===tt.eof,value:token}}}};pp.setStrict=function(strict){this.strict=strict;if(this.type!==tt.num&&this.type!==tt.string)return;this.pos=this.start;if(this.options.locations){while(this.pos=this.input.length)return this.finishToken(tt.eof);if(curContext.override)return curContext.override(this);else this.readToken(this.fullCharCodeAtPos())};pp.readToken=function(code){if(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<=55295||code>=57344)return code;var next=this.input.charCodeAt(this.pos+1);return(code<<10)+next-56613888};pp.skipBlockComment=function(){var startLoc=this.options.onComment&&this.options.locations&&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){lineBreakG.lastIndex=start;var match=undefined;while((match=lineBreakG.exec(this.input))&&match.index8&&ch<14){++this.pos}else if(ch===47){var next=this.input.charCodeAt(this.pos+1);if(next===42){this.skipBlockComment()}else if(next===47){this.skipLineComment(2)}else break}else if(ch===160){++this.pos}else if(ch>=5760&&nonASCIIwhitespace.test(String.fromCharCode(ch))){++this.pos}else{break}}};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)};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){this.pos+=3;return this.finishToken(tt.ellipsis)}else{++this.pos;return this.finishToken(tt.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(tt.assign,2);return this.finishOp(tt.slash,1)};pp.readToken_mult_modulo=function(code){var type=code===42?tt.star:tt.modulo;var width=1;var next=this.input.charCodeAt(this.pos+1);if(next===42){width++;next=this.input.charCodeAt(this.pos+2);type=tt.exponent}if(next===61){width++;type=tt.assign}return this.finishOp(type,width)};pp.readToken_pipe_amp=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===code)return this.finishOp(code===124?tt.logicalOR:tt.logicalAND,2);if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(code===124?tt.bitwiseOR:tt.bitwiseAND,1)};pp.readToken_caret=function(){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(tt.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&&lineBreak.test(this.input.slice(this.lastTokEnd,this.pos))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(tt.incDec,2)}if(next===61)return this.finishOp(tt.assign,2);return this.finishOp(tt.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(tt.assign,size+1);return this.finishOp(tt.bitShift,size)}if(next==33&&code==60&&this.input.charCodeAt(this.pos+2)==45&&this.input.charCodeAt(this.pos+3)==45){if(this.inModule)unexpected();this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(next===61)size=this.input.charCodeAt(this.pos+2)===61?3:2;return this.finishOp(tt.relational,size)};pp.readToken_eq_excl=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(tt.equality,this.input.charCodeAt(this.pos+2)===61?3:2); + return val}};pp.parseParenArrowList=function(start,exprList,isAsync){return this.parseArrowExpression(this.startNodeAt(start),exprList,isAsync)};pp.parseParenItem=function(node,start){return node};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.raise(node.property.start,"The only valid meta property for new is new.target");return this.finishNode(node,"MetaProperty")}node.callee=this.parseNoCallExpr();if(this.eat(_tokentype.types.parenL))node.arguments=this.parseExprList(_tokentype.types.parenR,this.options.features["es7.trailingFunctionCommas"]);else node.arguments=empty;return this.finishNode(node,"NewExpression")};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")};pp.parseObj=function(isPattern,refShorthandDefaultPos){var node=this.startNode(),first=true,propHash={};node.properties=[];var decorators=[];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;while(this.type===_tokentype.types.at){decorators.push(this.parseDecorator())}var prop=this.startNode(),isGenerator=false,isAsync=false,_start2=undefined;if(decorators.length){prop.decorators=decorators;decorators=[]}if(this.options.features["es7.objectRestSpread"]&&this.type===_tokentype.types.ellipsis){prop=this.parseSpread();prop.type="SpreadProperty";node.properties.push(prop);continue}if(this.options.ecmaVersion>=6){prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos)_start2=this.markPosition();if(!isPattern)isGenerator=this.eat(_tokentype.types.star)}if(this.options.features["es7.asyncFunctions"]&&this.isContextual("async")){if(isGenerator||isPattern)this.unexpected();var asyncId=this.parseIdent();if(this.type===_tokentype.types.colon||this.type===_tokentype.types.parenL){prop.key=asyncId}else{isAsync=true;this.parsePropertyName(prop)}}else{this.parsePropertyName(prop)}this.parseObjPropValue(prop,_start2,isGenerator,isAsync,isPattern,refShorthandDefaultPos);this.checkPropClash(prop,propHash);node.properties.push(this.finishNode(prop,"Property"))}if(decorators.length){this.raise(this.start,"You have trailing decorators with no property")}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")};pp.parseObjPropValue=function(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos){if(this.eat(_tokentype.types.colon)){prop.value=isPattern?this.parseMaybeDefault():this.parseMaybeAssign(false,refShorthandDefaultPos);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,isAsync)}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||isAsync||isPattern)this.unexpected();prop.kind=prop.key.name;this.parsePropertyName(prop);prop.value=this.parseMethod(false)}else if(this.options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"){prop.kind="init";if(isPattern){if(this.isKeyword(prop.key.name)||this.strict&&(_identifier.reservedWords.strictBind(prop.key.name)||_identifier.reservedWords.strict(prop.key.name))||!this.options.allowReserved&&this.isReservedWord(prop.key.name))this.raise(prop.key.start,"Binding "+prop.key.name);prop.value=this.parseMaybeDefault(start,prop.key)}else if(this.type===_tokentype.types.eq&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start)refShorthandDefaultPos.start=this.start;prop.value=this.parseMaybeDefault(start,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}else{prop.computed=false}}prop.key=this.type===_tokentype.types.num||this.type===_tokentype.types.string?this.parseExprAtom():this.parseIdent(true)};pp.initFunction=function(node,isAsync){node.id=null;if(this.options.ecmaVersion>=6){node.generator=false;node.expression=false}if(this.options.features["es7.asyncFunctions"]){node.async=!!isAsync}};pp.parseMethod=function(isGenerator,isAsync){var node=this.startNode();this.initFunction(node,isAsync);this.expect(_tokentype.types.parenL);node.params=this.parseBindingList(_tokentype.types.parenR,false,this.options.features["es7.trailingFunctionCommas"]);if(this.options.ecmaVersion>=6){node.generator=isGenerator}this.parseFunctionBody(node);return this.finishNode(node,"FunctionExpression")};pp.parseArrowExpression=function(node,params,isAsync){this.initFunction(node,isAsync);node.params=this.toAssignableList(params,true);this.parseFunctionBody(node,true);return this.finishNode(node,"ArrowFunctionExpression")};pp.parseFunctionBody=function(node,allowExpression){var isExpression=allowExpression&&this.type!==_tokentype.types.braceL;var oldInAsync=this.inAsync;this.inAsync=node.async;if(isExpression){node.body=this.parseMaybeAssign();node.expression=true}else{var oldInFunc=this.inFunction,oldInGen=this.inGenerator,oldLabels=this.labels;this.inFunction=true;this.inGenerator=node.generator;this.labels=[];node.body=this.parseBlock(true);node.expression=false;this.inFunction=oldInFunc;this.inGenerator=oldInGen;this.labels=oldLabels}this.inAsync=oldInAsync;if(this.strict||!isExpression&&node.body.body.length&&this.isUseStrict(node.body.body[0])){var nameHash={},oldStrict=this.strict;this.strict=true;if(node.id)this.checkLVal(node.id,true);for(var i=0;i=6||this.input.slice(this.start,this.end).indexOf("\\")==-1)))this.raise(this.start,"The keyword '"+this.value+"' is reserved");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")};pp.parseAwait=function(node){if(this.eat(_tokentype.types.semi)||this.canInsertSemicolon()){this.unexpected()}node.all=this.eat(_tokentype.types.star);node.argument=this.parseMaybeUnary();return this.finishNode(node,"AwaitExpression")};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")};pp.parseComprehension=function(node,isGenerator){node.blocks=[];while(this.type===_tokentype.types._for){var block=this.startNode();this.next();this.expect(_tokentype.types.parenL);block.left=this.parseBindingAtom();this.checkLVal(block.left,true);this.expectContextual("of");block.right=this.parseExpression();this.expect(_tokentype.types.parenR);node.blocks.push(this.finishNode(block,"ComprehensionBlock"))}node.filter=this.eat(_tokentype.types._if)?this.parseParenExpression():null;node.body=this.parseExpression();this.expect(isGenerator?_tokentype.types.parenR:_tokentype.types.bracketR);node.generator=isGenerator;return this.finishNode(node,"ComprehensionExpression")}},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isIdentifierStart=isIdentifierStart;exports.isIdentifierChar=isIdentifierChar;function makePredicate(words){words=words.split(" ");return function(str){return words.indexOf(str)>=0}}var reservedWords={3:makePredicate("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:makePredicate("class enum extends super const export import"),6:makePredicate("enum await"),strict:makePredicate("implements interface let package private protected public static yield"),strictBind:makePredicate("eval arguments")};exports.reservedWords=reservedWords;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:makePredicate(ecma5AndLessKeywords),6:makePredicate(ecma5AndLessKeywords+" let const class extends export import yield super")};exports.keywords=keywords;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;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,98,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,955,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,38,17,2,24,133,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,32,4,287,47,21,1,2,0,185,46,82,47,21,0,60,42,502,63,32,0,449,56,1288,920,104,110,2962,1070,13266,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,16355,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,16,9,83,11,168,11,6,9,8,2,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,316,19,13,9,214,6,3,8,112,16,16,9,82,12,9,9,535,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,4305,6,792618,239];function isInAstralSet(code,set){var pos=65536;for(var i=0;icode)return false;pos+=set[i+1];if(pos>=code)return true}}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<=65535)return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)}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<=65535)return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}},{}],5:[function(require,module,exports){"use strict";exports.__esModule=true;exports.parse=parse;exports.parseExpressionAt=parseExpressionAt;exports.tokenizer=tokenizer;var _state=require("./state");var _options=require("./options");require("./parseutil");require("./statement");require("./lval");require("./expression");require("./lookahead");exports.Parser=_state.Parser;exports.plugins=_state.plugins;exports.defaultOptions=_options.defaultOptions;var _location=require("./location");exports.SourceLocation=_location.SourceLocation;exports.getLineInfo=_location.getLineInfo;var _node=require("./node");exports.Node=_node.Node;var _tokentype=require("./tokentype");exports.TokenType=_tokentype.TokenType;exports.tokTypes=_tokentype.types;var _tokencontext=require("./tokencontext");exports.TokContext=_tokencontext.TokContext;exports.tokContexts=_tokencontext.types;var _identifier=require("./identifier");exports.isIdentifierChar=_identifier.isIdentifierChar;exports.isIdentifierStart=_identifier.isIdentifierStart;var _tokenize=require("./tokenize");exports.Token=_tokenize.Token;var _whitespace=require("./whitespace");exports.isNewLine=_whitespace.isNewLine;exports.lineBreak=_whitespace.lineBreak;exports.lineBreakG=_whitespace.lineBreakG;var version="1.0.0";exports.version=version;function parse(input,options){var p=parser(options,input);var startPos=p.options.locations?[p.pos,p.curPosition()]:p.pos;p.nextToken();return p.parseTopLevel(p.options.program||p.startNodeAt(startPos))}function parseExpressionAt(input,pos,options){var p=parser(options,input,pos);p.nextToken();return p.parseExpression()}function tokenizer(input,options){return parser(options,input)}function parser(options,input){return new _state.Parser((0,_options.getOptions)(options),String(input))}},{"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,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 _state=require("./state");var _whitespace=require("./whitespace");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};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=6&&node){switch(node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var i=0;i=6){node.sourceType=this.options.sourceType}return this.finishNode(node,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp.parseStatement=function(declaration,topLevel){if(this.type===_tokentype.types.at){this.parseDecorators(true)}var starttype=this.type,node=this.startNode();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();this.takeDecorators(node);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._let:case _tokentype.types._const:if(!declaration)this.unexpected();case _tokentype.types._var:return this.parseVarStatement(node,starttype);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);case _tokentype.types.name:if(this.options.features["es7.asyncFunctions"]&&this.value==="async"&&this.lookahead().type===_tokentype.types._function){this.next();this.expect(_tokentype.types._function);return this.parseFunction(node,true,false,true)}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.takeDecorators=function(node){if(this.decorators.length){node.decorators=this.decorators;this.decorators=[]}};pp.parseDecorators=function(allowExport){while(this.type===_tokentype.types.at){this.decorators.push(this.parseDecorator())}if(allowExport&&this.type===_tokentype.types._export){ + return}if(this.type!==_tokentype.types._class){this.raise(this.start,"Leading decorators must be attached to a class declaration")}};pp.parseDecorator=function(allowExport){if(!this.options.features["es7.decorators"]){this.unexpected()}var node=this.startNode();this.next();node.expression=this.parseMaybeAssign();return this.finishNode(node,"Decorator")};pp.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword=="break";this.next();if(this.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()}for(var i=0;i=6)this.eat(_tokentype.types.semi);else this.semicolon();return this.finishNode(node,"DoWhileStatement")};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);if(this.type===_tokentype.types._var||this.type===_tokentype.types._let||this.type===_tokentype.types._const){var _init=this.startNode(),varKind=this.type;this.next();this.parseVar(_init,true,varKind);this.finishNode(_init,"VariableDeclaration");if((this.type===_tokentype.types._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&_init.declarations.length===1&&!(varKind!==_tokentype.types._var&&_init.declarations[0].init))return this.parseForIn(node,_init);return this.parseFor(node,_init)}var refShorthandDefaultPos={start:0};var init=this.parseExpression(true,refShorthandDefaultPos);if(this.type===_tokentype.types._in||this.options.ecmaVersion>=6&&this.isContextual("of")){this.toAssignable(init);this.checkLVal(init);return this.parseForIn(node,init)}else if(refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}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();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);for(var cur,sawDefault;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.raise(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();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")};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.guard=null;clause.body=this.parseBlock();node.handler=this.finishNode(clause,"CatchClause")}node.guardedHandlers=empty;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=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.parseVarHead=function(decl){decl.id=this.parseBindingAtom();this.checkLVal(decl.id,true)};pp.parseFunction=function(node,isStatement,allowExpressionBody,isAsync){this.initFunction(node,isAsync);if(this.options.ecmaVersion>=6)node.generator=this.eat(_tokentype.types.star);if(isStatement||this.type===_tokentype.types.name)node.id=this.parseIdent();this.parseFunctionParams(node);this.parseFunctionBody(node,allowExpressionBody);return this.finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")};pp.parseFunctionParams=function(node){this.expect(_tokentype.types.parenL);node.params=this.parseBindingList(_tokentype.types.parenR,false,this.options.features["es7.trailingFunctionCommas"])};pp.parseClass=function(node,isStatement){this.next();this.parseClassId(node,isStatement);this.parseClassSuper(node);var classBody=this.startNode();classBody.body=[];this.expect(_tokentype.types.braceL);var decorators=[];while(!this.eat(_tokentype.types.braceR)){if(this.eat(_tokentype.types.semi))continue;if(this.type===_tokentype.types.at){decorators.push(this.parseDecorator());continue}var method=this.startNode();if(decorators.length){method.decorators=decorators;decorators=[]}var isGenerator=this.eat(_tokentype.types.star),isAsync=false;this.parsePropertyName(method);if(this.type!==_tokentype.types.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="static"){if(isGenerator)this.unexpected();method["static"]=true;isGenerator=this.eat(_tokentype.types.star);this.parsePropertyName(method)}else{method["static"]=false}if(!isGenerator&&method.key.type==="Identifier"&&!method.computed&&this.isClassProperty()){classBody.body.push(this.parseClassProperty(method));continue}if(this.options.features["es7.asyncFunctions"]&&this.type!==_tokentype.types.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async"){isAsync=true;this.parsePropertyName(method)}method.kind="method";if(!method.computed&&!isGenerator&&!isAsync){if(method.key.type==="Identifier"){if(this.type!==_tokentype.types.parenL&&(method.key.name==="get"||method.key.name==="set")){method.kind=method.key.name;this.parsePropertyName(method)}else if(!method["static"]&&method.key.name==="constructor"){method.kind="constructor"}}else if(!method["static"]&&method.key.type==="Literal"&&method.key.value==="constructor"){method.kind="constructor"}}if(method.kind==="constructor"&&method.decorators){this.raise(method.start,"You can't attach decorators to a class constructor")}this.parseClassMethod(classBody,method,isGenerator,isAsync)}if(decorators.length){this.raise(this.start,"You have trailing decorators with no method")}node.body=this.finishNode(classBody,"ClassBody");return this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")};pp.isClassProperty=function(){return this.type===_tokentype.types.eq||(this.type===_tokentype.types.semi||this.canInsertSemicolon())};pp.parseClassProperty=function(node){if(this.type===_tokentype.types.eq){if(!this.options.features["es7.classProperties"])this.unexpected();this.next();node.value=this.parseMaybeAssign()}else{node.value=null}this.semicolon();return this.finishNode(node,"ClassProperty")};pp.parseClassMethod=function(classBody,method,isGenerator,isAsync){method.value=this.parseMethod(isGenerator,isAsync);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};pp.parseExport=function(node){this.next();if(this.type===_tokentype.types.star){var specifier=this.startNode();this.next();if(this.options.features["es7.exportExtensions"]&&this.eatContextual("as")){specifier.exported=this.parseIdent();node.specifiers=[this.finishNode(specifier,"ExportNamespaceSpecifier")];this.parseExportSpecifiersMaybe(node);this.parseExportFrom(node)}else{this.parseExportFrom(node);return this.finishNode(node,"ExportAllDeclaration")}}else if(this.options.features["es7.exportExtensions"]&&this.isExportDefaultSpecifier()){var specifier=this.startNode();specifier.exported=this.parseIdent(true);node.specifiers=[this.finishNode(specifier,"ExportDefaultSpecifier")];if(this.type===_tokentype.types.comma&&this.lookahead().type===_tokentype.types.star){this.expect(_tokentype.types.comma);var _specifier=this.startNode();this.expect(_tokentype.types.star);this.expectContextual("as");_specifier.exported=this.parseIdent();node.specifiers.push(this.finishNode(_specifier,"ExportNamespaceSpecifier"))}else{this.parseExportSpecifiersMaybe(node)}this.parseExportFrom(node)}else if(this.eat(_tokentype.types._default)){var _expr=this.parseMaybeAssign();var needsSemi=true;if(_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();this.checkExport(node);return this.finishNode(node,"ExportDefaultDeclaration")}else if(this.type.keyword||this.shouldParseExportDeclaration()){node.declaration=this.parseStatement(true);node.specifiers=[];node.source=null}else{node.declaration=null;node.specifiers=this.parseExportSpecifiers();if(this.eatContextual("from")){node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected()}else{node.source=null}this.semicolon()}this.checkExport(node);return this.finishNode(node,"ExportNamedDeclaration")};pp.isExportDefaultSpecifier=function(){if(this.type===_tokentype.types.name){return this.value!=="type"&&this.value!=="async"}if(this.type!==_tokentype.types._default){return false}var lookahead=this.lookahead();return lookahead.type===_tokentype.types.comma||lookahead.type===_tokentype.types.name&&lookahead.value==="from"};pp.parseExportSpecifiersMaybe=function(node){if(this.eat(_tokentype.types.comma)){node.specifiers=node.specifiers.concat(this.parseExportSpecifiers())}};pp.parseExportFrom=function(node){this.expectContextual("from");node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected();this.semicolon();this.checkExport(node)};pp.shouldParseExportDeclaration=function(){return this.options.features["es7.asyncFunctions"]&&this.isContextual("async")};pp.checkExport=function(node){if(this.decorators.length){var isClass=node.declaration&&(node.declaration.type==="ClassDeclaration"||node.declaration.type==="ClassExpression");if(!node.declaration||!isClass){this.raise(node.start,"You can only use decorators on an export when exporting a class")}this.takeDecorators(node.declaration)}};pp.parseExportSpecifiers=function(){var nodes=[],first=true;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};pp.parseImport=function(node){this.next();if(this.type===_tokentype.types.string){node.specifiers=empty;node.source=this.parseExprAtom()}else{node.specifiers=[];this.parseImportSpecifiers(node);this.expectContextual("from");node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(node,"ImportDeclaration")};pp.parseImportSpecifiers=function(node){var first=true;if(this.type===_tokentype.types.name){var start=this.markPosition();node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(),start));if(!this.eat(_tokentype.types.comma))return}if(this.type===_tokentype.types.star){var specifier=this.startNode();this.next();this.expectContextual("as");specifier.local=this.parseIdent();this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportNamespaceSpecifier"));return}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 specifier=this.startNode();specifier.imported=this.parseIdent(true);specifier.local=this.eatContextual("as")?this.parseIdent():specifier.imported;this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportSpecifier"))}};pp.parseImportSpecifierDefault=function(id,start){var node=this.startNodeAt(start);node.local=id;this.checkLVal(node.local,true);return this.finishNode(node,"ImportDefaultSpecifier")}},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,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=require("./state");var _tokentype=require("./tokentype");var _whitespace=require("./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){var parent=undefined;if(prevType===_tokentype.types.colon&&(parent=this.curContext()).token=="{")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)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};_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(){};_tokentype.types._function.updateContext=function(){if(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":12,"./tokentype":16,"./whitespace":18}],15:[function(require,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=require("./identifier");var _tokentype=require("./tokentype");var _state=require("./state");var _location=require("./location");var _whitespace=require("./whitespace");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 _location.SourceLocation(p,p.startLoc,p.endLoc);if(p.options.ranges)this.range=[p.start,p.end]};exports.Token=Token;var pp=_state.Parser.prototype;pp.next=function(){if(this.options.onToken&&!this.isLookahead)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(typeof Symbol!=="undefined")pp[Symbol.iterator]=function(){var self=this;return{next:function next(){var token=self.getToken();return{done:token.type===_tokentype.types.eof,value:token}}}};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.input.length)return this.finishToken(_tokentype.types.eof);if(curContext.override)return curContext.override(this);else this.readToken(this.fullCharCodeAtPos())};pp.readToken=function(code){if((0,_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<=55295||code>=57344)return code;var next=this.input.charCodeAt(this.pos+1);return(code<<10)+next-56613888};pp.skipBlockComment=function(){var startLoc=this.options.onComment&&this.options.locations&&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.index8&&ch<14){++this.pos}else if(ch===47){var _next2=this.input.charCodeAt(this.pos+1);if(_next2===42){this.skipBlockComment()}else if(_next2===47){this.skipLineComment(2)}else break}else if(ch===160){++this.pos}else if(ch>=5760&&_whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))){++this.pos}else{break}}};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)};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){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=function(code){var type=code===42?_tokentype.types.star:_tokentype.types.modulo;var width=1;var next=this.input.charCodeAt(this.pos+1);if(next===42){width++;next=this.input.charCodeAt(this.pos+2);type=_tokentype.types.exponent}if(next===61){width++;type=_tokentype.types.assign}return this.finishOp(type,width)};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))){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();this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(next===61)size=this.input.charCodeAt(this.pos+2)===61?3: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){case 46:return this.readToken_dot();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:if(this.options.features["es7.functionBind"]&&this.input.charCodeAt(this.pos+1)===58)return this.finishOp(_tokentype.types.doubleColon,2);++this.pos;return this.finishToken(_tokentype.types.colon);case 63:++this.pos;return this.finishToken(_tokentype.types.question);case 64:++this.pos;return this.finishToken(_tokentype.types.at);case 96:if(this.options.ecmaVersion<6)break;++this.pos;return this.finishToken(_tokentype.types.backQuote);case 48:var next=this.input.charCodeAt(this.pos+1);if(next===120||next===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(next===111||next===79)return this.readRadixNumber(8);if(next===98||next===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(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)};var regexpUnicodeSupport=false;try{new RegExp("￿","u");regexpUnicodeSupport=true}catch(e){}pp.readRegexp=function(){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;var mods=this.readWord1();var tmp=content;if(mods){var validFlags=/^[gmsiy]*$/;if(this.options.ecmaVersion>=6)validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))this.raise(start,"Invalid regular expression flag");if(mods.indexOf("u")>=0&&!regexpUnicodeSupport){tmp=tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x")}}try{new RegExp(tmp)}catch(e){if(e instanceof SyntaxError)this.raise(start,"Error parsing regular expression: "+e.message);this.raise(e)}var value=undefined;try{value=new RegExp(content,mods)}catch(err){value=null}return this.finishToken(_tokentype.types.regexp,{pattern:content,flags:mods,value:value})};pp.readInt=function(radix,len){var start=this.pos,total=0;for(var i=0,e=len==null?Infinity:len;i=97)val=code-97+10;else if(code>=65)val=code-65+10;else if(code>=48&&code<=57)val=code-48;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;var val=this.readInt(radix);if(val==null)this.raise(this.start+2,"Expected number in radix "+radix);if((0,_identifier.isIdentifierStart)(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(_tokentype.types.num,val)};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");if(this.input.charCodeAt(this.pos)===46){++this.pos;this.readInt(10);isFloat=true}var next=this.input.charCodeAt(this.pos);if(next===69||next===101){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((0,_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)};pp.readCodePoint=function(){var ch=this.input.charCodeAt(this.pos),code=undefined;if(ch===123){if(this.options.ecmaVersion<6)this.unexpected();++this.pos;code=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(code>1114111)this.unexpected()}else{code=this.readHexChar(4)}return code};function codePointToString(code){if(code<=65535)return String.fromCharCode(code);return String.fromCharCode((code-65536>>10)+55296,(code-65536&1023)+56320)}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();chunkStart=this.pos}else{if((0,_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)};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();chunkStart=this.pos}else if((0,_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}}};pp.readEscapedChar=function(){var ch=this.input.charCodeAt(++this.pos);var octal=/^[0-7]+/.exec(this.input.slice(this.pos,this.pos+3));if(octal)octal=octal[0];while(octal&&parseInt(octal,8)>255)octal=octal.slice(0,-1);if(octal==="0")octal=null;++this.pos;if(octal){if(this.strict)this.raise(this.pos-2,"Octal literal in strict mode");this.pos+=octal.length-1;return String.fromCharCode(parseInt(octal,8))}else{switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return" ";case 102:return"\f";case 48:return"\x00";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations){this.lineStart=this.pos;++this.curLine}return"";default:return String.fromCharCode(ch)}}};pp.readHexChar=function(len){var n=this.readInt(16,len);if(n===null)this.raise(this.start,"Bad character escape sequence");return n};var containsEsc;pp.readWord1=function(){containsEsc=false;var word="",first=true,chunkStart=this.pos;var astral=this.options.ecmaVersion>=6;while(this.pos=6||!containsEsc)&&this.isKeyword(word))type=_tokentype.keywords[word];return this.finishToken(type,word)}},{"./identifier":4,"./location":6,"./state":12,"./tokentype":16,"./whitespace":18}],16:[function(require,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=function TokenType(label){var conf=arguments[1]===undefined?{}:arguments[1];_classCallCheck(this,TokenType);this.label=label;this.keyword=conf.keyword;this.beforeExpr=!!conf.beforeExpr;this.startsExpr=!!conf.startsExpr;this.rightAssociative=!!conf.rightAssociative;this.isLoop=!!conf.isLoop;this.isAssign=!!conf.isAssign;this.prefix=!!conf.prefix;this.postfix=!!conf.postfix;this.binop=conf.binop||null;this.updateContext=null};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"),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),doubleColon: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}),at:new TokenType("@"),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),exponent:new TokenType("**",{beforeExpr:true,binop:11,rightAssociative:true})};exports.types=types;var keywords={};exports.keywords=keywords;function kw(name){var options=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");kw("do",{isLoop: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("let");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("yield",{beforeExpr:true,startsExpr:true});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})},{}],17:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isArray=isArray;exports.has=has;function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function has(obj,propName){return Object.prototype.hasOwnProperty.call(obj,propName)}},{}],18:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isNewLine=isNewLine;var lineBreak=/\r\n?|\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===8232||code==8233}var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;exports.nonASCIIwhitespace=nonASCIIwhitespace},{}],19:[function(require,module,exports){(function(global){"use strict";require("./node");var transform=module.exports=require("../transformation");transform.options=require("../transformation/file/options");transform.version=require("../../../package").version;transform.transform=transform;transform.run=function(code){var opts=arguments[1]===undefined?{}:arguments[1];opts.sourceMaps="inline";return new Function(transform(code,opts).code)()};transform.load=function(url,callback,_x2,hold){var opts=arguments[2]===undefined?{}:arguments[2];opts.filename=opts.filename||url;var xhr=global.ActiveXObject?new global.ActiveXObject("Microsoft.XMLHTTP"):new global.XMLHttpRequest;xhr.open("GET",url,true);if("overrideMimeType"in xhr)xhr.overrideMimeType("text/plain");xhr.onreadystatechange=function(){if(xhr.readyState!==4)return;var status=xhr.status;if(status===0||status===200){var param=[xhr.responseText,opts];if(!hold)transform.run.apply(transform,param);if(callback)callback(param)}else{throw new Error("Could not load "+url)}};xhr.send(null)};var runScripts=function runScripts(){var scripts=[];var types=["text/ecmascript-6","text/6to5","text/babel","module"];var index=0;var exec=function exec(){var param=scripts[index];if(param instanceof Array){transform.run.apply(transform,param);index++;exec()}};var run=function run(script,i){var opts={};if(script.src){transform.load(script.src,function(param){scripts[i]=param;exec()},opts,true)}else{opts.filename="embedded";scripts[i]=[script.innerHTML,opts]}};var _scripts=global.document.getElementsByTagName("script");for(var i=0;i<_scripts.length;++i){var _script=_scripts[i];if(types.indexOf(_script.type)>=0)scripts.push(_script)}for(i in scripts){run(scripts[i],i)}exec()};if(global.addEventListener){global.addEventListener("DOMContentLoaded",runScripts,false)}else if(global.attachEvent){global.attachEvent("onload",runScripts)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../../../package":507,"../transformation":71,"../transformation/file/options":56,"./node":20}],20:[function(require,module,exports){"use strict";exports.__esModule=true;exports.register=register;exports.polyfill=polyfill;exports.transformFile=transformFile;exports.transformFileSync=transformFileSync;exports.parse=parse;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsFunction=require("lodash/lang/isFunction");var _lodashLangIsFunction2=_interopRequireDefault(_lodashLangIsFunction);var _transformation=require("../transformation");var _transformation2=_interopRequireDefault(_transformation);var _acorn=require("../../acorn");var acorn=_interopRequireWildcard(_acorn);var _util=require("../util");var util=_interopRequireWildcard(_util);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("../types");var t=_interopRequireWildcard(_types);exports.util=util;exports.acorn=acorn;exports.transform=_transformation2["default"];exports.pipeline=_transformation.pipeline;exports.canCompile=_util.canCompile;var _transformationFileOptions=require("../transformation/file/options");exports.options=_interopRequire(_transformationFileOptions);var _transformationTransformer=require("../transformation/transformer");exports.Transformer=_interopRequire(_transformationTransformer);var _transformationTransformerPipeline=require("../transformation/transformer-pipeline");exports.TransformerPipeline=_interopRequire(_transformationTransformerPipeline);var _traversal=require("../traversal");exports.traverse=_interopRequire(_traversal);var _toolsBuildExternalHelpers=require("../tools/build-external-helpers");exports.buildExternalHelpers=_interopRequire(_toolsBuildExternalHelpers);var _package=require("../../../package");exports.version=_package.version;exports.types=t;function register(opts){var callback=require("./register/node-polyfill");if(opts!=null)callback(opts);return callback}function polyfill(){require("../polyfill")}function transformFile(filename,opts,callback){if((0,_lodashLangIsFunction2["default"])(opts)){callback=opts;opts={}}opts.filename=filename;_fs2["default"].readFile(filename,function(err,code){if(err)return callback(err);var result;try{result=(0,_transformation2["default"])(code,opts)}catch(err){return callback(err)}callback(null,result)})}function transformFileSync(filename){var opts=arguments[1]===undefined?{}:arguments[1];opts.filename=filename;return(0,_transformation2["default"])(_fs2["default"].readFileSync(filename,"utf8"),opts)}function parse(code){var opts=arguments[1]===undefined?{}:arguments[1];opts.allowHashBang=true;opts.sourceType="module";opts.ecmaVersion=Infinity;opts.plugins={jsx:true,flow:true};opts.features={};for(var key in _transformation2["default"].pipeline.transformers){opts.features[key]=true}return acorn.parse(code,opts)}},{"../../../package":507,"../../acorn":1,"../polyfill":50,"../tools/build-external-helpers":51,"../transformation":71,"../transformation/file/options":56,"../transformation/transformer":85,"../transformation/transformer-pipeline":84,"../traversal":159,"../types":182,"../util":186,"./register/node-polyfill":22,fs:202,"lodash/lang/isFunction":421}],21:[function(require,module,exports){"use strict";exports.__esModule=true;require("../../polyfill");exports["default"]=function(){};module.exports=exports["default"]},{"../../polyfill":50}],22:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}require("../../polyfill");var _node=require("./node");exports["default"]=_interopRequire(_node);module.exports=exports["default"]},{"../../polyfill":50,"./node":21}],23:[function(require,module,exports){"use strict";exports.__esModule=true;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")}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _trimRight=require("trim-right");var _trimRight2=_interopRequireDefault(_trimRight);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var Buffer=function(){function Buffer(position,format){_classCallCheck(this,Buffer);this.position=position;this._indent=format.indent.base;this.format=format;this.buf=""}Buffer.prototype.get=function get(){return(0,_trimRight2["default"])(this.buf)};Buffer.prototype.getIndent=function getIndent(){if(this.format.compact||this.format.concise){return""}else{return(0,_repeating2["default"])(this.format.indent.style,this._indent)}};Buffer.prototype.indentSize=function indentSize(){return this.getIndent().length};Buffer.prototype.indent=function indent(){this._indent++};Buffer.prototype.dedent=function dedent(){this._indent--};Buffer.prototype.semicolon=function semicolon(){this.push(";")};Buffer.prototype.ensureSemicolon=function ensureSemicolon(){if(!this.isLast(";"))this.semicolon()};Buffer.prototype.rightBrace=function rightBrace(){this.newline(true);this.push("}")};Buffer.prototype.keyword=function keyword(name){this.push(name);this.space()};Buffer.prototype.space=function space(){if(this.format.compact)return;if(this.buf&&!this.isLast(" ")&&!this.isLast("\n")){this.push(" ")}};Buffer.prototype.removeLast=function removeLast(cha){if(this.format.compact)return;if(!this.isLast(cha))return;this.buf=this.buf.substr(0,this.buf.length-1);this.position.unshift(cha)};Buffer.prototype.newline=function newline(i,removeLast){if(this.format.compact||this.format.retainLines)return;if(this.format.concise){this.space();return}removeLast=removeLast||false;if((0,_lodashLangIsNumber2["default"])(i)){i=Math.min(2,i);if(this.endsWith("{\n")||this.endsWith(":\n"))i--;if(i<=0)return;while(i>0){this._newline(removeLast);i--}return}if((0,_lodashLangIsBoolean2["default"])(i)){removeLast=i}this._newline(removeLast)};Buffer.prototype._newline=function _newline(removeLast){if(this.endsWith("\n\n"))return;if(removeLast&&this.isLast("\n"))this.removeLast("\n");this.removeLast(" ");this._removeSpacesAfterLastNewline();this._push("\n")};Buffer.prototype._removeSpacesAfterLastNewline=function _removeSpacesAfterLastNewline(){var lastNewlineIndex=this.buf.lastIndexOf("\n");if(lastNewlineIndex===-1){return}var index=this.buf.length-1;while(index>lastNewlineIndex){if(this.buf[index]!==" "){break}index--}if(index===lastNewlineIndex){this.buf=this.buf.substring(0,index+1)}};Buffer.prototype.push=function push(str,noIndent){if(!this.format.compact&&this._indent&&!noIndent&&str!=="\n"){var indent=this.getIndent();str=str.replace(/\n/g,"\n"+indent);if(this.isLast("\n"))this._push(indent)}this._push(str)};Buffer.prototype._push=function _push(str){this.position.push(str);this.buf+=str};Buffer.prototype.endsWith=function endsWith(str){return this.buf.slice(-str.length)===str};Buffer.prototype.isLast=function isLast(cha){if(this.format.compact)return false;var buf=this.buf;var last=buf[buf.length-1];if(Array.isArray(cha)){return(0,_lodashCollectionIncludes2["default"])(cha,last)}else{return cha===last}};return Buffer}();exports["default"]=Buffer;module.exports=exports["default"]},{"lodash/collection/includes":345,"lodash/lang/isBoolean":419,"lodash/lang/isNumber":423,repeating:489,"trim-right":506}],24:[function(require,module,exports){"use strict";exports.__esModule=true;exports.File=File;exports.Program=Program;exports.BlockStatement=BlockStatement;exports.Noop=Noop;function File(node,print){print.plain(node.program)}function Program(node,print){print.sequence(node.body)}function BlockStatement(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();print.sequence(node.body,{indent:true});if(!this.format.retainLines)this.removeLast("\n");this.rightBrace()}}function Noop(){}},{}],25:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ClassDeclaration=ClassDeclaration;exports.ClassBody=ClassBody;exports.ClassProperty=ClassProperty;exports.MethodDefinition=MethodDefinition;function ClassDeclaration(node,print){print.list(node.decorators);this.push("class");if(node.id){this.push(" ");print.plain(node.id)}print.plain(node.typeParameters);if(node.superClass){this.push(" extends ");print.plain(node.superClass);print.plain(node.superTypeParameters)}if(node["implements"]){this.push(" implements ");print.join(node["implements"],{separator:", "})}this.space();print.plain(node.body)}exports.ClassExpression=ClassDeclaration;function ClassBody(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();this.indent();print.sequence(node.body);this.dedent();this.rightBrace()}}function ClassProperty(node,print){print.list(node.decorators);if(node["static"])this.push("static ");print.plain(node.key);print.plain(node.typeAnnotation);if(node.value){this.space();this.push("=");this.space();print.plain(node.value)}this.semicolon()}function MethodDefinition(node,print){print.list(node.decorators);if(node["static"]){this.push("static ")}this._method(node,print)}},{}],26:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ComprehensionBlock=ComprehensionBlock;exports.ComprehensionExpression=ComprehensionExpression;function ComprehensionBlock(node,print){this.keyword("for");this.push("(");print.plain(node.left);this.push(" of ");print.plain(node.right);this.push(")")}function ComprehensionExpression(node,print){this.push(node.generator?"(":"[");print.join(node.blocks,{separator:" "});this.space();if(node.filter){this.keyword("if");this.push("(");print.plain(node.filter);this.push(")");this.space()}print.plain(node.body);this.push(node.generator?")":"]")}},{}],27:[function(require,module,exports){"use strict";exports.__esModule=true;exports.UnaryExpression=UnaryExpression;exports.DoExpression=DoExpression;exports.UpdateExpression=UpdateExpression;exports.ConditionalExpression=ConditionalExpression;exports.NewExpression=NewExpression;exports.SequenceExpression=SequenceExpression;exports.ThisExpression=ThisExpression;exports.Super=Super;exports.Decorator=Decorator;exports.CallExpression=CallExpression;exports.EmptyStatement=EmptyStatement;exports.ExpressionStatement=ExpressionStatement;exports.AssignmentExpression=AssignmentExpression;exports.BindExpression=BindExpression;exports.MemberExpression=MemberExpression;exports.MetaProperty=MetaProperty;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _isInteger=require("is-integer");var _isInteger2=_interopRequireDefault(_isInteger);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var _types=require("../../types");var t=_interopRequireWildcard(_types);function UnaryExpression(node,print){var hasSpace=/[a-z]$/.test(node.operator);var arg=node.argument;if(t.isUpdateExpression(arg)||t.isUnaryExpression(arg)){hasSpace=true}if(t.isUnaryExpression(arg)&&arg.operator==="!"){hasSpace=false}this.push(node.operator);if(hasSpace)this.push(" ");print.plain(node.argument)}function DoExpression(node,print){this.push("do");this.space();print.plain(node.body)}function UpdateExpression(node,print){if(node.prefix){this.push(node.operator);print.plain(node.argument)}else{print.plain(node.argument);this.push(node.operator)}}function ConditionalExpression(node,print){print.plain(node.test);this.space();this.push("?");this.space();print.plain(node.consequent);this.space();this.push(":");this.space();print.plain(node.alternate)}function NewExpression(node,print){this.push("new ");print.plain(node.callee);this.push("(");print.list(node.arguments);this.push(")")}function SequenceExpression(node,print){print.list(node.expressions)}function ThisExpression(){this.push("this")}function Super(){this.push("super")}function Decorator(node,print){this.push("@");print.plain(node.expression)}function CallExpression(node,print){print.plain(node.callee);this.push("(");var separator=",";var isPrettyCall=node._prettyCall&&!this.format.retainLines;if(isPrettyCall){separator+="\n";this.newline();this.indent()}else{separator+=" "}print.list(node.arguments,{separator:separator});if(isPrettyCall){this.newline();this.dedent()}this.push(")")}var buildYieldAwait=function buildYieldAwait(keyword){return function(node,print){this.push(keyword);if(node.delegate||node.all){this.push("*")}if(node.argument){this.push(" ");print.plain(node.argument)}}};var YieldExpression=buildYieldAwait("yield");exports.YieldExpression=YieldExpression;var AwaitExpression=buildYieldAwait("await");exports.AwaitExpression=AwaitExpression;function EmptyStatement(){this.semicolon()}function ExpressionStatement(node,print){print.plain(node.expression);this.semicolon()}function AssignmentExpression(node,print){print.plain(node.left);this.push(" ");this.push(node.operator);this.push(" ");print.plain(node.right)}function BindExpression(node,print){print.plain(node.object);this.push("::");print.plain(node.callee)}exports.BinaryExpression=AssignmentExpression;exports.LogicalExpression=AssignmentExpression;exports.AssignmentPattern=AssignmentExpression;var SCIENTIFIC_NOTATION=/e/i;function MemberExpression(node,print){var obj=node.object;print.plain(obj);if(!node.computed&&t.isMemberExpression(node.property)){throw new TypeError("Got a MemberExpression for MemberExpression property")}var computed=node.computed;if(t.isLiteral(node.property)&&(0,_lodashLangIsNumber2["default"])(node.property.value)){computed=true}if(computed){this.push("[");print.plain(node.property);this.push("]")}else{if(t.isLiteral(obj)&&(0,_isInteger2["default"])(obj.value)&&!SCIENTIFIC_NOTATION.test(obj.value.toString())){this.push(".")}this.push(".");print.plain(node.property)}}function MetaProperty(node,print){print.plain(node.meta);this.push(".");print.plain(node.property)}},{"../../types":182,"is-integer":330,"lodash/lang/isNumber":423}],28:[function(require,module,exports){"use strict";exports.__esModule=true;exports.AnyTypeAnnotation=AnyTypeAnnotation;exports.ArrayTypeAnnotation=ArrayTypeAnnotation;exports.BooleanTypeAnnotation=BooleanTypeAnnotation;exports.DeclareClass=DeclareClass;exports.DeclareFunction=DeclareFunction;exports.DeclareModule=DeclareModule;exports.DeclareVariable=DeclareVariable;exports.FunctionTypeAnnotation=FunctionTypeAnnotation;exports.FunctionTypeParam=FunctionTypeParam;exports.InterfaceExtends=InterfaceExtends;exports._interfaceish=_interfaceish;exports.InterfaceDeclaration=InterfaceDeclaration;exports.IntersectionTypeAnnotation=IntersectionTypeAnnotation;exports.MixedTypeAnnotation=MixedTypeAnnotation;exports.NullableTypeAnnotation=NullableTypeAnnotation;exports.NumberTypeAnnotation=NumberTypeAnnotation;exports.StringLiteralTypeAnnotation=StringLiteralTypeAnnotation;exports.StringTypeAnnotation=StringTypeAnnotation;exports.TupleTypeAnnotation=TupleTypeAnnotation;exports.TypeofTypeAnnotation=TypeofTypeAnnotation;exports.TypeAlias=TypeAlias;exports.TypeAnnotation=TypeAnnotation;exports.TypeParameterInstantiation=TypeParameterInstantiation;exports.ObjectTypeAnnotation=ObjectTypeAnnotation;exports.ObjectTypeCallProperty=ObjectTypeCallProperty;exports.ObjectTypeIndexer=ObjectTypeIndexer;exports.ObjectTypeProperty=ObjectTypeProperty;exports.QualifiedTypeIdentifier=QualifiedTypeIdentifier;exports.UnionTypeAnnotation=UnionTypeAnnotation;exports.TypeCastExpression=TypeCastExpression;exports.VoidTypeAnnotation=VoidTypeAnnotation;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function AnyTypeAnnotation(){this.push("any")}function ArrayTypeAnnotation(node,print){print.plain(node.elementType);this.push("[");this.push("]")}function BooleanTypeAnnotation(node){this.push("bool")}function DeclareClass(node,print){this.push("declare class ");this._interfaceish(node,print)}function DeclareFunction(node,print){this.push("declare function ");print.plain(node.id);print.plain(node.id.typeAnnotation.typeAnnotation);this.semicolon()}function DeclareModule(node,print){this.push("declare module ");print.plain(node.id);this.space();print.plain(node.body)}function DeclareVariable(node,print){this.push("declare var ");print.plain(node.id);print.plain(node.id.typeAnnotation);this.semicolon()}function FunctionTypeAnnotation(node,print,parent){print.plain(node.typeParameters);this.push("(");print.list(node.params);if(node.rest){if(node.params.length){this.push(",");this.space()}this.push("...");print.plain(node.rest)}this.push(")");if(parent.type==="ObjectTypeProperty"||parent.type==="ObjectTypeCallProperty"||parent.type==="DeclareFunction"){this.push(":")}else{this.space();this.push("=>")}this.space();print.plain(node.returnType)}function FunctionTypeParam(node,print){print.plain(node.name);if(node.optional)this.push("?");this.push(":");this.space();print.plain(node.typeAnnotation)}function InterfaceExtends(node,print){print.plain(node.id);print.plain(node.typeParameters)}exports.ClassImplements=InterfaceExtends;exports.GenericTypeAnnotation=InterfaceExtends;function _interfaceish(node,print){print.plain(node.id);print.plain(node.typeParameters);if(node["extends"].length){this.push(" extends ");print.join(node["extends"],{separator:", "})}this.space();print.plain(node.body)}function InterfaceDeclaration(node,print){this.push("interface ");this._interfaceish(node,print)}function IntersectionTypeAnnotation(node,print){print.join(node.types,{separator:" & "})}function MixedTypeAnnotation(){this.push("mixed")}function NullableTypeAnnotation(node,print){this.push("?");print.plain(node.typeAnnotation)}function NumberTypeAnnotation(){this.push("number")}function StringLiteralTypeAnnotation(node){this._stringLiteral(node.value)}function StringTypeAnnotation(){this.push("string")}function TupleTypeAnnotation(node,print){this.push("[");print.join(node.types,{separator:", "});this.push("]")}function TypeofTypeAnnotation(node,print){this.push("typeof ");print.plain(node.argument)}function TypeAlias(node,print){this.push("type ");print.plain(node.id);print.plain(node.typeParameters);this.space();this.push("=");this.space();print.plain(node.right);this.semicolon()}function TypeAnnotation(node,print){this.push(":");this.space();if(node.optional)this.push("?");print.plain(node.typeAnnotation)}function TypeParameterInstantiation(node,print){this.push("<");print.join(node.params,{separator:", "});this.push(">")}exports.TypeParameterDeclaration=TypeParameterInstantiation;function ObjectTypeAnnotation(node,print){var _this=this;this.push("{");var props=node.properties.concat(node.callProperties,node.indexers);if(props.length){this.space();print.list(props,{separator:false,indent:true,iterator:function iterator(){if(props.length!==1){_this.semicolon();_this.space()}}});this.space()}this.push("}")}function ObjectTypeCallProperty(node,print){if(node["static"])this.push("static ");print.plain(node.value)}function ObjectTypeIndexer(node,print){if(node["static"])this.push("static ");this.push("[");print.plain(node.id);this.push(":");this.space();print.plain(node.key);this.push("]");this.push(":");this.space();print.plain(node.value)}function ObjectTypeProperty(node,print){if(node["static"])this.push("static ");print.plain(node.key);if(node.optional)this.push("?");if(!t.isFunctionTypeAnnotation(node.value)){this.push(":");this.space()}print.plain(node.value)}function QualifiedTypeIdentifier(node,print){print.plain(node.qualification);this.push(".");print.plain(node.id)}function UnionTypeAnnotation(node,print){print.join(node.types,{separator:" | "})}function TypeCastExpression(node,print){this.push("(");print.plain(node.expression);print.plain(node.typeAnnotation);this.push(")")}function VoidTypeAnnotation(node){this.push("void")}},{"../../types":182}],29:[function(require,module,exports){"use strict";exports.__esModule=true;exports.JSXAttribute=JSXAttribute;exports.JSXIdentifier=JSXIdentifier;exports.JSXNamespacedName=JSXNamespacedName;exports.JSXMemberExpression=JSXMemberExpression;exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXExpressionContainer=JSXExpressionContainer;exports.JSXElement=JSXElement;exports.JSXOpeningElement=JSXOpeningElement;exports.JSXClosingElement=JSXClosingElement;exports.JSXEmptyExpression=JSXEmptyExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj; -if(code===61&&next===62&&this.options.ecmaVersion>=6){this.pos+=2;return this.finishToken(tt.arrow)}return this.finishOp(code===61?tt.eq:tt.prefix,1)};pp.getTokenFromCode=function(code){switch(code){case 46:return this.readToken_dot();case 40:++this.pos;return this.finishToken(tt.parenL);case 41:++this.pos;return this.finishToken(tt.parenR);case 59:++this.pos;return this.finishToken(tt.semi);case 44:++this.pos;return this.finishToken(tt.comma);case 91:++this.pos;return this.finishToken(tt.bracketL);case 93:++this.pos;return this.finishToken(tt.bracketR);case 123:++this.pos;return this.finishToken(tt.braceL);case 125:++this.pos;return this.finishToken(tt.braceR);case 58:++this.pos;return this.finishToken(tt.colon);case 63:++this.pos;return this.finishToken(tt.question);case 64:++this.pos;return this.finishToken(tt.at);case 96:if(this.options.ecmaVersion<6)break;++this.pos;return this.finishToken(tt.backQuote);case 48:var next=this.input.charCodeAt(this.pos+1);if(next===120||next===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(next===111||next===79)return this.readRadixNumber(8);if(next===98||next===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(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(tt.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)};var regexpUnicodeSupport=false;try{new RegExp("￿","u");regexpUnicodeSupport=true}catch(e){}pp.readRegexp=function(){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(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;var mods=this.readWord1();var tmp=content;if(mods){var validFlags=/^[gmsiy]*$/;if(this.options.ecmaVersion>=6)validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))this.raise(start,"Invalid regular expression flag");if(mods.indexOf("u")>=0&&!regexpUnicodeSupport){tmp=tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x")}}try{new RegExp(tmp)}catch(e){if(e instanceof SyntaxError)this.raise(start,"Error parsing regular expression: "+e.message);this.raise(e)}var value=undefined;try{value=new RegExp(content,mods)}catch(err){value=null}return this.finishToken(tt.regexp,{pattern:content,flags:mods,value:value})};pp.readInt=function(radix,len){var start=this.pos,total=0;for(var i=0,e=len==null?Infinity:len;i=97)val=code-97+10;else if(code>=65)val=code-65+10;else if(code>=48&&code<=57)val=code-48;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;var val=this.readInt(radix);if(val==null)this.raise(this.start+2,"Expected number in radix "+radix);if(isIdentifierStart(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(tt.num,val)};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");if(this.input.charCodeAt(this.pos)===46){++this.pos;this.readInt(10);isFloat=true}var next=this.input.charCodeAt(this.pos);if(next===69||next===101){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(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(tt.num,val)};pp.readCodePoint=function(){var ch=this.input.charCodeAt(this.pos),code=undefined;if(ch===123){if(this.options.ecmaVersion<6)this.unexpected();++this.pos;code=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(code>1114111)this.unexpected()}else{code=this.readHexChar(4)}return code};function codePointToString(code){if(code<=65535)return String.fromCharCode(code);return String.fromCharCode((code-65536>>10)+55296,(code-65536&1023)+56320)}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();chunkStart=this.pos}else{if(isNewLine(ch))this.raise(this.start,"Unterminated string constant");++this.pos}}out+=this.input.slice(chunkStart,this.pos++);return this.finishToken(tt.string,out)};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===tt.template){if(ch===36){this.pos+=2;return this.finishToken(tt.dollarBraceL)}else{++this.pos;return this.finishToken(tt.backQuote)}}out+=this.input.slice(chunkStart,this.pos);return this.finishToken(tt.template,out)}if(ch===92){out+=this.input.slice(chunkStart,this.pos);out+=this.readEscapedChar();chunkStart=this.pos}else if(isNewLine(ch)){out+=this.input.slice(chunkStart,this.pos);++this.pos;if(ch===13&&this.input.charCodeAt(this.pos)===10){++this.pos;out+="\n"}else{out+=String.fromCharCode(ch)}if(this.options.locations){++this.curLine;this.lineStart=this.pos}chunkStart=this.pos}else{++this.pos}}};pp.readEscapedChar=function(){var ch=this.input.charCodeAt(++this.pos);var octal=/^[0-7]+/.exec(this.input.slice(this.pos,this.pos+3));if(octal)octal=octal[0];while(octal&&parseInt(octal,8)>255)octal=octal.slice(0,-1);if(octal==="0")octal=null;++this.pos;if(octal){if(this.strict)this.raise(this.pos-2,"Octal literal in strict mode");this.pos+=octal.length-1;return String.fromCharCode(parseInt(octal,8))}else{switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return" ";case 102:return"\f";case 48:return"\x00";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations){this.lineStart=this.pos;++this.curLine}return"";default:return String.fromCharCode(ch)}}};pp.readHexChar=function(len){var n=this.readInt(16,len);if(n===null)this.raise(this.start,"Bad character escape sequence");return n};var containsEsc;pp.readWord1=function(){containsEsc=false;var word="",first=true,chunkStart=this.pos;var astral=this.options.ecmaVersion>=6;while(this.pos=6||!containsEsc)&&this.isKeyword(word))type=keywordTypes[word];return this.finishToken(type,word)}},{"./identifier":4,"./location":6,"./state":12,"./tokentype":16,"./whitespace":18}],16:[function(require,module,exports){"use strict";var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.__esModule=true;var TokenType=exports.TokenType=function TokenType(label){var conf=arguments[1]===undefined?{}:arguments[1];_classCallCheck(this,TokenType);this.label=label;this.keyword=conf.keyword;this.beforeExpr=!!conf.beforeExpr;this.startsExpr=!!conf.startsExpr;this.rightAssociative=!!conf.rightAssociative;this.isLoop=!!conf.isLoop;this.isAssign=!!conf.isAssign;this.prefix=!!conf.prefix;this.postfix=!!conf.postfix;this.binop=conf.binop||null;this.updateContext=null};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"),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}),at:new TokenType("@"),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),exponent:new TokenType("**",{beforeExpr:true,binop:11,rightAssociative:true})};exports.types=types;var keywords={};exports.keywords=keywords;function kw(name){var options=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");kw("do",{isLoop:true});kw("else",beforeExpr);kw("finally");kw("for",{isLoop:true});kw("function");kw("if");kw("return",beforeExpr);kw("switch");kw("throw",beforeExpr);kw("try");kw("var");kw("let");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("yield",{beforeExpr:true,startsExpr:true});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})},{}],17:[function(require,module,exports){"use strict";exports.isArray=isArray;exports.has=has;exports.__esModule=true;function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function has(obj,propName){return Object.prototype.hasOwnProperty.call(obj,propName)}},{}],18:[function(require,module,exports){"use strict";exports.isNewLine=isNewLine;exports.__esModule=true;var lineBreak=/\r\n?|\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===8232||code==8233}var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;exports.nonASCIIwhitespace=nonASCIIwhitespace},{}],19:[function(require,module,exports){(function(global){"use strict";var transform=module.exports=require("../transformation");transform.options=require("../transformation/file/options");transform.version=require("../../../package").version;transform.transform=transform;transform.run=function(code){var opts=arguments[1]===undefined?{}:arguments[1];opts.sourceMaps="inline";return new Function(transform(code,opts).code)()};transform.load=function(url,callback,_x,hold){var opts=arguments[2]===undefined?{}:arguments[2];var _opts=opts;if(!_opts.filename)_opts.filename=url;var xhr=global.ActiveXObject?new global.ActiveXObject("Microsoft.XMLHTTP"):new global.XMLHttpRequest;xhr.open("GET",url,true);if("overrideMimeType"in xhr)xhr.overrideMimeType("text/plain");xhr.onreadystatechange=function(){if(xhr.readyState!==4)return;var status=xhr.status;if(status===0||status===200){var param=[xhr.responseText,opts];if(!hold)transform.run.apply(transform,param);if(callback)callback(param)}else{throw new Error("Could not load "+url)}};xhr.send(null)};var runScripts=function runScripts(){var scripts=[];var types=["text/ecmascript-6","text/6to5","text/babel","module"];var index=0;var exec=function(_exec){var _execWrapper=function exec(){return _exec.apply(this,arguments)};_execWrapper.toString=function(){return _exec.toString()};return _execWrapper}(function(){var param=scripts[index];if(param instanceof Array){transform.run.apply(transform,param);index++;exec()}});var run=function run(script,i){var opts={};if(script.src){transform.load(script.src,function(param){scripts[i]=param;exec()},opts,true)}else{opts.filename="embedded";scripts[i]=[script.innerHTML,opts]}};var _scripts=global.document.getElementsByTagName("script");for(var i=0;i<_scripts.length;++i){var _script=_scripts[i];if(types.indexOf(_script.type)>=0)scripts.push(_script)}for(i in scripts){run(scripts[i],i)}exec()};if(global.addEventListener){global.addEventListener("DOMContentLoaded",runScripts,false)}else if(global.attachEvent){global.attachEvent("onload",runScripts)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../../../package":454,"../transformation":63,"../transformation/file/options":49}],20:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var repeating=_interopRequire(require("repeating"));var trimRight=_interopRequire(require("trim-right"));var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var includes=_interopRequire(require("lodash/collection/includes"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var Buffer=function(){function Buffer(position,format){_classCallCheck(this,Buffer);this.position=position;this._indent=format.indent.base;this.format=format;this.buf=""}Buffer.prototype.get=function get(){return trimRight(this.buf)};Buffer.prototype.getIndent=function getIndent(){if(this.format.compact||this.format.concise){return""}else{return repeating(this.format.indent.style,this._indent)}};Buffer.prototype.indentSize=function indentSize(){return this.getIndent().length};Buffer.prototype.indent=function indent(){this._indent++};Buffer.prototype.dedent=function dedent(){this._indent--};Buffer.prototype.semicolon=function semicolon(){this.push(";")};Buffer.prototype.ensureSemicolon=function ensureSemicolon(){if(!this.isLast(";"))this.semicolon()};Buffer.prototype.rightBrace=function rightBrace(){this.newline(true);this.push("}")};Buffer.prototype.keyword=function keyword(name){this.push(name);this.space()};Buffer.prototype.space=function space(){if(this.format.compact)return;if(this.buf&&!this.isLast(" ")&&!this.isLast("\n")){this.push(" ")}};Buffer.prototype.removeLast=function removeLast(cha){if(this.format.compact)return;if(!this.isLast(cha))return;this.buf=this.buf.substr(0,this.buf.length-1);this.position.unshift(cha)};Buffer.prototype.newline=function newline(i,removeLast){if(this.format.compact)return;if(this.format.concise){this.space();return}if(!removeLast)removeLast=false;if(isNumber(i)){i=Math.min(2,i);if(this.endsWith("{\n")||this.endsWith(":\n"))i--;if(i<=0)return;while(i>0){this._newline(removeLast);i--}return}if(isBoolean(i)){removeLast=i}this._newline(removeLast)};Buffer.prototype._newline=function _newline(removeLast){if(this.endsWith("\n\n"))return;if(removeLast&&this.isLast("\n"))this.removeLast("\n");this.removeLast(" ");this._removeSpacesAfterLastNewline();this._push("\n")};Buffer.prototype._removeSpacesAfterLastNewline=function _removeSpacesAfterLastNewline(){var lastNewlineIndex=this.buf.lastIndexOf("\n");if(lastNewlineIndex===-1)return;var index=this.buf.length-1;while(index>lastNewlineIndex){if(this.buf[index]!==" "){break}index--}if(index===lastNewlineIndex){this.buf=this.buf.substring(0,index+1)}};Buffer.prototype.push=function push(str,noIndent){if(!this.format.compact&&this._indent&&!noIndent&&str!=="\n"){var indent=this.getIndent();str=str.replace(/\n/g,"\n"+indent);if(this.isLast("\n"))this._push(indent)}this._push(str)};Buffer.prototype._push=function _push(str){this.position.push(str);this.buf+=str};Buffer.prototype.endsWith=function endsWith(str){return this.buf.slice(-str.length)===str};Buffer.prototype.isLast=function isLast(cha){if(this.format.compact)return false;var buf=this.buf;var last=buf[buf.length-1];if(Array.isArray(cha)){return includes(cha,last)}else{return cha===last}};return Buffer}();module.exports=Buffer},{"lodash/collection/includes":319,"lodash/lang/isBoolean":393,"lodash/lang/isNumber":397,repeating:437,"trim-right":453}],21:[function(require,module,exports){"use strict";exports.File=File;exports.Program=Program;exports.BlockStatement=BlockStatement;exports.__esModule=true;function File(node,print){print(node.program)}function Program(node,print){print.sequence(node.body)}function BlockStatement(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();print.sequence(node.body,{indent:true});this.removeLast("\n");this.rightBrace()}}},{}],22:[function(require,module,exports){"use strict";exports.ClassDeclaration=ClassDeclaration;exports.ClassBody=ClassBody;exports.ClassProperty=ClassProperty;exports.MethodDefinition=MethodDefinition;exports.__esModule=true;function ClassDeclaration(node,print){print.list(node.decorators);this.push("class");if(node.id){this.space();print(node.id)}print(node.typeParameters);if(node.superClass){this.push(" extends ");print(node.superClass);print(node.superTypeParameters)}if(node["implements"]){this.push(" implements ");print.join(node["implements"],{separator:", "})}this.space();print(node.body)}exports.ClassExpression=ClassDeclaration;function ClassBody(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();this.indent();print.sequence(node.body);this.dedent();this.rightBrace()}}function ClassProperty(node,print){print.list(node.decorators);if(node["static"])this.push("static ");print(node.key);print(node.typeAnnotation);if(node.value){this.space();this.push("=");this.space();print(node.value)}this.semicolon()}function MethodDefinition(node,print){print.list(node.decorators);if(node["static"]){this.push("static ")}this._method(node,print)}},{}],23:[function(require,module,exports){"use strict";exports.ComprehensionBlock=ComprehensionBlock;exports.ComprehensionExpression=ComprehensionExpression;exports.__esModule=true;function ComprehensionBlock(node,print){this.keyword("for");this.push("(");print(node.left);this.push(" of ");print(node.right);this.push(")")}function ComprehensionExpression(node,print){this.push(node.generator?"(":"[");print.join(node.blocks,{separator:" "});this.space();if(node.filter){this.keyword("if");this.push("(");print(node.filter);this.push(")");this.space()}print(node.body);this.push(node.generator?")":"]")}},{}],24:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.UnaryExpression=UnaryExpression;exports.DoExpression=DoExpression;exports.UpdateExpression=UpdateExpression;exports.ConditionalExpression=ConditionalExpression;exports.NewExpression=NewExpression;exports.SequenceExpression=SequenceExpression;exports.ThisExpression=ThisExpression;exports.Super=Super;exports.Decorator=Decorator;exports.CallExpression=CallExpression;exports.EmptyStatement=EmptyStatement;exports.ExpressionStatement=ExpressionStatement;exports.AssignmentExpression=AssignmentExpression;exports.MemberExpression=MemberExpression;exports.__esModule=true;var isInteger=_interopRequire(require("is-integer"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var t=_interopRequireWildcard(require("../../types"));function UnaryExpression(node,print){var hasSpace=/[a-z]$/.test(node.operator);var arg=node.argument;if(t.isUpdateExpression(arg)||t.isUnaryExpression(arg)){hasSpace=true}if(t.isUnaryExpression(arg)&&arg.operator==="!"){hasSpace=false}this.push(node.operator);if(hasSpace)this.push(" ");print(node.argument)}function DoExpression(node,print){this.push("do");this.space();print(node.body)}function UpdateExpression(node,print){if(node.prefix){this.push(node.operator);print(node.argument)}else{print(node.argument);this.push(node.operator)}}function ConditionalExpression(node,print){print(node.test);this.space();this.push("?");this.space();print(node.consequent);this.space();this.push(":");this.space();print(node.alternate)}function NewExpression(node,print){this.push("new ");print(node.callee);this.push("(");print.list(node.arguments);this.push(")")}function SequenceExpression(node,print){print.list(node.expressions)}function ThisExpression(){this.push("this")}function Super(){this.push("super")}function Decorator(node,print){this.push("@");print(node.expression)}function CallExpression(node,print){print(node.callee);this.push("(");var separator=",";if(node._prettyCall){separator+="\n";this.newline();this.indent()}else{separator+=" "}print.list(node.arguments,{separator:separator});if(node._prettyCall){this.newline();this.dedent()}this.push(")")}var buildYieldAwait=function buildYieldAwait(keyword){return function(node,print){this.push(keyword);if(node.delegate||node.all){this.push("*")}if(node.argument){this.space();print(node.argument)}}};var YieldExpression=buildYieldAwait("yield");exports.YieldExpression=YieldExpression;var AwaitExpression=buildYieldAwait("await");exports.AwaitExpression=AwaitExpression;function EmptyStatement(){this.semicolon()}function ExpressionStatement(node,print){print(node.expression);this.semicolon()}function AssignmentExpression(node,print){print(node.left);this.push(" ");this.push(node.operator);this.push(" ");print(node.right)}exports.BinaryExpression=AssignmentExpression;exports.LogicalExpression=AssignmentExpression;exports.AssignmentPattern=AssignmentExpression;var SCIENTIFIC_NOTATION=/e/i;function MemberExpression(node,print){var obj=node.object;print(obj);if(!node.computed&&t.isMemberExpression(node.property)){throw new TypeError("Got a MemberExpression for MemberExpression property")}var computed=node.computed;if(t.isLiteral(node.property)&&isNumber(node.property.value)){computed=true}if(computed){this.push("[");print(node.property);this.push("]")}else{if(t.isLiteral(obj)&&isInteger(obj.value)&&!SCIENTIFIC_NOTATION.test(obj.value.toString())){this.push(".")}this.push(".");print(node.property)}}exports.MetaProperty=MemberExpression},{"../../types":153,"is-integer":303,"lodash/lang/isNumber":397}],25:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.AnyTypeAnnotation=AnyTypeAnnotation;exports.ArrayTypeAnnotation=ArrayTypeAnnotation;exports.BooleanTypeAnnotation=BooleanTypeAnnotation;exports.DeclareClass=DeclareClass;exports.DeclareFunction=DeclareFunction;exports.DeclareModule=DeclareModule;exports.DeclareVariable=DeclareVariable;exports.FunctionTypeAnnotation=FunctionTypeAnnotation;exports.FunctionTypeParam=FunctionTypeParam;exports.InterfaceExtends=InterfaceExtends;exports._interfaceish=_interfaceish;exports.InterfaceDeclaration=InterfaceDeclaration;exports.IntersectionTypeAnnotation=IntersectionTypeAnnotation;exports.NullableTypeAnnotation=NullableTypeAnnotation;exports.NumberTypeAnnotation=NumberTypeAnnotation;exports.StringLiteralTypeAnnotation=StringLiteralTypeAnnotation;exports.StringTypeAnnotation=StringTypeAnnotation;exports.TupleTypeAnnotation=TupleTypeAnnotation;exports.TypeofTypeAnnotation=TypeofTypeAnnotation;exports.TypeAlias=TypeAlias;exports.TypeAnnotation=TypeAnnotation;exports.TypeParameterInstantiation=TypeParameterInstantiation;exports.ObjectTypeAnnotation=ObjectTypeAnnotation;exports.ObjectTypeCallProperty=ObjectTypeCallProperty;exports.ObjectTypeIndexer=ObjectTypeIndexer;exports.ObjectTypeProperty=ObjectTypeProperty;exports.QualifiedTypeIdentifier=QualifiedTypeIdentifier;exports.UnionTypeAnnotation=UnionTypeAnnotation;exports.TypeCastExpression=TypeCastExpression;exports.VoidTypeAnnotation=VoidTypeAnnotation;exports.__esModule=true;var t=_interopRequireWildcard(require("../../types"));function AnyTypeAnnotation(){this.push("any")}function ArrayTypeAnnotation(node,print){print(node.elementType);this.push("[");this.push("]")}function BooleanTypeAnnotation(node){this.push("bool")}function DeclareClass(node,print){this.push("declare class ");this._interfaceish(node,print)}function DeclareFunction(node,print){this.push("declare function ");print(node.id);print(node.id.typeAnnotation.typeAnnotation);this.semicolon()}function DeclareModule(node,print){this.push("declare module ");print(node.id);this.space();print(node.body)}function DeclareVariable(node,print){this.push("declare var ");print(node.id);print(node.id.typeAnnotation);this.semicolon()}function FunctionTypeAnnotation(node,print,parent){print(node.typeParameters);this.push("(");print.list(node.params);if(node.rest){if(node.params.length){this.push(",");this.space()}this.push("...");print(node.rest)}this.push(")");if(parent.type==="ObjectTypeProperty"||parent.type==="ObjectTypeCallProperty"||parent.type==="DeclareFunction"){this.push(":")}else{this.space();this.push("=>")}this.space();print(node.returnType)}function FunctionTypeParam(node,print){print(node.name);if(node.optional)this.push("?");this.push(":");this.space();print(node.typeAnnotation)}function InterfaceExtends(node,print){print(node.id);print(node.typeParameters)}exports.ClassImplements=InterfaceExtends;exports.GenericTypeAnnotation=InterfaceExtends;function _interfaceish(node,print){print(node.id);print(node.typeParameters);if(node["extends"].length){this.push(" extends ");print.join(node["extends"],{separator:", "})}this.space();print(node.body)}function InterfaceDeclaration(node,print){this.push("interface ");this._interfaceish(node,print)}function IntersectionTypeAnnotation(node,print){print.join(node.types,{separator:" & "})}function NullableTypeAnnotation(node,print){this.push("?");print(node.typeAnnotation)}function NumberTypeAnnotation(){this.push("number")}function StringLiteralTypeAnnotation(node){this._stringLiteral(node.value)}function StringTypeAnnotation(){this.push("string")}function TupleTypeAnnotation(node,print){this.push("[");print.join(node.types,{separator:", "});this.push("]")}function TypeofTypeAnnotation(node,print){this.push("typeof ");print(node.argument)}function TypeAlias(node,print){this.push("type ");print(node.id);print(node.typeParameters);this.space();this.push("=");this.space();print(node.right);this.semicolon()}function TypeAnnotation(node,print){this.push(":");this.space();if(node.optional)this.push("?");print(node.typeAnnotation)}function TypeParameterInstantiation(node,print){this.push("<");print.join(node.params,{separator:", "});this.push(">")}exports.TypeParameterDeclaration=TypeParameterInstantiation;function ObjectTypeAnnotation(node,print){var _this=this;this.push("{");var props=node.properties.concat(node.callProperties,node.indexers);if(props.length){this.space();print.list(props,{separator:false,indent:true,iterator:function(){if(props.length!==1){_this.semicolon();_this.space()}}});this.space()}this.push("}")}function ObjectTypeCallProperty(node,print){if(node["static"])this.push("static ");print(node.value)}function ObjectTypeIndexer(node,print){if(node["static"])this.push("static ");this.push("[");print(node.id);this.push(":");this.space();print(node.key);this.push("]");this.push(":");this.space();print(node.value)}function ObjectTypeProperty(node,print){if(node["static"])this.push("static ");print(node.key);if(node.optional)this.push("?");if(!t.isFunctionTypeAnnotation(node.value)){this.push(":");this.space()}print(node.value)}function QualifiedTypeIdentifier(node,print){print(node.qualification);this.push(".");print(node.id)}function UnionTypeAnnotation(node,print){print.join(node.types,{separator:" | "})}function TypeCastExpression(node,print){this.push("(");print(node.expression);print(node.typeAnnotation);this.push(")")}function VoidTypeAnnotation(node){this.push("void")}},{"../../types":153}],26:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.JSXAttribute=JSXAttribute;exports.JSXIdentifier=JSXIdentifier;exports.JSXNamespacedName=JSXNamespacedName;exports.JSXMemberExpression=JSXMemberExpression;exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXExpressionContainer=JSXExpressionContainer;exports.JSXElement=JSXElement;exports.JSXOpeningElement=JSXOpeningElement;exports.JSXClosingElement=JSXClosingElement;exports.JSXEmptyExpression=JSXEmptyExpression;exports.__esModule=true;var each=_interopRequire(require("lodash/collection/each"));var t=_interopRequireWildcard(require("../../types"));function JSXAttribute(node,print){print(node.name);if(node.value){this.push("=");print(node.value)}}function JSXIdentifier(node){this.push(node.name)}function JSXNamespacedName(node,print){print(node.namespace);this.push(":");print(node.name)}function JSXMemberExpression(node,print){print(node.object);this.push(".");print(node.property)}function JSXSpreadAttribute(node,print){this.push("{...");print(node.argument);this.push("}")}function JSXExpressionContainer(node,print){this.push("{");print(node.expression);this.push("}")}function JSXElement(node,print){var _this=this;var open=node.openingElement;print(open);if(open.selfClosing)return;this.indent();each(node.children,function(child){if(t.isLiteral(child)){_this.push(child.value)}else{print(child)}});this.dedent();print(node.closingElement)}function JSXOpeningElement(node,print){this.push("<");print(node.name);if(node.attributes.length>0){this.push(" ");print.join(node.attributes,{separator:" "})}this.push(node.selfClosing?" />":">")}function JSXClosingElement(node,print){this.push("")}function JSXEmptyExpression(){}},{"../../types":153, -"lodash/collection/each":316}],27:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports._params=_params;exports._method=_method;exports.FunctionExpression=FunctionExpression;exports.ArrowFunctionExpression=ArrowFunctionExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../types"));function _params(node,print){var _this=this;print(node.typeParameters);this.push("(");print.list(node.params,{iterator:function(node){if(node.optional)_this.push("?");print(node.typeAnnotation)}});this.push(")");if(node.returnType){print(node.returnType)}}function _method(node,print){var value=node.value;var kind=node.kind;var key=node.key;if(kind==="method"||kind==="init"){if(value.generator){this.push("*")}}if(kind==="get"||kind==="set"){this.push(kind+" ")}if(value.async)this.push("async ");if(node.computed){this.push("[");print(key);this.push("]")}else{print(key)}this._params(value,print);this.push(" ");print(value.body)}function FunctionExpression(node,print){if(node.async)this.push("async ");this.push("function");if(node.generator)this.push("*");if(node.id){this.push(" ");print(node.id)}else{this.space()}this._params(node,print);this.space();print(node.body)}exports.FunctionDeclaration=FunctionExpression;function ArrowFunctionExpression(node,print){if(node.async)this.push("async ");if(node.params.length===1&&t.isIdentifier(node.params[0])){print(node.params[0])}else{this._params(node,print)}this.push(" => ");print(node.body)}},{"../../types":153}],28:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.ImportSpecifier=ImportSpecifier;exports.ImportDefaultSpecifier=ImportDefaultSpecifier;exports.ExportDefaultSpecifier=ExportDefaultSpecifier;exports.ExportSpecifier=ExportSpecifier;exports.ExportNamespaceSpecifier=ExportNamespaceSpecifier;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ImportDeclaration=ImportDeclaration;exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier;exports.__esModule=true;var each=_interopRequire(require("lodash/collection/each"));var t=_interopRequireWildcard(require("../../types"));function ImportSpecifier(node,print){print(node.imported);if(node.local&&node.local!==node.imported){this.push(" as ");print(node.local)}}function ImportDefaultSpecifier(node,print){print(node.local)}function ExportDefaultSpecifier(node,print){print(node.exported)}function ExportSpecifier(node,print){print(node.local);if(node.exported&&node.local!==node.exported){this.push(" as ");print(node.exported)}}function ExportNamespaceSpecifier(node,print){this.push("* as ");print(node.exported)}function ExportAllDeclaration(node,print){this.push("export *");if(node.exported){this.push(" as ");print(node.exported)}this.push(" from ");print(node.source);this.semicolon()}function ExportNamedDeclaration(node,print){this.push("export ");ExportDeclaration.call(this,node,print)}function ExportDefaultDeclaration(node,print){this.push("export default ");ExportDeclaration.call(this,node,print)}function ExportDeclaration(node,print){var specifiers=node.specifiers;if(node.declaration){var declar=node.declaration;print(declar);if(t.isStatement(declar)||t.isFunction(declar)||t.isClass(declar))return}else{var first=specifiers[0];var hasSpecial=false;if(t.isExportDefaultSpecifier(first)||t.isExportNamespaceSpecifier(first)){hasSpecial=true;print(specifiers.shift());if(specifiers.length){this.push(", ")}}if(specifiers.length||!specifiers.length&&!hasSpecial){this.push("{");if(specifiers.length){this.space();print.join(specifiers,{separator:", "});this.space()}this.push("}")}if(node.source){this.push(" from ");print(node.source)}}this.ensureSemicolon()}function ImportDeclaration(node,print){this.push("import ");if(node.isType){this.push("type ")}var specfiers=node.specifiers;if(specfiers&&specfiers.length){var first=node.specifiers[0];if(t.isImportDefaultSpecifier(first)||t.isImportNamespaceSpecifier(first)){print(node.specifiers.shift());if(node.specifiers.length){this.push(", ")}}if(node.specifiers.length){this.push("{");this.space();print.join(node.specifiers,{separator:", "});this.space();this.push("}")}this.push(" from ")}print(node.source);this.semicolon()}function ImportNamespaceSpecifier(node,print){this.push("* as ");print(node.local)}},{"../../types":153,"lodash/collection/each":316}],29:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.WithStatement=WithStatement;exports.IfStatement=IfStatement;exports.ForStatement=ForStatement;exports.WhileStatement=WhileStatement;exports.DoWhileStatement=DoWhileStatement;exports.LabeledStatement=LabeledStatement;exports.TryStatement=TryStatement;exports.CatchClause=CatchClause;exports.ThrowStatement=ThrowStatement;exports.SwitchStatement=SwitchStatement;exports.SwitchCase=SwitchCase;exports.DebuggerStatement=DebuggerStatement;exports.VariableDeclaration=VariableDeclaration;exports.VariableDeclarator=VariableDeclarator;exports.__esModule=true;var repeating=_interopRequire(require("repeating"));var t=_interopRequireWildcard(require("../../types"));function WithStatement(node,print){this.keyword("with");this.push("(");print(node.object);this.push(")");print.block(node.body)}function IfStatement(node,print){this.keyword("if");this.push("(");print(node.test);this.push(")");this.space();print.indentOnComments(node.consequent);if(node.alternate){if(this.isLast("}"))this.space();this.push("else ");print.indentOnComments(node.alternate)}}function ForStatement(node,print){this.keyword("for");this.push("(");print(node.init);this.push(";");if(node.test){this.push(" ");print(node.test)}this.push(";");if(node.update){this.push(" ");print(node.update)}this.push(")");print.block(node.body)}function WhileStatement(node,print){this.keyword("while");this.push("(");print(node.test);this.push(")");print.block(node.body)}var buildForXStatement=function buildForXStatement(op){return function(node,print){this.keyword("for");this.push("(");print(node.left);this.push(" "+op+" ");print(node.right);this.push(")");print.block(node.body)}};var ForInStatement=buildForXStatement("in");exports.ForInStatement=ForInStatement;var ForOfStatement=buildForXStatement("of");exports.ForOfStatement=ForOfStatement;function DoWhileStatement(node,print){this.keyword("do");print(node.body);this.space();this.keyword("while");this.push("(");print(node.test);this.push(");")}var buildLabelStatement=function buildLabelStatement(prefix,key){return function(node,print){this.push(prefix);var label=node[key||"label"];if(label){this.push(" ");print(label)}this.semicolon()}};var ContinueStatement=buildLabelStatement("continue");exports.ContinueStatement=ContinueStatement;var ReturnStatement=buildLabelStatement("return","argument");exports.ReturnStatement=ReturnStatement;var BreakStatement=buildLabelStatement("break");exports.BreakStatement=BreakStatement;function LabeledStatement(node,print){print(node.label);this.push(": ");print(node.body)}function TryStatement(node,print){this.keyword("try");print(node.block);this.space();if(node.handlers){print(node.handlers[0])}else{print(node.handler)}if(node.finalizer){this.space();this.push("finally ");print(node.finalizer)}}function CatchClause(node,print){this.keyword("catch");this.push("(");print(node.param);this.push(") ");print(node.body)}function ThrowStatement(node,print){this.push("throw ");print(node.argument);this.semicolon()}function SwitchStatement(node,print){this.keyword("switch");this.push("(");print(node.discriminant);this.push(")");this.space();this.push("{");print.sequence(node.cases,{indent:true,addNewlines:function addNewlines(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}});this.push("}")}function SwitchCase(node,print){if(node.test){this.push("case ");print(node.test);this.push(":")}else{this.push("default:")}if(node.consequent.length){this.newline();print.sequence(node.consequent,{indent:true})}}function DebuggerStatement(){this.push("debugger;")}function VariableDeclaration(node,print,parent){this.push(node.kind+" ");var hasInits=false;if(!t.isFor(parent)){for(var i=0;i0)_this.push(" ");print(elem);if(i1e5;if(format.compact){console.error(messages.get("codeGeneratorDeopt",opts.filename,"100KB"))}}return format};CodeGenerator.findCommonStringDelimeter=function findCommonStringDelimeter(code,tokens){var occurences={single:0,"double":0};var checked=0;for(var i=0;i=3)continue;var raw=code.slice(token.start,token.end);if(raw[0]==="'"){occurences.single++}else{occurences.double++}checked++}if(occurences.single>occurences.double){return"single"}else{return"double"}};CodeGenerator.generators={templateLiterals:require("./generators/template-literals"),comprehensions:require("./generators/comprehensions"),expressions:require("./generators/expressions"),statements:require("./generators/statements"),classes:require("./generators/classes"),methods:require("./generators/methods"),modules:require("./generators/modules"),types:require("./generators/types"),flow:require("./generators/flow"),base:require("./generators/base"),jsx:require("./generators/jsx")};CodeGenerator.prototype.generate=function generate(){var ast=this.ast;this.print(ast);var comments=[];each(ast.comments,function(comment){if(!comment._displayed)comments.push(comment)});this._printComments(comments);return{map:this.map.get(),code:this.buffer.get()}};CodeGenerator.prototype.buildPrint=function buildPrint(parent){var _this=this;var print=function(node,opts){return _this.print(node,parent,opts)};print.sequence=function(nodes){var opts=arguments[1]===undefined?{}:arguments[1];opts.statement=true;return _this.printJoin(print,nodes,opts)};print.join=function(nodes,opts){return _this.printJoin(print,nodes,opts)};print.list=function(items){var opts=arguments[1]===undefined?{}:arguments[1];if(opts.separator==null)opts.separator=", ";print.join(items,opts)};print.block=function(node){return _this.printBlock(print,node)};print.indentOnComments=function(node){return _this.printAndIndentOnComments(print,node)};return print};CodeGenerator.prototype.print=function print(node,parent){var _this=this;var opts=arguments[2]===undefined?{}:arguments[2];if(!node)return;if(parent&&parent._compact){node._compact=true}var oldConcise=this.format.concise;if(node._compact){this.format.concise=true}var newline=function(leading){if(!opts.statement&&!n.isUserWhitespacable(node,parent)){return}var lines=0;if(node.start!=null&&!node._ignoreUserWhitespace){if(leading){lines=_this.whitespace.getNewlinesBefore(node)}else{lines=_this.whitespace.getNewlinesAfter(node)}}else{if(!leading)lines++;if(opts.addNewlines)lines+=opts.addNewlines(leading,node)||0;var needs=n.needsWhitespaceAfter;if(leading)needs=n.needsWhitespaceBefore;if(needs(node,parent))lines++;if(!_this.buffer.buf)lines=0}_this.newline(lines)};if(this[node.type]){var needsNoLineTermParens=n.needsParensNoLineTerminator(node,parent);var needsParens=needsNoLineTermParens||n.needsParens(node,parent);if(needsParens)this.push("(");if(needsNoLineTermParens)this.indent();this.printLeadingComments(node,parent);newline(true);if(opts.before)opts.before();this.map.mark(node,"start");this[node.type](node,this.buildPrint(node),parent);if(needsNoLineTermParens){this.newline();this.dedent()}if(needsParens)this.push(")");this.map.mark(node,"end");if(opts.after)opts.after();newline(false);this.printTrailingComments(node,parent)}else{throw new ReferenceError("unknown node of type "+JSON.stringify(node.type)+" with constructor "+JSON.stringify(node&&node.constructor.name))}this.format.concise=oldConcise};CodeGenerator.prototype.printJoin=function printJoin(print,nodes){var _this=this;var opts=arguments[2]===undefined?{}:arguments[2];if(!nodes||!nodes.length)return;var len=nodes.length;if(opts.indent)this.indent();each(nodes,function(node,i){print(node,{statement:opts.statement,addNewlines:opts.addNewlines,after:function(){if(opts.iterator){opts.iterator(node,i)}if(opts.separator&&i","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(tier,i){each(tier,function(op){PRECEDENCE[op]=i})});function NullableTypeAnnotation(node,parent){return t.isArrayTypeAnnotation(parent)}exports.FunctionTypeAnnotation=NullableTypeAnnotation;function UpdateExpression(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}}function ObjectExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function Binary(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node){return true}}}function BinaryExpression(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}}function SequenceExpression(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}return true}function YieldExpression(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)||t.isConditionalExpression(parent)||t.isYieldExpression(parent)}function ClassExpression(node,parent){return t.isExpressionStatement(parent)}function UnaryLike(node,parent){return t.isMemberExpression(parent)&&parent.object===node}function FunctionExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isCallExpression(parent)&&parent.callee===node){return true}}function ConditionalExpression(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isCallExpression(parent)||t.isNewExpression(parent)){if(parent.callee===node){return true}}if(t.isConditionalExpression(parent)&&parent.test===node){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}exports.AssignmentExpression=ConditionalExpression},{"../../types":153,"lodash/collection/each":316}],35:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var each=_interopRequire(require("lodash/collection/each"));var map=_interopRequire(require("lodash/collection/map"));var t=_interopRequireWildcard(require("../../types"));function crawl(node){var state=arguments[1]===undefined?{}:arguments[1];if(t.isMemberExpression(node)){crawl(node.object,state);if(node.computed)crawl(node.property,state)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){crawl(node.left,state);crawl(node.right,state)}else if(t.isCallExpression(node)){state.hasCall=true;crawl(node.callee,state)}else if(t.isFunction(node)){state.hasFunction=true}else if(t.isIdentifier(node)){var _state=state;if(!_state.hasHelper)_state.hasHelper=isHelper(node.callee)}return state}function isHelper(node){if(t.isMemberExpression(node)){return isHelper(node.object)||isHelper(node.property)}else if(t.isIdentifier(node)){return node.name==="require"||node.name[0]==="_"}else if(t.isCallExpression(node)){return isHelper(node.callee)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){return t.isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)}else{return false}}function isType(node){return t.isLiteral(node)||t.isObjectExpression(node)||t.isArrayExpression(node)||t.isIdentifier(node)||t.isMemberExpression(node)}exports.nodes={AssignmentExpression:function AssignmentExpression(node){var state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction){return{before:state.hasFunction,after:true}}},SwitchCase:function SwitchCase(node,parent){return{before:node.consequent.length||parent.cases[0]===node}},LogicalExpression:function LogicalExpression(node){if(t.isFunction(node.left)||t.isFunction(node.right)){return{after:true}}},Literal:function Literal(node){if(node.value==="use strict"){return{after:true}}},CallExpression:function CallExpression(node){if(t.isFunction(node.callee)||isHelper(node)){return{before:true,after:true}}},VariableDeclaration:function VariableDeclaration(node){for(var i=0;i=max){i-=max}return i}var Whitespace=function(){function Whitespace(tokens,comments){_classCallCheck(this,Whitespace);this.tokens=sortBy(tokens.concat(comments),"start");this.used={};this._lastFoundIndex=0}Whitespace.prototype.getNewlinesBefore=function getNewlinesBefore(node){var startToken;var endToken;var tokens=this.tokens;var token;for(var j=0;j")}}).join("\n")}},{chalk:200,esutils:300,"js-tokens":306,"line-numbers":308,repeating:437}],40:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var t=_interopRequireWildcard(require("../types"));module.exports=function(ast,comments,tokens){if(ast&&ast.type==="Program"){return t.file(ast,comments||[],tokens||[])}else{throw new Error("Not a valid ast?")}}},{"../types":153}],41:[function(require,module,exports){"use strict";module.exports=function(){return Object.create(null)}},{}],42:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var normalizeAst=_interopRequire(require("./normalize-ast"));var estraverse=_interopRequire(require("estraverse"));var codeFrame=_interopRequire(require("./code-frame"));var acorn=_interopRequireWildcard(require("../../acorn"));module.exports=function(opts,code,callback){try{var comments=[];var tokens=[];var parseOpts={allowImportExportEverywhere:opts.looseModules,allowReturnOutsideFunction:opts.looseModules,ecmaVersion:6,strictMode:opts.strictMode,sourceType:opts.sourceType,onComment:comments,locations:true,features:opts.features||{},plugins:opts.plugins||{},onToken:tokens,ranges:true};if(opts.nonStandard){parseOpts.plugins.jsx=true;parseOpts.plugins.flow=true}var ast=acorn.parse(code,parseOpts);estraverse.attachComments(ast,comments,tokens);ast=normalizeAst(ast,comments,tokens);if(callback){return callback(ast)}else{return ast}}catch(err){if(!err._babel){err._babel=true;var message=err.message=""+opts.filename+": "+err.message;var loc=err.loc;if(loc){err.codeFrame=codeFrame(code,loc.line,loc.column+1,opts);message+="\n"+err.codeFrame}if(err.stack){var newStack=err.stack.replace(err.message,message);try{err.stack=newStack}catch(e){}}}throw err}}},{"../../acorn":5,"./code-frame":39,"./normalize-ast":40,estraverse:296}],43:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.get=get;exports.parseArgs=parseArgs;exports.__esModule=true;var util=_interopRequireWildcard(require("util"));var MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned so it's probably be dereferenced so we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",classesIllegalConstructorKind:"Illegal kind for constructor method",scopeDuplicateDeclaration:"Duplicate declaration $1",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",settersInvalidParamLength:"Setters must have exactly one parameter",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemeberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",modulesIllegalExportName:"Illegal export $1",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",evalInStrictMode:"eval is not allowed in strict mode",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1"};exports.MESSAGES=MESSAGES;function get(key){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var msg=MESSAGES[key];if(!msg)throw new ReferenceError("Unknown message "+JSON.stringify(key));args=parseArgs(args);return msg.replace(/\$(\d+)/g,function(str,i){return args[--i]})}function parseArgs(args){return args.map(function(val){if(val!=null&&val.inspect){return val.inspect()}else{try{return JSON.stringify(val)||val+""}catch(e){return util.inspect(val)}}})}},{util:199}],44:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var estraverse=_interopRequire(require("estraverse"));var extend=_interopRequire(require("lodash/object/extend"));var types=_interopRequire(require("ast-types"));var t=_interopRequireWildcard(require("./types"));extend(estraverse.VisitorKeys,t.VISITOR_KEYS);var def=types.Type.def;var or=types.Type.or;def("File").bases("Node").build("program").field("program",def("Program"));def("AssignmentPattern").bases("Pattern").build("left","right").field("left",def("Pattern")).field("right",def("Expression"));def("RestElement").bases("Pattern").build("argument").field("argument",def("expression"));def("DoExpression").bases("Expression").build("body").field("body",[def("Statement")]);def("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null));def("ExportNamedDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"))]).field("source",or(def("ModuleSpecifier"),null));types.finalize()},{"./types":153,"ast-types":171,estraverse:296,"lodash/object/extend":406}],45:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var merge=_interopRequire(require("lodash/object/merge"));var path=_interopRequire(require("path"));var fs=_interopRequire(require("fs"));var cache={};var jsons={};function exists(filename){if(!fs.existsSync)return false;var cached=cache[filename];if(cached!=null)return cached;return cache[filename]=fs.existsSync(filename)}module.exports=function(loc){var opts=arguments[1]===undefined?{}:arguments[1];var rel=".babelrc";function find(start,rel){var file=path.join(start,rel);if(exists(file)){var content=fs.readFileSync(file,"utf8");var json;try{var _jsons,_content;json=(_jsons=jsons,_content=content,!_jsons[_content]&&(_jsons[_content]=JSON.parse(content)),_jsons[_content])}catch(err){err.message=""+file+": "+err.message;throw err}if(json.breakConfig)return;merge(opts,json,function(a,b){if(Array.isArray(a)){return a.concat(b)}})}var up=path.dirname(start);if(up!==start){find(up,rel)}}if(opts.breakConfig!==true){find(loc,rel)}return opts}},{fs:172,"lodash/object/merge":410,path:182}],46:[function(require,module,exports){(function(process){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _slicedToArray=function(arr,i){if(Array.isArray(arr)){return arr}else if(Symbol.iterator in Object(arr)){var _arr=[];for(var _iterator=arr[Symbol.iterator](),_step;!(_step=_iterator.next()).done;){_arr.push(_step.value);if(i&&_arr.length===i)break}return _arr}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var convertSourceMap=_interopRequire(require("convert-source-map"));var optionParsers=_interopRequireWildcard(require("./option-parsers"));var shebangRegex=_interopRequire(require("shebang-regex"));var TraversalPath=_interopRequire(require("../../traversal/path"));var isFunction=_interopRequire(require("lodash/lang/isFunction"));var isAbsolute=_interopRequire(require("path-is-absolute"));var resolveRc=_interopRequire(require("../../tools/resolve-rc"));var sourceMap=_interopRequire(require("source-map"));var transform=_interopRequire(require("./../index"));var generate=_interopRequire(require("../../generation"));var defaults=_interopRequire(require("lodash/object/defaults"));var includes=_interopRequire(require("lodash/collection/includes"));var traverse=_interopRequire(require("../../traversal"));var assign=_interopRequire(require("lodash/object/assign"));var Logger=_interopRequire(require("./logger"));var parse=_interopRequire(require("../../helpers/parse"));var Scope=_interopRequire(require("../../traversal/scope"));var slash=_interopRequire(require("slash"));var util=_interopRequireWildcard(require("../../util"));var path=_interopRequire(require("path"));var each=_interopRequire(require("lodash/collection/each"));var t=_interopRequireWildcard(require("../../types"));var checkTransformerVisitor={enter:function enter(node,parent,scope,state){checkNode(state.stack,node,scope)}};function checkNode(stack,node,scope){each(stack,function(pass){if(pass.shouldRun||pass.ran)return;pass.checkNode(node,scope)})}var File=function(){function File(){var opts=arguments[0]===undefined?{}:arguments[0];_classCallCheck(this,File);this.dynamicImportedNoDefault=[];this.dynamicImportIds={};this.dynamicImported=[];this.dynamicImports=[];this.usedHelpers={};this.dynamicData={};this.data={};this.uids={};this.lastStatements=[];this.log=new Logger(this,opts.filename||"unknown");this.opts=this.normalizeOptions(opts);this.ast={};this.buildTransformers()}File.helpers=["inherits","defaults","create-class","create-decorated-class","tagged-template-literal","tagged-template-literal-loose","interop-require","to-array","to-consumable-array","sliced-to-array","sliced-to-array-loose","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-require-wildcard","typeof","extends","get","set","class-call-check","object-destructuring-empty","temporal-undefined","temporal-assert-defined","self-global","default-props"];File.options=require("./options");File.prototype.normalizeOptions=function normalizeOptions(opts){opts=assign({},opts);if(opts.filename){var rcFilename=opts.filename;if(!isAbsolute(rcFilename))rcFilename=path.join(process.cwd(),rcFilename);opts=resolveRc(rcFilename,opts)}for(var key in opts){if(key[0]==="_")continue;var option=File.options[key];if(!option)this.log.error("Unknown option: "+key,ReferenceError)}for(var key in File.options){var option=File.options[key];var val=opts[key];if(!val&&option.optional)continue;if(val&&option.deprecated){throw new Error("Deprecated option "+key+": "+option.deprecated)}if(val==null)val=option["default"]||val;var optionParser=optionParsers[option.type];if(optionParser)val=optionParser(key,val);if(option.alias){var _opts=opts;var _option$alias=option.alias;if(!_opts[_option$alias])_opts[_option$alias]=val}else{opts[key]=val}}if(opts.inputSourceMap){opts.sourceMaps=true}opts.filename=slash(opts.filename);if(opts.sourceRoot){opts.sourceRoot=slash(opts.sourceRoot)}if(opts.moduleId){opts.moduleIds=true}opts.basename=path.basename(opts.filename,path.extname(opts.filename));opts.ignore=util.arrayify(opts.ignore,util.regexify);opts.only=util.arrayify(opts.only,util.regexify);defaults(opts,{moduleRoot:opts.sourceRoot});defaults(opts,{sourceRoot:opts.moduleRoot});defaults(opts,{filenameRelative:opts.filename});defaults(opts,{sourceFileName:opts.filenameRelative,sourceMapName:opts.filenameRelative});if(opts.externalHelpers){this.set("helpersNamespace",t.identifier("babelHelpers"))}return opts};File.prototype.isLoose=function isLoose(key){return includes(this.opts.loose,key)};File.prototype.buildTransformers=function buildTransformers(){var file=this;var transformers=this.transformers={};var secondaryStack=[];var stack=[];each(transform.transformers,function(transformer,key){var pass=transformers[key]=transformer.buildPass(file);if(pass.canTransform()){stack.push(pass);if(transformer.metadata.secondPass){secondaryStack.push(pass)}if(transformer.manipulateOptions){transformer.manipulateOptions(file.opts,file)}}});var beforePlugins=[];var afterPlugins=[];for(var i=0;i=0};File.prototype.attachAuxiliaryComment=function attachAuxiliaryComment(node){var comment=this.opts.auxiliaryComment;if(comment){var _node=node;if(!_node.leadingComments)_node.leadingComments=[];node.leadingComments.push({type:"Line",value:" "+comment})}return node};File.prototype.addHelper=function addHelper(name){if(!includes(File.helpers,name)){throw new ReferenceError("Unknown helper "+name)}var program=this.ast.program;var declar=program._declarations&&program._declarations[name];if(declar)return declar.id;this.usedHelpers[name]=true;var generator=this.get("helperGenerator");var runtime=this.get("helpersNamespace");if(generator){return generator(name)}else if(runtime){var id=t.identifier(t.toIdentifier(name));return t.memberExpression(runtime,id)}else{var ref=util.template("helper-"+name);ref._compact=true;var uid=this.scope.generateUidIdentifier(name);this.scope.push({key:name,id:uid,init:ref});return uid}};File.prototype.errorWithNode=function errorWithNode(node,msg){var Error=arguments[2]===undefined?SyntaxError:arguments[2];var loc=node.loc.start;var err=new Error("Line "+loc.line+": "+msg);err.loc=loc;return err};File.prototype.addCode=function addCode(code){code=(code||"")+"";code=this.parseInputSourceMap(code);this.code=code;return this.parseShebang(code)};File.prototype.shouldIgnore=function shouldIgnore(){var opts=this.opts;return util.shouldIgnore(opts.filename,opts.ignore,opts.only)};File.prototype.parse=function(_parse){var _parseWrapper=function parse(_x2){return _parse.apply(this,arguments)};_parseWrapper.toString=function(){return _parse.toString()};return _parseWrapper}(function(code){var _this=this;if(this.shouldIgnore()){return{metadata:{},code:code,map:null,ast:null}}code=this.addCode(code);var opts=this.opts;var parseOpts={highlightCode:opts.highlightCode,nonStandard:opts.nonStandard,filename:opts.filename,plugins:{}};var features=parseOpts.features={};for(var key in this.transformers){var transformer=this.transformers[key];features[key]=transformer.canTransform()}parseOpts.looseModules=this.isLoose("es6.modules");parseOpts.strictMode=features.strict;parseOpts.sourceType="module";return parse(parseOpts,code,function(tree){_this.transform(tree);return _this.generate()})});File.prototype.setAst=function setAst(ast){this.path=TraversalPath.get(null,null,ast,ast,"program",this);this.scope=this.path.scope;this.ast=ast;this.path.traverse({enter:function enter(node,parent,scope){if(this.isScope()){for(var key in scope.bindings){scope.bindings[key].setTypeAnnotation()}}}})};File.prototype.transform=function transform(ast){this.log.debug();this.setAst(ast);this.lastStatements=t.getLastStatements(ast.program);var modFormatter=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);if(modFormatter.init&&this.transformers["es6.modules"].canTransform()){modFormatter.init()}this.checkNode(ast);this.call("pre");each(this.transformerStack,function(pass){pass.transform()});this.call("post")};File.prototype.call=function call(key){var stack=this.transformerStack;for(var i=0;i=0||val.indexOf(true)>=0){val=Object.keys(transform.transformers)}return transform._ensureTransformerNames(key,val)}function number(key,val){return+val}function boolean(key,val){return!!val}function booleanString(key,val){return util.booleanify(val)}function list(key,val){return util.list(val)}},{"../../util":157,"./../index":63}],49:[function(require,module,exports){module.exports={filename:{type:"string",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:true,type:"string"},inputSourceMap:{hidden:true},moduleId:{description:"specify a custom name for module ids",type:"string"},nonStandard:{type:"boolean","default":true,description:"enable support for JSX and Flow"},experimental:{deprecated:"use `--stage 0`/`{ stage: 0 }` instead"},highlightCode:{description:"ANSI syntax highlight code frames",type:"boolean","default":true},suppressDeprecationMessages:{type:"boolean","default":false,hidden:true},resolveModuleSource:{hidden:true},stage:{description:"ECMAScript proposal stage version to allow [0-4]",shorthand:"e",type:"number","default":2},blacklist:{type:"transformerList",description:"blacklist of transformers to NOT use",shorthand:"b"},whitelist:{type:"transformerList",optional:true,description:"whitelist of transformers to ONLY use",shorthand:"l"},optional:{type:"transformerList",description:"list of optional transformers to enable"},modules:{type:"string",description:"module formatter type to use [common]","default":"common",shorthand:"m"},moduleIds:{type:"boolean","default":false,shorthand:"M",description:"insert an explicit id for modules"},loose:{type:"transformerList",description:"list of transformers to enable loose mode ON",shorthand:"L"},jsxPragma:{type:"string",description:"custom pragma to use with JSX (same functionality as @jsx comments)","default":"React.createElement",shorthand:"P"},plugins:{type:"list",description:""},ignore:{type:"list",description:"list of glob paths to **not** compile"},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:true,"default":true,type:"boolean"},ast:{hidden:true,"default":true,type:"boolean"},comments:{type:"boolean","default":true,description:"output comments in generated output"},compact:{type:"booleanString","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},keepModuleIdExtensions:{type:"boolean",description:"keep extensions when generating module ids","default":false,shorthand:"k"},auxiliaryComment:{type:"string","default":"",shorthand:"a",description:"attach a comment before all helper declarations and auxiliary code"},externalHelpers:{type:"string","default":false,shorthand:"r",description:"uses a reference to `babelHelpers` instead of placing helpers at the top of your code."},metadataUsedHelpers:{type:"boolean","default":false,hidden:true},sourceMap:{alias:"sourceMaps",hidden:true},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":false,shorthand:"s"},sourceMapName:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"string",description:"the root from which all sources are relative"},moduleRoot:{type:"string",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},breakConfig:{type:"boolean","default":false,hidden:true,description:"stop trying to load .babelrc files"}}},{}],50:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var explode=_interopRequire(require("./explode-assignable-expression"));var t=_interopRequireWildcard(require("../../types"));module.exports=function(exports,opts){var isAssignment=function isAssignment(node){return node.operator===opts.operator+"="};var buildAssignment=function buildAssignment(left,right){return t.assignmentExpression("=",left,right)};exports.ExpressionStatement=function(node,parent,scope,file){if(file.isConsequenceExpressionStatement(node))return;var expr=node.expression; + return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function JSXAttribute(node,print){print.plain(node.name);if(node.value){this.push("=");print.plain(node.value)}}function JSXIdentifier(node){this.push(node.name)}function JSXNamespacedName(node,print){print.plain(node.namespace);this.push(":");print.plain(node.name)}function JSXMemberExpression(node,print){print.plain(node.object);this.push(".");print.plain(node.property)}function JSXSpreadAttribute(node,print){this.push("{...");print.plain(node.argument);this.push("}")}function JSXExpressionContainer(node,print){this.push("{");print.plain(node.expression);this.push("}")}function JSXElement(node,print){var open=node.openingElement;print.plain(open);if(open.selfClosing)return;this.indent();var _arr=node.children;for(var _i=0;_i<_arr.length;_i++){var child=_arr[_i];if(t.isLiteral(child)){this.push(child.value,true)}else{print.plain(child)}}this.dedent();print.plain(node.closingElement)}function JSXOpeningElement(node,print){this.push("<");print.plain(node.name);if(node.attributes.length>0){this.push(" ");print.join(node.attributes,{separator:" "})}this.push(node.selfClosing?" />":">")}function JSXClosingElement(node,print){this.push("")}function JSXEmptyExpression(){}},{"../../types":182}],30:[function(require,module,exports){"use strict";exports.__esModule=true;exports._params=_params;exports._method=_method;exports.FunctionExpression=FunctionExpression;exports.ArrowFunctionExpression=ArrowFunctionExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function _params(node,print){var _this=this;print.plain(node.typeParameters);this.push("(");print.list(node.params,{iterator:function iterator(node){if(node.optional)_this.push("?");print.plain(node.typeAnnotation)}});this.push(")");if(node.returnType){print.plain(node.returnType)}}function _method(node,print){var value=node.value;var kind=node.kind;var key=node.key;if(kind==="method"||kind==="init"){if(value.generator){this.push("*")}}if(kind==="get"||kind==="set"){this.push(kind+" ")}if(value.async)this.push("async ");if(node.computed){this.push("[");print.plain(key);this.push("]")}else{print.plain(key)}this._params(value,print);this.push(" ");print.plain(value.body)}function FunctionExpression(node,print){if(node.async)this.push("async ");this.push("function");if(node.generator)this.push("*");if(node.id){this.push(" ");print.plain(node.id)}else{this.space()}this._params(node,print);this.space();print.plain(node.body)}exports.FunctionDeclaration=FunctionExpression;function ArrowFunctionExpression(node,print){if(node.async)this.push("async ");if(node.params.length===1&&t.isIdentifier(node.params[0])){print.plain(node.params[0])}else{this._params(node,print)}this.push(" => ");var bodyNeedsParens=t.isObjectExpression(node.body);if(bodyNeedsParens){this.push("(")}print.plain(node.body);if(bodyNeedsParens){this.push(")")}}},{"../../types":182}],31:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ImportSpecifier=ImportSpecifier;exports.ImportDefaultSpecifier=ImportDefaultSpecifier;exports.ExportDefaultSpecifier=ExportDefaultSpecifier;exports.ExportSpecifier=ExportSpecifier;exports.ExportNamespaceSpecifier=ExportNamespaceSpecifier;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ImportDeclaration=ImportDeclaration;exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function ImportSpecifier(node,print){print.plain(node.imported);if(node.local&&node.local.name!==node.imported.name){this.push(" as ");print.plain(node.local)}}function ImportDefaultSpecifier(node,print){print.plain(node.local)}function ExportDefaultSpecifier(node,print){print.plain(node.exported)}function ExportSpecifier(node,print){print.plain(node.local);if(node.exported&&node.local.name!==node.exported.name){this.push(" as ");print.plain(node.exported)}}function ExportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.exported)}function ExportAllDeclaration(node,print){this.push("export *");if(node.exported){this.push(" as ");print.plain(node.exported)}this.push(" from ");print.plain(node.source);this.semicolon()}function ExportNamedDeclaration(node,print){this.push("export ");ExportDeclaration.call(this,node,print)}function ExportDefaultDeclaration(node,print){this.push("export default ");ExportDeclaration.call(this,node,print)}function ExportDeclaration(node,print){var specifiers=node.specifiers;if(node.declaration){var declar=node.declaration;print.plain(declar);if(t.isStatement(declar)||t.isFunction(declar)||t.isClass(declar))return}else{var first=specifiers[0];var hasSpecial=false;if(t.isExportDefaultSpecifier(first)||t.isExportNamespaceSpecifier(first)){hasSpecial=true;print.plain(specifiers.shift());if(specifiers.length){this.push(", ")}}if(specifiers.length||!specifiers.length&&!hasSpecial){this.push("{");if(specifiers.length){this.space();print.join(specifiers,{separator:", "});this.space()}this.push("}")}if(node.source){this.push(" from ");print.plain(node.source)}}this.ensureSemicolon()}function ImportDeclaration(node,print){this.push("import ");if(node.isType){this.push("type ")}var specfiers=node.specifiers;if(specfiers&&specfiers.length){var first=node.specifiers[0];if(t.isImportDefaultSpecifier(first)||t.isImportNamespaceSpecifier(first)){print.plain(node.specifiers.shift());if(node.specifiers.length){this.push(", ")}}if(node.specifiers.length){this.push("{");this.space();print.join(node.specifiers,{separator:", "});this.space();this.push("}")}this.push(" from ")}print.plain(node.source);this.semicolon()}function ImportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.local)}},{"../../types":182}],32:[function(require,module,exports){"use strict";exports.__esModule=true;exports.WithStatement=WithStatement;exports.IfStatement=IfStatement;exports.ForStatement=ForStatement;exports.WhileStatement=WhileStatement;exports.DoWhileStatement=DoWhileStatement;exports.LabeledStatement=LabeledStatement;exports.TryStatement=TryStatement;exports.CatchClause=CatchClause;exports.ThrowStatement=ThrowStatement;exports.SwitchStatement=SwitchStatement;exports.SwitchCase=SwitchCase;exports.DebuggerStatement=DebuggerStatement;exports.VariableDeclaration=VariableDeclaration;exports.VariableDeclarator=VariableDeclarator;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _types=require("../../types");var t=_interopRequireWildcard(_types);function WithStatement(node,print){this.keyword("with");this.push("(");print.plain(node.object);this.push(")");print.block(node.body)}function IfStatement(node,print){this.keyword("if");this.push("(");print.plain(node.test);this.push(")");this.space();print.indentOnComments(node.consequent);if(node.alternate){if(this.isLast("}"))this.space();this.push("else ");print.indentOnComments(node.alternate)}}function ForStatement(node,print){this.keyword("for");this.push("(");print.plain(node.init);this.push(";");if(node.test){this.push(" ");print.plain(node.test)}this.push(";");if(node.update){this.push(" ");print.plain(node.update)}this.push(")");print.block(node.body)}function WhileStatement(node,print){this.keyword("while");this.push("(");print.plain(node.test);this.push(")");print.block(node.body)}var buildForXStatement=function buildForXStatement(op){return function(node,print){this.keyword("for");this.push("(");print.plain(node.left);this.push(" "+op+" ");print.plain(node.right);this.push(")");print.block(node.body)}};var ForInStatement=buildForXStatement("in");exports.ForInStatement=ForInStatement;var ForOfStatement=buildForXStatement("of");exports.ForOfStatement=ForOfStatement;function DoWhileStatement(node,print){this.push("do ");print.plain(node.body);this.space();this.keyword("while");this.push("(");print.plain(node.test);this.push(");")}var buildLabelStatement=function buildLabelStatement(prefix,key){return function(node,print){this.push(prefix);var label=node[key||"label"];if(label){this.push(" ");print.plain(label)}this.semicolon()}};var ContinueStatement=buildLabelStatement("continue");exports.ContinueStatement=ContinueStatement;var ReturnStatement=buildLabelStatement("return","argument");exports.ReturnStatement=ReturnStatement;var BreakStatement=buildLabelStatement("break");exports.BreakStatement=BreakStatement;function LabeledStatement(node,print){print.plain(node.label);this.push(": ");print.plain(node.body)}function TryStatement(node,print){this.keyword("try");print.plain(node.block);this.space();if(node.handlers){print.plain(node.handlers[0])}else{print.plain(node.handler)}if(node.finalizer){this.space();this.push("finally ");print.plain(node.finalizer)}}function CatchClause(node,print){this.keyword("catch");this.push("(");print.plain(node.param);this.push(") ");print.plain(node.body)}function ThrowStatement(node,print){this.push("throw ");print.plain(node.argument);this.semicolon()}function SwitchStatement(node,print){this.keyword("switch");this.push("(");print.plain(node.discriminant);this.push(")");this.space();this.push("{");print.sequence(node.cases,{indent:true,addNewlines:function addNewlines(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}});this.push("}")}function SwitchCase(node,print){if(node.test){this.push("case ");print.plain(node.test);this.push(":")}else{this.push("default:")}if(node.consequent.length){this.newline();print.sequence(node.consequent,{indent:true})}}function DebuggerStatement(){this.push("debugger;")}function VariableDeclaration(node,print,parent){this.push(node.kind+" ");var hasInits=false;if(!t.isFor(parent)){var _arr=node.declarations;for(var _i=0;_i<_arr.length;_i++){var declar=_arr[_i];if(declar.init){hasInits=true}}}var sep=",";if(!this.format.compact&&!this.format.concise&&hasInits&&!this.format.retainLines){sep+="\n"+(0,_repeating2["default"])(" ",node.kind.length+1)}else{sep+=" "}print.list(node.declarations,{separator:sep});if(t.isFor(parent)){if(parent.left===node||parent.init===node)return}this.semicolon()}function VariableDeclarator(node,print){print.plain(node.id);print.plain(node.id.typeAnnotation);if(node.init){this.space();this.push("=");this.space();print.plain(node.init)}}},{"../../types":182,repeating:489}],33:[function(require,module,exports){"use strict";exports.__esModule=true;exports.TaggedTemplateExpression=TaggedTemplateExpression;exports.TemplateElement=TemplateElement;exports.TemplateLiteral=TemplateLiteral;function TaggedTemplateExpression(node,print){print.plain(node.tag);print.plain(node.quasi)}function TemplateElement(node){this._push(node.value.raw)}function TemplateLiteral(node,print){this.push("`");var quasis=node.quasis;var len=quasis.length;for(var i=0;i0)this.push(" ");print.plain(elem);if(i1e5;if(format.compact){console.error("[BABEL] "+messages.get("codeGeneratorDeopt",opts.filename,"100KB"))}}return format};CodeGenerator.findCommonStringDelimiter=function findCommonStringDelimiter(code,tokens){var occurences={single:0,"double":0};var checked=0;for(var i=0;i=3)break}if(occurences.single>occurences.double){return"single"}else{return"double"}};CodeGenerator.prototype.generate=function generate(){var ast=this.ast;this.print(ast);if(ast.comments){var comments=[];var _arr=ast.comments;for(var _i=0;_i<_arr.length;_i++){var comment=_arr[_i];if(!comment._displayed)comments.push(comment)}this._printComments(comments)}return{map:this.map.get(),code:this.buffer.get()}};CodeGenerator.prototype.buildPrint=function buildPrint(parent){return new _nodePrinter2["default"](this,parent)};CodeGenerator.prototype.catchUp=function catchUp(node,parent,leftParenPrinted){if(node.loc&&this.format.retainLines&&this.buffer.buf){var needsParens=false;if(!leftParenPrinted&&parent&&this.position.line","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(tier,i){(0,_lodashCollectionEach2["default"])(tier,function(op){PRECEDENCE[op]=i})});function NullableTypeAnnotation(node,parent){return t.isArrayTypeAnnotation(parent)}exports.FunctionTypeAnnotation=NullableTypeAnnotation;function UpdateExpression(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}}function ObjectExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function Binary(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node){return true}}}function BinaryExpression(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}}function SequenceExpression(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}return true}function YieldExpression(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)||t.isConditionalExpression(parent)||t.isYieldExpression(parent)}function ClassExpression(node,parent){return t.isExpressionStatement(parent)}function UnaryLike(node,parent){return t.isMemberExpression(parent)&&parent.object===node}function FunctionExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isCallExpression(parent)&&parent.callee===node){return true}}function ConditionalExpression(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isCallExpression(parent)||t.isNewExpression(parent)){if(parent.callee===node){return true}}if(t.isConditionalExpression(parent)&&parent.test===node){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function AssignmentExpression(node){ + if(t.isObjectPattern(node.left)){return true}else{return ConditionalExpression.apply(undefined,arguments)}}},{"../../types":182,"lodash/collection/each":343}],38:[function(require,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 NodePrinter=function(){function NodePrinter(generator,parent){_classCallCheck(this,NodePrinter);this.generator=generator;this.parent=parent}NodePrinter.prototype.plain=function plain(node,opts){return this.generator.print(node,this.parent,opts)};NodePrinter.prototype.sequence=function sequence(nodes){var opts=arguments[1]===undefined?{}:arguments[1];opts.statement=true;return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.join=function join(nodes,opts){return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.list=function list(items){var opts=arguments[1]===undefined?{}:arguments[1];if(opts.separator==null)opts.separator=", ";return this.join(items,opts)};NodePrinter.prototype.block=function block(node){return this.generator.printBlock(this,node)};NodePrinter.prototype.indentOnComments=function indentOnComments(node){return this.generator.printAndIndentOnComments(this,node)};return NodePrinter}();exports["default"]=NodePrinter;module.exports=exports["default"]},{}],39:[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashCollectionMap=require("lodash/collection/map");var _lodashCollectionMap2=_interopRequireDefault(_lodashCollectionMap);var _types=require("../../types");var t=_interopRequireWildcard(_types);function crawl(node){var state=arguments[1]===undefined?{}:arguments[1];if(t.isMemberExpression(node)){crawl(node.object,state);if(node.computed)crawl(node.property,state)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){crawl(node.left,state);crawl(node.right,state)}else if(t.isCallExpression(node)){state.hasCall=true;crawl(node.callee,state)}else if(t.isFunction(node)){state.hasFunction=true}else if(t.isIdentifier(node)){state.hasHelper=state.hasHelper||isHelper(node.callee)}return state}function isHelper(node){if(t.isMemberExpression(node)){return isHelper(node.object)||isHelper(node.property)}else if(t.isIdentifier(node)){return node.name==="require"||node.name[0]==="_"}else if(t.isCallExpression(node)){return isHelper(node.callee)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){return t.isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)}else{return false}}function isType(node){return t.isLiteral(node)||t.isObjectExpression(node)||t.isArrayExpression(node)||t.isIdentifier(node)||t.isMemberExpression(node)}exports.nodes={AssignmentExpression:function AssignmentExpression(node){var state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction){return{before:state.hasFunction,after:true}}},SwitchCase:function SwitchCase(node,parent){return{before:node.consequent.length||parent.cases[0]===node}},LogicalExpression:function LogicalExpression(node){if(t.isFunction(node.left)||t.isFunction(node.right)){return{after:true}}},Literal:function Literal(node){if(node.value==="use strict"){return{after:true}}},CallExpression:function CallExpression(node){if(t.isFunction(node.callee)||isHelper(node)){return{before:true,after:true}}},VariableDeclaration:function VariableDeclaration(node){for(var i=0;i=max){i-=max}return i}var Whitespace=function(){function Whitespace(tokens){_classCallCheck(this,Whitespace);this.tokens=tokens;this.used={};this._lastFoundIndex=0}Whitespace.prototype.getNewlinesBefore=function getNewlinesBefore(node){var startToken;var endToken;var tokens=this.tokens;for(var j=0;j")}}).join("\n")};module.exports=exports["default"]},{chalk:230,esutils:327,"js-tokens":333,"line-numbers":335,repeating:489}],44:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashObjectMerge=require("lodash/object/merge");var _lodashObjectMerge2=_interopRequireDefault(_lodashObjectMerge);exports["default"]=function(dest,src){if(!dest||!src)return;return(0,_lodashObjectMerge2["default"])(dest,src,function(a,b){if(Array.isArray(a)){var c=a.slice(0);for(var _iterator=b,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var v=_ref;if(a.indexOf(v)<0){c.push(v)}}return c}})};module.exports=exports["default"]},{"lodash/object/merge":436}],45:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../types");var t=_interopRequireWildcard(_types);exports["default"]=function(ast,comments,tokens){if(ast&&ast.type==="Program"){return t.file(ast,comments||[],tokens||[])}else{throw new Error("Not a valid ast?")}};module.exports=exports["default"]},{"../types":182}],46:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]=function(){return Object.create(null)};module.exports=exports["default"]},{}],47:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _normalizeAst=require("./normalize-ast");var _normalizeAst2=_interopRequireDefault(_normalizeAst);var _estraverse=require("estraverse");var _estraverse2=_interopRequireDefault(_estraverse);var _acorn=require("../../acorn");var acorn=_interopRequireWildcard(_acorn);exports["default"]=function(code){var opts=arguments[1]===undefined?{}:arguments[1];var commentsAndTokens=[];var comments=[];var tokens=[];var parseOpts={allowImportExportEverywhere:opts.looseModules,allowReturnOutsideFunction:opts.looseModules,allowHashBang:true,ecmaVersion:6,strictMode:opts.strictMode,sourceType:opts.sourceType,locations:true,features:opts.features||{},plugins:opts.plugins||{},onToken:tokens,ranges:true};parseOpts.onToken=function(token){tokens.push(token);commentsAndTokens.push(token)};parseOpts.onComment=function(block,text,start,end,startLoc,endLoc){var comment={type:block?"CommentBlock":"CommentLine",value:text,start:start,end:end,loc:new acorn.SourceLocation(this,startLoc,endLoc),range:[start,end]};commentsAndTokens.push(comment);comments.push(comment)};if(opts.nonStandard){parseOpts.plugins.jsx=true;parseOpts.plugins.flow=true}var ast=acorn.parse(code,parseOpts);_estraverse2["default"].attachComments(ast,comments,tokens);ast=(0,_normalizeAst2["default"])(ast,comments,commentsAndTokens);return ast};module.exports=exports["default"]},{"../../acorn":1,"./normalize-ast":45,estraverse:322}],48:[function(require,module,exports){"use strict";exports.__esModule=true;exports.get=get;exports.parseArgs=parseArgs;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _util=require("util");var util=_interopRequireWildcard(_util);var MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned so it's probably be dereferenced so we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",classesIllegalConstructorKind:"Illegal kind for constructor method",scopeDuplicateDeclaration:"Duplicate declaration $1",settersInvalidParamLength:"Setters must have exactly one parameter",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemeberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",modulesIllegalExportName:"Illegal export $1",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this nodes position, likely because the AST was directly manipulated",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"Must pass a scope and parentPath unless traversing a Program/File got a $1 node",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginIllegalKind:"Illegal kind $1 for plugin $2",pluginIllegalPosition:"Illegal position $1 for plugin $2",pluginKeyCollision:"The plugin $1 collides with another of the same name",pluginNotTransformer:"The plugin $1 didn't export a Transformer instance",pluginUnknown:"Unknown plugin $1",transformerNotFile:"Transformer $1 is resolving to a different Babel version to what is doing the actual transformation..."};exports.MESSAGES=MESSAGES;function get(key){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var msg=MESSAGES[key];if(!msg)throw new ReferenceError("Unknown message "+JSON.stringify(key));args=parseArgs(args);return msg.replace(/\$(\d+)/g,function(str,i){return args[--i]})}function parseArgs(args){return args.map(function(val){if(val!=null&&val.inspect){return val.inspect()}else{try{return JSON.stringify(val)||val+""}catch(e){return util.inspect(val)}}})}},{util:229}],49:[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _estraverse=require("estraverse");var _estraverse2=_interopRequireDefault(_estraverse);var _lodashObjectExtend=require("lodash/object/extend");var _lodashObjectExtend2=_interopRequireDefault(_lodashObjectExtend);var _astTypes=require("ast-types");var _astTypes2=_interopRequireDefault(_astTypes);var _types=require("./types");var t=_interopRequireWildcard(_types);(0,_lodashObjectExtend2["default"])(_estraverse2["default"].VisitorKeys,t.VISITOR_KEYS);var def=_astTypes2["default"].Type.def;var or=_astTypes2["default"].Type.or;def("Noop");def("AssignmentPattern").bases("Pattern").build("left","right").field("left",def("Pattern")).field("right",def("Expression"));def("RestElement").bases("Pattern").build("argument").field("argument",def("expression"));def("DoExpression").bases("Expression").build("body").field("body",[def("Statement")]);def("Super").bases("Expression");def("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null));def("ExportNamedDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"))]).field("source",or(def("ModuleSpecifier"),null));def("ExportNamespaceSpecifier").bases("Specifier").field("exported",def("Identifier"));def("ExportDefaultSpecifier").bases("Specifier").field("exported",def("Identifier"));def("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",def("Identifier")).field("source",def("Literal"));def("BindExpression").bases("Expression").build("object","callee").field("object",or(def("Expression"),null)).field("callee",def("Expression"));_astTypes2["default"].finalize()},{"./types":182,"ast-types":201,estraverse:322,"lodash/object/extend":432}],50:[function(require,module,exports){(function(global){"use strict";require("core-js/shim");require("regenerator/runtime");if(global._babelPolyfill){throw new Error("only one instance of babel/polyfill is allowed")}global._babelPolyfill=true}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"core-js/shim":315,"regenerator/runtime":482}],51:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _generation=require("../generation");var _generation2=_interopRequireDefault(_generation);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../util");var util=_interopRequireWildcard(_util);var _transformationFile=require("../transformation/file");var _transformationFile2=_interopRequireDefault(_transformationFile);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _types=require("../types");var t=_interopRequireWildcard(_types);function buildGlobal(namespace,builder){var body=[];var container=t.functionExpression(null,[t.identifier("global")],t.blockStatement(body));var tree=t.program([t.expressionStatement(t.callExpression(container,[util.template("helper-self-global")]))]);body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.assignmentExpression("=",t.memberExpression(t.identifier("global"),namespace),t.objectExpression([])))]));builder(body);return tree}function buildUmd(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.identifier("global"))]));builder(body);var container=util.template("umd-commonjs-strict",{FACTORY_PARAMETERS:t.identifier("global"),BROWSER_ARGUMENTS:t.assignmentExpression("=",t.memberExpression(t.identifier("root"),namespace),t.objectExpression({})),COMMON_ARGUMENTS:t.identifier("exports"),AMD_ARGUMENTS:t.arrayExpression([t.literal("exports")]),FACTORY_BODY:body,UMD_ROOT:t.identifier("this")});return t.program([container])}function buildVar(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.objectExpression({}))]));builder(body);return t.program(body)}function buildHelpers(body,namespace,whitelist){(0,_lodashCollectionEach2["default"])(_transformationFile2["default"].helpers,function(name){if(whitelist&&whitelist.indexOf(name)===-1)return;var key=t.identifier(t.toIdentifier(name));body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(namespace,key),util.template("helper-"+name))))})}exports["default"]=function(whitelist){var outputType=arguments[1]===undefined?"global":arguments[1];var namespace=t.identifier("babelHelpers");var builder=function builder(body){return buildHelpers(body,namespace,whitelist)};var tree;var build={global:buildGlobal,umd:buildUmd,"var":buildVar}[outputType];if(build){tree=build(namespace,builder)}else{throw new Error(messages.get("unsupportedOutputType",outputType))}return(0,_generation2["default"])(tree).code};module.exports=exports["default"]},{"../generation":35,"../messages":48,"../transformation/file":53,"../types":182,"../util":186,"lodash/collection/each":343}],52:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _stripJsonComments=require("strip-json-comments");var _stripJsonComments2=_interopRequireDefault(_stripJsonComments);var _helpersMerge=require("../helpers/merge");var _helpersMerge2=_interopRequireDefault(_helpersMerge);var _path=require("path");var _path2=_interopRequireDefault(_path);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var cache={};var jsons={};function exists(filename){if(!_fs2["default"].existsSync)return false;var cached=cache[filename];if(cached!=null)return cached;return cache[filename]=_fs2["default"].existsSync(filename)}exports["default"]=function(loc){var opts=arguments[1]===undefined?{}:arguments[1];var rel=".babelrc";if(!opts.babelrc){opts.babelrc=[]}function find(start,rel){var file=_path2["default"].join(start,rel);if(opts.babelrc.indexOf(file)>=0){return}if(exists(file)){var content=_fs2["default"].readFileSync(file,"utf8");var json;try{json=jsons[content]=jsons[content]||JSON.parse((0,_stripJsonComments2["default"])(content))}catch(err){err.message=""+file+": "+err.message;throw err}opts.babelrc.push(file);if(json.breakConfig)return;(0,_helpersMerge2["default"])(opts,json)}var up=_path2["default"].dirname(start);if(up!==start){find(up,rel)}}if(opts.babelrc.indexOf(loc)<0&&opts.breakConfig!==true){find(loc,rel)}return opts};module.exports=exports["default"]},{"../helpers/merge":44,fs:202,path:212,"strip-json-comments":504}],53:[function(require,module,exports){(function(process){"use strict";exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=0)continue;var group=pass.transformer.metadata.group;if(!pass.canTransform()||!group){stack.push(pass);continue}var mergeStack=[];var _arr4=_stack;for(var _i4=0;_i4<_arr4.length;_i4++){var _pass=_arr4[_i4];if(_pass.transformer.metadata.group===group){mergeStack.push(_pass);ignore.push(_pass)}}var visitors=[];var _arr5=mergeStack;for(var _i5=0;_i5<_arr5.length;_i5++){var _pass2=_arr5[_i5];visitors.push(_pass2.handlers)}var visitor=_traversal2["default"].visitors.merge(visitors);var mergeTransformer=new _transformer2["default"](group,visitor);stack.push(mergeTransformer.buildPass(this))}return stack};File.prototype.set=function set(key,val){return this.data[key]=val};File.prototype.setDynamic=function setDynamic(key,fn){this.dynamicData[key]=fn};File.prototype.get=function get(key){var data=this.data[key];if(data){return data}else{var dynamic=this.dynamicData[key];if(dynamic){return this.set(key,dynamic())}}};File.prototype.resolveModuleSource=function resolveModuleSource(source){var resolveModuleSource=this.opts.resolveModuleSource;if(resolveModuleSource)source=resolveModuleSource(source,this.opts.filename);return source};File.prototype.addImport=function addImport(source,name,type){name=name||source;var id=this.dynamicImportIds[name];if(!id){source=this.resolveModuleSource(source);id=this.dynamicImportIds[name]=this.scope.generateUidIdentifier(name);var specifiers=[t.importDefaultSpecifier(id)];var declar=t.importDeclaration(specifiers,t.literal(source));declar._blockHoist=3;if(type){var modules=this.dynamicImportTypes[type]=this.dynamicImportTypes[type]||[];modules.push(declar)}if(this.transformers["es6.modules"].canTransform()){this.moduleFormatter.importSpecifier(specifiers[0],declar,this.dynamicImports);this.moduleFormatter.hasLocalImports=true}else{this.dynamicImports.push(declar)}}return id};File.prototype.attachAuxiliaryComment=function attachAuxiliaryComment(node){var comment=this.opts.auxiliaryComment;if(comment){node.leadingComments=node.leadingComments||[];node.leadingComments.push({type:"CommentLine",value:" "+comment})}return node};File.prototype.addHelper=function addHelper(name){var isSolo=(0,_lodashCollectionIncludes2["default"])(File.soloHelpers,name);if(!isSolo&&!(0,_lodashCollectionIncludes2["default"])(File.helpers,name)){throw new ReferenceError("Unknown helper "+name)}var declar=this.declarations[name];if(declar)return declar;this.usedHelpers[name]=true;if(!isSolo){var generator=this.get("helperGenerator");var runtime=this.get("helpersNamespace");if(generator){return generator(name)}else if(runtime){var id=t.identifier(t.toIdentifier(name));return t.memberExpression(runtime,id)}}var ref=util.template("helper-"+name);var uid=this.declarations[name]=this.scope.generateUidIdentifier(name);if(t.isFunctionExpression(ref)&&!ref.id){ref.body._compact=true;ref._generated=true;ref.id=uid;ref.type="FunctionDeclaration";this.attachAuxiliaryComment(ref);this.path.unshiftContainer("body",ref)}else{ref._compact=true;this.scope.push({id:uid,init:ref,unique:true})}return uid};File.prototype.errorWithNode=function errorWithNode(node,msg){var Error=arguments[2]===undefined?SyntaxError:arguments[2];var err;if(node.loc){var loc=node.loc.start;err=new Error("Line "+loc.line+": "+msg);err.loc=loc}else{err=new Error("There's been an error on a dynamic node. This is almost certainly an internal error. Please report it.")}return err};File.prototype.mergeSourceMap=function mergeSourceMap(map){var opts=this.opts;var inputMap=opts.inputSourceMap;if(inputMap){map.sources[0]=inputMap.file;var inputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(inputMap);var outputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(map);var outputMapGenerator=_sourceMap2["default"].SourceMapGenerator.fromSourceMap(outputMapConsumer);outputMapGenerator.applySourceMap(inputMapConsumer);var mergedMap=outputMapGenerator.toJSON();mergedMap.sources=inputMap.sources;mergedMap.file=inputMap.file;return mergedMap}return map};File.prototype.getModuleFormatter=function getModuleFormatter(type){if((0,_lodashLangIsFunction2["default"])(type)||!_modules2["default"][type]){this.log.deprecate("Custom module formatters are deprecated and will be removed in the next major. Please use Babel plugins instead.")}var ModuleFormatter=(0,_lodashLangIsFunction2["default"])(type)?type:_modules2["default"][type];if(!ModuleFormatter){var loc=util.resolveRelative(type);if(loc)ModuleFormatter=require(loc)}if(!ModuleFormatter){throw new ReferenceError("Unknown module formatter type "+JSON.stringify(type))}return new ModuleFormatter(this)};File.prototype.parse=function parse(code){var opts=this.opts;var parseOpts={highlightCode:opts.highlightCode,nonStandard:opts.nonStandard,filename:opts.filename,plugins:{}};var features=parseOpts.features={};for(var key in this.transformers){var transformer=this.transformers[key];features[key]=transformer.canTransform()}parseOpts.looseModules=this.isLoose("es6.modules");parseOpts.strictMode=features.strict;parseOpts.sourceType="module";this.log.debug("Parse start");var tree=(0,_helpersParse2["default"])(code,parseOpts);this.log.debug("Parse stop");return tree};File.prototype._addAst=function _addAst(ast){this.path=_traversalPath2["default"].get({hub:this.hub,parentPath:null,parent:ast,container:ast,key:"program"}).setContext();this.scope=this.path.scope;this.ast=ast};File.prototype.addAst=function addAst(ast){this.log.debug("Start set AST");this._addAst(ast);this.log.debug("End set AST");this.log.debug("Start module formatter init");var modFormatter=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);if(modFormatter.init&&this.transformers["es6.modules"].canTransform()){modFormatter.init()}this.log.debug("End module formatter init")};File.prototype.transform=function transform(){this.call("pre");var _arr6=this.transformerStack;for(var _i6=0;_i6<_arr6.length;_i6++){var pass=_arr6[_i6];pass.transform()}this.call("post");return this.generate()};File.prototype.wrap=function wrap(code,callback){code=code+"";try{if(this.shouldIgnore()){return this.makeResult({code:code,ignored:true})}else{return callback()}}catch(err){if(err._babel){throw err}else{err._babel=true}var message=err.message=""+this.opts.filename+": "+err.message;var loc=err.loc;if(loc){err.codeFrame=(0,_helpersCodeFrame2["default"])(code,loc.line,loc.column+1,this.opts);message+="\n"+err.codeFrame}if(err.stack){var newStack=err.stack.replace(err.message,message);try{err.stack=newStack}catch(e){}}throw err}};File.prototype.addCode=function addCode(code){code=(code||"")+"";code=this.parseInputSourceMap(code);this.code=code};File.prototype.parseCode=function parseCode(){this.parseShebang();this.addAst(this.parse(this.code))};File.prototype.shouldIgnore=function shouldIgnore(){var opts=this.opts;return util.shouldIgnore(opts.filename,opts.ignore,opts.only)};File.prototype.call=function call(key){var _arr7=this.uncollapsedTransformerStack;for(var _i7=0;_i7<_arr7.length;_i7++){var pass=_arr7[_i7];var fn=pass.transformer[key];if(fn)fn(this)}};File.prototype.parseInputSourceMap=function parseInputSourceMap(code){var opts=this.opts;if(opts.inputSourceMap!==false){var inputMap=_convertSourceMap2["default"].fromSource(code);if(inputMap){opts.inputSourceMap=inputMap.toObject();code=_convertSourceMap2["default"].removeComments(code)}}return code};File.prototype.parseShebang=function parseShebang(){var shebangMatch=_shebangRegex2["default"].exec(this.code);if(shebangMatch){this.shebang=shebangMatch[0];this.code=this.code.replace(_shebangRegex2["default"],"")}};File.prototype.makeResult=function makeResult(_ref){var code=_ref.code;var _ref$map=_ref.map;var map=_ref$map===undefined?null:_ref$map;var ast=_ref.ast;var ignored=_ref.ignored;var result={metadata:null,ignored:!!ignored,code:null,ast:null,map:map};if(this.opts.code){result.code=code}if(this.opts.ast){result.ast=ast}if(this.opts.metadata){result.metadata=this.metadata;result.metadata.usedHelpers=Object.keys(this.usedHelpers)}return result};File.prototype.generate=function generate(){var opts=this.opts;var ast=this.ast;var result={ast:ast};if(!opts.code)return this.makeResult(result);this.log.debug("Generation start");var _result=(0,_generation2["default"])(ast,opts,this.code);result.code=_result.code;result.map=_result.map;this.log.debug("Generation end");if(this.shebang){result.code=""+this.shebang+"\n"+result.code}if(result.map){result.map=this.mergeSourceMap(result.map)}if(opts.sourceMaps==="inline"||opts.sourceMaps==="both"){result.code+="\n"+_convertSourceMap2["default"].fromObject(result.map).toComment()}if(opts.sourceMaps==="inline"){result.map=null}return this.makeResult(result)};_createClass(File,null,[{key:"helpers",value:["inherits","defaults","create-class","create-decorated-class","create-decorated-object","define-decorated-property-descriptor","tagged-template-literal","tagged-template-literal-loose","to-array","to-consumable-array","sliced-to-array","sliced-to-array-loose","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-require-wildcard","interop-require-default","typeof","extends","get","set","class-call-check","object-destructuring-empty","temporal-undefined","temporal-assert-defined","self-global","default-props","instanceof","interop-require"],enumerable:true},{key:"soloHelpers",value:[],enumerable:true},{key:"options",value:require("./options"),enumerable:true}]);return File}();exports["default"]=File;module.exports=exports["default"]}).call(this,require("_process"))},{"../../generation":35,"../../helpers/code-frame":43,"../../helpers/merge":44,"../../helpers/parse":47,"../../tools/resolve-rc":52,"../../traversal":159,"../../traversal/hub":158,"../../traversal/path":166,"../../types":182,"../../util":186,"../modules":79,"../transformer":85,"./logger":54,"./option-parsers":55,"./options":56,"./plugin-manager":57,_process:213,"convert-source-map":238,"lodash/collection/includes":345,"lodash/lang/clone":415,"lodash/lang/isFunction":421,"lodash/object/assign":430,"lodash/object/defaults":431,path:212,"path-is-absolute":447,"shebang-regex":491,slash:492,"source-map":493}],54:[function(require,module,exports){"use strict";exports.__esModule=true;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")}}var _debugNode=require("debug/node");var _debugNode2=_interopRequireDefault(_debugNode);var verboseDebug=(0,_debugNode2["default"])("babel:verbose");var generalDebug=(0,_debugNode2["default"])("babel");var Logger=function(){function Logger(file,filename){_classCallCheck(this,Logger);this.filename=filename;this.file=file}Logger.prototype._buildMessage=function _buildMessage(msg){var parts="[BABEL] "+this.filename;if(msg)parts+=": "+msg;return parts};Logger.prototype.warn=function warn(msg){console.warn(this._buildMessage(msg))};Logger.prototype.error=function error(msg){var Constructor=arguments[1]===undefined?Error:arguments[1];throw new Constructor(this._buildMessage(msg))};Logger.prototype.deprecate=function deprecate(msg){if(!this.file.opts.suppressDeprecationMessages){console.error(this._buildMessage(msg))}};Logger.prototype.verbose=function verbose(msg){if(verboseDebug.enabled)verboseDebug(this._buildMessage(msg))};Logger.prototype.debug=function debug(msg){if(generalDebug.enabled)generalDebug(this._buildMessage(msg))};Logger.prototype.deopt=function deopt(node,msg){this.debug(msg)};return Logger}();exports["default"]=Logger;module.exports=exports["default"]},{"debug/node":317}],55:[function(require,module,exports){"use strict";exports.__esModule=true;exports.transformerList=transformerList;exports.number=number;exports.boolean=boolean;exports.booleanString=booleanString;exports.list=list;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _util=require("../../util");var util=_interopRequireWildcard(_util);function transformerList(key,val,pipeline){val=util.arrayify(val);if(val.indexOf("all")>=0||val.indexOf(true)>=0){val=Object.keys(pipeline.transformers)}return pipeline._ensureTransformerNames(key,val)}function number(key,val){return+val}function boolean(key,val){return!!val}function booleanString(key,val){return util.booleanify(val)}function list(key,val){return util.list(val)}},{"../../util":186}],56:[function(require,module,exports){module.exports={filename:{type:"string",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:true,type:"string"},inputSourceMap:{hidden:true},extra:{hidden:true,"default":{}},env:{hidden:true,"default":{}},moduleId:{description:"specify a custom name for module ids",type:"string"},getModuleId:{hidden:true},retainLines:{type:"boolean","default":false,description:"retain line numbers - will result in really ugly code"},nonStandard:{type:"boolean","default":true,description:"enable/disable support for JSX and Flow (on by default)"},experimental:{type:"boolean",description:"allow use of experimental transformers","default":false},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean","default":true},suppressDeprecationMessages:{type:"boolean","default":false,hidden:true},resolveModuleSource:{hidden:true},stage:{description:"ECMAScript proposal stage version to allow [0-4]",shorthand:"e",type:"number","default":2},blacklist:{type:"transformerList",description:"blacklist of transformers to NOT use",shorthand:"b"},whitelist:{type:"transformerList",optional:true,description:"whitelist of transformers to ONLY use",shorthand:"l"},optional:{type:"transformerList",description:"list of optional transformers to enable"},modules:{type:"string",description:"module formatter type to use [common]","default":"common",shorthand:"m"},moduleIds:{type:"boolean","default":false,shorthand:"M",description:"insert an explicit id for modules"},loose:{type:"transformerList",description:"list of transformers to enable loose mode ON",shorthand:"L"},jsxPragma:{type:"string",description:"custom pragma to use with JSX (same functionality as @jsx comments)","default":"React.createElement",shorthand:"P"},plugins:{type:"list",description:""},ignore:{type:"list",description:"list of glob paths to **not** compile"},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:true,"default":true,type:"boolean"},metadata:{hidden:true,"default":true,type:"boolean"},ast:{hidden:true,"default":true,type:"boolean"},comments:{type:"boolean","default":true,description:"strip/output comments in generated output (on by default)"},compact:{type:"booleanString","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},keepModuleIdExtensions:{type:"boolean",description:"keep extensions when generating module ids","default":false,shorthand:"k"},auxiliaryComment:{type:"string","default":"",shorthand:"a",description:"attach a comment before all helper declarations and auxiliary code"},externalHelpers:{type:"boolean","default":false,shorthand:"r",description:"uses a reference to `babelHelpers` instead of placing helpers at the top of your code."},metadataUsedHelpers:{deprecated:"Not required anymore as this is enabled by default",type:"boolean","default":false,hidden:true},sourceMap:{alias:"sourceMaps",hidden:true},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":false,shorthand:"s"},sourceMapName:{alias:"sourceMapTarget",description:"DEPRECATED - Please use sourceMapTarget"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"string",description:"the root from which all sources are relative"},moduleRoot:{type:"string",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},breakConfig:{type:"boolean","default":false,hidden:true,description:"stop trying to load .babelrc files"},babelrc:{hidden:true,description:"do not load the same .babelrc file twice"}}},{}],57:[function(require,module,exports){"use strict";exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=3){callExpr._prettyCall=true}return t.inherits(callExpr,node)}};var addDisplayName=function addDisplayName(id,call){var props=call.arguments[0].properties;var safe=true;for(var i=0;i=3){callExpr._prettyCall=true}return t.inherits(callExpr,node)}};var addDisplayName=function addDisplayName(id,call){var props=call.arguments[0].properties;var safe=true;for(var i=0;i=0}function pullFlag(node,flag){var flags=node.regex.flags.split("");if(node.regex.flags.indexOf(flag)<0)return;pull(flags,flag);node.regex.flags=flags.join("")}},{"../../types":153,"lodash/array/pull":313}],60:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var t=_interopRequireWildcard(require("../../types"));var awaitVisitor={enter:function enter(node,parent,scope,state){if(t.isFunction(node))this.skip();if(t.isAwaitExpression(node)){node.type="YieldExpression";if(node.all){node.all=false;node.argument=t.callExpression(t.memberExpression(t.identifier("Promise"),t.identifier("all")),[node.argument])}}}};var referenceVisitor={enter:function enter(node,parent,scope,state){var name=state.id.name;if(t.isReferencedIdentifier(node,parent,{name:name})&&scope.bindingIdentifierEquals(name,state.id)){var _state;return _state=state,!_state.ref&&(_state.ref=scope.generateUidIdentifier(name)),_state.ref}}};module.exports=function(node,callId,scope){node.async=false;node.generator=true;scope.traverse(node,awaitVisitor,state);var call=t.callExpression(callId,[node]);var id=node.id;node.id=null;if(t.isFunctionDeclaration(node)){var declar=t.variableDeclaration("let",[t.variableDeclarator(id,call)]);declar._blockHoist=true;return declar}else{if(id){var state={id:id};scope.traverse(node,referenceVisitor,state);if(state.ref){scope.parent.push({id:state.ref});return t.assignmentExpression("=",state.ref,call)}}return call}}},{"../../types":153}],61:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _toConsumableArray=function(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i=0}function pullFlag(node,flag){var flags=node.regex.flags.split("");if(node.regex.flags.indexOf(flag)<0)return;(0,_lodashArrayPull2["default"])(flags,flag);node.regex.flags=flags.join("")}},{"../../types":182,"lodash/array/pull":340}],69:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);var awaitVisitor={Function:function Function(){this.skip()},AwaitExpression:function AwaitExpression(node){node.type="YieldExpression";if(node.all){node.all=false;node.argument=t.callExpression(t.memberExpression(t.identifier("Promise"),t.identifier("all")),[node.argument])}}};var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){var name=state.id.name;if(node.name===name&&scope.bindingIdentifierEquals(name,state.id)){return state.ref=state.ref||scope.generateUidIdentifier(name)}}};exports["default"]=function(path,callId){var node=path.node;node.async=false;node.generator=true;path.traverse(awaitVisitor,state);var call=t.callExpression(callId,[node]);var id=node.id;node.id=null;if(t.isFunctionDeclaration(node)){var declar=t.variableDeclaration("let",[t.variableDeclarator(id,call)]);declar._blockHoist=true;return declar}else{if(id){var state={id:id};path.traverse(referenceVisitor,state);if(state.ref){path.scope.parent.push({id:state.ref});return t.assignmentExpression("=",state.ref,call)}}return call}};module.exports=exports["default"]},{"../../types":182}],70:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../../types");var t=_interopRequireWildcard(_types);function isIllegalBareSuper(node,parent){if(!t.isSuper(node))return false;if(t.isMemberExpression(parent,{computed:false}))return false;if(t.isCallExpression(parent,{callee:node}))return false;return true}function isMemberExpressionSuper(node){return t.isMemberExpression(node)&&t.isSuper(node.object)}var visitor={enter:function enter(node,parent,scope,state){var topLevel=state.topLevel;var self=state.self;if(t.isFunction(node)&&!t.isArrowFunctionExpression(node)){self.traverseLevel(this,false);return this.skip()}if(t.isProperty(node,{method:true})||t.isMethodDefinition(node)){return this.skip()}var getThisReference=topLevel?t.thisExpression:self.getThisReference.bind(self);var callback=self.specHandle;if(self.isLoose)callback=self.looseHandle;var result=callback.call(self,this,getThisReference);if(result)this.hasSuper=true;if(result===true)return;return result}};var ReplaceSupers=function(){function ReplaceSupers(opts){var inClass=arguments[1]===undefined?false:arguments[1];_classCallCheck(this,ReplaceSupers);this.topLevelThisReference=opts.topLevelThisReference;this.methodPath=opts.methodPath;this.methodNode=opts.methodNode;this.superRef=opts.superRef;this.isStatic=opts.isStatic;this.hasSuper=false;this.inClass=inClass;this.isLoose=opts.isLoose;this.scope=opts.scope;this.file=opts.file;this.opts=opts}ReplaceSupers.prototype.getObjectRef=function getObjectRef(){return this.opts.objectRef||this.opts.getObjectRef()};ReplaceSupers.prototype.setSuperProperty=function setSuperProperty(property,value,isComputed,thisExpression){return t.callExpression(this.file.addHelper("set"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),value,thisExpression])};ReplaceSupers.prototype.getSuperProperty=function getSuperProperty(property,isComputed,thisExpression){return t.callExpression(this.file.addHelper("get"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),thisExpression])};ReplaceSupers.prototype.replace=function replace(){this.traverseLevel(this.methodPath.get("value"),true)};ReplaceSupers.prototype.traverseLevel=function traverseLevel(path,topLevel){var state={self:this,topLevel:topLevel};path.traverse(visitor,state)};ReplaceSupers.prototype.getThisReference=function getThisReference(){if(this.topLevelThisReference){return this.topLevelThisReference}else{var ref=this.topLevelThisReference=this.scope.generateUidIdentifier("this");this.methodNode.value.body.body.unshift(t.variableDeclaration("var",[t.variableDeclarator(this.topLevelThisReference,t.thisExpression())]));return ref}};ReplaceSupers.prototype.getLooseSuperProperty=function getLooseSuperProperty(id,parent){var methodNode=this.methodNode;var methodName=methodNode.key;var superRef=this.superRef||t.identifier("Function");if(parent.property===id){return}else if(t.isCallExpression(parent,{callee:id})){parent.arguments.unshift(t.thisExpression());if(methodName.name==="constructor"){return t.memberExpression(superRef,t.identifier("call"))}else{id=superRef;if(!methodNode["static"]){id=t.memberExpression(id,t.identifier("prototype"))}id=t.memberExpression(id,methodName,methodNode.computed);return t.memberExpression(id,t.identifier("call"))}}else if(t.isMemberExpression(parent)&&!methodNode["static"]){return t.memberExpression(superRef,t.identifier("prototype"))}else{return superRef}};ReplaceSupers.prototype.looseHandle=function looseHandle(path,getThisReference){var node=path.node;if(path.isSuper()){return this.getLooseSuperProperty(node,path.parent)}else if(path.isCallExpression()){var callee=node.callee;if(!t.isMemberExpression(callee))return;if(!t.isSuper(callee.object))return;t.appendToMemberExpression(callee,t.identifier("call"));node.arguments.unshift(getThisReference());return true}};ReplaceSupers.prototype.specHandleAssignmentExpression=function specHandleAssignmentExpression(ref,path,node,getThisReference){if(node.operator==="="){return this.setSuperProperty(node.left.property,node.right,node.left.computed,getThisReference())}else{ref=ref||path.scope.generateUidIdentifier("ref");return[t.variableDeclaration("var",[t.variableDeclarator(ref,node.left)]),t.expressionStatement(t.assignmentExpression("=",node.left,t.binaryExpression(node.operator[0],ref,node.right)))]}};ReplaceSupers.prototype.specHandle=function specHandle(path,getThisReference){var methodNode=this.methodNode;var property;var computed;var args;var thisReference;var parent=path.parent;var node=path.node;if(isIllegalBareSuper(node,parent)){throw path.errorWithNode(messages.get("classesIllegalBareSuper"))}if(t.isCallExpression(node)){var callee=node.callee;if(t.isSuper(callee)){property=methodNode.key;computed=methodNode.computed;args=node.arguments;if(methodNode.key.name!=="constructor"||!this.inClass){var methodName=methodNode.key.name||"METHOD_NAME";throw this.file.errorWithNode(node,messages.get("classesIllegalSuperCall",methodName))}}else if(isMemberExpressionSuper(callee)){property=callee.property;computed=callee.computed;args=node.arguments}}else if(t.isMemberExpression(node)&&t.isSuper(node.object)){property=node.property;computed=node.computed}else if(t.isUpdateExpression(node)&&isMemberExpressionSuper(node.argument)){var binary=t.binaryExpression(node.operator[0],node.argument,t.literal(1));if(node.prefix){return this.specHandleAssignmentExpression(null,path,binary,getThisReference)}else{var ref=path.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(ref,path,binary,getThisReference).concat(t.expressionStatement(ref))}}else if(t.isAssignmentExpression(node)&&isMemberExpressionSuper(node.left)){return this.specHandleAssignmentExpression(null,path,node,getThisReference)}if(!property)return;thisReference=getThisReference();var superProperty=this.getSuperProperty(property,computed,thisReference);if(args){if(args.length===1&&t.isSpreadElement(args[0])){return t.callExpression(t.memberExpression(superProperty,t.identifier("apply")),[thisReference,args[0].argument])}else{return t.callExpression(t.memberExpression(superProperty,t.identifier("call")),[thisReference].concat(args))}}else{return superProperty}};return ReplaceSupers}();exports["default"]=ReplaceSupers;module.exports=exports["default"]},{"../../messages":48,"../../types":182}],71:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _transformerPipeline=require("./transformer-pipeline");var _transformerPipeline2=_interopRequireDefault(_transformerPipeline);var _transformers=require("./transformers");var _transformers2=_interopRequireDefault(_transformers);var _transformersDeprecated=require("./transformers/deprecated");var _transformersDeprecated2=_interopRequireDefault(_transformersDeprecated);var _transformersAliases=require("./transformers/aliases");var _transformersAliases2=_interopRequireDefault(_transformersAliases);var _transformersFilters=require("./transformers/filters");var filters=_interopRequireWildcard(_transformersFilters);var pipeline=new _transformerPipeline2["default"];for(var key in _transformers2["default"]){var transformer=_transformers2["default"][key];var metadata=transformer.metadata=transformer.metadata||{};metadata.group=metadata.group||"builtin-basic"}pipeline.addTransformers(_transformers2["default"]);pipeline.addDeprecated(_transformersDeprecated2["default"]);pipeline.addAliases(_transformersAliases2["default"]);pipeline.addFilter(filters.internal);pipeline.addFilter(filters.blacklist);pipeline.addFilter(filters.whitelist);pipeline.addFilter(filters.stage);pipeline.addFilter(filters.optional);var transform=pipeline.transform.bind(pipeline);transform.fromAst=pipeline.transformFromAst.bind(pipeline);transform.pipeline=pipeline;exports["default"]=transform;module.exports=exports["default"]},{"./transformer-pipeline":84,"./transformers":122,"./transformers/aliases":86,"./transformers/deprecated":87,"./transformers/filters":121}],72:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _lodashObjectExtend=require("lodash/object/extend");var _lodashObjectExtend2=_interopRequireDefault(_lodashObjectExtend);var _helpersObject=require("../../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _util=require("../../util");var util=_interopRequireWildcard(_util);var _types=require("../../types");var t=_interopRequireWildcard(_types);var remapVisitor={enter:function enter(node){if(node._skipModulesRemap){return this.skip()}},ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,formatter){var remap=formatter.internalRemap[node.name];if(remap&&node!==remap){if(!scope.hasBinding(node.name)||scope.bindingIdentifierEquals(node.name,formatter.localImports[node.name])){if(this.key==="callee"&&this.parentPath.isCallExpression()){return t.sequenceExpression([t.literal(0),remap])}else{return remap}}}},AssignmentExpression:{exit:function exit(node,parent,scope,formatter){if(!node._ignoreModulesRemap){var exported=formatter.getExport(node.left,scope);if(exported){return formatter.remapExportAssignment(node,exported)}}}},UpdateExpression:function UpdateExpression(node,parent,scope,formatter){var exported=formatter.getExport(node.argument,scope);if(!exported)return;this.skip();var assign=t.assignmentExpression(node.operator[0]+"=",node.argument,t.literal(1));var remapped=formatter.remapExportAssignment(assign,exported);if(t.isExpressionStatement(parent)||node.prefix){return remapped}var nodes=[];nodes.push(remapped);var operator;if(node.operator==="--"){operator="+"}else{operator="-"}nodes.push(t.binaryExpression(operator,node.argument,t.literal(1)));return t.sequenceExpression(nodes)}};var metadataVisitor={ModuleDeclaration:function ModuleDeclaration(node,parent,scope,formatter){if(node.source){node.source.value=formatter.file.resolveModuleSource(node.source.value)}},ImportDeclaration:function ImportDeclaration(node,parent,scope,formatter){formatter.hasLocalImports=true;var specifiers=[];var imported=[];formatter.metadata.imports.push({source:node.source.value,imported:imported,specifiers:specifiers});var _arr=this.get("specifiers");for(var _i=0;_i<_arr.length;_i++){var specifier=_arr[_i];var ids=specifier.getBindingIdentifiers();(0,_lodashObjectExtend2["default"])(formatter.localImports,ids);var local=specifier.node.local.name;if(specifier.isImportDefaultSpecifier()){imported.push("default");specifiers.push({kind:"named",imported:"default",local:local})}if(specifier.isImportSpecifier()){var importedName=specifier.node.imported.name;imported.push(importedName);specifiers.push({kind:"named",imported:importedName,local:local})}if(specifier.isImportNamespaceSpecifier()){imported.push("*");specifiers.push({kind:"namespace",local:local})}}},ExportDeclaration:function ExportDeclaration(node,parent,scope,formatter){formatter.hasLocalExports=true;var source=node.source?node.source.value:null;var exports=formatter.metadata.exports;var declar=this.get("declaration");if(declar.isStatement()){var bindings=declar.getBindingIdentifiers();for(var name in bindings){var binding=bindings[name];formatter._addExport(name,binding);exports.exported.push(name);exports.specifiers.push({kind:"local",local:name,exported:this.isExportDefaultDeclaration()?"default":name})}}if(this.isExportNamedDeclaration()&&node.specifiers){var _arr2=node.specifiers;for(var _i2=0;_i2<_arr2.length;_i2++){var specifier=_arr2[_i2];var exported=specifier.exported.name;exports.exported.push(exported);if(t.isExportDefaultSpecifier(specifier)){exports.specifiers.push({kind:"external",local:exported,exported:exported,source:source})}if(t.isExportNamespaceSpecifier(specifier)){exports.specifiers.push({kind:"external-namespace",exported:exported,source:source})}var local=specifier.local;if(!local)continue;formatter._addExport(local.name,specifier.exported);if(source){exports.specifiers.push({kind:"external",local:local.name,exported:exported,source:source})}if(!source){exports.specifiers.push({kind:"local",local:local.name,exported:exported})}}}if(this.isExportAllDeclaration()){exports.specifiers.push({kind:"external-all",source:source})}if(!t.isExportDefaultDeclaration(node)){var onlyDefault=node.specifiers&&node.specifiers.length===1&&t.isSpecifierDefault(node.specifiers[0]);if(!onlyDefault){formatter.hasNonDefaultExports=true}}},Scope:function Scope(){this.skip()}};var DefaultFormatter=function(){function DefaultFormatter(file){_classCallCheck(this,DefaultFormatter);this.internalRemap=(0,_helpersObject2["default"])();this.defaultIds=(0,_helpersObject2["default"])();this.scope=file.scope;this.file=file;this.ids=(0,_helpersObject2["default"])();this.hasNonDefaultExports=false;this.hasLocalExports=false;this.hasLocalImports=false;this.localExports=(0,_helpersObject2["default"])();this.localImports=(0,_helpersObject2["default"])();this.metadata=file.metadata.modules;this.getMetadata()}DefaultFormatter.prototype.isModuleType=function isModuleType(node,type){var modules=this.file.dynamicImportTypes[type];return modules&&modules.indexOf(node)>=0};DefaultFormatter.prototype.transform=function transform(){this.remapAssignments()};DefaultFormatter.prototype.doDefaultExportInterop=function doDefaultExportInterop(node){return(t.isExportDefaultDeclaration(node)||t.isSpecifierDefault(node))&&!this.noInteropRequireExport&&!this.hasNonDefaultExports};DefaultFormatter.prototype.getMetadata=function getMetadata(){var has=false;var _arr3=this.file.ast.program.body;for(var _i3=0;_i3<_arr3.length;_i3++){var node=_arr3[_i3];if(t.isModuleDeclaration(node)){has=true;break}}if(has)this.file.path.traverse(metadataVisitor,this)};DefaultFormatter.prototype.remapAssignments=function remapAssignments(){if(this.hasLocalExports||this.hasLocalImports){this.file.path.traverse(remapVisitor,this)}};DefaultFormatter.prototype.remapExportAssignment=function remapExportAssignment(node,exported){var assign=node;for(var i=0;i=opts.stage)return true;if(transformer.metadata.optional&&!includes(opts.optional,key))return false;return true};TransformerPass.prototype.checkNode=function checkNode(node){var check=this.transformer.check;if(check){return this.shouldRun=check(node)}else{return true}};TransformerPass.prototype.transform=function transform(){if(!this.shouldRun)return;var file=this.file;file.log.debug("Running transformer "+this.transformer.key);traverse(file.ast,this.handlers,file.scope,file);this.ran=true};return TransformerPass}();module.exports=TransformerPass},{"../traversal":144,"lodash/collection/includes":319}],76:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var TransformerPass=_interopRequire(require("./transformer-pass"));var isFunction=_interopRequire(require("lodash/lang/isFunction"));var traverse=_interopRequire(require("../traversal"));var isObject=_interopRequire(require("lodash/lang/isObject"));var assign=_interopRequire(require("lodash/object/assign"));var acorn=_interopRequireWildcard(require("../../acorn"));var File=_interopRequire(require("./file"));var each=_interopRequire(require("lodash/collection/each"));var Transformer=function(){function Transformer(transformerKey,transformer,opts){_classCallCheck(this,Transformer);transformer=assign({},transformer);var take=function take(key){var val=transformer[key];delete transformer[key];return val};this.manipulateOptions=take("manipulateOptions");this.metadata=take("metadata")||{};this.parser=take("parser");this.check=take("check");this.post=take("post");this.pre=take("pre");if(this.metadata.stage!=null){this.metadata.optional=true}this.handlers=this.normalize(transformer);var _ref=this;if(!_ref.opts)_ref.opts={};this.key=transformerKey}Transformer.prototype.normalize=function normalize(transformer){var _this=this;if(isFunction(transformer)){transformer={ast:transformer}}traverse.explode(transformer);each(transformer,function(fns,type){if(type[0]==="_"){_this[type]=fns;return}if(type==="enter"||type==="exit")return;if(isFunction(fns))fns={enter:fns};if(!isObject(fns))return;if(!fns.enter)fns.enter=function(){};if(!fns.exit)fns.exit=function(){};transformer[type]=fns});return transformer};Transformer.prototype.buildPass=function buildPass(file){if(!(file instanceof File)){throw new TypeError("Transformer "+this.key+" is resolving to a different Babel version to what is doing the actual transformation...")}return new TransformerPass(file,this)};return Transformer}();module.exports=Transformer},{"../../acorn":5,"../traversal":144,"./file":46,"./transformer-pass":75,"lodash/collection/each":316,"lodash/lang/isFunction":395,"lodash/lang/isObject":398,"lodash/object/assign":404}],77:[function(require,module,exports){module.exports={useStrict:"strict","es5.runtime":"runtime","es6.runtime":"runtime"}},{}],78:[function(require,module,exports){module.exports={selfContained:"runtime","unicode-regex":"regex.unicode","spec.typeofSymbol":"es6.spec.symbols","es6.symbols":"es6.spec.symbols","es6.blockScopingTDZ":"es6.spec.blockScoping","minification.deadCodeElimination":"utility.deadCodeElimination","minification.removeConsoleCalls":"utility.removeConsole","minification.removeDebugger":"utility.removeDebugger"}},{}],79:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.MemberExpression=MemberExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function MemberExpression(node){var prop=node.property;if(node.computed&&t.isLiteral(prop)&&t.isValidIdentifier(prop.value)){node.property=t.identifier(prop.value);node.computed=false}else if(!node.computed&&t.isIdentifier(prop)&&!t.isValidIdentifier(prop.name)){node.property=t.literal(prop.name);node.computed=true}}},{"../../../types":153}],80:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.Property=Property;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function Property(node){var key=node.key;if(t.isLiteral(key)&&t.isValidIdentifier(key.value)){node.key=t.identifier(key.value);node.computed=false}else if(!node.computed&&t.isIdentifier(key)&&!t.isValidIdentifier(key.name)){node.key=t.literal(key.name)}}},{"../../../types":153}],81:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.check=check;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var defineMap=_interopRequireWildcard(require("../../helpers/define-map"));var t=_interopRequireWildcard(require("../../../types"));function check(node){return t.isProperty(node)&&(node.kind==="get"||node.kind==="set")}function ObjectExpression(node){var mutatorMap={};var hasAny=false;node.properties=node.properties.filter(function(prop){if(prop.kind==="get"||prop.kind==="set"){hasAny=true;defineMap.push(mutatorMap,prop.key,prop.kind,prop.computed,prop.value);return false}else{return true}});if(!hasAny)return;return t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("defineProperties")),[node,defineMap.toDefineObject(mutatorMap)])}},{"../../../types":153,"../../helpers/define-map":54}],82:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ArrowFunctionExpression=ArrowFunctionExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));var check=t.isArrowFunctionExpression;exports.check=check;function ArrowFunctionExpression(node){t.ensureBlock(node);node.expression=false;node.type="FunctionExpression";node.shadow=true;return node}},{"../../../types":153}],83:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};exports.check=check;exports.VariableDeclaration=VariableDeclaration;exports.Loop=Loop;exports.BlockStatement=BlockStatement;exports.__esModule=true;var traverse=_interopRequire(require("../../../traversal"));var object=_interopRequire(require("../../../helpers/object"));var util=_interopRequireWildcard(require("../../../util"));var t=_interopRequireWildcard(require("../../../types"));var values=_interopRequire(require("lodash/object/values"));var extend=_interopRequire(require("lodash/object/extend"));function isLet(node,parent){if(!t.isVariableDeclaration(node))return false;if(node._let)return true;if(node.kind!=="let")return false;if(isLetInitable(node,parent)){for(var i=0;i=0){return}loopText=""+loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(state.inSwitchCase)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(this.isReturnStatement()){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);this.skip();return t.inherits(replace,node)}}};var BlockScoping=function(){function BlockScoping(loopPath,blockPath,parent,scope,file){_classCallCheck(this,BlockScoping);this.parent=parent;this.scope=scope;this.file=file;this.blockPath=blockPath;this.block=blockPath.node;this.outsideLetReferences=(0,_helpersObject2["default"])();this.hasLetReferences=false;this.letReferences=this.block._letReferences=(0,_helpersObject2["default"])();this.body=[];if(loopPath){this.loopParent=loopPath.parent;this.loopLabel=t.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=loopPath;this.loop=loopPath.node}}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}if(this.loopLabel&&!t.isLabeledStatement(this.loopParent)){return t.labeledStatement(this.loopLabel,this.loop)}};BlockScoping.prototype.remap=function remap(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=(0,_helpersObject2["default"])();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loop=this.loop;if(loop){traverseReplace(loop.right,loop,scope,remaps);traverseReplace(loop.test,loop,scope,remaps);traverseReplace(loop.update,loop,scope,remaps)}this.blockPath.traverse(replaceVisitor,remaps)};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loop){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=(0,_lodashObjectValues2["default"])(outsideRefs);var args=(0,_lodashObjectValues2["default"])(outsideRefs);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn.shadow=true;this.addContinuations(fn);block.body=this.body;var ref=fn;if(this.loop){ref=this.scope.generateUidIdentifier("loop");this.loopPath.insertBefore(t.variableDeclaration("var",[t.variableDeclarator(ref,fn)]))}var call=t.callExpression(ref,args);var ret=this.scope.generateUidIdentifier("ret");var hasYield=_traversal2["default"].hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=_traversal2["default"].hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call)}this.buildClosure(ret,call)};BlockScoping.prototype.buildClosure=function buildClosure(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.addContinuations=function addContinuations(fn){var state={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(fn,continuationVisitor,state);for(var i=0;i=0){return}loopText=""+loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(this.isReturnStatement()){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);return t.inherits(replace,node)}}};var BlockScoping=function(){function BlockScoping(loopPath,blockPath,parent,scope,file){_classCallCheck(this,BlockScoping);this.parent=parent;this.scope=scope;this.file=file;this.blockPath=blockPath;this.block=blockPath.node;this.outsideLetReferences=object();this.hasLetReferences=false;this.letReferences=this.block._letReferences=object();this.body=[];if(loopPath){this.loopParent=loopPath.parent;this.loopLabel=t.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=loopPath;this.loop=loopPath.node}}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}if(this.loopLabel&&!t.isLabeledStatement(this.loopParent)){return t.labeledStatement(this.loopLabel,this.loop)}};BlockScoping.prototype.remap=function remap(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=object();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loop=this.loop;if(loop){traverseReplace(loop.right,loop,scope,remaps);traverseReplace(loop.test,loop,scope,remaps);traverseReplace(loop.update,loop,scope,remaps)}this.blockPath.traverse(replaceVisitor,remaps)};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loop){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=values(outsideRefs);var args=values(outsideRefs);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn.shadow=true;this.addContinuations(fn);block.body=this.body;var ref=fn;if(this.loop){ref=this.scope.generateUidIdentifier("loop");this.loopPath.insertBefore(t.variableDeclaration("var",[t.variableDeclarator(ref,fn)]))}var call=t.callExpression(ref,args);var ret=this.scope.generateUidIdentifier("ret");var hasYield=traverse.hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=traverse.hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call)}this.buildClosure(ret,call)};BlockScoping.prototype.buildClosure=function buildClosure(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.addContinuations=function addContinuations(fn){var state={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(fn,continuationVisitor,state);for(var i=0;i=spreadPropIndex)break;if(t.isSpreadProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key)&&!prop.computed)key=t.literal(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef)}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[objRef])))}if(pattern.properties.length>1&&t.isMemberExpression(objRef)){var temp=this.scope.generateUidBasedOnNode(objRef,this.file); + var key=scope.generateUidIdentifier("ref");node.left=t.variableDeclaration(left.kind,[t.variableDeclarator(key,null)]);var nodes=[];var destructuring=new DestructuringTransformer({kind:left.kind,file:file,scope:scope,nodes:nodes});destructuring.init(pattern,key);t.ensureBlock(node);var block=node.body;block.body=nodes.concat(block.body)}exports.ForInStatement=ForOfStatement;function Func(node,parent,scope,file){var hasDestructuring=false;var _arr=node.params;for(var _i=0;_i<_arr.length;_i++){var pattern=_arr[_i];if(t.isPattern(pattern)){hasDestructuring=true;break}}if(!hasDestructuring)return;var nodes=[];for(var i=0;i=spreadPropIndex)break;if(t.isSpreadProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key)&&!prop.computed)key=t.literal(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef)}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[objRef])))}if(pattern.properties.length>1&&t.isMemberExpression(objRef)){var temp=this.scope.generateUidIdentifierBasedOnNode(objRef,this.file);this.nodes.push(this.buildVariableDeclaration(temp,objRef));objRef=temp}for(var i=0;iarr.elements.length)return;if(pattern.elements.length0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.literal(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)){var memo=this.scope.maybeGenerateMemoised(ref,true);if(memo){this.nodes.push(this.buildVariableDeclaration(memo,ref));ref=memo}}this.push(pattern,ref);return this.nodes};return DestructuringTransformer}()},{"../../../messages":48,"../../../types":182}],96:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ForOfStatement=ForOfStatement;exports._ForOfStatementArray=_ForOfStatementArray;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _messages=require("../../../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);function ForOfStatement(node,parent,scope,file){if(this.get("right").isArrayExpression()){return _ForOfStatementArray.call(this,node,scope,file)}var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,file);var declar=build.declar;var loop=build.loop;var block=loop.body;t.ensureBlock(node);if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);t.inherits(loop.body,node.body);if(build.replaceParent){this.parentPath.replaceWithMultiple(build.node);this.dangerouslyRemove()}else{return build.node}}function _ForOfStatementArray(node,scope,file){var nodes=[];var right=node.right;if(!t.isIdentifier(right)||!scope.hasBinding(right.name)){var uid=scope.generateUidIdentifier("arr");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,right)]));right=uid}var iterationKey=scope.generateUidIdentifier("i");var loop=util.template("for-of-array",{BODY:node.body,KEY:iterationKey,ARR:right});t.inherits(loop,node);t.ensureBlock(loop);var iterationValue=t.memberExpression(right,iterationKey,true);var left=node.left;if(t.isVariableDeclaration(left)){left.declarations[0].init=iterationValue;loop.body.body.unshift(left)}else{loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=",left,iterationValue)))}if(this.parentPath.isLabeledStatement()){loop=t.labeledStatement(this.parentPath.node.label,loop)}nodes.push(loop);return nodes}var loose=function loose(node,parent,scope,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=util.template("for-of-loose",{LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,node:loop,loop:loop}};var spec=function spec(node,parent,scope,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=util.template("for-of",{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}}},{"../../../messages":48,"../../../types":182,"../../../util":186}],97:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ImportDeclaration=ImportDeclaration;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function keepBlockHoist(node,nodes){if(node._blockHoist){for(var i=0;ilastNonDefaultParam}var lastNonDefaultParam=(0,_helpersGetFunctionArity2["default"])(node);var params=this.get("params");for(var i=0;i",len,start),t.binaryExpression("-",len,start),t.literal(0))}var loop=util.template("rest",{ARRAY_TYPE:restParam.typeAnnotation,ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}},{"../../../types":182,"../../../util":186}],101:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function loose(node,body,objId){for(var i=0;i0){var declarations=(0,_lodashArrayFlatten2["default"])((0,_lodashCollectionMap2["default"])(this.vars,function(decl){return decl.declarations}));var assignment=(0,_lodashCollectionReduceRight2["default"])(declarations,function(expr,decl){return t.assignmentExpression("=",decl.id,expr)},t.identifier("undefined"));var statement=t.expressionStatement(assignment);statement._blockHoist=Infinity;body.unshift(statement)}var paramDecls=this.paramDecls;if(paramDecls.length>0){var paramDecl=t.variableDeclaration("var",paramDecls);paramDecl._blockHoist=Infinity;body.unshift(paramDecl)}body.unshift(t.expressionStatement(t.assignmentExpression("=",this.getAgainId(),t.literal(false))));node.body=util.template("tail-call-body",{FUNCTION_ID:this.getFunctionId(),AGAIN_ID:this.getAgainId(),BLOCK:node.body});var topVars=[];if(this.needsThis){var _arr=this.thisPaths;for(var _i=0;_i<_arr.length;_i++){var path=_arr[_i];path.replaceWith(this.getThisId())}topVars.push(t.variableDeclarator(this.getThisId(),t.thisExpression()))}if(this.needsArguments||this.setsArguments){var _arr2=this.argumentsPaths;for(var _i2=0;_i2<_arr2.length;_i2++){var _path=_arr2[_i2];_path.replaceWith(this.argumentsId)}var decl=t.variableDeclarator(this.argumentsId);if(this.argumentsId){decl.init=t.identifier("arguments");decl.init._shadowedFunctionLiteral=true}topVars.push(decl)}var leftId=this.leftId;if(leftId){topVars.push(t.variableDeclarator(leftId))}if(topVars.length>0){node.body.body.unshift(t.variableDeclaration("var",topVars))}};TailCallTransformer.prototype.subTransform=function subTransform(node){if(!node)return;var handler=this["subTransform"+node.type];if(handler)return handler.call(this,node)};TailCallTransformer.prototype.subTransformConditionalExpression=function subTransformConditionalExpression(node){var callConsequent=this.subTransform(node.consequent);var callAlternate=this.subTransform(node.alternate);if(!callConsequent&&!callAlternate){return}node.type="IfStatement";node.consequent=callConsequent?t.toBlock(callConsequent):returnBlock(node.consequent);if(callAlternate){node.alternate=t.isIfStatement(callAlternate)?callAlternate:t.toBlock(callAlternate)}else{node.alternate=returnBlock(node.alternate)}return[node]};TailCallTransformer.prototype.subTransformLogicalExpression=function subTransformLogicalExpression(node){var callRight=this.subTransform(node.right);if(!callRight)return;var leftId=this.getLeftId();var testExpr=t.assignmentExpression("=",leftId,node.left);if(node.operator==="&&"){testExpr=t.unaryExpression("!",testExpr)}return[t.ifStatement(testExpr,returnBlock(leftId))].concat(callRight)};TailCallTransformer.prototype.subTransformSequenceExpression=function subTransformSequenceExpression(node){var seq=node.expressions;var lastCall=this.subTransform(seq[seq.length-1]);if(!lastCall){return}if(--seq.length===1){node=seq[0]}return[t.expressionStatement(node)].concat(lastCall)};TailCallTransformer.prototype.subTransformCallExpression=function subTransformCallExpression(node){var callee=node.callee;var thisBinding,args;if(t.isMemberExpression(callee,{computed:false})&&t.isIdentifier(callee.property)){switch(callee.property.name){case"call":args=t.arrayExpression(node.arguments.slice(1));break;case"apply":args=node.arguments[1]||t.identifier("undefined");this.needsArguments=true;break;default:return}thisBinding=node.arguments[0];callee=callee.object}if(!t.isIdentifier(callee)||!this.scope.bindingIdentifierEquals(callee.name,this.ownerId)){return}this.hasTailRecursion=true;if(this.hasDeopt())return;var body=[];if(this.needsThis&&!t.isThisExpression(thisBinding)){body.push(t.expressionStatement(t.assignmentExpression("=",this.getThisId(),thisBinding||t.identifier("undefined"))))}if(!args){args=t.arrayExpression(node.arguments)}if(t.isArrayExpression(args)&&args.elements.length>this.node.params.length){this.needsArguments=true}var argumentsId=this.getArgumentsId();var params=this.getParams();if(this.needsArguments){body.push(t.expressionStatement(t.assignmentExpression("=",argumentsId,args)))}if(t.isArrayExpression(args)){var elems=args.elements;for(var i=0;i1){var last=nodes[nodes.length-1];if(t.isLiteral(last,{value:""}))nodes.pop();var root=buildBinaryExpression(nodes.shift(),nodes.shift());var _arr3=nodes;for(var _i3=0;_i3<_arr3.length;_i3++){var _node=_arr3[_i3];root=buildBinaryExpression(root,_node)}this.replaceWith(root)}else{return nodes[0]}}},{"../../../types":182}],111:[function(require,module,exports){"use strict";exports.__esModule=true;var metadata={stage:1};exports.metadata=metadata},{}],112:[function(require,module,exports){"use strict";exports.__esModule=true;var metadata={stage:0,dependencies:["es6.classes"]};exports.metadata=metadata},{}],113:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ComprehensionExpression=ComprehensionExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersBuildComprehension=require("../../helpers/build-comprehension");var _helpersBuildComprehension2=_interopRequireDefault(_helpersBuildComprehension);var _traversal=require("../../../traversal");var _traversal2=_interopRequireDefault(_traversal);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={stage:0};exports.metadata=metadata;function ComprehensionExpression(node,parent,scope,file){var callback=array;if(node.generator)callback=generator;return callback(node,parent,scope)}function generator(node){var body=[];var container=t.functionExpression(null,[],t.blockStatement(body),true);container.shadow=true;body.push((0,_helpersBuildComprehension2["default"])(node,function(){return t.expressionStatement(t.yieldExpression(node.body))}));return t.callExpression(container,[])}function array(node,parent,scope){var uid=scope.generateUidIdentifierBasedOnNode(parent);var container=util.template("array-comprehension-container",{KEY:uid});container.callee.shadow=true;var block=container.callee.body;var body=block.body;if(_traversal2["default"].hasType(node,scope,"YieldExpression",t.FUNCTION_TYPES)){container.callee.generator=true;container=t.yieldExpression(container,true)}var returnStatement=body.pop();body.push((0,_helpersBuildComprehension2["default"])(node,function(){return util.template("array-push",{STATEMENT:node.body,KEY:uid},true)}));body.push(returnStatement);return container}},{"../../../traversal":159,"../../../types":182,"../../../util":186,"../../helpers/build-comprehension":59}],114:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ObjectExpression=ObjectExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersMemoiseDecorators=require("../../helpers/memoise-decorators");var _helpersMemoiseDecorators2=_interopRequireDefault(_helpersMemoiseDecorators);var _helpersDefineMap=require("../../helpers/define-map");var defineMap=_interopRequireWildcard(_helpersDefineMap);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={dependencies:["es6.classes"],optional:true,stage:1};exports.metadata=metadata;function ObjectExpression(node,parent,scope,file){var hasDecorators=false;for(var i=0;i=1){nodes.push(node)}return nodes}},{"../../../types":182}],118:[function(require,module,exports){"use strict";exports.__esModule=true;exports.CallExpression=CallExpression;exports.BindExpression=BindExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={optional:true,stage:0};exports.metadata=metadata;function getTempId(scope){var id=scope.path.getData("functionBind");if(id)return id;id=scope.generateDeclaredUidIdentifier("context");return scope.path.setData("functionBind",id)}function getStaticContext(bind,scope){var object=bind.object||bind.callee.object;return scope.isStatic(object)&&object}function inferBindContext(bind,scope){var staticContext=getStaticContext(bind,scope);if(staticContext)return staticContext;var tempId=getTempId(scope);if(bind.object){bind.callee=t.sequenceExpression([t.assignmentExpression("=",tempId,bind.object),bind.callee])}else{bind.callee.object=t.assignmentExpression("=",tempId,bind.callee.object)}return tempId}function CallExpression(node,parent,scope,file){var bind=node.callee;if(!t.isBindExpression(bind))return;var context=inferBindContext(bind,scope);node.callee=t.memberExpression(bind.callee,t.identifier("call"));node.arguments.unshift(context)}function BindExpression(node,parent,scope,file){var context=inferBindContext(node,scope);return t.callExpression(t.memberExpression(node.callee,t.identifier("bind")),[context])}},{"../../../types":182}],119:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ObjectExpression=ObjectExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={stage:1,dependencies:["es6.destructuring"]};exports.metadata=metadata;var hasSpread=function hasSpread(node){for(var i=0;i=opts.stage)return true}function optional(transformer,opts){if(transformer.metadata.optional&&!(0,_lodashCollectionIncludes2["default"])(opts.optional,transformer.key))return false}},{"lodash/collection/includes":345}],122:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]={"minification.constantFolding":require("./minification/constant-folding"),strict:require("./other/strict"),eval:require("./other/eval"),_explode:require("./internal/explode"),_validation:require("./internal/validation"),_hoistDirectives:require("./internal/hoist-directives"),"minification.removeDebugger":require("./minification/remove-debugger"),"minification.removeConsole":require("./minification/remove-console"),"utility.inlineEnvironmentVariables":require("./utility/inline-environment-variables"),"minification.deadCodeElimination":require("./minification/dead-code-elimination"),_modules:require("./internal/modules"),"spec.functionName":require("./spec/function-name"),"es6.spec.templateLiterals":require("./es6/spec.template-literals"),"es6.templateLiterals":require("./es6/template-literals"),"es7.classProperties":require("./es7/class-properties"),"es7.trailingFunctionCommas":require("./es7/trailing-function-commas"),"es7.asyncFunctions":require("./es7/async-functions"),"es7.decorators":require("./es7/decorators"),"validation.undeclaredVariableCheck":require("./validation/undeclared-variable-check"),"validation.react":require("./validation/react"),"es6.arrowFunctions":require("./es6/arrow-functions"),"spec.blockScopedFunctions":require("./spec/block-scoped-functions"),"optimisation.react.constantElements":require("./optimisation/react.constant-elements"),"optimisation.react.inlineElements":require("./optimisation/react.inline-elements"),"es7.comprehensions":require("./es7/comprehensions"),"es6.classes":require("./es6/classes"),asyncToGenerator:require("./other/async-to-generator"),bluebirdCoroutines:require("./other/bluebird-coroutines"),"es6.objectSuper":require("./es6/object-super"),"es7.objectRestSpread":require("./es7/object-rest-spread"),"es7.exponentiationOperator":require("./es7/exponentiation-operator"),"es5.properties.mutators":require("./es5/properties.mutators"),"es6.properties.shorthand":require("./es6/properties.shorthand"),"es6.properties.computed":require("./es6/properties.computed"),"optimisation.flow.forOf":require("./optimisation/flow.for-of"),"es6.forOf":require("./es6/for-of"),"es6.regex.sticky":require("./es6/regex.sticky"),"es6.regex.unicode":require("./es6/regex.unicode"),"es6.constants":require("./es6/constants"),"es6.parameters.rest":require("./es6/parameters.rest"),"es6.spread":require("./es6/spread"),"es6.parameters.default":require("./es6/parameters.default"),"es7.exportExtensions":require("./es7/export-extensions"),"spec.protoToAssign":require("./spec/proto-to-assign"),"es7.doExpressions":require("./es7/do-expressions"),"es6.spec.symbols":require("./es6/spec.symbols"),"es7.functionBind":require("./es7/function-bind"),"spec.undefinedToVoid":require("./spec/undefined-to-void"),"es6.destructuring":require("./es6/destructuring"),"es6.blockScoping":require("./es6/block-scoping"),"es6.spec.blockScoping":require("./es6/spec.block-scoping"),reactCompat:require("./other/react-compat"),react:require("./other/react"),regenerator:require("./other/regenerator"),runtime:require("./other/runtime"),"es6.modules":require("./es6/modules"),_moduleFormatter:require("./internal/module-formatter"),"es6.tailCall":require("./es6/tail-call"),_shadowFunctions:require("./internal/shadow-functions"),"es3.propertyLiterals":require("./es3/property-literals"),"es3.memberExpressionLiterals":require("./es3/member-expression-literals"),"minification.memberExpressionLiterals":require("./minification/member-expression-literals"),"minification.propertyLiterals":require("./minification/property-literals"),_blockHoist:require("./internal/block-hoist"),jscript:require("./other/jscript"),flow:require("./other/flow")};module.exports=exports["default"]},{"./es3/member-expression-literals":88,"./es3/property-literals":89,"./es5/properties.mutators":90,"./es6/arrow-functions":91,"./es6/block-scoping":92,"./es6/classes":93,"./es6/constants":94,"./es6/destructuring":95,"./es6/for-of":96,"./es6/modules":97,"./es6/object-super":98,"./es6/parameters.default":99,"./es6/parameters.rest":100,"./es6/properties.computed":101,"./es6/properties.shorthand":102,"./es6/regex.sticky":103,"./es6/regex.unicode":104,"./es6/spec.block-scoping":105,"./es6/spec.symbols":106,"./es6/spec.template-literals":107,"./es6/spread":108,"./es6/tail-call":109,"./es6/template-literals":110,"./es7/async-functions":111,"./es7/class-properties":112,"./es7/comprehensions":113,"./es7/decorators":114,"./es7/do-expressions":115,"./es7/exponentiation-operator":116,"./es7/export-extensions":117,"./es7/function-bind":118,"./es7/object-rest-spread":119,"./es7/trailing-function-commas":120,"./internal/block-hoist":123,"./internal/explode":124,"./internal/hoist-directives":125,"./internal/module-formatter":126,"./internal/modules":127,"./internal/shadow-functions":128,"./internal/validation":129,"./minification/constant-folding":130,"./minification/dead-code-elimination":131,"./minification/member-expression-literals":132,"./minification/property-literals":133,"./minification/remove-console":134,"./minification/remove-debugger":135,"./optimisation/flow.for-of":136,"./optimisation/react.constant-elements":137,"./optimisation/react.inline-elements":138,"./other/async-to-generator":139,"./other/bluebird-coroutines":140,"./other/eval":141,"./other/flow":142,"./other/jscript":143,"./other/react":145,"./other/react-compat":144,"./other/regenerator":146,"./other/runtime":148,"./other/strict":149,"./spec/block-scoped-functions":150,"./spec/function-name":151,"./spec/proto-to-assign":152,"./spec/undefined-to-void":153,"./utility/inline-environment-variables":154,"./validation/react":155,"./validation/undeclared-variable-check":156}],123:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashCollectionSortBy=require("lodash/collection/sortBy");var _lodashCollectionSortBy2=_interopRequireDefault(_lodashCollectionSortBy);var metadata={group:"builtin-trailing"};exports.metadata=metadata;var BlockStatement={exit:function exit(node){var hasChange=false;for(var i=0;iarr.elements.length)return;if(pattern.elements.length0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.literal(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){var shouldMemoise=true;if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)){var memo=this.scope.generateMemoisedReference(ref,true);if(memo){this.nodes.push(this.buildVariableDeclaration(memo,ref));ref=memo}}this.push(pattern,ref);return this.nodes};return DestructuringTransformer}()},{"../../../messages":43,"../../../types":153}],87:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ForOfStatement=ForOfStatement;exports._ForOfStatementArray=_ForOfStatementArray;exports.__esModule=true;var messages=_interopRequireWildcard(require("../../../messages"));var util=_interopRequireWildcard(require("../../../util"));var t=_interopRequireWildcard(require("../../../types"));var check=t.isForOfStatement;exports.check=check;function ForOfStatement(node,parent,scope,file){if(this.get("right").isArrayExpression()){return _ForOfStatementArray.call(this,node,scope,file)}var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,file);var declar=build.declar;var loop=build.loop;var block=loop.body;t.inheritsComments(loop,node);t.ensureBlock(node);if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);if(build.replaceParent){this.parentPath.replaceWithMultiple(build.node);this.remove()}else{this.replaceWithMultiple(build.node)}}function _ForOfStatementArray(node,scope,file){var nodes=[];var right=node.right;if(!t.isIdentifier(right)||!scope.hasBinding(right.name)){var uid=scope.generateUidIdentifier("arr");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,right)]));right=uid}var iterationKey=scope.generateUidIdentifier("i");var loop=util.template("for-of-array",{BODY:node.body,KEY:iterationKey,ARR:right});t.inherits(loop,node);t.ensureBlock(loop);var iterationValue=t.memberExpression(right,iterationKey,true);var left=node.left;if(t.isVariableDeclaration(left)){left.declarations[0].init=iterationValue;loop.body.body.unshift(left)}else{loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=",left,iterationValue)))}nodes.push(loop);return nodes}var loose=function loose(node,parent,scope,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=util.template("for-of-loose",{LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,node:loop,loop:loop}};var spec=function spec(node,parent,scope,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=util.template("for-of",{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}}},{"../../../messages":43,"../../../types":153,"../../../util":157}],88:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.ImportDeclaration=ImportDeclaration;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));exports.check=require("../internal/modules").check;function keepBlockHoist(node,nodes){if(node._blockHoist){for(var i=0;i",len,start),t.binaryExpression("-",len,start),t.literal(0))}var loop=util.template("rest",{ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}},{"../../../types":153,"../../../util":157,"lodash/lang/isNumber":397}],92:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.check=check;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));function loose(node,body,objId){for(var i=0;i0){var declarations=flatten(map(this.vars,function(decl){return decl.declarations},this));var assignment=reduceRight(declarations,function(expr,decl){return t.assignmentExpression("=",decl.id,expr)},t.identifier("undefined"));var statement=t.expressionStatement(assignment);statement._blockHoist=Infinity;body.unshift(statement)}var paramDecls=this.paramDecls;if(paramDecls.length>0){body.unshift(t.variableDeclaration("var",paramDecls))}body.unshift(t.expressionStatement(t.assignmentExpression("=",this.getAgainId(),t.literal(false))));node.body=util.template("tail-call-body",{AGAIN_ID:this.getAgainId(),THIS_ID:this.thisId,ARGUMENTS_ID:this.argumentsId,FUNCTION_ID:this.getFunctionId(),BLOCK:node.body});var topVars=[];if(this.needsThis){topVars.push(t.variableDeclarator(this.getThisId(),t.thisExpression()))}if(this.needsArguments||this.setsArguments){var decl=t.variableDeclarator(this.getArgumentsId());if(this.needsArguments){decl.init=t.identifier("arguments")}topVars.push(decl)}var leftId=this.leftId;if(leftId){topVars.push(t.variableDeclarator(leftId))}if(topVars.length>0){node.body.body.unshift(t.variableDeclaration("var",topVars))}};TailCallTransformer.prototype.subTransform=function subTransform(node){if(!node)return;var handler=this["subTransform"+node.type];if(handler)return handler.call(this,node)};TailCallTransformer.prototype.subTransformConditionalExpression=function subTransformConditionalExpression(node){var callConsequent=this.subTransform(node.consequent);var callAlternate=this.subTransform(node.alternate);if(!callConsequent&&!callAlternate){return}node.type="IfStatement";node.consequent=callConsequent?t.toBlock(callConsequent):returnBlock(node.consequent);if(callAlternate){node.alternate=t.isIfStatement(callAlternate)?callAlternate:t.toBlock(callAlternate)}else{node.alternate=returnBlock(node.alternate)}return[node]};TailCallTransformer.prototype.subTransformLogicalExpression=function subTransformLogicalExpression(node){var callRight=this.subTransform(node.right);if(!callRight)return;var leftId=this.getLeftId();var testExpr=t.assignmentExpression("=",leftId,node.left);if(node.operator==="&&"){testExpr=t.unaryExpression("!",testExpr)}return[t.ifStatement(testExpr,returnBlock(leftId))].concat(callRight)};TailCallTransformer.prototype.subTransformSequenceExpression=function subTransformSequenceExpression(node){var seq=node.expressions;var lastCall=this.subTransform(seq[seq.length-1]);if(!lastCall){return}if(--seq.length===1){node=seq[0]}return[t.expressionStatement(node)].concat(lastCall)};TailCallTransformer.prototype.subTransformCallExpression=function subTransformCallExpression(node){var callee=node.callee,thisBinding,args;if(t.isMemberExpression(callee,{computed:false})&&t.isIdentifier(callee.property)){switch(callee.property.name){case"call":args=t.arrayExpression(node.arguments.slice(1));break;case"apply":args=node.arguments[1]||t.identifier("undefined");break;default:return}thisBinding=node.arguments[0];callee=callee.object}if(!t.isIdentifier(callee)||!this.scope.bindingIdentifierEquals(callee.name,this.ownerId)){return}this.hasTailRecursion=true;if(this.hasDeopt())return;var body=[];if(!t.isThisExpression(thisBinding)){body.push(t.expressionStatement(t.assignmentExpression("=",this.getThisId(),thisBinding||t.identifier("undefined")))); +}}}function buildListClone(listKey,bindingKey,refKey){var clone=buildClone(bindingKey,refKey);return function(node){if(!node[listKey])return;var _arr=node[listKey];for(var _i=0;_i<_arr.length;_i++){var subNode=_arr[_i];clone(subNode)}}}var Property=buildClone("value","key",function(node){return t.isAssignmentPattern(node.value)&&node.value.left===node.key});exports.Property=Property;var ExportDeclaration=buildListClone("specifiers","local","exported");exports.ExportDeclaration=ExportDeclaration;var ImportDeclaration=buildListClone("specifiers","local","imported");exports.ImportDeclaration=ImportDeclaration},{"../../../types":182,"lodash/lang/clone":415}],125:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-pre"};exports.metadata=metadata;var BlockStatement={exit:function exit(node){for(var i=0;i1||!binding.constant)return;if(binding.kind==="param"||binding.kind==="module")return;var replacement=binding.path.node;if(t.isVariableDeclarator(replacement)){replacement=replacement.init}if(!replacement)return;if(!scope.isPure(replacement,true))return;if(t.isClass(replacement)||t.isFunction(replacement)){if(binding.path.scope.parent!==scope)return}if(this.findParent(function(path){return path.node===replacement})){return}t.toExpression(replacement);scope.removeBinding(node.name);binding.path.dangerouslyRemove();return replacement}function FunctionDeclaration(node,parent,scope){var bindingInfo=scope.getBinding(node.id.name);if(bindingInfo&&!bindingInfo.referenced){this.dangerouslyRemove()}}exports.ClassDeclaration=FunctionDeclaration;function VariableDeclarator(node,parent,scope){if(!t.isIdentifier(node.id)||!scope.isPure(node.init,true))return;FunctionDeclaration.apply(this,arguments)}function ConditionalExpression(node,parent,scope){var evaluateTest=this.get("test").evaluateTruthy();if(evaluateTest===true){return node.consequent}else if(evaluateTest===false){return node.alternate}}function BlockStatement(node){var paths=this.get("body");var purge=false;for(var i=0;i0){nodePath=nodePath.get(keysAlongPath.pop())}return nodePath}},{"../../../types":182,"ast-types":201,regenerator:455}],147:[function(require,module,exports){module.exports={builtins:{Symbol:"symbol",Promise:"promise",Map:"map",WeakMap:"weak-map",Set:"set",WeakSet:"weak-set"},methods:{Array:{concat:"array/concat",copyWithin:"array/copy-within",entries:"array/entries",every:"array/every",fill:"array/fill",filter:"array/filter",findIndex:"array/find-index",find:"array/find",forEach:"array/for-each",from:"array/from",includes:"array/includes",indexOf:"array/index-of",join:"array/join",keys:"array/keys",lastIndexOf:"array/last-index-of",map:"array/map",of:"array/of",pop:"array/pop",push:"array/push",reduceRight:"array/reduce-right",reduce:"array/reduce",reverse:"array/reverse",shift:"array/shift",slice:"array/slice",some:"array/some",sort:"array/sort",splice:"array/splice",turn:"array/turn",unshift:"array/unshift",values:"array/values"},Object:{assign:"object/assign",classof:"object/classof",create:"object/create",define:"object/define",defineProperties:"object/define-properties",defineProperty:"object/define-property",entries:"object/entries",freeze:"object/freeze",getOwnPropertyDescriptor:"object/get-own-property-descriptor",getOwnPropertyDescriptors:"object/get-own-property-descriptors",getOwnPropertyNames:"object/get-own-property-names",getOwnPropertySymbols:"object/get-own-property-symbols",getPrototypePf:"object/get-prototype-of",index:"object/index",isExtensible:"object/is-extensible",isFrozen:"object/is-frozen",isObject:"object/is-object",isSealed:"object/is-sealed",is:"object/is",keys:"object/keys",make:"object/make",preventExtensions:"object/prevent-extensions",seal:"object/seal",setPrototypeOf:"object/set-prototype-of",values:"object/values"},RegExp:{escape:"regexp/escape"},Function:{only:"function/only",part:"function/part"},Math:{acosh:"math/acosh",asinh:"math/asinh",atanh:"math/atanh",cbrt:"math/cbrt",clz32:"math/clz32",cosh:"math/cosh",expm1:"math/expm1",fround:"math/fround",hypot:"math/hypot",pot:"math/pot",imul:"math/imul",log10:"math/log10",log1p:"math/log1p",log2:"math/log2",sign:"math/sign",sinh:"math/sinh",tanh:"math/tanh",trunc:"math/trunc"},Date:{addLocale:"date/add-locale",formatUTC:"date/format-utc",format:"date/format"},Symbol:{"for":"symbol/for",hasInstance:"symbol/for-instance","is-concat-spreadable":"symbol/is-concat-spreadable",iterator:"symbol/iterator",keyFor:"symbol/key-for",match:"symbol/match",replace:"symbol/replace",search:"symbol/search",species:"symbol/species",split:"symbol/split",toPrimitive:"symbol/to-primitive",toStringTag:"symbol/to-string-tag",unscopables:"symbol/unscopables"},String:{at:"string/at",codePointAt:"string/code-point-at",endsWith:"string/ends-with",escapeHTML:"string/escape-html",fromCodePoint:"string/from-code-point",includes:"string/includes",raw:"string/raw",repeat:"string/repeat",startsWith:"string/starts-with",unescapeHTML:"string/unescape-html"},Number:{EPSILON:"number/epsilon",isFinite:"number/is-finite",isInteger:"number/is-integer",isNaN:"number/is-nan",isSafeInteger:"number/is-safe-integer",MAX_SAFE_INTEGER:"number/max-safe-integer",MIN_SAFE_INTEGER:"number/min-safe-integer",parseFloat:"number/parse-float",parseInt:"number/parse-int",random:"number/random"},Reflect:{apply:"reflect/apply",construct:"reflect/construct",defineProperty:"reflect/define-property",deleteProperty:"reflect/delete-property",enumerate:"reflect/enumerate",getOwnPropertyDescriptor:"reflect/get-own-property-descriptor",getPrototypeOf:"reflect/get-prototype-of",get:"reflect/get",has:"reflect/has",isExtensible:"reflect/is-extensible",ownKeys:"reflect/own-keys",preventExtensions:"reflect/prevent-extensions",setPrototypeOf:"reflect/set-prototype-of",set:"reflect/set"}}}},{}],148:[function(require,module,exports){"use strict";exports.__esModule=true;exports.pre=pre;exports.ReferencedIdentifier=ReferencedIdentifier;exports.CallExpression=CallExpression;exports.BinaryExpression=BinaryExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _types=require("../../../../types");var t=_interopRequireWildcard(_types);var _definitions=require("./definitions");var _definitions2=_interopRequireDefault(_definitions);var RUNTIME_MODULE_NAME="babel-runtime";var metadata={optional:true,group:"builtin-post-modules"};exports.metadata=metadata;function pre(file){file.set("helperGenerator",function(name){return file.addImport(""+RUNTIME_MODULE_NAME+"/helpers/"+name,name,"absoluteDefault")});file.setDynamic("regeneratorIdentifier",function(){return file.addImport(""+RUNTIME_MODULE_NAME+"/regenerator","regeneratorRuntime","absoluteDefault")})}function ReferencedIdentifier(node,parent,scope,file){if(node.name==="regeneratorRuntime"){ + return file.get("regeneratorIdentifier")}if(t.isMemberExpression(parent))return;if(!(0,_lodashObjectHas2["default"])(_definitions2["default"].builtins,node.name))return;if(scope.getBindingIdentifier(node.name))return;var modulePath=_definitions2["default"].builtins[node.name];return file.addImport(""+RUNTIME_MODULE_NAME+"/core-js/"+modulePath,node.name,"absoluteDefault")}function CallExpression(node,parent,scope,file){if(node.arguments.length)return;var callee=node.callee;if(!t.isMemberExpression(callee))return;if(!callee.computed)return;if(!this.get("callee.property").matchesPattern("Symbol.iterator"))return;return t.callExpression(file.addImport(""+RUNTIME_MODULE_NAME+"/core-js/get-iterator","getIterator","absoluteDefault"),[callee.object])}function BinaryExpression(node,parent,scope,file){if(node.operator!=="in")return;if(!this.get("left").matchesPattern("Symbol.iterator"))return;return t.callExpression(file.addImport(""+RUNTIME_MODULE_NAME+"/core-js/is-iterable","isIterable","absoluteDefault"),[node.right])}var MemberExpression={enter:function enter(node,parent,scope,file){if(!this.isReferenced())return;var obj=node.object;var prop=node.property;if(!t.isReferenced(obj,node))return;if(node.computed)return;if(!(0,_lodashObjectHas2["default"])(_definitions2["default"].methods,obj.name))return;var methods=_definitions2["default"].methods[obj.name];if(!(0,_lodashObjectHas2["default"])(methods,prop.name))return;if(scope.getBindingIdentifier(obj.name))return;var modulePath=methods[prop.name];return file.addImport(""+RUNTIME_MODULE_NAME+"/core-js/"+modulePath,""+obj.name+"$"+prop.name,"absoluteDefault")},exit:function exit(node,parent,scope,file){if(!this.isReferenced())return;var prop=node.property;var obj=node.object;if(!(0,_lodashObjectHas2["default"])(_definitions2["default"].builtins,obj.name))return;if(scope.getBindingIdentifier(obj.name))return;var modulePath=_definitions2["default"].builtins[obj.name];return t.memberExpression(file.addImport(""+RUNTIME_MODULE_NAME+"/core-js/"+modulePath,""+obj.name,"absoluteDefault"),prop)}};exports.MemberExpression=MemberExpression},{"../../../../types":182,"./definitions":147,"lodash/object/has":433}],149:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ThisExpression=ThisExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-pre"};exports.metadata=metadata;var THIS_BREAK_KEYS=["FunctionExpression","FunctionDeclaration","ClassExpression","ClassDeclaration"];var Program={enter:function enter(program){var first=program.body[0];var directive;if(t.isExpressionStatement(first)&&t.isLiteral(first.expression,{value:"use strict"})){directive=first}else{directive=t.expressionStatement(t.literal("use strict"));this.unshiftContainer("body",directive);if(first){directive.leadingComments=first.leadingComments;first.leadingComments=[]}}directive._blockHoist=Infinity}};exports.Program=Program;function ThisExpression(){if(!this.findParent(function(path){return!path.is("shadow")&&THIS_BREAK_KEYS.indexOf(path.type)>=0})){return t.identifier("undefined")}}},{"../../../types":182}],150:[function(require,module,exports){"use strict";exports.__esModule=true;exports.BlockStatement=BlockStatement;exports.SwitchCase=SwitchCase;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function statementList(key,path){var paths=path.get(key);for(var i=0;i3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}var msg;if(closest){msg=messages.get("undeclaredVariableSuggestion",node.name,closest)}else{msg=messages.get("undeclaredVariable",node.name)}throw this.errorWithNode(msg,ReferenceError)}},{"../../../messages":48,leven:334}],157:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _path=require("./path");var _path2=_interopRequireDefault(_path);var _types=require("../types");var t=_interopRequireWildcard(_types);var TraversalContext=function(){function TraversalContext(scope,opts,state,parentPath){_classCallCheck(this,TraversalContext);this.parentPath=parentPath;this.scope=scope;this.state=state;this.opts=opts}TraversalContext.prototype.shouldVisit=function shouldVisit(node){var opts=this.opts;if(opts.enter||opts.exit)return true;if(opts[node.type])return true;var keys=t.VISITOR_KEYS[node.type];if(!keys||!keys.length)return false;var _arr=keys;for(var _i=0;_i<_arr.length;_i++){var key=_arr[_i];if(node[key])return true}return false};TraversalContext.prototype.create=function create(node,obj,key,containerKey){var path=_path2["default"].get({parentPath:this.parentPath,parent:node,container:obj,key:key,containerKey:containerKey});path.unshiftContext(this);return path};TraversalContext.prototype.visitMultiple=function visitMultiple(container,parent,containerKey){if(container.length===0)return false;var visited=[];var queue=this.queue=[];var stop=false;for(var key=0;key=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}}var _arr3=queue;for(var _i3=0;_i3<_arr3.length;_i3++){var path=_arr3[_i3];path.shiftContext()}this.queue=null;return stop};TraversalContext.prototype.visitSingle=function visitSingle(node,key){if(this.shouldVisit(node[key])){var path=this.create(node,node,key);path.visit();path.shiftContext()}};TraversalContext.prototype.visit=function visit(node,key){var nodes=node[key];if(!nodes)return;if(Array.isArray(nodes)){return this.visitMultiple(nodes,node,key)}else{return this.visitSingle(node,key)}};return TraversalContext}();exports["default"]=TraversalContext;module.exports=exports["default"]},{"../types":182,"./path":166}],158:[function(require,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 Hub=function Hub(file){_classCallCheck(this,Hub);this.file=file};exports["default"]=Hub;module.exports=exports["default"]},{}],159:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]=traverse;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _context=require("./context");var _context2=_interopRequireDefault(_context);var _visitors=require("./visitors");var visitors=_interopRequireWildcard(_visitors);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _types=require("../types");var t=_interopRequireWildcard(_types);function traverse(parent,opts,scope,state,parentPath){if(!parent)return;if(!opts.noScope&&!scope){if(parent.type!=="Program"&&parent.type!=="File"){throw new Error(messages.get("traverseNeedsParent",parent.type))}}if(!opts)opts={};visitors.verify(opts);visitors.explode(opts);if(Array.isArray(parent)){for(var i=0;i-1}function visit(){if(this.isBlacklisted())return false;if(this.opts.shouldSkip&&this.opts.shouldSkip(this))return false;this.call("enter");if(this.shouldSkip){return this.shouldStop}var node=this.node;var opts=this.opts;if(node){if(Array.isArray(node)){for(var i=0;i":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right}}if(path.isCallExpression()){var callee=path.get("callee");var context;var func;if(callee.isIdentifier()&&!path.scope.getBinding(callee.node.name,true)&&VALID_CALLEES.indexOf(callee.node.name)>=0){func=global[node.callee.name]}if(callee.isMemberExpression()){var object=callee.get("object");var property=callee.get("property");if(object.isIdentifier()&&property.isIdentifier()&&VALID_CALLEES.indexOf(object.node.name)>=0){context=global[object.node.name];func=context[property.node.name]}if(object.isLiteral()&&property.isIdentifier()){var type=typeof object.node.value;if(type==="string"||type==="number"){context=object.node.value;func=context[property.node.name]}}}if(func){var args=path.get("arguments").map(evaluate);if(!confident)return;return func.apply(context,args)}}confident=false}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],165:[function(require,module,exports){"use strict";exports.__esModule=true;exports.getStatementParent=getStatementParent;exports.getCompletionRecords=getCompletionRecords;exports.getSibling=getSibling;exports.get=get;exports._getKey=_getKey;exports._getPattern=_getPattern;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);function getStatementParent(){var path=this;do{if(!path.parentPath||Array.isArray(path.container)&&path.isStatement()){break}else{path=path.parentPath}}while(path);if(path&&(path.isProgram()||path.isFile())){throw new Error("File/Program node, we can't possibly find a statement parent to this")}return path}function getCompletionRecords(){var paths=[];var add=function add(path){if(path)paths=paths.concat(path.getCompletionRecords())};if(this.isIfStatement()){add(this.get("consequent"));add(this.get("alternate"))}else if(this.isDoExpression()||this.isFor()||this.isWhile()){add(this.get("body"))}else if(this.isProgram()||this.isBlockStatement()){add(this.get("body").pop())}else if(this.isFunction()){return this.get("body").getCompletionRecords()}else{paths.push(this)}return paths}function getSibling(key){return _index2["default"].get({parentPath:this.parentPath,parent:this.parent,container:this.container,containerKey:this.containerKey,key:key})}function get(key){var parts=key.split(".");if(parts.length===1){return this._getKey(key)}else{return this._getPattern(parts)}}function _getKey(key){var _this=this;var node=this.node;var container=node[key];if(Array.isArray(container)){return container.map(function(_,i){return _index2["default"].get({containerKey:key,parentPath:_this,parent:node,container:container,key:i}).setContext()})}else{return _index2["default"].get({parentPath:this,parent:node,container:node,key:key}).setContext()}}function _getPattern(parts){var path=this;var _arr=parts;for(var _i=0;_i<_arr.length;_i++){var part=_arr[_i];if(part==="."){path=path.parentPath}else{if(Array.isArray(path)){path=path[part]}else{path=path.get(part)}}}return path}function getBindingIdentifiers(){return t.getBindingIdentifiers(this.node)}},{"../../types":182,"./index":166}],166:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _libVirtualTypes=require("./lib/virtual-types");var virtualTypes=_interopRequireWildcard(_libVirtualTypes);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _lodashObjectAssign=require("lodash/object/assign");var _lodashObjectAssign2=_interopRequireDefault(_lodashObjectAssign);var _scope=require("../scope");var _scope2=_interopRequireDefault(_scope);var _types=require("../../types");var t=_interopRequireWildcard(_types);var NodePath=function(){function NodePath(hub,parent){_classCallCheck(this,NodePath);this.contexts=[];this.parent=parent;this.data={};this.hub=hub}NodePath.get=function get(_ref){var hub=_ref.hub;var parentPath=_ref.parentPath;var parent=_ref.parent;var container=_ref.container;var containerKey=_ref.containerKey;var key=_ref.key;if(!hub&&parentPath){hub=parentPath.hub}var targetNode=container[key];var paths=parent._paths=parent._paths||[];var path;for(var i=0;i1){var last=nodes[nodes.length-1];if(t.isLiteral(last,{value:""}))nodes.pop();var root=buildBinaryExpression(nodes.shift(),nodes.shift());for(i=0;i=1){nodes.push(node)}return nodes}},{"../../../types":153}],109:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.manipulateOptions=manipulateOptions;exports.ObjectExpression=ObjectExpression;exports.__esModule=true;var t=_interopRequireWildcard(require("../../../types"));var metadata={stage:1};exports.metadata=metadata;function manipulateOptions(opts){if(opts.whitelist)opts.whitelist.push("es6.destructuring")}var hasSpread=function hasSpread(node){for(var i=0;i3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}var msg;if(closest){msg=messages.get("undeclaredVariableSuggestion",node.name,closest)}else{msg=messages.get("undeclaredVariable",node.name)}throw file.errorWithNode(node,msg,ReferenceError)}},{"../../../messages":43,leven:307}],142:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var t=_interopRequireWildcard(require("../types"));var Binding=function(){function Binding(_ref){var identifier=_ref.identifier;var scope=_ref.scope;var path=_ref.path;var kind=_ref.kind;_classCallCheck(this,Binding);this.identifier=identifier;this.constant=true;this.scope=scope;this.path=path;this.kind=kind}Binding.prototype.setTypeAnnotation=function setTypeAnnotation(){var typeInfo=this.path.getTypeAnnotation();this.typeAnnotationInferred=typeInfo.inferred;this.typeAnnotation=typeInfo.annotation};Binding.prototype.isTypeGeneric=function isTypeGeneric(){var _path;return(_path=this.path).isTypeGeneric.apply(_path,arguments)};Binding.prototype.assignTypeGeneric=function assignTypeGeneric(type,params){var typeParams=null;if(params)params=t.typeParameterInstantiation(params);this.assignType(t.genericTypeAnnotation(t.identifier(type),typeParams))};Binding.prototype.assignType=function assignType(type){this.typeAnnotation=type};Binding.prototype.reassign=function reassign(){this.constant=false;if(this.typeAnnotationInferred){this.typeAnnotation=null}};Binding.prototype.isCompatibleWithType=function isCompatibleWithType(newType){return false};return Binding}();module.exports=Binding},{"../types":153}],143:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var TraversalPath=_interopRequire(require("./path"));var compact=_interopRequire(require("lodash/array/compact"));var t=_interopRequireWildcard(require("../types"));var TraversalContext=function(){function TraversalContext(scope,opts,state,parentPath){_classCallCheck(this,TraversalContext);this.parentPath=parentPath;this.scope=scope;this.state=state;this.opts=opts}TraversalContext.prototype.create=function create(node,obj,key){return TraversalPath.get(this.parentPath,this,node,obj,key)};TraversalContext.prototype.visitMultiple=function visitMultiple(nodes,node,key){if(nodes.length===0)return false;var visited=[];var queue=this.queue=[];var stop=false;for(var i=0;i=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}}for(var i=0;i":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right}}confident=false}}},{}],147:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var react=_interopRequireWildcard(require("../../transformation/helpers/react"));var t=_interopRequireWildcard(require("../../types"));var referenceVisitor={enter:function enter(node,parent,scope,state){if(this.isJSXIdentifier()&&react.isCompatTag(node.name)){return}if(this.isJSXIdentifier()||this.isIdentifier()){if(this.isReferenced()){var bindingInfo=scope.getBinding(node.name);if(bindingInfo!==state.scope.getBinding(node.name))return;if(bindingInfo&&bindingInfo.constant){state.bindings[node.name]=bindingInfo}else{scope.dump();state.foundIncompatible=true;this.stop()}}}}};var PathHoister=function(){function PathHoister(path,scope){_classCallCheck(this,PathHoister);this.foundIncompatible=false;this.bindings={};this.scope=scope;this.scopes=[];this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var checkScope=this.path.scope;do{if(this.isCompatibleScope(checkScope)){this.scopes.push(checkScope)}else{break}}while(checkScope=checkScope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(scope.path.isFunction()){if(this.hasNonParamBindings()){return this.getNextScopeStatementParent()}else{return scope.path.get("body").get("body")[0]}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasNonParamBindings=function hasNonParamBindings(){for(var name in this.bindings){var binding=this.bindings[name];if(binding.kind!=="param")return true}return false};PathHoister.prototype.run=function run(){this.path.traverse(referenceVisitor,this);if(this.foundIncompatible)return;this.getCompatibleScopes();var path=this.getAttachmentPath();if(!path)return;var uid=path.scope.generateUidIdentifier("ref");path.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);this.path.replaceWith(uid)};return PathHoister}();module.exports=PathHoister},{"../../transformation/helpers/react":58,"../../types":153}],148:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};var _createClass=function(){function defineProperties(target,props){for(var key in props){var prop=props[key];prop.configurable=true;if(prop.value)prop.writable=true}Object.defineProperties(target,props)}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var PathHoister=_interopRequire(require("./hoister"));var isBoolean=_interopRequire(require("lodash/lang/isBoolean"));var isNumber=_interopRequire(require("lodash/lang/isNumber"));var isRegExp=_interopRequire(require("lodash/lang/isRegExp"));var isString=_interopRequire(require("lodash/lang/isString"));var traverse=_interopRequire(require("../index"));var includes=_interopRequire(require("lodash/collection/includes"));var assign=_interopRequire(require("lodash/object/assign"));var extend=_interopRequire(require("lodash/object/extend"));var Scope=_interopRequire(require("../scope"));var t=_interopRequireWildcard(require("../../types"));var hoistVariablesVisitor={enter:function enter(node,parent,scope){if(this.isFunction()){return this.skip()}if(this.isVariableDeclaration()&&node.kind==="var"){var bindings=this.getBindingIdentifiers();for(var key in bindings){scope.push({id:bindings[key]})}var exprs=[];for(var i=0;i=fromIndex){path.key+=incrementBy}}};TraversalPath.prototype.setData=function setData(key,val){return this.data[key]=val};TraversalPath.prototype.getData=function getData(key,def){var val=this.data[key];if(!val&&def)val=this.data[key]=def;return val};TraversalPath.prototype.setScope=function setScope(file){this.scope=TraversalPath.getScope(this,this.context&&this.context.scope,file)};TraversalPath.prototype.clearContext=function clearContext(){this.context=null};TraversalPath.prototype.setContext=function setContext(parentPath,context,key,file){this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.parentPath=parentPath||this.parentPath;this.key=key;if(context){this.context=context;this.state=context.state;this.opts=context.opts}this.type=this.node&&this.node.type;this.setScope(file)};TraversalPath.prototype._remove=function _remove(){if(Array.isArray(this.container)){this.container.splice(this.key,1);this.updateSiblingKeys(this.key,-1)}else{this.container[this.key]=null}};TraversalPath.prototype.remove=function remove(){var removeParent=false;if(this.parentPath){if(!removeParent)removeParent=this.parentPath.isExpressionStatement();if(!removeParent)removeParent=this.parentPath.isSequenceExpression()&&this.parent.expressions.length===1;if(removeParent)return this.parentPath.remove()}this._remove();this.removed=true};TraversalPath.prototype.skip=function skip(){this.shouldSkip=true};TraversalPath.prototype.stop=function stop(){this.shouldStop=true;this.shouldSkip=true};TraversalPath.prototype.errorWithNode=function errorWithNode(msg){var Error=arguments[1]===undefined?SyntaxError:arguments[1];var loc=this.node.loc.start;var err=new Error("Line "+loc.line+": "+msg);err.loc=loc;return err};TraversalPath.prototype.replaceInline=function replaceInline(nodes){if(Array.isArray(nodes)){if(Array.isArray(this.container)){nodes=this._verifyNodeList(nodes);this._containerInsertAfter(nodes);return this.remove()}else{return this.replaceWithMultiple(nodes)}}else{return this.replaceWith(nodes)}};TraversalPath.prototype._verifyNodeList=function _verifyNodeList(nodes){if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;iparts.length){return false}}return true}function has(key){var val=this.node[key];if(val&&Array.isArray(val)){return!!val.length}else{return!!val}}var is=has;exports.is=is;function isnt(key){return!this.has(key)}function equals(key,value){return this.node[key]===value}function isNodeType(type){return t.isType(this.type,type)}function canHaveVariableDeclarationOrExpression(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function isCompletionRecord(allowInsideFunction){var path=this;var first=true;do{var container=path.container;if(path.isFunction()&&!first){return!!allowInsideFunction}first=false;if(Array.isArray(container)&&path.key!==container.length-1){return false}}while((path=path.parentPath)&&!path.isProgram());return true}function isStatementOrBlock(){if(this.parentPath.isLabeledStatement()||t.isBlockStatement(this.container)){return false}else{return(0,_lodashCollectionIncludes2["default"])(t.STATEMENT_OR_BLOCK_KEYS,this.key)}}function isUser(){return this.node&&!!this.node.loc}function isGenerated(){return!this.isUser()}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier())return false;var binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return false;var path=binding.path;if(!path.isImportDeclaration())return false;if(path.node.source.value===moduleSource){if(!importName)return true}else{return false}var _arr=path.node.specifiers;for(var _i=0;_i<_arr.length;_i++){var specifier=_arr[_i];if(t.isSpecifierDefault(specifier)&&importName==="default"){return true}if(t.isImportNamespaceSpecifier(specifier)&&importName==="*"){return true}if(t.isImportSpecifier(specifier)&&specifier.imported.name===importName){return true}}return false}function getSource(){var node=this.node;if(node.end){return this.hub.file.code.slice(node.start,node.end)}else{return""}}},{"../../types":182,"lodash/collection/includes":345}],168:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){if(this.isJSXIdentifier()&&react.isCompatTag(node.name)){return}var bindingInfo=scope.getBinding(node.name);if(!bindingInfo)return;if(bindingInfo!==state.scope.getBinding(node.name))return;if(bindingInfo.constant){state.bindings[node.name]=bindingInfo}else{var _arr=bindingInfo.constantViolations;for(var _i=0;_i<_arr.length;_i++){var violationPath=_arr[_i];state.breakOnScopePaths.push(violationPath.scope.path)}}}};var PathHoister=function(){function PathHoister(path,scope){_classCallCheck(this,PathHoister);this.breakOnScopePaths=[];this.bindings={};this.scopes=[];this.scope=scope;this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var scope=this.path.scope;do{if(this.isCompatibleScope(scope)){this.scopes.push(scope)}else{break}if(this.breakOnScopePaths.indexOf(scope.path)>=0){break}}while(scope=scope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(!scope)return;if(scope.path.isFunction()){if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;return scope.path.get("body").get("body")[0]}else{return this.getNextScopeStatementParent()}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasOwnParamBindings=function hasOwnParamBindings(scope){for(var name in this.bindings){if(!scope.hasOwnBinding(name))continue;var binding=this.bindings[name];if(binding.kind==="param")return true}return false};PathHoister.prototype.run=function run(){var node=this.path.node;if(node._hoisted)return;node._hoisted=true;this.path.traverse(referenceVisitor,this);this.getCompatibleScopes();var path=this.getAttachmentPath();if(!path)return;var uid=path.scope.generateUidIdentifier("ref");path.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);var parent=this.path.parentPath;if(parent.isJSXElement()&&this.path.container===parent.node.children){uid=t.jSXExpressionContainer(uid)}this.path.replaceWith(uid)};return PathHoister}();exports["default"]=PathHoister;module.exports=exports["default"]},{"../../../transformation/helpers/react":67,"../../../types":182}],169:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var pre=[function(self){if(self.key==="body"&&(self.isBlockStatement()||self.isClassBody())){self.node.body=[];return true}},function(self,parent){var replace=false;replace=replace||self.key==="body"&&parent.isArrowFunctionExpression();replace=replace||self.key==="argument"&&parent.isThrowStatement();if(replace){self.replaceWith(t.identifier("undefined"));return true}}];exports.pre=pre;var post=[function(self,parent){var removeParent=false;removeParent=removeParent||self.key==="test"&&(parent.isWhile()||parent.isSwitchCase());removeParent=removeParent||self.key==="declaration"&&parent.isExportDeclaration();removeParent=removeParent||self.key==="body"&&parent.isLabeledStatement();removeParent=removeParent||self.containerKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===0;removeParent=removeParent||self.key==="expression"&&parent.isExpressionStatement();removeParent=removeParent||self.key==="test"&&parent.isIfStatement();if(removeParent){parent.dangerouslyRemove();return true}},function(self,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1){parent.replaceWith(parent.node.expressions[0]);return true}},function(self,parent){if(parent.isBinary()){if(self.key==="left"){parent.replaceWith(parent.node.right)}else{parent.replaceWith(parent.node.left)}return true}}];exports.post=post},{"../../../types":182}],170:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function checkPath(_ref,opts){var node=_ref.node;var parent=_ref.parent;if(!t.isIdentifier(node,opts)){if(t.isJSXIdentifier(node,opts)){if(react.isCompatTag(node.name))return false}else{return false}}return t.isReferenced(node,parent)}};exports.ReferencedIdentifier=ReferencedIdentifier;var Expression={types:["Expression"],checkPath:function checkPath(path){if(path.isIdentifier()){return path.isReferencedIdentifier()}else{return t.isExpression(path.node)}}};exports.Expression=Expression;var Scope={types:["Scopable"],checkPath:function checkPath(path){return t.isScope(path.node,path.parent)}};exports.Scope=Scope;var Referenced={checkPath:function checkPath(path){return t.isReferenced(path.node,path.parent)}};exports.Referenced=Referenced;var BlockScoped={checkPath:function checkPath(path){return t.isBlockScoped(path.node)}};exports.BlockScoped=BlockScoped;var Var={types:["VariableDeclaration"],checkPath:function checkPath(path){return t.isVar(path.node)}};exports.Var=Var},{"../../../transformation/helpers/react":67,"../../../types":182}],171:[function(require,module,exports){"use strict";exports.__esModule=true;exports.insertBefore=insertBefore;exports._containerInsert=_containerInsert;exports._containerInsertBefore=_containerInsertBefore;exports._containerInsertAfter=_containerInsertAfter;exports._maybePopFromStatements=_maybePopFromStatements;exports.insertAfter=insertAfter;exports.updateSiblingKeys=updateSiblingKeys;exports._verifyNodeList=_verifyNodeList;exports.unshiftContainer=unshiftContainer;exports.pushContainer=pushContainer;exports.hoist=hoist;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _libHoister=require("./lib/hoister");var _libHoister2=_interopRequireDefault(_libHoister);var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);function insertBefore(nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);if(this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement()){return this.parentPath.insertBefore(nodes)}else if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&this.key==="init"){if(this.node)nodes.push(this.node);this.replaceExpressionWithStatements(nodes)}else if(this.isNodeType("Statement")||!this.type){this._maybePopFromStatements(nodes);if(Array.isArray(this.container)){return this._containerInsertBefore(nodes)}else if(this.isStatementOrBlock()){if(this.node)nodes.push(this.node);this.node=this.container[this.key]=t.blockStatement(nodes)}else{throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}else{throw new Error("No clue what to do with this node type.")}return[this]}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);var paths=[];for(var i=0;i=fromIndex){path.key+=incrementBy}}}function _verifyNodeList(nodes){if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;i=0)return;resolved=resolved||[];resolved.push(this);if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve(dangerous,resolved)}else{}}else if(this.isReferencedIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding)return;if(!binding.constant)return;if(binding.kind==="module")return;if(binding.path!==this){return binding.path.resolve(dangerous,resolved)}}else if(dangerous&&this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){var props=target.get("properties");var _arr=props;for(var _i=0;_i<_arr.length;_i++){var prop=_arr[_i];if(!prop.isProperty())continue;var key=prop.get("key");var match=prop.isnt("computed")&&key.isIdentifier({name:targetName});match=match||key.isLiteral({value:targetName});if(match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){var elems=target.get("elements");var elem=elems[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}function getTypeAnnotation(force){if(this.typeAnnotation)return this.typeAnnotation;var type=this._getTypeAnnotation(force)||t.anyTypeAnnotation();if(t.isTypeAnnotation(type))type=type.typeAnnotation;return this.typeAnnotation=type}function _getTypeAnnotationBindingConstantViolations(name){var types=arguments[1]===undefined?[]:arguments[1];var binding=this.scope.getBinding(name);var _arr2=binding.constantViolations;for(var _i2=0;_i2<_arr2.length;_i2++){var constantViolation=_arr2[_i2];types.push(constantViolation.getTypeAnnotation())}if(types.length){return t.createUnionTypeAnnotation(types)}}function _getTypeAnnotation(force){var node=this.node;if(!node){if(this.key==="init"&&this.parentPath.isVariableDeclarator()){var declar=this.parentPath.parentPath;var declarParent=declar.parentPath;if(declar.key==="left"&&declarParent.isForInStatement()){return t.stringTypeAnnotation()}if(declar.key==="left"&&declarParent.isForOfStatement()){return t.anyTypeAnnotation()}return t.voidTypeAnnotation()}else{return}}if(node.typeAnnotation){return node.typeAnnotation}if(this.isVariableDeclarator()){var id=this.get("id");if(id.isIdentifier()){return this._getTypeAnnotationBindingConstantViolations(id.node.name,[this.get("init").getTypeAnnotation()])}else{return}}if(this.parentPath.isTypeCastExpression()){return this.parentPath.getTypeAnnotation()}if(this.isTypeCastExpression()){return node.typeAnnotation}if(this.isRestElement()||this.parentPath.isRestElement()||this.isArrayExpression()){return t.genericTypeAnnotation(t.identifier("Array"),t.typeParameterInstantiation([t.anyTypeAnnotation()]))}if(!force&&this.parentPath.isReturnStatement()){return this.parentPath.getTypeAnnotation()}if(this.isReturnStatement()){var funcPath=this.findParent(function(path){return path.isFunction()});if(!funcPath)return;var returnType=funcPath.node.returnType;if(returnType){return returnType}else{return this.get("argument").getTypeAnnotation(true)}}if(this.isNewExpression()&&this.get("callee").isIdentifier()){return t.genericTypeAnnotation(node.callee)}if(this.isReferencedIdentifier()){var binding=this.scope.getBinding(node.name);if(binding){if(binding.identifier.typeAnnotation){return binding.identifier.typeAnnotation}else{return this._getTypeAnnotationBindingConstantViolations(node.name,[binding.path.getTypeAnnotation()])}}if(node.name==="undefined"){return t.voidTypeAnnotation()}else if(node.name==="NaN"||node.name==="Infinity"){return t.numberTypeAnnotation()}else if(node.name==="arguments"){}}if(this.isObjectExpression()){return t.genericTypeAnnotation(t.identifier("Object"))}if(this.isFunction()||this.isClass()){return t.genericTypeAnnotation(t.identifier("Function"))}if(this.isTemplateLiteral()){return t.stringTypeAnnotation()}if(this.isUnaryExpression()){var operator=node.operator;if(operator==="void"){return t.voidTypeAnnotation()}else if(t.NUMBER_UNARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.STRING_UNARY_OPERATORS.indexOf(operator)>=0){return t.stringTypeAnnotation()}else if(t.BOOLEAN_UNARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}}if(this.isBinaryExpression()){var operator=node.operator;if(t.NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.BOOLEAN_BINARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}else if(operator==="+"){var right=this.get("right");var left=this.get("left");if(left.isGenericType("Number")&&right.isGenericType("Number")){return t.numberTypeAnnotation()}else if(left.isGenericType("String")||right.isGenericType("String")){return t.stringTypeAnnotation()}return t.unionTypeAnnotation([t.stringTypeAnnotation(),t.numberTypeAnnotation()])}}if(this.isLogicalExpression()){return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}if(this.isConditionalExpression()){return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}if(this.isSequenceExpression()){return this.get("expressions").pop().getTypeAnnotation(force)}if(this.isAssignmentExpression()){return this.get("right").getTypeAnnotation(force)}if(this.isUpdateExpression()){var operator=node.operator;if(operator==="++"||operator==="--"){return t.numberTypeAnnotation()}}if(this.isLiteral()){var value=node.value;if(typeof value==="string")return t.stringTypeAnnotation();if(typeof value==="number")return t.numberTypeAnnotation();if(typeof value==="boolean")return t.booleanTypeAnnotation();if(node.regex)return t.genericTypeAnnotation(t.identifier("RegExp"))}var callPath;if(this.isCallExpression())callPath=this.get("callee");if(this.isTaggedTemplateExpression())callPath=this.get("tag");if(callPath){var callee=callPath.resolve();if(callee.isFunction()){if(callee.is("async")){if(callee.is("generator")){return t.genericTypeAnnotation(t.identifier("AsyncIterator"))}else{return t.genericTypeAnnotation(t.identifier("Promise"))}}else{if(callee.node.returnType){return callee.node.returnType}else{}}}}}function isGenericType(genericName){var type=this.getTypeAnnotation();if(t.isGenericTypeAnnotation(type)&&t.isIdentifier(type.id,{name:genericName})){return true}if(genericName==="String"){return t.isStringTypeAnnotation(type)}else if(genericName==="Number"){return t.isNumberTypeAnnotation(type)}else if(genericName==="Boolean"){return t.isBooleanTypeAnnotation(type)}return false}},{"../../types":182}],175:[function(require,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 Binding=function(){function Binding(_ref){var identifier=_ref.identifier;var scope=_ref.scope;var path=_ref.path;var kind=_ref.kind;_classCallCheck(this,Binding);this.constantViolations=[];this.constant=true;this.identifier=identifier;this.references=0;this.referenced=false;this.scope=scope;this.path=path;this.kind=kind;this.clearValue()}Binding.prototype.deoptValue=function deoptValue(){this.clearValue();this.hasDeoptedValue=true};Binding.prototype.setValue=function setValue(value){if(this.hasDeoptedValue)return;this.hasValue=true;this.value=value};Binding.prototype.clearValue=function clearValue(){this.hasDeoptedValue=false;this.hasValue=false;this.value=null};Binding.prototype.reassign=function reassign(path){this.constant=false;this.constantViolations.push(path)};Binding.prototype.reference=function reference(){this.referenced=true;this.references++};Binding.prototype.dereference=function dereference(){this.references--;this.referenced=!!this.references};Binding.prototype.isCompatibleWithType=function isCompatibleWithType(){return false};return Binding}();exports["default"]=Binding;module.exports=exports["default"]},{}],176:[function(require,module,exports){"use strict";exports.__esModule=true;var _createClass=function(){ + function defineProperties(target,props){for(var i=0;i1)id+=i;return"_"+id};Scope.prototype.generateUidIdentifierBasedOnNode=function generateUidIdentifierBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function add(node){if(t.isModuleDeclaration(node)){if(node.source){add(node.source)}else if(node.specifiers&&node.specifiers.length){var _arr4=node.specifiers;for(var _i4=0;_i4<_arr4.length;_i4++){var specifier=_arr4[_i4];add(specifier)}}else if(node.declaration){add(node.declaration)}}else if(t.isModuleSpecifier(node)){add(node.local)}else if(t.isMemberExpression(node)){add(node.object);add(node.property)}else if(t.isIdentifier(node)){parts.push(node.name)}else if(t.isLiteral(node)){parts.push(node.value)}else if(t.isCallExpression(node)){add(node.callee)}else if(t.isObjectExpression(node)||t.isObjectPattern(node)){var _arr5=node.properties;for(var _i5=0;_i5<_arr5.length;_i5++){var prop=_arr5[_i5];add(prop.key||prop.argument)}}};add(node);var id=parts.join("$");id=id.replace(/^_/,"")||defaultName||"ref";return this.generateUidIdentifier(id)};Scope.prototype.isStatic=function isStatic(node){if(t.isThisExpression(node)||t.isSuper(node)){return true}if(t.isIdentifier(node)&&this.hasBinding(node.name)){return true}return false};Scope.prototype.maybeGenerateMemoised=function maybeGenerateMemoised(node,dontPush){if(this.isStatic(node)){return null}else{var id=this.generateUidIdentifierBasedOnNode(node);if(!dontPush)this.push({id:id});return id}};Scope.prototype.checkBlockScopedCollisions=function checkBlockScopedCollisions(local,kind,name,id){if(kind==="param")return;if(kind==="hoisted"&&local.kind==="let")return;var duplicate=false;if(!duplicate)duplicate=kind==="let"||local.kind==="let"||local.kind==="const"||local.kind==="module";if(!duplicate)duplicate=local.kind==="param"&&(kind==="let"||kind==="const");if(duplicate){throw this.hub.file.errorWithNode(id,messages.get("scopeDuplicateDeclaration",name),TypeError)}};Scope.prototype.rename=function rename(oldName,newName,block){newName=newName||this.generateUidIdentifier(oldName).name;var info=this.getBinding(oldName);if(!info)return;var state={newName:newName,oldName:oldName,binding:info.identifier,info:info};var scope=info.scope;scope.traverse(block||scope.block,renameVisitor,state);if(!block){scope.removeOwnBinding(oldName);scope.bindings[newName]=info;state.binding.name=newName}var file=this.hub.file;if(file){this._renameFromMap(file.moduleFormatter.localImports,oldName,newName,state.binding)}};Scope.prototype._renameFromMap=function _renameFromMap(map,oldName,newName,value){if(map[oldName]){map[newName]=value;map[oldName]=null}};Scope.prototype.dump=function dump(){var sep=(0,_repeating2["default"])("-",60);console.log(sep);var scope=this;do{console.log("#",scope.block.type);for(var name in scope.bindings){var binding=scope.bindings[name];console.log(" -",name,{constant:binding.constant,references:binding.references})}}while(scope=scope.parent);console.log(sep)};Scope.prototype.toArray=function toArray(node,i){var file=this.hub.file;if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding&&binding.constant&&binding.path.isGenericType("Array"))return node}if(t.isArrayExpression(node)){return node}if(t.isIdentifier(node,{name:"arguments"})){return t.callExpression(t.memberExpression(file.addHelper("slice"),t.identifier("call")),[node])}var helperName="to-array";var args=[node];if(i===true){helperName="to-consumable-array"}else if(i){args.push(t.literal(i));helperName="sliced-to-array";if(this.hub.file.isLoose("es6.forOf"))helperName+="-loose"}return t.callExpression(file.addHelper(helperName),args)};Scope.prototype.registerDeclaration=function registerDeclaration(path){var node=path.node;if(t.isFunctionDeclaration(node)){this.registerBinding("hoisted",path)}else if(t.isVariableDeclaration(node)){var declarations=path.get("declarations");var _arr6=declarations;for(var _i6=0;_i6<_arr6.length;_i6++){var declar=_arr6[_i6];this.registerBinding(node.kind,declar)}}else if(t.isClassDeclaration(node)){this.registerBinding("let",path)}else if(t.isImportDeclaration(node)||t.isExportDeclaration(node)){this.registerBinding("module",path)}else if(t.isFlowDeclaration()){this.registerBinding("type",path)}else{this.registerBinding("unknown",path)}};Scope.prototype.registerConstantViolation=function registerConstantViolation(root,left,right){var ids=left.getBindingIdentifiers();for(var name in ids){var binding=this.getBinding(name);if(!binding)continue;if(right){var rightType=right.typeAnnotation;if(rightType&&binding.isCompatibleWithType(rightType))continue}binding.reassign(root,left,right)}};Scope.prototype.registerBinding=function registerBinding(kind,path){if(!kind)throw new ReferenceError("no `kind`");if(path.isVariableDeclaration()){var declarators=path.get("declarations");var _arr7=declarators;for(var _i7=0;_i7<_arr7.length;_i7++){var declar=_arr7[_i7];this.registerBinding(kind,declar)}return}var parent=this.getProgramParent();var ids=path.getBindingIdentifiers();for(var name in ids){var id=ids[name];var local=this.getOwnBindingInfo(name);if(local){if(kind==="type")continue;if(local.identifier===id)continue;this.checkBlockScopedCollisions(local,kind,name,id)}parent.references[name]=true;this.bindings[name]=new _binding2["default"]({identifier:id,scope:this,path:path,kind:kind})}};Scope.prototype.addGlobal=function addGlobal(node){this.globals[node.name]=node};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.uids[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasGlobal=function hasGlobal(name){var scope=this;do{if(scope.globals[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasReference=function hasReference(name){var scope=this;do{if(scope.references[name])return true}while(scope=scope.parent);return false};Scope.prototype.isPure=function isPure(node,constantsOnly){if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(!binding)return false;if(constantsOnly)return binding.constant;return true}else if(t.isClass(node)){return!node.superClass||this.isPure(node.superClass,constantsOnly)}else if(t.isBinary(node)){return this.isPure(node.left,constantsOnly)&&this.isPure(node.right,constantsOnly)}else if(t.isArrayExpression(node)){var _arr8=node.elements;for(var _i8=0;_i8<_arr8.length;_i8++){var elem=_arr8[_i8];if(!this.isPure(elem,constantsOnly))return false}return true}else if(t.isObjectExpression(node)){var _arr9=node.properties;for(var _i9=0;_i9<_arr9.length;_i9++){var prop=_arr9[_i9];if(!this.isPure(prop,constantsOnly))return false}return true}else if(t.isProperty(node)){if(node.computed&&!this.isPure(node.key,constantsOnly))return false;return this.isPure(node.value,constantsOnly)}else{return t.isPure(node)}};Scope.prototype.init=function init(){if(!this.references)this.crawl()};Scope.prototype.crawl=function crawl(){var path=this.path;var info=this.block._scopeInfo;if(info)return(0,_lodashObjectExtend2["default"])(this,info);info=this.block._scopeInfo={references:(0,_helpersObject2["default"])(),bindings:(0,_helpersObject2["default"])(),globals:(0,_helpersObject2["default"])(),uids:(0,_helpersObject2["default"])()};(0,_lodashObjectExtend2["default"])(this,info);if(path.isLoop()){var _arr10=t.FOR_INIT_KEYS;for(var _i10=0;_i10<_arr10.length;_i10++){var key=_arr10[_i10];var node=path.get(key);if(node.isBlockScoped())this.registerBinding(node.node.kind,node)}}if(path.isFunctionExpression()&&path.has("id")){if(!t.isProperty(path.parent,{method:true})){this.registerBinding("var",path)}}if(path.isClassExpression()&&path.has("id")){this.registerBinding("var",path)}if(path.isFunction()){var params=path.get("params");var _arr11=params;for(var _i11=0;_i11<_arr11.length;_i11++){var param=_arr11[_i11];this.registerBinding("param",param)}}if(path.isCatchClause()){this.registerBinding("let",path)}if(path.isComprehensionExpression()){this.registerBinding("let",path)}var parent=this.getProgramParent();if(parent.crawling)return;this.crawling=true;path.traverse(collectorVisitor);this.crawling=false};Scope.prototype.push=function push(opts){var path=this.path;if(path.isSwitchStatement()){path=this.getFunctionParent().path}if(path.isLoop()||path.isCatchClause()||path.isFunction()){t.ensureBlock(path.node);path=path.get("body")}if(!path.isBlockStatement()&&!path.isProgram()){path=this.getBlockParent().path}var unique=opts.unique;var kind=opts.kind||"var";var dataKey="declaration:"+kind;var declar=!unique&&path.getData(dataKey);if(!declar){declar=t.variableDeclaration(kind,[]);declar._generated=true;declar._blockHoist=2;this.hub.file.attachAuxiliaryComment(declar);var _path$unshiftContainer=path.unshiftContainer("body",[declar]);var declarPath=_path$unshiftContainer[0];this.registerBinding(kind,declarPath);if(!unique)path.setData(dataKey,declar)}declar.declarations.push(t.variableDeclarator(opts.id,opts.init))};Scope.prototype.getProgramParent=function getProgramParent(){var scope=this;do{if(scope.path.isProgram()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getFunctionParent=function getFunctionParent(){var scope=this;do{if(scope.path.isFunctionParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getBlockParent=function getBlockParent(){var scope=this;do{if(scope.path.isBlockParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")};Scope.prototype.getAllBindings=function getAllBindings(){var ids=(0,_helpersObject2["default"])();var scope=this;do{(0,_lodashObjectDefaults2["default"])(ids,scope.bindings);scope=scope.parent}while(scope);return ids};Scope.prototype.getAllBindingsOfKind=function getAllBindingsOfKind(){var ids=(0,_helpersObject2["default"])();var _arr12=arguments;for(var _i12=0;_i12<_arr12.length;_i12++){var kind=_arr12[_i12];var scope=this;do{for(var name in scope.bindings){var binding=scope.bindings[name];if(binding.kind===kind)ids[name]=binding}scope=scope.parent}while(scope)}return ids};Scope.prototype.bindingIdentifierEquals=function bindingIdentifierEquals(name,node){return this.getBindingIdentifier(name)===node};Scope.prototype.getBinding=function getBinding(name){var scope=this;do{var binding=scope.getOwnBindingInfo(name);if(binding)return binding}while(scope=scope.parent)};Scope.prototype.getOwnBindingInfo=function getOwnBindingInfo(name){return this.bindings[name]};Scope.prototype.getBindingIdentifier=function getBindingIdentifier(name){var info=this.getBinding(name);return info&&info.identifier};Scope.prototype.getOwnBindingIdentifier=function getOwnBindingIdentifier(name){var binding=this.bindings[name];return binding&&binding.identifier};Scope.prototype.hasOwnBinding=function hasOwnBinding(name){return!!this.getOwnBindingInfo(name)};Scope.prototype.hasBinding=function hasBinding(name,noGlobals){if(!name)return false;if(this.hasOwnBinding(name))return true;if(this.parentHasBinding(name,noGlobals))return true;if(this.hasUid(name))return true;if(!noGlobals&&(0,_lodashCollectionIncludes2["default"])(Scope.globals,name))return true;if(!noGlobals&&(0,_lodashCollectionIncludes2["default"])(Scope.contextVariables,name))return true;return false};Scope.prototype.parentHasBinding=function parentHasBinding(name,noGlobals){return this.parent&&this.parent.hasBinding(name,noGlobals)};Scope.prototype.moveBindingTo=function moveBindingTo(name,scope){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name);info.scope=scope;scope.bindings[name]=info}};Scope.prototype.removeOwnBinding=function removeOwnBinding(name){delete this.bindings[name]};Scope.prototype.removeBinding=function removeBinding(name){var info=this.getBinding(name);if(info)info.scope.removeOwnBinding(name)};_createClass(Scope,null,[{key:"globals",value:(0,_lodashArrayFlatten2["default"])([_globals2["default"].builtin,_globals2["default"].browser,_globals2["default"].node].map(Object.keys)),enumerable:true},{key:"contextVariables",value:["arguments","undefined","Infinity","NaN"],enumerable:true}]);return Scope}();exports["default"]=Scope;module.exports=exports["default"]},{"../../helpers/object":46,"../../messages":48,"../../types":182,"../index":159,"./binding":175,globals:329,"lodash/array/flatten":338,"lodash/collection/includes":345,"lodash/object/defaults":431,"lodash/object/extend":432,repeating:489}],177:[function(require,module,exports){"use strict";exports.__esModule=true;exports.explode=explode;exports.verify=verify;exports.merge=merge;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _pathLibVirtualTypes=require("./path/lib/virtual-types");var virtualTypes=_interopRequireWildcard(_pathLibVirtualTypes);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../types");var t=_interopRequireWildcard(_types);var _lodashLangClone=require("lodash/lang/clone");var _lodashLangClone2=_interopRequireDefault(_lodashLangClone);var _esquery=require("esquery");var _esquery2=_interopRequireDefault(_esquery);function explode(visitor){if(visitor._exploded)return visitor;visitor._exploded=true;delete visitor.__esModule;if(visitor.queries){ensureEntranceObjects(visitor.queries);addQueries(visitor);delete visitor.queries}ensureEntranceObjects(visitor);for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var wrapper=virtualTypes[nodeType];if(!wrapper)continue;var fns=visitor[nodeType];for(var type in fns){fns[type]=wrapCheck(wrapper,fns[type])}delete visitor[nodeType];if(wrapper.types){var _arr=wrapper.types;for(var _i=0;_i<_arr.length;_i++){var type=_arr[_i];if(visitor[type]){mergePair(visitor[type],fns)}else{visitor[type]=fns}}}else{mergePair(visitor,fns)}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var fns=visitor[nodeType];var aliases=t.FLIPPED_ALIAS_KEYS[nodeType];if(!aliases)continue;delete visitor[nodeType];var _arr2=aliases;for(var _i2=0;_i2<_arr2.length;_i2++){var alias=_arr2[_i2];var existing=visitor[alias];if(existing){mergePair(existing,fns)}else{visitor[alias]=(0,_lodashLangClone2["default"])(fns)}}}return visitor}function verify(visitor){if(visitor._verified)return;if(typeof visitor==="function"){throw new Error(messages.get("traverseVerifyRootFunction"))}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;if(t.TYPES.indexOf(nodeType)<0&&!virtualTypes[nodeType]){throw new Error(messages.get("traverseVerifyNodeType",nodeType))}var visitors=visitor[nodeType];if(typeof visitors==="object"){for(var visitorKey in visitors){if(visitorKey==="enter"||visitorKey==="exit")continue;throw new Error(messages.get("traverseVerifyVisitorProperty",nodeType,visitorKey))}}}visitor._verified=true}function merge(visitors){var rootVisitor={};var _arr3=visitors;for(var _i3=0;_i3<_arr3.length;_i3++){var visitor=_arr3[_i3];for(var type in visitor){var nodeVisitor=rootVisitor[type]=rootVisitor[type]||{};mergePair(nodeVisitor,visitor[type])}}return rootVisitor}function ensureEntranceObjects(obj){for(var key in obj){if(shouldIgnoreKey(key))continue;var fns=obj[key];if(typeof fns==="function"){obj[key]={enter:fns}}}}function addQueries(visitor){for(var selector in visitor.queries){var fns=visitor.queries[selector];addSelector(visitor,selector,fns)}}function addSelector(visitor,selector,fns){selector=_esquery2["default"].parse(selector);var _loop=function(){var fn=fns[key];fns[key]=function(node){if(_esquery2["default"].matches(node,selector,this.getAncestry())){return fn.apply(this,arguments)}}};for(var key in fns){_loop()}mergePair(visitor,fns)}function wrapCheck(wrapper,fn){return function(){if(wrapper.checkPath(this)){return fn.apply(this,arguments)}}}function shouldIgnoreKey(key){if(key[0]==="_")return true;if(key==="enter"||key==="exit"||key==="shouldSkip")return true;if(key==="blacklist"||key==="noScope"||key==="skipKeys")return true;return false}function mergePair(dest,src){for(var key in src){dest[key]=[].concat(dest[key]||[],src[key])}}},{"../messages":48,"../types":182,"./path/lib/virtual-types":170,esquery:320,"lodash/lang/clone":415}],178:[function(require,module,exports){module.exports={ExpressionStatement:["Statement"],DebuggerStatement:["Statement"],IfStatement:["Statement"],TryStatement:["Statement"],WithStatement:["Statement"],EmptyStatement:["Statement"],LabeledStatement:["Statement"],VariableDeclaration:["Statement","Declaration"],BreakStatement:["Statement","Terminatorless","CompletionStatement"],ContinueStatement:["Statement","Terminatorless","CompletionStatement"],ReturnStatement:["Statement","Terminatorless","CompletionStatement"],ThrowStatement:["Statement","Terminatorless","CompletionStatement"],DoWhileStatement:["Statement","BlockParent","Loop","While","Scopable"],WhileStatement:["Statement","BlockParent","Loop","While","Scopable"],SwitchStatement:["Statement","BlockParent","Scopable"],ImportSpecifier:["ModuleSpecifier"],ExportSpecifier:["ModuleSpecifier"],ImportDefaultSpecifier:["ModuleSpecifier"],ExportDefaultSpecifier:["ModuleSpecifier"],ExportNamespaceSpecifier:["ModuleSpecifier"],ExportDefaultFromSpecifier:["ModuleSpecifier"],ExportAllDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ExportDefaultDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ExportNamedDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ImportDeclaration:["Statement","Declaration","ModuleDeclaration"],ArrowFunctionExpression:["Scopable","Function","Func","BlockParent","FunctionParent","Expression","Pure"],FunctionDeclaration:["Scopable","Function","Func","BlockParent","FunctionParent","Statement","Pure","Declaration"],FunctionExpression:["Scopable","Function","Func","BlockParent","FunctionParent","Expression","Pure"],BlockStatement:["Scopable","BlockParent","Block","Statement"],Program:["Scopable","BlockParent","Block","FunctionParent"],CatchClause:["Scopable"],LogicalExpression:["Binary","Expression"],BinaryExpression:["Binary","Expression"],UnaryExpression:["UnaryLike","Expression"],SpreadProperty:["UnaryLike"],SpreadElement:["UnaryLike"],ClassDeclaration:["Scopable","Class","Statement","Declaration"],ClassExpression:["Scopable","Class","Expression"],ForOfStatement:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],ForInStatement:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],ForStatement:["Scopable","Statement","For","BlockParent","Loop"],ObjectPattern:["Pattern"],ArrayPattern:["Pattern"],AssignmentPattern:["Pattern"],Property:["UserWhitespacable"],AwaitExpression:["Expression","Terminatorless"],YieldExpression:["Expression","Terminatorless"],ArrayExpression:["Expression"],AssignmentExpression:["Expression"],CallExpression:["Expression"],ComprehensionExpression:["Expression","Scopable"],ConditionalExpression:["Expression"],DoExpression:["Expression"],Identifier:["Expression"],Literal:["Expression","Pure"],MemberExpression:["Expression"],MetaProperty:["Expression"],NewExpression:["Expression"],ObjectExpression:["Expression"],SequenceExpression:["Expression"],TaggedTemplateExpression:["Expression"],ThisExpression:["Expression"],Super:["Expression"],UpdateExpression:["Expression"],JSXEmptyExpression:["Expression"],JSXMemberExpression:["Expression"],AnyTypeAnnotation:["Flow","FlowBaseAnnotation"],ArrayTypeAnnotation:["Flow"],BooleanTypeAnnotation:["Flow","FlowBaseAnnotation"],ClassImplements:["Flow"],DeclareClass:["Flow","FlowDeclaration","Statement","Declaration"],DeclareFunction:["Flow","FlowDeclaration","Statement","Declaration"],DeclareModule:["Flow","FlowDeclaration","Statement"],DeclareVariable:["Flow","FlowDeclaration","Statement","Declaration"],FunctionTypeAnnotation:["Flow"],FunctionTypeParam:["Flow"],GenericTypeAnnotation:["Flow"],InterfaceExtends:["Flow"],InterfaceDeclaration:["Flow","FlowDeclaration","Statement","Declaration"],IntersectionTypeAnnotation:["Flow"],MixedTypeAnnotation:["Flow","FlowBaseAnnotation"],NullableTypeAnnotation:["Flow"],NumberTypeAnnotation:["Flow","FlowBaseAnnotation"],StringLiteralTypeAnnotation:["Flow"],StringTypeAnnotation:["Flow","FlowBaseAnnotation"],TupleTypeAnnotation:["Flow"],TypeofTypeAnnotation:["Flow"],TypeAlias:["Flow","FlowDeclaration","Statement","Declaration"],TypeAnnotation:["Flow"],TypeCastExpression:["Flow"],TypeParameterDeclaration:["Flow"],TypeParameterInstantiation:["Flow"],ObjectTypeAnnotation:["Flow"],ObjectTypeCallProperty:["Flow","UserWhitespacable"],ObjectTypeIndexer:["Flow","UserWhitespacable"],ObjectTypeProperty:["Flow","UserWhitespacable"],QualifiedTypeIdentifier:["Flow"],UnionTypeAnnotation:["Flow"],VoidTypeAnnotation:["Flow","FlowBaseAnnotation"],JSXAttribute:["JSX","Immutable"],JSXClosingElement:["JSX","Immutable"],JSXElement:["JSX","Immutable","Expression"],JSXEmptyExpression:["JSX","Immutable"],JSXExpressionContainer:["JSX","Immutable"],JSXIdentifier:["JSX"],JSXMemberExpression:["JSX"],JSXNamespacedName:["JSX"],JSXOpeningElement:["JSX","Immutable"],JSXSpreadAttribute:["JSX"]}},{}],179:[function(require,module,exports){module.exports={ArrayExpression:{elements:null},ArrowFunctionExpression:{params:null,body:null},AssignmentExpression:{operator:null,left:null,right:null},BinaryExpression:{operator:null,left:null,right:null},BindExpression:{object:null,callee:null},BlockStatement:{body:null},CallExpression:{callee:null,arguments:null},ConditionalExpression:{test:null,consequent:null,alternate:null},ExpressionStatement:{expression:null},File:{program:null,comments:null,tokens:null},FunctionExpression:{id:null,params:null,body:null,generator:false,async:false},FunctionDeclaration:{id:null,params:null,body:null,generator:false,async:false},GenericTypeAnnotation:{id:null,typeParameters:null},Identifier:{name:null},IfStatement:{test:null,consequent:null,alternate:null},ImportDeclaration:{specifiers:null,source:null},ImportSpecifier:{local:null,imported:null},LabeledStatement:{label:null,body:null},Literal:{value:null},LogicalExpression:{operator:null,left:null,right:null},MemberExpression:{object:null,property:null,computed:false},MethodDefinition:{key:null,value:null,kind:"method",computed:false,"static":false},NewExpression:{callee:null,arguments:null},ObjectExpression:{properties:null},Program:{body:null},Property:{kind:null,key:null,value:null,computed:false},ReturnStatement:{argument:null},SequenceExpression:{expressions:null},TemplateLiteral:{quasis:null,expressions:null},ThrowExpression:{argument:null},UnaryExpression:{operator:null,argument:null,prefix:null},VariableDeclaration:{kind:null,declarations:null},VariableDeclarator:{id:null,init:null},WithStatement:{object:null,body:null},YieldExpression:{argument:null,delegate:null}}},{}],180:[function(require,module,exports){"use strict";exports.__esModule=true;exports.toComputedKey=toComputedKey;exports.toSequenceExpression=toSequenceExpression;exports.toKeyAlias=toKeyAlias;exports.toIdentifier=toIdentifier;exports.toStatement=toStatement;exports.toExpression=toExpression;exports.toBlock=toBlock;exports.valueToNode=valueToNode;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsPlainObject=require("lodash/lang/isPlainObject");var _lodashLangIsPlainObject2=_interopRequireDefault(_lodashLangIsPlainObject);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _traversal=require("../traversal");var _traversal2=_interopRequireDefault(_traversal);var _index=require("./index");var t=_interopRequireWildcard(_index);function toComputedKey(node){var key=arguments[1]===undefined?node.key||node.property:arguments[1];return function(){if(!node.computed){if(t.isIdentifier(key))key=t.literal(key.name)}return key}()}function toSequenceExpression(nodes,scope){var declars=[];var bailed=false;var result=convert(nodes);if(bailed)return;for(var i=0;i-1};TraversalPath.prototype.visit=function visit(){if(this.isBlacklisted())return false;this.call("enter");if(this.shouldSkip){return this.shouldStop}var node=this.node;var opts=this.opts;if(node){if(Array.isArray(node)){for(var i=0;iparts.length;i++){var part=parts[i];if(part==="."){path=path.parentPath}else{path=path.get(parts[i])}}return path}};TraversalPath.prototype.has=function has(key){return!!this.node[key]};TraversalPath.prototype.is=function is(key){return this.has(key)};TraversalPath.prototype.isnt=function isnt(key){return!this.has(key)};TraversalPath.prototype.getTypeAnnotation=function getTypeAnnotation(){if(this.typeInfo){return this.typeInfo}var info=this.typeInfo={inferred:false,annotation:null};var type=this.node.typeAnnotation;if(!type){info.inferred=true;type=this.inferType(this)}if(type){if(t.isTypeAnnotation(type))type=type.typeAnnotation;info.annotation=type}return info};TraversalPath.prototype.resolve=function resolve(){if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve()}else{}}else if(this.isIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding||!binding.constant)return;return;if(binding.path===this){return this}else{return binding.path.resolve()}}else if(this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve();if(!target||!target.isObjectExpression())return;var props=target.get("properties");for(var i=0;iparts.length){return false}}return true};_createClass(TraversalPath,{node:{get:function(){if(this.removed){return null}else{return this.container[this.key]}},set:function(replacement){throw new Error("Don't use `path.node = newNode;`, use `path.replaceWith(newNode)` or `path.replaceWithMultiple([newNode])`")}}});return TraversalPath}();module.exports=TraversalPath;assign(TraversalPath.prototype,require("./evaluation"));assign(TraversalPath.prototype,require("./conversion"));for(var i=0;i1)id+=i;return"_"+id};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.file.uids[name])return true;scope=scope.parent}while(scope);return false};Scope.prototype.generateUidBasedOnNode=function generateUidBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function(_add){var _addWrapper=function add(_x){return _add.apply(this,arguments)};_addWrapper.toString=function(){return _add.toString()};return _addWrapper}(function(node){if(t.isModuleDeclaration(node)){if(node.specifiers&&node.specifiers.length){for(var i=0;i","<",">=","<=","in","instanceof"];exports.BOOLEAN_BINARY_OPERATORS=BOOLEAN_BINARY_OPERATORS;var NUMBER_BINARY_OPERATORS=["-","/","*","**","&","|",">>",">>>","<<","^"];exports.NUMBER_BINARY_OPERATORS=NUMBER_BINARY_OPERATORS;var BOOLEAN_UNARY_OPERATORS=["delete","!"];exports.BOOLEAN_UNARY_OPERATORS=BOOLEAN_UNARY_OPERATORS;var NUMBER_UNARY_OPERATORS=["+","-","++","--","~"];exports.NUMBER_UNARY_OPERATORS=NUMBER_UNARY_OPERATORS;var STRING_UNARY_OPERATORS=["typeof"];exports.STRING_UNARY_OPERATORS=STRING_UNARY_OPERATORS;var VISITOR_KEYS=require("./visitor-keys");exports.VISITOR_KEYS=VISITOR_KEYS;var BUILDER_KEYS=require("./builder-keys");exports.BUILDER_KEYS=BUILDER_KEYS;var ALIAS_KEYS=require("./alias-keys");exports.ALIAS_KEYS=ALIAS_KEYS;t.FLIPPED_ALIAS_KEYS={};(0,_lodashCollectionEach2["default"])(t.VISITOR_KEYS,function(keys,type){registerType(type,true)});(0,_lodashCollectionEach2["default"])(t.ALIAS_KEYS,function(aliases,type){(0,_lodashCollectionEach2["default"])(aliases,function(alias){var types=t.FLIPPED_ALIAS_KEYS[alias]=t.FLIPPED_ALIAS_KEYS[alias]||[];types.push(type)})});(0,_lodashCollectionEach2["default"])(t.FLIPPED_ALIAS_KEYS,function(types,type){t[type.toUpperCase()+"_TYPES"]=types;registerType(type,false)});var TYPES=Object.keys(t.VISITOR_KEYS).concat(Object.keys(t.FLIPPED_ALIAS_KEYS));exports.TYPES=TYPES;function is(type,node,opts,skipAliasCheck){if(!node)return false;var matches=isType(node.type,type);if(!matches)return false;if(typeof opts==="undefined"){return true}else{return t.shallowEqual(node,opts)}}function isType(nodeType,targetType){if(nodeType===targetType)return true;var aliases=t.FLIPPED_ALIAS_KEYS[targetType];if(aliases){if(aliases[0]===nodeType)return true;var _arr=aliases;for(var _i=0;_i<_arr.length;_i++){var alias=_arr[_i];if(nodeType===alias)return true}}return false}(0,_lodashCollectionEach2["default"])(t.VISITOR_KEYS,function(keys,type){if(t.BUILDER_KEYS[type])return;var defs={};(0,_lodashCollectionEach2["default"])(keys,function(key){defs[key]=null});t.BUILDER_KEYS[type]=defs});(0,_lodashCollectionEach2["default"])(t.BUILDER_KEYS,function(keys,type){t[type[0].toLowerCase()+type.slice(1)]=function(){var node={};node.start=null;node.type=type;var i=0;for(var key in keys){var arg=arguments[i++];if(arg===undefined)arg=keys[key];node[key]=arg}return node}});function shallowEqual(actual,expected){var keys=Object.keys(expected);var _arr2=keys;for(var _i2=0;_i2<_arr2.length;_i2++){var key=_arr2[_i2];if(actual[key]!==expected[key]){return false}}return true}function appendToMemberExpression(member,append,computed){member.object=t.memberExpression(member.object,member.property,member.computed);member.property=append;member.computed=!!computed;return member}function prependToMemberExpression(member,append){member.object=t.memberExpression(append,member.object);return member}function ensureBlock(node){var key=arguments[1]===undefined?"body":arguments[1];return node[key]=t.toBlock(node[key],node)}function clone(node){var newNode={};for(var key in node){if(key[0]==="_")continue;newNode[key]=node[key]}return newNode}function cloneDeep(node){var newNode={};for(var key in node){if(key[0]==="_")continue;var val=node[key];if(val){if(val.type){val=t.cloneDeep(val)}else if(Array.isArray(val)){val=val.map(t.cloneDeep)}}newNode[key]=val}return newNode}function buildMatchMemberExpression(match,allowPartial){var parts=match.split(".");return function(member){if(!t.isMemberExpression(member))return false;var search=[member];var i=0;while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(parts[i]!==node.name)return false}else if(t.isLiteral(node)){if(parts[i]!==node.value)return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.push(node.object);search.push(node.property);continue}}else{return false}if(++i>parts.length){return false}}return true}}function removeComments(child){var _arr3=COMMENT_KEYS;for(var _i3=0;_i3<_arr3.length;_i3++){var key=_arr3[_i3];delete child[key]}return child}function inheritsComments(child,parent){if(child&&parent){var _arr4=COMMENT_KEYS;for(var _i4=0;_i4<_arr4.length;_i4++){var key=_arr4[_i4];child[key]=(0,_lodashArrayUniq2["default"])((0,_lodashArrayCompact2["default"])([].concat(child[key],parent[key])))}}return child}function inherits(child,parent){if(!child||!parent)return child;child._scopeInfo=parent._scopeInfo;child._paths=parent._paths;child.range=parent.range;child.start=parent.start;child.loc=parent.loc;child.end=parent.end;child.typeAnnotation=parent.typeAnnotation;child.returnType=parent.returnType;t.inheritsComments(child,parent);return child}(0,_toFastProperties2["default"])(t);(0,_toFastProperties2["default"])(t.VISITOR_KEYS);exports.__esModule=true;(0,_lodashObjectAssign2["default"])(t,require("./retrievers"));(0,_lodashObjectAssign2["default"])(t,require("./validators"));(0,_lodashObjectAssign2["default"])(t,require("./converters"));(0,_lodashObjectAssign2["default"])(t,require("./flow"))},{"./alias-keys":178,"./builder-keys":179,"./converters":180,"./flow":181,"./retrievers":183,"./validators":184,"./visitor-keys":185,"lodash/array/compact":337,"lodash/array/uniq":341,"lodash/collection/each":343,"lodash/object/assign":430,"to-fast-properties":505}],183:[function(require,module,exports){"use strict";exports.__esModule=true;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersObject=require("../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _index=require("./index");var t=_interopRequireWildcard(_index);function getBindingIdentifiers(node){var search=[].concat(node);var ids=(0,_helpersObject2["default"])();while(search.length){var id=search.shift();if(!id)continue;var key=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){ids[id.name]=id}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(key&&id[key]){search=search.concat(id[key])}}return ids}getBindingIdentifiers.keys={DeclareClass:"id",DeclareFunction:"id",DeclareModule:"id",DeclareVariable:"id",InterfaceDeclaration:"id",TypeAlias:"id",ComprehensionExpression:"blocks",ComprehensionBlock:"left",CatchClause:"param",UnaryExpression:"argument",AssignmentExpression:"left",ImportSpecifier:"local",ImportNamespaceSpecifier:"local",ImportDefaultSpecifier:"local",ImportDeclaration:"specifiers",FunctionDeclaration:"id",FunctionExpression:"id",ClassDeclaration:"id",ClassExpression:"id",SpreadElement:"argument",RestElement:"argument",UpdateExpression:"argument",SpreadProperty:"argument",Property:"value",AssignmentPattern:"left",ArrayPattern:"elements",ObjectPattern:"properties",VariableDeclaration:"declarations",VariableDeclarator:"id"}},{"../helpers/object":46,"./index":182}],184:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isReferenced=isReferenced;exports.isValidIdentifier=isValidIdentifier;exports.isLet=isLet;exports.isBlockScoped=isBlockScoped;exports.isVar=isVar;exports.isSpecifierDefault=isSpecifierDefault;exports.isScope=isScope;exports.isImmutable=isImmutable;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _esutils=require("esutils");var _esutils2=_interopRequireDefault(_esutils);var _index=require("./index");var t=_interopRequireWildcard(_index);function isReferenced(node,parent){switch(parent.type){case"MemberExpression":if(parent.property===node&&parent.computed){return true}else if(parent.object===node){return true}else{return false}case"MetaProperty":return false;case"Property":if(parent.key===node){return parent.computed}case"VariableDeclarator":return parent.id!==node;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":var _arr=parent.params;for(var _i=0;_i<_arr.length;_i++){var param=_arr[_i];if(param===node)return false}return parent.id!==node;case"ExportSpecifier":if(parent.source){return false}else{return parent.local===node}case"ImportDefaultSpecifier":return false;case"ImportNamespaceSpecifier":return false;case"JSXAttribute":return parent.name!==node;case"ImportSpecifier":return false;case"ClassDeclaration":case"ClassExpression":return parent.id!==node;case"MethodDefinition":return parent.key===node&&parent.computed;case"LabeledStatement":return false;case"CatchClause":return parent.param!==node;case"RestElement":return false;case"AssignmentExpression":case"AssignmentPattern":return parent.right===node;case"ObjectPattern":case"ArrayPattern":return false}return true}function isValidIdentifier(name){if(typeof name!=="string"||_esutils2["default"].keyword.isReservedWordES6(name,true)){return false}else{return _esutils2["default"].keyword.isIdentifierNameES6(name)}}function isLet(node){return t.isVariableDeclaration(node)&&(node.kind!=="var"||node._let)}function isBlockScoped(node){return t.isFunctionDeclaration(node)||t.isClassDeclaration(node)||t.isLet(node)}function isVar(node){return t.isVariableDeclaration(node,{kind:"var"})&&!node._let}function isSpecifierDefault(specifier){return t.isImportDefaultSpecifier(specifier)||t.isIdentifier(specifier.imported||specifier.exported,{name:"default"})}function isScope(node,parent){if(t.isBlockStatement(node)&&t.isFunction(parent,{body:node})){return false}return t.isScopable(node)}function isImmutable(node){if(t.isType(node.type,"Immutable"))return true;if(t.isLiteral(node)){if(node.regex){return false}else{return true}}else if(t.isIdentifier(node)){if(node.name==="undefined"){return true}else{return false}}return false}},{"./index":182,esutils:327}],185:[function(require,module,exports){module.exports={ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation"],ArrowFunctionExpression:["params","body","returnType"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BindExpression:["object","callee"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass","typeParameters","superTypeParameters","implements","decorators"],ClassExpression:["id","body","superClass","typeParameters","superTypeParameters","implements","decorators"],ComprehensionBlock:["left","right"],ComprehensionExpression:["filter","blocks","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],Decorator:["expression"],DebuggerStatement:[],DoWhileStatement:["body","test"],DoExpression:["body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation"],IfStatement:["test","consequent","alternate"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDeclaration:["specifiers","source"],ImportSpecifier:["imported","local"],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value","decorators"],NewExpression:["callee","arguments"],Noop:[],ObjectExpression:["properties"],ObjectPattern:["properties","typeAnnotation"],Program:["body"],Property:["key","value","decorators"],RestElement:["argument","typeAnnotation"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SpreadProperty:["argument"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"],ExportAllDeclaration:["source","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportDefaultSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportSpecifier:["local","exported"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],ClassImplements:["id","typeParameters"],ClassProperty:["key","value","typeAnnotation","decorators"],DeclareClass:["id","typeParameters","extends","body"],DeclareFunction:["id"],DeclareModule:["id","body"],DeclareVariable:["id"],FunctionTypeAnnotation:["typeParameters","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberTypeAnnotation:[],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],TupleTypeAnnotation:["types"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],ObjectTypeAnnotation:["properties","indexers","callProperties"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value"],ObjectTypeProperty:["key","value"],QualifiedTypeIdentifier:["id","qualification"],UnionTypeAnnotation:["types"],VoidTypeAnnotation:[],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","closingElement","children"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXSpreadAttribute:["argument"]}},{}],186:[function(require,module,exports){(function(process,__dirname){"use strict";exports.__esModule=true;exports.canCompile=canCompile;exports.resolve=resolve;exports.resolveRelative=resolveRelative;exports.list=list;exports.regexify=regexify;exports.arrayify=arrayify;exports.booleanify=booleanify;exports.shouldIgnore=shouldIgnore;exports.template=template;exports.parseTemplate=parseTemplate;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}require("./patch");var _lodashStringEscapeRegExp=require("lodash/string/escapeRegExp");var _lodashStringEscapeRegExp2=_interopRequireDefault(_lodashStringEscapeRegExp);var _lodashStringStartsWith=require("lodash/string/startsWith");var _lodashStringStartsWith2=_interopRequireDefault(_lodashStringStartsWith);var _lodashLangCloneDeep=require("lodash/lang/cloneDeep");var _lodashLangCloneDeep2=_interopRequireDefault(_lodashLangCloneDeep);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _messages=require("./messages");var messages=_interopRequireWildcard(_messages);var _minimatch=require("minimatch");var _minimatch2=_interopRequireDefault(_minimatch);var _lodashCollectionContains=require("lodash/collection/contains");var _lodashCollectionContains2=_interopRequireDefault(_lodashCollectionContains);var _traversal=require("./traversal");var _traversal2=_interopRequireDefault(_traversal);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _module2=require("module");var _module3=_interopRequireDefault(_module2);var _lodashLangIsEmpty=require("lodash/lang/isEmpty");var _lodashLangIsEmpty2=_interopRequireDefault(_lodashLangIsEmpty);var _helpersParse=require("./helpers/parse");var _helpersParse2=_interopRequireDefault(_helpersParse);var _path=require("path");var _path2=_interopRequireDefault(_path);var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("./types");var t=_interopRequireWildcard(_types);var _slash=require("slash");var _slash2=_interopRequireDefault(_slash);var _util=require("util");exports.inherits=_util.inherits;exports.inspect=_util.inspect;function canCompile(filename,altExts){var exts=altExts||canCompile.EXTENSIONS;var ext=_path2["default"].extname(filename);return(0,_lodashCollectionContains2["default"])(exts,ext)}canCompile.EXTENSIONS=[".js",".jsx",".es6",".es"];function resolve(loc){try{return require.resolve(loc)}catch(err){return null}}var relativeMod;function resolveRelative(loc){if(typeof _module3["default"]==="object")return null;if(!relativeMod){relativeMod=new _module3["default"];relativeMod.paths=_module3["default"]._nodeModulePaths(process.cwd())}try{return _module3["default"]._resolveFilename(loc,relativeMod)}catch(err){return null}}function list(val){if(!val){return[]}else if(Array.isArray(val)){return val}else if(typeof val==="string"){return val.split(",")}else{return[val]}}function regexify(val){if(!val)return new RegExp(/.^/);if(Array.isArray(val))val=new RegExp(val.map(_lodashStringEscapeRegExp2["default"]).join("|"),"i");if((0,_lodashLangIsString2["default"])(val)){val=(0,_slash2["default"])(val);if((0,_lodashStringStartsWith2["default"])(val,"./")||(0,_lodashStringStartsWith2["default"])(val,"*/"))val=val.slice(2);if((0,_lodashStringStartsWith2["default"])(val,"**/"))val=val.slice(3);var regex=_minimatch2["default"].makeRe(val,{nocase:true});return new RegExp(regex.source.slice(1,-1),"i")}if((0,_lodashLangIsRegExp2["default"])(val))return val;throw new TypeError("illegal type for regexify")}function arrayify(val,mapFn){if(!val)return[];if((0,_lodashLangIsBoolean2["default"])(val))return arrayify([val],mapFn);if((0,_lodashLangIsString2["default"])(val))return arrayify(list(val),mapFn);if(Array.isArray(val)){if(mapFn)val=val.map(mapFn);return val}return[val]}function booleanify(val){if(val==="true")return true;if(val==="false")return false;return val}function shouldIgnore(filename,ignore,only){filename=(0,_slash2["default"])(filename);if(only.length){var _arr=only;for(var _i=0;_i<_arr.length;_i++){var pattern=_arr[_i];if(pattern.test(filename))return false}return true}else if(ignore.length){var _arr2=ignore;for(var _i2=0;_i2<_arr2.length;_i2++){var pattern=_arr2[_i2];if(pattern.test(filename))return true}}return false}var templateVisitor={noScope:true,enter:function enter(node,parent,scope,nodes){if(t.isExpressionStatement(node)){node=node.expression}if(t.isIdentifier(node)&&(0,_lodashObjectHas2["default"])(nodes,node.name)){this.skip();this.replaceInline(nodes[node.name])}},exit:function exit(node){_traversal2["default"].clearNode(node)}};function template(name,nodes,keepExpression){var ast=exports.templates[name];if(!ast)throw new ReferenceError("unknown template "+name);if(nodes===true){keepExpression=true;nodes=null}ast=(0,_lodashLangCloneDeep2["default"])(ast);if(!(0,_lodashLangIsEmpty2["default"])(nodes)){(0,_traversal2["default"])(ast,templateVisitor,null,nodes)}if(ast.body.length>1)return ast.body;var node=ast.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}}function parseTemplate(loc,code){var ast=(0,_helpersParse2["default"])(code,{filename:loc,looseModules:true}).program;ast=_traversal2["default"].removeProperties(ast);return ast}function loadTemplates(){var templates={};var templatesLoc=_path2["default"].join(__dirname,"transformation/templates");if(!_fs2["default"].existsSync(templatesLoc)){throw new ReferenceError(messages.get("missingTemplatesDirectory"))}var _arr3=_fs2["default"].readdirSync(templatesLoc);for(var _i3=0;_i3<_arr3.length;_i3++){var name=_arr3[_i3];if(name[0]===".")return;var key=_path2["default"].basename(name,_path2["default"].extname(name));var loc=_path2["default"].join(templatesLoc,name);var code=_fs2["default"].readFileSync(loc,"utf8");templates[key]=parseTemplate(loc,code)}return templates}try{exports.templates=require("../../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}}).call(this,require("_process"),"/lib/babel")},{"../../templates.json":508,"./helpers/parse":47,"./messages":48,"./patch":49,"./traversal":159,"./types":182,_process:213,fs:202,"lodash/collection/contains":342,"lodash/lang/cloneDeep":416,"lodash/lang/isBoolean":419,"lodash/lang/isEmpty":420,"lodash/lang/isRegExp":426,"lodash/lang/isString":427,"lodash/object/has":433,"lodash/string/escapeRegExp":438,"lodash/string/startsWith":439,minimatch:443,module:202,path:212,slash:492,util:229}],187:[function(require,module,exports){"use strict";module.exports=function(acorn){var tt=acorn.tokTypes;var tc=acorn.tokContexts;tc.j_oTag=new acorn.TokContext("...",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);this.context.push(tc.j_oTag);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;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);++this.pos;if(ch===13&&this.input.charCodeAt(this.pos)===10){++this.pos;out+="\n"}else{out+=String.fromCharCode(ch)}if(this.options.locations){++this.curLine;this.lineStart=this.pos}chunkStart=this.pos}else{++this.pos}}}};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{++this.pos}}out+=this.input.slice(chunkStart,this.pos++);return this.finishToken(tt.string,out)};var XHTMLEntities={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡", + bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};var hexNumber=/^[\da-fA-F]+$/;var decimalNumber=/^\d+$/;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")}node.openingElement=openingElement;node.closingElement=closingElement;node.children=children;if(this.type===tt.relational&&this.value==="<"){this.raise(this.pos,"Adjacent JSX elements must be wrapped in an enclosing tag")}return this.finishNode(node,"JSXElement")};pp.jsx_parseElement=function(){var start=this.markPosition();this.next();return this.jsx_parseElementAt(start)};acorn.plugins.jsx=function(instance){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;this.context.push(tc.j_cTag);this.exprAllowed=false}else{return inner.call(this,prevType)}}})};return acorn}},{}],188:[function(require,module,exports){var types=require("../lib/types");var Type=types.Type;var def=Type.def;var or=Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var isRegExp=builtin.RegExp;var shared=require("../lib/shared");var defaults=shared.defaults;var geq=shared.geq;def("Printable").field("loc",or(def("SourceLocation"),null),defaults["null"],true);def("Node").bases("Printable").field("type",isString).field("comments",or([def("Comment")],null),defaults["null"],true);def("SourceLocation").build("start","end","source").field("start",def("Position")).field("end",def("Position")).field("source",or(isString,null),defaults["null"]);def("Position").build("line","column").field("line",geq(1)).field("column",geq(0));def("Program").bases("Node").build("body").field("body",[def("Statement")]);def("Function").bases("Node").field("id",or(def("Identifier"),null),defaults["null"]).field("params",[def("Pattern")]).field("body",def("BlockStatement"));def("Statement").bases("Node");def("EmptyStatement").bases("Statement").build();def("BlockStatement").bases("Statement").build("body").field("body",[def("Statement")]);def("ExpressionStatement").bases("Statement").build("expression").field("expression",def("Expression"));def("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Statement")).field("alternate",or(def("Statement"),null),defaults["null"]);def("LabeledStatement").bases("Statement").build("label","body").field("label",def("Identifier")).field("body",def("Statement"));def("BreakStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("ContinueStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("WithStatement").bases("Statement").build("object","body").field("object",def("Expression")).field("body",def("Statement"));def("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",def("Expression")).field("cases",[def("SwitchCase")]).field("lexical",isBoolean,defaults["false"]);def("ReturnStatement").bases("Statement").build("argument").field("argument",or(def("Expression"),null));def("ThrowStatement").bases("Statement").build("argument").field("argument",def("Expression"));def("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",def("BlockStatement")).field("handler",or(def("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[def("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[def("CatchClause")],defaults.emptyArray).field("finalizer",or(def("BlockStatement"),null),defaults["null"]);def("CatchClause").bases("Node").build("param","guard","body").field("param",def("Pattern")).field("guard",or(def("Expression"),null),defaults["null"]).field("body",def("BlockStatement"));def("WhileStatement").bases("Statement").build("test","body").field("test",def("Expression")).field("body",def("Statement"));def("DoWhileStatement").bases("Statement").build("body","test").field("body",def("Statement")).field("test",def("Expression"));def("ForStatement").bases("Statement").build("init","test","update","body").field("init",or(def("VariableDeclaration"),def("Expression"),null)).field("test",or(def("Expression"),null)).field("update",or(def("Expression"),null)).field("body",def("Statement"));def("ForInStatement").bases("Statement").build("left","right","body","each").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement")).field("each",isBoolean);def("DebuggerStatement").bases("Statement").build();def("Declaration").bases("Statement");def("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",def("Identifier"));def("FunctionExpression").bases("Function","Expression").build("id","params","body");def("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",or("var","let","const")).field("declarations",[or(def("VariableDeclarator"),def("Identifier"))]);def("VariableDeclarator").bases("Node").build("id","init").field("id",def("Pattern")).field("init",or(def("Expression"),null));def("Expression").bases("Node","Pattern");def("ThisExpression").bases("Expression").build();def("ArrayExpression").bases("Expression").build("elements").field("elements",[or(def("Expression"),null)]);def("ObjectExpression").bases("Expression").build("properties").field("properties",[def("Property")]);def("Property").bases("Node").build("kind","key","value").field("kind",or("init","get","set")).field("key",or(def("Literal"),def("Identifier"))).field("value",or(def("Expression"),def("Pattern")));def("SequenceExpression").bases("Expression").build("expressions").field("expressions",[def("Expression")]);var UnaryOperator=or("-","+","!","~","typeof","void","delete");def("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",UnaryOperator).field("argument",def("Expression")).field("prefix",isBoolean,defaults["true"]);var BinaryOperator=or("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");def("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",BinaryOperator).field("left",def("Expression")).field("right",def("Expression"));var AssignmentOperator=or("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");def("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",AssignmentOperator).field("left",def("Pattern")).field("right",def("Expression"));var UpdateOperator=or("++","--");def("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",UpdateOperator).field("argument",def("Expression")).field("prefix",isBoolean);var LogicalOperator=or("||","&&");def("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",LogicalOperator).field("left",def("Expression")).field("right",def("Expression"));def("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Expression")).field("alternate",def("Expression"));def("NewExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("CallExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("MemberExpression").bases("Expression").build("object","property","computed").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("Pattern").bases("Node");def("ObjectPattern").bases("Pattern").build("properties").field("properties",[or(def("PropertyPattern"),def("Property"))]);def("PropertyPattern").bases("Pattern").build("key","pattern").field("key",or(def("Literal"),def("Identifier"))).field("pattern",def("Pattern"));def("ArrayPattern").bases("Pattern").build("elements").field("elements",[or(def("Pattern"),null)]);def("SwitchCase").bases("Node").build("test","consequent").field("test",or(def("Expression"),null)).field("consequent",[def("Statement")]);def("Identifier").bases("Node","Expression","Pattern").build("name").field("name",isString);def("Literal").bases("Node","Expression").build("value").field("value",or(isString,isBoolean,null,isNumber,isRegExp)).field("regex",or({pattern:isString,flags:isString},null),function(){if(!isRegExp.check(this.value))return null;var flags="";if(this.value.ignoreCase)flags+="i";if(this.value.multiline)flags+="m";if(this.value.global)flags+="g";return{pattern:this.value.source,flags:flags}});def("Comment").bases("Printable").field("value",isString).field("leading",isBoolean,defaults["true"]).field("trailing",isBoolean,defaults["false"]);def("Block").bases("Comment").build("value","leading","trailing");def("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":199,"../lib/types":200}],189:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;def("XMLDefaultDeclaration").bases("Declaration").field("namespace",def("Expression"));def("XMLAnyName").bases("Expression");def("XMLQualifiedIdentifier").bases("Expression").field("left",or(def("Identifier"),def("XMLAnyName"))).field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLAttributeSelector").bases("Expression").field("attribute",def("Expression"));def("XMLFilterExpression").bases("Expression").field("left",def("Expression")).field("right",def("Expression"));def("XMLElement").bases("XML","Expression").field("contents",[def("XML")]);def("XMLList").bases("XML","Expression").field("contents",[def("XML")]);def("XML").bases("Node");def("XMLEscape").bases("XML").field("expression",def("Expression"));def("XMLText").bases("XML").field("text",isString);def("XMLStartTag").bases("XML").field("contents",[def("XML")]);def("XMLEndTag").bases("XML").field("contents",[def("XML")]);def("XMLPointTag").bases("XML").field("contents",[def("XML")]);def("XMLName").bases("XML").field("contents",or(isString,[def("XML")]));def("XMLAttribute").bases("XML").field("value",isString);def("XMLCdata").bases("XML").field("contents",isString);def("XMLComment").bases("XML").field("contents",isString);def("XMLProcessingInstruction").bases("XML").field("target",isString).field("contents",or(isString,null))},{"../lib/types":200,"./core":188}],190:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var isObject=builtin.object;var isString=builtin.string;var defaults=require("../lib/shared").defaults;def("Function").field("generator",isBoolean,defaults["false"]).field("expression",isBoolean,defaults["false"]).field("defaults",[or(def("Expression"),null)],defaults.emptyArray).field("rest",or(def("Identifier"),null),defaults["null"]);def("FunctionDeclaration").build("id","params","body","generator","expression");def("FunctionExpression").build("id","params","body","generator","expression");def("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,defaults["null"]).field("body",or(def("BlockStatement"),def("Expression"))).field("generator",false,defaults["false"]);def("YieldExpression").bases("Expression").build("argument","delegate").field("argument",or(def("Expression"),null)).field("delegate",isBoolean,defaults["false"]);def("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionBlock").bases("Node").build("left","right","each").field("left",def("Pattern")).field("right",def("Expression")).field("each",isBoolean);def("ModuleSpecifier").bases("Literal").build("value").field("value",isString);def("Property").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("method",isBoolean,defaults["false"]).field("shorthand",isBoolean,defaults["false"]).field("computed",isBoolean,defaults["false"]);def("PropertyPattern").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",or("init","get","set","")).field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("value",def("Function")).field("computed",isBoolean,defaults["false"]).field("static",isBoolean,defaults["false"]);def("SpreadElement").bases("Node").build("argument").field("argument",def("Expression"));def("ArrayExpression").field("elements",[or(def("Expression"),def("SpreadElement"),null)]);def("NewExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("CallExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("SpreadElementPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ArrayPattern").field("elements",[or(def("Pattern"),null,def("SpreadElement"))]);var ClassBodyElement=or(def("MethodDefinition"),def("VariableDeclarator"),def("ClassPropertyDefinition"),def("ClassProperty"));def("ClassProperty").bases("Declaration").build("key").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",ClassBodyElement);def("ClassBody").bases("Declaration").build("body").field("body",[ClassBodyElement]);def("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",or(def("Identifier"),null)).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]);def("ClassExpression").bases("Expression").build("id","body","superClass").field("id",or(def("Identifier"),null),defaults["null"]).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]).field("implements",[def("ClassImplements")],defaults.emptyArray);def("ClassImplements").bases("Node").build("id").field("id",def("Identifier")).field("superClass",or(def("Expression"),null),defaults["null"]);def("Specifier").bases("Node");def("NamedSpecifier").bases("Specifier").field("id",def("Identifier")).field("name",or(def("Identifier"),null),defaults["null"]);def("ExportSpecifier").bases("NamedSpecifier").build("id","name");def("ExportBatchSpecifier").bases("Specifier").build();def("ImportSpecifier").bases("NamedSpecifier").build("id","name");def("ImportNamespaceSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ImportDefaultSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",isBoolean).field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"),def("ExportBatchSpecifier"))],defaults.emptyArray).field("source",or(def("Literal"),def("ModuleSpecifier"),null),defaults["null"]);def("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[or(def("ImportSpecifier"),def("ImportNamespaceSpecifier"),def("ImportDefaultSpecifier"))],defaults.emptyArray).field("source",or(def("Literal"),def("ModuleSpecifier")));def("TaggedTemplateExpression").bases("Expression").field("tag",def("Expression")).field("quasi",def("TemplateLiteral"));def("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[def("TemplateElement")]).field("expressions",[def("Expression")]);def("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:isString,raw:isString}).field("tail",isBoolean)},{"../lib/shared":199,"../lib/types":200,"./core":188}],191:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("Function").field("async",isBoolean,defaults["false"]);def("SpreadProperty").bases("Node").build("argument").field("argument",def("Expression"));def("ObjectExpression").field("properties",[or(def("Property"),def("SpreadProperty"))]);def("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ObjectPattern").field("properties",[or(def("PropertyPattern"),def("SpreadPropertyPattern"),def("Property"),def("SpreadProperty"))]);def("AwaitExpression").bases("Expression").build("argument","all").field("argument",or(def("Expression"),null)).field("all",isBoolean,defaults["false"])},{"../lib/shared":199,"../lib/types":200,"./core":188}],192:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("JSXAttribute").bases("Node").build("name","value").field("name",or(def("JSXIdentifier"),def("JSXNamespacedName"))).field("value",or(def("Literal"),def("JSXExpressionContainer"),null),defaults["null"]);def("JSXIdentifier").bases("Identifier").build("name").field("name",isString);def("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",def("JSXIdentifier")).field("name",def("JSXIdentifier"));def("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",or(def("JSXIdentifier"),def("JSXMemberExpression"))).field("property",def("JSXIdentifier")).field("computed",isBoolean,defaults.false);var JSXElementName=or(def("JSXIdentifier"),def("JSXNamespacedName"),def("JSXMemberExpression"));def("JSXSpreadAttribute").bases("Node").build("argument").field("argument",def("Expression"));var JSXAttributes=[or(def("JSXAttribute"),def("JSXSpreadAttribute"))];def("JSXExpressionContainer").bases("Expression").build("expression").field("expression",def("Expression"));def("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",def("JSXOpeningElement")).field("closingElement",or(def("JSXClosingElement"),null),defaults["null"]).field("children",[or(def("JSXElement"),def("JSXExpressionContainer"),def("JSXText"),def("Literal"))],defaults.emptyArray).field("name",JSXElementName,function(){return this.openingElement.name}).field("selfClosing",isBoolean,function(){return this.openingElement.selfClosing}).field("attributes",JSXAttributes,function(){return this.openingElement.attributes});def("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",JSXElementName).field("attributes",JSXAttributes,defaults.emptyArray).field("selfClosing",isBoolean,defaults["false"]);def("JSXClosingElement").bases("Node").build("name").field("name",JSXElementName);def("JSXText").bases("Literal").build("value").field("value",isString);def("JSXEmptyExpression").bases("Expression").build();def("Type").bases("Node");def("AnyTypeAnnotation").bases("Type");def("VoidTypeAnnotation").bases("Type");def("NumberTypeAnnotation").bases("Type");def("StringTypeAnnotation").bases("Type");def("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",isString).field("raw",isString);def("BooleanTypeAnnotation").bases("Type");def("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",def("Type"));def("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",def("Type"));def("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[def("FunctionTypeParam")]).field("returnType",def("Type")).field("rest",or(def("FunctionTypeParam"),null)).field("typeParameters",or(def("TypeParameterDeclaration"),null));def("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",def("Identifier")).field("typeAnnotation",def("Type")).field("optional",isBoolean);def("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",def("Type"));def("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[def("ObjectTypeProperty")]).field("indexers",[def("ObjectTypeIndexer")],defaults.emptyArray).field("callProperties",[def("ObjectTypeCallProperty")],defaults.emptyArray);def("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",or(def("Literal"),def("Identifier"))).field("value",def("Type")).field("optional",isBoolean);def("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",def("Identifier")).field("key",def("Type")).field("value",def("Type"));def("ObjectTypeCallProperty").bases("Node").build("value").field("value",def("FunctionTypeAnnotation")).field("static",isBoolean,false);def("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("id",def("Identifier"));def("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("MemberTypeAnnotation").bases("Type").build("object","property").field("object",def("Identifier")).field("property",or(def("MemberTypeAnnotation"),def("GenericTypeAnnotation")));def("UnionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",def("Type"));def("Identifier").field("typeAnnotation",or(def("TypeAnnotation"),null),defaults["null"]);def("TypeParameterDeclaration").bases("Node").build("params").field("params",[def("Identifier")]);def("TypeParameterInstantiation").bases("Node").build("params").field("params",[def("Type")]);def("Function").field("returnType",or(def("TypeAnnotation"),null),defaults["null"]).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]);def("ClassProperty").build("key","typeAnnotation").field("typeAnnotation",def("TypeAnnotation")).field("static",isBoolean,false);def("ClassImplements").field("typeParameters",or(def("TypeParameterInstantiation"),null),defaults["null"]);def("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]).field("body",def("ObjectTypeAnnotation")).field("extends",[def("InterfaceExtends")]);def("InterfaceExtends").bases("Node").build("id").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null)).field("right",def("Type"));def("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",def("Expression")).field("typeAnnotation",def("TypeAnnotation"));def("TupleTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("DeclareVariable").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareFunction").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareClass").bases("InterfaceDeclaration").build("id");def("DeclareModule").bases("Statement").build("id","body").field("id",or(def("Identifier"),def("Literal"))).field("body",def("BlockStatement"))},{"../lib/shared":199,"../lib/types":200,"./core":188}],193:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var geq=require("../lib/shared").geq;def("Function").field("body",or(def("BlockStatement"),def("Expression")));def("ForOfStatement").bases("Statement").build("left","right","body").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement"));def("LetStatement").bases("Statement").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Statement"));def("LetExpression").bases("Expression").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Expression"));def("GraphExpression").bases("Expression").build("index","expression").field("index",geq(0)).field("expression",def("Literal"));def("GraphIndexExpression").bases("Expression").build("index").field("index",geq(0))},{"../lib/shared":199,"../lib/types":200,"./core":188}],194:[function(require,module,exports){var assert=require("assert");var types=require("../main");var getFieldNames=types.getFieldNames;var getFieldValue=types.getFieldValue;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isDate=types.builtInTypes.Date;var isRegExp=types.builtInTypes.RegExp;var hasOwn=Object.prototype.hasOwnProperty;function astNodesAreEquivalent(a,b,problemPath){if(isArray.check(problemPath)){problemPath.length=0}else{problemPath=null}return areEquivalent(a,b,problemPath); -}if(mustHaveId&&!node.id){newType=false}if(!newType){if(ignore){return false}else{throw new Error("cannot turn "+node.type+" to a statement")}}node.type=newType;return node}function toExpression(node){if(t.isExpressionStatement(node)){node=node.expression}if(t.isClass(node)){node.type="ClassExpression"}else if(t.isFunction(node)){node.type="FunctionExpression"}if(t.isExpression(node)){return node}else{throw new Error("cannot turn "+node.type+" to an expression")}}function toBlock(node,parent){if(t.isBlockStatement(node)){return node}if(t.isEmptyStatement(node)){node=[]}if(!Array.isArray(node)){if(!t.isStatement(node)){if(t.isFunction(parent)){node=t.returnStatement(node)}else{node=t.expressionStatement(node)}}node=[node]}return t.blockStatement(node)}function valueToNode(value){if(value===undefined){return t.identifier("undefined")}if(value===true||value===false||value===null||isString(value)||isNumber(value)||isRegExp(value)){return t.literal(value)}if(Array.isArray(value)){return t.arrayExpression(value.map(t.valueToNode))}if(isPlainObject(value)){var props=[];for(var key in value){var nodeKey;if(t.isValidIdentifier(key)){nodeKey=t.identifier(key)}else{nodeKey=t.literal(key)}props.push(t.property("init",nodeKey,t.valueToNode(value[key])))}return t.objectExpression(props)}throw new Error("don't know how to turn this value into a node")}},{"../traversal":144,"./index":153,"lodash/collection/each":316,"lodash/lang/isNumber":397,"lodash/lang/isPlainObject":399,"lodash/lang/isRegExp":400,"lodash/lang/isString":401}],153:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.is=is;exports.isType=isType;exports.shallowEqual=shallowEqual;exports.appendToMemberExpression=appendToMemberExpression;exports.prependToMemberExpression=prependToMemberExpression;exports.ensureBlock=ensureBlock;exports.clone=clone;exports.cloneDeep=cloneDeep;exports.buildMatchMemberExpression=buildMatchMemberExpression;exports.removeComments=removeComments;exports.inheritsComments=inheritsComments;exports.inherits=inherits;exports.__esModule=true;var toFastProperties=_interopRequire(require("to-fast-properties"));var compact=_interopRequire(require("lodash/array/compact"));var assign=_interopRequire(require("lodash/object/assign"));var each=_interopRequire(require("lodash/collection/each"));var uniq=_interopRequire(require("lodash/array/uniq"));var t=exports;function registerType(type,skipAliasCheck){var is=t["is"+type]=function(node,opts){return t.is(type,node,opts,skipAliasCheck)};t["assert"+type]=function(node,opts){if(!opts)opts={};if(!is(node,opts)){throw new Error("Expected type "+JSON.stringify(type)+" with option "+JSON.stringify(opts))}}}var STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"];exports.STATEMENT_OR_BLOCK_KEYS=STATEMENT_OR_BLOCK_KEYS;var NATIVE_TYPE_NAMES=["Array","Object","Number","Boolean","Date","Array","String","Promise","Set","Map","WeakMap","WeakSet","Uint16Array","ArrayBuffer","DataView","Int8Array","Uint8Array","Uint8ClampedArray","Uint32Array","Int32Array","Float32Array","Int16Array","Float64Array"];exports.NATIVE_TYPE_NAMES=NATIVE_TYPE_NAMES;var FLATTENABLE_KEYS=["body","expressions"];exports.FLATTENABLE_KEYS=FLATTENABLE_KEYS;var FOR_INIT_KEYS=["left","init"];exports.FOR_INIT_KEYS=FOR_INIT_KEYS;var COMMENT_KEYS=["leadingComments","trailingComments"];exports.COMMENT_KEYS=COMMENT_KEYS;var VISITOR_KEYS=require("./visitor-keys");exports.VISITOR_KEYS=VISITOR_KEYS;var BUILDER_KEYS=require("./builder-keys");exports.BUILDER_KEYS=BUILDER_KEYS;var ALIAS_KEYS=require("./alias-keys");exports.ALIAS_KEYS=ALIAS_KEYS;t.FLIPPED_ALIAS_KEYS={};each(t.VISITOR_KEYS,function(keys,type){registerType(type,true)});each(t.ALIAS_KEYS,function(aliases,type){each(aliases,function(alias){var _t$FLIPPED_ALIAS_KEYS,_alias;var types=(_t$FLIPPED_ALIAS_KEYS=t.FLIPPED_ALIAS_KEYS,_alias=alias,!_t$FLIPPED_ALIAS_KEYS[_alias]&&(_t$FLIPPED_ALIAS_KEYS[_alias]=[]),_t$FLIPPED_ALIAS_KEYS[_alias]);types.push(type)})});each(t.FLIPPED_ALIAS_KEYS,function(types,type){t[type.toUpperCase()+"_TYPES"]=types;registerType(type,false)});var TYPES=Object.keys(t.VISITOR_KEYS).concat(Object.keys(t.FLIPPED_ALIAS_KEYS));exports.TYPES=TYPES;function is(type,node,opts,skipAliasCheck){if(!node)return false;var matches=isType(node.type,type);if(!matches)return false;if(typeof opts==="undefined"){return true}else{return t.shallowEqual(node,opts)}}function isType(nodeType,targetType){if(nodeType===targetType)return true;var aliases=t.FLIPPED_ALIAS_KEYS[targetType];if(aliases)return aliases.indexOf(nodeType)>-1;return false}each(t.VISITOR_KEYS,function(keys,type){if(t.BUILDER_KEYS[type])return;var defs={};each(keys,function(key){defs[key]=null});t.BUILDER_KEYS[type]=defs});each(t.BUILDER_KEYS,function(keys,type){t[type[0].toLowerCase()+type.slice(1)]=function(){var node={};node.start=null;node.type=type;var i=0;for(var key in keys){var arg=arguments[i++];if(arg===undefined)arg=keys[key];node[key]=arg}return node}});function shallowEqual(actual,expected){var keys=Object.keys(expected);for(var i=0;iparts.length){return false}}return true}}function removeComments(child){each(COMMENT_KEYS,function(key){delete child[key]});return child}function inheritsComments(child,parent){if(child&&parent){each(COMMENT_KEYS,function(key){child[key]=uniq(compact([].concat(child[key],parent[key])))})}return child}function inherits(child,parent){if(!child||!parent)return child;child._declarations=parent._declarations;child._scopeInfo=parent._scopeInfo;child.range=parent.range;child.start=parent.start;child.loc=parent.loc;child.end=parent.end;child.typeAnnotation=parent.typeAnnotation;child.returnType=parent.returnType;t.inheritsComments(child,parent);return child}toFastProperties(t);toFastProperties(t.VISITOR_KEYS);exports.__esModule=true;assign(t,require("./retrievers"));assign(t,require("./validators"));assign(t,require("./converters"))},{"./alias-keys":150,"./builder-keys":151,"./converters":152,"./retrievers":154,"./validators":155,"./visitor-keys":156,"lodash/array/compact":310,"lodash/array/uniq":314,"lodash/collection/each":316,"lodash/object/assign":404,"to-fast-properties":452}],154:[function(require,module,exports){"use strict";var _interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj};exports.getBindingIdentifiers=getBindingIdentifiers;exports.getLastStatements=getLastStatements;exports.__esModule=true;var object=_interopRequire(require("../helpers/object"));var t=_interopRequireWildcard(require("./index"));function getBindingIdentifiers(node){var search=[].concat(node);var ids=object();while(search.length){var id=search.shift();if(!id)continue;var keys=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){ids[id.name]=id}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(keys){for(var i=0;i1)return ast.body;var node=ast.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}}function parseTemplate(loc,code){var ast=parse({filename:loc,looseModules:true},code).program;ast=traverse.removeProperties(ast);return ast}function loadTemplates(){var templates={};var templatesLoc=path.join(__dirname,"transformation/templates");if(!fs.existsSync(templatesLoc)){throw new ReferenceError(messages.get("missingTemplatesDirectory"))}each(fs.readdirSync(templatesLoc),function(name){if(name[0]===".")return;var key=path.basename(name,path.extname(name));var loc=path.join(templatesLoc,name);var code=fs.readFileSync(loc,"utf8");templates[key]=parseTemplate(loc,code)});return templates}try{exports.templates=require("../../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}}).call(this,require("_process"),"/lib/babel")},{"../../templates.json":455,"./helpers/parse":42,"./messages":43,"./patch":44,"./traversal":144,"./types":153,_process:183,"debug/node":293,fs:172,"lodash/collection/contains":315,"lodash/collection/each":316,"lodash/lang/cloneDeep":390,"lodash/lang/isBoolean":393,"lodash/lang/isEmpty":394,"lodash/lang/isRegExp":400,"lodash/lang/isString":401,"lodash/object/has":407,"lodash/string/escapeRegExp":412,minimatch:416,module:172,path:182,util:199}],158:[function(require,module,exports){var types=require("../lib/types");var Type=types.Type;var def=Type.def;var or=Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var isRegExp=builtin.RegExp;var shared=require("../lib/shared");var defaults=shared.defaults;var geq=shared.geq;def("Printable").field("loc",or(def("SourceLocation"),null),defaults["null"],true);def("Node").bases("Printable").field("type",isString).field("comments",or([def("Comment")],null),defaults["null"],true);def("SourceLocation").build("start","end","source").field("start",def("Position")).field("end",def("Position")).field("source",or(isString,null),defaults["null"]);def("Position").build("line","column").field("line",geq(1)).field("column",geq(0));def("Program").bases("Node").build("body").field("body",[def("Statement")]);def("Function").bases("Node").field("id",or(def("Identifier"),null),defaults["null"]).field("params",[def("Pattern")]).field("body",def("BlockStatement"));def("Statement").bases("Node");def("EmptyStatement").bases("Statement").build();def("BlockStatement").bases("Statement").build("body").field("body",[def("Statement")]);def("ExpressionStatement").bases("Statement").build("expression").field("expression",def("Expression"));def("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Statement")).field("alternate",or(def("Statement"),null),defaults["null"]);def("LabeledStatement").bases("Statement").build("label","body").field("label",def("Identifier")).field("body",def("Statement"));def("BreakStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("ContinueStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("WithStatement").bases("Statement").build("object","body").field("object",def("Expression")).field("body",def("Statement"));def("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",def("Expression")).field("cases",[def("SwitchCase")]).field("lexical",isBoolean,defaults["false"]);def("ReturnStatement").bases("Statement").build("argument").field("argument",or(def("Expression"),null));def("ThrowStatement").bases("Statement").build("argument").field("argument",def("Expression"));def("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",def("BlockStatement")).field("handler",or(def("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[def("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[def("CatchClause")],defaults.emptyArray).field("finalizer",or(def("BlockStatement"),null),defaults["null"]);def("CatchClause").bases("Node").build("param","guard","body").field("param",def("Pattern")).field("guard",or(def("Expression"),null),defaults["null"]).field("body",def("BlockStatement"));def("WhileStatement").bases("Statement").build("test","body").field("test",def("Expression")).field("body",def("Statement"));def("DoWhileStatement").bases("Statement").build("body","test").field("body",def("Statement")).field("test",def("Expression"));def("ForStatement").bases("Statement").build("init","test","update","body").field("init",or(def("VariableDeclaration"),def("Expression"),null)).field("test",or(def("Expression"),null)).field("update",or(def("Expression"),null)).field("body",def("Statement"));def("ForInStatement").bases("Statement").build("left","right","body","each").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement")).field("each",isBoolean);def("DebuggerStatement").bases("Statement").build();def("Declaration").bases("Statement");def("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",def("Identifier"));def("FunctionExpression").bases("Function","Expression").build("id","params","body");def("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",or("var","let","const")).field("declarations",[or(def("VariableDeclarator"),def("Identifier"))]);def("VariableDeclarator").bases("Node").build("id","init").field("id",def("Pattern")).field("init",or(def("Expression"),null));def("Expression").bases("Node","Pattern");def("ThisExpression").bases("Expression").build();def("ArrayExpression").bases("Expression").build("elements").field("elements",[or(def("Expression"),null)]);def("ObjectExpression").bases("Expression").build("properties").field("properties",[def("Property")]);def("Property").bases("Node").build("kind","key","value").field("kind",or("init","get","set")).field("key",or(def("Literal"),def("Identifier"))).field("value",or(def("Expression"),def("Pattern")));def("SequenceExpression").bases("Expression").build("expressions").field("expressions",[def("Expression")]);var UnaryOperator=or("-","+","!","~","typeof","void","delete");def("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",UnaryOperator).field("argument",def("Expression")).field("prefix",isBoolean,defaults["true"]);var BinaryOperator=or("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");def("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",BinaryOperator).field("left",def("Expression")).field("right",def("Expression"));var AssignmentOperator=or("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");def("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",AssignmentOperator).field("left",def("Pattern")).field("right",def("Expression"));var UpdateOperator=or("++","--");def("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",UpdateOperator).field("argument",def("Expression")).field("prefix",isBoolean);var LogicalOperator=or("||","&&");def("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",LogicalOperator).field("left",def("Expression")).field("right",def("Expression"));def("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Expression")).field("alternate",def("Expression"));def("NewExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("CallExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("MemberExpression").bases("Expression").build("object","property","computed").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("Pattern").bases("Node");def("ObjectPattern").bases("Pattern").build("properties").field("properties",[or(def("PropertyPattern"),def("Property"))]);def("PropertyPattern").bases("Pattern").build("key","pattern").field("key",or(def("Literal"),def("Identifier"))).field("pattern",def("Pattern"));def("ArrayPattern").bases("Pattern").build("elements").field("elements",[or(def("Pattern"),null)]);def("SwitchCase").bases("Node").build("test","consequent").field("test",or(def("Expression"),null)).field("consequent",[def("Statement")]);def("Identifier").bases("Node","Expression","Pattern").build("name").field("name",isString);def("Literal").bases("Node","Expression").build("value").field("value",or(isString,isBoolean,null,isNumber,isRegExp));def("Comment").bases("Printable").field("value",isString).field("leading",isBoolean,defaults["true"]).field("trailing",isBoolean,defaults["false"]);def("Block").bases("Comment").build("value","leading","trailing");def("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":169,"../lib/types":170}],159:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;def("XMLDefaultDeclaration").bases("Declaration").field("namespace",def("Expression"));def("XMLAnyName").bases("Expression");def("XMLQualifiedIdentifier").bases("Expression").field("left",or(def("Identifier"),def("XMLAnyName"))).field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLAttributeSelector").bases("Expression").field("attribute",def("Expression"));def("XMLFilterExpression").bases("Expression").field("left",def("Expression")).field("right",def("Expression"));def("XMLElement").bases("XML","Expression").field("contents",[def("XML")]);def("XMLList").bases("XML","Expression").field("contents",[def("XML")]);def("XML").bases("Node");def("XMLEscape").bases("XML").field("expression",def("Expression"));def("XMLText").bases("XML").field("text",isString);def("XMLStartTag").bases("XML").field("contents",[def("XML")]);def("XMLEndTag").bases("XML").field("contents",[def("XML")]);def("XMLPointTag").bases("XML").field("contents",[def("XML")]);def("XMLName").bases("XML").field("contents",or(isString,[def("XML")]));def("XMLAttribute").bases("XML").field("value",isString);def("XMLCdata").bases("XML").field("contents",isString);def("XMLComment").bases("XML").field("contents",isString);def("XMLProcessingInstruction").bases("XML").field("target",isString).field("contents",or(isString,null))},{"../lib/types":170,"./core":158}],160:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes; +}astNodesAreEquivalent.assert=function(a,b){var problemPath=[];if(!astNodesAreEquivalent(a,b,problemPath)){if(problemPath.length===0){assert.strictEqual(a,b)}else{assert.ok(false,"Nodes differ in the following path: "+problemPath.map(subscriptForProperty).join(""))}}};function subscriptForProperty(property){if(/[_$a-z][_$a-z0-9]*/i.test(property)){return"."+property}return"["+JSON.stringify(property)+"]"}function areEquivalent(a,b,problemPath){if(a===b){return true}if(isArray.check(a)){return arraysAreEquivalent(a,b,problemPath)}if(isObject.check(a)){return objectsAreEquivalent(a,b,problemPath)}if(isDate.check(a)){return isDate.check(b)&&+a===+b}if(isRegExp.check(a)){return isRegExp.check(b)&&(a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.ignoreCase===b.ignoreCase)}return a==b}function arraysAreEquivalent(a,b,problemPath){isArray.assert(a);var aLength=a.length;if(!isArray.check(b)||b.length!==aLength){if(problemPath){problemPath.push("length")}return false}for(var i=0;inp){return true}if(pp===np&&this.name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&this.name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&parent.callee===node;case"ConditionalExpression":return this.name==="test"&&parent.test===node;case"MemberExpression":return this.name==="object"&&parent.object===node;default:return false}default:if(parent.type==="NewExpression"&&this.name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}NPp.canBeFirstInStatement=function(){var node=this.node;return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};NPp.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(path){for(var node,parent;path.parent;path=path.parent){node=path.node;parent=path.parent.node;if(n.BlockStatement.check(parent)&&path.parent.name==="body"&&path.name===0){assert.strictEqual(parent.body[0],node);return true}if(n.ExpressionStatement.check(parent)&&path.name==="expression"){assert.strictEqual(parent.expression,node);return true}if(n.SequenceExpression.check(parent)&&path.parent.name==="expressions"&&path.name===0){assert.strictEqual(parent.expressions[0],node);continue}if(n.CallExpression.check(parent)&&path.name==="callee"){assert.strictEqual(parent.callee,node);continue}if(n.MemberExpression.check(parent)&&path.name==="object"){assert.strictEqual(parent.object,node);continue}if(n.ConditionalExpression.check(parent)&&path.name==="test"){assert.strictEqual(parent.test,node);continue}if(isBinary(parent)&&path.name==="left"){assert.strictEqual(parent.left,node);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&path.name==="argument"){assert.strictEqual(parent.argument,node);continue}return false}return true}function cleanUpNodesAfterPrune(remainingNodePath){if(n.VariableDeclaration.check(remainingNodePath.node)){var declarations=remainingNodePath.get("declarations").value;if(!declarations||declarations.length===0){return remainingNodePath.prune()}}else if(n.ExpressionStatement.check(remainingNodePath.node)){if(!remainingNodePath.get("expression").value){return remainingNodePath.prune()}}else if(n.IfStatement.check(remainingNodePath.node)){cleanUpIfStatementAfterPrune(remainingNodePath)}return remainingNodePath}function cleanUpIfStatementAfterPrune(ifStatement){var testExpression=ifStatement.get("test").value;var alternate=ifStatement.get("alternate").value;var consequent=ifStatement.get("consequent").value;if(!consequent&&!alternate){var testExpressionStatement=b.expressionStatement(testExpression);ifStatement.replace(testExpressionStatement)}else if(!consequent&&alternate){var negatedTestExpression=b.unaryExpression("!",testExpression,true);if(n.UnaryExpression.check(testExpression)&&testExpression.operator==="!"){negatedTestExpression=testExpression.argument}ifStatement.get("test").replace(negatedTestExpression);ifStatement.get("consequent").replace(alternate);ifStatement.get("alternate").replace()}}module.exports=NodePath},{"./path":197,"./scope":198,"./types":200,assert:203,util:229}],196:[function(require,module,exports){var assert=require("assert");var types=require("./types");var NodePath=require("./node-path");var Printable=types.namedTypes.Printable;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isFunction=types.builtInTypes.function;var hasOwn=Object.prototype.hasOwnProperty;var undefined;function PathVisitor(){assert.ok(this instanceof PathVisitor);this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this._shouldVisitComments=hasOwn.call(this._methodNameTable,"Block")||hasOwn.call(this._methodNameTable,"Line");this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false}function computeMethodNameTable(visitor){var typeNames=Object.create(null);for(var methodName in visitor){if(/^visit[A-Z]/.test(methodName)){typeNames[methodName.slice("visit".length)]=true}}var supertypeTable=types.computeSupertypeLookupTable(typeNames);var methodNameTable=Object.create(null);var typeNames=Object.keys(supertypeTable);var typeNameCount=typeNames.length;for(var i=0;i=0){parentCache[path.name=i]=path}}else{parentValue[path.name]=path.value;parentCache[path.name]=path}assert.strictEqual(parentValue[path.name],path.value);assert.strictEqual(path.parentPath.get(path.name),path);return path}Pp.replace=function replace(replacement){var results=[];var parentValue=this.parentPath.value;var parentCache=getChildCache(this.parentPath);var count=arguments.length;repairRelationshipWithParent(this);if(isArray.check(parentValue)){var originalLength=parentValue.length;var move=getMoves(this.parentPath,count-1,this.name+1);var spliceArgs=[this.name,1];for(var i=0;i=than},isNumber+" >= "+than)};exports.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return false},"true":function(){return true},undefined:function(){}};var naiveIsPrimitive=Type.or(builtin.string,builtin.number,builtin.boolean,builtin.null,builtin.undefined);exports.isPrimitive=new Type(function(value){if(value===null)return true;var type=typeof value;return!(type==="object"||type==="function")},naiveIsPrimitive.toString())},{"../lib/types":200}],200:[function(require,module,exports){var assert=require("assert");var Ap=Array.prototype;var slice=Ap.slice;var map=Ap.map;var each=Ap.forEach;var Op=Object.prototype;var objToStr=Op.toString;var funObjStr=objToStr.call(function(){});var strObjStr=objToStr.call("");var hasOwn=Op.hasOwnProperty;function Type(check,name){var self=this;assert.ok(self instanceof Type,self);assert.strictEqual(objToStr.call(check),funObjStr,check+" is not a function");var nameObjStr=objToStr.call(name);assert.ok(nameObjStr===funObjStr||nameObjStr===strObjStr,name+" is neither a function nor a string");Object.defineProperties(self,{name:{value:name},check:{value:function(value,deep){var result=check.call(self,value,deep);if(!result&&deep&&objToStr.call(deep)===funObjStr)deep(self,value);return result}}})}var Tp=Type.prototype;exports.Type=Type;Tp.assert=function(value,deep){if(!this.check(value,deep)){var str=shallowStringify(value);assert.ok(false,str+" does not match type "+this);return false}return true};function shallowStringify(value){if(isObject.check(value))return"{"+Object.keys(value).map(function(key){return key+": "+value[key]}).join(", ")+"}";if(isArray.check(value))return"["+value.map(shallowStringify).join(", ")+"]";return JSON.stringify(value)}Tp.toString=function(){var name=this.name;if(isString.check(name))return name;if(isFunction.check(name))return name.call(this)+"";return name+" type"};var builtInTypes={};exports.builtInTypes=builtInTypes;function defBuiltInType(example,name){var objStr=objToStr.call(example);Object.defineProperty(builtInTypes,name,{enumerable:true,value:new Type(function(value){return objToStr.call(value)===objStr},name)});return builtInTypes[name]}var isString=defBuiltInType("","string");var isFunction=defBuiltInType(function(){},"function");var isArray=defBuiltInType([],"array");var isObject=defBuiltInType({},"object");var isRegExp=defBuiltInType(/./,"RegExp");var isDate=defBuiltInType(new Date,"Date");var isNumber=defBuiltInType(3,"number");var isBoolean=defBuiltInType(true,"boolean");var isNull=defBuiltInType(null,"null");var isUndefined=defBuiltInType(void 0,"undefined");function toType(from,name){if(from instanceof Type)return from;if(from instanceof Def)return from.type;if(isArray.check(from))return Type.fromArray(from);if(isObject.check(from))return Type.fromObject(from);if(isFunction.check(from))return new Type(from,name);return new Type(function(value){return value===from},isUndefined.check(name)?function(){return from+""}:name)}Type.or=function(){var types=[];var len=arguments.length;for(var i=0;i=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};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=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};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}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,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/":229}],204:[function(require,module,exports){arguments[4][202][0].apply(exports,arguments)},{dup:202}],205:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var kMaxLength=1073741823;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return arr.foo()===42&&typeof arr.subarray==="function"&&new Uint8Array(1).subarray(1,1).byteLength===0}catch(e){return false}}();function Buffer(subject,encoding){var self=this;if(!(self instanceof Buffer))return new Buffer(subject,encoding);var type=typeof subject;var length;if(type==="number"){length=+subject}else if(type==="string"){length=Buffer.byteLength(subject,encoding)}else if(type==="object"&&subject!==null){if(subject.type==="Buffer"&&isArray(subject.data))subject=subject.data;length=+subject.length}else{throw new TypeError("must start with number, buffer, array or string")}if(length>kMaxLength){throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength.toString(16)+" bytes")}if(length<0)length=0;else length>>>=0;if(Buffer.TYPED_ARRAY_SUPPORT){self=Buffer._augment(new Uint8Array(length))}else{self.length=length;self._isBuffer=true}var i;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof subject.byteLength==="number"){self._set(subject)}else if(isArrayish(subject)){if(Buffer.isBuffer(subject)){for(i=0;i0&&length<=Buffer.poolSize)self.parent=rootParent;return self}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;break;case"utf8":case"utf-8":ret=utf8ToBytes(str).length;break;case"base64":ret=base64ToBytes(str).length;break;default:ret=str.length}return ret};Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined;Buffer.prototype.toString=function toString(encoding,start,end){var loweredCase=false;start=start>>>0;end=end===undefined||end===Infinity?this.length:end>>>0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val)){return arrayIndexOf(this,val,byteOffset)}if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,val,byteOffset)}return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;for(var i=0;byteOffset+iremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;ithis.length){throw new RangeError("attempt to write outside buffer bounds")}var remaining=this.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}encoding=String(encoding||"utf8").toLowerCase();var ret;switch(encoding){case"hex":ret=hexWrite(this,string,offset,length);break;case"utf8":case"utf-8":ret=utf8Write(this,string,offset,length);break;case"ascii":ret=asciiWrite(this,string,offset,length);break;case"binary":ret=binaryWrite(this,string,offset,length);break;case"base64":ret=base64Write(this,string,offset,length);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=utf16leWrite(this,string,offset,length);break;default:throw new TypeError("Unknown encoding: "+encoding)}return ret};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end);for(var i=start;ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||valuebuf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i>>0&255}return offset+byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul>>>0&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value; -var isBoolean=builtin.boolean;var isObject=builtin.object;var isString=builtin.string;var defaults=require("../lib/shared").defaults;def("Function").field("generator",isBoolean,defaults["false"]).field("expression",isBoolean,defaults["false"]).field("defaults",[or(def("Expression"),null)],defaults.emptyArray).field("rest",or(def("Identifier"),null),defaults["null"]);def("FunctionDeclaration").build("id","params","body","generator","expression");def("FunctionExpression").build("id","params","body","generator","expression");def("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,defaults["null"]).field("body",or(def("BlockStatement"),def("Expression"))).field("generator",false,defaults["false"]);def("YieldExpression").bases("Expression").build("argument","delegate").field("argument",or(def("Expression"),null)).field("delegate",isBoolean,defaults["false"]);def("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionBlock").bases("Node").build("left","right","each").field("left",def("Pattern")).field("right",def("Expression")).field("each",isBoolean);def("ModuleSpecifier").bases("Literal").build("value").field("value",isString);def("Property").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("method",isBoolean,defaults["false"]).field("shorthand",isBoolean,defaults["false"]).field("computed",isBoolean,defaults["false"]);def("PropertyPattern").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",or("init","get","set","")).field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("value",def("Function")).field("computed",isBoolean,defaults["false"]).field("static",isBoolean,defaults["false"]);def("SpreadElement").bases("Node").build("argument").field("argument",def("Expression"));def("ArrayExpression").field("elements",[or(def("Expression"),def("SpreadElement"),null)]);def("NewExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("CallExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("SpreadElementPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ArrayPattern").field("elements",[or(def("Pattern"),null,def("SpreadElement"))]);var ClassBodyElement=or(def("MethodDefinition"),def("VariableDeclarator"),def("ClassPropertyDefinition"),def("ClassProperty"));def("ClassProperty").bases("Declaration").build("key").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",ClassBodyElement);def("ClassBody").bases("Declaration").build("body").field("body",[ClassBodyElement]);def("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",or(def("Identifier"),null)).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]);def("ClassExpression").bases("Expression").build("id","body","superClass").field("id",or(def("Identifier"),null),defaults["null"]).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]).field("implements",[def("ClassImplements")],defaults.emptyArray);def("ClassImplements").bases("Node").build("id").field("id",def("Identifier")).field("superClass",or(def("Expression"),null),defaults["null"]);def("Specifier").bases("Node");def("NamedSpecifier").bases("Specifier").field("id",def("Identifier")).field("name",or(def("Identifier"),null),defaults["null"]);def("ExportSpecifier").bases("NamedSpecifier").build("id","name");def("ExportBatchSpecifier").bases("Specifier").build();def("ImportSpecifier").bases("NamedSpecifier").build("id","name");def("ImportNamespaceSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ImportDefaultSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",isBoolean).field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"),def("ExportBatchSpecifier"))],defaults.emptyArray).field("source",or(def("ModuleSpecifier"),null),defaults["null"]);def("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[or(def("ImportSpecifier"),def("ImportNamespaceSpecifier"),def("ImportDefaultSpecifier"))],defaults.emptyArray).field("source",def("ModuleSpecifier"));def("TaggedTemplateExpression").bases("Expression").field("tag",def("Expression")).field("quasi",def("TemplateLiteral"));def("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[def("TemplateElement")]).field("expressions",[def("Expression")]);def("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:isString,raw:isString}).field("tail",isBoolean)},{"../lib/shared":169,"../lib/types":170,"./core":158}],161:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("Function").field("async",isBoolean,defaults["false"]);def("SpreadProperty").bases("Node").build("argument").field("argument",def("Expression"));def("ObjectExpression").field("properties",[or(def("Property"),def("SpreadProperty"))]);def("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ObjectPattern").field("properties",[or(def("PropertyPattern"),def("SpreadPropertyPattern"),def("Property"),def("SpreadProperty"))]);def("AwaitExpression").bases("Expression").build("argument","all").field("argument",or(def("Expression"),null)).field("all",isBoolean,defaults["false"])},{"../lib/shared":169,"../lib/types":170,"./core":158}],162:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("JSXAttribute").bases("Node").build("name","value").field("name",or(def("JSXIdentifier"),def("JSXNamespacedName"))).field("value",or(def("Literal"),def("JSXExpressionContainer"),null),defaults["null"]);def("JSXIdentifier").bases("Identifier").build("name").field("name",isString);def("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",def("JSXIdentifier")).field("name",def("JSXIdentifier"));def("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",or(def("JSXIdentifier"),def("JSXMemberExpression"))).field("property",def("JSXIdentifier")).field("computed",isBoolean,defaults.false);var JSXElementName=or(def("JSXIdentifier"),def("JSXNamespacedName"),def("JSXMemberExpression"));def("JSXSpreadAttribute").bases("Node").build("argument").field("argument",def("Expression"));var JSXAttributes=[or(def("JSXAttribute"),def("JSXSpreadAttribute"))];def("JSXExpressionContainer").bases("Expression").build("expression").field("expression",def("Expression"));def("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",def("JSXOpeningElement")).field("closingElement",or(def("JSXClosingElement"),null),defaults["null"]).field("children",[or(def("JSXElement"),def("JSXExpressionContainer"),def("JSXText"),def("Literal"))],defaults.emptyArray).field("name",JSXElementName,function(){return this.openingElement.name}).field("selfClosing",isBoolean,function(){return this.openingElement.selfClosing}).field("attributes",JSXAttributes,function(){return this.openingElement.attributes});def("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",JSXElementName).field("attributes",JSXAttributes,defaults.emptyArray).field("selfClosing",isBoolean,defaults["false"]);def("JSXClosingElement").bases("Node").build("name").field("name",JSXElementName);def("JSXText").bases("Literal").build("value").field("value",isString);def("JSXEmptyExpression").bases("Expression").build();def("Type").bases("Node");def("AnyTypeAnnotation").bases("Type");def("VoidTypeAnnotation").bases("Type");def("NumberTypeAnnotation").bases("Type");def("StringTypeAnnotation").bases("Type");def("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",isString).field("raw",isString);def("BooleanTypeAnnotation").bases("Type");def("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",def("Type"));def("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",def("Type"));def("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[def("FunctionTypeParam")]).field("returnType",def("Type")).field("rest",or(def("FunctionTypeParam"),null)).field("typeParameters",or(def("TypeParameterDeclaration"),null));def("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",def("Identifier")).field("typeAnnotation",def("Type")).field("optional",isBoolean);def("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",def("Type"));def("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[def("ObjectTypeProperty")]).field("indexers",[def("ObjectTypeIndexer")],defaults.emptyArray).field("callProperties",[def("ObjectTypeCallProperty")],defaults.emptyArray);def("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",or(def("Literal"),def("Identifier"))).field("value",def("Type")).field("optional",isBoolean);def("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",def("Identifier")).field("key",def("Type")).field("value",def("Type"));def("ObjectTypeCallProperty").bases("Node").build("value").field("value",def("FunctionTypeAnnotation")).field("static",isBoolean,false);def("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("id",def("Identifier"));def("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("MemberTypeAnnotation").bases("Type").build("object","property").field("object",def("Identifier")).field("property",or(def("MemberTypeAnnotation"),def("GenericTypeAnnotation")));def("UnionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",def("Type"));def("Identifier").field("typeAnnotation",or(def("TypeAnnotation"),null),defaults["null"]);def("TypeParameterDeclaration").bases("Node").build("params").field("params",[def("Identifier")]);def("TypeParameterInstantiation").bases("Node").build("params").field("params",[def("Type")]);def("Function").field("returnType",or(def("TypeAnnotation"),null),defaults["null"]).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]);def("ClassProperty").build("key","typeAnnotation").field("typeAnnotation",def("TypeAnnotation")).field("static",isBoolean,false);def("ClassImplements").field("typeParameters",or(def("TypeParameterInstantiation"),null),defaults["null"]);def("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]).field("body",def("ObjectTypeAnnotation")).field("extends",[def("InterfaceExtends")]);def("InterfaceExtends").bases("Node").build("id").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null)).field("right",def("Type"));def("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",def("Expression")).field("typeAnnotation",def("TypeAnnotation"));def("TupleTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("DeclareVariable").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareFunction").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareClass").bases("InterfaceDeclaration").build("id");def("DeclareModule").bases("Statement").build("id","body").field("id",or(def("Identifier"),def("Literal"))).field("body",def("BlockStatement"))},{"../lib/shared":169,"../lib/types":170,"./core":158}],163:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var geq=require("../lib/shared").geq;def("Function").field("body",or(def("BlockStatement"),def("Expression")));def("ForOfStatement").bases("Statement").build("left","right","body").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement"));def("LetStatement").bases("Statement").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Statement"));def("LetExpression").bases("Expression").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Expression"));def("GraphExpression").bases("Expression").build("index","expression").field("index",geq(0)).field("expression",def("Literal"));def("GraphIndexExpression").bases("Expression").build("index").field("index",geq(0))},{"../lib/shared":169,"../lib/types":170,"./core":158}],164:[function(require,module,exports){var assert=require("assert");var types=require("../main");var getFieldNames=types.getFieldNames;var getFieldValue=types.getFieldValue;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isDate=types.builtInTypes.Date;var isRegExp=types.builtInTypes.RegExp;var hasOwn=Object.prototype.hasOwnProperty;function astNodesAreEquivalent(a,b,problemPath){if(isArray.check(problemPath)){problemPath.length=0}else{problemPath=null}return areEquivalent(a,b,problemPath)}astNodesAreEquivalent.assert=function(a,b){var problemPath=[];if(!astNodesAreEquivalent(a,b,problemPath)){if(problemPath.length===0){assert.strictEqual(a,b)}else{assert.ok(false,"Nodes differ in the following path: "+problemPath.map(subscriptForProperty).join(""))}}};function subscriptForProperty(property){if(/[_$a-z][_$a-z0-9]*/i.test(property)){return"."+property}return"["+JSON.stringify(property)+"]"}function areEquivalent(a,b,problemPath){if(a===b){return true}if(isArray.check(a)){return arraysAreEquivalent(a,b,problemPath)}if(isObject.check(a)){return objectsAreEquivalent(a,b,problemPath)}if(isDate.check(a)){return isDate.check(b)&&+a===+b}if(isRegExp.check(a)){return isRegExp.check(b)&&(a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.ignoreCase===b.ignoreCase)}return a==b}function arraysAreEquivalent(a,b,problemPath){isArray.assert(a);var aLength=a.length;if(!isArray.check(b)||b.length!==aLength){if(problemPath){problemPath.push("length")}return false}for(var i=0;inp){return true}if(pp===np&&this.name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&this.name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&parent.callee===node;case"ConditionalExpression":return this.name==="test"&&parent.test===node;case"MemberExpression":return this.name==="object"&&parent.object===node;default:return false}default:if(parent.type==="NewExpression"&&this.name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}NPp.canBeFirstInStatement=function(){var node=this.node;return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};NPp.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(path){for(var node,parent;path.parent;path=path.parent){node=path.node;parent=path.parent.node;if(n.BlockStatement.check(parent)&&path.parent.name==="body"&&path.name===0){assert.strictEqual(parent.body[0],node);return true}if(n.ExpressionStatement.check(parent)&&path.name==="expression"){assert.strictEqual(parent.expression,node);return true}if(n.SequenceExpression.check(parent)&&path.parent.name==="expressions"&&path.name===0){assert.strictEqual(parent.expressions[0],node);continue}if(n.CallExpression.check(parent)&&path.name==="callee"){assert.strictEqual(parent.callee,node);continue}if(n.MemberExpression.check(parent)&&path.name==="object"){assert.strictEqual(parent.object,node);continue}if(n.ConditionalExpression.check(parent)&&path.name==="test"){assert.strictEqual(parent.test,node);continue}if(isBinary(parent)&&path.name==="left"){assert.strictEqual(parent.left,node);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&path.name==="argument"){assert.strictEqual(parent.argument,node);continue}return false}return true}function cleanUpNodesAfterPrune(remainingNodePath){if(n.VariableDeclaration.check(remainingNodePath.node)){var declarations=remainingNodePath.get("declarations").value;if(!declarations||declarations.length===0){return remainingNodePath.prune()}}else if(n.ExpressionStatement.check(remainingNodePath.node)){if(!remainingNodePath.get("expression").value){return remainingNodePath.prune()}}else if(n.IfStatement.check(remainingNodePath.node)){cleanUpIfStatementAfterPrune(remainingNodePath)}return remainingNodePath}function cleanUpIfStatementAfterPrune(ifStatement){var testExpression=ifStatement.get("test").value;var alternate=ifStatement.get("alternate").value;var consequent=ifStatement.get("consequent").value;if(!consequent&&!alternate){var testExpressionStatement=b.expressionStatement(testExpression);ifStatement.replace(testExpressionStatement)}else if(!consequent&&alternate){var negatedTestExpression=b.unaryExpression("!",testExpression,true);if(n.UnaryExpression.check(testExpression)&&testExpression.operator==="!"){negatedTestExpression=testExpression.argument}ifStatement.get("test").replace(negatedTestExpression);ifStatement.get("consequent").replace(alternate);ifStatement.get("alternate").replace()}}module.exports=NodePath},{"./path":167,"./scope":168,"./types":170,assert:173,util:199}],166:[function(require,module,exports){var assert=require("assert");var types=require("./types");var NodePath=require("./node-path");var Printable=types.namedTypes.Printable;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isFunction=types.builtInTypes.function;var hasOwn=Object.prototype.hasOwnProperty;var undefined;function PathVisitor(){assert.ok(this instanceof PathVisitor);this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this._shouldVisitComments=hasOwn.call(this._methodNameTable,"Block")||hasOwn.call(this._methodNameTable,"Line");this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false}function computeMethodNameTable(visitor){var typeNames=Object.create(null);for(var methodName in visitor){if(/^visit[A-Z]/.test(methodName)){typeNames[methodName.slice("visit".length)]=true}}var supertypeTable=types.computeSupertypeLookupTable(typeNames);var methodNameTable=Object.create(null);var typeNames=Object.keys(supertypeTable);var typeNameCount=typeNames.length;for(var i=0;i>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||valuebuf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,target_start,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(target_start>=target.length)target_start=target.length;if(!target_start)target_start=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-target_start=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":206,ieee754:207,"is-array":208}],206:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],207:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=nBytes*8-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8);m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8);if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=nBytes*8-mLen-1,eMax=(1<>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8);e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=s*128}},{}],208:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],209:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;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(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i0&&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"){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};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;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}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{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.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};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}},{}],210:[function(require,module,exports){if(typeof Object.create==="function"){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{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],211:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],212:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(isNaN(n)||util.isNull(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else return state.length}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(!util.isNumber(n)||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(util.isNull(ret)){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(!util.isNull(ret))this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(function(){maybeReadMore_(stream,state)})}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length=0){parentCache[path.name=i]=path}}else{parentValue[path.name]=path.value;parentCache[path.name]=path}assert.strictEqual(parentValue[path.name],path.value);assert.strictEqual(path.parentPath.get(path.name),path);return path}Pp.replace=function replace(replacement){var results=[];var parentValue=this.parentPath.value;var parentCache=getChildCache(this.parentPath);var count=arguments.length;repairRelationshipWithParent(this);if(isArray.check(parentValue)){var originalLength=parentValue.length;var move=getMoves(this.parentPath,count-1,this.name+1);var spliceArgs=[this.name,1];for(var i=0;i=than},isNumber+" >= "+than)};exports.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return false},"true":function(){return true},undefined:function(){}};var naiveIsPrimitive=Type.or(builtin.string,builtin.number,builtin.boolean,builtin.null,builtin.undefined);exports.isPrimitive=new Type(function(value){if(value===null)return true;var type=typeof value;return!(type==="object"||type==="function")},naiveIsPrimitive.toString())},{"../lib/types":170}],170:[function(require,module,exports){var assert=require("assert");var Ap=Array.prototype;var slice=Ap.slice;var map=Ap.map;var each=Ap.forEach;var Op=Object.prototype;var objToStr=Op.toString;var funObjStr=objToStr.call(function(){});var strObjStr=objToStr.call("");var hasOwn=Op.hasOwnProperty;function Type(check,name){var self=this;assert.ok(self instanceof Type,self);assert.strictEqual(objToStr.call(check),funObjStr,check+" is not a function");var nameObjStr=objToStr.call(name);assert.ok(nameObjStr===funObjStr||nameObjStr===strObjStr,name+" is neither a function nor a string");Object.defineProperties(self,{name:{value:name},check:{value:function(value,deep){var result=check.call(self,value,deep);if(!result&&deep&&objToStr.call(deep)===funObjStr)deep(self,value);return result}}})}var Tp=Type.prototype;exports.Type=Type;Tp.assert=function(value,deep){if(!this.check(value,deep)){var str=shallowStringify(value);assert.ok(false,str+" does not match type "+this);return false}return true};function shallowStringify(value){if(isObject.check(value))return"{"+Object.keys(value).map(function(key){return key+": "+value[key]}).join(", ")+"}";if(isArray.check(value))return"["+value.map(shallowStringify).join(", ")+"]";return JSON.stringify(value)}Tp.toString=function(){var name=this.name;if(isString.check(name))return name;if(isFunction.check(name))return name.call(this)+"";return name+" type"};var builtInTypes={};exports.builtInTypes=builtInTypes;function defBuiltInType(example,name){var objStr=objToStr.call(example);Object.defineProperty(builtInTypes,name,{enumerable:true,value:new Type(function(value){return objToStr.call(value)===objStr},name)});return builtInTypes[name]}var isString=defBuiltInType("","string");var isFunction=defBuiltInType(function(){},"function");var isArray=defBuiltInType([],"array");var isObject=defBuiltInType({},"object");var isRegExp=defBuiltInType(/./,"RegExp");var isDate=defBuiltInType(new Date,"Date");var isNumber=defBuiltInType(3,"number");var isBoolean=defBuiltInType(true,"boolean");var isNull=defBuiltInType(null,"null");var isUndefined=defBuiltInType(void 0,"undefined");function toType(from,name){if(from instanceof Type)return from;if(from instanceof Def)return from.type;if(isArray.check(from))return Type.fromArray(from);if(isObject.check(from))return Type.fromObject(from);if(isFunction.check(from))return new Type(from,name);return new Type(function(value){return value===from},isUndefined.check(name)?function(){return from+""}:name)}Type.or=function(){var types=[];var len=arguments.length;for(var i=0;i=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};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=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};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}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,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/":199}],174:[function(require,module,exports){arguments[4][172][0].apply(exports,arguments)},{dup:172}],175:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var kMaxLength=1073741823;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return arr.foo()===42&&typeof arr.subarray==="function"&&new Uint8Array(1).subarray(1,1).byteLength===0}catch(e){return false}}();function Buffer(subject,encoding){var self=this;if(!(self instanceof Buffer))return new Buffer(subject,encoding);var type=typeof subject;var length;if(type==="number"){length=+subject}else if(type==="string"){length=Buffer.byteLength(subject,encoding)}else if(type==="object"&&subject!==null){if(subject.type==="Buffer"&&isArray(subject.data))subject=subject.data;length=+subject.length}else{throw new TypeError("must start with number, buffer, array or string")}if(length>kMaxLength){throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength.toString(16)+" bytes")}if(length<0)length=0;else length>>>=0;if(Buffer.TYPED_ARRAY_SUPPORT){self=Buffer._augment(new Uint8Array(length))}else{self.length=length;self._isBuffer=true}var i;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof subject.byteLength==="number"){self._set(subject)}else if(isArrayish(subject)){if(Buffer.isBuffer(subject)){for(i=0;i0&&length<=Buffer.poolSize)self.parent=rootParent;return self}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;break;case"utf8":case"utf-8":ret=utf8ToBytes(str).length;break;case"base64":ret=base64ToBytes(str).length;break;default:ret=str.length}return ret};Buffer.prototype.length=undefined; + for(var i=0;i=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;process.nextTick(function(){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}})}}function forEach(xs,f){for(var i=0,l=xs.length;i1){var cbs=[];for(var c=0;c=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:205}],227:[function(require,module,exports){exports.isatty=function(){return false};function ReadStream(){throw new Error("tty.ReadStream is not implemented")}exports.ReadStream=ReadStream;function WriteStream(){throw new Error("tty.ReadStream is not implemented")}exports.WriteStream=WriteStream},{}],228:[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"}},{}],229:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;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=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}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;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]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+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){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}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=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}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");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-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]}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"||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"];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(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){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":228,_process:213,inherits:210}],230:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(process.platform==="win32"){ansiStyles.blue.open=""}function build(_styles){var builder=function builder(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a0;i--){line=lines[i];if(~line.indexOf("sourceMappingURL=data:"))return exports.fromComment(line)}}Converter.prototype.toJSON=function(space){return JSON.stringify(this.sourcemap,null,space)};Converter.prototype.toBase64=function(){var json=this.toJSON();return new Buffer(json).toString("base64")};Converter.prototype.toComment=function(options){var base64=this.toBase64();var data="sourceMappingURL=data:application/json;base64,"+base64;return options&&options.multiline?"/*# "+data+" */":"//# "+data};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(key,value){if(this.sourcemap.hasOwnProperty(key))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(key,value)};Converter.prototype.setProperty=function(key,value){this.sourcemap[key]=value;return this};Converter.prototype.getProperty=function(key){return this.sourcemap[key]};exports.fromObject=function(obj){return new Converter(obj)};exports.fromJSON=function(json){return new Converter(json,{isJSON:true})};exports.fromBase64=function(base64){return new Converter(base64,{isEncoded:true})};exports.fromComment=function(comment){comment=comment.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(comment,{isEncoded:true,hasComment:true})};exports.fromMapFileComment=function(comment,dir){return new Converter(comment,{commentFileDir:dir,isFileComment:true,isJSON:true})};exports.fromSource=function(content,largeSource){if(largeSource)return convertFromLargeSource(content);var m=content.match(commentRx);commentRx.lastIndex=0;return m?exports.fromComment(m.pop()):null};exports.fromMapFileSource=function(content,dir){var m=content.match(mapFileCommentRx);mapFileCommentRx.lastIndex=0;return m?exports.fromMapFileComment(m.pop(),dir):null};exports.removeComments=function(src){commentRx.lastIndex=0;return src.replace(commentRx,"")};exports.removeMapFileComments=function(src){mapFileCommentRx.lastIndex=0;return src.replace(mapFileCommentRx,"")};Object.defineProperty(exports,"commentRegex",{get:function getCommentRegex(){commentRx.lastIndex=0;return commentRx}});Object.defineProperty(exports,"mapFileCommentRegex",{get:function getMapFileCommentRegex(){mapFileCommentRx.lastIndex=0;return mapFileCommentRx}})}).call(this,require("buffer").Buffer)},{buffer:205,fs:202,path:212}],239:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function(IS_INCLUDES){return function(el){var O=$.toObject(this),length=$.toLength(O.length),index=$.toIndex(arguments[1],length),value;if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$":258}],240:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function(callbackfn){var O=Object($.assertDefined(this)),self=$.ES5Object(O),f=ctx(callbackfn,arguments[1],3),length=$.toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$":258,"./$.ctx":248}],241:[function(require,module,exports){var $=require("./$");function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}assert.def=$.assertDefined;assert.fn=function(it){if(!$.isFunction(it))throw TypeError(it+" is not a function!");return it};assert.obj=function(it){if(!$.isObject(it))throw TypeError(it+" is not an object!");return it};assert.inst=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it};module.exports=assert},{"./$":258}],242:[function(require,module,exports){var $=require("./$"),enumKeys=require("./$.enum-keys");module.exports=Object.assign||function assign(target,source){var T=Object($.assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=$.ES5Object(arguments[i++]),keys=enumKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$":258,"./$.enum-keys":250}],243:[function(require,module,exports){var $=require("./$"),TAG=require("./$.wks")("toStringTag"),toString={}.toString;function cof(it){return toString.call(it).slice(8,-1)}cof.classof=function(it){var O,T;return it==undefined?it===undefined?"Undefined":"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:cof(O)};cof.set=function(it,tag,stat){if(it&&!$.has(it=stat?it:it.prototype,TAG))$.hide(it,TAG,tag)};module.exports=cof},{"./$":258,"./$.wks":269}],244:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),step=require("./$.iter").step,has=$.has,set=$.set,isObject=$.isObject,hide=$.hide,isFrozen=Object.isFrozen||$.core.Object.isFrozen,ID=safe("id"),O1=safe("O1"),LAST=safe("last"),FIRST=safe("first"),ITER=safe("iter"),SIZE=$.DESC?safe("size"):"size",id=0;function fastKey(it,create){if(!isObject(it))return(typeof it=="string"?"S":"P")+it;if(isFrozen(it))return"F";if(!has(it,ID)){if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(){var that=assert.inst(this,C,NAME),iterable=arguments[0];set(that,O1,$.create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)}$.mix(C.prototype,{clear:function clear(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function forEach(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function has(key){return!!getEntry(this,key)}});if($.DESC)$.setDesc(C.prototype,"size",{get:function(){return assert.def(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!="F")that[O1][index]=entry}return that},getEntry:getEntry,setIter:function(C,NAME,IS_MAP){require("./$.iter-define")(C,NAME,function(iterated,kind){set(this,ITER,{o:iterated,k:kind})},function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){iter.o=undefined;return step(1)}if(kind=="keys")return step(0,entry.k);if(kind=="values")return step(0,entry.v);return step(0,[entry.k,entry.v])},IS_MAP?"entries":"values",!IS_MAP,true)}}},{"./$":258,"./$.assert":241,"./$.ctx":248,"./$.for-of":251,"./$.iter":257,"./$.iter-define":255,"./$.uid":267}],245:[function(require,module,exports){var $def=require("./$.def"),forOf=require("./$.for-of");module.exports=function(NAME){$def($def.P,NAME,{toJSON:function toJSON(){var arr=[];forOf(this,false,arr.push,arr);return arr}})}},{"./$.def":249,"./$.for-of":251}],246:[function(require,module,exports){"use strict";var $=require("./$"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),_has=$.has,isObject=$.isObject,hide=$.hide,isFrozen=Object.isFrozen||$.core.Object.isFrozen,id=0,ID=safe("id"),WEAK=safe("weak"),LEAK=safe("leak"),method=require("./$.array-methods"),find=method(5),findIndex=method(6);function findFrozen(store,key){return find.call(store.array,function(it){return it[0]===key})}function leakStore(that){return that[LEAK]||hide(that,LEAK,{array:[],get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.array.push([key,value])},"delete":function(key){var index=findIndex.call(this.array,function(it){return it[0]===key});if(~index)this.array.splice(index,1);return!!~index}})[LEAK]}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(){$.set(assert.inst(this,C,NAME),ID,id++);var iterable=arguments[0];if(iterable!=undefined)forOf(iterable,IS_MAP,this[ADDER],this)}$.mix(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this)["delete"](key);return _has(key,WEAK)&&_has(key[WEAK],this[ID])&&delete key[WEAK][this[ID]]},has:function has(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this).has(key);return _has(key,WEAK)&&_has(key[WEAK],this[ID])}});return C},def:function(that,key,value){if(isFrozen(assert.obj(key))){leakStore(that).set(key,value)}else{_has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that[ID]]=value}return that},leakStore:leakStore,WEAK:WEAK,ID:ID}},{"./$":258,"./$.array-methods":240,"./$.assert":241,"./$.for-of":251,"./$.uid":267}],247:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),BUGGY=require("./$.iter").BUGGY,forOf=require("./$.for-of"),species=require("./$.species"),assertInstance=require("./$.assert").inst;module.exports=function(NAME,methods,common,IS_MAP,IS_WEAK){var Base=$.g[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};function fixMethod(KEY,CHAIN){var method=proto[KEY];if($.FW)proto[KEY]=function(a,b){var result=method.call(this,a===0?0:a,b);return CHAIN?this:result}}if(!$.isFunction(C)||!(IS_WEAK||!BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(NAME,IS_MAP,ADDER);$.mix(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](IS_WEAK?{}:-0,1),buggyZero;if(!require("./$.iter-detect")(function(iter){new C(iter)})){C=function(){assertInstance(this,C,NAME);var that=new Base,iterable=arguments[0];if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that);return that};C.prototype=proto;if($.FW)proto.constructor=C}IS_WEAK||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER,true)}require("./$.cof").set(C,NAME);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);species(C);species($.core[NAME]);if(!IS_WEAK)common.setIter(C,NAME,IS_MAP);return C}},{"./$":258,"./$.assert":241,"./$.cof":243,"./$.def":249,"./$.for-of":251,"./$.iter":257,"./$.iter-detect":256,"./$.species":264}],248:[function(require,module,exports){var assertFunction=require("./$.assert").fn;module.exports=function(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.assert":241}],249:[function(require,module,exports){var $=require("./$"),global=$.g,core=$.core,isFunction=$.isFunction;function ctx(fn,that){return function(){return fn.apply(that,arguments)}}global.core=core;$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;function $def(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,target=isGlobal?global:type&$def.S?global[name]:(global[name]||{}).prototype,exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;out=(own?target:source)[key];if(type&$def.B&&own)exp=ctx(out,global);else exp=type&$def.P&&isFunction(out)?ctx(Function.call,out):out;if(target&&!own){if(isGlobal)target[key]=out;else delete target[key]&&$.hide(target,key,out)}if(exports[key]!=out)$.hide(exports,key,exp)}}module.exports=$def},{"./$":258}],250:[function(require,module,exports){var $=require("./$");module.exports=function(it){var keys=$.getKeys(it),getDesc=$.getDesc,getSymbols=$.getSymbols;if(getSymbols)$.each.call(getSymbols(it),function(key){if(getDesc(it,key).enumerable)keys.push(key)});return keys}},{"./$":258}],251:[function(require,module,exports){var ctx=require("./$.ctx"),get=require("./$.iter").get,call=require("./$.iter-call");module.exports=function(iterable,entries,fn,that){var iterator=get(iterable),f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done){if(call(iterator,f,step.value,entries)===false){return call.close(iterator)}}}},{"./$.ctx":248,"./$.iter":257,"./$.iter-call":254}],252:[function(require,module,exports){module.exports=function($){$.FW=true;$.path=$.g;return $}},{}],253:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}},{}],254:[function(require,module,exports){var assertObject=require("./$.assert").obj;function close(iterator){var ret=iterator["return"];if(ret!==undefined)assertObject(ret.call(iterator))}function call(iterator,fn,value,entries){try{return entries?fn(assertObject(value)[0],value[1]):fn(value)}catch(e){close(iterator);throw e}}call.close=close;module.exports=call},{"./$.assert":241}],255:[function(require,module,exports){var $def=require("./$.def"),$=require("./$"),cof=require("./$.cof"),$iter=require("./$.iter"),SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",VALUES="values",Iterators=$iter.Iterators;module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){$iter.create(Constructor,NAME,next);function createMethod(kind){return function(){return new Constructor(this,kind)}}var TAG=NAME+" Iterator",proto=Base.prototype,_native=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],_default=_native||createMethod(DEFAULT),methods,key;if(_native){var IteratorPrototype=$.getProto(_default.call(new Base));cof.set(IteratorPrototype,TAG,true);if($.FW&&$.has(proto,FF_ITERATOR))$iter.set(IteratorPrototype,$.that)}if($.FW)$iter.set(proto,_default);Iterators[NAME]=_default;Iterators[TAG]=$.that;if(DEFAULT){methods={keys:IS_SET?_default:createMethod("keys"),values:DEFAULT==VALUES?_default:createMethod(VALUES),entries:DEFAULT!=VALUES?_default:createMethod("entries")};if(FORCE)for(key in methods){if(!(key in proto))$.hide(proto,key,methods[key])}else $def($def.P+$def.F*$iter.BUGGY,NAME,methods)}}},{"./$":258,"./$.cof":243,"./$.def":249,"./$.iter":257,"./$.wks":269}],256:[function(require,module,exports){var SYMBOL_ITERATOR=require("./$.wks")("iterator"),SAFE_CLOSING=false;try{var riter=[7][SYMBOL_ITERATOR]();riter["return"]=function(){SAFE_CLOSING=true};Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec){if(!SAFE_CLOSING)return false;var safe=false;try{var arr=[7],iter=arr[SYMBOL_ITERATOR]();iter.next=function(){safe=true};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return safe}},{"./$.wks":269}],257:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),assertObject=require("./$.assert").obj,SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",Iterators={},IteratorPrototype={};setIterator(IteratorPrototype,$.that);function setIterator(O,value){$.hide(O,SYMBOL_ITERATOR,value);if(FF_ITERATOR in[])$.hide(O,FF_ITERATOR,value)}module.exports={BUGGY:"keys"in[]&&!("next"in[].keys()),Iterators:Iterators,step:function(done,value){return{value:value,done:!!done}},is:function(it){var O=Object(it),Symbol=$.g.Symbol,SYM=Symbol&&Symbol.iterator||FF_ITERATOR;return SYM in O||SYMBOL_ITERATOR in O||$.has(Iterators,cof.classof(O))},get:function(it){var Symbol=$.g.Symbol,ext=it[Symbol&&Symbol.iterator||FF_ITERATOR],getIter=ext||it[SYMBOL_ITERATOR]||Iterators[cof.classof(it)];return assertObject(getIter.call(it))},set:setIterator,create:function(Constructor,NAME,next,proto){Constructor.prototype=$.create(proto||IteratorPrototype,{next:$.desc(1,next)});cof.set(Constructor,NAME+" Iterator")}}},{"./$":258,"./$.assert":241,"./$.cof":243,"./$.wks":269}],258:[function(require,module,exports){"use strict";var global=typeof self!="undefined"?self:Function("return this")(),core={},defineProperty=Object.defineProperty,hasOwnProperty={}.hasOwnProperty,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min;var DESC=!!function(){try{return defineProperty({},"a",{get:function(){return 2}}).a==2}catch(e){}}();var hide=createDefiner(1);function toInteger(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}function desc(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return $.setDesc(object,key,desc(bitmap,value))}:simpleSet}function isObject(it){return it!==null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}function assertDefined(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}var $=module.exports=require("./$.fw")({g:global,core:core,html:global.document&&document.documentElement,isObject:isObject,isFunction:isFunction,it:function(it){return it},that:function(){return this},toInteger:toInteger,toLength:function(it){return it>0?min(toInteger(it),9007199254740991):0},toIndex:function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)},has:function(it,key){return hasOwnProperty.call(it,key)},create:Object.create,getProto:Object.getPrototypeOf,DESC:DESC,desc:desc,getDesc:Object.getOwnPropertyDescriptor,setDesc:defineProperty,setDescs:Object.defineProperties,getKeys:Object.keys,getNames:Object.getOwnPropertyNames,getSymbols:Object.getOwnPropertySymbols,assertDefined:assertDefined,ES5Object:Object,toObject:function(it){return $.ES5Object(assertDefined(it))},hide:hide,def:createDefiner(0),set:global.Symbol?simpleSet:hide,mix:function(target,src){for(var key in src)hide(target,key,src[key]);return target},each:[].forEach});if(typeof __e!="undefined")__e=core;if(typeof __g!="undefined")__g=global},{"./$.fw":252}],259:[function(require,module,exports){var $=require("./$");module.exports=function(object,el){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":258}],260:[function(require,module,exports){var $=require("./$"),assertObject=require("./$.assert").obj;module.exports=function ownKeys(it){assertObject(it);var keys=$.getNames(it),getSymbols=$.getSymbols;return getSymbols?keys.concat(getSymbols(it)):keys}},{"./$":258,"./$.assert":241}],261:[function(require,module,exports){"use strict";var $=require("./$"),invoke=require("./$.invoke"),assertFunction=require("./$.assert").fn;module.exports=function(){var fn=assertFunction(this),length=arguments.length,pargs=Array(length),i=0,_=$.path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$":258,"./$.assert":241,"./$.invoke":253}],262:[function(require,module,exports){"use strict";module.exports=function(regExp,replace,isStatic){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}},{}],263:[function(require,module,exports){var $=require("./$"),assert=require("./$.assert");function check(O,proto){assert.obj(O);assert(proto===null||$.isObject(proto),proto,": can't set as prototype!")}module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,$.getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined),check:check}},{"./$":258,"./$.assert":241,"./$.ctx":248}],264:[function(require,module,exports){var $=require("./$"),SPECIES=require("./$.wks")("species");module.exports=function(C){if($.DESC&&!(SPECIES in C))$.setDesc(C,SPECIES,{configurable:true,get:$.that})}},{"./$":258,"./$.wks":269}],265:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function(TO_STRING){return function(pos){var s=String($.assertDefined(this)),i=$.toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$":258}],266:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),invoke=require("./$.invoke"),global=$.g,isFunction=$.isFunction,html=$.html,document=global.document,process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,postMessage=global.postMessage,addEventListener=global.addEventListener,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;function run(){var id=+this;if($.has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run.call(event.data)}if(!isFunction(setTask)||!isFunction(clearTask)){setTask=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearTask=function(id){delete queue[id]};if(cof(process)=="process"){defer=function(id){process.nextTick(ctx(run,id,1))}}else if(addEventListener&&isFunction(postMessage)&&!global.importScripts){defer=function(id){postMessage(id,"*")};addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if(document&&ONREADYSTATECHANGE in document.createElement("script")){defer=function(id){html.appendChild(document.createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$":258,"./$.cof":243,"./$.ctx":248,"./$.invoke":253}],267:[function(require,module,exports){var sid=0;function uid(key){return"Symbol("+key+")_"+(++sid+Math.random()).toString(36)}uid.safe=require("./$").g.Symbol||uid;module.exports=uid},{"./$":258}],268:[function(require,module,exports){var $=require("./$"),UNSCOPABLES=require("./$.wks")("unscopables");if($.FW&&!(UNSCOPABLES in[]))$.hide(Array.prototype,UNSCOPABLES,{});module.exports=function(key){if($.FW)[][UNSCOPABLES][key]=true}},{"./$":258,"./$.wks":269}],269:[function(require,module,exports){var global=require("./$").g,store={};module.exports=function(name){return store[name]||(store[name]=global.Symbol&&global.Symbol[name]||require("./$.uid").safe("Symbol."+name))}},{"./$":258,"./$.uid":267}],270:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid").safe("__proto__"),assert=require("./$.assert"),assertObject=assert.obj,ObjectProto=Object.prototype,A=[],slice=A.slice,indexOf=A.indexOf,classof=cof.classof,has=$.has,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,defineProperties=$.setDescs,isFunction=$.isFunction,toObject=$.toObject,toLength=$.toLength,IE8_DOM_DEFINE=false;if(!$.DESC){try{IE8_DOM_DEFINE=defineProperty(document.createElement("div"),"x",{get:function(){return 8}}).x==8}catch(e){}$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)assertObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};$.setDescs=defineProperties=function(O,Properties){assertObject(O);var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!$.DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=document.createElement("iframe"),i=keysLen1,gt=">",iframeDocument;iframe.style.display="none";$.html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write("");iframeDocument.close();createDict=iframeDocument.F;while(i--)delete createDict.prototype[keys1[i]];return createDict()};function createGetKeys(names,length){return function(object){var O=toObject(object),i=0,result=[],key;for(key in O)if(key!=IE_PROTO)has(O,key)&&result.push(key);while(length>i)if(has(O,key=names[i++])){~indexOf.call(result,key)||result.push(key)}return result}}function isPrimitive(it){return!$.isObject(it)}function Empty(){}$def($def.S,"Object",{getPrototypeOf:$.getProto=$.getProto||function(O){O=Object(assert.def(O));if(has(O,IE_PROTO))return O[IE_PROTO];if(isFunction(O.constructor)&&O instanceof O.constructor){return O.constructor.prototype}return O instanceof Object?ObjectProto:null},getOwnPropertyNames:$.getNames=$.getNames||createGetKeys(keys2,keys2.length,true),create:$.create=$.create||function(O,Properties){var result;if(O!==null){Empty.prototype=assertObject(O);result=new Empty;Empty.prototype=null;result[IE_PROTO]=O}else result=createDict();return Properties===undefined?result:defineProperties(result,Properties)},keys:$.getKeys=$.getKeys||createGetKeys(keys1,keysLen1,false),seal:$.it,freeze:$.it,preventExtensions:$.it,isSealed:isPrimitive,isFrozen:isPrimitive,isExtensible:$.isObject});$def($def.P,"Function",{bind:function(that){var fn=assert.fn(this),partArgs=slice.call(arguments,1);function bound(){var args=partArgs.concat(slice.call(arguments));return invoke(fn,args,this instanceof bound?$.create(fn.prototype):that)}if(fn.prototype)bound.prototype=fn.prototype;return bound}});function arrayMethodFix(fn){return function(){return fn.apply($.ES5Object(this),arguments)}}if(!(0 in Object("z")&&"z"[0]=="z")){$.ES5Object=function(it){return cof(it)=="String"?it.split(""):Object(it)}}$def($def.P+$def.F*($.ES5Object!=Object),"Array",{slice:arrayMethodFix(slice),join:arrayMethodFix(A.join)});$def($def.S,"Array",{isArray:function(arg){return cof(arg)=="Array"}});function createArrayReduce(isRight){return function(callbackfn,memo){assert.fn(callbackfn);var O=toObject(this),length=toLength(O.length),index=isRight?length-1:0,i=isRight?-1:1;if(arguments.length<2)for(;;){if(index in O){memo=O[index];index+=i;break}index+=i;assert(isRight?index>=0:length>index,"Reduce of empty array with no initial value")}for(;isRight?index>=0:length>index;index+=i)if(index in O){memo=callbackfn(memo,O[index],index,this)}return memo}}$def($def.P,"Array",{forEach:$.each=$.each||arrayMethod(0),map:arrayMethod(1),filter:arrayMethod(2),some:arrayMethod(3),every:arrayMethod(4),reduce:createArrayReduce(false),reduceRight:createArrayReduce(true),indexOf:indexOf=indexOf||require("./$.array-includes")(false),lastIndexOf:function(el,fromIndex){var O=toObject(this),length=toLength(O.length),index=length-1;if(arguments.length>1)index=Math.min(index,$.toInteger(fromIndex));if(index<0)index=toLength(length+index);for(;index>=0;index--)if(index in O)if(O[index]===el)return index;return-1}});$def($def.P,"String",{trim:require("./$.replacer")(/^\s*([\s\S]*\S)?\s*$/,"$1")});$def($def.S,"Date",{now:function(){return+new Date}});function lz(num){return num>9?num:"0"+num}$def($def.P,"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var d=this,y=d.getUTCFullYear(),m=d.getUTCMilliseconds(),s=y<0?"-":y>9999?"+":"";return s+("00000"+Math.abs(y)).slice(s?-6:-4)+"-"+lz(d.getUTCMonth()+1)+"-"+lz(d.getUTCDate())+"T"+lz(d.getUTCHours())+":"+lz(d.getUTCMinutes())+":"+lz(d.getUTCSeconds())+"."+(m>99?m:"0"+lz(m))+"Z"}});if(classof(function(){return arguments}())=="Object")cof.classof=function(it){var tag=classof(it);return tag=="Object"&&isFunction(it.callee)?"Arguments":tag}},{"./$":223,"./$.array-includes":210,"./$.array-methods":211,"./$.assert":212,"./$.cof":214,"./$.def":219,"./$.invoke":221,"./$.replacer":227,"./$.uid":232}],249:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{copyWithin:function(target,start){var O=Object($.assertDefined(this)),len=$.toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],fin=end===undefined?len:toIndex(end,len),count=Math.min(fin-from,len-to),inc=1;if(from0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O}});require("./$.unscope")("copyWithin")},{"./$":223,"./$.def":219,"./$.unscope":233}],250:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{fill:function(value){var O=Object($.assertDefined(this)),length=$.toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O}});require("./$.unscope")("fill")},{"./$":223,"./$.def":219,"./$.unscope":233}],251:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{findIndex:require("./$.array-methods")(6)});require("./$.unscope")("findIndex")},{"./$.array-methods":211,"./$.def":219,"./$.unscope":233}],252:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{find:require("./$.array-methods")(5)});require("./$.unscope")("find")},{"./$.array-methods":211,"./$.def":219,"./$.unscope":233}],253:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),$iter=require("./$.iter"),stepCall=$iter.stepCall;$def($def.S+$def.F*$iter.DANGER_CLOSING,"Array",{from:function(arrayLike){var O=Object($.assertDefined(arrayLike)),mapfn=arguments[1],mapping=mapfn!==undefined,f=mapping?ctx(mapfn,arguments[2],2):undefined,index=0,length,result,step,iterator;if($iter.is(O)){iterator=$iter.get(O);result=new(typeof this=="function"?this:Array);for(;!(step=iterator.next()).done;index++){result[index]=mapping?stepCall(iterator,f,[step.value,index],true):step.value}}else{result=new(typeof this=="function"?this:Array)(length=$.toLength(O.length));for(;length>index;index++){result[index]=mapping?f(O[index],index):O[index]}}result.length=index;return result}})},{"./$":223,"./$.ctx":218,"./$.def":219,"./$.iter":222}],254:[function(require,module,exports){var $=require("./$"),setUnscope=require("./$.unscope"),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step,Iterators=$iter.Iterators;$iter.std(Array,"Array",function(iterated,kind){$.set(this,ITER,{o:$.toObject(iterated),i:0,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,index=iter.i++;if(!O||index>=O.length){iter.o=undefined;return step(1)}if(kind=="key")return step(0,index);if(kind=="value")return step(0,O[index]);return step(0,[index,O[index]])},"value");Iterators.Arguments=Iterators.Array;setUnscope("keys");setUnscope("values");setUnscope("entries")},{"./$":223,"./$.iter":222,"./$.uid":232,"./$.unscope":233}],255:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Array",{of:function(){var index=0,length=arguments.length,result=new(typeof this=="function"?this:Array)(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}})},{"./$.def":219}],256:[function(require,module,exports){require("./$.species")(Array)},{"./$.species":229}],257:[function(require,module,exports){"use strict";var $=require("./$"),NAME="name",setDesc=$.setDesc,FunctionProto=Function.prototype;NAME in FunctionProto||$.FW&&$.DESC&&setDesc(FunctionProto,NAME,{configurable:true,get:function(){var match=String(this).match(/^\s*function ([^ (]*)/),name=match?match[1]:"";$.has(this,NAME)||setDesc(this,NAME,$.desc(5,name));return name},set:function(value){$.has(this,NAME)||setDesc(this,NAME,$.desc(0,value))}})},{"./$":223}],258:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Map",{get:function(key){var entry=strong.getEntry(this,key);return entry&&entry.v},set:function(key,value){return strong.def(this,key===0?0:key,value)}},strong,true)},{"./$.collection":217,"./$.collection-strong":215}],259:[function(require,module,exports){var Infinity=1/0,$def=require("./$.def"),E=Math.E,pow=Math.pow,abs=Math.abs,exp=Math.exp,log=Math.log,sqrt=Math.sqrt,ceil=Math.ceil,floor=Math.floor,sign=Math.sign||function(x){ -return(x=+x)==0||x!=x?x:x<0?-1:1};function asinh(x){return!isFinite(x=+x)||x==0?x:x<0?-asinh(-x):log(x+sqrt(x*x+1))}function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:exp(x)-1}$def($def.S,"Math",{acosh:function(x){return(x=+x)<1?NaN:isFinite(x)?log(x/E+sqrt(x+1)*sqrt(x-1)/E)+1:x},asinh:asinh,atanh:function(x){return(x=+x)==0?x:log((1+x)/(1-x))/2},cbrt:function(x){return sign(x=+x)*pow(abs(x),1/3)},clz32:function(x){return(x>>>=0)?32-x.toString(2).length:32},cosh:function(x){return(exp(x=+x)+exp(-x))/2},expm1:expm1,fround:function(x){return new Float32Array([x])[0]},hypot:function(value1,value2){var sum=0,len1=arguments.length,len2=len1,args=Array(len1),larg=-Infinity,arg;while(len1--){arg=args[len1]=+arguments[len1];if(arg==Infinity||arg==-Infinity)return Infinity;if(arg>larg)larg=arg}larg=arg||1;while(len2--)sum+=pow(args[len2]/larg,2);return larg*sqrt(sum)},imul:function(x,y){var UInt16=65535,xn=+x,yn=+y,xl=UInt16&xn,yl=UInt16&yn;return 0|xl*yl+((UInt16&xn>>>16)*yl+xl*(UInt16&yn>>>16)<<16>>>0)},log1p:function(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:log(1+x)},log10:function(x){return log(x)/Math.LN10},log2:function(x){return log(x)/Math.LN2},sign:sign,sinh:function(x){return abs(x=+x)<1?(expm1(x)-expm1(-x))/2:(exp(x-1)-exp(-x-1))*(E/2)},tanh:function(x){var a=expm1(x=+x),b=expm1(-x);return a==Infinity?1:b==Infinity?-1:(a-b)/(exp(x)+exp(-x))},trunc:function(it){return(it>0?floor:ceil)(it)}})},{"./$.def":219}],260:[function(require,module,exports){"use strict";var $=require("./$"),isObject=$.isObject,isFunction=$.isFunction,NUMBER="Number",Number=$.g[NUMBER],Base=Number,proto=Number.prototype;function toPrimitive(it){var fn,val;if(isFunction(fn=it.valueOf)&&!isObject(val=fn.call(it)))return val;if(isFunction(fn=it.toString)&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to number")}function toNumber(it){if(isObject(it))it=toPrimitive(it);if(typeof it=="string"&&it.length>2&&it.charCodeAt(0)==48){var binary=false;switch(it.charCodeAt(1)){case 66:case 98:binary=true;case 79:case 111:return parseInt(it.slice(2),binary?2:8)}}return+it}if($.FW&&!(Number("0o1")&&Number("0b1"))){Number=function Number(it){return this instanceof Number?new Base(toNumber(it)):toNumber(it)};$.each.call($.DESC?$.getNames(Base):("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,"+"EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,"+"MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger").split(","),function(key){if($.has(Base,key)&&!$.has(Number,key)){$.setDesc(Number,key,$.getDesc(Base,key))}});Number.prototype=proto;proto.constructor=Number;$.hide($.g,NUMBER,Number)}},{"./$":223}],261:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),abs=Math.abs,floor=Math.floor,MAX_SAFE_INTEGER=9007199254740991;function isInteger(it){return!$.isObject(it)&&isFinite(it)&&floor(it)===it}$def($def.S,"Number",{EPSILON:Math.pow(2,-52),isFinite:function(it){return typeof it=="number"&&isFinite(it)},isInteger:isInteger,isNaN:function(number){return number!=number},isSafeInteger:function(number){return isInteger(number)&&abs(number)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MIN_SAFE_INTEGER:-MAX_SAFE_INTEGER,parseFloat:parseFloat,parseInt:parseInt})},{"./$":223,"./$.def":219}],262:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{assign:require("./$.assign")})},{"./$.assign":213,"./$.def":219}],263:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{is:function(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}})},{"./$.def":219}],264:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{setPrototypeOf:require("./$.set-proto")})},{"./$.def":219,"./$.set-proto":228}],265:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),isObject=$.isObject,toObject=$.toObject;function wrapObjectMethod(METHOD,MODE){var fn=($.core.Object||{})[METHOD]||Object[METHOD],f=0,o={};o[METHOD]=MODE==1?function(it){return isObject(it)?fn(it):it}:MODE==2?function(it){return isObject(it)?fn(it):true}:MODE==3?function(it){return isObject(it)?fn(it):false}:MODE==4?function(it,key){return fn(toObject(it),key)}:MODE==5?function(it){return fn(Object($.assertDefined(it)))}:function(it){return fn(toObject(it))};try{fn("z")}catch(e){f=1}$def($def.S+$def.F*f,"Object",o)}wrapObjectMethod("freeze",1);wrapObjectMethod("seal",1);wrapObjectMethod("preventExtensions",1);wrapObjectMethod("isFrozen",2);wrapObjectMethod("isSealed",2);wrapObjectMethod("isExtensible",3);wrapObjectMethod("getOwnPropertyDescriptor",4);wrapObjectMethod("getPrototypeOf",5);wrapObjectMethod("keys");wrapObjectMethod("getOwnPropertyNames")},{"./$":223,"./$.def":219}],266:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),tmp={};tmp[require("./$.wks")("toStringTag")]="z";if($.FW&&cof(tmp)!="z")$.hide(Object.prototype,"toString",function(){return"[object "+cof.classof(this)+"]"})},{"./$":223,"./$.cof":214,"./$.wks":234}],267:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),$def=require("./$.def"),assert=require("./$.assert"),$iter=require("./$.iter"),SPECIES=require("./$.wks")("species"),RECORD=require("./$.uid").safe("record"),forOf=$iter.forOf,PROMISE="Promise",global=$.g,process=global.process,asap=process&&process.nextTick||require("./$.task").set,Promise=global[PROMISE],Base=Promise,isFunction=$.isFunction,isObject=$.isObject,assertFunction=assert.fn,assertObject=assert.obj,test;function getConstructor(C){var S=assertObject(C)[SPECIES];return S!=undefined?S:C}isFunction(Promise)&&isFunction(Promise.resolve)&&Promise.resolve(test=new Promise(function(){}))==test||function(){function isThenable(it){var then;if(isObject(it))then=it.then;return isFunction(then)?then:false}function handledRejectionOrHasOnRejected(promise){var record=promise[RECORD],chain=record.c,i=0,react;if(record.h)return true;while(chain.length>i){react=chain[i++];if(react.fail||handledRejectionOrHasOnRejected(react.P))return true}}function notify(record,isReject){var chain=record.c;if(isReject||chain.length)asap(function(){var promise=record.p,value=record.v,ok=record.s==1,i=0;if(isReject&&!handledRejectionOrHasOnRejected(promise)){setTimeout(function(){if(!handledRejectionOrHasOnRejected(promise)){if(cof(process)=="process"){process.emit("unhandledRejection",value,promise)}else if(global.console&&isFunction(console.error)){console.error("Unhandled promise rejection",value)}}},1e3)}else while(chain.length>i)!function(react){var cb=ok?react.ok:react.fail,ret,then;try{if(cb){if(!ok)record.h=true;ret=cb===true?value:cb(value);if(ret===react.P){react.rej(TypeError(PROMISE+"-chain cycle"))}else if(then=isThenable(ret)){then.call(ret,react.res,react.rej)}else react.res(ret)}else react.rej(value)}catch(err){react.rej(err)}}(chain[i++]);chain.length=0})}function reject(value){var record=this;if(record.d)return;record.d=true;record=record.r||record;record.v=value;record.s=2;notify(record,true)}function resolve(value){var record=this,then,wrapper;if(record.d)return;record.d=true;record=record.r||record;try{if(then=isThenable(value)){wrapper={r:record,d:false};then.call(value,ctx(resolve,wrapper,1),ctx(reject,wrapper,1))}else{record.v=value;record.s=1;notify(record)}}catch(err){reject.call(wrapper||{r:record,d:false},err)}}Promise=function(executor){assertFunction(executor);var record={p:assert.inst(this,Promise,PROMISE),c:[],s:0,d:false,v:undefined,h:false};$.hide(this,RECORD,record);try{executor(ctx(resolve,record,1),ctx(reject,record,1))}catch(err){reject.call(record,err)}};$.mix(Promise.prototype,{then:function(onFulfilled,onRejected){var S=assertObject(assertObject(this).constructor)[SPECIES];var react={ok:isFunction(onFulfilled)?onFulfilled:true,fail:isFunction(onRejected)?onRejected:false};var P=react.P=new(S!=undefined?S:Promise)(function(res,rej){react.res=assertFunction(res);react.rej=assertFunction(rej)});var record=this[RECORD];record.c.push(react);record.s&¬ify(record);return P},"catch":function(onRejected){return this.then(undefined,onRejected)}})}();$def($def.G+$def.W+$def.F*(Promise!=Base),{Promise:Promise});$def($def.S,PROMISE,{reject:function(r){return new(getConstructor(this))(function(res,rej){rej(r)})},resolve:function(x){return isObject(x)&&RECORD in x&&$.getProto(x)===this.prototype?x:new(getConstructor(this))(function(res){res(x)})}});$def($def.S+$def.F*($iter.fail(function(iter){Promise.all(iter)["catch"](function(){})})||$iter.DANGER_CLOSING),PROMISE,{all:function(iterable){var C=getConstructor(this),values=[];return new C(function(resolve,reject){forOf(iterable,false,values.push,values);var remaining=values.length,results=Array(remaining);if(remaining)$.each.call(values,function(promise,index){C.resolve(promise).then(function(value){results[index]=value;--remaining||resolve(results)},reject)});else resolve(results)})},race:function(iterable){var C=getConstructor(this);return new C(function(resolve,reject){forOf(iterable,false,function(promise){C.resolve(promise).then(resolve,reject)})})}});cof.set(Promise,PROMISE);require("./$.species")(Promise)},{"./$":223,"./$.assert":212,"./$.cof":214,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.species":229,"./$.task":231,"./$.uid":232,"./$.wks":234}],268:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),setProto=require("./$.set-proto"),$iter=require("./$.iter"),ITER=require("./$.uid").safe("iter"),step=$iter.step,assert=require("./$.assert"),isObject=$.isObject,getDesc=$.getDesc,setDesc=$.setDesc,getProto=$.getProto,apply=Function.apply,assertObject=assert.obj,isExtensible=Object.isExtensible||$.it;function Enumerate(iterated){var keys=[],key;for(key in iterated)keys.push(key);$.set(this,ITER,{o:iterated,a:keys,i:0})}$iter.create(Enumerate,"Object",function(){var iter=this[ITER],keys=iter.a,key;do{if(iter.i>=keys.length)return step(1)}while(!((key=keys[iter.i++])in iter.o));return step(0,key)});function wrap(fn){return function(it){assertObject(it);try{fn.apply(undefined,arguments);return true}catch(e){return false}}}function reflectGet(target,propertyKey){var receiver=arguments.length<3?target:arguments[2],desc=getDesc(assertObject(target),propertyKey),proto;if(desc)return $.has(desc,"value")?desc.value:desc.get===undefined?undefined:desc.get.call(receiver);return isObject(proto=getProto(target))?reflectGet(proto,propertyKey,receiver):undefined}function reflectSet(target,propertyKey,V){var receiver=arguments.length<4?target:arguments[3],ownDesc=getDesc(assertObject(target),propertyKey),existingDescriptor,proto;if(!ownDesc){if(isObject(proto=getProto(target))){return reflectSet(proto,propertyKey,V,receiver)}ownDesc=$.desc(0)}if($.has(ownDesc,"value")){if(ownDesc.writable===false||!isObject(receiver))return false;existingDescriptor=getDesc(receiver,propertyKey)||$.desc(0);existingDescriptor.value=V;setDesc(receiver,propertyKey,existingDescriptor);return true}return ownDesc.set===undefined?false:(ownDesc.set.call(receiver,V),true)}var reflect={apply:require("./$.ctx")(Function.call,apply,3),construct:function(target,argumentsList){var proto=assert.fn(arguments.length<3?target:arguments[2]).prototype,instance=$.create(isObject(proto)?proto:Object.prototype),result=apply.call(target,instance,argumentsList);return isObject(result)?result:instance},defineProperty:wrap(setDesc),deleteProperty:function(target,propertyKey){var desc=getDesc(assertObject(target),propertyKey);return desc&&!desc.configurable?false:delete target[propertyKey]},enumerate:function(target){return new Enumerate(assertObject(target))},get:reflectGet,getOwnPropertyDescriptor:function(target,propertyKey){return getDesc(assertObject(target),propertyKey)},getPrototypeOf:function(target){return getProto(assertObject(target))},has:function(target,propertyKey){return propertyKey in target},isExtensible:function(target){return!!isExtensible(assertObject(target))},ownKeys:require("./$.own-keys"),preventExtensions:wrap(Object.preventExtensions||$.it),set:reflectSet};if(setProto)reflect.setPrototypeOf=function(target,proto){setProto(assertObject(target),proto);return true};$def($def.G,{Reflect:{}});$def($def.S,"Reflect",reflect)},{"./$":223,"./$.assert":212,"./$.ctx":218,"./$.def":219,"./$.iter":222,"./$.own-keys":225,"./$.set-proto":228,"./$.uid":232}],269:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),RegExp=$.g.RegExp,Base=RegExp,proto=RegExp.prototype;if($.FW&&$.DESC){if(!function(){try{return RegExp(/a/g,"i")=="/a/i"}catch(e){}}()){RegExp=function RegExp(pattern,flags){return new Base(cof(pattern)=="RegExp"&&flags!==undefined?pattern.source:pattern,flags)};$.each.call($.getNames(Base),function(key){key in RegExp||$.setDesc(RegExp,key,{configurable:true,get:function(){return Base[key]},set:function(it){Base[key]=it}})});proto.constructor=RegExp;RegExp.prototype=proto;$.hide($.g,"RegExp",RegExp)}if(/./g.flags!="g")$.setDesc(proto,"flags",{configurable:true,get:require("./$.replacer")(/^.*\/(\w*)$/,"$1")})}require("./$.species")(RegExp)},{"./$":223,"./$.cof":214,"./$.replacer":227,"./$.species":229}],270:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Set",{add:function(value){return strong.def(this,value=value===0?0:value,value)}},strong)},{"./$.collection":217,"./$.collection-strong":215}],271:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{codePointAt:require("./$.string-at")(false)})},{"./$.def":219,"./$.string-at":230}],272:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),toLength=$.toLength;$def($def.P,"String",{endsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),endPosition=arguments[1],len=toLength(that.length),end=endPosition===undefined?len:Math.min(toLength(endPosition),len);searchString+="";return that.slice(end-searchString.length,end)===searchString}})},{"./$":223,"./$.cof":214,"./$.def":219}],273:[function(require,module,exports){var $def=require("./$.def"),toIndex=require("./$").toIndex,fromCharCode=String.fromCharCode;$def($def.S,"String",{fromCodePoint:function(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")}})},{"./$":223,"./$.def":219}],274:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{includes:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();return!!~String($.assertDefined(this)).indexOf(searchString,arguments[1])}})},{"./$":223,"./$.cof":214,"./$.def":219}],275:[function(require,module,exports){var set=require("./$").set,at=require("./$.string-at")(true),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step;$iter.std(String,"String",function(iterated){set(this,ITER,{o:String(iterated),i:0})},function(){var iter=this[ITER],O=iter.o,index=iter.i,point;if(index>=O.length)return step(1);point=at.call(O,index);iter.i+=point.length;return step(0,point)})},{"./$":223,"./$.iter":222,"./$.string-at":230,"./$.uid":232}],276:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");$def($def.S,"String",{raw:function(callSite){var raw=$.toObject(callSite.raw),len=$.toLength(raw.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(raw[i++]));if(i0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}})},{"./$":223,"./$.def":219}],278:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{startsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),index=$.toLength(Math.min(arguments[1],that.length));searchString+="";return that.slice(index,index+searchString.length)===searchString}})},{"./$":223,"./$.cof":214,"./$.def":219}],279:[function(require,module,exports){"use strict";var $=require("./$"),setTag=require("./$.cof").set,uid=require("./$.uid"),$def=require("./$.def"),keyOf=require("./$.keyof"),has=$.has,hide=$.hide,getNames=$.getNames,toObject=$.toObject,Symbol=$.g.Symbol,Base=Symbol,setter=false,TAG=uid.safe("tag"),SymbolRegistry={},AllSymbols={};function wrap(tag){var sym=AllSymbols[tag]=$.set($.create(Symbol.prototype),TAG,tag);$.DESC&&setter&&$.setDesc(Object.prototype,tag,{configurable:true,set:function(value){hide(this,tag,value)}});return sym}if(!$.isFunction(Symbol)){Symbol=function(description){if(this instanceof Symbol)throw TypeError("Symbol is not a constructor");return wrap(uid(description))};hide(Symbol.prototype,"toString",function(){return this[TAG]})}$def($def.G+$def.W,{Symbol:Symbol});var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=Symbol(key)},keyFor:function(key){return keyOf(SymbolRegistry,key)},pure:uid.safe,set:$.set,useSetter:function(){setter=true},useSimple:function(){setter=false}};$.each.call(("hasInstance,isConcatSpreadable,iterator,match,replace,search,"+"species,split,toPrimitive,toStringTag,unscopables").split(","),function(it){var sym=require("./$.wks")(it);symbolStatics[it]=Symbol===Base?sym:wrap(sym)});setter=true;$def($def.S,"Symbol",symbolStatics);$def($def.S+$def.F*(Symbol!=Base),"Object",{getOwnPropertyNames:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])||result.push(key);return result},getOwnPropertySymbols:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])&&result.push(AllSymbols[key]);return result}});setTag(Symbol,"Symbol");setTag(Math,"Math",true);setTag($.g.JSON,"JSON",true)},{"./$":223,"./$.cof":214,"./$.def":219,"./$.keyof":224,"./$.uid":232,"./$.wks":234}],280:[function(require,module,exports){"use strict";var $=require("./$"),weak=require("./$.collection-weak"),leakStore=weak.leakStore,ID=weak.ID,WEAK=weak.WEAK,has=$.has,isObject=$.isObject,isFrozen=Object.isFrozen||$.core.Object.isFrozen,tmp={};var WeakMap=require("./$.collection")("WeakMap",{get:function(key){if(isObject(key)){if(isFrozen(key))return leakStore(this).get(key);if(has(key,WEAK))return key[WEAK][this[ID]]}},set:function(key,value){return weak.def(this,key,value)}},weak,true,true);if($.FW&&(new WeakMap).set((Object.freeze||Object)(tmp),7).get(tmp)!=7){$.each.call(["delete","has","get","set"],function(key){var method=WeakMap.prototype[key];WeakMap.prototype[key]=function(a,b){if(isObject(a)&&isFrozen(a)){var result=leakStore(this)[key](a,b);return key=="set"?this:result}return method.call(this,a,b)}})}},{"./$":223,"./$.collection":217,"./$.collection-weak":216}],281:[function(require,module,exports){"use strict";var weak=require("./$.collection-weak");require("./$.collection")("WeakSet",{add:function(value){return weak.def(this,value,true)}},weak,false,true)},{"./$.collection":217,"./$.collection-weak":216}],282:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{includes:require("./$.array-includes")(true)});require("./$.unscope")("includes")},{"./$.array-includes":210,"./$.def":219,"./$.unscope":233}],283:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),ownKeys=require("./$.own-keys");$def($def.S,"Object",{getOwnPropertyDescriptors:function(object){var O=$.toObject(object),result={};$.each.call(ownKeys(O),function(key){$.setDesc(result,key,$.desc(0,$.getDesc(O,key)))});return result}})},{"./$":223,"./$.def":219,"./$.own-keys":225}],284:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");function createObjectToArray(isEntries){return function(object){var O=$.toObject(object),keys=$.getKeys(object),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}$def($def.S,"Object",{values:createObjectToArray(false),entries:createObjectToArray(true)})},{"./$":223,"./$.def":219}],285:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"RegExp",{escape:require("./$.replacer")(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",true)})},{"./$.def":219,"./$.replacer":227}],286:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{at:require("./$.string-at")(true)})},{"./$.def":219,"./$.string-at":230}],287:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),core=$.core,statics={};function setStatics(keys,length){$.each.call(keys.split(","),function(key){if(length==undefined&&key in core.Array)statics[key]=core.Array[key];else if(key in[])statics[key]=require("./$.ctx")(Function.call,[][key],length)})}setStatics("pop,reverse,shift,keys,values,entries",1);setStatics("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);setStatics("join,slice,concat,push,splice,unshift,sort,lastIndexOf,"+"reduce,reduceRight,copyWithin,fill,turn");$def($def.S,"Array",statics)},{"./$":223,"./$.ctx":218,"./$.def":219}],288:[function(require,module,exports){require("./es6.array.iterator");var $=require("./$"),Iterators=require("./$.iter").Iterators,ITERATOR=require("./$.wks")("iterator"),NodeList=$.g.NodeList;if($.FW&&NodeList&&!(ITERATOR in NodeList.prototype)){$.hide(NodeList.prototype,ITERATOR,Iterators.Array)}Iterators.NodeList=Iterators.Array},{"./$":223,"./$.iter":222,"./$.wks":234,"./es6.array.iterator":254}],289:[function(require,module,exports){var $def=require("./$.def"),$task=require("./$.task");$def($def.G+$def.B,{setImmediate:$task.set,clearImmediate:$task.clear})},{"./$.def":219,"./$.task":231}],290:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),invoke=require("./$.invoke"),partial=require("./$.partial"),MSIE=!!$.g.navigator&&/MSIE .\./.test(navigator.userAgent);function wrap(set){return MSIE?function(fn,time){return set(invoke(partial,[].slice.call(arguments,2),$.isFunction(fn)?fn:Function(fn)),time)}:set}$def($def.G+$def.B+$def.F*MSIE,{setTimeout:wrap($.g.setTimeout),setInterval:wrap($.g.setInterval)})},{"./$":223,"./$.def":219,"./$.invoke":221,"./$.partial":226}],291:[function(require,module,exports){require("./modules/es5");require("./modules/es6.symbol");require("./modules/es6.object.assign");require("./modules/es6.object.is");require("./modules/es6.object.set-prototype-of");require("./modules/es6.object.to-string");require("./modules/es6.object.statics-accept-primitives");require("./modules/es6.function.name");require("./modules/es6.number.constructor");require("./modules/es6.number.statics");require("./modules/es6.math");require("./modules/es6.string.from-code-point");require("./modules/es6.string.raw");require("./modules/es6.string.iterator");require("./modules/es6.string.code-point-at");require("./modules/es6.string.ends-with");require("./modules/es6.string.includes");require("./modules/es6.string.repeat");require("./modules/es6.string.starts-with");require("./modules/es6.array.from");require("./modules/es6.array.of");require("./modules/es6.array.iterator");require("./modules/es6.array.species");require("./modules/es6.array.copy-within");require("./modules/es6.array.fill");require("./modules/es6.array.find");require("./modules/es6.array.find-index");require("./modules/es6.regexp");require("./modules/es6.promise");require("./modules/es6.map");require("./modules/es6.set");require("./modules/es6.weak-map");require("./modules/es6.weak-set");require("./modules/es6.reflect");require("./modules/es7.array.includes");require("./modules/es7.string.at");require("./modules/es7.regexp.escape");require("./modules/es7.object.get-own-property-descriptors");require("./modules/es7.object.to-array");require("./modules/js.array.statics");require("./modules/web.timers");require("./modules/web.immediate");require("./modules/web.dom.iterable");module.exports=require("./modules/$").core},{"./modules/$":223,"./modules/es5":248,"./modules/es6.array.copy-within":249,"./modules/es6.array.fill":250,"./modules/es6.array.find":252,"./modules/es6.array.find-index":251,"./modules/es6.array.from":253,"./modules/es6.array.iterator":254,"./modules/es6.array.of":255,"./modules/es6.array.species":256,"./modules/es6.function.name":257,"./modules/es6.map":258,"./modules/es6.math":259,"./modules/es6.number.constructor":260,"./modules/es6.number.statics":261,"./modules/es6.object.assign":262,"./modules/es6.object.is":263,"./modules/es6.object.set-prototype-of":264,"./modules/es6.object.statics-accept-primitives":265,"./modules/es6.object.to-string":266,"./modules/es6.promise":267,"./modules/es6.reflect":268,"./modules/es6.regexp":269,"./modules/es6.set":270,"./modules/es6.string.code-point-at":271,"./modules/es6.string.ends-with":272,"./modules/es6.string.from-code-point":273,"./modules/es6.string.includes":274,"./modules/es6.string.iterator":275,"./modules/es6.string.raw":276,"./modules/es6.string.repeat":277,"./modules/es6.string.starts-with":278,"./modules/es6.symbol":279,"./modules/es6.weak-map":280,"./modules/es6.weak-set":281,"./modules/es7.array.includes":282,"./modules/es7.object.get-own-property-descriptors":283,"./modules/es7.object.to-array":284,"./modules/es7.regexp.escape":285,"./modules/es7.string.at":286,"./modules/js.array.statics":287,"./modules/web.dom.iterable":288,"./modules/web.immediate":289,"./modules/web.timers":290}],292:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;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]){args=["%o"].concat(args)}var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);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}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(msmaxUsed||u===maxUsed&&w>maxWeight){ -maxUsed=u;maxWeight=w;result=+n}}return result}module.exports=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}var tabs=0;var spaces=0;var prev=0;var indents={};var current;var isIndent;str.split(/\n/g).forEach(function(line){if(!line){return}var indent;var matches=line.match(INDENT_RE);if(!matches){indent=0}else{indent=matches[0].length;if(matches[1]){spaces++}else{tabs++}}var diff=indent-prev;prev=indent;if(diff){isIndent=diff>0;current=indents[isIndent?diff:-diff];if(current){current[0]++}else{current=indents[diff]=[1,0]}}else if(current){current[1]+=+isIndent}});var amount=getMostUsed(indents);var type;var actual;if(!amount){type=null;actual=""}else if(spaces>=tabs){type="space";actual=repeating(" ",amount)}else{type="tab";actual=repeating(" ",amount)}return{amount:amount,type:type,indent:actual}}},{repeating:437}],296:[function(require,module,exports){(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(["exports"],factory)}else if(typeof exports!=="undefined"){factory(exports)}else{factory(root.estraverse={})}})(this,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);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=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()){key=element.ref.key;parent=element.ref.parent;i=worklist.length;while(i--){nextElem=worklist[i];if(nextElem.ref&&nextElem.ref.parent===parent){if(nextElem.ref.key=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){var comments=[],comment,len,i,cursor;if(!tree.range){throw new Error("attachComments needs range information")}if(!tokens.length){if(providedComments.length){for(i=0,len=providedComments.length;inode.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}}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(cursornode.range[1]){return VisitorOption.Skip}}});return tree}exports.version="1.8.1-dev";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})},{}],297:[function(require,module,exports){(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}})()},{}],298:[function(require,module,exports){(function(){"use strict";var Regex,NON_ASCII_WHITESPACES;Regex={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function isDecimalDigit(ch){return ch>=48&&ch<=57}function isHexDigit(ch){return isDecimalDigit(ch)||97<=ch&&ch<=102||65<=ch&&ch<=70}function isOctalDigit(ch){return ch>=48&&ch<=55}NON_ASCII_WHITESPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&NON_ASCII_WHITESPACES.indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function isIdentifierStart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))}function isIdentifierPart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch>=48&&ch<=57||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))}module.exports={isDecimalDigit:isDecimalDigit,isHexDigit:isHexDigit,isOctalDigit:isOctalDigit,isWhiteSpace:isWhiteSpace,isLineTerminator:isLineTerminator,isIdentifierStart:isIdentifierStart,isIdentifierPart:isIdentifierPart}})()},{}],299:[function(require,module,exports){(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){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){return false}for(i=1,iz=id.length;i!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g;module.exports.matchToToken=function(match){token={type:"invalid",value:match[0]};if(match[1])token.type="string",token.closed=!!(match[3]||match[4]);else if(match[5])token.type="comment";else if(match[6])token.type="comment",token.closed=!!match[7];else if(match[8])token.type="regex";else if(match[9])token.type="number";else if(match[10])token.type="name";else if(match[11])token.type="punctuator";else if(match[12])token.type="whitespace";return token}},{}],307:[function(require,module,exports){var arr=[];var charCodeCache=[];module.exports=function(a,b){if(a===b){return 0}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen}if(bLen===0){return aLen}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(iret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2}}return ret}},{}],308:[function(require,module,exports){var leftPad=require("left-pad");function get(options,key,defaultValue){return key in options?options[key]:defaultValue}function lineNumbers(code,options){var getOption=get.bind(null,options||{});var transform=getOption("transform",Function.prototype);var padding=getOption("padding"," ");var before=getOption("before"," ");var after=getOption("after"," | ");var start=getOption("start",1);var isArray=Array.isArray(code);var lines=isArray?code:code.split("\n");var end=start+lines.length-1;var width=String(end).length;var numbered=lines.map(function(line,index){var number=start+index;var params={before:before,number:number,width:width,after:after,line:line};transform(params);return params.before+leftPad(params.number,width,padding)+params.after+params.line});return isArray?numbered:numbered.join("\n")}module.exports=lineNumbers},{"left-pad":309}],309:[function(require,module,exports){module.exports=leftpad;function leftpad(str,len,ch){str=String(str);var i=-1;ch||(ch=" ");len=len-str.length;while(++i-1){splice.call(array,fromIndex,1)}}return array}module.exports=pull},{"../internal/baseIndexOf":345}],314:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseUniq=require("../internal/baseUniq"),isIterateeCall=require("../internal/isIterateeCall"),sortedUniq=require("../internal/sortedUniq");function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(isSorted!=null&&typeof isSorted!="boolean"){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?null:isSorted;isSorted=false}iteratee=iteratee==null?iteratee:baseCallback(iteratee,thisArg,3);return isSorted?sortedUniq(array,iteratee):baseUniq(array,iteratee)}module.exports=uniq},{"../internal/baseCallback":333,"../internal/baseUniq":360,"../internal/isIterateeCall":382,"../internal/sortedUniq":388}],315:[function(require,module,exports){module.exports=require("./includes")},{"./includes":319}],316:[function(require,module,exports){module.exports=require("./forEach")},{"./forEach":317}],317:[function(require,module,exports){var arrayEach=require("../internal/arrayEach"),baseEach=require("../internal/baseEach"),createForEach=require("../internal/createForEach");var forEach=createForEach(arrayEach,baseEach);module.exports=forEach},{"../internal/arrayEach":327,"../internal/baseEach":337,"../internal/createForEach":372}],318:[function(require,module,exports){var createAggregator=require("../internal/createAggregator");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value)}else{result[key]=[value]}});module.exports=groupBy},{"../internal/createAggregator":367}],319:[function(require,module,exports){var baseIndexOf=require("../internal/baseIndexOf"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength"),isString=require("../lang/isString"),values=require("../object/values");var nativeMax=Math.max;function includes(collection,target,fromIndex,guard){var length=collection?collection.length:0;if(!isLength(length)){collection=values(collection);length=collection.length}if(!length){return false}if(typeof fromIndex!="number"||guard&&isIterateeCall(target,fromIndex,guard)){fromIndex=0}else{fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex-1:baseIndexOf(collection,target,fromIndex)>-1}module.exports=includes},{"../internal/baseIndexOf":345,"../internal/isIterateeCall":382,"../internal/isLength":383,"../lang/isArray":392,"../lang/isString":401,"../object/values":411}],320:[function(require,module,exports){var arrayMap=require("../internal/arrayMap"),baseCallback=require("../internal/baseCallback"),baseMap=require("../internal/baseMap"),isArray=require("../lang/isArray");function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=baseCallback(iteratee,thisArg,3);return func(collection,iteratee)}module.exports=map},{"../internal/arrayMap":328,"../internal/baseCallback":333,"../internal/baseMap":350,"../lang/isArray":392}],321:[function(require,module,exports){var arrayReduceRight=require("../internal/arrayReduceRight"),baseEachRight=require("../internal/baseEachRight"),createReduce=require("../internal/createReduce");var reduceRight=createReduce(arrayReduceRight,baseEachRight);module.exports=reduceRight},{"../internal/arrayReduceRight":329,"../internal/baseEachRight":338,"../internal/createReduce":373}],322:[function(require,module,exports){var arraySome=require("../internal/arraySome"),baseCallback=require("../internal/baseCallback"),baseSome=require("../internal/baseSome"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall");function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=null}if(typeof predicate!="function"||typeof thisArg!="undefined"){predicate=baseCallback(predicate,thisArg,3)}return func(collection,predicate)}module.exports=some},{"../internal/arraySome":330,"../internal/baseCallback":333,"../internal/baseSome":357,"../internal/isIterateeCall":382,"../lang/isArray":392}],323:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseEach=require("../internal/baseEach"),baseSortBy=require("../internal/baseSortBy"),compareAscending=require("../internal/compareAscending"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength");function sortBy(collection,iteratee,thisArg){if(collection==null){return[]}var index=-1,length=collection.length,result=isLength(length)?Array(length):[];if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=null}iteratee=baseCallback(iteratee,thisArg,3);baseEach(collection,function(value,key,collection){result[++index]={criteria:iteratee(value,key,collection),index:index,value:value}});return baseSortBy(result,compareAscending)}module.exports=sortBy},{"../internal/baseCallback":333,"../internal/baseEach":337,"../internal/baseSortBy":358,"../internal/compareAscending":366,"../internal/isIterateeCall":382,"../internal/isLength":383}],324:[function(require,module,exports){var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max;function restParam(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=nativeMax(typeof start=="undefined"?func.length-1:+start||0,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);while(++indexother||!valIsReflexive||typeof value=="undefined"&&othIsReflexive){return 1}if(value=200,seen=isLarge?createCache():null,result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index3&&typeof customizer=="function"){customizer=bindCallback(customizer,thisArg,5);length-=2}else{customizer=length>2&&typeof thisArg=="function"?thisArg:null;length-=customizer?1:0}if(guard&&isIterateeCall(args[1],args[2],guard)){customizer=length==3?null:customizer;length=2}var index=0;while(++indexarrLength)){return false}while(result&&++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}module.exports=isLength},{}],384:[function(require,module,exports){function isObjectLike(value){return!!value&&typeof value=="object"}module.exports=isObjectLike},{}],385:[function(require,module,exports){var isObject=require("../lang/isObject");function isStrictComparable(value){return value===value&&(value===0?1/value>0:!isObject(value))}module.exports=isStrictComparable},{"../lang/isObject":398}],386:[function(require,module,exports){var baseForIn=require("./baseForIn"),isObjectLike=require("./isObjectLike");var objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;function shimIsPlainObject(value){var Ctor;if(!(isObjectLike(value)&&objToString.call(value)==objectTag)||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;baseForIn(value,function(subValue,key){result=key});return typeof result=="undefined"||hasOwnProperty.call(value,result)}module.exports=shimIsPlainObject},{"./baseForIn":341,"./isObjectLike":384}],387:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isIndex=require("./isIndex"),isLength=require("./isLength"),keysIn=require("../object/keysIn"),support=require("../support");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length;var allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object));var index=-1,result=[];while(++index0;while(++index=0;i--){filename=f[i];if(filename)break}for(var i=0,l=set.length;i>> no match, partial?",file,fr,pattern,pr);if(fr===fl)return true}return false}var hit;if(typeof p==="string"){if(options.nocase){hit=f.toLowerCase()===p.toLowerCase()}else{hit=f===p}this.debug("string match",p,f,hit)}else{hit=f.match(p);this.debug("pattern match",p,f,hit)}if(!hit)return false}if(fi===fl&&pi===pl){return true}else if(fi===fl){return partial}else if(pi===pl){var emptyFileEnd=fi===fl-1&&file[fi]==="";return emptyFileEnd}throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}}).call(this,require("_process"))},{_process:183,"brace-expansion":417}],417:[function(require,module,exports){var concatMap=require("concat-map");var balanced=require("balanced-match");module.exports=expandTop;var escSlash="\x00SLASH"+Math.random()+"\x00";var escOpen="\x00OPEN"+Math.random()+"\x00";var escClose="\x00CLOSE"+Math.random()+"\x00";var escComma="\x00COMMA"+Math.random()+"\x00";var escPeriod="\x00PERIOD"+Math.random()+"\x00";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[];var m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre;var body=m.body;var post=m.post;var p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);if(post.length){p[p.length-1]+=postParts.shift();p.push.apply(p,postParts)}parts.push.apply(parts,p);return parts}function expandTop(str){if(!str)return[];return expand(escapeBraces(str),true).map(unescapeBraces)}function identity(e){return e}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,isTop){var expansions=[];var m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);var isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);var isSequence=isNumericSequence||isAlphaSequence;var isOptions=/^(.*,)+(.+)?$/.test(m.body);if(!isSequence&&!isOptions){if(m.post.match(/,.*}/)){str=m.pre+"{"+m.body+escClose+m.post;return expand(str)}return[str]}var n;if(isSequence){n=m.body.split(/\.\./)}else{n=parseCommaParts(m.body);if(n.length===1){n=expand(n[0],false).map(embrace);if(n.length===1){var post=m.post.length?expand(m.post,false):[""];return post.map(function(p){return m.pre+n[0]+p})}}}var pre=m.pre;var post=m.post.length?expand(m.post,false):[""];var N;if(isSequence){var x=numeric(n[0]);var y=numeric(n[1]);var width=Math.max(n[0].length,n[1].length);var incr=n.length==3?Math.abs(numeric(n[2])):1;var test=lte;var reverse=y0){var z=new Array(need+1).join("0");if(i<0)c="-"+z+c.slice(1);else c=z+c}}}N.push(c)}}else{N=concatMap(n,function(el){return expand(el,false)})}for(var j=0;j1?str.substring(m.start+a.length,m.end):"";m.post=str.slice(m.end+b.length);return m}}}if(bal&&ended){var start=m.start+a.length;m=balanced(a,b,str.substr(start));if(m){m.start+=start;m.end+=start;m.pre=str.slice(0,start)+m.pre}return m}}},{}],419:[function(require,module,exports){module.exports=function(xs,fn){var res=[];for(var i=0;idst){names[dst]=names[src]}++dst}}names.length=dst;return names};function defaultCreatorFn(object){return create(null)}function makeAccessor(secretCreatorFn){var brand=makeUniqueKey();var passkey=create(null);secretCreatorFn=secretCreatorFn||defaultCreatorFn;function register(object){var secret;function vault(key,forget){if(key===passkey){return forget?secret=null:secret||(secret=secretCreatorFn(object))}}defProp(object,brand,vault)}function accessor(object){if(!hasOwn.call(object,brand))register(object);return object[brand](passkey)}accessor.forget=function(object){if(hasOwn.call(object,brand))object[brand](passkey,true)};return accessor}defProp(exports,"makeAccessor",makeAccessor)},{}],422:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var isArray=types.builtInTypes.array;var b=types.builders;var n=types.namedTypes;var leap=require("./leap");var meta=require("./meta");var util=require("./util");var hasOwn=Object.prototype.hasOwnProperty;function Emitter(contextId){assert.ok(this instanceof Emitter);n.Identifier.assert(contextId);Object.defineProperties(this,{contextId:{value:contextId},listing:{value:[]},marked:{value:[true]},finalLoc:{value:loc()},tryEntries:{value:[]}});Object.defineProperties(this,{leapManager:{value:new leap.LeapManager(this)}})}var Ep=Emitter.prototype;exports.Emitter=Emitter;function loc(){return b.literal(-1)}Ep.mark=function(loc){n.Literal.assert(loc);var index=this.listing.length;if(loc.value===-1){loc.value=index}else{assert.strictEqual(loc.value,index)}this.marked[index]=true;return loc};Ep.emit=function(node){if(n.Expression.check(node))node=b.expressionStatement(node);n.Statement.assert(node);this.listing.push(node)};Ep.emitAssign=function(lhs,rhs){this.emit(this.assign(lhs,rhs));return lhs};Ep.assign=function(lhs,rhs){return b.expressionStatement(b.assignmentExpression("=",lhs,rhs))};Ep.contextProperty=function(name,computed){return b.memberExpression(this.contextId,computed?b.literal(name):b.identifier(name),!!computed)};var volatileContextPropertyNames={prev:true,next:true,sent:true,rval:true};Ep.isVolatileContextProperty=function(expr){if(n.MemberExpression.check(expr)){if(expr.computed){return true}if(n.Identifier.check(expr.object)&&n.Identifier.check(expr.property)&&expr.object.name===this.contextId.name&&hasOwn.call(volatileContextPropertyNames,expr.property.name)){return true}}return false};Ep.stop=function(rval){if(rval){this.setReturnValue(rval)}this.jump(this.finalLoc)};Ep.setReturnValue=function(valuePath){n.Expression.assert(valuePath.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(valuePath))};Ep.clearPendingException=function(tryLoc,assignee){n.Literal.assert(tryLoc);var catchCall=b.callExpression(this.contextProperty("catch",true),[tryLoc]);if(assignee){this.emitAssign(assignee,catchCall)}else{this.emit(catchCall)}};Ep.jump=function(toLoc){this.emitAssign(this.contextProperty("next"),toLoc);this.emit(b.breakStatement())};Ep.jumpIf=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);this.emit(b.ifStatement(test,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};Ep.jumpIfNot=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);var negatedTest;if(n.UnaryExpression.check(test)&&test.operator==="!"){negatedTest=test.argument}else{negatedTest=b.unaryExpression("!",test)}this.emit(b.ifStatement(negatedTest,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};var nextTempId=0;Ep.makeTempVar=function(){return this.contextProperty("t"+nextTempId++)};Ep.getContextFunction=function(id){var func=b.functionExpression(id||null,[this.contextId],b.blockStatement([this.getDispatchLoop()]),false,false);func._aliasFunction=true;return func};Ep.getDispatchLoop=function(){var self=this;var cases=[];var current;var alreadyEnded=false;self.listing.forEach(function(stmt,i){if(self.marked.hasOwnProperty(i)){cases.push(b.switchCase(b.literal(i),current=[]));alreadyEnded=false}if(!alreadyEnded){current.push(stmt);if(isSwitchCaseEnder(stmt))alreadyEnded=true}});this.finalLoc.value=this.listing.length;cases.push(b.switchCase(this.finalLoc,[]),b.switchCase(b.literal("end"),[b.returnStatement(b.callExpression(this.contextProperty("stop"),[]))]));return b.whileStatement(b.literal(1),b.switchStatement(b.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),cases))};function isSwitchCaseEnder(stmt){return n.BreakStatement.check(stmt)||n.ContinueStatement.check(stmt)||n.ReturnStatement.check(stmt)||n.ThrowStatement.check(stmt)}Ep.getTryLocsList=function(){if(this.tryEntries.length===0){return null}var lastLocValue=0;return b.arrayExpression(this.tryEntries.map(function(tryEntry){var thisLocValue=tryEntry.firstLoc.value;assert.ok(thisLocValue>=lastLocValue,"try entries out of order");lastLocValue=thisLocValue;var ce=tryEntry.catchEntry;var fe=tryEntry.finallyEntry;var locs=[tryEntry.firstLoc,ce?ce.firstLoc:null];if(fe){locs[2]=fe.firstLoc;locs[3]=fe.afterLoc}return b.arrayExpression(locs)}))};Ep.explode=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var node=path.value;var self=this;n.Node.assert(node);if(n.Statement.check(node))return self.explodeStatement(path);if(n.Expression.check(node))return self.explodeExpression(path,ignoreResult);if(n.Declaration.check(node))throw getDeclError(node);switch(node.type){case"Program":return path.get("body").map(self.explodeStatement,self);case"VariableDeclarator":throw getDeclError(node);case"Property":case"SwitchCase":case"CatchClause":throw new Error(node.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(node.type))}};function getDeclError(node){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+JSON.stringify(node))}Ep.explodeStatement=function(path,labelId){assert.ok(path instanceof types.NodePath);var stmt=path.value;var self=this;n.Statement.assert(stmt);if(labelId){n.Identifier.assert(labelId)}else{labelId=null}if(n.BlockStatement.check(stmt)){return path.get("body").each(self.explodeStatement,self)}if(!meta.containsLeap(stmt)){self.emit(stmt);return}switch(stmt.type){case"ExpressionStatement":self.explodeExpression(path.get("expression"),true);break;case"LabeledStatement":var after=loc();self.leapManager.withEntry(new leap.LabeledEntry(after,stmt.label),function(){self.explodeStatement(path.get("body"),stmt.label)});self.mark(after);break;case"WhileStatement":var before=loc();var after=loc();self.mark(before);self.jumpIfNot(self.explodeExpression(path.get("test")),after);self.leapManager.withEntry(new leap.LoopEntry(after,before,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(before);self.mark(after);break;case"DoWhileStatement":var first=loc();var test=loc();var after=loc();self.mark(first);self.leapManager.withEntry(new leap.LoopEntry(after,test,labelId),function(){self.explode(path.get("body"))});self.mark(test);self.jumpIf(self.explodeExpression(path.get("test")),first);self.mark(after);break;case"ForStatement":var head=loc();var update=loc();var after=loc();if(stmt.init){self.explode(path.get("init"),true)}self.mark(head);if(stmt.test){self.jumpIfNot(self.explodeExpression(path.get("test")),after)}else{}self.leapManager.withEntry(new leap.LoopEntry(after,update,labelId),function(){self.explodeStatement(path.get("body"))});self.mark(update);if(stmt.update){self.explode(path.get("update"),true)}self.jump(head);self.mark(after);break;case"ForInStatement":n.Identifier.assert(stmt.left);var head=loc();var after=loc();var keyIterNextFn=self.makeTempVar();self.emitAssign(keyIterNextFn,b.callExpression(util.runtimeProperty("keys"),[self.explodeExpression(path.get("right"))]));self.mark(head);var keyInfoTmpVar=self.makeTempVar();self.jumpIf(b.memberExpression(b.assignmentExpression("=",keyInfoTmpVar,b.callExpression(keyIterNextFn,[])),b.identifier("done"),false),after);self.emitAssign(stmt.left,b.memberExpression(keyInfoTmpVar,b.identifier("value"),false));self.leapManager.withEntry(new leap.LoopEntry(after,head,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(head);self.mark(after);break;case"BreakStatement":self.emitAbruptCompletion({type:"break",target:self.leapManager.getBreakLoc(stmt.label)});break;case"ContinueStatement":self.emitAbruptCompletion({type:"continue",target:self.leapManager.getContinueLoc(stmt.label)});break;case"SwitchStatement":var disc=self.emitAssign(self.makeTempVar(),self.explodeExpression(path.get("discriminant")));var after=loc();var defaultLoc=loc();var condition=defaultLoc;var caseLocs=[];var cases=stmt.cases||[];for(var i=cases.length-1;i>=0;--i){var c=cases[i];n.SwitchCase.assert(c);if(c.test){condition=b.conditionalExpression(b.binaryExpression("===",disc,c.test),caseLocs[i]=loc(),condition)}else{caseLocs[i]=defaultLoc}}self.jump(self.explodeExpression(new types.NodePath(condition,path,"discriminant")));self.leapManager.withEntry(new leap.SwitchEntry(after),function(){path.get("cases").each(function(casePath){var c=casePath.value;var i=casePath.name;self.mark(caseLocs[i]);casePath.get("consequent").each(self.explodeStatement,self)})});self.mark(after);if(defaultLoc.value===-1){self.mark(defaultLoc);assert.strictEqual(after.value,defaultLoc.value)}break;case"IfStatement":var elseLoc=stmt.alternate&&loc();var after=loc();self.jumpIfNot(self.explodeExpression(path.get("test")),elseLoc||after);self.explodeStatement(path.get("consequent"));if(elseLoc){self.jump(after);self.mark(elseLoc);self.explodeStatement(path.get("alternate"))}self.mark(after);break;case"ReturnStatement":self.emitAbruptCompletion({type:"return",value:self.explodeExpression(path.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var after=loc();var handler=stmt.handler;if(!handler&&stmt.handlers){handler=stmt.handlers[0]||null}var catchLoc=handler&&loc();var catchEntry=catchLoc&&new leap.CatchEntry(catchLoc,handler.param);var finallyLoc=stmt.finalizer&&loc();var finallyEntry=finallyLoc&&new leap.FinallyEntry(finallyLoc,after);var tryEntry=new leap.TryEntry(self.getUnmarkedCurrentLoc(),catchEntry,finallyEntry);self.tryEntries.push(tryEntry);self.updateContextPrevLoc(tryEntry.firstLoc);self.leapManager.withEntry(tryEntry,function(){self.explodeStatement(path.get("block"));if(catchLoc){if(finallyLoc){self.jump(finallyLoc)}else{self.jump(after)}self.updateContextPrevLoc(self.mark(catchLoc));var bodyPath=path.get("handler","body");var safeParam=self.makeTempVar();self.clearPendingException(tryEntry.firstLoc,safeParam);var catchScope=bodyPath.scope;var catchParamName=handler.param.name;n.CatchClause.assert(catchScope.node);assert.strictEqual(catchScope.lookup(catchParamName),catchScope);types.visit(bodyPath,{visitIdentifier:function(path){if(util.isReference(path,catchParamName)&&path.scope.lookup(catchParamName)===catchScope){return safeParam}this.traverse(path)},visitFunction:function(path){if(path.scope.declares(catchParamName)){return false}this.traverse(path)}});self.leapManager.withEntry(catchEntry,function(){self.explodeStatement(bodyPath)})}if(finallyLoc){self.updateContextPrevLoc(self.mark(finallyLoc));self.leapManager.withEntry(finallyEntry,function(){self.explodeStatement(path.get("finalizer"))});self.emit(b.returnStatement(b.callExpression(self.contextProperty("finish"),[finallyEntry.firstLoc])))}});self.mark(after);break;case"ThrowStatement":self.emit(b.throwStatement(self.explodeExpression(path.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(stmt.type))}};Ep.emitAbruptCompletion=function(record){if(!isValidCompletion(record)){assert.ok(false,"invalid completion record: "+JSON.stringify(record))}assert.notStrictEqual(record.type,"normal","normal completions are not abrupt");var abruptArgs=[b.literal(record.type)];if(record.type==="break"||record.type==="continue"){n.Literal.assert(record.target);abruptArgs[1]=record.target}else if(record.type==="return"||record.type==="throw"){if(record.value){n.Expression.assert(record.value);abruptArgs[1]=record.value}}this.emit(b.returnStatement(b.callExpression(this.contextProperty("abrupt"),abruptArgs)))};function isValidCompletion(record){var type=record.type;if(type==="normal"){return!hasOwn.call(record,"target")}if(type==="break"||type==="continue"){return!hasOwn.call(record,"value")&&n.Literal.check(record.target)}if(type==="return"||type==="throw"){return hasOwn.call(record,"value")&&!hasOwn.call(record,"target")}return false}Ep.getUnmarkedCurrentLoc=function(){return b.literal(this.listing.length)};Ep.updateContextPrevLoc=function(loc){if(loc){n.Literal.assert(loc);if(loc.value===-1){loc.value=this.listing.length}else{assert.strictEqual(loc.value,this.listing.length)}}else{loc=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),loc)};Ep.explodeExpression=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var expr=path.value;if(expr){n.Expression.assert(expr)}else{return expr}var self=this;var result;function finish(expr){n.Expression.assert(expr);if(ignoreResult){self.emit(expr)}else{return expr}}if(!meta.containsLeap(expr)){return finish(expr)}var hasLeapingChildren=meta.containsLeap.onlyChildren(expr);function explodeViaTempVar(tempVar,childPath,ignoreChildResult){assert.ok(childPath instanceof types.NodePath);assert.ok(!ignoreChildResult||!tempVar,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var result=self.explodeExpression(childPath,ignoreChildResult);if(ignoreChildResult){}else if(tempVar||hasLeapingChildren&&(self.isVolatileContextProperty(result)||meta.hasSideEffects(result))){result=self.emitAssign(tempVar||self.makeTempVar(),result)}return result}switch(expr.type){case"MemberExpression":return finish(b.memberExpression(self.explodeExpression(path.get("object")),expr.computed?explodeViaTempVar(null,path.get("property")):expr.property,expr.computed));case"CallExpression":var oldCalleePath=path.get("callee");var newCallee=self.explodeExpression(oldCalleePath);if(!n.MemberExpression.check(oldCalleePath.node)&&n.MemberExpression.check(newCallee)){newCallee=b.sequenceExpression([b.literal(0),newCallee])}return finish(b.callExpression(newCallee,path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"NewExpression":return finish(b.newExpression(explodeViaTempVar(null,path.get("callee")),path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"ObjectExpression":return finish(b.objectExpression(path.get("properties").map(function(propPath){return b.property(propPath.value.kind,propPath.value.key,explodeViaTempVar(null,propPath.get("value")))})));case"ArrayExpression":return finish(b.arrayExpression(path.get("elements").map(function(elemPath){return explodeViaTempVar(null,elemPath)})));case"SequenceExpression":var lastIndex=expr.expressions.length-1;path.get("expressions").each(function(exprPath){if(exprPath.name===lastIndex){result=self.explodeExpression(exprPath,ignoreResult)}else{self.explodeExpression(exprPath,true)}});return result;case"LogicalExpression":var after=loc();if(!ignoreResult){result=self.makeTempVar()}var left=explodeViaTempVar(result,path.get("left"));if(expr.operator==="&&"){self.jumpIfNot(left,after)}else{assert.strictEqual(expr.operator,"||");self.jumpIf(left,after)}explodeViaTempVar(result,path.get("right"),ignoreResult);self.mark(after);return result;case"ConditionalExpression":var elseLoc=loc();var after=loc();var test=self.explodeExpression(path.get("test"));self.jumpIfNot(test,elseLoc);if(!ignoreResult){result=self.makeTempVar()}explodeViaTempVar(result,path.get("consequent"),ignoreResult);self.jump(after);self.mark(elseLoc);explodeViaTempVar(result,path.get("alternate"),ignoreResult);self.mark(after);return result;case"UnaryExpression":return finish(b.unaryExpression(expr.operator,self.explodeExpression(path.get("argument")),!!expr.prefix));case"BinaryExpression":return finish(b.binaryExpression(expr.operator,explodeViaTempVar(null,path.get("left")),explodeViaTempVar(null,path.get("right"))));case"AssignmentExpression":return finish(b.assignmentExpression(expr.operator,self.explodeExpression(path.get("left")),self.explodeExpression(path.get("right"))));case"UpdateExpression":return finish(b.updateExpression(expr.operator,self.explodeExpression(path.get("argument")),expr.prefix));case"YieldExpression":var after=loc();var arg=expr.argument&&self.explodeExpression(path.get("argument"));if(arg&&expr.delegate){var result=self.makeTempVar();self.emit(b.returnStatement(b.callExpression(self.contextProperty("delegateYield"),[arg,b.literal(result.property.name),after])));self.mark(after);return result}self.emitAssign(self.contextProperty("next"),after);self.emit(b.returnStatement(arg||null));self.mark(after);return self.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(expr.type))}}},{"./leap":424,"./meta":425,"./util":426,assert:173,"ast-types":171}],423:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.hoist=function(funPath){assert.ok(funPath instanceof types.NodePath);n.Function.assert(funPath.value);var vars={};function varDeclToExpr(vdec,includeIdentifiers){ -n.VariableDeclaration.assert(vdec);var exprs=[];vdec.declarations.forEach(function(dec){vars[dec.id.name]=dec.id;if(dec.init){exprs.push(b.assignmentExpression("=",dec.id,dec.init))}else if(includeIdentifiers){exprs.push(dec.id)}});if(exprs.length===0)return null;if(exprs.length===1)return exprs[0];return b.sequenceExpression(exprs)}types.visit(funPath.get("body"),{visitVariableDeclaration:function(path){var expr=varDeclToExpr(path.value,false);if(expr===null){path.replace()}else{return b.expressionStatement(expr)}return false},visitForStatement:function(path){var init=path.value.init;if(n.VariableDeclaration.check(init)){path.get("init").replace(varDeclToExpr(init,false))}this.traverse(path)},visitForInStatement:function(path){var left=path.value.left;if(n.VariableDeclaration.check(left)){path.get("left").replace(varDeclToExpr(left,true))}this.traverse(path)},visitFunctionDeclaration:function(path){var node=path.value;vars[node.id.name]=node.id;var parentNode=path.parent.node;var assignment=b.expressionStatement(b.assignmentExpression("=",node.id,b.functionExpression(node.id,node.params,node.body,node.generator,node.expression)));if(n.BlockStatement.check(path.parent.node)){path.parent.get("body").unshift(assignment);path.replace()}else{path.replace(assignment)}return false},visitFunctionExpression:function(path){return false}});var paramNames={};funPath.get("params").each(function(paramPath){var param=paramPath.value;if(n.Identifier.check(param)){paramNames[param.name]=param}else{}});var declarations=[];Object.keys(vars).forEach(function(name){if(!hasOwn.call(paramNames,name)){declarations.push(b.variableDeclarator(vars[name],null))}});if(declarations.length===0){return null}return b.variableDeclaration("var",declarations)}},{assert:173,"ast-types":171}],424:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var inherits=require("util").inherits;var hasOwn=Object.prototype.hasOwnProperty;function Entry(){assert.ok(this instanceof Entry)}function FunctionEntry(returnLoc){Entry.call(this);n.Literal.assert(returnLoc);this.returnLoc=returnLoc}inherits(FunctionEntry,Entry);exports.FunctionEntry=FunctionEntry;function LoopEntry(breakLoc,continueLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Literal.assert(continueLoc);if(label){n.Identifier.assert(label)}else{label=null}this.breakLoc=breakLoc;this.continueLoc=continueLoc;this.label=label}inherits(LoopEntry,Entry);exports.LoopEntry=LoopEntry;function SwitchEntry(breakLoc){Entry.call(this);n.Literal.assert(breakLoc);this.breakLoc=breakLoc}inherits(SwitchEntry,Entry);exports.SwitchEntry=SwitchEntry;function TryEntry(firstLoc,catchEntry,finallyEntry){Entry.call(this);n.Literal.assert(firstLoc);if(catchEntry){assert.ok(catchEntry instanceof CatchEntry)}else{catchEntry=null}if(finallyEntry){assert.ok(finallyEntry instanceof FinallyEntry)}else{finallyEntry=null}assert.ok(catchEntry||finallyEntry);this.firstLoc=firstLoc;this.catchEntry=catchEntry;this.finallyEntry=finallyEntry}inherits(TryEntry,Entry);exports.TryEntry=TryEntry;function CatchEntry(firstLoc,paramId){Entry.call(this);n.Literal.assert(firstLoc);n.Identifier.assert(paramId);this.firstLoc=firstLoc;this.paramId=paramId}inherits(CatchEntry,Entry);exports.CatchEntry=CatchEntry;function FinallyEntry(firstLoc,afterLoc){Entry.call(this);n.Literal.assert(firstLoc);n.Literal.assert(afterLoc);this.firstLoc=firstLoc;this.afterLoc=afterLoc}inherits(FinallyEntry,Entry);exports.FinallyEntry=FinallyEntry;function LabeledEntry(breakLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Identifier.assert(label);this.breakLoc=breakLoc;this.label=label}inherits(LabeledEntry,Entry);exports.LabeledEntry=LabeledEntry;function LeapManager(emitter){assert.ok(this instanceof LeapManager);var Emitter=require("./emit").Emitter;assert.ok(emitter instanceof Emitter);this.emitter=emitter;this.entryStack=[new FunctionEntry(emitter.finalLoc)]}var LMp=LeapManager.prototype;exports.LeapManager=LeapManager;LMp.withEntry=function(entry,callback){assert.ok(entry instanceof Entry);this.entryStack.push(entry);try{callback.call(this.emitter)}finally{var popped=this.entryStack.pop();assert.strictEqual(popped,entry)}};LMp._findLeapLocation=function(property,label){for(var i=this.entryStack.length-1;i>=0;--i){var entry=this.entryStack[i];var loc=entry[property];if(loc){if(label){if(entry.label&&entry.label.name===label.name){return loc}}else if(entry instanceof LabeledEntry){}else{return loc}}}return null};LMp.getBreakLoc=function(label){return this._findLeapLocation("breakLoc",label)};LMp.getContinueLoc=function(label){return this._findLeapLocation("continueLoc",label)}},{"./emit":422,assert:173,"ast-types":171,util:199}],425:[function(require,module,exports){var assert=require("assert");var m=require("private").makeAccessor();var types=require("ast-types");var isArray=types.builtInTypes.array;var n=types.namedTypes;var hasOwn=Object.prototype.hasOwnProperty;function makePredicate(propertyName,knownTypes){function onlyChildren(node){n.Node.assert(node);var result=false;function check(child){if(result){}else if(isArray.check(child)){child.some(check)}else if(n.Node.check(child)){assert.strictEqual(result,false);result=predicate(child)}return result}types.eachField(node,function(name,child){check(child)});return result}function predicate(node){n.Node.assert(node);var meta=m(node);if(hasOwn.call(meta,propertyName))return meta[propertyName];if(hasOwn.call(opaqueTypes,node.type))return meta[propertyName]=false;if(hasOwn.call(knownTypes,node.type))return meta[propertyName]=true;return meta[propertyName]=onlyChildren(node)}predicate.onlyChildren=onlyChildren;return predicate}var opaqueTypes={FunctionExpression:true};var sideEffectTypes={CallExpression:true,ForInStatement:true,UnaryExpression:true,BinaryExpression:true,AssignmentExpression:true,UpdateExpression:true,NewExpression:true};var leapTypes={YieldExpression:true,BreakStatement:true,ContinueStatement:true,ReturnStatement:true,ThrowStatement:true};for(var type in leapTypes){if(hasOwn.call(leapTypes,type)){sideEffectTypes[type]=leapTypes[type]}}exports.hasSideEffects=makePredicate("hasSideEffects",sideEffectTypes);exports.containsLeap=makePredicate("containsLeap",leapTypes)},{assert:173,"ast-types":171,"private":421}],426:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.defaults=function(obj){var len=arguments.length;var extension;for(var i=1;i0){outerBody.push(vars)}var wrapArgs=[emitter.getContextFunction(innerFnId),shouldTransformAsync?b.literal(null):outerFnId,b.thisExpression()];var tryLocsList=emitter.getTryLocsList();if(tryLocsList){wrapArgs.push(tryLocsList)}var wrapCall=b.callExpression(shouldTransformAsync?runtimeProperty("async"):runtimeProperty("wrap"),wrapArgs);outerBody.push(b.returnStatement(wrapCall));node.body=b.blockStatement(outerBody);node.body._declarations=bodyBlock._declarations;if(shouldTransformAsync){node.async=false;return}if(n.FunctionDeclaration.check(node)){var pp=path.parent;while(pp&&!(n.BlockStatement.check(pp.value)||n.Program.check(pp.value))){pp=pp.parent}if(!pp){return}path.replace();node.type="FunctionExpression";var varDecl=b.variableDeclaration("var",[b.variableDeclarator(node.id,b.callExpression(runtimeProperty("mark"),[node]))]);if(node.comments){varDecl.leadingComments=node.leadingComments;varDecl.trailingComments=node.trailingComments;node.leadingComments=null;node.trailingComments=null}varDecl._blockHoist=3;var bodyPath=pp.get("body");var bodyLen=bodyPath.value.length;bodyPath.push(varDecl)}else{n.FunctionExpression.assert(node);return b.callExpression(runtimeProperty("mark"),[node])}}});function shouldNotHoistAbove(stmtPath){var value=stmtPath.value;n.Statement.assert(value);if(n.ExpressionStatement.check(value)&&n.Literal.check(value.expression)&&value.expression.value==="use strict"){return true}if(n.VariableDeclaration.check(value)){for(var i=0;i=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc){return this.complete(entry.completion,entry.afterLoc)}}},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}(typeof global==="object"?global:typeof window==="object"?window:this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],431:[function(require,module,exports){var regenerate=require("regenerate");exports.REGULAR={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,65535),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)};exports.UNICODE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)};exports.UNICODE_IGNORE_CASE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},{regenerate:433}],432:[function(require,module,exports){module.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}},{}],433:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports;var freeModule=typeof module=="object"&&module&&module.exports==freeExports&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal){root=freeGlobal}var ERRORS={rangeOrder:"A range’s `stop` value must be greater than or equal "+"to the `start` value.",codePointRange:"Invalid code point value. Code points range from "+"U+000000 to U+10FFFF."};var HIGH_SURROGATE_MIN=55296;var HIGH_SURROGATE_MAX=56319;var LOW_SURROGATE_MIN=56320;var LOW_SURROGATE_MAX=57343;var regexNull=/\\x00([^0123456789]|$)/g;var object={};var hasOwnProperty=object.hasOwnProperty;var extend=function(destination,source){var key;for(key in source){if(hasOwnProperty.call(source,key)){destination[key]=source[key]}}return destination};var forEach=function(array,callback){var index=-1;var length=array.length;while(++index=start&&codePointrangeEnd){return data}if(rangeStart<=start&&rangeEnd>=end){data.splice(index,2);continue}if(rangeStart>=start&&rangeEnd=start&&rangeStart<=end){data[index+1]=rangeStart}else if(rangeEnd>=start&&rangeEnd<=end){data[index]=rangeEnd+1;return data}index+=2}return data};var dataAdd=function(data,codePoint){var index=0;var start;var end;var lastIndex=null;var length=data.length;if(codePoint<0||codePoint>1114111){throw RangeError(ERRORS.codePointRange)}while(index=start&&codePointcodePoint){data.splice(lastIndex!=null?lastIndex+2:0,0,codePoint,codePoint+1);return data}if(codePoint==end){if(codePoint+1==data[index+2]){data.splice(index,4,start,data[index+3]);return data}data[index+1]=codePoint+1;return data}lastIndex=index;index+=2}data.push(codePoint,codePoint+1);return data};var dataAddData=function(dataA,dataB){var index=0;var start;var end;var data=dataA.slice();var length=dataB.length;while(index1114111||rangeEnd<0||rangeEnd>1114111){throw RangeError(ERRORS.codePointRange)}var index=0;var start;var end;var added=false;var length=data.length;while(indexrangeEnd){return data}if(start>=rangeStart&&start<=rangeEnd){if(end>rangeStart&&end-1<=rangeEnd){data.splice(index,2);index-=2}else{data.splice(index-1,2);index-=2}}}else if(start==rangeEnd+1){data[index]=rangeStart;return data}else if(start>rangeEnd){data.splice(index,0,rangeStart,rangeEnd+1);return data}else if(rangeStart>=start&&rangeStart=start&&rangeStart=end){data[index]=rangeStart;data[index+1]=rangeEnd+1;added=true}index+=2}if(!added){data.push(rangeStart,rangeEnd+1)}return data};var dataContains=function(data,codePoint){var index=0;var length=data.length;var start=data[index];var end=data[length-1];if(length>=2){if(codePointend){return false}}while(index=start&&codePoint=40&&codePoint<=43||codePoint==45||codePoint==46||codePoint==63||codePoint>=91&&codePoint<=94||codePoint>=123&&codePoint<=125){string="\\"+stringFromCharCode(codePoint)}else if(codePoint>=32&&codePoint<=126){string=stringFromCharCode(codePoint)}else if(codePoint<=255){string="\\x"+pad(hex(codePoint),2)}else{string="\\u"+pad(hex(codePoint),4)}return string};var symbolToCodePoint=function(symbol){var length=symbol.length;var first=symbol.charCodeAt(0);var second;if(first>=HIGH_SURROGATE_MIN&&first<=HIGH_SURROGATE_MAX&&length>1){second=symbol.charCodeAt(1);return(first-HIGH_SURROGATE_MIN)*1024+second-LOW_SURROGATE_MIN+65536}return first};var createBMPCharacterClasses=function(data){var result="";var index=0;var start;var end;var length=data.length;if(dataIsSingleton(data)){return codePointToString(data[0])}while(index=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=HIGH_SURROGATE_MIN&&start<=HIGH_SURROGATE_MAX){if(end>=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){loneHighSurrogates.push(start,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=LOW_SURROGATE_MIN&&start<=LOW_SURROGATE_MAX){if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneLowSurrogates.push(start,end+1)}if(end>LOW_SURROGATE_MAX){loneLowSurrogates.push(start,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>LOW_SURROGATE_MAX&&start<=65535){if(end<=65535){bmp.push(start,end+1)}else{bmp.push(start,65535+1);astral.push(65535+1,end+1)}}else{astral.push(start,end+1)}index+=2}return{loneHighSurrogates:loneHighSurrogates,loneLowSurrogates:loneLowSurrogates,bmp:bmp,astral:astral}};var optimizeSurrogateMappings=function(surrogateMappings){var result=[];var tmpLow=[];var addLow=false;var mapping;var nextMapping;var highSurrogates;var lowSurrogates;var nextHighSurrogates;var nextLowSurrogates;var index=-1;var length=surrogateMappings.length;while(++index1){value=slice.call(arguments)}if(this instanceof regenerate){this.data=[];return value?this.add(value):this}return(new regenerate).add(value)};regenerate.version="1.2.0";var proto=regenerate.prototype;extend(proto,{add:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataAddData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.add(item)});return $this}$this.data=dataAdd($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},remove:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataRemoveData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.remove(item)});return $this}$this.data=dataRemove($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},addRange:function(start,end){var $this=this;$this.data=dataAddRange($this.data,isNumber(start)?start:symbolToCodePoint(start),isNumber(end)?end:symbolToCodePoint(end));return $this},removeRange:function(start,end){var $this=this;var startCodePoint=isNumber(start)?start:symbolToCodePoint(start);var endCodePoint=isNumber(end)?end:symbolToCodePoint(end);$this.data=dataRemoveRange($this.data,startCodePoint,endCodePoint);return $this},intersection:function(argument){var $this=this;var array=argument instanceof regenerate?dataToArray(argument.data):argument;$this.data=dataIntersection($this.data,array);return $this},contains:function(codePoint){return dataContains(this.data,isNumber(codePoint)?codePoint:symbolToCodePoint(codePoint))},clone:function(){var set=new regenerate;set.data=this.data.slice(0);return set},toString:function(options){var result=createCharacterClassesFromData(this.data,options?options.bmpOnly:false);return result.replace(regexNull,"\\0$1")},toRegExp:function(flags){return RegExp(this.toString(),flags||"")},valueOf:function(){return dataToArray(this.data)}});proto.toArray=proto.valueOf;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define(function(){return regenerate})}else if(freeExports&&!freeExports.nodeType){if(freeModule){freeModule.exports=regenerate}else{freeExports.regenerate=regenerate}}else{root.regenerate=regenerate}})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],434:[function(require,module,exports){(function(global){(function(){"use strict";var objectTypes={"function":true,object:true};var root=objectTypes[typeof window]&&window||this;var oldRoot=root;var freeExports=objectTypes[typeof exports]&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal}var stringFromCharCode=String.fromCharCode;var floor=Math.floor;function fromCodePoint(){var MAX_SIZE=16384;var codeUnits=[];var highSurrogate;var lowSurrogate;var index=-1;var length=arguments.length;if(!length){return""}var result="";while(++index1114111||floor(codePoint)!=codePoint){throw RangeError("Invalid code point: "+codePoint)}if(codePoint<=65535){codeUnits.push(codePoint)}else{codePoint-=65536;highSurrogate=(codePoint>>10)+55296;lowSurrogate=codePoint%1024+56320;codeUnits.push(highSurrogate,lowSurrogate)}if(index+1==length||codeUnits.length>MAX_SIZE){result+=stringFromCharCode.apply(null,codeUnits);codeUnits.length=0}}return result}function assertType(type,expected){if(expected.indexOf("|")==-1){if(type==expected){return}throw Error("Invalid node type: "+type)}expected=assertType.hasOwnProperty(expected)?assertType[expected]:assertType[expected]=RegExp("^(?:"+expected+")$");if(expected.test(type)){return}throw Error("Invalid node type: "+type)}function generate(node){var type=node.type;if(generate.hasOwnProperty(type)&&typeof generate[type]=="function"){return generate[type](node)}throw Error("Invalid node type: "+type)}function generateAlternative(node){assertType(node.type,"alternative");var terms=node.body,length=terms?terms.length:0;if(length==1){return generateTerm(terms[0])}else{var i=-1,result="";while(++i=55296&&first<=56319){second=lookahead().charCodeAt(0);if(second>=56320&&second<=57343){pos++;return createValue("symbol",(first-55296)*1024+second-56320+65536,pos-2,pos)}}}return createValue("symbol",first,pos-1,pos)}function createDisjunction(alternatives,from,to){return addRaw({type:"disjunction",body:alternatives,range:[from,to]})}function createDot(){return addRaw({type:"dot",range:[pos-1,pos]})}function createCharacterClassEscape(value){return addRaw({type:"characterClassEscape",value:value,range:[pos-2,pos]})}function createReference(matchIndex){return addRaw({type:"reference",matchIndex:parseInt(matchIndex,10),range:[pos-1-matchIndex.length,pos]})}function createGroup(behavior,disjunction,from,to){return addRaw({type:"group",behavior:behavior,body:disjunction,range:[from,to]})}function createQuantifier(min,max,from,to){if(to==null){from=pos-1;to=pos}return addRaw({type:"quantifier",min:min,max:max,greedy:true,body:null,range:[from,to]})}function createAlternative(terms,from,to){return addRaw({type:"alternative",body:terms,range:[from,to]})}function createCharacterClass(classRanges,negative,from,to){return addRaw({type:"characterClass",body:classRanges,negative:negative,range:[from,to]})}function createClassRange(min,max,from,to){if(min.codePoint>max.codePoint){throw SyntaxError("invalid range in character class")}return addRaw({type:"characterClassRange",min:min,max:max,range:[from,to]})}function flattenBody(body){if(body.type==="alternative"){return body.body}else{return[body]}}function isEmpty(obj){return obj.type==="empty"}function incr(amount){amount=amount||1;var res=str.substring(pos,pos+amount);pos+=amount||1;return res}function skip(value){if(!match(value)){throw SyntaxError("character: "+value)}}function match(value){if(str.indexOf(value,pos)===pos){return incr(value.length)}}function lookahead(){return str[pos]}function current(value){return str.indexOf(value,pos)===pos}function next(value){return str[pos+1]===value}function matchReg(regExp){var subStr=str.substring(pos);var res=subStr.match(regExp);if(res){res.range=[];res.range[0]=pos;incr(res[0].length);res.range[1]=pos}return res}function parseDisjunction(){var res=[],from=pos;res.push(parseAlternative());while(match("|")){res.push(parseAlternative())}if(res.length===1){return res[0]}return createDisjunction(res,from,pos)}function parseAlternative(){var res=[],from=pos;var term;while(term=parseTerm()){res.push(term)}if(res.length===1){return res[0]}return createAlternative(res,from,pos)}function parseTerm(){if(pos>=str.length||current("|")||current(")")){return null}var anchor=parseAnchor();if(anchor){return anchor}var atom=parseAtom();if(!atom){throw SyntaxError("Expected atom")}var quantifier=parseQuantifier()||false;if(quantifier){quantifier.body=flattenBody(atom);updateRawStart(quantifier,atom.range[0]);return quantifier}return atom}function parseGroup(matchA,typeA,matchB,typeB){var type=null,from=pos;if(match(matchA)){type=typeA}else if(match(matchB)){type=typeB}else{return false}var body=parseDisjunction();if(!body){throw SyntaxError("Expected disjunction")}skip(")");var group=createGroup(type,flattenBody(body),from,pos);if(type=="normal"){if(firstIteration){closedCaptureCounter++}}return group}function parseAnchor(){var res,from=pos;if(match("^")){return createAnchor("start",1)}else if(match("$")){return createAnchor("end",1)}else if(match("\\b")){return createAnchor("boundary",2)}else if(match("\\B")){return createAnchor("not-boundary",2)}else{return parseGroup("(?=","lookahead","(?!","negativeLookahead")}}function parseQuantifier(){var res;var quantifier;var min,max;if(match("*")){quantifier=createQuantifier(0)}else if(match("+")){quantifier=createQuantifier(1)}else if(match("?")){quantifier=createQuantifier(0,1)}else if(res=matchReg(/^\{([0-9]+)\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,min,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,undefined,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),([0-9]+)\}/)){min=parseInt(res[1],10);max=parseInt(res[2],10);if(min>max){throw SyntaxError("numbers out of order in {} quantifier")}quantifier=createQuantifier(min,max,res.range[0],res.range[1])}if(quantifier){if(match("?")){quantifier.greedy=false;quantifier.range[1]+=1}}return quantifier}function parseAtom(){var res;if(res=matchReg(/^[^^$\\.*+?(){[|]/)){return createCharacter(res)}else if(match(".")){return createDot()}else if(match("\\")){res=parseAtomEscape();if(!res){throw SyntaxError("atomEscape")}return res}else if(res=parseCharacterClass()){return res}else{return parseGroup("(?:","ignore","(","normal")}}function parseUnicodeSurrogatePairEscape(firstEscape){if(hasUnicodeFlag){var first,second;if(firstEscape.kind=="unicodeEscape"&&(first=firstEscape.codePoint)>=55296&&first<=56319&¤t("\\")&&next("u")){var prevPos=pos;pos++;var secondEscape=parseClassEscape();if(secondEscape.kind=="unicodeEscape"&&(second=secondEscape.codePoint)>=56320&&second<=57343){firstEscape.range[1]=secondEscape.range[1];firstEscape.codePoint=(first-55296)*1024+second-56320+65536;firstEscape.type="value";firstEscape.kind="unicodeCodePointEscape";addRaw(firstEscape)}else{pos=prevPos}}}return firstEscape}function parseClassEscape(){return parseAtomEscape(true)}function parseAtomEscape(insideCharacterClass){var res;res=parseDecimalEscape();if(res){return res}if(insideCharacterClass){if(match("b")){return createEscaped("singleEscape",8,"\\b")}else if(match("B")){throw SyntaxError("\\B not possible inside of CharacterClass")}}res=parseCharacterEscape();return res}function parseDecimalEscape(){var res,match;if(res=matchReg(/^(?!0)\d+/)){match=res[0];var refIdx=parseInt(res[0],10);if(refIdx<=closedCaptureCounter){return createReference(res[0])}else{backrefDenied.push(refIdx);incr(-res[0].length);if(res=matchReg(/^[0-7]{1,3}/)){return createEscaped("octal",parseInt(res[0],8),res[0],1)}else{res=createCharacter(matchReg(/^[89]/));return updateRawStart(res,res.range[0]-1)}}}else if(res=matchReg(/^[0-7]{1,3}/)){match=res[0];if(/^0{1,3}$/.test(match)){return createEscaped("null",0,"0",match.length+1)}else{return createEscaped("octal",parseInt(match,8),match,1)}}else if(res=matchReg(/^[dDsSwW]/)){return createCharacterClassEscape(res[0])}return false}function parseCharacterEscape(){var res;if(res=matchReg(/^[fnrtv]/)){var codePoint=0;switch(res[0]){case"t":codePoint=9;break;case"n":codePoint=10;break;case"v":codePoint=11;break;case"f":codePoint=12;break;case"r":codePoint=13;break}return createEscaped("singleEscape",codePoint,"\\"+res[0])}else if(res=matchReg(/^c([a-zA-Z])/)){return createEscaped("controlLetter",res[1].charCodeAt(0)%32,res[1],2)}else if(res=matchReg(/^x([0-9a-fA-F]{2})/)){return createEscaped("hexadecimalEscape",parseInt(res[1],16),res[1],2)}else if(res=matchReg(/^u([0-9a-fA-F]{4})/)){return parseUnicodeSurrogatePairEscape(createEscaped("unicodeEscape",parseInt(res[1],16),res[1],2))}else if(hasUnicodeFlag&&(res=matchReg(/^u\{([0-9a-fA-F]+)\}/))){return createEscaped("unicodeCodePointEscape",parseInt(res[1],16),res[1],4)}else{return parseIdentityEscape()}}function isIdentifierPart(ch){var NonAsciiIdentifierPart=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&NonAsciiIdentifierPart.test(String.fromCharCode(ch))}function parseIdentityEscape(){var ZWJ="‌";var ZWNJ="‍";var res;var tmp;if(!isIdentifierPart(lookahead())){tmp=incr();return createEscaped("identifier",tmp.charCodeAt(0),tmp,1)}if(match(ZWJ)){return createEscaped("identifier",8204,ZWJ)}else if(match(ZWNJ)){return createEscaped("identifier",8205,ZWNJ)}return null}function parseCharacterClass(){var res,from=pos;if(res=matchReg(/^\[\^/)){res=parseClassRanges();skip("]");return createCharacterClass(res,true,from,pos)}else if(match("[")){res=parseClassRanges();skip("]");return createCharacterClass(res,false,from,pos)}return null}function parseClassRanges(){var res;if(current("]")){return[]}else{res=parseNonemptyClassRanges();if(!res){throw SyntaxError("nonEmptyClassRanges")}return res}}function parseHelperClassRanges(atom){var from,to,res;if(current("-")&&!next("]")){skip("-");res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}to=pos;var classRanges=parseClassRanges();if(!classRanges){throw SyntaxError("classRanges")}from=atom.range[0];if(classRanges.type==="empty"){return[createClassRange(atom,res,from,to)]}return[createClassRange(atom,res,from,to)].concat(classRanges)}res=parseNonemptyClassRangesNoDash();if(!res){throw SyntaxError("nonEmptyClassRangesNoDash")}return[atom].concat(res)}function parseNonemptyClassRanges(){var atom=parseClassAtom();if(!atom){throw SyntaxError("classAtom")}if(current("]")){return[atom]}return parseHelperClassRanges(atom)}function parseNonemptyClassRangesNoDash(){var res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}if(current("]")){return res}return parseHelperClassRanges(res)}function parseClassAtom(){if(match("-")){return createCharacter("-")}else{return parseClassAtomNoDash()}}function parseClassAtomNoDash(){var res;if(res=matchReg(/^[^\\\]-]/)){return createCharacter(res[0])}else if(match("\\")){res=parseClassEscape();if(!res){throw SyntaxError("classEscape")}return parseUnicodeSurrogatePairEscape(res)}}var backrefDenied=[];var closedCaptureCounter=0;var firstIteration=true;var hasUnicodeFlag=(flags||"").indexOf("u")!==-1;var pos=0;str=String(str);if(str===""){str="(?:)"}var result=parseDisjunction();if(result.range[1]!==str.length){throw SyntaxError("Could not parse entire input - got stuck: "+str)}for(var i=0;i=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(msmaxUsed||u===maxUsed&&w>maxWeight){maxUsed=u;maxWeight=w;result=+n}}return result}module.exports=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}var tabs=0;var spaces=0;var prev=0;var indents={};var current;var isIndent;str.split(/\n/g).forEach(function(line){if(!line){return}var indent;var matches=line.match(INDENT_RE);if(!matches){indent=0}else{indent=matches[0].length;if(matches[1]){spaces++}else{tabs++}}var diff=indent-prev;prev=indent;if(diff){isIndent=diff>0;current=indents[isIndent?diff:-diff];if(current){current[0]++}else{current=indents[diff]=[1,0]}}else if(current){current[1]+=+isIndent}});var amount=getMostUsed(indents);var type;var actual;if(!amount){type=null;actual=""}else if(spaces>=tabs){type="space";actual=repeating(" ",amount)}else{type="tab";actual=repeating(" ",amount)}return{amount:amount,type:type,indent:actual}}},{repeating:489}],320:[function(require,module,exports){(function(){var estraverse=require("estraverse");var parser=require("./parser");var isArray=Array.isArray||function isArray(array){return{}.toString.call(array)==="[object Array]"};function esqueryModule(){function getPath(obj,key){var i,keys=key.split(".");for(i=0;i":return p>selector.value.value;case">=":return p>=selector.value.value}case"sibling":return matches(node,selector.right,ancestry)&&sibling(node,selector.left,ancestry)||matches(node,selector.left,ancestry)&&sibling(node,selector.right,ancestry);case"adjacent":return matches(node,selector.right,ancestry)&&adjacent(node,selector.left,ancestry)||matches(node,selector.left,ancestry)&&adjacent(node,selector.right,ancestry);case"nth-child":return matches(node,selector.right,ancestry)&&nthChild(node,ancestry,function(length){return selector.index.value-1});case"nth-last-child":return matches(node,selector.right,ancestry)&&nthChild(node,ancestry,function(length){return length-selector.index.value});case"class":if(!node.type)return false;switch(selector.name.toLowerCase()){case"statement":if(node.type.slice(-9)==="Statement")return true;case"declaration":return node.type.slice(-11)==="Declaration";case"pattern":if(node.type.slice(-7)==="Pattern")return true;case"expression":return node.type.slice(-10)==="Expression"||node.type==="Literal"||node.type==="Identifier";case"function":return node.type.slice(0,8)==="Function"||node.type==="ArrowFunctionExpression"}throw new Error("Unknown class name: "+selector.name)}throw new Error("Unknown selector type: "+selector.type)}function sibling(node,selector,ancestry){var parent=ancestry[0],listProp,keys,i,l,k,m;if(!parent){return false}keys=estraverse.VisitorKeys[parent.type];for(i=0,l=keys.length;i0&&matches(listProp[idx-1],selector,ancestry)){return true}if(idx=0&&idx===idxFn(listProp.length)){return true}}}return false}function subjects(selector,ancestor){var results,p;if(selector==null||typeof selector!="object"){return[]}if(ancestor==null){ancestor=selector}results=selector.subject?[ancestor]:[];for(p in selector){if(!{}.hasOwnProperty.call(selector,p)){continue}[].push.apply(results,subjects(selector[p],p==="left"?selector[p]:ancestor))}return results}function match(ast,selector){var ancestry=[],results=[],altSubjects,i,l,k,m;if(!selector){return results}altSubjects=subjects(selector);estraverse.traverse(ast,{enter:function(node,parent){if(parent!=null){ancestry.unshift(parent)}if(matches(node,selector,ancestry)){if(altSubjects.length){for(i=0,l=altSubjects.length;irightmostFailuresPos){rightmostFailuresPos=pos;rightmostFailuresExpected=[]}rightmostFailuresExpected.push(failure)}function parse_start(){var cacheKey="start@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2;var pos0,pos1;pos0=pos;pos1=pos;result0=parse__();if(result0!==null){result1=parse_selectors();if(result1!==null){result2=parse__();if(result2!==null){result0=[result0,result1,result2]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,ss){return ss.length===1?ss[0]:{type:"matches",selectors:ss}}(pos0,result0[1])}if(result0===null){pos=pos0}if(result0===null){pos0=pos;result0=parse__();if(result0!==null){result0=function(offset){return void 0}(pos0)}if(result0===null){pos=pos0}}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse__(){var cacheKey="_@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1;result0=[];if(input.charCodeAt(pos)===32){result1=" ";pos++}else{result1=null;if(reportFailures===0){matchFailed('" "')}}while(result1!==null){result0.push(result1);if(input.charCodeAt(pos)===32){result1=" ";pos++}else{result1=null;if(reportFailures===0){matchFailed('" "')}}}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_identifierName(){var cacheKey="identifierName@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1;var pos0;pos0=pos;if(/^[^ [\],():#!=><~+.]/.test(input.charAt(pos))){result1=input.charAt(pos);pos++}else{result1=null;if(reportFailures===0){matchFailed("[^ [\\],():#!=><~+.]")}}if(result1!==null){result0=[];while(result1!==null){result0.push(result1);if(/^[^ [\],():#!=><~+.]/.test(input.charAt(pos))){result1=input.charAt(pos);pos++}else{result1=null;if(reportFailures===0){matchFailed("[^ [\\],():#!=><~+.]")}}}}else{result0=null}if(result0!==null){result0=function(offset,i){return i.join("")}(pos0,result0)}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_binaryOp(){var cacheKey="binaryOp@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2;var pos0,pos1;pos0=pos;pos1=pos;result0=parse__();if(result0!==null){if(input.charCodeAt(pos)===62){result1=">";pos++}else{result1=null;if(reportFailures===0){matchFailed('">"')}}if(result1!==null){result2=parse__();if(result2!==null){result0=[result0,result1,result2]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset){return"child"}(pos0)}if(result0===null){pos=pos0}if(result0===null){pos0=pos;pos1=pos;result0=parse__();if(result0!==null){if(input.charCodeAt(pos)===126){result1="~";pos++}else{result1=null;if(reportFailures===0){matchFailed('"~"')}}if(result1!==null){result2=parse__();if(result2!==null){result0=[result0,result1,result2]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset){return"sibling"}(pos0)}if(result0===null){pos=pos0}if(result0===null){pos0=pos;pos1=pos;result0=parse__();if(result0!==null){if(input.charCodeAt(pos)===43){result1="+";pos++}else{result1=null;if(reportFailures===0){matchFailed('"+"')}}if(result1!==null){result2=parse__();if(result2!==null){result0=[result0,result1,result2]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset){return"adjacent"}(pos0)}if(result0===null){pos=pos0}if(result0===null){pos0=pos;pos1=pos;if(input.charCodeAt(pos)===32){result0=" ";pos++}else{result0=null;if(reportFailures===0){matchFailed('" "')}}if(result0!==null){result1=parse__();if(result1!==null){result0=[result0,result1]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset){return"descendant"}(pos0)}if(result0===null){pos=pos0}}}}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_selectors(){var cacheKey="selectors@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2,result3,result4,result5;var pos0,pos1,pos2;pos0=pos;pos1=pos;result0=parse_selector();if(result0!==null){result1=[];pos2=pos;result2=parse__();if(result2!==null){if(input.charCodeAt(pos)===44){result3=",";pos++}else{result3=null;if(reportFailures===0){matchFailed('","')}}if(result3!==null){result4=parse__();if(result4!==null){result5=parse_selector();if(result5!==null){result2=[result2,result3,result4,result5]}else{result2=null;pos=pos2}}else{result2=null;pos=pos2}}else{result2=null;pos=pos2}}else{result2=null;pos=pos2}while(result2!==null){result1.push(result2);pos2=pos;result2=parse__();if(result2!==null){if(input.charCodeAt(pos)===44){result3=",";pos++}else{result3=null;if(reportFailures===0){matchFailed('","')}}if(result3!==null){result4=parse__();if(result4!==null){result5=parse_selector();if(result5!==null){result2=[result2,result3,result4,result5]}else{result2=null;pos=pos2}}else{result2=null;pos=pos2}}else{result2=null;pos=pos2}}else{result2=null;pos=pos2}}if(result1!==null){result0=[result0,result1]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,s,ss){return[s].concat(ss.map(function(s){return s[3]}))}(pos0,result0[0],result0[1])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_selector(){var cacheKey="selector@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2,result3;var pos0,pos1,pos2;pos0=pos;pos1=pos;result0=parse_sequence();if(result0!==null){result1=[];pos2=pos;result2=parse_binaryOp();if(result2!==null){result3=parse_sequence();if(result3!==null){result2=[result2,result3]}else{result2=null;pos=pos2}}else{result2=null;pos=pos2}while(result2!==null){result1.push(result2);pos2=pos;result2=parse_binaryOp();if(result2!==null){result3=parse_sequence();if(result3!==null){result2=[result2,result3]}else{result2=null;pos=pos2}}else{result2=null;pos=pos2}}if(result1!==null){result0=[result0,result1]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,a,ops){return ops.reduce(function(memo,rhs){return{type:rhs[0],left:memo,right:rhs[1]}},a)}(pos0,result0[0],result0[1])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_sequence(){var cacheKey="sequence@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2;var pos0,pos1;pos0=pos;pos1=pos;if(input.charCodeAt(pos)===33){result0="!";pos++}else{result0=null;if(reportFailures===0){matchFailed('"!"')}}result0=result0!==null?result0:"";if(result0!==null){result2=parse_atom();if(result2!==null){result1=[];while(result2!==null){result1.push(result2);result2=parse_atom()}}else{result1=null}if(result1!==null){result0=[result0,result1]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,subject,as){var b=as.length===1?as[0]:{type:"compound",selectors:as};if(subject)b.subject=true;return b}(pos0,result0[0],result0[1])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_atom(){var cacheKey="atom@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0;result0=parse_wildcard();if(result0===null){result0=parse_identifier();if(result0===null){result0=parse_attr();if(result0===null){result0=parse_field();if(result0===null){result0=parse_negation();if(result0===null){result0=parse_matches();if(result0===null){result0=parse_firstChild();if(result0===null){result0=parse_lastChild();if(result0===null){result0=parse_nthChild();if(result0===null){result0=parse_nthLastChild();if(result0===null){result0=parse_class()}}}}}}}}}}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_wildcard(){var cacheKey="wildcard@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0;var pos0;pos0=pos;if(input.charCodeAt(pos)===42){result0="*";pos++}else{result0=null;if(reportFailures===0){matchFailed('"*"')}}if(result0!==null){result0=function(offset,a){return{type:"wildcard",value:a}}(pos0,result0)}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_identifier(){var cacheKey="identifier@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1;var pos0,pos1;pos0=pos;pos1=pos;if(input.charCodeAt(pos)===35){result0="#";pos++}else{result0=null;if(reportFailures===0){matchFailed('"#"')}}result0=result0!==null?result0:"";if(result0!==null){result1=parse_identifierName();if(result1!==null){result0=[result0,result1]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,i){return{type:"identifier",value:i}}(pos0,result0[1])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_attr(){var cacheKey="attr@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2,result3,result4;var pos0,pos1;pos0=pos;pos1=pos;if(input.charCodeAt(pos)===91){result0="[";pos++}else{result0=null;if(reportFailures===0){matchFailed('"["')}}if(result0!==null){result1=parse__();if(result1!==null){result2=parse_attrValue();if(result2!==null){result3=parse__();if(result3!==null){if(input.charCodeAt(pos)===93){result4="]";pos++}else{result4=null;if(reportFailures===0){matchFailed('"]"')}}if(result4!==null){result0=[result0,result1,result2,result3,result4]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,v){return v}(pos0,result0[2])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_attrOps(){var cacheKey="attrOps@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1;var pos0,pos1;pos0=pos;pos1=pos;if(/^[><]/.test(input.charAt(pos))){result0=input.charAt(pos);pos++}else{result0=null;if(reportFailures===0){matchFailed("[><]")}}}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_attrEqOps(){var cacheKey="attrEqOps@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1;var pos0,pos1;pos0=pos;pos1=pos;if(input.charCodeAt(pos)===33){result0="!";pos++}else{result0=null;if(reportFailures===0){matchFailed('"!"')}}result0=result0!==null?result0:"";if(result0!==null){if(input.charCodeAt(pos)===61){result1="=";pos++}else{result1=null;if(reportFailures===0){matchFailed('"="')}}if(result1!==null){result0=[result0,result1]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,a){return a+"="}(pos0,result0[0])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_attrName(){var cacheKey="attrName@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1;var pos0;pos0=pos;result1=parse_identifierName();if(result1===null){if(input.charCodeAt(pos)===46){result1=".";pos++}else{result1=null;if(reportFailures===0){matchFailed('"."')}}}if(result1!==null){result0=[];while(result1!==null){result0.push(result1);result1=parse_identifierName();if(result1===null){if(input.charCodeAt(pos)===46){result1=".";pos++}else{result1=null;if(reportFailures===0){matchFailed('"."')}}}}}else{result0=null}if(result0!==null){result0=function(offset,i){return i.join("")}(pos0,result0)}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_attrValue(){var cacheKey="attrValue@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2,result3,result4;var pos0,pos1;pos0=pos;pos1=pos;result0=parse_attrName();if(result0!==null){result1=parse__();if(result1!==null){result2=parse_attrEqOps();if(result2!==null){result3=parse__();if(result3!==null){result4=parse_type();if(result4===null){result4=parse_regex()}if(result4!==null){result0=[result0,result1,result2,result3,result4]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,name,op,value){return{type:"attribute",name:name,operator:op,value:value}}(pos0,result0[0],result0[2],result0[4])}if(result0===null){pos=pos0}if(result0===null){pos0=pos;pos1=pos;result0=parse_attrName();if(result0!==null){result1=parse__();if(result1!==null){result2=parse_attrOps();if(result2!==null){result3=parse__();if(result3!==null){result4=parse_string();if(result4===null){result4=parse_number();if(result4===null){result4=parse_path()}}if(result4!==null){result0=[result0,result1,result2,result3,result4]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1; -break;case"value":var codePoint=item.codePoint;var set=regenerate(codePoint);if(ignoreCase&&unicode){var folded=caseFold(codePoint);if(folded){set.add(folded)}}update(item,set.toString());break;case"anchor":case"empty":case"group":case"reference":break;default:throw Error("Unknown term type: "+item.type)}return item}module.exports=function(pattern,flags){var tree=parse(pattern,flags);ignoreCase=flags?flags.indexOf("i")>-1:false;unicode=flags?flags.indexOf("u")>-1:false;assign(tree,processTerm(tree));return generate(tree)}},{"./data/character-class-escape-sets.js":431,"./data/iu-mappings.json":432,regenerate:433,regjsgen:434,regjsparser:435}],437:[function(require,module,exports){"use strict";var isFinite=require("is-finite");module.exports=function(str,n){if(typeof str!=="string"){throw new TypeError("Expected a string as the first argument")}if(n<0||!isFinite(n)){throw new TypeError("Expected a finite positive number")}var ret="";do{if(n&1){ret+=str}str+=str}while(n=n>>1);return ret}},{"is-finite":438}],438:[function(require,module,exports){arguments[4][304][0].apply(exports,arguments)},{dup:304}],439:[function(require,module,exports){"use strict";module.exports=/^#!.*/},{}],440:[function(require,module,exports){"use strict";module.exports=function(str){var isExtendedLengthPath=/^\\\\\?\\/.test(str);var hasNonAscii=/[^\x00-\x80]+/.test(str);if(isExtendedLengthPath||hasNonAscii){return str}return str.replace(/\\/g,"/")}},{}],441:[function(require,module,exports){exports.SourceMapGenerator=require("./source-map/source-map-generator").SourceMapGenerator;exports.SourceMapConsumer=require("./source-map/source-map-consumer").SourceMapConsumer;exports.SourceNode=require("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":447,"./source-map/source-map-generator":448,"./source-map/source-node":449}],442:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function ArraySet(){this._array=[];this._set={}}ArraySet.fromArray=function ArraySet_fromArray(aArray,aAllowDuplicates){var set=new ArraySet;for(var i=0,len=aArray.length;i=0&&aIdx>1;return isNegative?-shifted:shifted}exports.encode=function base64VLQ_encode(aValue){var encoded="";var digit;var vlq=toVLQSigned(aValue);do{digit=vlq&VLQ_BASE_MASK;vlq>>>=VLQ_BASE_SHIFT;if(vlq>0){digit|=VLQ_CONTINUATION_BIT}encoded+=base64.encode(digit)}while(vlq>0);return encoded};exports.decode=function base64VLQ_decode(aStr,aIndex,aOutParam){var strLen=aStr.length;var result=0;var shift=0;var continuation,digit;do{if(aIndex>=strLen){throw new Error("Expected more digits in base 64 VLQ value.")}digit=base64.decode(aStr.charAt(aIndex++));continuation=!!(digit&VLQ_CONTINUATION_BIT);digit&=VLQ_BASE_MASK;result=result+(digit<0){if(aHigh-mid>1){return recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return aHigh1){return recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return mid}else{return aLow<0?-1:aLow}}}exports.search=function search(aNeedle,aHaystack,aCompare,aBias){if(aHaystack.length===0){return-1}var index=recursiveSearch(-1,aHaystack.length,aNeedle,aHaystack,aCompare,aBias||exports.GREATEST_LOWER_BOUND);if(index<0){return-1}while(index-1>=0){if(aCompare(aHaystack[index],aHaystack[index-1],true)!==0){break}--index}return index}})},{amdefine:451}],446:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function generatedPositionAfter(mappingA,mappingB){var lineA=mappingA.generatedLine;var lineB=mappingB.generatedLine;var columnA=mappingA.generatedColumn;var columnB=mappingB.generatedColumn;return lineB>lineA||lineB==lineA&&columnB>=columnA||util.compareByGeneratedPositions(mappingA,mappingB)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(aCallback,aThisArg){this._array.forEach(aCallback,aThisArg)};MappingList.prototype.add=function MappingList_add(aMapping){var mapping;if(generatedPositionAfter(this._last,aMapping)){this._last=aMapping;this._array.push(aMapping)}else{this._sorted=false;this._array.push(aMapping)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(util.compareByGeneratedPositions);this._sorted=true}return this._array};exports.MappingList=MappingList})},{"./util":450,amdefine:451}],447:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");var binarySearch=require("./binary-search");var ArraySet=require("./array-set").ArraySet;var base64VLQ=require("./base64-vlq");function SourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}return sourceMap.sections!=null?new IndexedSourceMapConsumer(sourceMap):new BasicSourceMapConsumer(sourceMap)}SourceMapConsumer.fromSourceMap=function(aSourceMap){return BasicSourceMapConsumer.fromSourceMap(aSourceMap)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{get:function(){if(!this.__generatedMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{get:function(){if(!this.__originalMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._nextCharIsMappingSeparator=function SourceMapConsumer_nextCharIsMappingSeparator(aStr,index){var c=aStr.charAt(index);return c===";"||c===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(aCallback,aContext,aOrder){var context=aContext||null;var order=aOrder||SourceMapConsumer.GENERATED_ORDER;var mappings;switch(order){case SourceMapConsumer.GENERATED_ORDER:mappings=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:mappings=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var sourceRoot=this.sourceRoot;mappings.map(function(mapping){var source=mapping.source;if(source!=null&&sourceRoot!=null){source=util.join(sourceRoot,source)}return{source:source,generatedLine:mapping.generatedLine,generatedColumn:mapping.generatedColumn,originalLine:mapping.originalLine,originalColumn:mapping.originalColumn,name:mapping.name}}).forEach(aCallback,context)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column",0)};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var mappings=[];var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,binarySearch.LEAST_UPPER_BOUND);if(index>=0){var mapping=this._originalMappings[index];var originalLine=mapping.originalLine;var originalColumn=mapping.originalColumn;while(mapping&&mapping.originalLine===originalLine&&(aArgs.column===undefined||mapping.originalColumn===originalColumn)){mappings.push({line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)});mapping=this._originalMappings[++index]}}return mappings};exports.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sources=util.getArg(sourceMap,"sources");var names=util.getArg(sourceMap,"names",[]);var sourceRoot=util.getArg(sourceMap,"sourceRoot",null);var sourcesContent=util.getArg(sourceMap,"sourcesContent",null);var mappings=util.getArg(sourceMap,"mappings");var file=util.getArg(sourceMap,"file",null);if(version!=this._version){throw new Error("Unsupported version: "+version)}sources=sources.map(util.normalize);this._names=ArraySet.fromArray(names,true);this._sources=ArraySet.fromArray(sources,true);this.sourceRoot=sourceRoot;this.sourcesContent=sourcesContent;this._mappings=mappings;this.file=file}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.fromSourceMap=function SourceMapConsumer_fromSourceMap(aSourceMap){var smc=Object.create(BasicSourceMapConsumer.prototype);smc._names=ArraySet.fromArray(aSourceMap._names.toArray(),true);smc._sources=ArraySet.fromArray(aSourceMap._sources.toArray(),true);smc.sourceRoot=aSourceMap._sourceRoot;smc.sourcesContent=aSourceMap._generateSourcesContent(smc._sources.toArray(),smc.sourceRoot);smc.file=aSourceMap._file;smc.__generatedMappings=aSourceMap._mappings.toArray().slice();smc.__originalMappings=aSourceMap._mappings.toArray().slice().sort(util.compareByOriginalPositions);return smc};BasicSourceMapConsumer.prototype._version=3;Object.defineProperty(BasicSourceMapConsumer.prototype,"sources",{get:function(){return this._sources.toArray().map(function(s){return this.sourceRoot!=null?util.join(this.sourceRoot,s):s},this)}});BasicSourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){var generatedLine=1;var previousGeneratedColumn=0;var previousOriginalLine=0;var previousOriginalColumn=0;var previousSource=0;var previousName=0;var length=aStr.length;var index=0;var cachedValues={};var temp={};var mapping,str,values,end,value;while(index1){mapping.source=this._sources.at(previousSource+values[1]);previousSource+=values[1];if(values.length===2){throw new Error("Found a source, but no line and column")}mapping.originalLine=previousOriginalLine+values[2];previousOriginalLine=mapping.originalLine;mapping.originalLine+=1;if(values.length===3){throw new Error("Found a source and line, but no column")}mapping.originalColumn=previousOriginalColumn+values[3];previousOriginalColumn=mapping.originalColumn;if(values.length>4){mapping.name=this._names.at(previousName+values[4]);previousName+=values[4]}}this.__generatedMappings.push(mapping);if(typeof mapping.originalLine==="number"){this.__originalMappings.push(mapping)}}}this.__generatedMappings.sort(util.compareByGeneratedPositions);this.__originalMappings.sort(util.compareByOriginalPositions)};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(aNeedle,aMappings,aLineName,aColumnName,aComparator,aBias){if(aNeedle[aLineName]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+aNeedle[aLineName])}if(aNeedle[aColumnName]<0){throw new TypeError("Column must be greater than or equal to 0, got "+aNeedle[aColumnName])}return binarySearch.search(aNeedle,aMappings,aComparator,aBias)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var index=0;index=0){var mapping=this._generatedMappings[index];if(mapping.generatedLine===needle.generatedLine){var source=util.getArg(mapping,"source",null);if(source!=null&&this.sourceRoot!=null){source=util.join(this.sourceRoot,source)}return{source:source,line:util.getArg(mapping,"originalLine",null),column:util.getArg(mapping,"originalColumn",null),name:util.getArg(mapping,"name",null)}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(aSource,nullOnMissing){if(!this.sourcesContent){return null}if(this.sourceRoot!=null){aSource=util.relative(this.sourceRoot,aSource)}if(this._sources.has(aSource)){return this.sourcesContent[this._sources.indexOf(aSource)]}var url;if(this.sourceRoot!=null&&(url=util.urlParse(this.sourceRoot))){var fileUriAbsPath=aSource.replace(/^file:\/\//,"");if(url.scheme=="file"&&this._sources.has(fileUriAbsPath)){return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]}if((!url.path||url.path=="/")&&this._sources.has("/"+aSource)){return this.sourcesContent[this._sources.indexOf("/"+aSource)]}}if(nullOnMissing){return null}else{throw new Error('"'+aSource+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column")};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,util.getArg(aArgs,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(index>=0){var mapping=this._originalMappings[index];if(mapping.source===needle.source){return{line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};exports.BasicSourceMapConsumer=BasicSourceMapConsumer;function IndexedSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sections=util.getArg(sourceMap,"sections");if(version!=this._version){throw new Error("Unsupported version: "+version)}var lastOffset={line:-1,column:0};this._sections=sections.map(function(s){if(s.url){throw new Error("Support for url field in sections not implemented.")}var offset=util.getArg(s,"offset");var offsetLine=util.getArg(offset,"line");var offsetColumn=util.getArg(offset,"column");if(offsetLine0&&aGenerated.column>=0&&!aOriginal&&!aSource&&!aName){return}else if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aOriginal&&"line"in aOriginal&&"column"in aOriginal&&aGenerated.line>0&&aGenerated.column>=0&&aOriginal.line>0&&aOriginal.column>=0&&aSource){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:aGenerated,source:aSource,original:aOriginal,name:aName}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var previousGeneratedColumn=0;var previousGeneratedLine=1;var previousOriginalColumn=0;var previousOriginalLine=0;var previousName=0;var previousSource=0;var result="";var mapping;var mappings=this._mappings.toArray();for(var i=0,len=mappings.length;i0){if(!util.compareByGeneratedPositions(mapping,mappings[i-1])){continue}result+=","}}result+=base64VLQ.encode(mapping.generatedColumn-previousGeneratedColumn);previousGeneratedColumn=mapping.generatedColumn;if(mapping.source!=null){result+=base64VLQ.encode(this._sources.indexOf(mapping.source)-previousSource);previousSource=this._sources.indexOf(mapping.source);result+=base64VLQ.encode(mapping.originalLine-1-previousOriginalLine);previousOriginalLine=mapping.originalLine-1;result+=base64VLQ.encode(mapping.originalColumn-previousOriginalColumn);previousOriginalColumn=mapping.originalColumn;if(mapping.name!=null){result+=base64VLQ.encode(this._names.indexOf(mapping.name)-previousName);previousName=this._names.indexOf(mapping.name)}}}return result};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(aSources,aSourceRoot){return aSources.map(function(source){if(!this._sourcesContents){return null}if(aSourceRoot!=null){source=util.relative(aSourceRoot,source)}var key=util.toSetString(source);return Object.prototype.hasOwnProperty.call(this._sourcesContents,key)?this._sourcesContents[key]:null},this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var map={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){map.file=this._file}if(this._sourceRoot!=null){map.sourceRoot=this._sourceRoot}if(this._sourcesContents){map.sourcesContent=this._generateSourcesContent(map.sources,map.sourceRoot)}return map};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};exports.SourceMapGenerator=SourceMapGenerator})},{"./array-set":442,"./base64-vlq":443,"./mapping-list":446,"./util":450,amdefine:451}],449:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var SourceMapGenerator=require("./source-map-generator").SourceMapGenerator;var util=require("./util");var REGEX_NEWLINE=/(\r?\n)/;var NEWLINE_CODE=10;var isSourceNode="$$$isSourceNode$$$";function SourceNode(aLine,aColumn,aSource,aChunks,aName){this.children=[];this.sourceContents={};this.line=aLine==null?null:aLine;this.column=aColumn==null?null:aColumn;this.source=aSource==null?null:aSource;this.name=aName==null?null:aName;this[isSourceNode]=true;if(aChunks!=null)this.add(aChunks)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(aGeneratedCode,aSourceMapConsumer,aRelativePath){var node=new SourceNode;var remainingLines=aGeneratedCode.split(REGEX_NEWLINE);var shiftNextLine=function(){var lineContents=remainingLines.shift();var newLine=remainingLines.shift()||"";return lineContents+newLine};var lastGeneratedLine=1,lastGeneratedColumn=0;var lastMapping=null;aSourceMapConsumer.eachMapping(function(mapping){if(lastMapping!==null){if(lastGeneratedLine0){if(lastMapping){addMappingWithCode(lastMapping,shiftNextLine())}node.add(remainingLines.join(""))}aSourceMapConsumer.sources.forEach(function(sourceFile){var content=aSourceMapConsumer.sourceContentFor(sourceFile); +}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,name,op,value){return{type:"attribute",name:name,operator:op,value:value}}(pos0,result0[0],result0[2],result0[4])}if(result0===null){pos=pos0}if(result0===null){pos0=pos;result0=parse_attrName();if(result0!==null){result0=function(offset,name){return{type:"attribute",name:name}}(pos0,result0)}if(result0===null){pos=pos0}}}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_string(){var cacheKey="string@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2,result3;var pos0,pos1,pos2,pos3;pos0=pos;pos1=pos;if(input.charCodeAt(pos)===34){result0='"';pos++}else{result0=null;if(reportFailures===0){matchFailed('"\\""')}}if(result0!==null){result1=[];if(/^[^\\"]/.test(input.charAt(pos))){result2=input.charAt(pos);pos++}else{result2=null;if(reportFailures===0){matchFailed('[^\\\\"]')}}if(result2===null){pos2=pos;pos3=pos;if(input.charCodeAt(pos)===92){result2="\\";pos++}else{result2=null;if(reportFailures===0){matchFailed('"\\\\"')}}if(result2!==null){if(input.length>pos){result3=input.charAt(pos);pos++}else{result3=null;if(reportFailures===0){matchFailed("any character")}}if(result3!==null){result2=[result2,result3]}else{result2=null;pos=pos3}}else{result2=null;pos=pos3}if(result2!==null){result2=function(offset,a,b){return a+b}(pos2,result2[0],result2[1])}if(result2===null){pos=pos2}}while(result2!==null){result1.push(result2);if(/^[^\\"]/.test(input.charAt(pos))){result2=input.charAt(pos);pos++}else{result2=null;if(reportFailures===0){matchFailed('[^\\\\"]')}}if(result2===null){pos2=pos;pos3=pos;if(input.charCodeAt(pos)===92){result2="\\";pos++}else{result2=null;if(reportFailures===0){matchFailed('"\\\\"')}}if(result2!==null){if(input.length>pos){result3=input.charAt(pos);pos++}else{result3=null;if(reportFailures===0){matchFailed("any character")}}if(result3!==null){result2=[result2,result3]}else{result2=null;pos=pos3}}else{result2=null;pos=pos3}if(result2!==null){result2=function(offset,a,b){return a+b}(pos2,result2[0],result2[1])}if(result2===null){pos=pos2}}}if(result1!==null){if(input.charCodeAt(pos)===34){result2='"';pos++}else{result2=null;if(reportFailures===0){matchFailed('"\\""')}}if(result2!==null){result0=[result0,result1,result2]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,d){return{type:"literal",value:strUnescape(d.join(""))}}(pos0,result0[1])}if(result0===null){pos=pos0}if(result0===null){pos0=pos;pos1=pos;if(input.charCodeAt(pos)===39){result0="'";pos++}else{result0=null;if(reportFailures===0){matchFailed('"\'"')}}if(result0!==null){result1=[];if(/^[^\\']/.test(input.charAt(pos))){result2=input.charAt(pos);pos++}else{result2=null;if(reportFailures===0){matchFailed("[^\\\\']")}}if(result2===null){pos2=pos;pos3=pos;if(input.charCodeAt(pos)===92){result2="\\";pos++}else{result2=null;if(reportFailures===0){matchFailed('"\\\\"')}}if(result2!==null){if(input.length>pos){result3=input.charAt(pos);pos++}else{result3=null;if(reportFailures===0){matchFailed("any character")}}if(result3!==null){result2=[result2,result3]}else{result2=null;pos=pos3}}else{result2=null;pos=pos3}if(result2!==null){result2=function(offset,a,b){return a+b}(pos2,result2[0],result2[1])}if(result2===null){pos=pos2}}while(result2!==null){result1.push(result2);if(/^[^\\']/.test(input.charAt(pos))){result2=input.charAt(pos);pos++}else{result2=null;if(reportFailures===0){matchFailed("[^\\\\']")}}if(result2===null){pos2=pos;pos3=pos;if(input.charCodeAt(pos)===92){result2="\\";pos++}else{result2=null;if(reportFailures===0){matchFailed('"\\\\"')}}if(result2!==null){if(input.length>pos){result3=input.charAt(pos);pos++}else{result3=null;if(reportFailures===0){matchFailed("any character")}}if(result3!==null){result2=[result2,result3]}else{result2=null;pos=pos3}}else{result2=null;pos=pos3}if(result2!==null){result2=function(offset,a,b){return a+b}(pos2,result2[0],result2[1])}if(result2===null){pos=pos2}}}if(result1!==null){if(input.charCodeAt(pos)===39){result2="'";pos++}else{result2=null;if(reportFailures===0){matchFailed('"\'"')}}if(result2!==null){result0=[result0,result1,result2]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,d){return{type:"literal",value:strUnescape(d.join(""))}}(pos0,result0[1])}if(result0===null){pos=pos0}}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_number(){var cacheKey="number@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2;var pos0,pos1,pos2;pos0=pos;pos1=pos;pos2=pos;result0=[];if(/^[0-9]/.test(input.charAt(pos))){result1=input.charAt(pos);pos++}else{result1=null;if(reportFailures===0){matchFailed("[0-9]")}}while(result1!==null){result0.push(result1);if(/^[0-9]/.test(input.charAt(pos))){result1=input.charAt(pos);pos++}else{result1=null;if(reportFailures===0){matchFailed("[0-9]")}}}if(result0!==null){if(input.charCodeAt(pos)===46){result1=".";pos++}else{result1=null;if(reportFailures===0){matchFailed('"."')}}if(result1!==null){result0=[result0,result1]}else{result0=null;pos=pos2}}else{result0=null;pos=pos2}result0=result0!==null?result0:"";if(result0!==null){if(/^[0-9]/.test(input.charAt(pos))){result2=input.charAt(pos);pos++}else{result2=null;if(reportFailures===0){matchFailed("[0-9]")}}if(result2!==null){result1=[];while(result2!==null){result1.push(result2);if(/^[0-9]/.test(input.charAt(pos))){result2=input.charAt(pos);pos++}else{result2=null;if(reportFailures===0){matchFailed("[0-9]")}}}}else{result1=null}if(result1!==null){result0=[result0,result1]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,a,b){return{type:"literal",value:parseFloat((a?a.join(""):"")+b.join(""))}}(pos0,result0[0],result0[1])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_path(){var cacheKey="path@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0;var pos0;pos0=pos;result0=parse_identifierName();if(result0!==null){result0=function(offset,i){return{type:"literal",value:i}}(pos0,result0)}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_type(){var cacheKey="type@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2,result3,result4;var pos0,pos1;pos0=pos;pos1=pos;if(input.substr(pos,5)==="type("){result0="type(";pos+=5}else{result0=null;if(reportFailures===0){matchFailed('"type("')}}if(result0!==null){result1=parse__();if(result1!==null){if(/^[^ )]/.test(input.charAt(pos))){result3=input.charAt(pos);pos++}else{result3=null;if(reportFailures===0){matchFailed("[^ )]")}}if(result3!==null){result2=[];while(result3!==null){result2.push(result3);if(/^[^ )]/.test(input.charAt(pos))){result3=input.charAt(pos);pos++}else{result3=null;if(reportFailures===0){matchFailed("[^ )]")}}}}else{result2=null}if(result2!==null){result3=parse__();if(result3!==null){if(input.charCodeAt(pos)===41){result4=")";pos++}else{result4=null;if(reportFailures===0){matchFailed('")"')}}if(result4!==null){result0=[result0,result1,result2,result3,result4]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,t){return{type:"type",value:t.join("")}}(pos0,result0[2])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_regex(){var cacheKey="regex@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2;var pos0,pos1;pos0=pos;pos1=pos;if(input.charCodeAt(pos)===47){result0="/";pos++}else{result0=null;if(reportFailures===0){matchFailed('"/"')}}if(result0!==null){if(/^[^\/]/.test(input.charAt(pos))){result2=input.charAt(pos);pos++}else{result2=null;if(reportFailures===0){matchFailed("[^\\/]")}}if(result2!==null){result1=[];while(result2!==null){result1.push(result2);if(/^[^\/]/.test(input.charAt(pos))){result2=input.charAt(pos);pos++}else{result2=null;if(reportFailures===0){matchFailed("[^\\/]")}}}}else{result1=null}if(result1!==null){if(input.charCodeAt(pos)===47){result2="/";pos++}else{result2=null;if(reportFailures===0){matchFailed('"/"')}}if(result2!==null){result0=[result0,result1,result2]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,d){return{type:"regexp",value:new RegExp(d.join(""))}}(pos0,result0[1])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_field(){var cacheKey="field@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2,result3,result4;var pos0,pos1,pos2;pos0=pos;pos1=pos;if(input.charCodeAt(pos)===46){result0=".";pos++}else{result0=null;if(reportFailures===0){matchFailed('"."')}}if(result0!==null){result1=parse_identifierName();if(result1!==null){result2=[];pos2=pos;if(input.charCodeAt(pos)===46){result3=".";pos++}else{result3=null;if(reportFailures===0){matchFailed('"."')}}if(result3!==null){result4=parse_identifierName();if(result4!==null){result3=[result3,result4]}else{result3=null;pos=pos2}}else{result3=null;pos=pos2}while(result3!==null){result2.push(result3);pos2=pos;if(input.charCodeAt(pos)===46){result3=".";pos++}else{result3=null;if(reportFailures===0){matchFailed('"."')}}if(result3!==null){result4=parse_identifierName();if(result4!==null){result3=[result3,result4]}else{result3=null;pos=pos2}}else{result3=null;pos=pos2}}if(result2!==null){result0=[result0,result1,result2]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,i,is){return{type:"field",name:is.reduce(function(memo,p){return memo+p[0]+p[1]},i)}}(pos0,result0[1],result0[2])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_negation(){var cacheKey="negation@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2,result3,result4;var pos0,pos1;pos0=pos;pos1=pos;if(input.substr(pos,5)===":not("){result0=":not(";pos+=5}else{result0=null;if(reportFailures===0){matchFailed('":not("')}}if(result0!==null){result1=parse__();if(result1!==null){result2=parse_selectors();if(result2!==null){result3=parse__();if(result3!==null){if(input.charCodeAt(pos)===41){result4=")";pos++}else{result4=null;if(reportFailures===0){matchFailed('")"')}}if(result4!==null){result0=[result0,result1,result2,result3,result4]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,ss){return{type:"not",selectors:ss}}(pos0,result0[2])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_matches(){var cacheKey="matches@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2,result3,result4;var pos0,pos1;pos0=pos;pos1=pos;if(input.substr(pos,9)===":matches("){result0=":matches(";pos+=9}else{result0=null;if(reportFailures===0){matchFailed('":matches("')}}if(result0!==null){result1=parse__();if(result1!==null){result2=parse_selectors();if(result2!==null){result3=parse__();if(result3!==null){if(input.charCodeAt(pos)===41){result4=")";pos++}else{result4=null;if(reportFailures===0){matchFailed('")"')}}if(result4!==null){result0=[result0,result1,result2,result3,result4]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,ss){return{type:"matches",selectors:ss}}(pos0,result0[2])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_firstChild(){var cacheKey="firstChild@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0;var pos0;pos0=pos;if(input.substr(pos,12)===":first-child"){result0=":first-child";pos+=12}else{result0=null;if(reportFailures===0){matchFailed('":first-child"')}}if(result0!==null){result0=function(offset){return nth(1)}(pos0)}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_lastChild(){var cacheKey="lastChild@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0;var pos0;pos0=pos;if(input.substr(pos,11)===":last-child"){result0=":last-child";pos+=11}else{result0=null;if(reportFailures===0){matchFailed('":last-child"')}}if(result0!==null){result0=function(offset){return nthLast(1)}(pos0)}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_nthChild(){var cacheKey="nthChild@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2,result3,result4;var pos0,pos1;pos0=pos;pos1=pos;if(input.substr(pos,11)===":nth-child("){result0=":nth-child(";pos+=11}else{result0=null;if(reportFailures===0){matchFailed('":nth-child("')}}if(result0!==null){result1=parse__();if(result1!==null){if(/^[0-9]/.test(input.charAt(pos))){result3=input.charAt(pos);pos++}else{result3=null;if(reportFailures===0){matchFailed("[0-9]")}}if(result3!==null){result2=[];while(result3!==null){result2.push(result3);if(/^[0-9]/.test(input.charAt(pos))){result3=input.charAt(pos);pos++}else{result3=null;if(reportFailures===0){matchFailed("[0-9]")}}}}else{result2=null}if(result2!==null){result3=parse__();if(result3!==null){if(input.charCodeAt(pos)===41){result4=")";pos++}else{result4=null;if(reportFailures===0){matchFailed('")"')}}if(result4!==null){result0=[result0,result1,result2,result3,result4]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,n){return nth(parseInt(n.join(""),10))}(pos0,result0[2])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_nthLastChild(){var cacheKey="nthLastChild@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1,result2,result3,result4;var pos0,pos1;pos0=pos;pos1=pos;if(input.substr(pos,16)===":nth-last-child("){result0=":nth-last-child(";pos+=16}else{result0=null;if(reportFailures===0){matchFailed('":nth-last-child("')}}if(result0!==null){result1=parse__();if(result1!==null){if(/^[0-9]/.test(input.charAt(pos))){result3=input.charAt(pos);pos++}else{result3=null;if(reportFailures===0){matchFailed("[0-9]")}}if(result3!==null){result2=[];while(result3!==null){result2.push(result3);if(/^[0-9]/.test(input.charAt(pos))){result3=input.charAt(pos);pos++}else{result3=null;if(reportFailures===0){matchFailed("[0-9]")}}}}else{result2=null}if(result2!==null){result3=parse__();if(result3!==null){if(input.charCodeAt(pos)===41){result4=")";pos++}else{result4=null;if(reportFailures===0){matchFailed('")"')}}if(result4!==null){result0=[result0,result1,result2,result3,result4]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,n){return nthLast(parseInt(n.join(""),10))}(pos0,result0[2])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function parse_class(){var cacheKey="class@"+pos;var cachedResult=cache[cacheKey];if(cachedResult){pos=cachedResult.nextPos;return cachedResult.result}var result0,result1;var pos0,pos1;pos0=pos;pos1=pos;if(input.charCodeAt(pos)===58){result0=":";pos++}else{result0=null;if(reportFailures===0){matchFailed('":"')}}if(result0!==null){if(input.substr(pos,9).toLowerCase()==="statement"){result1=input.substr(pos,9);pos+=9}else{result1=null;if(reportFailures===0){matchFailed('"statement"')}}if(result1===null){if(input.substr(pos,10).toLowerCase()==="expression"){result1=input.substr(pos,10);pos+=10}else{result1=null;if(reportFailures===0){matchFailed('"expression"')}}if(result1===null){if(input.substr(pos,11).toLowerCase()==="declaration"){result1=input.substr(pos,11);pos+=11}else{result1=null;if(reportFailures===0){matchFailed('"declaration"')}}if(result1===null){if(input.substr(pos,8).toLowerCase()==="function"){result1=input.substr(pos,8);pos+=8}else{result1=null;if(reportFailures===0){matchFailed('"function"')}}if(result1===null){if(input.substr(pos,7).toLowerCase()==="pattern"){result1=input.substr(pos,7);pos+=7}else{result1=null;if(reportFailures===0){matchFailed('"pattern"')}}}}}}if(result1!==null){result0=[result0,result1]}else{result0=null;pos=pos1}}else{result0=null;pos=pos1}if(result0!==null){result0=function(offset,c){return{type:"class",name:c}}(pos0,result0[1])}if(result0===null){pos=pos0}cache[cacheKey]={nextPos:pos,result:result0};return result0}function cleanupExpected(expected){expected.sort();var lastExpected=null;var cleanExpected=[];for(var i=0;i>>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=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()){key=element.ref.key;parent=element.ref.parent;i=worklist.length;while(i--){nextElem=worklist[i];if(nextElem.ref&&nextElem.ref.parent===parent){if(nextElem.ref.key=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){var comments=[],comment,len,i,cursor;if(!tree.range){throw new Error("attachComments needs range information")}if(!tokens.length){if(providedComments.length){for(i=0,len=providedComments.length;inode.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}}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(cursornode.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)},{"./package.json":323}],323:[function(require,module,exports){module.exports={name:"estraverse",description:"ECMAScript JS AST traversal functions",homepage:"https://github.com/estools/estraverse",main:"estraverse.js",version:"4.1.0",engines:{node:">=0.10.0"},maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"},{name:"michaelficarra",email:"npm@michael.ficarra.me"}],repository:{type:"git",url:"git+ssh://git@github.com/estools/estraverse.git"},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"},licenses:[{type:"BSD",url:"http://github.com/estools/estraverse/raw/master/LICENSE.BSD"}],scripts:{test:"npm run-script lint && npm run-script unit-test",lint:"jshint estraverse.js","unit-test":"mocha --compilers coffee:coffee-script/register"},gitHead:"347d52996336719b5910c7ffb5ff3ea8ecb87cf3",bugs:{url:"https://github.com/estools/estraverse/issues"},_id:"estraverse@4.1.0",_shasum:"40f23a76092041be6467d7f235c933b670766e05",_from:"estraverse@>=4.0.0 <5.0.0",_npmVersion:"2.8.3",_nodeVersion:"1.8.1",_npmUser:{name:"constellation",email:"utatane.tea@gmail.com"},dist:{shasum:"40f23a76092041be6467d7f235c933b670766e05",tarball:"http://registry.npmjs.org/estraverse/-/estraverse-4.1.0.tgz"},directories:{},_resolved:"https://registry.npmjs.org/estraverse/-/estraverse-4.1.0.tgz"}},{}],324:[function(require,module,exports){(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}})()},{}],325:[function(require,module,exports){(function(){"use strict";var ES6Regex,ES5Regex,NON_ASCII_WHITESPACES,IDENTIFIER_START,IDENTIFIER_PART,ch;ES5Regex={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]/,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={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]/,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 48<=ch&&ch<=57}function isHexDigit(ch){return 48<=ch&&ch<=57||97<=ch&&ch<=102||65<=ch&&ch<=70}function isOctalDigit(ch){return ch>=48&&ch<=55}NON_ASCII_WHITESPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&NON_ASCII_WHITESPACES.indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function fromCodePoint(cp){if(cp<=65535){return String.fromCharCode(cp)}var cu1=String.fromCharCode(Math.floor((cp-65536)/1024)+55296);var cu2=String.fromCharCode((cp-65536)%1024+56320);return cu1+cu2}IDENTIFIER_START=new Array(128);for(ch=0;ch<128;++ch){IDENTIFIER_START[ch]=ch>=97&&ch<=122||ch>=65&&ch<=90||ch===36||ch===95}IDENTIFIER_PART=new Array(128);for(ch=0;ch<128;++ch){IDENTIFIER_PART[ch]=ch>=97&&ch<=122||ch>=65&&ch<=90||ch>=48&&ch<=57||ch===36||ch===95}function isIdentifierStartES5(ch){return ch<128?IDENTIFIER_START[ch]:ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))}function isIdentifierPartES5(ch){return ch<128?IDENTIFIER_PART[ch]:ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch))}function isIdentifierStartES6(ch){return ch<128?IDENTIFIER_START[ch]:ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))}function isIdentifierPartES6(ch){return ch<128?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}})()},{}],326:[function(require,module,exports){(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){if(!strict&&id==="yield"){return false}return isKeywordES6(id,strict); -if(content!=null){if(aRelativePath!=null){sourceFile=util.join(aRelativePath,sourceFile)}node.setSourceContent(sourceFile,content)}});return node;function addMappingWithCode(mapping,code){if(mapping===null||mapping.source===undefined){node.add(code)}else{var source=aRelativePath?util.join(aRelativePath,mapping.source):mapping.source;node.add(new SourceNode(mapping.originalLine,mapping.originalColumn,source,code,mapping.name))}}};SourceNode.prototype.add=function SourceNode_add(aChunk){if(Array.isArray(aChunk)){aChunk.forEach(function(chunk){this.add(chunk)},this)}else if(aChunk[isSourceNode]||typeof aChunk==="string"){if(aChunk){this.children.push(aChunk)}}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.prepend=function SourceNode_prepend(aChunk){if(Array.isArray(aChunk)){for(var i=aChunk.length-1;i>=0;i--){this.prepend(aChunk[i])}}else if(aChunk[isSourceNode]||typeof aChunk==="string"){this.children.unshift(aChunk)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.walk=function SourceNode_walk(aFn){var chunk;for(var i=0,len=this.children.length;i0){newChildren=[];for(i=0;i=0;i--){part=parts[i];if(part==="."){parts.splice(i,1)}else if(part===".."){up++}else if(up>0){if(part===""){parts.splice(i+1,up);up=0}else{parts.splice(i,2);up--}}}path=parts.join("/");if(path===""){path=isAbsolute?"/":"."}if(url){url.path=path;return urlGenerate(url)}return path}exports.normalize=normalize;function join(aRoot,aPath){if(aRoot===""){aRoot="."}if(aPath===""){aPath="."}var aPathUrl=urlParse(aPath);var aRootUrl=urlParse(aRoot);if(aRootUrl){aRoot=aRootUrl.path||"/"}if(aPathUrl&&!aPathUrl.scheme){if(aRootUrl){aPathUrl.scheme=aRootUrl.scheme}return urlGenerate(aPathUrl)}if(aPathUrl||aPath.match(dataUrlRegexp)){return aPath}if(aRootUrl&&!aRootUrl.host&&!aRootUrl.path){aRootUrl.host=aPath;return urlGenerate(aRootUrl)}var joined=aPath.charAt(0)==="/"?aPath:normalize(aRoot.replace(/\/+$/,"")+"/"+aPath);if(aRootUrl){aRootUrl.path=joined;return urlGenerate(aRootUrl)}return joined}exports.join=join;function relative(aRoot,aPath){if(aRoot===""){aRoot="."}aRoot=aRoot.replace(/\/$/,"");var url=urlParse(aRoot);if(aPath.charAt(0)=="/"&&url&&url.path=="/"){return aPath.slice(1)}return aPath.indexOf(aRoot+"/")===0?aPath.substr(aRoot.length+1):aPath}exports.relative=relative;function toSetString(aStr){return"$"+aStr}exports.toSetString=toSetString;function fromSetString(aStr){return aStr.substr(1)}exports.fromSetString=fromSetString;function strcmp(aStr1,aStr2){var s1=aStr1||"";var s2=aStr2||"";return(s1>s2)-(s10){ary.splice(i-1,2);i-=2}}}}function normalize(name,baseName){var baseParts;if(name&&name.charAt(0)==="."){if(baseName){baseParts=baseName.split("/");baseParts=baseParts.slice(0,baseParts.length-1);baseParts=baseParts.concat(name.split("/"));trimDots(baseParts);name=baseParts.join("/")}}return name}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(id){function load(value){loaderCache[id]=value}load.fromText=function(id,text){throw new Error("amdefine does not implement load.fromText")};return load}makeRequire=function(systemRequire,exports,module,relId){function amdRequire(deps,callback){if(typeof deps==="string"){return stringRequire(systemRequire,exports,module,deps,relId)}else{deps=deps.map(function(depName){return stringRequire(systemRequire,exports,module,depName,relId)});process.nextTick(function(){callback.apply(null,deps)})}}amdRequire.toUrl=function(filePath){if(filePath.indexOf(".")===0){return normalize(filePath,path.dirname(module.filename))}else{return filePath}};return amdRequire};requireFn=requireFn||function req(){return module.require.apply(module,arguments)};function runFactory(id,deps,factory){var r,e,m,result;if(id){e=loaderCache[id]={};m={id:id,uri:__filename,exports:e};r=makeRequire(requireFn,e,m,id)}else{if(alreadyCalled){throw new Error("amdefine with no module ID cannot be called more than once per file.")}alreadyCalled=true;e=module.exports;m=module;r=makeRequire(requireFn,e,m,module.id)}if(deps){deps=deps.map(function(depName){return r(depName)})}if(typeof factory==="function"){result=factory.apply(m.exports,deps)}else{result=factory}if(result!==undefined){m.exports=result;if(id){loaderCache[id]=m.exports}}}stringRequire=function(systemRequire,exports,module,id,relId){var index=id.indexOf("!"),originalId=id,prefix,plugin;if(index===-1){id=normalize(id,relId);if(id==="require"){return makeRequire(systemRequire,exports,module,relId)}else if(id==="exports"){return exports}else if(id==="module"){return module}else if(loaderCache.hasOwnProperty(id)){return loaderCache[id]}else if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}else{if(systemRequire){return systemRequire(originalId)}else{throw new Error("No module with ID: "+id)}}}else{prefix=id.substring(0,index);id=id.substring(index+1,id.length);plugin=stringRequire(systemRequire,exports,module,prefix,relId);if(plugin.normalize){id=plugin.normalize(id,makeNormalize(relId))}else{id=normalize(id,relId)}if(loaderCache[id]){return loaderCache[id]}else{plugin.load(id,makeRequire(systemRequire,exports,module,relId),makeLoad(id),{});return loaderCache[id]}}};function define(id,deps,factory){if(Array.isArray(id)){factory=deps;deps=id;id=undefined}else if(typeof id!=="string"){factory=id;id=deps=undefined}if(deps&&!Array.isArray(deps)){factory=deps;deps=undefined}if(!deps){deps=["require","exports","module"]}if(id){defineCache[id]=[id,deps,factory]}else{runFactory(id,deps,factory)}}define.require=function(id){if(loaderCache[id]){return loaderCache[id]}if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}};define.amd={};return define}module.exports=amdefine}).call(this,require("_process"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{_process:183,path:182}],452:[function(require,module,exports){"use strict";module.exports=function toFastProperties(obj){function f(){}f.prototype=obj;new f;return;eval(obj)}},{}],453:[function(require,module,exports){"use strict";module.exports=function(str){return str.replace(/[\s\uFEFF\xA0]+$/g,"")}},{}],454:[function(require,module,exports){module.exports={name:"babel-core",description:"Turn ES6 code into readable vanilla ES5 with source maps",version:"5.0.9",author:"Sebastian McKenzie ",homepage:"https://babeljs.io/",repository:"babel/babel",main:"lib/babel/api/node.js",browser:{"./lib/babel/api/register/node.js":"./lib/babel/api/register/browser.js"},keywords:["harmony","classes","modules","let","const","var","es6","transpile","transpiler","6to5","babel"],scripts:{bench:"make bench",test:"make test"},dependencies:{"ast-types":"~0.7.0",chalk:"^1.0.0","convert-source-map":"hipertracker/convert-source-map","core-js":"^0.8.1",debug:"^2.1.1","detect-indent":"^3.0.0",estraverse:"^1.9.1",esutils:"^1.1.6","fs-readdir-recursive":"^0.1.0",globals:"^6.2.0","is-integer":"^1.0.4","js-tokens":"1.0.0",leven:"^1.0.1","line-numbers":"0.2.0",lodash:"^3.2.0",minimatch:"^2.0.3","output-file-sync":"^1.1.0","path-is-absolute":"^1.0.0","private":"^0.1.6","regenerator-babel":"0.8.13-2",regexpu:"^1.1.2",repeating:"^1.1.2","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.4.0","source-map-support":"^0.2.9","to-fast-properties":"^1.0.0","trim-right":"^1.0.0"},devDependencies:{babel:"4.7.13",browserify:"^9.0.3",chai:"^2.0.0",eslint:"^0.15.1","babel-eslint":"^1.0.1",esvalid:"^1.1.0",istanbul:"^0.3.5",matcha:"^0.6.0",mocha:"^2.1.0",rimraf:"^2.2.8","uglify-js":"^2.4.16"}}},{}],455:[function(require,module,exports){module.exports={"abstract-expression-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-delete":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceDelete",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"abstract-expression-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceSet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-comprehension-container":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-from":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"array-push":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"STATEMENT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"call-instance-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,type:"ThisExpression",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INITIALIZERS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"call-static-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CONSTRUCTOR",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INITIALIZERS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"CONSTRUCTOR",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},call:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"CONTEXT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"class-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"DECORATOR",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"class-super-constructor-call-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"class-super-constructor-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"corejs-is-iterator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CORE_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isIterable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"corejs-iterator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CORE_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getIterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"default-parameter":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"DEFAULT_VALUE",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"let",type:"VariableDeclaration",end:null}],type:"Program",end:null},"exports-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-default-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-from-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},value:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"INIT",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-module-declaration-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"exports-module-declaration":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"exports", -type:"Identifier",end:null},{start:null,loc:null,range:null,value:"__esModule",raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"for-of-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARR",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"for-of-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:null,update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},operator:">=",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"for-of":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"Program",end:null},"helper-async-to-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"next",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"throw",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:null,type:"ReturnStatement",end:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:null,type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"then",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-bind":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Function",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-class-call-check":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},operator:"instanceof",right:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"BinaryExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot call a class as a function",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-create-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{ -start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-create-decorated-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,leadingComments:null,_paths:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"The decorator for method ",raw:null,type:"Literal",end:null},operator:"+",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,value:" is of the invalid type ",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-default-props":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-defaults":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyNames",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-define-property":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},operator:"==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-extends":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"assign",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:1,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null, -loc:null,range:null,name:"source",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-has-own":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-inherits":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"Super expression must either be null or a function, not ",raw:null,type:"Literal",end:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"create",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__proto__",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-interop-require-wildcard":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},value:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-interop-require":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},alternate:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-object-destructuring-empty":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot destructure undefined",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-object-without-properties":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},right:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"indexOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:">=",right:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForInStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-self-global":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"self",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-slice":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"slice",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-sliced-to-array-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false, -params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-sliced-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,leadingComments:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"CatchClause",end:null,_scopeInfo:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-tagged-template-literal-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-tagged-template-literal":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null}],type:"CallExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-temporal-assert-defined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"ReferenceError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},operator:"+",right:{start:null,loc:null,range:null,value:" is not defined - temporal dead zone",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-temporal-undefined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null,parenthesizedExpression:true},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-to-consumable-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"helper-typeof":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,value:"symbol",raw:null,type:"Literal",end:null},alternate:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"let-scoping-return":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"v",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null},"ludicrous-in":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"RIGHT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"LEFT",type:"Identifier",end:null},computed:true,type:"MemberExpression", -end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"named-function":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"GET_OUTER_ID",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"property-method-assignment-wrapper-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:true,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,delegate:true,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"YieldExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"property-method-assignment-wrapper":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionDeclaration",end:null,_scopeInfo:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"prototype-identifier":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CLASS_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"require-assign-key":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null}],type:"Program",end:null},require:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},rest:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"ARRAY_LEN",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"START",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARRAY_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"ForStatement",end:null,_scopeInfo:null,_paths:null}],type:"Program",end:null},"self-contained-helpers-head":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"HELPER",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},system:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"System",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"register",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"MODULE_DEPENDENCIES",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"EXPORT_IDENTIFIER",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"setters",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"SETTERS",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"execute",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"EXECUTE",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"tail-call-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,body:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BLOCK",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"WhileStatement",end:null,_scopeInfo:null,_paths:null},label:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"LabeledStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null}],type:"Program",end:null},"test-exports":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"test-module":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"umd-commonjs-strict":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"root",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"BROWSER_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"UMD_ROOT",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FACTORY_PARAMETERS",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"FACTORY_BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,_scopeInfo:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null},"umd-runner-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"COMMON_TEST",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"mod",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"mod",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"BROWSER_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"GLOBAL_ARG",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"mod",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_scopeInfo:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_scopeInfo:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null}}},{}]},{},[19])(19)}); \ No newline at end of file +}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){return false}lowCh=id.charCodeAt(i);if(!(56320<=lowCh&&lowCh<=57343)){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}})()},{"./code":325}],327:[function(require,module,exports){(function(){"use strict";exports.ast=require("./ast");exports.code=require("./code");exports.keyword=require("./keyword")})()},{"./ast":324,"./code":325,"./keyword":326}],328:[function(require,module,exports){module.exports={builtin:{Array:false,ArrayBuffer:false,Boolean:false,constructor:false,Date:false,decodeURI:false,decodeURIComponent:false,encodeURI:false,encodeURIComponent:false,Error: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,URIError:false,valueOf:false,WeakMap:false,WeakSet:false},nonstandard:{escape:false,unescape:false},browser:{addEventListener:false,alert:false,applicationCache:false,atob:false,Audio:false,AudioProcessingEvent:false,BeforeUnloadEvent:false,Blob:false,blur:false,btoa:false,cancelAnimationFrame:false,CanvasGradient:false,CanvasPattern:false,CanvasRenderingContext2D:false,clearInterval:false,clearTimeout:false,close:false,closed:false,CloseEvent:false,Comment:false,CompositionEvent:false,confirm:false,console:false,crypto:false,CSS:false,CustomEvent:false,DataView:false,Debug:false,defaultStatus:false,devicePixelRatio:false,dispatchEvent:false,document:false,Document:false,DocumentFragment:false,DOMParser:false,DragEvent:false,Element:false,ElementTimeControl:false,ErrorEvent:false,event:false,Event:false,FileReader:false,fetch:false,find:false,focus:false,FocusEvent:false,FormData:false,frameElement:false,frames:false,GamepadEvent:false,getComputedStyle:false,getSelection:false,HashChangeEvent:false,Headers:false,history:false,HTMLAnchorElement:false,HTMLBaseElement:false,HTMLBlockquoteElement:false,HTMLBodyElement:false,HTMLBRElement:false,HTMLButtonElement:false,HTMLCanvasElement:false,HTMLDirectoryElement:false,HTMLDivElement:false,HTMLDListElement:false,HTMLElement:false,HTMLFieldSetElement:false,HTMLFontElement:false,HTMLFormElement:false,HTMLFrameElement:false,HTMLFrameSetElement:false,HTMLHeadElement:false,HTMLHeadingElement:false,HTMLHRElement:false,HTMLHtmlElement:false,HTMLIFrameElement:false,HTMLImageElement:false,HTMLInputElement:false,HTMLIsIndexElement:false,HTMLLabelElement:false,HTMLLayerElement:false,HTMLLegendElement:false,HTMLLIElement:false,HTMLLinkElement:false,HTMLMapElement:false,HTMLMenuElement:false,HTMLMetaElement:false,HTMLModElement:false,HTMLObjectElement:false,HTMLOListElement:false,HTMLOptGroupElement:false,HTMLOptionElement:false,HTMLParagraphElement:false,HTMLParamElement:false,HTMLPreElement:false,HTMLQuoteElement:false,HTMLScriptElement:false,HTMLSelectElement:false,HTMLStyleElement:false,HTMLTableCaptionElement:false,HTMLTableCellElement:false,HTMLTableColElement:false,HTMLTableElement:false,HTMLTableRowElement:false,HTMLTableSectionElement:false,HTMLTextAreaElement:false,HTMLTitleElement:false,HTMLUListElement: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,indexedDB:false,innerHeight:false,innerWidth:false,InputEvent:false,Intl:false,KeyboardEvent:false,length:false,localStorage:false,location:false,matchMedia:false,MessageChannel:false,MessageEvent:false,MessagePort:false,MouseEvent:false,moveBy:false,moveTo:false,MutationObserver:false,name:false,navigator:false,Node:false,NodeFilter:false,NodeList:false,Notification:false,OfflineAudioCompletionEvent: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,outerHeight:false,outerWidth:false,PageTransitionEvent:false,pageXOffset:false,pageYOffset:false,parent:false,PopStateEvent:false,postMessage:false,print:false,ProgressEvent:false,prompt:false,Range:false,Request:false,Response:false,removeEventListener:false,requestAnimationFrame:false,resizeBy:false,resizeTo:false,screen:false,screenX:false,screenY:false,scroll:false,scrollbars:false,scrollBy:false,scrollTo:false,scrollX:false,scrollY:false,self:false,sessionStorage:false,setInterval:false,setTimeout:false,SharedWorker:false,showModalDialog:false,status:false,stop:false,StorageEvent: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,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,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,SVGGlyphElement:false,SVGGlyphRefElement:false,SVGGradientElement: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,Text:false,TextDecoder:false,TextEncoder:false,TimeEvent:false,top:false,TouchEvent:false,UIEvent:false,URL: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,XMLHttpRequest:false,XMLSerializer:false,XPathEvaluator:false,XPathException:false,XPathExpression:false,XPathNamespace:false,XPathNSResolver:false,XPathResult:false},worker:{importScripts:true,postMessage:true,self:true},node:{__dirname:false,__filename:false,arguments:false,Buffer:false,clearImmediate:false,clearInterval:false,clearTimeout:false,console:false,DataView:false,exports:true,GLOBAL:false,global:false,module:false,process:false,require:false,setImmediate:false,setInterval:false,setTimeout:false},amd:{define:false,require:false},mocha:{after:false,afterEach:false,before:false,beforeEach:false,context:false,describe:false,it: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},qunit:{asyncTest:false,deepEqual:false,equal:false,expect:false,module:false,notDeepEqual:false,notEqual: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},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,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,App:false,Assets:false,Blaze:false,check:false,Cordova:false,DDP:false,DDPServer: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,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,listFiles:false,load:false,ls:false,md5sumFile:false,mkdir:false,Mongo:false,ObjectId:false,PlanCache: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}}},{}],329:[function(require,module,exports){module.exports=require("./globals.json")},{"./globals.json":328}],330:[function(require,module,exports){var isNaN=require("is-nan");var isFinite=require("is-finite");module.exports=Number.isInteger||function(val){return typeof val==="number"&&!isNaN(val)&&isFinite(val)&&parseInt(val,10)===val}},{"is-finite":331,"is-nan":332}],331:[function(require,module,exports){"use strict";module.exports=Number.isFinite||function(val){if(typeof val!=="number"||val!==val||val===Infinity||val===-Infinity){return false}return true}},{}],332:[function(require,module,exports){"use strict";module.exports=function isNaN(value){return value!==value}},{}],333:[function(require,module,exports){module.exports=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g;module.exports.matchToToken=function(match){token={type:"invalid",value:match[0]};if(match[1])token.type="string",token.closed=!!(match[3]||match[4]);else if(match[5])token.type="comment";else if(match[6])token.type="comment",token.closed=!!match[7];else if(match[8])token.type="regex";else if(match[9])token.type="number";else if(match[10])token.type="name";else if(match[11])token.type="punctuator";else if(match[12])token.type="whitespace";return token}},{}],334:[function(require,module,exports){var arr=[];var charCodeCache=[];module.exports=function(a,b){if(a===b){return 0}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen}if(bLen===0){return aLen}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(iret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2}}return ret}},{}],335:[function(require,module,exports){var leftPad=require("left-pad");function get(options,key,defaultValue){return key in options?options[key]:defaultValue}function lineNumbers(code,options){var getOption=get.bind(null,options||{});var transform=getOption("transform",Function.prototype);var padding=getOption("padding"," ");var before=getOption("before"," ");var after=getOption("after"," | ");var start=getOption("start",1);var isArray=Array.isArray(code);var lines=isArray?code:code.split("\n");var end=start+lines.length-1;var width=String(end).length;var numbered=lines.map(function(line,index){var number=start+index;var params={before:before,number:number,width:width,after:after,line:line};transform(params);return params.before+leftPad(params.number,width,padding)+params.after+params.line});return isArray?numbered:numbered.join("\n")}module.exports=lineNumbers},{"left-pad":336}],336:[function(require,module,exports){module.exports=leftpad;function leftpad(str,len,ch){str=String(str);var i=-1;ch||(ch=" ");len=len-str.length;while(++i-1){splice.call(array,fromIndex,1)}}return array}module.exports=pull},{"../internal/baseIndexOf":371}],341:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseUniq=require("../internal/baseUniq"),isIterateeCall=require("../internal/isIterateeCall"),sortedUniq=require("../internal/sortedUniq");function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(isSorted!=null&&typeof isSorted!="boolean"){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?null:isSorted;isSorted=false}iteratee=iteratee==null?iteratee:baseCallback(iteratee,thisArg,3);return isSorted?sortedUniq(array,iteratee):baseUniq(array,iteratee)}module.exports=uniq},{"../internal/baseCallback":359,"../internal/baseUniq":386,"../internal/isIterateeCall":407,"../internal/sortedUniq":413}],342:[function(require,module,exports){module.exports=require("./includes")},{"./includes":345}],343:[function(require,module,exports){module.exports=require("./forEach")},{"./forEach":344}],344:[function(require,module,exports){var arrayEach=require("../internal/arrayEach"),baseEach=require("../internal/baseEach"),createForEach=require("../internal/createForEach");var forEach=createForEach(arrayEach,baseEach);module.exports=forEach},{"../internal/arrayEach":353,"../internal/baseEach":363,"../internal/createForEach":397}],345:[function(require,module,exports){var baseIndexOf=require("../internal/baseIndexOf"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength"),isString=require("../lang/isString"),values=require("../object/values");var nativeMax=Math.max;function includes(collection,target,fromIndex,guard){var length=collection?collection.length:0;if(!isLength(length)){collection=values(collection);length=collection.length}if(!length){return false}if(typeof fromIndex!="number"||guard&&isIterateeCall(target,fromIndex,guard)){fromIndex=0}else{fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex-1:baseIndexOf(collection,target,fromIndex)>-1}module.exports=includes},{"../internal/baseIndexOf":371,"../internal/isIterateeCall":407,"../internal/isLength":408,"../lang/isArray":418,"../lang/isString":427,"../object/values":437}],346:[function(require,module,exports){var arrayMap=require("../internal/arrayMap"),baseCallback=require("../internal/baseCallback"),baseMap=require("../internal/baseMap"),isArray=require("../lang/isArray");function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=baseCallback(iteratee,thisArg,3);return func(collection,iteratee)}module.exports=map},{"../internal/arrayMap":354,"../internal/baseCallback":359,"../internal/baseMap":376,"../lang/isArray":418}],347:[function(require,module,exports){var arrayReduceRight=require("../internal/arrayReduceRight"),baseEachRight=require("../internal/baseEachRight"),createReduce=require("../internal/createReduce");var reduceRight=createReduce(arrayReduceRight,baseEachRight);module.exports=reduceRight},{"../internal/arrayReduceRight":355,"../internal/baseEachRight":364,"../internal/createReduce":398}],348:[function(require,module,exports){var arraySome=require("../internal/arraySome"),baseCallback=require("../internal/baseCallback"),baseSome=require("../internal/baseSome"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall");function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=null}if(typeof predicate!="function"||typeof thisArg!="undefined"){predicate=baseCallback(predicate,thisArg,3)}return func(collection,predicate)}module.exports=some},{"../internal/arraySome":356,"../internal/baseCallback":359,"../internal/baseSome":383,"../internal/isIterateeCall":407,"../lang/isArray":418}],349:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseEach=require("../internal/baseEach"),baseSortBy=require("../internal/baseSortBy"),compareAscending=require("../internal/compareAscending"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength");function sortBy(collection,iteratee,thisArg){if(collection==null){return[]}var index=-1,length=collection.length,result=isLength(length)?Array(length):[];if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=null}iteratee=baseCallback(iteratee,thisArg,3);baseEach(collection,function(value,key,collection){result[++index]={criteria:iteratee(value,key,collection),index:index,value:value}});return baseSortBy(result,compareAscending)}module.exports=sortBy},{"../internal/baseCallback":359,"../internal/baseEach":363,"../internal/baseSortBy":384,"../internal/compareAscending":392,"../internal/isIterateeCall":407,"../internal/isLength":408}],350:[function(require,module,exports){var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max;function restParam(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=nativeMax(typeof start=="undefined"?func.length-1:+start||0,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);while(++indexother||!valIsReflexive||typeof value=="undefined"&&othIsReflexive){return 1}if(value=200,seen=isLarge?createCache():null,result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index3&&typeof customizer=="function"){customizer=bindCallback(customizer,thisArg,5);length-=2}else{customizer=length>2&&typeof thisArg=="function"?thisArg:null;length-=customizer?1:0}if(guard&&isIterateeCall(args[1],args[2],guard)){customizer=length==3?null:customizer;length=2}var index=0;while(++indexarrLength)){return false}while(result&&++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}module.exports=isLength},{}],409:[function(require,module,exports){function isObjectLike(value){return!!value&&typeof value=="object"}module.exports=isObjectLike},{}],410:[function(require,module,exports){var isObject=require("../lang/isObject");function isStrictComparable(value){return value===value&&(value===0?1/value>0:!isObject(value))}module.exports=isStrictComparable},{"../lang/isObject":424}],411:[function(require,module,exports){var baseForIn=require("./baseForIn"),isObjectLike=require("./isObjectLike");var objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;function shimIsPlainObject(value){var Ctor;if(!(isObjectLike(value)&&objToString.call(value)==objectTag)||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;baseForIn(value,function(subValue,key){result=key});return typeof result=="undefined"||hasOwnProperty.call(value,result)}module.exports=shimIsPlainObject},{"./baseForIn":367,"./isObjectLike":409}],412:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isIndex=require("./isIndex"),isLength=require("./isLength"),keysIn=require("../object/keysIn"),support=require("../support");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length;var allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object));var index=-1,result=[];while(++index0;while(++index=0;i--){filename=f[i];if(filename)break}for(var i=0,l=set.length;i>> no match, partial?",file,fr,pattern,pr);if(fr===fl)return true}return false}var hit;if(typeof p==="string"){if(options.nocase){hit=f.toLowerCase()===p.toLowerCase()}else{hit=f===p}this.debug("string match",p,f,hit)}else{hit=f.match(p);this.debug("pattern match",p,f,hit)}if(!hit)return false}if(fi===fl&&pi===pl){return true}else if(fi===fl){return partial}else if(pi===pl){var emptyFileEnd=fi===fl-1&&file[fi]==="";return emptyFileEnd}throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}}).call(this,require("_process"))},{_process:213,"brace-expansion":444}],444:[function(require,module,exports){var concatMap=require("concat-map");var balanced=require("balanced-match");module.exports=expandTop;var escSlash="\x00SLASH"+Math.random()+"\x00";var escOpen="\x00OPEN"+Math.random()+"\x00";var escClose="\x00CLOSE"+Math.random()+"\x00";var escComma="\x00COMMA"+Math.random()+"\x00";var escPeriod="\x00PERIOD"+Math.random()+"\x00";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[];var m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre;var body=m.body;var post=m.post;var p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);if(post.length){p[p.length-1]+=postParts.shift();p.push.apply(p,postParts)}parts.push.apply(parts,p);return parts}function expandTop(str){if(!str)return[];return expand(escapeBraces(str),true).map(unescapeBraces)}function identity(e){return e}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,isTop){var expansions=[];var m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);var isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);var isSequence=isNumericSequence||isAlphaSequence;var isOptions=/^(.*,)+(.+)?$/.test(m.body);if(!isSequence&&!isOptions){if(m.post.match(/,.*}/)){str=m.pre+"{"+m.body+escClose+m.post;return expand(str)}return[str]}var n;if(isSequence){n=m.body.split(/\.\./)}else{n=parseCommaParts(m.body);if(n.length===1){n=expand(n[0],false).map(embrace);if(n.length===1){var post=m.post.length?expand(m.post,false):[""];return post.map(function(p){return m.pre+n[0]+p})}}}var pre=m.pre;var post=m.post.length?expand(m.post,false):[""];var N;if(isSequence){var x=numeric(n[0]);var y=numeric(n[1]);var width=Math.max(n[0].length,n[1].length);var incr=n.length==3?Math.abs(numeric(n[2])):1;var test=lte;var reverse=y0){var z=new Array(need+1).join("0");if(i<0)c="-"+z+c.slice(1);else c=z+c}}}N.push(c)}}else{N=concatMap(n,function(el){return expand(el,false)})}for(var j=0;j1?str.substring(m.start+a.length,m.end):"";m.post=str.slice(m.end+b.length);return m}}}if(bal&&ended){var start=m.start+a.length;m=balanced(a,b,str.substr(start));if(m){m.start+=start;m.end+=start;m.pre=str.slice(0,start)+m.pre}return m}}},{}],446:[function(require,module,exports){module.exports=function(xs,fn){var res=[];for(var i=0;idst){names[dst]=names[src]}++dst}}names.length=dst;return names};function defaultCreatorFn(object){return create(null)}function makeAccessor(secretCreatorFn){var brand=makeUniqueKey();var passkey=create(null);secretCreatorFn=secretCreatorFn||defaultCreatorFn;function register(object){var secret;function vault(key,forget){if(key===passkey){return forget?secret=null:secret||(secret=secretCreatorFn(object))}}defProp(object,brand,vault)}function accessor(object){if(!hasOwn.call(object,brand))register(object);return object[brand](passkey)}accessor.forget=function(object){if(hasOwn.call(object,brand))object[brand](passkey,true)};return accessor}defProp(exports,"makeAccessor",makeAccessor)},{}],449:[function(require,module,exports){var assert=require("assert");var types=require("recast").types;var isArray=types.builtInTypes.array;var b=types.builders;var n=types.namedTypes;var leap=require("./leap");var meta=require("./meta");var util=require("./util");var runtimeProperty=util.runtimeProperty;var hasOwn=Object.prototype.hasOwnProperty;function Emitter(contextId){assert.ok(this instanceof Emitter);n.Identifier.assert(contextId);this.nextTempId=0;Object.defineProperties(this,{contextId:{value:contextId},listing:{value:[]},marked:{value:[true]},finalLoc:{value:loc()},tryEntries:{value:[]}});Object.defineProperties(this,{leapManager:{value:new leap.LeapManager(this)}})}var Ep=Emitter.prototype;exports.Emitter=Emitter;function loc(){return b.literal(-1)}Ep.mark=function(loc){n.Literal.assert(loc);var index=this.listing.length;if(loc.value===-1){loc.value=index}else{assert.strictEqual(loc.value,index)}this.marked[index]=true;return loc};Ep.emit=function(node){if(n.Expression.check(node))node=b.expressionStatement(node);n.Statement.assert(node);this.listing.push(node)};Ep.emitAssign=function(lhs,rhs){this.emit(this.assign(lhs,rhs));return lhs};Ep.assign=function(lhs,rhs){return b.expressionStatement(b.assignmentExpression("=",lhs,rhs))};Ep.contextProperty=function(name,computed){return b.memberExpression(this.contextId,computed?b.literal(name):b.identifier(name),!!computed)};var volatileContextPropertyNames={prev:true,next:true,sent:true,rval:true};Ep.isVolatileContextProperty=function(expr){if(n.MemberExpression.check(expr)){if(expr.computed){return true}if(n.Identifier.check(expr.object)&&n.Identifier.check(expr.property)&&expr.object.name===this.contextId.name&&hasOwn.call(volatileContextPropertyNames,expr.property.name)){return true}}return false};Ep.stop=function(rval){if(rval){this.setReturnValue(rval)}this.jump(this.finalLoc)};Ep.setReturnValue=function(valuePath){n.Expression.assert(valuePath.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(valuePath))};Ep.clearPendingException=function(tryLoc,assignee){n.Literal.assert(tryLoc);var catchCall=b.callExpression(this.contextProperty("catch",true),[tryLoc]);if(assignee){this.emitAssign(assignee,catchCall)}else{this.emit(catchCall)}};Ep.jump=function(toLoc){this.emitAssign(this.contextProperty("next"),toLoc);this.emit(b.breakStatement())};Ep.jumpIf=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);this.emit(b.ifStatement(test,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};Ep.jumpIfNot=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);var negatedTest;if(n.UnaryExpression.check(test)&&test.operator==="!"){negatedTest=test.argument}else{negatedTest=b.unaryExpression("!",test)}this.emit(b.ifStatement(negatedTest,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};Ep.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)};Ep.getContextFunction=function(id){return b.functionExpression(id||null,[this.contextId],b.blockStatement([this.getDispatchLoop()]),false,false)};Ep.getDispatchLoop=function(){var self=this;var cases=[];var current;var alreadyEnded=false;self.listing.forEach(function(stmt,i){if(self.marked.hasOwnProperty(i)){cases.push(b.switchCase(b.literal(i),current=[]));alreadyEnded=false}if(!alreadyEnded){current.push(stmt);if(isSwitchCaseEnder(stmt))alreadyEnded=true}});this.finalLoc.value=this.listing.length;cases.push(b.switchCase(this.finalLoc,[]),b.switchCase(b.literal("end"),[b.returnStatement(b.callExpression(this.contextProperty("stop"),[]))]));return b.whileStatement(b.literal(1),b.switchStatement(b.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),cases))};function isSwitchCaseEnder(stmt){return n.BreakStatement.check(stmt)||n.ContinueStatement.check(stmt)||n.ReturnStatement.check(stmt)||n.ThrowStatement.check(stmt)}Ep.getTryLocsList=function(){if(this.tryEntries.length===0){return null}var lastLocValue=0;return b.arrayExpression(this.tryEntries.map(function(tryEntry){var thisLocValue=tryEntry.firstLoc.value;assert.ok(thisLocValue>=lastLocValue,"try entries out of order");lastLocValue=thisLocValue;var ce=tryEntry.catchEntry;var fe=tryEntry.finallyEntry;var locs=[tryEntry.firstLoc,ce?ce.firstLoc:null];if(fe){locs[2]=fe.firstLoc;locs[3]=fe.afterLoc}return b.arrayExpression(locs)}))};Ep.explode=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var node=path.value;var self=this;n.Node.assert(node);if(n.Statement.check(node))return self.explodeStatement(path);if(n.Expression.check(node))return self.explodeExpression(path,ignoreResult);if(n.Declaration.check(node))throw getDeclError(node);switch(node.type){case"Program":return path.get("body").map(self.explodeStatement,self);case"VariableDeclarator":throw getDeclError(node);case"Property":case"SwitchCase":case"CatchClause":throw new Error(node.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(node.type))}};function getDeclError(node){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+JSON.stringify(node))}Ep.explodeStatement=function(path,labelId){assert.ok(path instanceof types.NodePath);var stmt=path.value;var self=this;n.Statement.assert(stmt);if(labelId){n.Identifier.assert(labelId)}else{labelId=null}if(n.BlockStatement.check(stmt)){return path.get("body").each(self.explodeStatement,self)}if(!meta.containsLeap(stmt)){self.emit(stmt);return}switch(stmt.type){case"ExpressionStatement":self.explodeExpression(path.get("expression"),true);break;case"LabeledStatement":var after=loc();self.leapManager.withEntry(new leap.LabeledEntry(after,stmt.label),function(){ + self.explodeStatement(path.get("body"),stmt.label)});self.mark(after);break;case"WhileStatement":var before=loc();var after=loc();self.mark(before);self.jumpIfNot(self.explodeExpression(path.get("test")),after);self.leapManager.withEntry(new leap.LoopEntry(after,before,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(before);self.mark(after);break;case"DoWhileStatement":var first=loc();var test=loc();var after=loc();self.mark(first);self.leapManager.withEntry(new leap.LoopEntry(after,test,labelId),function(){self.explode(path.get("body"))});self.mark(test);self.jumpIf(self.explodeExpression(path.get("test")),first);self.mark(after);break;case"ForStatement":var head=loc();var update=loc();var after=loc();if(stmt.init){self.explode(path.get("init"),true)}self.mark(head);if(stmt.test){self.jumpIfNot(self.explodeExpression(path.get("test")),after)}else{}self.leapManager.withEntry(new leap.LoopEntry(after,update,labelId),function(){self.explodeStatement(path.get("body"))});self.mark(update);if(stmt.update){self.explode(path.get("update"),true)}self.jump(head);self.mark(after);break;case"ForInStatement":var head=loc();var after=loc();var keyIterNextFn=self.makeTempVar();self.emitAssign(keyIterNextFn,b.callExpression(runtimeProperty("keys"),[self.explodeExpression(path.get("right"))]));self.mark(head);var keyInfoTmpVar=self.makeTempVar();self.jumpIf(b.memberExpression(b.assignmentExpression("=",keyInfoTmpVar,b.callExpression(keyIterNextFn,[])),b.identifier("done"),false),after);self.emitAssign(stmt.left,b.memberExpression(keyInfoTmpVar,b.identifier("value"),false));self.leapManager.withEntry(new leap.LoopEntry(after,head,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(head);self.mark(after);break;case"BreakStatement":self.emitAbruptCompletion({type:"break",target:self.leapManager.getBreakLoc(stmt.label)});break;case"ContinueStatement":self.emitAbruptCompletion({type:"continue",target:self.leapManager.getContinueLoc(stmt.label)});break;case"SwitchStatement":var disc=self.emitAssign(self.makeTempVar(),self.explodeExpression(path.get("discriminant")));var after=loc();var defaultLoc=loc();var condition=defaultLoc;var caseLocs=[];var cases=stmt.cases||[];for(var i=cases.length-1;i>=0;--i){var c=cases[i];n.SwitchCase.assert(c);if(c.test){condition=b.conditionalExpression(b.binaryExpression("===",disc,c.test),caseLocs[i]=loc(),condition)}else{caseLocs[i]=defaultLoc}}self.jump(self.explodeExpression(new types.NodePath(condition,path,"discriminant")));self.leapManager.withEntry(new leap.SwitchEntry(after),function(){path.get("cases").each(function(casePath){var c=casePath.value;var i=casePath.name;self.mark(caseLocs[i]);casePath.get("consequent").each(self.explodeStatement,self)})});self.mark(after);if(defaultLoc.value===-1){self.mark(defaultLoc);assert.strictEqual(after.value,defaultLoc.value)}break;case"IfStatement":var elseLoc=stmt.alternate&&loc();var after=loc();self.jumpIfNot(self.explodeExpression(path.get("test")),elseLoc||after);self.explodeStatement(path.get("consequent"));if(elseLoc){self.jump(after);self.mark(elseLoc);self.explodeStatement(path.get("alternate"))}self.mark(after);break;case"ReturnStatement":self.emitAbruptCompletion({type:"return",value:self.explodeExpression(path.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var after=loc();var handler=stmt.handler;if(!handler&&stmt.handlers){handler=stmt.handlers[0]||null}var catchLoc=handler&&loc();var catchEntry=catchLoc&&new leap.CatchEntry(catchLoc,handler.param);var finallyLoc=stmt.finalizer&&loc();var finallyEntry=finallyLoc&&new leap.FinallyEntry(finallyLoc,after);var tryEntry=new leap.TryEntry(self.getUnmarkedCurrentLoc(),catchEntry,finallyEntry);self.tryEntries.push(tryEntry);self.updateContextPrevLoc(tryEntry.firstLoc);self.leapManager.withEntry(tryEntry,function(){self.explodeStatement(path.get("block"));if(catchLoc){if(finallyLoc){self.jump(finallyLoc)}else{self.jump(after)}self.updateContextPrevLoc(self.mark(catchLoc));var bodyPath=path.get("handler","body");var safeParam=self.makeTempVar();self.clearPendingException(tryEntry.firstLoc,safeParam);var catchScope=bodyPath.scope;var catchParamName=handler.param.name;n.CatchClause.assert(catchScope.node);assert.strictEqual(catchScope.lookup(catchParamName),catchScope);types.visit(bodyPath,{visitIdentifier:function(path){if(util.isReference(path,catchParamName)&&path.scope.lookup(catchParamName)===catchScope){return safeParam}this.traverse(path)},visitFunction:function(path){if(path.scope.declares(catchParamName)){return false}this.traverse(path)}});self.leapManager.withEntry(catchEntry,function(){self.explodeStatement(bodyPath)})}if(finallyLoc){self.updateContextPrevLoc(self.mark(finallyLoc));self.leapManager.withEntry(finallyEntry,function(){self.explodeStatement(path.get("finalizer"))});self.emit(b.returnStatement(b.callExpression(self.contextProperty("finish"),[finallyEntry.firstLoc])))}});self.mark(after);break;case"ThrowStatement":self.emit(b.throwStatement(self.explodeExpression(path.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(stmt.type))}};Ep.emitAbruptCompletion=function(record){if(!isValidCompletion(record)){assert.ok(false,"invalid completion record: "+JSON.stringify(record))}assert.notStrictEqual(record.type,"normal","normal completions are not abrupt");var abruptArgs=[b.literal(record.type)];if(record.type==="break"||record.type==="continue"){n.Literal.assert(record.target);abruptArgs[1]=record.target}else if(record.type==="return"||record.type==="throw"){if(record.value){n.Expression.assert(record.value);abruptArgs[1]=record.value}}this.emit(b.returnStatement(b.callExpression(this.contextProperty("abrupt"),abruptArgs)))};function isValidCompletion(record){var type=record.type;if(type==="normal"){return!hasOwn.call(record,"target")}if(type==="break"||type==="continue"){return!hasOwn.call(record,"value")&&n.Literal.check(record.target)}if(type==="return"||type==="throw"){return hasOwn.call(record,"value")&&!hasOwn.call(record,"target")}return false}Ep.getUnmarkedCurrentLoc=function(){return b.literal(this.listing.length)};Ep.updateContextPrevLoc=function(loc){if(loc){n.Literal.assert(loc);if(loc.value===-1){loc.value=this.listing.length}else{assert.strictEqual(loc.value,this.listing.length)}}else{loc=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),loc)};Ep.explodeExpression=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var expr=path.value;if(expr){n.Expression.assert(expr)}else{return expr}var self=this;var result;function finish(expr){n.Expression.assert(expr);if(ignoreResult){self.emit(expr)}else{return expr}}if(!meta.containsLeap(expr)){return finish(expr)}var hasLeapingChildren=meta.containsLeap.onlyChildren(expr);function explodeViaTempVar(tempVar,childPath,ignoreChildResult){assert.ok(childPath instanceof types.NodePath);assert.ok(!ignoreChildResult||!tempVar,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var result=self.explodeExpression(childPath,ignoreChildResult);if(ignoreChildResult){}else if(tempVar||hasLeapingChildren&&(self.isVolatileContextProperty(result)||meta.hasSideEffects(result))){result=self.emitAssign(tempVar||self.makeTempVar(),result)}return result}switch(expr.type){case"MemberExpression":return finish(b.memberExpression(self.explodeExpression(path.get("object")),expr.computed?explodeViaTempVar(null,path.get("property")):expr.property,expr.computed));case"CallExpression":var oldCalleePath=path.get("callee");var newCallee=self.explodeExpression(oldCalleePath);if(!n.MemberExpression.check(oldCalleePath.node)&&n.MemberExpression.check(newCallee)){newCallee=b.sequenceExpression([b.literal(0),newCallee])}return finish(b.callExpression(newCallee,path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"NewExpression":return finish(b.newExpression(explodeViaTempVar(null,path.get("callee")),path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"ObjectExpression":return finish(b.objectExpression(path.get("properties").map(function(propPath){return b.property(propPath.value.kind,propPath.value.key,explodeViaTempVar(null,propPath.get("value")))})));case"ArrayExpression":return finish(b.arrayExpression(path.get("elements").map(function(elemPath){return explodeViaTempVar(null,elemPath)})));case"SequenceExpression":var lastIndex=expr.expressions.length-1;path.get("expressions").each(function(exprPath){if(exprPath.name===lastIndex){result=self.explodeExpression(exprPath,ignoreResult)}else{self.explodeExpression(exprPath,true)}});return result;case"LogicalExpression":var after=loc();if(!ignoreResult){result=self.makeTempVar()}var left=explodeViaTempVar(result,path.get("left"));if(expr.operator==="&&"){self.jumpIfNot(left,after)}else{assert.strictEqual(expr.operator,"||");self.jumpIf(left,after)}explodeViaTempVar(result,path.get("right"),ignoreResult);self.mark(after);return result;case"ConditionalExpression":var elseLoc=loc();var after=loc();var test=self.explodeExpression(path.get("test"));self.jumpIfNot(test,elseLoc);if(!ignoreResult){result=self.makeTempVar()}explodeViaTempVar(result,path.get("consequent"),ignoreResult);self.jump(after);self.mark(elseLoc);explodeViaTempVar(result,path.get("alternate"),ignoreResult);self.mark(after);return result;case"UnaryExpression":return finish(b.unaryExpression(expr.operator,self.explodeExpression(path.get("argument")),!!expr.prefix));case"BinaryExpression":return finish(b.binaryExpression(expr.operator,explodeViaTempVar(null,path.get("left")),explodeViaTempVar(null,path.get("right"))));case"AssignmentExpression":return finish(b.assignmentExpression(expr.operator,self.explodeExpression(path.get("left")),self.explodeExpression(path.get("right"))));case"UpdateExpression":return finish(b.updateExpression(expr.operator,self.explodeExpression(path.get("argument")),expr.prefix));case"YieldExpression":var after=loc();var arg=expr.argument&&self.explodeExpression(path.get("argument"));if(arg&&expr.delegate){var result=self.makeTempVar();self.emit(b.returnStatement(b.callExpression(self.contextProperty("delegateYield"),[arg,b.literal(result.property.name),after])));self.mark(after);return result}self.emitAssign(self.contextProperty("next"),after);self.emit(b.returnStatement(arg||null));self.mark(after);return self.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(expr.type))}}},{"./leap":451,"./meta":452,"./util":453,assert:203,recast:480}],450:[function(require,module,exports){var assert=require("assert");var types=require("recast").types;var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.hoist=function(funPath){assert.ok(funPath instanceof types.NodePath);n.Function.assert(funPath.value);var vars={};function varDeclToExpr(vdec,includeIdentifiers){n.VariableDeclaration.assert(vdec);var exprs=[];vdec.declarations.forEach(function(dec){vars[dec.id.name]=dec.id;if(dec.init){exprs.push(b.assignmentExpression("=",dec.id,dec.init))}else if(includeIdentifiers){exprs.push(dec.id)}});if(exprs.length===0)return null;if(exprs.length===1)return exprs[0];return b.sequenceExpression(exprs)}types.visit(funPath.get("body"),{visitVariableDeclaration:function(path){var expr=varDeclToExpr(path.value,false);if(expr===null){path.replace()}else{return b.expressionStatement(expr)}return false},visitForStatement:function(path){var init=path.value.init;if(n.VariableDeclaration.check(init)){path.get("init").replace(varDeclToExpr(init,false))}this.traverse(path)},visitForInStatement:function(path){var left=path.value.left;if(n.VariableDeclaration.check(left)){path.get("left").replace(varDeclToExpr(left,true))}this.traverse(path)},visitFunctionDeclaration:function(path){var node=path.value;vars[node.id.name]=node.id;var parentNode=path.parent.node;var assignment=b.expressionStatement(b.assignmentExpression("=",node.id,b.functionExpression(node.id,node.params,node.body,node.generator,node.expression)));if(n.BlockStatement.check(path.parent.node)){path.parent.get("body").unshift(assignment);path.replace()}else{path.replace(assignment)}return false},visitFunctionExpression:function(path){return false}});var paramNames={};funPath.get("params").each(function(paramPath){var param=paramPath.value;if(n.Identifier.check(param)){paramNames[param.name]=param}else{}});var declarations=[];Object.keys(vars).forEach(function(name){if(!hasOwn.call(paramNames,name)){declarations.push(b.variableDeclarator(vars[name],null))}});if(declarations.length===0){return null}return b.variableDeclaration("var",declarations)}},{assert:203,recast:480}],451:[function(require,module,exports){var assert=require("assert");var types=require("recast").types;var n=types.namedTypes;var b=types.builders;var inherits=require("util").inherits;var hasOwn=Object.prototype.hasOwnProperty;function Entry(){assert.ok(this instanceof Entry)}function FunctionEntry(returnLoc){Entry.call(this);n.Literal.assert(returnLoc);this.returnLoc=returnLoc}inherits(FunctionEntry,Entry);exports.FunctionEntry=FunctionEntry;function LoopEntry(breakLoc,continueLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Literal.assert(continueLoc);if(label){n.Identifier.assert(label)}else{label=null}this.breakLoc=breakLoc;this.continueLoc=continueLoc;this.label=label}inherits(LoopEntry,Entry);exports.LoopEntry=LoopEntry;function SwitchEntry(breakLoc){Entry.call(this);n.Literal.assert(breakLoc);this.breakLoc=breakLoc}inherits(SwitchEntry,Entry);exports.SwitchEntry=SwitchEntry;function TryEntry(firstLoc,catchEntry,finallyEntry){Entry.call(this);n.Literal.assert(firstLoc);if(catchEntry){assert.ok(catchEntry instanceof CatchEntry)}else{catchEntry=null}if(finallyEntry){assert.ok(finallyEntry instanceof FinallyEntry)}else{finallyEntry=null}assert.ok(catchEntry||finallyEntry);this.firstLoc=firstLoc;this.catchEntry=catchEntry;this.finallyEntry=finallyEntry}inherits(TryEntry,Entry);exports.TryEntry=TryEntry;function CatchEntry(firstLoc,paramId){Entry.call(this);n.Literal.assert(firstLoc);n.Identifier.assert(paramId);this.firstLoc=firstLoc;this.paramId=paramId}inherits(CatchEntry,Entry);exports.CatchEntry=CatchEntry;function FinallyEntry(firstLoc,afterLoc){Entry.call(this);n.Literal.assert(firstLoc);n.Literal.assert(afterLoc);this.firstLoc=firstLoc;this.afterLoc=afterLoc}inherits(FinallyEntry,Entry);exports.FinallyEntry=FinallyEntry;function LabeledEntry(breakLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Identifier.assert(label);this.breakLoc=breakLoc;this.label=label}inherits(LabeledEntry,Entry);exports.LabeledEntry=LabeledEntry;function LeapManager(emitter){assert.ok(this instanceof LeapManager);var Emitter=require("./emit").Emitter;assert.ok(emitter instanceof Emitter);this.emitter=emitter;this.entryStack=[new FunctionEntry(emitter.finalLoc)]}var LMp=LeapManager.prototype;exports.LeapManager=LeapManager;LMp.withEntry=function(entry,callback){assert.ok(entry instanceof Entry);this.entryStack.push(entry);try{callback.call(this.emitter)}finally{var popped=this.entryStack.pop();assert.strictEqual(popped,entry)}};LMp._findLeapLocation=function(property,label){for(var i=this.entryStack.length-1;i>=0;--i){var entry=this.entryStack[i];var loc=entry[property];if(loc){if(label){if(entry.label&&entry.label.name===label.name){return loc}}else if(entry instanceof LabeledEntry){}else{return loc}}}return null};LMp.getBreakLoc=function(label){return this._findLeapLocation("breakLoc",label)};LMp.getContinueLoc=function(label){return this._findLeapLocation("continueLoc",label)}},{"./emit":449,assert:203,recast:480,util:229}],452:[function(require,module,exports){var assert=require("assert");var m=require("private").makeAccessor();var types=require("recast").types;var isArray=types.builtInTypes.array;var n=types.namedTypes;var hasOwn=Object.prototype.hasOwnProperty;function makePredicate(propertyName,knownTypes){function onlyChildren(node){n.Node.assert(node);var result=false;function check(child){if(result){}else if(isArray.check(child)){child.some(check)}else if(n.Node.check(child)){assert.strictEqual(result,false);result=predicate(child)}return result}types.eachField(node,function(name,child){check(child)});return result}function predicate(node){n.Node.assert(node);var meta=m(node);if(hasOwn.call(meta,propertyName))return meta[propertyName];if(hasOwn.call(opaqueTypes,node.type))return meta[propertyName]=false;if(hasOwn.call(knownTypes,node.type))return meta[propertyName]=true;return meta[propertyName]=onlyChildren(node)}predicate.onlyChildren=onlyChildren;return predicate}var opaqueTypes={FunctionExpression:true};var sideEffectTypes={CallExpression:true,ForInStatement:true,UnaryExpression:true,BinaryExpression:true,AssignmentExpression:true,UpdateExpression:true,NewExpression:true};var leapTypes={YieldExpression:true,BreakStatement:true,ContinueStatement:true,ReturnStatement:true,ThrowStatement:true};for(var type in leapTypes){if(hasOwn.call(leapTypes,type)){sideEffectTypes[type]=leapTypes[type]}}exports.hasSideEffects=makePredicate("hasSideEffects",sideEffectTypes);exports.containsLeap=makePredicate("containsLeap",leapTypes)},{assert:203,"private":448,recast:480}],453:[function(require,module,exports){var assert=require("assert");var types=require("recast").types;var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.defaults=function(obj){var len=arguments.length;var extension;for(var i=1;i0){bodyPath.replace(innerBody)}var outerFnExpr=getOuterFnExpr(path);n.Identifier.assert(node.id);var innerFnId=b.identifier(node.id.name+"$");var contextId=path.scope.declareTemporary("context$");var argsId=path.scope.declareTemporary("args$");var shouldAliasArguments=renameArguments(path,argsId);var vars=hoist(path);if(shouldAliasArguments){vars=vars||b.variableDeclaration("var",[]);vars.declarations.push(b.variableDeclarator(argsId,b.identifier("arguments")))}var emitter=new Emitter(contextId);emitter.explode(path.get("body"));if(vars&&vars.declarations.length>0){outerBody.push(vars)}var wrapArgs=[emitter.getContextFunction(innerFnId),node.generator?outerFnExpr:b.literal(null),b.thisExpression()];var tryLocsList=emitter.getTryLocsList();if(tryLocsList){wrapArgs.push(tryLocsList)}var wrapCall=b.callExpression(runtimeProperty(shouldTransformAsync?"async":"wrap"),wrapArgs);outerBody.push(b.returnStatement(wrapCall));node.body=b.blockStatement(outerBody);var wasGeneratorFunction=node.generator;if(wasGeneratorFunction){node.generator=false}if(shouldTransformAsync){node.async=false}if(wasGeneratorFunction&&n.Expression.check(node)){return b.callExpression(runtimeProperty("mark"),[node])}},visitForOfStatement:function(path){this.traverse(path);var node=path.value;var tempIterId=path.scope.declareTemporary("t$");var tempIterDecl=b.variableDeclarator(tempIterId,b.callExpression(runtimeProperty("values"),[node.right]));var tempInfoId=path.scope.declareTemporary("t$");var tempInfoDecl=b.variableDeclarator(tempInfoId,null);var init=node.left;var loopId;if(n.VariableDeclaration.check(init)){loopId=init.declarations[0].id;init.declarations.push(tempIterDecl,tempInfoDecl)}else{loopId=init;init=b.variableDeclaration("var",[tempIterDecl,tempInfoDecl])}n.Identifier.assert(loopId);var loopIdAssignExprStmt=b.expressionStatement(b.assignmentExpression("=",loopId,b.memberExpression(tempInfoId,b.identifier("value"),false)));if(n.BlockStatement.check(node.body)){node.body.body.unshift(loopIdAssignExprStmt)}else{node.body=b.blockStatement([loopIdAssignExprStmt,node.body])}return b.forStatement(init,b.unaryExpression("!",b.memberExpression(b.assignmentExpression("=",tempInfoId,b.callExpression(b.memberExpression(tempIterId,b.identifier("next"),false),[])),b.identifier("done"),false)),null,node.body)}});function getOuterFnExpr(funPath){var node=funPath.value;n.Function.assert(node);if(node.generator&&n.FunctionDeclaration.check(node)){var pp=funPath.parent;while(pp&&!(n.BlockStatement.check(pp.value)||n.Program.check(pp.value))){pp=pp.parent}if(!pp){return node.id}var markDecl=getRuntimeMarkDecl(pp);var markedArray=markDecl.declarations[0].id;var funDeclIdArray=markDecl.declarations[0].init.callee.object;n.ArrayExpression.assert(funDeclIdArray);var index=funDeclIdArray.elements.length;funDeclIdArray.elements.push(node.id);return b.memberExpression(markedArray,b.literal(index),true)}return node.id||(node.id=funPath.scope.parent.declareTemporary("callee$"))}function getRuntimeMarkDecl(blockPath){assert.ok(blockPath instanceof NodePath);var block=blockPath.node;isArray.assert(block.body);var info=getMarkInfo(block);if(info.decl){return info.decl}info.decl=b.variableDeclaration("var",[b.variableDeclarator(blockPath.scope.declareTemporary("marked"),b.callExpression(b.memberExpression(b.arrayExpression([]),b.identifier("map"),false),[runtimeProperty("mark")]))]);for(var i=0;i=1){return{errors:error.errors}}if(changes.length>0){cleanupTree(ast);allIdentifiers=setupScopeAndReferences(ast,{analyze:false})}assert(error.errors.length===0);var stats=new Stats;varify(ast,stats,allIdentifiers,changes);if(options.ast){cleanupTree(ast);return{stats:stats,ast:ast}}else{var transformedSrc=alter(src,changes);return{stats:stats,src:transformedSrc}}}module.exports=run},{"./error":457,"./jshint_globals/vars.js":458,"./options":459,"./scope":460,"./stats":461,alter:462,assert:203,"ast-traverse":464,breakable:465,"simple-fmt":466,"simple-is":467,stringmap:468,stringset:469}],457:[function(require,module,exports){"use strict";var fmt=require("simple-fmt");var assert=require("assert");function error(line,var_args){assert(arguments.length>=2);var msg=arguments.length===2?String(var_args):fmt.apply(fmt,Array.prototype.slice.call(arguments,1));error.errors.push(line===-1?msg:fmt("line {0}: {1}",line,msg))}error.reset=function(){error.errors=[]};error.getline=function(node){if(node&&node.loc&&node.loc.start){return node.loc.start.line}return-1};error.reset();module.exports=error},{assert:203,"simple-fmt":466}],458:[function(require,module,exports){"use strict";exports.reservedVars={arguments:false,NaN:false};exports.ecmaIdentifiers={Array:false,Boolean:false,Date:false,decodeURI:false,decodeURIComponent:false,encodeURI:false,encodeURIComponent:false,Error:false,eval:false,EvalError:false,Function:false,hasOwnProperty:false,isFinite:false,isNaN:false,JSON:false,Math:false,Map:false,Number:false,Object:false,parseInt:false,parseFloat:false,RangeError:false,ReferenceError:false,RegExp:false,Set:false,String:false,SyntaxError:false,TypeError:false,URIError:false,WeakMap:false};exports.browser={ArrayBuffer:false,ArrayBufferView:false,Audio:false,Blob:false,addEventListener:false,applicationCache:false,atob:false,blur:false,btoa:false,clearInterval:false,clearTimeout:false,close:false,closed:false,DataView:false,DOMParser:false,defaultStatus:false,document:false,Element:false,event:false,FileReader:false,Float32Array:false,Float64Array:false,FormData:false,focus:false,frames:false,getComputedStyle:false,HTMLElement:false,HTMLAnchorElement:false,HTMLBaseElement:false,HTMLBlockquoteElement:false,HTMLBodyElement:false,HTMLBRElement:false,HTMLButtonElement:false,HTMLCanvasElement:false,HTMLDirectoryElement:false,HTMLDivElement:false,HTMLDListElement:false,HTMLFieldSetElement:false,HTMLFontElement:false,HTMLFormElement:false,HTMLFrameElement:false,HTMLFrameSetElement:false,HTMLHeadElement:false,HTMLHeadingElement:false,HTMLHRElement:false,HTMLHtmlElement:false,HTMLIFrameElement:false,HTMLImageElement:false,HTMLInputElement:false,HTMLIsIndexElement:false,HTMLLabelElement:false,HTMLLayerElement:false,HTMLLegendElement:false,HTMLLIElement:false,HTMLLinkElement:false,HTMLMapElement:false,HTMLMenuElement:false,HTMLMetaElement:false,HTMLModElement:false,HTMLObjectElement:false,HTMLOListElement:false,HTMLOptGroupElement:false,HTMLOptionElement:false,HTMLParagraphElement:false,HTMLParamElement:false,HTMLPreElement:false,HTMLQuoteElement:false,HTMLScriptElement:false,HTMLSelectElement:false,HTMLStyleElement:false,HTMLTableCaptionElement:false,HTMLTableCellElement:false,HTMLTableColElement:false,HTMLTableElement:false,HTMLTableRowElement:false,HTMLTableSectionElement:false,HTMLTextAreaElement:false,HTMLTitleElement:false,HTMLUListElement:false,HTMLVideoElement:false,history:false,Int16Array:false,Int32Array:false,Int8Array:false,Image:false,length:false,localStorage:false,location:false,MessageChannel:false,MessageEvent:false,MessagePort:false,moveBy:false,moveTo:false,MutationObserver:false,name:false,Node:false,NodeFilter:false,navigator:false,onbeforeunload:true,onblur:true,onerror:true,onfocus:true,onload:true,onresize:true,onunload:true,open:false,openDatabase:false,opener:false,Option:false,parent:false,print:false,removeEventListener:false,resizeBy:false,resizeTo:false,screen:false,scroll:false,scrollBy:false,scrollTo:false,sessionStorage:false,setInterval:false,setTimeout:false,SharedWorker:false,status:false,top:false,Uint16Array:false,Uint32Array:false,Uint8Array:false,Uint8ClampedArray:false,WebSocket:false,window:false,Worker:false,XMLHttpRequest:false,XMLSerializer:false,XPathEvaluator:false,XPathException:false,XPathExpression:false,XPathNamespace:false,XPathNSResolver:false,XPathResult:false};exports.devel={alert:false,confirm:false,console:false,Debug:false,opera:false,prompt:false};exports.worker={importScripts:true,postMessage:true,self:true};exports.nonstandard={escape:false,unescape:false};exports.couch={require:false,respond:false,getRow:false,emit:false,send:false,start:false,sum:false,log:false,exports:false,module:false,provides:false};exports.node={__filename:false,__dirname:false,Buffer:false,DataView:false,console:false,exports:true,GLOBAL:false,global:false,module:false,process:false,require:false,setTimeout:false,clearTimeout:false,setInterval:false,clearInterval:false};exports.phantom={phantom:true,require:true,WebPage:true};exports.rhino={defineClass:false,deserialize:false,gc:false,help:false,importPackage:false,java:false,load:false,loadClass:false,print:false,quit:false,readFile:false,readUrl:false,runCommand:false,seal:false,serialize:false,spawn:false,sync:false,toint32:false,version:false};exports.wsh={ActiveXObject:true,Enumerator:true,GetObject:true,ScriptEngine:true,ScriptEngineBuildVersion:true,ScriptEngineMajorVersion:true,ScriptEngineMinorVersion:true,VBArray:true,WSH:true,WScript:true,XDomainRequest:true};exports.dojo={dojo:false,dijit:false,dojox:false,define:false,require:false};exports.jquery={$:false,jQuery:false};exports.mootools={$:false,$$:false,Asset:false,Browser:false,Chain:false,Class:false,Color:false,Cookie:false,Core:false,Document:false,DomReady:false,DOMEvent:false,DOMReady:false,Drag:false,Element:false,Elements:false,Event:false,Events:false,Fx:false,Group:false,Hash:false,HtmlTable:false,Iframe:false,IframeShim:false,InputValidator:false,instanceOf:false,Keyboard:false,Locale:false,Mask:false,MooTools:false,Native:false,Options:false,OverText:false,Request:false,Scroller:false,Slick:false,Slider:false,Sortables:false,Spinner:false,Swiff:false,Tips:false,Type:false,typeOf:false,URI:false,Window:false};exports.prototypejs={$:false,$$:false,$A:false,$F:false,$H:false,$R:false,$break:false,$continue:false,$w:false,Abstract:false,Ajax:false,Class:false,Enumerable:false,Element:false,Event:false,Field:false,Form:false,Hash:false,Insertion:false,ObjectRange:false,PeriodicalExecuter:false,Position:false,Prototype:false,Selector:false,Template:false,Toggle:false,Try:false,Autocompleter:false,Builder:false,Control:false,Draggable:false,Draggables:false,Droppables:false,Effect:false,Sortable:false,SortableObserver:false,Sound:false,Scriptaculous:false};exports.yui={YUI:false,Y:false,YUI_config:false}},{}],459:[function(require,module,exports){module.exports={disallowVars:false,disallowDuplicated:true,disallowUnknownReferences:true,parse:require("esprima-fb").parse}},{"esprima-fb":202}],460:[function(require,module,exports){"use strict";var assert=require("assert");var stringmap=require("stringmap");var stringset=require("stringset");var is=require("simple-is");var fmt=require("simple-fmt");var error=require("./error");var getline=error.getline;var options=require("./options");function Scope(args){assert(is.someof(args.kind,["hoist","block","catch-block"]));assert(is.object(args.node));assert(args.parent===null||is.object(args.parent));this.kind=args.kind;this.node=args.node;this.parent=args.parent;this.children=[];this.decls=stringmap();this.written=stringset();this.propagates=this.kind==="hoist"?stringset():null;if(this.parent){this.parent.children.push(this)}}Scope.prototype.print=function(indent){indent=indent||0;var scope=this;var names=this.decls.keys().map(function(name){return fmt("{0} [{1}]",name,scope.decls.get(name).kind)}).join(", ");var propagates=this.propagates?this.propagates.items().join(", "):"";console.log(fmt("{0}{1}: {2}. propagates: {3}",fmt.repeat(" ",indent),this.node.type,names,propagates));this.children.forEach(function(c){c.print(indent+2)})};Scope.prototype.add=function(name,kind,node,referableFromPos){assert(is.someof(kind,["fun","param","var","caught","const","let"]));function isConstLet(kind){return is.someof(kind,["const","let"])}var scope=this;if(is.someof(kind,["fun","param","var"])){while(scope.kind!=="hoist"){if(scope.decls.has(name)&&isConstLet(scope.decls.get(name).kind)){return error(getline(node),"{0} is already declared",name)}scope=scope.parent}}if(scope.decls.has(name)&&(options.disallowDuplicated||isConstLet(scope.decls.get(name).kind)||isConstLet(kind))){return error(getline(node),"{0} is already declared",name)}var declaration={kind:kind,node:node};if(referableFromPos){assert(is.someof(kind,["var","const","let"]));declaration.from=referableFromPos}scope.decls.set(name,declaration)};Scope.prototype.getKind=function(name){assert(is.string(name));var decl=this.decls.get(name);return decl?decl.kind:null};Scope.prototype.getNode=function(name){assert(is.string(name));var decl=this.decls.get(name);return decl?decl.node:null};Scope.prototype.getFromPos=function(name){assert(is.string(name));var decl=this.decls.get(name);return decl?decl.from:null};Scope.prototype.hasOwn=function(name){return this.decls.has(name)};Scope.prototype.remove=function(name){return this.decls.remove(name)};Scope.prototype.doesPropagate=function(name){return this.propagates.has(name)};Scope.prototype.markPropagates=function(name){this.propagates.add(name)};Scope.prototype.closestHoistScope=function(){var scope=this;while(scope.kind!=="hoist"){scope=scope.parent}return scope};Scope.prototype.hasFunctionScopeBetween=function(outer){function isFunction(node){return is.someof(node.type,["FunctionDeclaration","FunctionExpression"])}for(var scope=this;scope;scope=scope.parent){if(scope===outer){return false}if(isFunction(scope.node)){return true}}throw new Error("wasn't inner scope of outer")};Scope.prototype.lookup=function(name){for(var scope=this;scope;scope=scope.parent){if(scope.decls.has(name)){return scope}else if(scope.kind==="hoist"){scope.propagates.add(name)}}return null};Scope.prototype.markWrite=function(name){assert(is.string(name));this.written.add(name)};Scope.prototype.detectUnmodifiedLets=function(){var outmost=this;function detect(scope){if(scope!==outmost){scope.decls.keys().forEach(function(name){if(scope.getKind(name)==="let"&&!scope.written.has(name)){return error(getline(scope.getNode(name)),"{0} is declared as let but never modified so could be const",name)}})}scope.children.forEach(function(childScope){detect(childScope)})}detect(this)};Scope.prototype.traverse=function(options){options=options||{};var pre=options.pre;var post=options.post;function visit(scope){if(pre){pre(scope)}scope.children.forEach(function(childScope){visit(childScope)});if(post){post(scope)}}visit(this)};module.exports=Scope},{"./error":457,"./options":459,assert:203,"simple-fmt":466,"simple-is":467,stringmap:468,stringset:469}],461:[function(require,module,exports){var fmt=require("simple-fmt");var is=require("simple-is");var assert=require("assert");function Stats(){this.lets=0;this.consts=0;this.renames=[]}Stats.prototype.declarator=function(kind){assert(is.someof(kind,["const","let"]));if(kind==="const"){this.consts++}else{this.lets++}};Stats.prototype.rename=function(oldName,newName,line){this.renames.push({oldName:oldName,newName:newName,line:line})};Stats.prototype.toString=function(){var renames=this.renames.map(function(r){return r}).sort(function(a,b){return a.line-b.line});var renameStr=renames.map(function(rename){return fmt("\nline {0}: {1} => {2}",rename.line,rename.oldName,rename.newName)}).join("");var sum=this.consts+this.lets;var constlets=sum===0?"can't calculate const coverage (0 consts, 0 lets)":fmt("{0}% const coverage ({1} consts, {2} lets)",Math.floor(100*this.consts/sum),this.consts,this.lets);return constlets+renameStr+"\n"};module.exports=Stats},{assert:203,"simple-fmt":466,"simple-is":467}],462:[function(require,module,exports){var assert=require("assert");var stableSort=require("stable");function alter(str,fragments){"use strict";var isArray=Array.isArray||function(v){return Object.prototype.toString.call(v)==="[object Array]"};assert(typeof str==="string");assert(isArray(fragments));var sortedFragments=stableSort(fragments,function(a,b){return a.start-b.start});var outs=[];var pos=0;for(var i=0;ilen)r=len;if(e>len)e=len;li=l;ri=r;while(true){if(li=0},noneof:function(v,values){return values.indexOf(v)===-1},own:function(obj,prop){return hasOwnProperty.call(obj,prop)}}}();if(typeof module!=="undefined"&&typeof module.exports!=="undefined"){module.exports=is}},{}],468:[function(require,module,exports){var StringMap=function(){"use strict";var hasOwnProperty=Object.prototype.hasOwnProperty;var create=function(){function hasOwnEnumerableProps(obj){for(var prop in obj){if(hasOwnProperty.call(obj,prop)){return true}}return false}function hasOwnPollutedProps(obj){return hasOwnProperty.call(obj,"__count__")||hasOwnProperty.call(obj,"__parent__")}var useObjectCreate=false;if(typeof Object.create==="function"){if(!hasOwnEnumerableProps(Object.create(null))){useObjectCreate=true}}if(useObjectCreate===false){if(hasOwnEnumerableProps({})){throw new Error("StringMap environment error 0, please file a bug at https://github.com/olov/stringmap/issues")}}var o=useObjectCreate?Object.create(null):{};var useProtoClear=false;if(hasOwnPollutedProps(o)){o.__proto__=null;if(hasOwnEnumerableProps(o)||hasOwnPollutedProps(o)){throw new Error("StringMap environment error 1, please file a bug at https://github.com/olov/stringmap/issues")}useProtoClear=true}return function(){var o=useObjectCreate?Object.create(null):{};if(useProtoClear){o.__proto__=null}return o}}();function stringmap(optional_object){if(!(this instanceof stringmap)){return new stringmap(optional_object)}this.obj=create();this.hasProto=false;this.proto=undefined;if(optional_object){this.setMany(optional_object)}}stringmap.prototype.has=function(key){if(typeof key!=="string"){throw new Error("StringMap expected string key")}return key==="__proto__"?this.hasProto:hasOwnProperty.call(this.obj,key)};stringmap.prototype.get=function(key){if(typeof key!=="string"){throw new Error("StringMap expected string key")}return key==="__proto__"?this.proto:hasOwnProperty.call(this.obj,key)?this.obj[key]:undefined};stringmap.prototype.set=function(key,value){if(typeof key!=="string"){throw new Error("StringMap expected string key")}if(key==="__proto__"){this.hasProto=true;this.proto=value}else{this.obj[key]=value}};stringmap.prototype.remove=function(key){if(typeof key!=="string"){throw new Error("StringMap expected string key")}var didExist=this.has(key);if(key==="__proto__"){this.hasProto=false;this.proto=undefined}else{delete this.obj[key]}return didExist};stringmap.prototype["delete"]=stringmap.prototype.remove;stringmap.prototype.isEmpty=function(){for(var key in this.obj){if(hasOwnProperty.call(this.obj,key)){return false}}return!this.hasProto};stringmap.prototype.size=function(){var len=0;for(var key in this.obj){if(hasOwnProperty.call(this.obj,key)){++len}}return this.hasProto?len+1:len};stringmap.prototype.keys=function(){var keys=[];for(var key in this.obj){if(hasOwnProperty.call(this.obj,key)){keys.push(key)}}if(this.hasProto){keys.push("__proto__")}return keys};stringmap.prototype.values=function(){var values=[];for(var key in this.obj){if(hasOwnProperty.call(this.obj,key)){values.push(this.obj[key])}}if(this.hasProto){values.push(this.proto)}return values};stringmap.prototype.items=function(){var items=[];for(var key in this.obj){if(hasOwnProperty.call(this.obj,key)){items.push([key,this.obj[key]])}}if(this.hasProto){items.push(["__proto__",this.proto])}return items};stringmap.prototype.setMany=function(object){if(object===null||typeof object!=="object"&&typeof object!=="function"){throw new Error("StringMap expected Object")}for(var key in object){if(hasOwnProperty.call(object,key)){this.set(key,object[key])}}return this};stringmap.prototype.merge=function(other){var keys=other.keys();for(var i=0;i=0;--i){if(comparePos(resultArray[i].loc.end,node.loc.start)<=0){break}}resultArray.splice(i+1,0,node);return}}else if(node[childNodesCacheKey]){return node[childNodesCacheKey]}var names;if(isArray.check(node)){names=Object.keys(node)}else if(isObject.check(node)){names=types.getFieldNames(node)}else{return}if(!resultArray){Object.defineProperty(node,childNodesCacheKey,{value:resultArray=[],enumerable:false})}for(var i=0,nameCount=names.length;i>1;var child=childNodes[middle];if(comparePos(child.loc.start,comment.loc.start)<=0&&comparePos(comment.loc.end,child.loc.end)<=0){decorateComment(comment.enclosingNode=child,comment);return}if(comparePos(child.loc.end,comment.loc.start)<=0){var precedingNode=child;left=middle+1;continue}if(comparePos(comment.loc.end,child.loc.start)<=0){var followingNode=child;right=middle;continue}throw new Error("Comment location overlaps with node location")}if(precedingNode){comment.precedingNode=precedingNode}if(followingNode){comment.followingNode=followingNode}}exports.attach=function(comments,ast,lines){if(!isArray.check(comments)){return}var tiesToBreak=[];comments.forEach(function(comment){comment.loc.lines=lines;decorateComment(ast,comment);var pn=comment.precedingNode;var en=comment.enclosingNode;var fn=comment.followingNode;if(pn&&fn){var tieCount=tiesToBreak.length;if(tieCount>0){var lastTie=tiesToBreak[tieCount-1];assert.strictEqual(lastTie.precedingNode===comment.precedingNode,lastTie.followingNode===comment.followingNode);if(lastTie.followingNode!==comment.followingNode){breakTies(tiesToBreak,lines)}}tiesToBreak.push(comment)}else if(pn){breakTies(tiesToBreak,lines);addTrailingComment(pn,comment)}else if(fn){breakTies(tiesToBreak,lines);addLeadingComment(fn,comment)}else if(en){breakTies(tiesToBreak,lines);addDanglingComment(en,comment)}else{throw new Error("AST contains no nodes at all?")}});breakTies(tiesToBreak,lines);comments.forEach(function(comment){delete comment.precedingNode;delete comment.enclosingNode;delete comment.followingNode})};function breakTies(tiesToBreak,lines){var tieCount=tiesToBreak.length;if(tieCount===0){return}var pn=tiesToBreak[0].precedingNode;var fn=tiesToBreak[0].followingNode;var gapEndPos=fn.loc.start;for(var indexOfFirstLeadingComment=tieCount;indexOfFirstLeadingComment>0;--indexOfFirstLeadingComment){var comment=tiesToBreak[indexOfFirstLeadingComment-1];assert.strictEqual(comment.precedingNode,pn);assert.strictEqual(comment.followingNode,fn);var gap=lines.sliceString(comment.loc.end,gapEndPos);if(/\S/.test(gap)){break}gapEndPos=comment.loc.start}while(indexOfFirstLeadingComment<=tieCount&&(comment=tiesToBreak[indexOfFirstLeadingComment])&&comment.type==="Line"&&comment.loc.start.column>fn.loc.start.column){++indexOfFirstLeadingComment}tiesToBreak.forEach(function(comment,i){if(i1){return s[len-2]}return null};FPp.getValue=function getValue(){var s=this.stack;return s[s.length-1]};function getNodeHelper(path,count){var s=path.stack;for(var i=s.length-1;i>=0;i-=2){var value=s[i];if(n.Node.check(value)&&--count<0){return value}}return null}FPp.getNode=function getNode(count){return getNodeHelper(this,~~count)};FPp.getParentNode=function getParentNode(count){return getNodeHelper(this,~~count+1)};FPp.getRootValue=function getRootValue(){var s=this.stack;if(s.length%2===0){return s[1]}return s[0]};FPp.call=function call(callback){var s=this.stack;var origLen=s.length;var value=s[origLen-1];var argc=arguments.length;for(var i=1;inp){return true}if(pp===np&&name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return name==="callee"&&parent.callee===node;case"ConditionalExpression":return name==="test"&&parent.test===node;case"MemberExpression":return name==="object"&&parent.object===node;default:return false}case"ArrowFunctionExpression":return isBinary(parent);case"ObjectExpression":if(parent.type==="ArrowFunctionExpression"&&name==="body"){return true}default:if(parent.type==="NewExpression"&&name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}FPp.canBeFirstInStatement=function(){var node=this.getNode();return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};FPp.firstInStatement=function(){var s=this.stack;var parentName,parent;var childName,child;for(var i=s.length-1;i>=0;i-=2){if(n.Node.check(s[i])){childName=parentName;child=parent;parentName=s[i-1];parent=s[i]}if(!parent||!child){continue}if(n.BlockStatement.check(parent)&&parentName==="body"&&childName===0){assert.strictEqual(parent.body[0],child);return true}if(n.ExpressionStatement.check(parent)&&childName==="expression"){assert.strictEqual(parent.expression,child);return true}if(n.SequenceExpression.check(parent)&&parentName==="expressions"&&childName===0){assert.strictEqual(parent.expressions[0],child);continue}if(n.CallExpression.check(parent)&&childName==="callee"){assert.strictEqual(parent.callee,child);continue}if(n.MemberExpression.check(parent)&&childName==="object"){assert.strictEqual(parent.object,child);continue}if(n.ConditionalExpression.check(parent)&&childName==="test"){assert.strictEqual(parent.test,child);continue}if(isBinary(parent)&&childName==="left"){assert.strictEqual(parent.left,child);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&childName==="argument"){assert.strictEqual(parent.argument,child);continue}return false}return true}},{"./types":478,assert:203}],472:[function(require,module,exports){var assert=require("assert");var sourceMap=require("source-map");var normalizeOptions=require("./options").normalize;var secretKey=require("private").makeUniqueKey();var types=require("./types");var isString=types.builtInTypes.string;var comparePos=require("./util").comparePos;var Mapping=require("./mapping");function getSecret(lines){return lines[secretKey]}function Lines(infos,sourceFileName){assert.ok(this instanceof Lines);assert.ok(infos.length>0);if(sourceFileName){isString.assert(sourceFileName)}else{sourceFileName=null}Object.defineProperty(this,secretKey,{value:{infos:infos,mappings:[],name:sourceFileName,cachedSourceMap:null}});if(sourceFileName){getSecret(this).mappings.push(new Mapping(this,{start:this.firstPos(),end:this.lastPos()}))}}exports.Lines=Lines;var Lp=Lines.prototype;Object.defineProperties(Lp,{length:{get:function(){return getSecret(this).infos.length}},name:{get:function(){return getSecret(this).name}}});function copyLineInfo(info){return{line:info.line,indent:info.indent,sliceStart:info.sliceStart,sliceEnd:info.sliceEnd}}var fromStringCache={};var hasOwn=fromStringCache.hasOwnProperty;var maxCacheKeyLen=10;function countSpaces(spaces,tabWidth){var count=0;var len=spaces.length;for(var i=0;i0);var next=Math.ceil(count/tabWidth)*tabWidth;if(next===count){count+=tabWidth}else{count=next}break;case 11:case 12:case 13:case 65279:break;case 32:default:count+=1;break}}return count}exports.countSpaces=countSpaces;var leadingSpaceExp=/^\s*/;function fromString(string,options){if(string instanceof Lines)return string;string+="";var tabWidth=options&&options.tabWidth;var tabless=string.indexOf(" ")<0;var cacheable=!options&&tabless&&string.length<=maxCacheKeyLen;assert.ok(tabWidth||tabless,"No tab width specified but encountered tabs in string\n"+string);if(cacheable&&hasOwn.call(fromStringCache,string))return fromStringCache[string];var lines=new Lines(string.split("\n").map(function(line){var spaces=leadingSpaceExp.exec(line)[0];return{line:line,indent:countSpaces(spaces,tabWidth),sliceStart:spaces.length,sliceEnd:line.length}}),normalizeOptions(options).sourceFileName);if(cacheable)fromStringCache[string]=lines;return lines}exports.fromString=fromString;function isOnlyWhitespace(string){return!/\S/.test(string)}Lp.toString=function(options){return this.sliceString(this.firstPos(),this.lastPos(),options)};Lp.getSourceMap=function(sourceMapName,sourceRoot){if(!sourceMapName){return null}var targetLines=this;function updateJSON(json){json=json||{};isString.assert(sourceMapName);json.file=sourceMapName;if(sourceRoot){isString.assert(sourceRoot);json.sourceRoot=sourceRoot}return json}var secret=getSecret(targetLines);if(secret.cachedSourceMap){return updateJSON(secret.cachedSourceMap.toJSON())}var smg=new sourceMap.SourceMapGenerator(updateJSON());var sourcesToContents={};secret.mappings.forEach(function(mapping){var sourceCursor=mapping.sourceLines.skipSpaces(mapping.sourceLoc.start)||mapping.sourceLines.lastPos();var targetCursor=targetLines.skipSpaces(mapping.targetLoc.start)||targetLines.lastPos();while(comparePos(sourceCursor,mapping.sourceLoc.end)<0&&comparePos(targetCursor,mapping.targetLoc.end)<0){var sourceChar=mapping.sourceLines.charAt(sourceCursor);var targetChar=targetLines.charAt(targetCursor);assert.strictEqual(sourceChar,targetChar);var sourceName=mapping.sourceLines.name;smg.addMapping({source:sourceName,original:{line:sourceCursor.line,column:sourceCursor.column},generated:{line:targetCursor.line,column:targetCursor.column}});if(!hasOwn.call(sourcesToContents,sourceName)){var sourceContent=mapping.sourceLines.toString();smg.setSourceContent(sourceName,sourceContent);sourcesToContents[sourceName]=sourceContent}targetLines.nextPos(targetCursor,true);mapping.sourceLines.nextPos(sourceCursor,true)}});secret.cachedSourceMap=smg;return smg.toJSON()};Lp.bootstrapCharAt=function(pos){assert.strictEqual(typeof pos,"object");assert.strictEqual(typeof pos.line,"number");assert.strictEqual(typeof pos.column,"number");var line=pos.line,column=pos.column,strings=this.toString().split("\n"),string=strings[line-1];if(typeof string==="undefined")return"";if(column===string.length&&line=string.length)return"";return string.charAt(column)};Lp.charAt=function(pos){assert.strictEqual(typeof pos,"object");assert.strictEqual(typeof pos.line,"number");assert.strictEqual(typeof pos.column,"number");var line=pos.line,column=pos.column,secret=getSecret(this),infos=secret.infos,info=infos[line-1],c=column;if(typeof info==="undefined"||c<0)return"";var indent=this.getIndentAt(line);if(c=info.sliceEnd)return"";return info.line.charAt(c)};Lp.stripMargin=function(width,skipFirstLine){if(width===0)return this;assert.ok(width>0,"negative margin: "+width);if(skipFirstLine&&this.length===1)return this;var secret=getSecret(this);var lines=new Lines(secret.infos.map(function(info,i){if(info.line&&(i>0||!skipFirstLine)){info=copyLineInfo(info);info.indent=Math.max(0,info.indent-width)}return info}));if(secret.mappings.length>0){var newMappings=getSecret(lines).mappings;assert.strictEqual(newMappings.length,0);secret.mappings.forEach(function(mapping){newMappings.push(mapping.indent(width,skipFirstLine,true))})}return lines};Lp.indent=function(by){if(by===0)return this;var secret=getSecret(this);var lines=new Lines(secret.infos.map(function(info){if(info.line){info=copyLineInfo(info);info.indent+=by}return info}));if(secret.mappings.length>0){var newMappings=getSecret(lines).mappings;assert.strictEqual(newMappings.length,0);secret.mappings.forEach(function(mapping){newMappings.push(mapping.indent(by))})}return lines};Lp.indentTail=function(by){if(by===0)return this;if(this.length<2)return this;var secret=getSecret(this);var lines=new Lines(secret.infos.map(function(info,i){if(i>0&&info.line){info=copyLineInfo(info);info.indent+=by}return info}));if(secret.mappings.length>0){var newMappings=getSecret(lines).mappings;assert.strictEqual(newMappings.length,0);secret.mappings.forEach(function(mapping){newMappings.push(mapping.indent(by,true))})}return lines};Lp.getIndentAt=function(line){assert.ok(line>=1,"no line "+line+" (line numbers start from 1)");var secret=getSecret(this),info=secret.infos[line-1];return Math.max(info.indent,0)};Lp.guessTabWidth=function(){var secret=getSecret(this);if(hasOwn.call(secret,"cachedTabWidth")){return secret.cachedTabWidth}var counts=[];var lastIndent=0;for(var line=1,last=this.length;line<=last;++line){var info=secret.infos[line-1];var sliced=info.line.slice(info.sliceStart,info.sliceEnd);if(isOnlyWhitespace(sliced)){continue}var diff=Math.abs(info.indent-lastIndent);counts[diff]=~~counts[diff]+1;lastIndent=info.indent}var maxCount=-1;var result=2;for(var tabWidth=1;tabWidthmaxCount){maxCount=counts[tabWidth];result=tabWidth}}return secret.cachedTabWidth=result};Lp.isOnlyWhitespace=function(){return isOnlyWhitespace(this.toString())};Lp.isPrecededOnlyByWhitespace=function(pos){var secret=getSecret(this);var info=secret.infos[pos.line-1];var indent=Math.max(info.indent,0);var diff=pos.column-indent;if(diff<=0){return true}var start=info.sliceStart;var end=Math.min(start+diff,info.sliceEnd);var prefix=info.line.slice(start,end);return isOnlyWhitespace(prefix)};Lp.getLineLength=function(line){var secret=getSecret(this),info=secret.infos[line-1];return this.getIndentAt(line)+info.sliceEnd-info.sliceStart};Lp.nextPos=function(pos,skipSpaces){var l=Math.max(pos.line,0),c=Math.max(pos.column,0);if(c0){var newMappings=getSecret(lines).mappings;assert.strictEqual(newMappings.length,0);secret.mappings.forEach(function(mapping){var sliced=mapping.slice(this,start,end);if(sliced){newMappings.push(sliced)}},this)}return lines};function sliceInfo(info,startCol,endCol){var sliceStart=info.sliceStart;var sliceEnd=info.sliceEnd;var indent=Math.max(info.indent,0);var lineLength=indent+sliceEnd-sliceStart;if(typeof endCol==="undefined"){endCol=lineLength}startCol=Math.max(startCol,0);endCol=Math.min(endCol,lineLength);endCol=Math.max(endCol,startCol);if(endCol=0);assert.ok(sliceStart<=sliceEnd);assert.strictEqual(lineLength,indent+sliceEnd-sliceStart);if(info.indent===indent&&info.sliceStart===sliceStart&&info.sliceEnd===sliceEnd){return info}return{line:info.line,indent:indent,sliceStart:sliceStart,sliceEnd:sliceEnd}}Lp.bootstrapSliceString=function(start,end,options){return this.slice(start,end).toString(options)};Lp.sliceString=function(start,end,options){if(!end){if(!start){return this}end=this.lastPos()}options=normalizeOptions(options);var infos=getSecret(this).infos;var parts=[];var tabWidth=options.tabWidth;for(var line=start.line;line<=end.line;++line){var info=infos[line-1];if(line===start.line){if(line===end.line){info=sliceInfo(info,start.column,end.column)}else{info=sliceInfo(info,start.column)}}else if(line===end.line){info=sliceInfo(info,0,end.column)}var indent=Math.max(info.indent,0);var before=info.line.slice(0,info.sliceStart);if(options.reuseWhitespace&&isOnlyWhitespace(before)&&countSpaces(before,options.tabWidth)===indent){parts.push(info.line.slice(0,info.sliceEnd));continue}var tabs=0;var spaces=indent;if(options.useTabs){tabs=Math.floor(indent/tabWidth);spaces-=tabs*tabWidth}var result="";if(tabs>0){result+=new Array(tabs+1).join(" ")}if(spaces>0){result+=new Array(spaces+1).join(" ")}result+=info.line.slice(info.sliceStart,info.sliceEnd);parts.push(result)}return parts.join("\n")};Lp.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1};Lp.join=function(elements){var separator=this;var separatorSecret=getSecret(separator);var infos=[];var mappings=[];var prevInfo;function appendSecret(secret){if(secret===null)return;if(prevInfo){var info=secret.infos[0];var indent=new Array(info.indent+1).join(" ");var prevLine=infos.length;var prevColumn=Math.max(prevInfo.indent,0)+prevInfo.sliceEnd-prevInfo.sliceStart;prevInfo.line=prevInfo.line.slice(0,prevInfo.sliceEnd)+indent+info.line.slice(info.sliceStart,info.sliceEnd);prevInfo.sliceEnd=prevInfo.line.length;if(secret.mappings.length>0){secret.mappings.forEach(function(mapping){mappings.push(mapping.add(prevLine,prevColumn))})}}else if(secret.mappings.length>0){mappings.push.apply(mappings,secret.mappings)}secret.infos.forEach(function(info,i){if(!prevInfo||i>0){prevInfo=copyLineInfo(info);infos.push(prevInfo)}})}function appendWithSeparator(secret,i){if(i>0)appendSecret(separatorSecret);appendSecret(secret)}elements.map(function(elem){var lines=fromString(elem);if(lines.isEmpty())return null;return getSecret(lines)}).forEach(separator.isEmpty()?appendSecret:appendWithSeparator);if(infos.length<1)return emptyLines;var lines=new Lines(infos);getSecret(lines).mappings=mappings;return lines};exports.concat=function(elements){return emptyLines.join(elements)};Lp.concat=function(other){var args=arguments,list=[this];list.push.apply(list,args);assert.strictEqual(list.length,args.length+1);return emptyLines.join(list)};var emptyLines=fromString("")},{"./mapping":473,"./options":474,"./types":478,"./util":479,assert:203,"private":448,"source-map":493}],473:[function(require,module,exports){var assert=require("assert");var types=require("./types");var isString=types.builtInTypes.string;var isNumber=types.builtInTypes.number;var SourceLocation=types.namedTypes.SourceLocation;var Position=types.namedTypes.Position;var linesModule=require("./lines");var comparePos=require("./util").comparePos;function Mapping(sourceLines,sourceLoc,targetLoc){assert.ok(this instanceof Mapping);assert.ok(sourceLines instanceof linesModule.Lines);SourceLocation.assert(sourceLoc);if(targetLoc){assert.ok(isNumber.check(targetLoc.start.line)&&isNumber.check(targetLoc.start.column)&&isNumber.check(targetLoc.end.line)&&isNumber.check(targetLoc.end.column))}else{targetLoc=sourceLoc}Object.defineProperties(this,{sourceLines:{value:sourceLines},sourceLoc:{value:sourceLoc},targetLoc:{value:targetLoc}})}var Mp=Mapping.prototype;module.exports=Mapping;Mp.slice=function(lines,start,end){assert.ok(lines instanceof linesModule.Lines);Position.assert(start);if(end){Position.assert(end)}else{end=lines.lastPos()}var sourceLines=this.sourceLines;var sourceLoc=this.sourceLoc;var targetLoc=this.targetLoc;function skip(name){var sourceFromPos=sourceLoc[name];var targetFromPos=targetLoc[name];var targetToPos=start;if(name==="end"){targetToPos=end}else{assert.strictEqual(name,"start")}return skipChars(sourceLines,sourceFromPos,lines,targetFromPos,targetToPos)}if(comparePos(start,targetLoc.start)<=0){if(comparePos(targetLoc.end,end)<=0){targetLoc={start:subtractPos(targetLoc.start,start.line,start.column),end:subtractPos(targetLoc.end,start.line,start.column)}}else if(comparePos(end,targetLoc.start)<=0){return null}else{sourceLoc={start:sourceLoc.start,end:skip("end")};targetLoc={start:subtractPos(targetLoc.start,start.line,start.column),end:subtractPos(end,start.line,start.column)}}}else{if(comparePos(targetLoc.end,start)<=0){return null}if(comparePos(targetLoc.end,end)<=0){sourceLoc={start:skip("start"),end:sourceLoc.end};targetLoc={start:{line:1,column:0},end:subtractPos(targetLoc.end,start.line,start.column)}}else{sourceLoc={start:skip("start"),end:skip("end")};targetLoc={start:{line:1,column:0},end:subtractPos(end,start.line,start.column)}}}return new Mapping(this.sourceLines,sourceLoc,targetLoc)};Mp.add=function(line,column){return new Mapping(this.sourceLines,this.sourceLoc,{start:addPos(this.targetLoc.start,line,column),end:addPos(this.targetLoc.end,line,column)})};function addPos(toPos,line,column){return{line:toPos.line+line-1,column:toPos.line===1?toPos.column+column:toPos.column}}Mp.subtract=function(line,column){return new Mapping(this.sourceLines,this.sourceLoc,{start:subtractPos(this.targetLoc.start,line,column),end:subtractPos(this.targetLoc.end,line,column)})};function subtractPos(fromPos,line,column){return{line:fromPos.line-line+1,column:fromPos.line===line?fromPos.column-column:fromPos.column}}Mp.indent=function(by,skipFirstLine,noNegativeColumns){if(by===0){return this}var targetLoc=this.targetLoc;var startLine=targetLoc.start.line;var endLine=targetLoc.end.line;if(skipFirstLine&&startLine===1&&endLine===1){return this}targetLoc={start:targetLoc.start,end:targetLoc.end};if(!skipFirstLine||startLine>1){var startColumn=targetLoc.start.column+by;targetLoc.start={line:startLine,column:noNegativeColumns?Math.max(0,startColumn):startColumn}}if(!skipFirstLine||endLine>1){var endColumn=targetLoc.end.column+by;targetLoc.end={line:endLine,column:noNegativeColumns?Math.max(0,endColumn):endColumn}}return new Mapping(this.sourceLines,this.sourceLoc,targetLoc)};function skipChars(sourceLines,sourceFromPos,targetLines,targetFromPos,targetToPos){assert.ok(sourceLines instanceof linesModule.Lines);assert.ok(targetLines instanceof linesModule.Lines);Position.assert(sourceFromPos);Position.assert(targetFromPos);Position.assert(targetToPos);var targetComparison=comparePos(targetFromPos,targetToPos);if(targetComparison===0){return sourceFromPos}if(targetComparison<0){var sourceCursor=sourceLines.skipSpaces(sourceFromPos);var targetCursor=targetLines.skipSpaces(targetFromPos);var lineDiff=targetToPos.line-targetCursor.line;sourceCursor.line+=lineDiff;targetCursor.line+=lineDiff;if(lineDiff>0){sourceCursor.column=0;targetCursor.column=0}else{assert.strictEqual(lineDiff,0)}while(comparePos(targetCursor,targetToPos)<0&&targetLines.nextPos(targetCursor,true)){assert.ok(sourceLines.nextPos(sourceCursor,true));assert.strictEqual(sourceLines.charAt(sourceCursor),targetLines.charAt(targetCursor))}}else{var sourceCursor=sourceLines.skipSpaces(sourceFromPos,true);var targetCursor=targetLines.skipSpaces(targetFromPos,true);var lineDiff=targetToPos.line-targetCursor.line;sourceCursor.line+=lineDiff;targetCursor.line+=lineDiff;if(lineDiff<0){sourceCursor.column=sourceLines.getLineLength(sourceCursor.line);targetCursor.column=targetLines.getLineLength(targetCursor.line)}else{assert.strictEqual(lineDiff,0)}while(comparePos(targetToPos,targetCursor)<0&&targetLines.prevPos(targetCursor,true)){assert.ok(sourceLines.prevPos(sourceCursor,true));assert.strictEqual(sourceLines.charAt(sourceCursor),targetLines.charAt(targetCursor))}}return sourceCursor}},{"./lines":472,"./types":478,"./util":479,assert:203}],474:[function(require,module,exports){var defaults={esprima:require("esprima-fb"),tabWidth:4,useTabs:false,reuseWhitespace:true, + wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:false,tolerant:true,quote:null},hasOwn=defaults.hasOwnProperty;exports.normalize=function(options){options=options||defaults;function get(key){return hasOwn.call(options,key)?options[key]:defaults[key]}return{tabWidth:+get("tabWidth"),useTabs:!!get("useTabs"),reuseWhitespace:!!get("reuseWhitespace"),wrapColumn:Math.max(get("wrapColumn"),0),sourceFileName:get("sourceFileName"),sourceMapName:get("sourceMapName"),sourceRoot:get("sourceRoot"),inputSourceMap:get("inputSourceMap"),esprima:get("esprima"),range:get("range"),tolerant:get("tolerant"),quote:get("quote")}}},{"esprima-fb":202}],475:[function(require,module,exports){var assert=require("assert");var types=require("./types");var n=types.namedTypes;var b=types.builders;var isObject=types.builtInTypes.object;var isArray=types.builtInTypes.array;var isFunction=types.builtInTypes.function;var Patcher=require("./patcher").Patcher;var normalizeOptions=require("./options").normalize;var fromString=require("./lines").fromString;var attachComments=require("./comments").attach;var util=require("./util");exports.parse=function parse(source,options){options=normalizeOptions(options);var lines=fromString(source,options);var sourceWithoutTabs=lines.toString({tabWidth:options.tabWidth,reuseWhitespace:false,useTabs:false});var program=options.esprima.parse(sourceWithoutTabs,{loc:true,range:options.range,comment:true,tolerant:options.tolerant,sourceType:"module"});program.loc=util.getTrueLoc(program);var comments=program.comments;delete program.comments;var file=b.file(program);file.loc={lines:lines,indent:0,start:lines.firstPos(),end:lines.lastPos()};attachComments(comments,program.body.length?file.program:file,lines);return new TreeCopier(lines).copy(file)};function TreeCopier(lines){assert.ok(this instanceof TreeCopier);this.lines=lines;this.indent=0}var TCp=TreeCopier.prototype;TCp.copy=function(node){if(isArray.check(node)){return node.map(this.copy,this)}if(!isObject.check(node)){return node}util.fixFaultyLocations(node);var copy=Object.create(Object.getPrototypeOf(node),{original:{value:node,configurable:false,enumerable:false,writable:true}});var loc=node.loc;var oldIndent=this.indent;var newIndent=oldIndent;if(loc){if(node.type==="Block"||node.type==="Line"||this.lines.isPrecededOnlyByWhitespace(loc.start)){newIndent=this.indent=loc.start.column}loc.lines=this.lines;loc.indent=newIndent}var keys=Object.keys(node);var keyCount=keys.length;for(var i=0;i0){}else{pushSlice(sliceFrom,rep.start);toConcat.push(rep.lines);sliceFrom=rep.end}});pushSlice(sliceFrom,loc.end);return linesModule.concat(toConcat)}}exports.Patcher=Patcher;var Pp=Patcher.prototype;Pp.tryToReprintComments=function(newNode,oldNode,print){var patcher=this;if(!newNode.comments&&!oldNode.comments){return true}var newPath=FastPath.from(newNode);var oldPath=FastPath.from(oldNode);newPath.stack.push("comments",getSurroundingComments(newNode));oldPath.stack.push("comments",getSurroundingComments(oldNode));var reprints=[];var ableToReprintComments=findArrayReprints(newPath,oldPath,reprints);if(ableToReprintComments&&reprints.length>0){reprints.forEach(function(reprint){var oldComment=reprint.oldPath.getValue();assert.ok(oldComment.leading||oldComment.trailing);patcher.replace(oldComment.loc,print(reprint.newPath).indentTail(oldComment.loc.indent))})}return ableToReprintComments};function getSurroundingComments(node){var result=[];if(node.comments&&node.comments.length>0){node.comments.forEach(function(comment){if(comment.leading||comment.trailing){result.push(comment)}})}return result}Pp.deleteComments=function(node){if(!node.comments){return}var patcher=this;node.comments.forEach(function(comment){if(comment.leading){patcher.replace({start:comment.loc.start,end:node.loc.lines.skipSpaces(comment.loc.end,false,false)},"")}else if(comment.trailing){patcher.replace({start:node.loc.lines.skipSpaces(comment.loc.start,true,false),end:comment.loc.end},"")}})};exports.getReprinter=function(path){assert.ok(path instanceof FastPath);var node=path.getValue();if(!Printable.check(node))return;var orig=node.original;var origLoc=orig&&orig.loc;var lines=origLoc&&origLoc.lines;var reprints=[];if(!lines||!findReprints(path,reprints))return;return function(print){var patcher=new Patcher(lines);reprints.forEach(function(reprint){var newNode=reprint.newPath.getValue();var oldNode=reprint.oldPath.getValue();SourceLocation.assert(oldNode.loc,true);var needToPrintNewPathWithComments=!patcher.tryToReprintComments(newNode,oldNode,print);if(needToPrintNewPathWithComments){patcher.deleteComments(oldNode)}var pos=util.copyPos(oldNode.loc.start);var needsLeadingSpace=lines.prevPos(pos)&&riskyAdjoiningCharExp.test(lines.charAt(pos));var newLines=print(reprint.newPath,needToPrintNewPathWithComments).indentTail(oldNode.loc.indent);var needsTrailingSpace=riskyAdjoiningCharExp.test(lines.charAt(oldNode.loc.end));if(needsLeadingSpace||needsTrailingSpace){var newParts=[];needsLeadingSpace&&newParts.push(" ");newParts.push(newLines);needsTrailingSpace&&newParts.push(" ");newLines=linesModule.concat(newParts)}patcher.replace(oldNode.loc,newLines)});return patcher.get(origLoc).indentTail(-orig.loc.indent)}};function findReprints(newPath,reprints){var newNode=newPath.getValue();Printable.assert(newNode);var oldNode=newNode.original;Printable.assert(oldNode);assert.deepEqual(reprints,[]);if(newNode.type!==oldNode.type){return false}var oldPath=new FastPath(oldNode);var canReprint=findChildReprints(newPath,oldPath,reprints);if(!canReprint){reprints.length=0}return canReprint}function findAnyReprints(newPath,oldPath,reprints){var newNode=newPath.getValue();var oldNode=oldPath.getValue();if(newNode===oldNode)return true;if(isArray.check(newNode))return findArrayReprints(newPath,oldPath,reprints);if(isObject.check(newNode))return findObjectReprints(newPath,oldPath,reprints);return false}function findArrayReprints(newPath,oldPath,reprints){var newNode=newPath.getValue();var oldNode=oldPath.getValue();isArray.assert(newNode);var len=newNode.length;if(!(isArray.check(oldNode)&&oldNode.length===len))return false;for(var i=0;i ",path.call(print,"body"));return concat(parts);case"MethodDefinition":var parts=[];if(n.static){parts.push("static ")}parts.push(printMethod(path,options,print));return concat(parts);case"YieldExpression":var parts=["yield"];if(n.delegate)parts.push("*");if(n.argument)parts.push(" ",path.call(print,"argument"));return concat(parts);case"AwaitExpression":var parts=["await"];if(n.all)parts.push("*");if(n.argument)parts.push(" ",path.call(print,"argument"));return concat(parts);case"ModuleDeclaration":var parts=["module",path.call(print,"id")];if(n.source){assert.ok(!n.body);parts.push("from",path.call(print,"source"))}else{parts.push(path.call(print,"body"))}return fromString(" ").join(parts);case"ImportSpecifier":case"ExportSpecifier":var parts=[path.call(print,"id")];if(n.name)parts.push(" as ",path.call(print,"name"));return concat(parts);case"ExportBatchSpecifier":return fromString("*");case"ImportNamespaceSpecifier":return concat(["* as ",path.call(print,"id")]);case"ImportDefaultSpecifier":return path.call(print,"id");case"ExportDeclaration":var parts=["export"];if(n["default"]){parts.push(" default")}else if(n.specifiers&&n.specifiers.length>0){if(n.specifiers.length===1&&n.specifiers[0].type==="ExportBatchSpecifier"){parts.push(" *")}else{parts.push(" { ",fromString(", ").join(path.map(print,"specifiers"))," }")}if(n.source)parts.push(" from ",path.call(print,"source"));parts.push(";");return concat(parts)}if(n.declaration){if(!namedTypes.Node.check(n.declaration)){console.log(JSON.stringify(n,null,2))}var decLines=path.call(print,"declaration");parts.push(" ",decLines);if(lastNonSpaceCharacter(decLines)!==";"){parts.push(";")}}return concat(parts);case"ImportDeclaration":var parts=["import "];if(n.specifiers&&n.specifiers.length>0){var foundImportSpecifier=false;path.each(function(specifierPath){var i=specifierPath.getName();if(i>0){parts.push(", ")}var value=specifierPath.getValue();if(namedTypes.ImportDefaultSpecifier.check(value)||namedTypes.ImportNamespaceSpecifier.check(value)){assert.strictEqual(foundImportSpecifier,false)}else{namedTypes.ImportSpecifier.assert(value);if(!foundImportSpecifier){foundImportSpecifier=true;parts.push("{")}}parts.push(print(specifierPath))},"specifiers");if(foundImportSpecifier){parts.push("}")}parts.push(" from ")}parts.push(path.call(print,"source"),";");return concat(parts);case"BlockStatement":var naked=path.call(function(bodyPath){return printStatementSequence(bodyPath,options,print)},"body");if(naked.isEmpty()){return fromString("{}")}return concat(["{\n",naked.indent(options.tabWidth),"\n}"]);case"ReturnStatement":var parts=["return"];if(n.argument){var argLines=path.call(print,"argument");if(argLines.length>1&&(namedTypes.XJSElement&&namedTypes.XJSElement.check(n.argument)||namedTypes.JSXElement&&namedTypes.JSXElement.check(n.argument))){parts.push(" (\n",argLines.indent(options.tabWidth),"\n)")}else{parts.push(" ",argLines)}}parts.push(";");return concat(parts);case"CallExpression":return concat([path.call(print,"callee"),printArgumentsList(path,options,print)]);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var allowBreak=false;var isTypeAnnotation=n.type==="ObjectTypeAnnotation";var separator=isTypeAnnotation?";":",";var fields=[];if(isTypeAnnotation){fields.push("indexers","callProperties")}fields.push("properties");var len=0;fields.forEach(function(field){len+=n[field].length});var oneLine=isTypeAnnotation&&len===1||len===0;var parts=[oneLine?"{":"{\n"];fields.forEach(function(field){path.map(function(childPath){var i=childPath.getName();var prop=childPath.getValue();var lines=print(childPath);if(!oneLine){lines=lines.indent(options.tabWidth)}var multiLine=!isTypeAnnotation&&lines.length>1;if(multiLine&&allowBreak){parts.push("\n")}parts.push(lines);if(i0)parts.push(" ");parts.push(print(elemPath));if(i1){parts.push(fromString(",\n").join(printed).indentTail(n.kind.length+1))}else{parts.push(printed[0])}var parentNode=path.getParentNode();if(!namedTypes.ForStatement.check(parentNode)&&!namedTypes.ForInStatement.check(parentNode)&&!(namedTypes.ForOfStatement&&namedTypes.ForOfStatement.check(parentNode))){parts.push(";")}return concat(parts);case"VariableDeclarator":return n.init?fromString(" = ").join([path.call(print,"id"),path.call(print,"init")]):path.call(print,"id");case"WithStatement":return concat(["with (",path.call(print,"object"),") ",path.call(print,"body")]);case"IfStatement":var con=adjustClause(path.call(print,"consequent"),options),parts=["if (",path.call(print,"test"),")",con];if(n.alternate)parts.push(endsWithBrace(con)?" else":"\nelse",adjustClause(path.call(print,"alternate"),options));return concat(parts);case"ForStatement":var init=path.call(print,"init"),sep=init.length>1?";\n":"; ",forParen="for (",indented=fromString(sep).join([init,path.call(print,"test"),path.call(print,"update")]).indentTail(forParen.length),head=concat([forParen,indented,")"]),clause=adjustClause(path.call(print,"body"),options),parts=[head];if(head.length>1){parts.push("\n");clause=clause.trimLeft()}parts.push(clause);return concat(parts);case"WhileStatement":return concat(["while (",path.call(print,"test"),")",adjustClause(path.call(print,"body"),options)]);case"ForInStatement":return concat([n.each?"for each (":"for (",path.call(print,"left")," in ",path.call(print,"right"),")",adjustClause(path.call(print,"body"),options)]);case"ForOfStatement":return concat(["for (",path.call(print,"left")," of ",path.call(print,"right"),")",adjustClause(path.call(print,"body"),options)]);case"DoWhileStatement":var doBody=concat(["do",adjustClause(path.call(print,"body"),options)]),parts=[doBody];if(endsWithBrace(doBody))parts.push(" while");else parts.push("\nwhile");parts.push(" (",path.call(print,"test"),");");return concat(parts);case"BreakStatement":var parts=["break"];if(n.label)parts.push(" ",path.call(print,"label"));parts.push(";");return concat(parts);case"ContinueStatement":var parts=["continue"];if(n.label)parts.push(" ",path.call(print,"label"));parts.push(";");return concat(parts);case"LabeledStatement":return concat([path.call(print,"label"),":\n",path.call(print,"body")]);case"TryStatement":var parts=["try ",path.call(print,"block")];if(n.handler){parts.push(" ",path.call(print,"handler"))}else if(n.handlers){path.each(function(handlerPath){parts.push(" ",print(handlerPath))},"handlers")}if(n.finalizer){parts.push(" finally ",path.call(print,"finalizer"))}return concat(parts);case"CatchClause":var parts=["catch (",path.call(print,"param")];if(n.guard)parts.push(" if ",path.call(print,"guard"));parts.push(") ",path.call(print,"body"));return concat(parts);case"ThrowStatement":return concat(["throw ",path.call(print,"argument"),";"]);case"SwitchStatement":return concat(["switch (",path.call(print,"discriminant"),") {\n",fromString("\n").join(path.map(print,"cases")),"\n}"]);case"SwitchCase":var parts=[];if(n.test)parts.push("case ",path.call(print,"test"),":");else parts.push("default:");if(n.consequent.length>0){parts.push("\n",path.call(function(consequentPath){return printStatementSequence(consequentPath,options,print)},"consequent").indent(options.tabWidth))}return concat(parts);case"DebuggerStatement":return fromString("debugger;");case"XJSAttribute":case"JSXAttribute":var parts=[path.call(print,"name")];if(n.value)parts.push("=",path.call(print,"value"));return concat(parts);case"XJSIdentifier":case"JSXIdentifier":return fromString(n.name,options);case"XJSNamespacedName":case"JSXNamespacedName":return fromString(":").join([path.call(print,"namespace"),path.call(print,"name")]);case"XJSMemberExpression":case"JSXMemberExpression":return fromString(".").join([path.call(print,"object"),path.call(print,"property")]);case"XJSSpreadAttribute":case"JSXSpreadAttribute":return concat(["{...",path.call(print,"argument"),"}"]);case"XJSExpressionContainer":case"JSXExpressionContainer":return concat(["{",path.call(print,"expression"),"}"]);case"XJSElement":case"JSXElement":var openingLines=path.call(print,"openingElement");if(n.openingElement.selfClosing){assert.ok(!n.closingElement);return openingLines}var childLines=concat(path.map(function(childPath){var child=childPath.getValue();if(namedTypes.Literal.check(child)&&typeof child.value==="string"){if(/\S/.test(child.value)){return child.value.replace(/^\s+|\s+$/g,"")}else if(/\n/.test(child.value)){return"\n"}}return print(childPath)},"children")).indentTail(options.tabWidth);var closingLines=path.call(print,"closingElement");return concat([openingLines,childLines,closingLines]);case"XJSOpeningElement":case"JSXOpeningElement":var parts=["<",path.call(print,"name")];var attrParts=[];path.each(function(attrPath){attrParts.push(" ",print(attrPath))},"attributes");var attrLines=concat(attrParts);var needLineWrap=attrLines.length>1||attrLines.getLineLength(1)>options.wrapColumn;if(needLineWrap){attrParts.forEach(function(part,i){if(part===" "){assert.strictEqual(i%2,0);attrParts[i]="\n"}});attrLines=concat(attrParts).indentTail(options.tabWidth)}parts.push(attrLines,n.selfClosing?" />":">");return concat(parts);case"XJSClosingElement":case"JSXClosingElement":return concat([""]);case"XJSText":case"JSXText":return fromString(n.value,options);case"XJSEmptyExpression":case"JSXEmptyExpression":return fromString("");case"TypeAnnotatedIdentifier":return concat([path.call(print,"annotation")," ",path.call(print,"identifier")]);case"ClassBody":if(n.body.length===0){return fromString("{}")}return concat(["{\n",path.call(function(bodyPath){return printStatementSequence(bodyPath,options,print)},"body").indent(options.tabWidth),"\n}"]);case"ClassPropertyDefinition":var parts=["static ",path.call(print,"definition")];if(!namedTypes.MethodDefinition.check(n.definition))parts.push(";");return concat(parts);case"ClassProperty":return concat([path.call(print,"key"),path.call(print,"typeAnnotation"),";"]);case"ClassDeclaration":case"ClassExpression":var parts=["class"];if(n.id){parts.push(" ",path.call(print,"id"),path.call(print,"typeParameters"))}if(n.superClass){parts.push(" extends ",path.call(print,"superClass"),path.call(print,"superTypeParameters"))}if(n["implements"]){parts.push(" implements ",fromString(", ").join(path.map(print,"implements")))}parts.push(" ",path.call(print,"body"));return concat(parts);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"MemberTypeAnnotation":case"TupleTypeAnnotation":case"Type":throw new Error("unprintable type: "+JSON.stringify(n.type));case"Block":return concat(["/*",fromString(n.value,options),"*/"]);case"Line":return concat(["//",fromString(n.value,options)]);case"TypeAnnotation":var parts=[];if(n.typeAnnotation){if(n.typeAnnotation.type!=="FunctionTypeAnnotation"){parts.push(": ")}parts.push(path.call(print,"typeAnnotation"));return concat(parts)}return fromString("");case"AnyTypeAnnotation":return fromString("any",options);case"ArrayTypeAnnotation":return concat([path.call(print,"elementType"),"[]"]);case"BooleanTypeAnnotation":return fromString("boolean",options);case"DeclareClass":return concat([fromString("declare class ",options),path.call(print,"id")," ",path.call(print,"body")]);case"DeclareFunction":return concat([fromString("declare function ",options),path.call(print,"id")]);case"DeclareModule":return concat([fromString("declare module ",options),path.call(print,"id")," ",path.call(print,"body")]);case"DeclareVariable":return concat([fromString("declare var ",options),path.call(print,"id")]);case"FunctionTypeAnnotation":var parts=[];var parent=path.getParentNode(0);var isArrowFunctionTypeAnnotation=!(namedTypes.ObjectTypeCallProperty.check(parent)||namedTypes.DeclareFunction.check(path.getParentNode(2)));var needsColon=isArrowFunctionTypeAnnotation&&!namedTypes.FunctionTypeParam.check(parent);if(needsColon){parts.push(": ")}parts.push("(",fromString(", ").join(path.map(print,"params")),")");if(n.returnType){parts.push(isArrowFunctionTypeAnnotation?" => ":": ",path.call(print,"returnType"))}return concat(parts);case"FunctionTypeParam":return concat([path.call(print,"name"),": ",path.call(print,"typeAnnotation")]);case"GenericTypeAnnotation":return concat([path.call(print,"id"),path.call(print,"typeParameters")]);case"InterfaceDeclaration":var parts=[fromString("interface ",options),path.call(print,"id"),path.call(print,"typeParameters")," "];if(n["extends"]){parts.push("extends ",fromString(", ").join(path.map(print,"extends")))}parts.push(path.call(print,"body"));return concat(parts);case"ClassImplements":case"InterfaceExtends":return concat([path.call(print,"id"),path.call(print,"typeParameters")]);case"IntersectionTypeAnnotation":return fromString(" & ").join(path.map(print,"types"));case"NullableTypeAnnotation":return concat(["?",path.call(print,"typeAnnotation")]);case"NumberTypeAnnotation":return fromString("number",options);case"ObjectTypeCallProperty":return path.call(print,"value");case"ObjectTypeIndexer":return concat(["[",path.call(print,"id"),": ",path.call(print,"key"),"]: ",path.call(print,"value")]);case"ObjectTypeProperty":return concat([path.call(print,"key"),": ",path.call(print,"value")]);case"QualifiedTypeIdentifier":return concat([path.call(print,"qualification"),".",path.call(print,"id")]);case"StringLiteralTypeAnnotation":return fromString(nodeStr(n.value,options),options);case"StringTypeAnnotation":return fromString("string",options);case"TypeAlias":return concat(["type ",path.call(print,"id")," = ",path.call(print,"right")]);case"TypeCastExpression":return concat(["(",path.call(print,"expression"),path.call(print,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return concat(["<",fromString(", ").join(path.map(print,"params")),">"]);case"TypeofTypeAnnotation":return concat([fromString("typeof ",options),path.call(print,"argument")]);case"UnionTypeAnnotation":return fromString(" | ").join(path.map(print,"types"));case"VoidTypeAnnotation":return fromString("void",options);case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:debugger;throw new Error("unknown type: "+JSON.stringify(n.type)); + +}return p}function printStatementSequence(path,options,print){var inClassBody=namedTypes.ClassBody&&namedTypes.ClassBody.check(path.getParentNode());var filtered=[];path.each(function(stmtPath){var i=stmtPath.getName();var stmt=stmtPath.getValue();if(!stmt){return}if(stmt.type==="EmptyStatement"){return}if(!inClassBody){namedTypes.Statement.assert(stmt)}filtered.push({node:stmt,printed:print(stmtPath)})});var prevTrailingSpace=null;var len=filtered.length;var parts=[];filtered.forEach(function(info,i){var printed=info.printed;var stmt=info.node;var needSemicolon=true;var multiLine=printed.length>1;var notFirst=i>0;var notLast=ispaceLines1.length){return spaceLines2}return spaceLines1}function printMethod(path,options,print){var node=path.getNode();var kind=node.kind;var parts=[];namedTypes.FunctionExpression.assert(node.value);if(node.value.async){parts.push("async ")}if(!kind||kind==="init"){if(node.value.generator){parts.push("*")}}else{assert.ok(kind==="get"||kind==="set");parts.push(kind," ")}var key=path.call(print,"key");if(node.computed){key=concat(["[",key,"]"])}parts.push(key,path.call(print,"value","typeParameters"),"(",path.call(function(valuePath){return printFunctionParams(valuePath,options,print)},"value"),")",path.call(print,"value","returnType")," ",path.call(print,"value","body"));return concat(parts)}function printArgumentsList(path,options,print){var printed=path.map(print,"arguments");var joined=fromString(", ").join(printed);if(joined.getLineLength(1)>options.wrapColumn){joined=fromString(",\n").join(printed);return concat(["(\n",joined.indent(options.tabWidth),"\n)"])}return concat(["(",joined,")"])}function printFunctionParams(path,options,print){var fun=path.getValue();namedTypes.Function.assert(fun);var printed=path.map(print,"params");if(fun.defaults){path.each(function(defExprPath){var i=defExprPath.getName();var p=printed[i];if(p&&defExprPath.getValue()){printed[i]=concat([p,"=",print(defExprPath)])}},"defaults")}if(fun.rest){printed.push(concat(["...",path.call(print,"rest")]))}var joined=fromString(", ").join(printed);if(joined.length>1||joined.getLineLength(1)>options.wrapColumn){joined=fromString(",\n").join(printed);return concat(["\n",joined.indent(options.tabWidth)])}return joined}function adjustClause(clause,options){if(clause.length>1)return concat([" ",clause]);return concat(["\n",maybeAddSemicolon(clause).indent(options.tabWidth)])}function lastNonSpaceCharacter(lines){var pos=lines.lastPos();do{var ch=lines.charAt(pos);if(/\S/.test(ch))return ch}while(lines.prevPos(pos))}function endsWithBrace(lines){return lastNonSpaceCharacter(lines)==="}"}function swapQuotes(str){return str.replace(/['"]/g,function(m){return m==='"'?"'":'"'})}function nodeStr(str,options){isString.assert(str);switch(options.quote){case"auto":var double=JSON.stringify(str);var single=swapQuotes(JSON.stringify(swapQuotes(str)));return double.length>single.length?single:double;case"single":return swapQuotes(JSON.stringify(swapQuotes(str)));case"double":default:return JSON.stringify(str)}}function maybeAddSemicolon(lines){var eoc=lastNonSpaceCharacter(lines);if(!eoc||"\n};".indexOf(eoc)<0)return concat([lines,";"]);return lines}},{"./comments":470,"./fast-path":471,"./lines":472,"./options":474,"./patcher":476,"./types":478,"./util":479,assert:203,"source-map":493}],478:[function(require,module,exports){var types=require("ast-types");var def=types.Type.def;def("File").bases("Node").build("program").field("program",def("Program"));types.finalize();module.exports=types},{"ast-types":201}],479:[function(require,module,exports){var assert=require("assert");var types=require("./types");var getFieldValue=types.getFieldValue;var n=types.namedTypes;var sourceMap=require("source-map");var SourceMapConsumer=sourceMap.SourceMapConsumer;var SourceMapGenerator=sourceMap.SourceMapGenerator;var hasOwn=Object.prototype.hasOwnProperty;function getUnionOfKeys(){var result={};var argc=arguments.length;for(var i=0;i=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc){this.complete(entry.completion,entry.afterLoc);resetTryEntry(entry);return ContinueSentinel}}},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}(typeof global==="object"?global:typeof window==="object"?window:typeof self==="object"?self:this)}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:213}],483:[function(require,module,exports){var regenerate=require("regenerate");exports.REGULAR={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,65535),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)};exports.UNICODE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)};exports.UNICODE_IGNORE_CASE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},{regenerate:485}],484:[function(require,module,exports){module.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}},{}],485:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports;var freeModule=typeof module=="object"&&module&&module.exports==freeExports&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal){root=freeGlobal}var ERRORS={rangeOrder:"A range’s `stop` value must be greater than or equal "+"to the `start` value.",codePointRange:"Invalid code point value. Code points range from "+"U+000000 to U+10FFFF."};var HIGH_SURROGATE_MIN=55296;var HIGH_SURROGATE_MAX=56319;var LOW_SURROGATE_MIN=56320;var LOW_SURROGATE_MAX=57343;var regexNull=/\\x00([^0123456789]|$)/g;var object={};var hasOwnProperty=object.hasOwnProperty;var extend=function(destination,source){var key;for(key in source){if(hasOwnProperty.call(source,key)){destination[key]=source[key]}}return destination};var forEach=function(array,callback){var index=-1;var length=array.length;while(++index=start&&codePointrangeEnd){return data}if(rangeStart<=start&&rangeEnd>=end){data.splice(index,2);continue}if(rangeStart>=start&&rangeEnd=start&&rangeStart<=end){data[index+1]=rangeStart}else if(rangeEnd>=start&&rangeEnd<=end){data[index]=rangeEnd+1;return data}index+=2}return data};var dataAdd=function(data,codePoint){var index=0;var start;var end;var lastIndex=null;var length=data.length;if(codePoint<0||codePoint>1114111){throw RangeError(ERRORS.codePointRange)}while(index=start&&codePointcodePoint){data.splice(lastIndex!=null?lastIndex+2:0,0,codePoint,codePoint+1);return data}if(codePoint==end){if(codePoint+1==data[index+2]){data.splice(index,4,start,data[index+3]);return data}data[index+1]=codePoint+1;return data}lastIndex=index;index+=2}data.push(codePoint,codePoint+1);return data};var dataAddData=function(dataA,dataB){var index=0;var start;var end;var data=dataA.slice();var length=dataB.length;while(index1114111||rangeEnd<0||rangeEnd>1114111){throw RangeError(ERRORS.codePointRange)}var index=0;var start;var end;var added=false;var length=data.length;while(indexrangeEnd){return data}if(start>=rangeStart&&start<=rangeEnd){if(end>rangeStart&&end-1<=rangeEnd){data.splice(index,2);index-=2}else{data.splice(index-1,2);index-=2}}}else if(start==rangeEnd+1){data[index]=rangeStart;return data}else if(start>rangeEnd){data.splice(index,0,rangeStart,rangeEnd+1);return data}else if(rangeStart>=start&&rangeStart=start&&rangeStart=end){data[index]=rangeStart;data[index+1]=rangeEnd+1;added=true}index+=2}if(!added){data.push(rangeStart,rangeEnd+1)}return data};var dataContains=function(data,codePoint){var index=0;var length=data.length;var start=data[index];var end=data[length-1];if(length>=2){if(codePointend){return false}}while(index=start&&codePoint=40&&codePoint<=43||codePoint==45||codePoint==46||codePoint==63||codePoint>=91&&codePoint<=94||codePoint>=123&&codePoint<=125){string="\\"+stringFromCharCode(codePoint)}else if(codePoint>=32&&codePoint<=126){string=stringFromCharCode(codePoint)}else if(codePoint<=255){string="\\x"+pad(hex(codePoint),2)}else{string="\\u"+pad(hex(codePoint),4)}return string};var symbolToCodePoint=function(symbol){var length=symbol.length;var first=symbol.charCodeAt(0);var second;if(first>=HIGH_SURROGATE_MIN&&first<=HIGH_SURROGATE_MAX&&length>1){second=symbol.charCodeAt(1);return(first-HIGH_SURROGATE_MIN)*1024+second-LOW_SURROGATE_MIN+65536}return first};var createBMPCharacterClasses=function(data){var result="";var index=0;var start;var end;var length=data.length;if(dataIsSingleton(data)){return codePointToString(data[0])}while(index=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1); + +}}}else if(start>=HIGH_SURROGATE_MIN&&start<=HIGH_SURROGATE_MAX){if(end>=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){loneHighSurrogates.push(start,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=LOW_SURROGATE_MIN&&start<=LOW_SURROGATE_MAX){if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneLowSurrogates.push(start,end+1)}if(end>LOW_SURROGATE_MAX){loneLowSurrogates.push(start,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>LOW_SURROGATE_MAX&&start<=65535){if(end<=65535){bmp.push(start,end+1)}else{bmp.push(start,65535+1);astral.push(65535+1,end+1)}}else{astral.push(start,end+1)}index+=2}return{loneHighSurrogates:loneHighSurrogates,loneLowSurrogates:loneLowSurrogates,bmp:bmp,astral:astral}};var optimizeSurrogateMappings=function(surrogateMappings){var result=[];var tmpLow=[];var addLow=false;var mapping;var nextMapping;var highSurrogates;var lowSurrogates;var nextHighSurrogates;var nextLowSurrogates;var index=-1;var length=surrogateMappings.length;while(++index1){value=slice.call(arguments)}if(this instanceof regenerate){this.data=[];return value?this.add(value):this}return(new regenerate).add(value)};regenerate.version="1.2.0";var proto=regenerate.prototype;extend(proto,{add:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataAddData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.add(item)});return $this}$this.data=dataAdd($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},remove:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataRemoveData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.remove(item)});return $this}$this.data=dataRemove($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},addRange:function(start,end){var $this=this;$this.data=dataAddRange($this.data,isNumber(start)?start:symbolToCodePoint(start),isNumber(end)?end:symbolToCodePoint(end));return $this},removeRange:function(start,end){var $this=this;var startCodePoint=isNumber(start)?start:symbolToCodePoint(start);var endCodePoint=isNumber(end)?end:symbolToCodePoint(end);$this.data=dataRemoveRange($this.data,startCodePoint,endCodePoint);return $this},intersection:function(argument){var $this=this;var array=argument instanceof regenerate?dataToArray(argument.data):argument;$this.data=dataIntersection($this.data,array);return $this},contains:function(codePoint){return dataContains(this.data,isNumber(codePoint)?codePoint:symbolToCodePoint(codePoint))},clone:function(){var set=new regenerate;set.data=this.data.slice(0);return set},toString:function(options){var result=createCharacterClassesFromData(this.data,options?options.bmpOnly:false);return result.replace(regexNull,"\\0$1")},toRegExp:function(flags){return RegExp(this.toString(),flags||"")},valueOf:function(){return dataToArray(this.data)}});proto.toArray=proto.valueOf;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define(function(){return regenerate})}else if(freeExports&&!freeExports.nodeType){if(freeModule){freeModule.exports=regenerate}else{freeExports.regenerate=regenerate}}else{root.regenerate=regenerate}})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],486:[function(require,module,exports){(function(global){(function(){"use strict";var objectTypes={"function":true,object:true};var root=objectTypes[typeof window]&&window||this;var oldRoot=root;var freeExports=objectTypes[typeof exports]&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal}var stringFromCharCode=String.fromCharCode;var floor=Math.floor;function fromCodePoint(){var MAX_SIZE=16384;var codeUnits=[];var highSurrogate;var lowSurrogate;var index=-1;var length=arguments.length;if(!length){return""}var result="";while(++index1114111||floor(codePoint)!=codePoint){throw RangeError("Invalid code point: "+codePoint)}if(codePoint<=65535){codeUnits.push(codePoint)}else{codePoint-=65536;highSurrogate=(codePoint>>10)+55296;lowSurrogate=codePoint%1024+56320;codeUnits.push(highSurrogate,lowSurrogate)}if(index+1==length||codeUnits.length>MAX_SIZE){result+=stringFromCharCode.apply(null,codeUnits);codeUnits.length=0}}return result}function assertType(type,expected){if(expected.indexOf("|")==-1){if(type==expected){return}throw Error("Invalid node type: "+type)}expected=assertType.hasOwnProperty(expected)?assertType[expected]:assertType[expected]=RegExp("^(?:"+expected+")$");if(expected.test(type)){return}throw Error("Invalid node type: "+type)}function generate(node){var type=node.type;if(generate.hasOwnProperty(type)&&typeof generate[type]=="function"){return generate[type](node)}throw Error("Invalid node type: "+type)}function generateAlternative(node){assertType(node.type,"alternative");var terms=node.body,length=terms?terms.length:0;if(length==1){return generateTerm(terms[0])}else{var i=-1,result="";while(++i=55296&&first<=56319){second=lookahead().charCodeAt(0);if(second>=56320&&second<=57343){pos++;return createValue("symbol",(first-55296)*1024+second-56320+65536,pos-2,pos)}}}return createValue("symbol",first,pos-1,pos)}function createDisjunction(alternatives,from,to){return addRaw({type:"disjunction",body:alternatives,range:[from,to]})}function createDot(){return addRaw({type:"dot",range:[pos-1,pos]})}function createCharacterClassEscape(value){return addRaw({type:"characterClassEscape",value:value,range:[pos-2,pos]})}function createReference(matchIndex){return addRaw({type:"reference",matchIndex:parseInt(matchIndex,10),range:[pos-1-matchIndex.length,pos]})}function createGroup(behavior,disjunction,from,to){return addRaw({type:"group",behavior:behavior,body:disjunction,range:[from,to]})}function createQuantifier(min,max,from,to){if(to==null){from=pos-1;to=pos}return addRaw({type:"quantifier",min:min,max:max,greedy:true,body:null,range:[from,to]})}function createAlternative(terms,from,to){return addRaw({type:"alternative",body:terms,range:[from,to]})}function createCharacterClass(classRanges,negative,from,to){return addRaw({type:"characterClass",body:classRanges,negative:negative,range:[from,to]})}function createClassRange(min,max,from,to){if(min.codePoint>max.codePoint){throw SyntaxError("invalid range in character class")}return addRaw({type:"characterClassRange",min:min,max:max,range:[from,to]})}function flattenBody(body){if(body.type==="alternative"){return body.body}else{return[body]}}function isEmpty(obj){return obj.type==="empty"}function incr(amount){amount=amount||1;var res=str.substring(pos,pos+amount);pos+=amount||1;return res}function skip(value){if(!match(value)){throw SyntaxError("character: "+value)}}function match(value){if(str.indexOf(value,pos)===pos){return incr(value.length)}}function lookahead(){return str[pos]}function current(value){return str.indexOf(value,pos)===pos}function next(value){return str[pos+1]===value}function matchReg(regExp){var subStr=str.substring(pos);var res=subStr.match(regExp);if(res){res.range=[];res.range[0]=pos;incr(res[0].length);res.range[1]=pos}return res}function parseDisjunction(){var res=[],from=pos;res.push(parseAlternative());while(match("|")){res.push(parseAlternative())}if(res.length===1){return res[0]}return createDisjunction(res,from,pos)}function parseAlternative(){var res=[],from=pos;var term;while(term=parseTerm()){res.push(term)}if(res.length===1){return res[0]}return createAlternative(res,from,pos)}function parseTerm(){if(pos>=str.length||current("|")||current(")")){return null}var anchor=parseAnchor();if(anchor){return anchor}var atom=parseAtom();if(!atom){throw SyntaxError("Expected atom")}var quantifier=parseQuantifier()||false;if(quantifier){quantifier.body=flattenBody(atom);updateRawStart(quantifier,atom.range[0]);return quantifier}return atom}function parseGroup(matchA,typeA,matchB,typeB){var type=null,from=pos;if(match(matchA)){type=typeA}else if(match(matchB)){type=typeB}else{return false}var body=parseDisjunction();if(!body){throw SyntaxError("Expected disjunction")}skip(")");var group=createGroup(type,flattenBody(body),from,pos);if(type=="normal"){if(firstIteration){closedCaptureCounter++}}return group}function parseAnchor(){var res,from=pos;if(match("^")){return createAnchor("start",1)}else if(match("$")){return createAnchor("end",1)}else if(match("\\b")){return createAnchor("boundary",2)}else if(match("\\B")){return createAnchor("not-boundary",2)}else{return parseGroup("(?=","lookahead","(?!","negativeLookahead")}}function parseQuantifier(){var res;var quantifier;var min,max;if(match("*")){quantifier=createQuantifier(0)}else if(match("+")){quantifier=createQuantifier(1)}else if(match("?")){quantifier=createQuantifier(0,1)}else if(res=matchReg(/^\{([0-9]+)\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,min,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,undefined,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),([0-9]+)\}/)){min=parseInt(res[1],10);max=parseInt(res[2],10);if(min>max){throw SyntaxError("numbers out of order in {} quantifier")}quantifier=createQuantifier(min,max,res.range[0],res.range[1])}if(quantifier){if(match("?")){quantifier.greedy=false;quantifier.range[1]+=1}}return quantifier}function parseAtom(){var res;if(res=matchReg(/^[^^$\\.*+?(){[|]/)){return createCharacter(res)}else if(match(".")){return createDot()}else if(match("\\")){res=parseAtomEscape();if(!res){throw SyntaxError("atomEscape")}return res}else if(res=parseCharacterClass()){return res}else{return parseGroup("(?:","ignore","(","normal")}}function parseUnicodeSurrogatePairEscape(firstEscape){if(hasUnicodeFlag){var first,second;if(firstEscape.kind=="unicodeEscape"&&(first=firstEscape.codePoint)>=55296&&first<=56319&¤t("\\")&&next("u")){var prevPos=pos;pos++;var secondEscape=parseClassEscape();if(secondEscape.kind=="unicodeEscape"&&(second=secondEscape.codePoint)>=56320&&second<=57343){firstEscape.range[1]=secondEscape.range[1];firstEscape.codePoint=(first-55296)*1024+second-56320+65536;firstEscape.type="value";firstEscape.kind="unicodeCodePointEscape";addRaw(firstEscape)}else{pos=prevPos}}}return firstEscape}function parseClassEscape(){return parseAtomEscape(true)}function parseAtomEscape(insideCharacterClass){var res;res=parseDecimalEscape();if(res){return res}if(insideCharacterClass){if(match("b")){return createEscaped("singleEscape",8,"\\b")}else if(match("B")){throw SyntaxError("\\B not possible inside of CharacterClass")}}res=parseCharacterEscape();return res}function parseDecimalEscape(){var res,match;if(res=matchReg(/^(?!0)\d+/)){match=res[0];var refIdx=parseInt(res[0],10);if(refIdx<=closedCaptureCounter){return createReference(res[0])}else{backrefDenied.push(refIdx);incr(-res[0].length);if(res=matchReg(/^[0-7]{1,3}/)){return createEscaped("octal",parseInt(res[0],8),res[0],1)}else{res=createCharacter(matchReg(/^[89]/));return updateRawStart(res,res.range[0]-1)}}}else if(res=matchReg(/^[0-7]{1,3}/)){match=res[0];if(/^0{1,3}$/.test(match)){return createEscaped("null",0,"0",match.length+1)}else{return createEscaped("octal",parseInt(match,8),match,1)}}else if(res=matchReg(/^[dDsSwW]/)){return createCharacterClassEscape(res[0])}return false}function parseCharacterEscape(){var res;if(res=matchReg(/^[fnrtv]/)){var codePoint=0;switch(res[0]){case"t":codePoint=9;break;case"n":codePoint=10;break;case"v":codePoint=11;break;case"f":codePoint=12;break;case"r":codePoint=13;break}return createEscaped("singleEscape",codePoint,"\\"+res[0])}else if(res=matchReg(/^c([a-zA-Z])/)){return createEscaped("controlLetter",res[1].charCodeAt(0)%32,res[1],2)}else if(res=matchReg(/^x([0-9a-fA-F]{2})/)){return createEscaped("hexadecimalEscape",parseInt(res[1],16),res[1],2)}else if(res=matchReg(/^u([0-9a-fA-F]{4})/)){return parseUnicodeSurrogatePairEscape(createEscaped("unicodeEscape",parseInt(res[1],16),res[1],2))}else if(hasUnicodeFlag&&(res=matchReg(/^u\{([0-9a-fA-F]+)\}/))){return createEscaped("unicodeCodePointEscape",parseInt(res[1],16),res[1],4)}else{return parseIdentityEscape()}}function isIdentifierPart(ch){var NonAsciiIdentifierPart=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&NonAsciiIdentifierPart.test(String.fromCharCode(ch))}function parseIdentityEscape(){var ZWJ="‌";var ZWNJ="‍";var res;var tmp;if(!isIdentifierPart(lookahead())){tmp=incr();return createEscaped("identifier",tmp.charCodeAt(0),tmp,1)}if(match(ZWJ)){return createEscaped("identifier",8204,ZWJ)}else if(match(ZWNJ)){return createEscaped("identifier",8205,ZWNJ)}return null}function parseCharacterClass(){var res,from=pos;if(res=matchReg(/^\[\^/)){res=parseClassRanges();skip("]");return createCharacterClass(res,true,from,pos)}else if(match("[")){res=parseClassRanges();skip("]");return createCharacterClass(res,false,from,pos)}return null}function parseClassRanges(){var res;if(current("]")){return[]}else{res=parseNonemptyClassRanges();if(!res){throw SyntaxError("nonEmptyClassRanges")}return res}}function parseHelperClassRanges(atom){var from,to,res;if(current("-")&&!next("]")){skip("-");res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}to=pos;var classRanges=parseClassRanges();if(!classRanges){throw SyntaxError("classRanges")}from=atom.range[0];if(classRanges.type==="empty"){return[createClassRange(atom,res,from,to)]}return[createClassRange(atom,res,from,to)].concat(classRanges)}res=parseNonemptyClassRangesNoDash();if(!res){throw SyntaxError("nonEmptyClassRangesNoDash")}return[atom].concat(res)}function parseNonemptyClassRanges(){var atom=parseClassAtom();if(!atom){throw SyntaxError("classAtom")}if(current("]")){return[atom]}return parseHelperClassRanges(atom)}function parseNonemptyClassRangesNoDash(){var res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}if(current("]")){return res}return parseHelperClassRanges(res)}function parseClassAtom(){if(match("-")){return createCharacter("-")}else{return parseClassAtomNoDash()}}function parseClassAtomNoDash(){var res;if(res=matchReg(/^[^\\\]-]/)){return createCharacter(res[0])}else if(match("\\")){res=parseClassEscape();if(!res){throw SyntaxError("classEscape")}return parseUnicodeSurrogatePairEscape(res)}}var backrefDenied=[];var closedCaptureCounter=0;var firstIteration=true;var hasUnicodeFlag=(flags||"").indexOf("u")!==-1;var pos=0;str=String(str);if(str===""){str="(?:)"}var result=parseDisjunction();if(result.range[1]!==str.length){throw SyntaxError("Could not parse entire input - got stuck: "+str)}for(var i=0;i-1:false;unicode=flags?flags.indexOf("u")>-1:false;assign(tree,processTerm(tree));return generate(tree)}},{"./data/character-class-escape-sets.js":483,"./data/iu-mappings.json":484,regenerate:485,regjsgen:486,regjsparser:487}],489:[function(require,module,exports){"use strict";var isFinite=require("is-finite");module.exports=function(str,n){if(typeof str!=="string"){throw new TypeError("Expected a string as the first argument")}if(n<0||!isFinite(n)){throw new TypeError("Expected a finite positive number")}var ret="";do{if(n&1){ret+=str}str+=str}while(n=n>>1);return ret}},{"is-finite":490}],490:[function(require,module,exports){arguments[4][331][0].apply(exports,arguments)},{dup:331}],491:[function(require,module,exports){"use strict";module.exports=/^#!.*/},{}],492:[function(require,module,exports){"use strict";module.exports=function(str){var isExtendedLengthPath=/^\\\\\?\\/.test(str);var hasNonAscii=/[^\x00-\x80]+/.test(str);if(isExtendedLengthPath||hasNonAscii){return str}return str.replace(/\\/g,"/")}},{}],493:[function(require,module,exports){exports.SourceMapGenerator=require("./source-map/source-map-generator").SourceMapGenerator;exports.SourceMapConsumer=require("./source-map/source-map-consumer").SourceMapConsumer;exports.SourceNode=require("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":499,"./source-map/source-map-generator":500,"./source-map/source-node":501}],494:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function ArraySet(){this._array=[];this._set={}}ArraySet.fromArray=function ArraySet_fromArray(aArray,aAllowDuplicates){var set=new ArraySet;for(var i=0,len=aArray.length;i=0&&aIdx>1;return isNegative?-shifted:shifted}exports.encode=function base64VLQ_encode(aValue){var encoded="";var digit;var vlq=toVLQSigned(aValue);do{digit=vlq&VLQ_BASE_MASK;vlq>>>=VLQ_BASE_SHIFT;if(vlq>0){digit|=VLQ_CONTINUATION_BIT}encoded+=base64.encode(digit)}while(vlq>0);return encoded};exports.decode=function base64VLQ_decode(aStr,aIndex,aOutParam){var strLen=aStr.length;var result=0;var shift=0;var continuation,digit;do{if(aIndex>=strLen){throw new Error("Expected more digits in base 64 VLQ value.")}digit=base64.decode(aStr.charAt(aIndex++));continuation=!!(digit&VLQ_CONTINUATION_BIT);digit&=VLQ_BASE_MASK;result=result+(digit<0){if(aHigh-mid>1){return recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return aHigh1){return recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return mid}else{return aLow<0?-1:aLow}}}exports.search=function search(aNeedle,aHaystack,aCompare,aBias){if(aHaystack.length===0){return-1}var index=recursiveSearch(-1,aHaystack.length,aNeedle,aHaystack,aCompare,aBias||exports.GREATEST_LOWER_BOUND);if(index<0){return-1}while(index-1>=0){if(aCompare(aHaystack[index],aHaystack[index-1],true)!==0){break}--index}return index}})},{amdefine:503}],498:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function generatedPositionAfter(mappingA,mappingB){var lineA=mappingA.generatedLine;var lineB=mappingB.generatedLine;var columnA=mappingA.generatedColumn;var columnB=mappingB.generatedColumn;return lineB>lineA||lineB==lineA&&columnB>=columnA||util.compareByGeneratedPositions(mappingA,mappingB)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(aCallback,aThisArg){this._array.forEach(aCallback,aThisArg)};MappingList.prototype.add=function MappingList_add(aMapping){var mapping;if(generatedPositionAfter(this._last,aMapping)){this._last=aMapping;this._array.push(aMapping)}else{this._sorted=false;this._array.push(aMapping)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(util.compareByGeneratedPositions);this._sorted=true}return this._array};exports.MappingList=MappingList})},{"./util":502,amdefine:503}],499:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");var binarySearch=require("./binary-search");var ArraySet=require("./array-set").ArraySet;var base64VLQ=require("./base64-vlq");function SourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}return sourceMap.sections!=null?new IndexedSourceMapConsumer(sourceMap):new BasicSourceMapConsumer(sourceMap)}SourceMapConsumer.fromSourceMap=function(aSourceMap){return BasicSourceMapConsumer.fromSourceMap(aSourceMap)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{get:function(){if(!this.__generatedMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{get:function(){if(!this.__originalMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._nextCharIsMappingSeparator=function SourceMapConsumer_nextCharIsMappingSeparator(aStr,index){var c=aStr.charAt(index);return c===";"||c===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(aCallback,aContext,aOrder){var context=aContext||null;var order=aOrder||SourceMapConsumer.GENERATED_ORDER;var mappings;switch(order){case SourceMapConsumer.GENERATED_ORDER:mappings=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:mappings=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var sourceRoot=this.sourceRoot;mappings.map(function(mapping){var source=mapping.source;if(source!=null&&sourceRoot!=null){source=util.join(sourceRoot,source)}return{source:source,generatedLine:mapping.generatedLine,generatedColumn:mapping.generatedColumn,originalLine:mapping.originalLine,originalColumn:mapping.originalColumn,name:mapping.name}}).forEach(aCallback,context)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column",0)};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var mappings=[];var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,binarySearch.LEAST_UPPER_BOUND);if(index>=0){var mapping=this._originalMappings[index];var originalLine=mapping.originalLine;var originalColumn=mapping.originalColumn;while(mapping&&mapping.originalLine===originalLine&&(aArgs.column===undefined||mapping.originalColumn===originalColumn)){mappings.push({line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)});mapping=this._originalMappings[++index]}}return mappings};exports.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sources=util.getArg(sourceMap,"sources");var names=util.getArg(sourceMap,"names",[]);var sourceRoot=util.getArg(sourceMap,"sourceRoot",null);var sourcesContent=util.getArg(sourceMap,"sourcesContent",null);var mappings=util.getArg(sourceMap,"mappings");var file=util.getArg(sourceMap,"file",null);if(version!=this._version){throw new Error("Unsupported version: "+version)}sources=sources.map(util.normalize);this._names=ArraySet.fromArray(names,true);this._sources=ArraySet.fromArray(sources,true);this.sourceRoot=sourceRoot;this.sourcesContent=sourcesContent;this._mappings=mappings;this.file=file}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.fromSourceMap=function SourceMapConsumer_fromSourceMap(aSourceMap){var smc=Object.create(BasicSourceMapConsumer.prototype);smc._names=ArraySet.fromArray(aSourceMap._names.toArray(),true);smc._sources=ArraySet.fromArray(aSourceMap._sources.toArray(),true);smc.sourceRoot=aSourceMap._sourceRoot;smc.sourcesContent=aSourceMap._generateSourcesContent(smc._sources.toArray(),smc.sourceRoot);smc.file=aSourceMap._file;smc.__generatedMappings=aSourceMap._mappings.toArray().slice();smc.__originalMappings=aSourceMap._mappings.toArray().slice().sort(util.compareByOriginalPositions);return smc};BasicSourceMapConsumer.prototype._version=3;Object.defineProperty(BasicSourceMapConsumer.prototype,"sources",{get:function(){return this._sources.toArray().map(function(s){return this.sourceRoot!=null?util.join(this.sourceRoot,s):s},this)}});BasicSourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){var generatedLine=1;var previousGeneratedColumn=0;var previousOriginalLine=0;var previousOriginalColumn=0;var previousSource=0;var previousName=0;var length=aStr.length;var index=0;var cachedValues={};var temp={};var mapping,str,values,end,value;while(index1){mapping.source=this._sources.at(previousSource+values[1]);previousSource+=values[1];if(values.length===2){throw new Error("Found a source, but no line and column")}mapping.originalLine=previousOriginalLine+values[2];previousOriginalLine=mapping.originalLine;mapping.originalLine+=1;if(values.length===3){throw new Error("Found a source and line, but no column")}mapping.originalColumn=previousOriginalColumn+values[3];previousOriginalColumn=mapping.originalColumn;if(values.length>4){mapping.name=this._names.at(previousName+values[4]);previousName+=values[4]}}this.__generatedMappings.push(mapping);if(typeof mapping.originalLine==="number"){this.__originalMappings.push(mapping)}}}this.__generatedMappings.sort(util.compareByGeneratedPositions);this.__originalMappings.sort(util.compareByOriginalPositions)};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(aNeedle,aMappings,aLineName,aColumnName,aComparator,aBias){if(aNeedle[aLineName]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+aNeedle[aLineName])}if(aNeedle[aColumnName]<0){throw new TypeError("Column must be greater than or equal to 0, got "+aNeedle[aColumnName])}return binarySearch.search(aNeedle,aMappings,aComparator,aBias)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var index=0;index=0){var mapping=this._generatedMappings[index];if(mapping.generatedLine===needle.generatedLine){var source=util.getArg(mapping,"source",null);if(source!=null&&this.sourceRoot!=null){source=util.join(this.sourceRoot,source)}return{source:source,line:util.getArg(mapping,"originalLine",null),column:util.getArg(mapping,"originalColumn",null),name:util.getArg(mapping,"name",null)}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(aSource,nullOnMissing){if(!this.sourcesContent){return null}if(this.sourceRoot!=null){aSource=util.relative(this.sourceRoot,aSource)}if(this._sources.has(aSource)){return this.sourcesContent[this._sources.indexOf(aSource)]}var url;if(this.sourceRoot!=null&&(url=util.urlParse(this.sourceRoot))){var fileUriAbsPath=aSource.replace(/^file:\/\//,"");if(url.scheme=="file"&&this._sources.has(fileUriAbsPath)){return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]}if((!url.path||url.path=="/")&&this._sources.has("/"+aSource)){return this.sourcesContent[this._sources.indexOf("/"+aSource)]}}if(nullOnMissing){return null}else{throw new Error('"'+aSource+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column")};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,util.getArg(aArgs,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(index>=0){var mapping=this._originalMappings[index];if(mapping.source===needle.source){return{line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};exports.BasicSourceMapConsumer=BasicSourceMapConsumer;function IndexedSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sections=util.getArg(sourceMap,"sections");if(version!=this._version){throw new Error("Unsupported version: "+version)}var lastOffset={line:-1,column:0};this._sections=sections.map(function(s){if(s.url){throw new Error("Support for url field in sections not implemented.")}var offset=util.getArg(s,"offset");var offsetLine=util.getArg(offset,"line");var offsetColumn=util.getArg(offset,"column");if(offsetLine0&&aGenerated.column>=0&&!aOriginal&&!aSource&&!aName){return}else if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aOriginal&&"line"in aOriginal&&"column"in aOriginal&&aGenerated.line>0&&aGenerated.column>=0&&aOriginal.line>0&&aOriginal.column>=0&&aSource){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:aGenerated,source:aSource,original:aOriginal,name:aName}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var previousGeneratedColumn=0;var previousGeneratedLine=1;var previousOriginalColumn=0;var previousOriginalLine=0;var previousName=0;var previousSource=0;var result="";var mapping;var mappings=this._mappings.toArray();for(var i=0,len=mappings.length;i0){if(!util.compareByGeneratedPositions(mapping,mappings[i-1])){continue}result+=","}}result+=base64VLQ.encode(mapping.generatedColumn-previousGeneratedColumn);previousGeneratedColumn=mapping.generatedColumn;if(mapping.source!=null){result+=base64VLQ.encode(this._sources.indexOf(mapping.source)-previousSource);previousSource=this._sources.indexOf(mapping.source);result+=base64VLQ.encode(mapping.originalLine-1-previousOriginalLine);previousOriginalLine=mapping.originalLine-1;result+=base64VLQ.encode(mapping.originalColumn-previousOriginalColumn);previousOriginalColumn=mapping.originalColumn;if(mapping.name!=null){result+=base64VLQ.encode(this._names.indexOf(mapping.name)-previousName);previousName=this._names.indexOf(mapping.name)}}}return result};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(aSources,aSourceRoot){return aSources.map(function(source){if(!this._sourcesContents){return null}if(aSourceRoot!=null){source=util.relative(aSourceRoot,source)}var key=util.toSetString(source);return Object.prototype.hasOwnProperty.call(this._sourcesContents,key)?this._sourcesContents[key]:null},this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var map={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){map.file=this._file}if(this._sourceRoot!=null){map.sourceRoot=this._sourceRoot}if(this._sourcesContents){map.sourcesContent=this._generateSourcesContent(map.sources,map.sourceRoot)}return map};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};exports.SourceMapGenerator=SourceMapGenerator})},{"./array-set":494,"./base64-vlq":495,"./mapping-list":498,"./util":502,amdefine:503}],501:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var SourceMapGenerator=require("./source-map-generator").SourceMapGenerator;var util=require("./util");var REGEX_NEWLINE=/(\r?\n)/;var NEWLINE_CODE=10;var isSourceNode="$$$isSourceNode$$$";function SourceNode(aLine,aColumn,aSource,aChunks,aName){this.children=[];this.sourceContents={};this.line=aLine==null?null:aLine;this.column=aColumn==null?null:aColumn;this.source=aSource==null?null:aSource;this.name=aName==null?null:aName;this[isSourceNode]=true;if(aChunks!=null)this.add(aChunks)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(aGeneratedCode,aSourceMapConsumer,aRelativePath){var node=new SourceNode;var remainingLines=aGeneratedCode.split(REGEX_NEWLINE);var shiftNextLine=function(){var lineContents=remainingLines.shift();var newLine=remainingLines.shift()||"";return lineContents+newLine};var lastGeneratedLine=1,lastGeneratedColumn=0;var lastMapping=null;aSourceMapConsumer.eachMapping(function(mapping){if(lastMapping!==null){if(lastGeneratedLine0){if(lastMapping){addMappingWithCode(lastMapping,shiftNextLine())}node.add(remainingLines.join(""))}aSourceMapConsumer.sources.forEach(function(sourceFile){var content=aSourceMapConsumer.sourceContentFor(sourceFile);if(content!=null){if(aRelativePath!=null){sourceFile=util.join(aRelativePath,sourceFile)}node.setSourceContent(sourceFile,content)}});return node;function addMappingWithCode(mapping,code){if(mapping===null||mapping.source===undefined){node.add(code)}else{var source=aRelativePath?util.join(aRelativePath,mapping.source):mapping.source;node.add(new SourceNode(mapping.originalLine,mapping.originalColumn,source,code,mapping.name))}}};SourceNode.prototype.add=function SourceNode_add(aChunk){if(Array.isArray(aChunk)){aChunk.forEach(function(chunk){this.add(chunk)},this)}else if(aChunk[isSourceNode]||typeof aChunk==="string"){if(aChunk){this.children.push(aChunk)}}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.prepend=function SourceNode_prepend(aChunk){if(Array.isArray(aChunk)){for(var i=aChunk.length-1;i>=0;i--){this.prepend(aChunk[i])}}else if(aChunk[isSourceNode]||typeof aChunk==="string"){this.children.unshift(aChunk)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.walk=function SourceNode_walk(aFn){var chunk;for(var i=0,len=this.children.length;i0){newChildren=[];for(i=0;i=0;i--){part=parts[i];if(part==="."){parts.splice(i,1)}else if(part===".."){up++}else if(up>0){if(part===""){parts.splice(i+1,up);up=0}else{parts.splice(i,2);up--}}}path=parts.join("/");if(path===""){path=isAbsolute?"/":"."}if(url){url.path=path;return urlGenerate(url)}return path}exports.normalize=normalize;function join(aRoot,aPath){if(aRoot===""){aRoot="."}if(aPath===""){aPath="."}var aPathUrl=urlParse(aPath);var aRootUrl=urlParse(aRoot);if(aRootUrl){aRoot=aRootUrl.path||"/"}if(aPathUrl&&!aPathUrl.scheme){if(aRootUrl){aPathUrl.scheme=aRootUrl.scheme}return urlGenerate(aPathUrl)}if(aPathUrl||aPath.match(dataUrlRegexp)){return aPath}if(aRootUrl&&!aRootUrl.host&&!aRootUrl.path){aRootUrl.host=aPath;return urlGenerate(aRootUrl)}var joined=aPath.charAt(0)==="/"?aPath:normalize(aRoot.replace(/\/+$/,"")+"/"+aPath);if(aRootUrl){aRootUrl.path=joined;return urlGenerate(aRootUrl)}return joined}exports.join=join;function relative(aRoot,aPath){if(aRoot===""){aRoot="."}aRoot=aRoot.replace(/\/$/,"");var url=urlParse(aRoot);if(aPath.charAt(0)=="/"&&url&&url.path=="/"){return aPath.slice(1)}return aPath.indexOf(aRoot+"/")===0?aPath.substr(aRoot.length+1):aPath}exports.relative=relative;function toSetString(aStr){return"$"+aStr}exports.toSetString=toSetString;function fromSetString(aStr){return aStr.substr(1)}exports.fromSetString=fromSetString;function strcmp(aStr1,aStr2){var s1=aStr1||"";var s2=aStr2||"";return(s1>s2)-(s10){ary.splice(i-1,2);i-=2}}}}function normalize(name,baseName){var baseParts;if(name&&name.charAt(0)==="."){if(baseName){baseParts=baseName.split("/");baseParts=baseParts.slice(0,baseParts.length-1);baseParts=baseParts.concat(name.split("/"));trimDots(baseParts);name=baseParts.join("/")}}return name}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(id){function load(value){loaderCache[id]=value}load.fromText=function(id,text){throw new Error("amdefine does not implement load.fromText")};return load}makeRequire=function(systemRequire,exports,module,relId){function amdRequire(deps,callback){if(typeof deps==="string"){return stringRequire(systemRequire,exports,module,deps,relId)}else{deps=deps.map(function(depName){return stringRequire(systemRequire,exports,module,depName,relId)});process.nextTick(function(){callback.apply(null,deps)})}}amdRequire.toUrl=function(filePath){if(filePath.indexOf(".")===0){return normalize(filePath,path.dirname(module.filename))}else{return filePath}};return amdRequire};requireFn=requireFn||function req(){return module.require.apply(module,arguments)};function runFactory(id,deps,factory){var r,e,m,result;if(id){e=loaderCache[id]={};m={id:id,uri:__filename,exports:e};r=makeRequire(requireFn,e,m,id)}else{if(alreadyCalled){throw new Error("amdefine with no module ID cannot be called more than once per file.")}alreadyCalled=true;e=module.exports;m=module;r=makeRequire(requireFn,e,m,module.id)}if(deps){deps=deps.map(function(depName){return r(depName)})}if(typeof factory==="function"){result=factory.apply(m.exports,deps)}else{result=factory}if(result!==undefined){m.exports=result;if(id){loaderCache[id]=m.exports}}}stringRequire=function(systemRequire,exports,module,id,relId){var index=id.indexOf("!"),originalId=id,prefix,plugin;if(index===-1){id=normalize(id,relId);if(id==="require"){return makeRequire(systemRequire,exports,module,relId)}else if(id==="exports"){return exports}else if(id==="module"){return module}else if(loaderCache.hasOwnProperty(id)){return loaderCache[id]}else if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}else{if(systemRequire){return systemRequire(originalId)}else{throw new Error("No module with ID: "+id)}}}else{prefix=id.substring(0,index);id=id.substring(index+1,id.length);plugin=stringRequire(systemRequire,exports,module,prefix,relId);if(plugin.normalize){id=plugin.normalize(id,makeNormalize(relId))}else{id=normalize(id,relId)}if(loaderCache[id]){return loaderCache[id]}else{plugin.load(id,makeRequire(systemRequire,exports,module,relId),makeLoad(id),{});return loaderCache[id]}}};function define(id,deps,factory){if(Array.isArray(id)){factory=deps;deps=id;id=undefined}else if(typeof id!=="string"){factory=id;id=deps=undefined}if(deps&&!Array.isArray(deps)){factory=deps;deps=undefined}if(!deps){deps=["require","exports","module"]}if(id){defineCache[id]=[id,deps,factory]}else{runFactory(id,deps,factory)}}define.require=function(id){if(loaderCache[id]){return loaderCache[id]}if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}};define.amd={};return define}module.exports=amdefine}).call(this,require("_process"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{_process:213,path:212}],504:[function(require,module,exports){(function(){"use strict";function stripJsonComments(str){var currentChar;var nextChar;var insideString=false;var insideComment=false;var ret="";for(var i=0;i",homepage:"https://babeljs.io/",license:"MIT",repository:"babel/babel",main:"lib/babel/api/node.js",browser:{"./lib/babel/api/register/node.js":"./lib/babel/api/register/browser.js"},keywords:["harmony","classes","modules","let","const","var","es6","transpile","transpiler","6to5","babel"],scripts:{bench:"make bench",test:"make test"},dependencies:{"acorn-jsx":"^1.0.0","ast-types":"~0.7.0",bluebird:"^2.9.25",chalk:"^1.0.0","convert-source-map":"^1.1.0","core-js":"^0.9.0",debug:"^2.1.1","detect-indent":"^3.0.0",esquery:"^0.4.0",estraverse:"^4.0.0",esutils:"^2.0.0","fs-readdir-recursive":"^0.1.0",globals:"^6.4.0","home-or-tmp":"^1.0.0","is-integer":"^1.0.4","js-tokens":"1.0.0",leven:"^1.0.1","line-numbers":"0.2.0",lodash:"^3.6.0",minimatch:"^2.0.3","output-file-sync":"^1.1.0","path-is-absolute":"^1.0.0","private":"^0.1.6",regenerator:"0.8.28",regexpu:"^1.1.2",repeating:"^1.1.2",resolve:"^1.1.6","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.4.0","source-map-support":"^0.2.10","strip-json-comments":"^1.0.2","to-fast-properties":"^1.0.0","trim-right":"^1.0.0"},devDependencies:{babel:"5.3.1",browserify:"^9.0.8",chai:"^2.2.0",eslint:"^0.21.2","babel-eslint":"^3.1.9",esvalid:"^1.1.0",istanbul:"^0.3.5",matcha:"^0.6.0",mocha:"2.2.0",rimraf:"^2.3.2","uglify-js":"^2.4.16"}}},{}],508:[function(require,module,exports){module.exports={"abstract-expression-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"abstract-expression-delete":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceDelete",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"abstract-expression-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceGet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"abstract-expression-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"PROPERTY",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"referenceSet",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"array-comprehension-container":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"array-from":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"array-push":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"STATEMENT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},call:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"CONTEXT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"class-decorator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"DECORATOR",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"CLASS_REF",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"class-super-constructor-call-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"class-super-constructor-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"class-super-native-constructor-call":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"NATIVE_REF",type:"Identifier",end:null},init:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"SUPER_NAME",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},type:"SpreadElement",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"NATIVE_REF",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__proto__",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CLASS_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"NATIVE_REF",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"default-parameter-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"DEFAULT_VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"default-parameter":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"DEFAULT_VALUE",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARGUMENT_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"let",type:"VariableDeclaration",end:null,_paths:null}],type:"Program",end:null,_paths:null},"exports-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"exports-default-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"VALUE",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"exports-from-assign":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},value:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"INIT",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"exports-module-declaration-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"exports-module-declaration":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},{start:null,loc:null,range:null,value:"__esModule",raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"for-of-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARR",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"for-of-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null +},init:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},init:{loc:null,start:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:null,update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"IS_ARRAY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},operator:">=",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"LOOP_OBJECT",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ID",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"INDEX",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"for-of":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"OBJECT",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"STEP_KEY",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[],type:"BlockStatement",end:null},type:"ForStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"CatchClause",end:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{start:null,loc:null,range:null,name:"ITERATOR_COMPLETION",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ITERATOR_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"ITERATOR_ERROR_KEY",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"TryStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-async-to-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"fn",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"next",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},{start:null,loc:null,range:null,value:"throw",raw:null,type:"Literal",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"step",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"gen",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arg",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"reject",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"error",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:null,type:"ReturnStatement",end:null}],type:"BlockStatement",end:null,_paths:null},type:"CatchClause",end:null,_paths:null},guardedHandlers:[],finalizer:null,type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"info",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Promise",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"resolve",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"then",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"callThrow",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"callNext",type:"Identifier",end:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-bind":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Function",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"bind",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-class-call-check":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"instance",type:"Identifier",end:null},operator:"instanceof",right:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"BinaryExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot call a class as a function",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-create-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-create-decorated-class":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration", + end:null,_paths:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,leadingComments:null,_paths:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"||",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"The decorator for method ",raw:null,type:"Literal",end:null},operator:"+",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,value:" is of the invalid type ",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"initializers",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"protoProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"protoInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"staticInitializers",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"Constructor",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-create-decorated-object":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,leadingComments:null,_paths:null},{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,operator:"delete",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"decorators",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"f",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},type:"LogicalExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"The decorator for method ",raw:null,type:"Literal",end:null},operator:"+",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,value:" is of the invalid type ",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"decorator",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-default-props":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"defaultProps",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"propName",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForInStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"props",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-defaults":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null, + loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyNames",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"defaults",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-define-decorated-property-descriptor":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_descriptor",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptors",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{start:null,loc:null,range:null,name:"_descriptor",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:null,type:"ReturnStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,leadingComments:null,_paths:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_key",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"_descriptor",type:"Identifier",end:null},body:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"_key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"_key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForInStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"initializer",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,leadingComments:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"descriptor",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-define-property":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-extends":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"assign",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"||",right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:1,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"source",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForInStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-get":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"get",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"getter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-has-own":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-inherits":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"Super expression must either be null or a function, not ",raw:null,type:"Literal",end:null},operator:"+",right:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"create",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"enumerable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"configurable",type:"Identifier",end:null},value:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"subClass",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__proto__",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"superClass",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-instanceof":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"left",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"right",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"right",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"right",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"hasInstance",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"right",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"hasInstance",type:"Identifier",end:null},computed:false,type:"MemberExpression", + end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"left",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"left",type:"Identifier",end:null},operator:"instanceof",right:{start:null,loc:null,range:null,name:"right",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-interop-require-default":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},value:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-interop-require-wildcard":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"newObj",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"!=",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"newObj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"key",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForInStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"newObj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"newObj",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-interop-require":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},alternate:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-object-destructuring-empty":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Cannot destructure undefined",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-object-without-properties":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,left:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"keys",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"indexOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},operator:">=",right:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"hasOwnProperty",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"ContinueStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForInStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"target",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-self-global":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"self",type:"Identifier",end:null},alternate:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},type:"ConditionalExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-set":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getOwnPropertyDescriptor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"getPrototypeOf",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"object",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,value:null,raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"parent",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"property",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,value:"value",raw:null,type:"Literal",end:null},operator:"in",right:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"writable",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"desc",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"set",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},operator:"!==",right:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"setter",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"call",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"receiver",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-slice":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"slice",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-sliced-to-array-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_iterator",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_step",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-sliced-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"in",right:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},init:{start:null,loc:null,range:null,elements:[],type:"ArrayExpression",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,leadingComments:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null, + loc:null,range:null,id:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:false,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"undefined",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"iterator",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},init:null,type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},right:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"next",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},property:{start:null,loc:null,range:null,name:"done",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,parenthesizedExpression:true,_paths:null},type:"UnaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"push",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_s",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,label:null,type:"BreakStatement",end:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},handler:{start:null,loc:null,range:null,param:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},guard:null,body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},right:{start:null,loc:null,range:null,name:"err",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"CatchClause",end:null,_paths:null},guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,block:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"!",prefix:true,argument:{start:null,loc:null,range:null,name:"_n",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"_i",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"return",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},handler:null,guardedHandlers:[],finalizer:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"_d",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_e",type:"Identifier",end:null},type:"ThrowStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"TryStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"TryStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"_arr",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"TypeError",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,type:"Literal",end:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-tagged-template-literal-loose":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-tagged-template-literal":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"defineProperties",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"strings",type:"Identifier",end:null},{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"value",type:"Identifier",end:null},value:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Object",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"freeze",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"raw",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null,_paths:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-temporal-assert-defined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"val",type:"Identifier",end:null},operator:"===",right:{start:null,loc:null,range:null,name:"undef",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,callee:{start:null,loc:null,range:null,name:"ReferenceError",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"name",type:"Identifier",end:null},operator:"+",right:{start:null,loc:null,range:null,value:" is not defined - temporal dead zone",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null}],type:"NewExpression",end:null,_paths:null},type:"ThrowStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-temporal-undefined":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null,parenthesizedExpression:true},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-to-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},alternate:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-to-consumable-array":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"isArray",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:0,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},operator:"<",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"i",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"arr2",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"from",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"arr",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"helper-typeof":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},operator:"&&",right:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"constructor",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,name:"Symbol",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,value:"symbol",raw:null,type:"Literal",end:null},alternate:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"obj",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},type:"ConditionalExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"let-scoping-return":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"RETURN",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"v",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null},alternate:null,type:"IfStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"named-function":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"GET_OUTER_ID",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"property-method-assignment-wrapper-generator":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:true,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,delegate:true,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"YieldExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"property-method-assignment-wrapper":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"apply",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,type:"ThisExpression",end:null},{start:null,loc:null,range:null,name:"arguments",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"FUNCTION_KEY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"toString",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[],type:"CallExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},arguments:[{start:null,loc:null,range:null,name:"FUNCTION",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"prototype-identifier":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"CLASS_NAME",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"prototype",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"require-assign-key":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"VARIABLE_NAME",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null}],type:"Program",end:null,_paths:null},require:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"require",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},rest:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,init:{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},init:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"length",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},init:{loc:null,start:null,range:null,callee:{ + start:null,loc:null,range:null,name:"Array",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"ARRAY_LEN",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null},{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},init:{start:null,loc:null,range:null,name:"START",type:"Identifier",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},operator:"<",right:{start:null,loc:null,range:null,name:"LEN",type:"Identifier",end:null},type:"BinaryExpression",end:null,_paths:null},update:{loc:null,start:null,range:null,operator:"++",prefix:false,argument:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},type:"UpdateExpression",end:null,_paths:null},body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARRAY",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"ARRAY_KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"ARGUMENTS",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"KEY",type:"Identifier",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"ForStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"self-contained-helpers-head":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,value:"default",raw:null,type:"Literal",end:null},computed:true,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,name:"HELPER",type:"Identifier",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"__esModule",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},system:{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"System",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"register",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},arguments:[{start:null,loc:null,range:null,name:"MODULE_NAME",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"MODULE_DEPENDENCIES",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"EXPORT_IDENTIFIER",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,argument:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"setters",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"SETTERS",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null},{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"execute",type:"Identifier",end:null},value:{start:null,loc:null,range:null,name:"EXECUTE",type:"Identifier",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null,_paths:null},type:"ReturnStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"tail-call-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},init:{start:null,loc:null,range:null,value:true,raw:null,type:"Literal",end:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,body:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"AGAIN_ID",type:"Identifier",end:null},body:{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"BLOCK",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null},type:"WhileStatement",end:null,_paths:null},label:{start:null,loc:null,range:null,name:"FUNCTION_ID",type:"Identifier",end:null},type:"LabeledStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"test-exports":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"test-module":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"module",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"!==",right:{start:null,loc:null,range:null,value:"undefined",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"umd-commonjs-strict":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"root",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"object",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"BROWSER_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},arguments:[{start:null,loc:null,range:null,name:"UMD_ROOT",type:"Identifier",end:null},{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"FACTORY_PARAMETERS",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,name:"FACTORY_BODY",type:"Identifier",end:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,_paths:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null},"umd-runner-body":{loc:null,start:null,range:null,body:[{start:null,loc:null,range:null,expression:{start:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],body:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,test:{loc:null,start:null,range:null,left:{loc:null,start:null,range:null,left:{start:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},type:"UnaryExpression",end:null,_paths:null},operator:"===",right:{start:null,loc:null,range:null,value:"function",raw:null,type:"Literal",end:null},type:"BinaryExpression",end:null,_paths:null},operator:"&&",right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"amd",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"LogicalExpression",end:null,_paths:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"define",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"AMD_ARGUMENTS",type:"Identifier",end:null},{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,test:{start:null,loc:null,range:null,name:"COMMON_TEST",type:"Identifier",end:null},consequent:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{start:null,loc:null,range:null,name:"COMMON_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},alternate:{start:null,loc:null,range:null,body:[{start:null,loc:null,range:null,declarations:[{start:null,loc:null,range:null,id:{start:null,loc:null,range:null,name:"mod",type:"Identifier",end:null},init:{start:null,loc:null,range:null,properties:[{start:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},value:{start:null,loc:null,range:null,properties:[],type:"ObjectExpression",end:null},kind:"init",type:"Property",end:null,_paths:null}],type:"ObjectExpression",end:null,_paths:null},type:"VariableDeclarator",end:null,_paths:null}],kind:"var",type:"VariableDeclaration",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,callee:{start:null,loc:null,range:null,name:"factory",type:"Identifier",end:null},arguments:[{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"mod",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},{start:null,loc:null,range:null,name:"BROWSER_ARGUMENTS",type:"Identifier",end:null}],type:"CallExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null},{start:null,loc:null,range:null,expression:{loc:null,start:null,range:null,operator:"=",left:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"global",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"GLOBAL_ARG",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},right:{loc:null,start:null,range:null,object:{start:null,loc:null,range:null,name:"mod",type:"Identifier",end:null},property:{start:null,loc:null,range:null,name:"exports",type:"Identifier",end:null},computed:false,type:"MemberExpression",end:null,_paths:null},type:"AssignmentExpression",end:null,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null},type:"IfStatement",end:null,_paths:null}],type:"BlockStatement",end:null,_paths:null},type:"FunctionExpression",end:null,parenthesizedExpression:true,_paths:null},type:"ExpressionStatement",end:null,_paths:null}],type:"Program",end:null,_paths:null}}},{}]},{},[19])(19)}); diff --git a/external-helpers.js b/external-helpers.js index 3b76720..adfd29b 100644 --- a/external-helpers.js +++ b/external-helpers.js @@ -73,7 +73,10 @@ } } - if (initializers) initializers[key] = descriptor.initializer; + if (descriptor.initializer !== undefined) { + initializers[key] = descriptor; + continue; + } } Object.defineProperty(target, key, descriptor); @@ -87,6 +90,52 @@ }; })(); + babelHelpers.createDecoratedObject = function (descriptors) { + var target = {}; + + for (var i = 0; i < descriptors.length; i++) { + var descriptor = descriptors[i]; + var decorators = descriptor.decorators; + var key = descriptor.key; + delete descriptor.key; + delete descriptor.decorators; + descriptor.enumerable = true; + descriptor.configurable = true; + descriptor.writable = true; + + if (decorators) { + for (var f = 0; f < decorators.length; f++) { + var decorator = decorators[f]; + + if (typeof decorator === "function") { + descriptor = decorator(target, key, descriptor) || descriptor; + } else { + throw new TypeError("The decorator for method " + descriptor.key + " is of the invalid type " + typeof decorator); + } + } + } + + if (descriptor.initializer) { + descriptor.value = descriptor.initializer.call(target); + } + + Object.defineProperty(target, key, descriptor); + } + + return target; + }; + + babelHelpers.defineDecoratedPropertyDescriptor = function (target, key, descriptors) { + var _descriptor = descriptors[key]; + if (!_descriptor) return; + var descriptor = {}; + + for (var _key in _descriptor) descriptor[_key] = _descriptor[_key]; + + descriptor.value = descriptor.initializer.call(target); + Object.defineProperty(target, key, descriptor); + }; + babelHelpers.taggedTemplateLiteral = function (strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { @@ -100,10 +149,6 @@ return strings; }; - babelHelpers.interopRequire = function (obj) { - return obj && obj.__esModule ? obj["default"] : obj; - }; - babelHelpers.toArray = function (arr) { return Array.isArray(arr) ? arr : Array.from(arr); }; @@ -187,7 +232,7 @@ babelHelpers.defineProperty = function (obj, key, value) { return Object.defineProperty(obj, key, { value: value, - enumerable: key == null || typeof Symbol == "undefined" || key.constructor !== Symbol, + enumerable: true, configurable: true, writable: true }); @@ -222,6 +267,23 @@ }; babelHelpers.interopRequireWildcard = function (obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj["default"] = obj; + return newObj; + } + }; + + babelHelpers.interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; @@ -232,18 +294,18 @@ }; babelHelpers._extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } } - } - } - return target; - }; + return target; + }; babelHelpers.get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); @@ -324,4 +386,16 @@ return props; }; + + babelHelpers._instanceof = function (left, right) { + if (right != null && right[Symbol.hasInstance]) { + return right[Symbol.hasInstance](left); + } else { + return left instanceof right; + } + }; + + babelHelpers.interopRequire = function (obj) { + return obj && obj.__esModule ? obj["default"] : obj; + }; })(typeof global === "undefined" ? self : global); diff --git a/external-helpers.min.js b/external-helpers.min.js index 7dcfec4..f410292 100644 --- a/external-helpers.min.js +++ b/external-helpers.min.js @@ -1 +1 @@ -(function(global){var babelHelpers=global.babelHelpers={};babelHelpers.inherits=function(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)subClass.__proto__=superClass};babelHelpers.defaults=function(obj,defaults){var keys=Object.getOwnPropertyNames(defaults);for(var i=0;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i]}return target};babelHelpers.hasOwn=Object.prototype.hasOwnProperty;babelHelpers.slice=Array.prototype.slice;babelHelpers.bind=Function.prototype.bind;babelHelpers.defineProperty=function(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:key==null||typeof Symbol=="undefined"||key.constructor!==Symbol,configurable:true,writable:true})};babelHelpers.asyncToGenerator=function(fn){return function(){var gen=fn.apply(this,arguments);return new Promise(function(resolve,reject){var callNext=step.bind(null,"next");var callThrow=step.bind(null,"throw");function step(key,arg){try{var info=gen[key](arg);var value=info.value}catch(error){reject(error);return}if(info.done){resolve(value)}else{Promise.resolve(value).then(callNext,callThrow)}}callNext()})}};babelHelpers.interopRequireWildcard=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};babelHelpers._typeof=function(obj){return obj&&obj.constructor===Symbol?"symbol":typeof obj};babelHelpers._extends=Object.assign||function(target){for(var i=1;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i]}return target};babelHelpers.hasOwn=Object.prototype.hasOwnProperty;babelHelpers.slice=Array.prototype.slice;babelHelpers.bind=Function.prototype.bind;babelHelpers.defineProperty=function(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})};babelHelpers.asyncToGenerator=function(fn){return function(){var gen=fn.apply(this,arguments);return new Promise(function(resolve,reject){var callNext=step.bind(null,"next");var callThrow=step.bind(null,"throw");function step(key,arg){try{var info=gen[key](arg);var value=info.value}catch(error){reject(error);return}if(info.done){resolve(value)}else{Promise.resolve(value).then(callNext,callThrow)}}callNext()})}};babelHelpers.interopRequireWildcard=function(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}};babelHelpers.interopRequireDefault=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};babelHelpers._typeof=function(obj){return obj&&obj.constructor===Symbol?"symbol":typeof obj};babelHelpers._extends=Object.assign||function(target){for(var i=1;i Date: Mon, 8 Jun 2015 16:39:06 +0100 Subject: [PATCH 05/19] updated README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e00086a..74964f1 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Installation ``` $ npm install -g bower - $ bower install requirejs-babel + $ bower install https://github.com/hipertracker/requirejs-babel ``` Usage @@ -18,8 +18,8 @@ Add the paths to configuration: ```javascript paths: { - es6: '...path_to_bower/requirejse-babel/es6', - babel: '...path_to_bower/requirejse-babel/babel-4.6.6.min' + es6: '...path_to_bower/requirejs-babel/es6', + babel: '...path_to_bower/requirejs-babel/babel.min' } ``` From a9bf3191af829e992ca6cecf923deb6a669d0bb9 Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Tue, 9 Jun 2015 15:25:28 +0100 Subject: [PATCH 06/19] added stage=1 for babel --- es6.js | 3 ++- package.json | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/es6.js b/es6.js index 7b600bb..f5a8f03 100644 --- a/es6.js +++ b/es6.js @@ -43,7 +43,8 @@ define([ var code = babel.transform(text, { modules: 'amd', sourceMap: config.isBuild ? false :'inline', - sourceFileName: name + sourceFileName: name, + stage: 1 }).code; if (config.isBuild) { diff --git a/package.json b/package.json index 2a0d6b7..7452467 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,17 @@ { "name": "requirejs-babel", - "version": "0.0.6", + "version": "0.1.0", "description": "An AMD loader plugin for Babel", "repository": { "type": "git", - "url": "https://github.com/mikach/requirejs-babel" + "url": "https://github.com/hipertracker/requirejs-babel" }, "main": "index.js", "scripts": { "optimize": "r.js -o demo/build.config.js", "test": "echo \"Error: no test specified\" && exit 1" }, - "author": "Michael ", + "author": "Jaroslaw Zabiello ", "license": "MIT", "devDependencies": { "requirejs": "^2.1.18" From f0c3954db28acefff5a66f38339c51e94d2ae636 Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Wed, 10 Jun 2015 16:44:25 +0100 Subject: [PATCH 07/19] Update es6.js --- es6.js | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/es6.js b/es6.js index f5a8f03..6407fda 100644 --- a/es6.js +++ b/es6.js @@ -27,31 +27,42 @@ if (typeof window !== "undefined" && window.navigator && window.document) { define([ //>>excludeStart('excludeBabel', pragmas.excludeBabel) - 'babel' + 'babel', //>>excludeEnd('excludeBabel') + 'module' ], function( //>>excludeStart('excludeBabel', pragmas.excludeBabel) - babel + babel, //>>excludeEnd('excludeBabel') + _module ) { return { load: function (name, req, onload, config) { //>>excludeStart('excludeBabel', pragmas.excludeBabel) - var url = req.toUrl(name + '.js'); - - fetchText(url, function (text) { - var code = babel.transform(text, { + function applyOptions(options) { + var defaults = { modules: 'amd', sourceMap: config.isBuild ? false :'inline', sourceFileName: name, stage: 1 - }).code; + }; + for(var key in options) { + if(options.hasOwnProperty(key)) { + defaults[key] = options[key]; + } + } + return defaults; + } + var url = req.toUrl(name + '.js'); + + fetchText(url, function (text) { + var code = babel.transform(text, applyOptions(_module.config())).code; if (config.isBuild) { _buildMap[name] = code; } - onload.fromText(code); + onload.fromText(code); }); //>>excludeEnd('excludeBabel') }, From 5d87156a810cb1a58a35caa61d945d9531ce5d02 Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Wed, 10 Jun 2015 16:44:43 +0100 Subject: [PATCH 08/19] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7452467..a5a093f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "requirejs-babel", - "version": "0.1.0", + "version": "0.1.1", "description": "An AMD loader plugin for Babel", "repository": { "type": "git", From 177d12ed8c4fadb48a84d9e0d299b7c2646b8547 Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Thu, 25 Jun 2015 10:12:25 +0100 Subject: [PATCH 09/19] upgraded to Babel 5.6.7 --- babel.js | 64047 ----------------------- babel.min.js | 62 - bower.json | 4 +- browser.js | 63303 ++++++++++++++++++++++ browser.min.js | 41 + demo/build.config.js | 4 +- demo/index-optimized.html | 4 +- demo/index.html | 4 +- demo/libs/{requirejs.js => require.js} | 18 +- demo/main-built.js | 14 +- external-helpers.js | 19 +- external-helpers.min.js | 2 +- node.js | 63208 ++++++++++++++++++++++ package.json | 2 +- polyfill.js | 5565 +- polyfill.min.js | 6 +- 16 files changed, 129707 insertions(+), 66596 deletions(-) delete mode 100644 babel.js delete mode 100644 babel.min.js create mode 100644 browser.js create mode 100644 browser.min.js rename demo/libs/{requirejs.js => require.js} (99%) create mode 100644 node.js diff --git a/babel.js b/babel.js deleted file mode 100644 index e9f0b57..0000000 --- a/babel.js +++ /dev/null @@ -1,64047 +0,0 @@ -(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.babel = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o")) { - node.params.push(this.flow_parseTypeAnnotatableIdentifier()); - if (!this.isRelational(">")) { - this.expect(tt.comma); - } - } - this.expectRelational(">"); - - return this.finishNode(node, "TypeParameterDeclaration"); - }; - - pp.flow_parseTypeParameterInstantiation = function () { - var node = this.startNode(), - oldInType = this.inType; - node.params = []; - - this.inType = true; - - this.expectRelational("<"); - while (!this.isRelational(">")) { - node.params.push(this.flow_parseType()); - if (!this.isRelational(">")) { - this.expect(tt.comma); - } - } - this.expectRelational(">"); - - this.inType = oldInType; - - return this.finishNode(node, "TypeParameterInstantiation"); - }; - - pp.flow_parseObjectPropertyKey = function () { - return this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); - }; - - pp.flow_parseObjectTypeIndexer = function (node, isStatic) { - node["static"] = isStatic; - - this.expect(tt.bracketL); - node.id = this.flow_parseObjectPropertyKey(); - this.expect(tt.colon); - node.key = this.flow_parseType(); - this.expect(tt.bracketR); - this.expect(tt.colon); - node.value = this.flow_parseType(); - - this.flow_objectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeIndexer"); - }; - - pp.flow_parseObjectTypeMethodish = function (node) { - node.params = []; - node.rest = null; - node.typeParameters = null; - - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - } - - this.expect(tt.parenL); - while (this.type === tt.name) { - node.params.push(this.flow_parseFunctionTypeParam()); - if (this.type !== tt.parenR) { - this.expect(tt.comma); - } - } - - if (this.eat(tt.ellipsis)) { - node.rest = this.flow_parseFunctionTypeParam(); - } - this.expect(tt.parenR); - this.expect(tt.colon); - node.returnType = this.flow_parseType(); - - return this.finishNode(node, "FunctionTypeAnnotation"); - }; - - pp.flow_parseObjectTypeMethod = function (start, isStatic, key) { - var node = this.startNodeAt(start); - node.value = this.flow_parseObjectTypeMethodish(this.startNodeAt(start)); - node["static"] = isStatic; - node.key = key; - node.optional = false; - this.flow_objectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeProperty"); - }; - - pp.flow_parseObjectTypeCallProperty = function (node, isStatic) { - var valueNode = this.startNode(); - node["static"] = isStatic; - node.value = this.flow_parseObjectTypeMethodish(valueNode); - this.flow_objectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeCallProperty"); - }; - - pp.flow_parseObjectType = function (allowStatic) { - var nodeStart = this.startNode(); - var node; - var optional = false; - var property; - var propertyKey; - var propertyTypeAnnotation; - var token; - var isStatic; - - nodeStart.callProperties = []; - nodeStart.properties = []; - nodeStart.indexers = []; - - this.expect(tt.braceL); - - while (this.type !== tt.braceR) { - var start = this.markPosition(); - node = this.startNode(); - if (allowStatic && this.isContextual("static")) { - this.next(); - isStatic = true; - } - - if (this.type === tt.bracketL) { - nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node, isStatic)); - } else if (this.type === tt.parenL || this.isRelational("<")) { - nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node, allowStatic)); - } else { - if (isStatic && this.type === tt.colon) { - propertyKey = this.parseIdent(); - } else { - propertyKey = this.flow_parseObjectPropertyKey(); - } - if (this.isRelational("<") || this.type === tt.parenL) { - // This is a method property - nodeStart.properties.push(this.flow_parseObjectTypeMethod(start, isStatic, propertyKey)); - } else { - if (this.eat(tt.question)) { - optional = true; - } - this.expect(tt.colon); - node.key = propertyKey; - node.value = this.flow_parseType(); - node.optional = optional; - node["static"] = isStatic; - this.flow_objectTypeSemicolon(); - nodeStart.properties.push(this.finishNode(node, "ObjectTypeProperty")); - } - } - } - - this.expect(tt.braceR); - - return this.finishNode(nodeStart, "ObjectTypeAnnotation"); - }; - - pp.flow_objectTypeSemicolon = function () { - if (!this.eat(tt.semi) && !this.eat(tt.comma) && this.type !== tt.braceR) { - this.unexpected(); - } - }; - - pp.flow_parseGenericType = function (start, id) { - var node = this.startNodeAt(start); - - node.typeParameters = null; - node.id = id; - - while (this.eat(tt.dot)) { - var node2 = this.startNodeAt(start); - node2.qualification = node.id; - node2.id = this.parseIdent(); - node.id = this.finishNode(node2, "QualifiedTypeIdentifier"); - } - - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterInstantiation(); - } - - return this.finishNode(node, "GenericTypeAnnotation"); - }; - - pp.flow_parseVoidType = function () { - var node = this.startNode(); - this.expect(tt._void); - return this.finishNode(node, "VoidTypeAnnotation"); - }; - - pp.flow_parseTypeofType = function () { - var node = this.startNode(); - this.expect(tt._typeof); - node.argument = this.flow_parsePrimaryType(); - return this.finishNode(node, "TypeofTypeAnnotation"); - }; - - pp.flow_parseTupleType = function () { - var node = this.startNode(); - node.types = []; - this.expect(tt.bracketL); - // We allow trailing commas - while (this.pos < this.input.length && this.type !== tt.bracketR) { - node.types.push(this.flow_parseType()); - if (this.type === tt.bracketR) break; - this.expect(tt.comma); - } - this.expect(tt.bracketR); - return this.finishNode(node, "TupleTypeAnnotation"); - }; - - pp.flow_parseFunctionTypeParam = function () { - var optional = false; - var node = this.startNode(); - node.name = this.parseIdent(); - if (this.eat(tt.question)) { - optional = true; - } - this.expect(tt.colon); - node.optional = optional; - node.typeAnnotation = this.flow_parseType(); - return this.finishNode(node, "FunctionTypeParam"); - }; - - pp.flow_parseFunctionTypeParams = function () { - var ret = { params: [], rest: null }; - while (this.type === tt.name) { - ret.params.push(this.flow_parseFunctionTypeParam()); - if (this.type !== tt.parenR) { - this.expect(tt.comma); - } - } - if (this.eat(tt.ellipsis)) { - ret.rest = this.flow_parseFunctionTypeParam(); - } - return ret; - }; - - pp.flow_identToTypeAnnotation = function (start, node, id) { - switch (id.name) { - case "any": - return this.finishNode(node, "AnyTypeAnnotation"); - - case "bool": - case "boolean": - return this.finishNode(node, "BooleanTypeAnnotation"); - - case "mixed": - return this.finishNode(node, "MixedTypeAnnotation"); - - case "number": - return this.finishNode(node, "NumberTypeAnnotation"); - - case "string": - return this.finishNode(node, "StringTypeAnnotation"); - - default: - return this.flow_parseGenericType(start, id); - } - }; - -// The parsing of types roughly parallels the parsing of expressions, and -// primary types are kind of like primary expressions...they're the -// primitives with which other types are constructed. - pp.flow_parsePrimaryType = function () { - var typeIdentifier = null; - var params = null; - var returnType = null; - var start = this.markPosition(); - var node = this.startNode(); - var rest = null; - var tmp; - var typeParameters; - var token; - var type; - var isGroupedType = false; - - switch (this.type) { - case tt.name: - return this.flow_identToTypeAnnotation(start, node, this.parseIdent()); - - case tt.braceL: - return this.flow_parseObjectType(); - - case tt.bracketL: - return this.flow_parseTupleType(); - - case tt.relational: - if (this.value === "<") { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - this.expect(tt.parenL); - tmp = this.flow_parseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(tt.parenR); - - this.expect(tt.arrow); - - node.returnType = this.flow_parseType(); - - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - case tt.parenL: - this.next(); - - // Check to see if this is actually a grouped type - if (this.type !== tt.parenR && this.type !== tt.ellipsis) { - if (this.type === tt.name) { - var token = this.lookahead().type; - isGroupedType = token !== tt.question && token !== tt.colon; - } else { - isGroupedType = true; - } - } - - if (isGroupedType) { - type = this.flow_parseType(); - this.expect(tt.parenR); - - // If we see a => next then someone was probably confused about - // function types, so we can provide a better error message - if (this.eat(tt.arrow)) { - this.raise(node, "Unexpected token =>. It looks like " + "you are trying to write a function type, but you ended up " + "writing a grouped type followed by an =>, which is a syntax " + "error. Remember, function type parameters are named so function " + "types look like (name1: type1, name2: type2) => returnType. You " + "probably wrote (type1) => returnType"); - } - - return type; - } - - tmp = this.flow_parseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - - this.expect(tt.parenR); - - this.expect(tt.arrow); - - node.returnType = this.flow_parseType(); - node.typeParameters = null; - - return this.finishNode(node, "FunctionTypeAnnotation"); - - case tt.string: - node.value = this.value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "StringLiteralTypeAnnotation"); - - default: - if (this.type.keyword) { - switch (this.type.keyword) { - case "void": - return this.flow_parseVoidType(); - - case "typeof": - return this.flow_parseTypeofType(); - } - } - } - - this.unexpected(); - }; - - pp.flow_parsePostfixType = function () { - var node = this.startNode(); - var type = node.elementType = this.flow_parsePrimaryType(); - if (this.type === tt.bracketL) { - this.expect(tt.bracketL); - this.expect(tt.bracketR); - return this.finishNode(node, "ArrayTypeAnnotation"); - } - return type; - }; - - pp.flow_parsePrefixType = function () { - var node = this.startNode(); - if (this.eat(tt.question)) { - node.typeAnnotation = this.flow_parsePrefixType(); - return this.finishNode(node, "NullableTypeAnnotation"); - } - return this.flow_parsePostfixType(); - }; - - pp.flow_parseIntersectionType = function () { - var node = this.startNode(); - var type = this.flow_parsePrefixType(); - node.types = [type]; - while (this.eat(tt.bitwiseAND)) { - node.types.push(this.flow_parsePrefixType()); - } - return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); - }; - - pp.flow_parseUnionType = function () { - var node = this.startNode(); - var type = this.flow_parseIntersectionType(); - node.types = [type]; - while (this.eat(tt.bitwiseOR)) { - node.types.push(this.flow_parseIntersectionType()); - } - return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); - }; - - pp.flow_parseType = function () { - var oldInType = this.inType; - this.inType = true; - var type = this.flow_parseUnionType(); - this.inType = oldInType; - return type; - }; - - pp.flow_parseTypeAnnotation = function () { - var node = this.startNode(); - - var oldInType = this.inType; - this.inType = true; - this.expect(tt.colon); - node.typeAnnotation = this.flow_parseType(); - this.inType = oldInType; - - return this.finishNode(node, "TypeAnnotation"); - }; - - pp.flow_parseTypeAnnotatableIdentifier = function (requireTypeAnnotation, canBeOptionalParam) { - var node = this.startNode(); - var ident = this.parseIdent(); - var isOptionalParam = false; - - if (canBeOptionalParam && this.eat(tt.question)) { - this.expect(tt.question); - isOptionalParam = true; - } - - if (requireTypeAnnotation || this.type === tt.colon) { - ident.typeAnnotation = this.flow_parseTypeAnnotation(); - this.finishNode(ident, ident.type); - } - - if (isOptionalParam) { - ident.optional = true; - this.finishNode(ident, ident.type); - } - - return ident; - }; - - acorn.plugins.flow = function (instance) { - // function name(): string {} - instance.extend("parseFunctionBody", function (inner) { - return function (node, allowExpression) { - if (this.type === tt.colon) { - node.returnType = this.flow_parseTypeAnnotation(); - } - - return inner.call(this, node, allowExpression); - }; - }); - - instance.extend("parseStatement", function (inner) { - return function (declaration, topLevel) { - // strict mode handling of `interface` since it's a reserved word - if (this.strict && this.type === tt.name && this.value === "interface") { - var node = this.startNode(); - this.next(); - return this.flow_parseInterface(node); - } else { - return inner.call(this, declaration, topLevel); - } - }; - }); - - instance.extend("parseExpressionStatement", function (inner) { - return function (node, expr) { - if (expr.type === "Identifier") { - if (expr.name === "declare") { - if (this.type === tt._class || this.type === tt.name || this.type === tt._function || this.type === tt._var) { - return this.flow_parseDeclare(node); - } - } else if (this.type === tt.name) { - if (expr.name === "interface") { - return this.flow_parseInterface(node); - } else if (expr.name === "type") { - return this.flow_parseTypeAlias(node); - } - } - } - - return inner.call(this, node, expr); - }; - }); - - instance.extend("shouldParseExportDeclaration", function (inner) { - return function () { - return this.isContextual("type") || inner.call(this); - }; - }); - - instance.extend("parseParenItem", function (inner) { - return function (node, start) { - if (this.type === tt.colon) { - var typeCastNode = this.startNodeAt(start); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.flow_parseTypeAnnotation(); - return this.finishNode(typeCastNode, "TypeCastExpression"); - } else { - return node; - } - }; - }); - - instance.extend("parseClassId", function (inner) { - return function (node, isStatement) { - inner.call(this, node, isStatement); - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - } - }; - }); - - instance.extend("readToken", function (inner) { - return function (code) { - if (this.inType && (code === 62 || code === 60)) { - return this.finishOp(tt.relational, 1); - } else { - return inner.call(this, code); - } - }; - }); - - instance.extend("jsx_readToken", function (inner) { - return function () { - if (!this.inType) return inner.call(this); - }; - }); - - instance.extend("parseParenArrowList", function (inner) { - return function (start, exprList, isAsync) { - for (var i = 0; i < exprList.length; i++) { - var listItem = exprList[i]; - if (listItem.type === "TypeCastExpression") { - var expr = listItem.expression; - expr.typeAnnotation = listItem.typeAnnotation; - exprList[i] = expr; - } - } - return inner.call(this, start, exprList, isAsync); - }; - }); - - instance.extend("parseClassProperty", function (inner) { - return function (node) { - if (this.type === tt.colon) { - node.typeAnnotation = this.flow_parseTypeAnnotation(); - } - return inner.call(this, node); - }; - }); - instance.extend("isClassProperty", function (inner) { - return function () { - return this.type === tt.colon || inner.call(this); - }; - }); - - instance.extend("parseClassMethod", function (inner) { - return function (classBody, method, isGenerator, isAsync) { - var typeParameters; - if (this.isRelational("<")) { - typeParameters = this.flow_parseTypeParameterDeclaration(); - } - method.value = this.parseMethod(isGenerator, isAsync); - method.value.typeParameters = typeParameters; - classBody.body.push(this.finishNode(method, "MethodDefinition")); - }; - }); - - instance.extend("parseClassSuper", function (inner) { - return function (node, isStatement) { - inner.call(this, node, isStatement); - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.flow_parseTypeParameterInstantiation(); - } - if (this.isContextual("implements")) { - this.next(); - var implemented = node["implements"] = []; - do { - var node = this.startNode(); - node.id = this.parseIdent(); - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - implemented.push(this.finishNode(node, "ClassImplements")); - } while (this.eat(tt.comma)); - } - }; - }); - - instance.extend("parseObjPropValue", function (inner) { - return function (prop) { - var typeParameters; - if (this.isRelational("<")) { - typeParameters = this.flow_parseTypeParameterDeclaration(); - if (this.type !== tt.parenL) this.unexpected(); - } - inner.apply(this, arguments); - prop.value.typeParameters = typeParameters; - }; - }); - - instance.extend("parseAssignableListItemTypes", function (inner) { - return function (param) { - if (this.eat(tt.question)) { - param.optional = true; - } - if (this.type === tt.colon) { - param.typeAnnotation = this.flow_parseTypeAnnotation(); - } - this.finishNode(param, param.type); - return param; - }; - }); - - instance.extend("parseImportSpecifiers", function (inner) { - return function (node) { - node.isType = false; - if (this.isContextual("type")) { - var start = this.markPosition(); - var typeId = this.parseIdent(); - if (this.type === tt.name && this.value !== "from" || this.type === tt.braceL || this.type === tt.star) { - node.isType = true; - } else { - node.specifiers.push(this.parseImportSpecifierDefault(typeId, start)); - if (this.isContextual("from")) return; - this.eat(tt.comma); - } - } - inner.call(this, node); - }; - }); - - // function foo() {} - instance.extend("parseFunctionParams", function (inner) { - return function (node) { - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - } - inner.call(this, node); - }; - }); - - // var foo: string = bar - instance.extend("parseVarHead", function (inner) { - return function (decl) { - inner.call(this, decl); - if (this.type === tt.colon) { - decl.id.typeAnnotation = this.flow_parseTypeAnnotation(); - this.finishNode(decl.id, decl.id.type); - } - }; - }); - }; -},{"../src/index":5}],3:[function(require,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[1]` means `!(x[1])` -// instead of `(!x)[1]` is handled by the fact that the parser -// function that parses unary prefix operators is called first, and -// in turn calls the function that parses `[]` subscripts — that -// way, it'll receive the node for `x[1]` already parsed, and wraps -// *that* in the unary operator node. -// -// Acorn uses an [operator precedence parser][opp] to handle binary -// operator precedence, because it is much more compact than using -// the technique outlined above, which uses different, nesting -// functions to specify precedence, for all of the ten binary -// precedence levels that JavaScript defines. -// -// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser - - "use strict"; - - var _tokentype = require("./tokentype"); - - var _state = require("./state"); - - var _identifier = require("./identifier"); - - var _util = require("./util"); - - 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) return; - var key = prop.key, - name = undefined; - switch (key.type) { - case "Identifier": - name = key.name;break; - case "Literal": - name = String(key.value);break; - default: - return; - } - var kind = prop.kind || "init", - other = undefined; - if ((0, _util.has)(propHash, name)) { - other = propHash[name]; - var isGetSet = kind !== "init"; - if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(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, refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - if (this.type === _tokentype.types.comma) { - var node = this.startNodeAt(start); - node.expressions = [expr]; - while (this.eat(_tokentype.types.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - return this.finishNode(node, "SequenceExpression"); - } - return expr; - }; - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - - pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { - if (this.type == _tokentype.types._yield && this.inGenerator) return this.parseYield(); - - var failOnShorthandAssign = undefined; - if (!refShorthandDefaultPos) { - refShorthandDefaultPos = { start: 0 }; - failOnShorthandAssign = true; - } else { - failOnShorthandAssign = false; - } - var start = this.markPosition(); - if (this.type == _tokentype.types.parenL || this.type == _tokentype.types.name) this.potentialArrowAt = this.start; - var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); - if (afterLeftParse) left = afterLeftParse.call(this, left, start); - if (this.type.isAssign) { - var node = this.startNodeAt(start); - node.operator = this.value; - node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left; - refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly - this.checkLVal(left); - if (left.parenthesizedExpression) { - var errorMsg = undefined; - if (left.type === "ObjectPattern") { - errorMsg = "`({a}) = 0` use `({a} = 0)`"; - } else if (left.type === "ArrayPattern") { - errorMsg = "`([a]) = 0` use `([a] = 0)`"; - } - if (errorMsg) { - this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg); - } - } - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - return left; - }; - -// Parse a ternary conditional (`?:`) operator. - - pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseExprOps(noIn, refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - if (this.eat(_tokentype.types.question)) { - var node = this.startNodeAt(start); - 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, refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseMaybeUnary(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseExprOp(expr, start, -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, leftStart, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== _tokentype.types._in)) { - if (prec > minPrec) { - var node = this.startNodeAt(leftStart); - node.left = left; - node.operator = this.value; - var op = this.type; - this.next(); - var _start = this.markPosition(); - node.right = this.parseExprOp(this.parseMaybeUnary(), _start, op.rightAssociative ? prec - 1 : prec, noIn); - this.finishNode(node, op === _tokentype.types.logicalOR || op === _tokentype.types.logicalAND ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(node, leftStart, minPrec, noIn); - } - } - return left; - }; - -// Parse unary operators, both prefix and postfix. - - pp.parseMaybeUnary = function (refShorthandDefaultPos) { - 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(); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); - return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } - var start = this.markPosition(); - var expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - while (this.type.postfix && !this.canInsertSemicolon()) { - var node = this.startNodeAt(start); - node.operator = this.value; - node.prefix = false; - node.argument = expr; - this.checkLVal(expr); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); - } - return expr; - }; - -// Parse call, dot, and `[]`-subscript expressions. - - pp.parseExprSubscripts = function (refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseExprAtom(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseSubscripts(expr, start); - }; - - pp.parseSubscripts = function (base, start, noCalls) { - if (!noCalls && this.eat(_tokentype.types.doubleColon)) { - var node = this.startNodeAt(start); - node.object = base; - node.callee = this.parseNoCallExpr(); - return this.parseSubscripts(this.finishNode(node, "BindExpression"), start, noCalls); - } else if (this.eat(_tokentype.types.dot)) { - var node = this.startNodeAt(start); - node.object = base; - node.property = this.parseIdent(true); - node.computed = false; - return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); - } else if (this.eat(_tokentype.types.bracketL)) { - var node = this.startNodeAt(start); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.expect(_tokentype.types.bracketR); - return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); - } else if (!noCalls && this.eat(_tokentype.types.parenL)) { - var node = this.startNodeAt(start); - node.callee = base; - node.arguments = this.parseExprList(_tokentype.types.parenR, this.options.features["es7.trailingFunctionCommas"]); - return this.parseSubscripts(this.finishNode(node, "CallExpression"), start, noCalls); - } else if (this.type === _tokentype.types.backQuote) { - var node = this.startNodeAt(start); - node.tag = base; - node.quasi = this.parseTemplate(); - return this.parseSubscripts(this.finishNode(node, "TaggedTemplateExpression"), start, noCalls); - }return base; - }; - -// Parse a no-call expression (like argument of `new` or `::` operators). - - pp.parseNoCallExpr = function () { - var start = this.markPosition(); - return this.parseSubscripts(this.parseExprAtom(), start, true); - }; - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - - pp.parseExprAtom = function (refShorthandDefaultPos) { - var node = undefined, - canBeArrow = this.potentialArrowAt == this.start; - switch (this.type) { - case _tokentype.types._this: - case _tokentype.types._super: - var type = this.type === _tokentype.types._this ? "ThisExpression" : "Super"; - node = this.startNode(); - this.next(); - return this.finishNode(node, type); - - case _tokentype.types._yield: - if (this.inGenerator) this.unexpected(); - - case _tokentype.types._do: - if (this.options.features["es7.doExpressions"]) { - var _node = this.startNode(); - this.next(); - var oldInFunction = this.inFunction; - var oldLabels = this.labels; - this.labels = []; - this.inFunction = false; - _node.body = this.parseBlock(); - this.inFunction = oldInFunction; - this.labels = oldLabels; - return this.finishNode(_node, "DoExpression"); - } - - case _tokentype.types.name: - var start = this.markPosition(); - node = this.startNode(); - var id = this.parseIdent(this.type !== _tokentype.types.name); - - // - if (this.options.features["es7.asyncFunctions"]) { - // async functions! - if (id.name === "async") { - // arrow functions - if (this.type === _tokentype.types.parenL) { - var expr = this.parseParenAndDistinguishExpression(start, true, true); - if (expr && expr.type === "ArrowFunctionExpression") { - return expr; - } else { - node.callee = id; - if (!expr) { - node.arguments = []; - } else if (expr.type === "SequenceExpression") { - node.arguments = expr.expressions; - } else { - node.arguments = [expr]; - } - return this.parseSubscripts(this.finishNode(node, "CallExpression"), start); - } - } else if (this.type === _tokentype.types.name) { - id = this.parseIdent(); - this.expect(_tokentype.types.arrow); - return this.parseArrowExpression(node, [id], true); - } - - // normal functions - if (this.type === _tokentype.types._function && !this.canInsertSemicolon()) { - this.next(); - return this.parseFunction(node, false, false, true); - } - } else if (id.name === "await") { - if (this.inAsync) return this.parseAwait(node); - } - } - // - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) return this.parseArrowExpression(this.startNodeAt(start), [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(null, null, canBeArrow); - - case _tokentype.types.bracketL: - node = this.startNode(); - this.next(); - // check whether this is array comprehension or regular array - if ((this.options.ecmaVersion >= 7 || this.options.features["es7.comprehensions"]) && this.type === _tokentype.types._for) { - return this.parseComprehension(node, false); - } - node.elements = this.parseExprList(_tokentype.types.bracketR, true, true, refShorthandDefaultPos); - return this.finishNode(node, "ArrayExpression"); - - case _tokentype.types.braceL: - return this.parseObj(false, refShorthandDefaultPos); - - case _tokentype.types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, false); - - case _tokentype.types.at: - this.parseDecorators(); - - case _tokentype.types._class: - node = this.startNode(); - this.takeDecorators(node); - return this.parseClass(node, false); - - case _tokentype.types._new: - return this.parseNew(); - - case _tokentype.types.backQuote: - return this.parseTemplate(); - - case _tokentype.types.doubleColon: - node = this.startNode(); - this.next(); - node.object = null; - var callee = node.callee = this.parseNoCallExpr(); - if (callee.type !== "MemberExpression") this.raise(callee.start, "Binding should be performed on object property."); - return this.finishNode(node, "BindExpression"); - - 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 (start, isAsync, canBeArrow) { - start = start || this.markPosition(); - var val = undefined; - if (this.options.ecmaVersion >= 6) { - this.next(); - - if ((this.options.features["es7.comprehensions"] || this.options.ecmaVersion >= 7) && this.type === _tokentype.types._for) { - return this.parseComprehension(this.startNodeAt(start), true); - } - - var innerStart = this.markPosition(), - exprList = [], - first = true; - var refShorthandDefaultPos = { start: 0 }, - spreadStart = undefined, - innerParenStart = undefined; - while (this.type !== _tokentype.types.parenR) { - first ? first = false : this.expect(_tokentype.types.comma); - if (this.type === _tokentype.types.ellipsis) { - var spreadNodeStart = this.markPosition(); - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStart)); - break; - } else { - if (this.type === _tokentype.types.parenL && !innerParenStart) { - innerParenStart = this.start; - } - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); - } - } - var innerEnd = this.markPosition(); - this.expect(_tokentype.types.parenR); - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) { - if (innerParenStart) this.unexpected(innerParenStart); - return this.parseParenArrowList(start, exprList, isAsync); - } - - if (!exprList.length) { - if (isAsync) { - return; - } else { - this.unexpected(this.lastTokStart); - } - } - if (spreadStart) this.unexpected(spreadStart); - if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - - if (exprList.length > 1) { - val = this.startNodeAt(innerStart); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEnd); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } - - if (this.options.preserveParens) { - var par = this.startNodeAt(start); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression"); - } else { - val.parenthesizedExpression = true; - return val; - } - }; - - pp.parseParenArrowList = function (start, exprList, isAsync) { - return this.parseArrowExpression(this.startNodeAt(start), exprList, isAsync); - }; - - pp.parseParenItem = function (node, start) { - return node; - }; - -// New's precedence is slightly tricky. It must allow its argument -// to be a `[]` or dot subscript expression, but not a call — at -// least, not without wrapping it in parentheses. Thus, it uses the - - 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.raise(node.property.start, "The only valid meta property for new is new.target"); - return this.finishNode(node, "MetaProperty"); - } - node.callee = this.parseNoCallExpr(); - if (this.eat(_tokentype.types.parenL)) node.arguments = this.parseExprList(_tokentype.types.parenR, this.options.features["es7.trailingFunctionCommas"]);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, refShorthandDefaultPos) { - var node = this.startNode(), - first = true, - propHash = {}; - node.properties = []; - var decorators = []; - 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; - while (this.type === _tokentype.types.at) { - decorators.push(this.parseDecorator()); - } - var prop = this.startNode(), - isGenerator = false, - isAsync = false, - _start2 = undefined; - if (decorators.length) { - prop.decorators = decorators; - decorators = []; - } - if (this.options.features["es7.objectRestSpread"] && this.type === _tokentype.types.ellipsis) { - prop = this.parseSpread(); - prop.type = "SpreadProperty"; - node.properties.push(prop); - continue; - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refShorthandDefaultPos) _start2 = this.markPosition(); - if (!isPattern) isGenerator = this.eat(_tokentype.types.star); - } - if (this.options.features["es7.asyncFunctions"] && this.isContextual("async")) { - if (isGenerator || isPattern) this.unexpected(); - var asyncId = this.parseIdent(); - if (this.type === _tokentype.types.colon || this.type === _tokentype.types.parenL) { - prop.key = asyncId; - } else { - isAsync = true; - this.parsePropertyName(prop); - } - } else { - this.parsePropertyName(prop); - } - this.parseObjPropValue(prop, _start2, isGenerator, isAsync, isPattern, refShorthandDefaultPos); - this.checkPropClash(prop, propHash); - node.properties.push(this.finishNode(prop, "Property")); - } - if (decorators.length) { - this.raise(this.start, "You have trailing decorators with no property"); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); - }; - - pp.parseObjPropValue = function (prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos) { - if (this.eat(_tokentype.types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault() : this.parseMaybeAssign(false, refShorthandDefaultPos); - 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, isAsync); - } 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 || isAsync || isPattern) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - prop.kind = "init"; - if (isPattern) { - if (this.isKeyword(prop.key.name) || this.strict && (_identifier.reservedWords.strictBind(prop.key.name) || _identifier.reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); - prop.value = this.parseMaybeDefault(start, prop.key); - } else if (this.type === _tokentype.types.eq && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start; - prop.value = this.parseMaybeDefault(start, 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; - } else { - prop.computed = false; - } - } - 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, isAsync) { - node.id = null; - if (this.options.ecmaVersion >= 6) { - node.generator = false; - node.expression = false; - } - if (this.options.features["es7.asyncFunctions"]) { - node.async = !!isAsync; - } - }; - -// Parse object or class method. - - pp.parseMethod = function (isGenerator, isAsync) { - var node = this.startNode(); - this.initFunction(node, isAsync); - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, this.options.features["es7.trailingFunctionCommas"]); - if (this.options.ecmaVersion >= 6) { - node.generator = isGenerator; - } - this.parseFunctionBody(node); - return this.finishNode(node, "FunctionExpression"); - }; - -// Parse arrow function expression with given parameters. - - pp.parseArrowExpression = function (node, params, isAsync) { - this.initFunction(node, isAsync); - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true); - return this.finishNode(node, "ArrowFunctionExpression"); - }; - -// Parse function body and check parameters. - - pp.parseFunctionBody = function (node, allowExpression) { - var isExpression = allowExpression && this.type !== _tokentype.types.braceL; - - var oldInAsync = this.inAsync; - this.inAsync = node.async; - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - } else { - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldInFunc = this.inFunction, - oldInGen = this.inGenerator, - oldLabels = this.labels; - this.inFunction = true;this.inGenerator = node.generator;this.labels = []; - node.body = this.parseBlock(true); - node.expression = false; - this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; - } - this.inAsync = oldInAsync; - - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { - var nameHash = {}, - oldStrict = this.strict; - this.strict = true; - if (node.id) this.checkLVal(node.id, true); - for (var i = 0; i < node.params.length; i++) { - this.checkLVal(node.params[i], true, nameHash); - }this.strict = oldStrict; - } - }; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - - pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (allowTrailingComma && this.afterTrailingComma(close)) break; - } else first = false; - - if (allowEmpty && this.type === _tokentype.types.comma) { - elts.push(null); - } else { - if (this.type === _tokentype.types.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos)); - } - } - 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.options.allowReserved && this.isReservedWord(this.value) || this.strict && _identifier.reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); - 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 await expression inside async function. - - pp.parseAwait = function (node) { - if (this.eat(_tokentype.types.semi) || this.canInsertSemicolon()) { - this.unexpected(); - } - node.all = this.eat(_tokentype.types.star); - node.argument = this.parseMaybeUnary(); - return this.finishNode(node, "AwaitExpression"); - }; - -// Parses yield expression inside generator. - - pp.parseYield = function () { - var node = this.startNode(); - this.next(); - if (this.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"); - }; - -// Parses array and generator comprehensions. - - pp.parseComprehension = function (node, isGenerator) { - node.blocks = []; - while (this.type === _tokentype.types._for) { - var block = this.startNode(); - this.next(); - this.expect(_tokentype.types.parenL); - block.left = this.parseBindingAtom(); - this.checkLVal(block.left, true); - this.expectContextual("of"); - block.right = this.parseExpression(); - this.expect(_tokentype.types.parenR); - node.blocks.push(this.finishNode(block, "ComprehensionBlock")); - } - node.filter = this.eat(_tokentype.types._if) ? this.parseParenExpression() : null; - node.body = this.parseExpression(); - this.expect(isGenerator ? _tokentype.types.parenR : _tokentype.types.bracketR); - node.generator = isGenerator; - return this.finishNode(node, "ComprehensionExpression"); - }; -},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){ - "use strict"; - - exports.__esModule = true; - -// Test whether a given character code starts an identifier. - - exports.isIdentifierStart = isIdentifierStart; - -// Test whether a given character is part of an identifier. - - exports.isIdentifierChar = isIdentifierChar; -// This is a trick taken from Esprima. It turns out that, on -// non-Chrome browsers, to check whether a string is in a set, a -// predicate containing a big ugly `switch` statement is faster than -// a regular expression, and on Chrome the two are about on par. -// This function uses `eval` (non-lexical) to produce such a -// predicate from a space-separated string of words. -// -// It starts by sorting the words by length. - - function makePredicate(words) { - words = words.split(" "); - return function (str) { - return words.indexOf(str) >= 0; - }; - } - -// Reserved word lists for various dialects of the language - - var reservedWords = { - 3: makePredicate("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: makePredicate("class enum extends super const export import"), - 6: makePredicate("enum await"), - strict: makePredicate("implements interface let package private protected public static yield"), - strictBind: makePredicate("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: makePredicate(ecma5AndLessKeywords), - 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield 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 `tools/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 tools/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, 98, 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, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 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, 16355, 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, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 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, 4305, 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 = 65536; - 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; - } - } - 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 <= 65535) return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes); - } - - 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 <= 65535) return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); - if (astral === false) return false; - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); - } -},{}],5:[function(require,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 -// -// http://marijnhaverbeke.nl/git/acorn -// https://github.com/marijnh/acorn.git -// -// Please use the [github bug tracker][ghbt] to report issues. -// -// [ghbt]: https://github.com/marijnh/acorn/issues -// -// This file defines the main parser interface. The library also comes -// with a [error-tolerant parser][dammit] and an -// [abstract syntax tree walker][walk], defined in other files. -// -// [dammit]: acorn_loose.js -// [walk]: util/walk.js - - "use strict"; - - exports.__esModule = true; - -// 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]. -// -// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API - - exports.parse = 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. - - exports.parseExpressionAt = parseExpressionAt; - -// Acorn is organized as a tokenizer and a recursive-descent parser. -// The `tokenize` export provides an interface to the tokenizer. -// Because the tokenizer is optimized for being efficiently used by -// the Acorn parser itself, this interface is somewhat crude and not -// very modular. - - exports.tokenizer = tokenizer; - - var _state = require("./state"); - - var _options = require("./options"); - - require("./parseutil"); - - require("./statement"); - - require("./lval"); - - require("./expression"); - - require("./lookahead"); - - exports.Parser = _state.Parser; - exports.plugins = _state.plugins; - exports.defaultOptions = _options.defaultOptions; - - var _location = require("./location"); - - exports.SourceLocation = _location.SourceLocation; - exports.getLineInfo = _location.getLineInfo; - - var _node = require("./node"); - - exports.Node = _node.Node; - - var _tokentype = require("./tokentype"); - - exports.TokenType = _tokentype.TokenType; - exports.tokTypes = _tokentype.types; - - var _tokencontext = require("./tokencontext"); - - exports.TokContext = _tokencontext.TokContext; - exports.tokContexts = _tokencontext.types; - - var _identifier = require("./identifier"); - - exports.isIdentifierChar = _identifier.isIdentifierChar; - exports.isIdentifierStart = _identifier.isIdentifierStart; - - var _tokenize = require("./tokenize"); - - exports.Token = _tokenize.Token; - - var _whitespace = require("./whitespace"); - - exports.isNewLine = _whitespace.isNewLine; - exports.lineBreak = _whitespace.lineBreak; - exports.lineBreakG = _whitespace.lineBreakG; - var version = "1.0.0";exports.version = version; - - function parse(input, options) { - var p = parser(options, input); - var startPos = p.options.locations ? [p.pos, p.curPosition()] : p.pos; - p.nextToken(); - return p.parseTopLevel(p.options.program || p.startNodeAt(startPos)); - } - - function parseExpressionAt(input, pos, options) { - var p = parser(options, input, pos); - p.nextToken(); - return p.parseExpression(); - } - - function tokenizer(input, options) { - return parser(options, input); - } - - function parser(options, input) { - return new _state.Parser((0, _options.getOptions)(options), String(input)); - } -},{"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){ - "use strict"; - - exports.__esModule = true; - -// 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.getLineInfo = getLineInfo; - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var _state = require("./state"); - - var _whitespace = require("./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; - }; - - 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); - } - } - } - - 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 = 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.curPosition = function () { - return new Position(this.curLine, this.pos - this.lineStart); - }; - - pp.markPosition = function () { - return this.options.locations ? [this.start, this.startLoc] : this.start; - }; -},{"./state":12,"./whitespace":18}],7:[function(require,module,exports){ - "use strict"; - - var _state = require("./state"); - - var pp = _state.Parser.prototype; - - var STATE_KEYS = ["lastTokStartLoc", "lastTokEndLoc", "lastTokStart", "lastTokEnd", "lineStart", "startLoc", "endLoc", "start", "pos", "end", "type", "value", "exprAllowed", "potentialArrowAt", "currLine", "input"]; - - pp.getState = function () { - var state = {}; - for (var i = 0; i < STATE_KEYS.length; i++) { - var key = STATE_KEYS[i]; - state[key] = this[key]; - } - state.context = this.context.slice(); - return state; - }; - - pp.lookahead = function () { - var old = this.getState(); - this.isLookahead = true; - this.next(); - this.isLookahead = false; - var curr = this.getState(); - for (var key in old) this[key] = old[key]; - return curr; - }; -},{"./state":12}],8:[function(require,module,exports){ - "use strict"; - - var _tokentype = require("./tokentype"); - - var _state = require("./state"); - - var _identifier = require("./identifier"); - - var _util = require("./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": - case "AssignmentPattern": - break; - - case "ObjectExpression": - node.type = "ObjectPattern"; - for (var i = 0; i < node.properties.length; i++) { - var prop = node.properties[i]; - if (prop.type === "SpreadProperty") continue; - 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"; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - break; - - case "MemberExpression": - if (!isBinding) break; - - default: - this.raise(node.start, "Assigning to rvalue"); - } - } - return node; - }; - -// Convert list of expression atoms to binding list. - - pp.toAssignableList = function (exprList, isBinding) { - var end = exprList.length; - if (end) { - var last = exprList[end - 1]; - if (last && last.type == "RestElement") { - --end; - } else if (last && last.type == "SpreadElement") { - last.type = "RestElement"; - var arg = last.argument; - this.toAssignable(arg, isBinding); - if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start); - --end; - } - } - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) this.toAssignable(elt, isBinding); - } - return exprList; - }; - -// Parses spread element. - - pp.parseSpread = function (refShorthandDefaultPos) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(refShorthandDefaultPos); - return this.finishNode(node, "SpreadElement"); - }; - - pp.parseRest = function () { - var node = this.startNode(); - this.next(); - node.argument = this.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) { - 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) { - elts.push(this.parseAssignableListItemTypes(this.parseRest())); - this.expect(close); - break; - } else { - var left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - elts.push(this.parseMaybeDefault(null, left)); - } - } - return elts; - }; - - pp.parseAssignableListItemTypes = function (param) { - return param; - }; - -// Parses assignment pattern around given atom if possible. - - pp.parseMaybeDefault = function (startPos, left) { - startPos = startPos || this.markPosition(); - left = left || this.parseBindingAtom(); - if (!this.eat(_tokentype.types.eq)) return left; - var node = this.startNodeAt(startPos); - node.operator = "="; - 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 && (_identifier.reservedWords.strictBind(expr.name) || _identifier.reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); - if (checkClashes) { - if ((0, _util.has)(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); - checkClashes[expr.name] = true; - } - break; - - case "MemberExpression": - if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); - break; - - case "ObjectPattern": - for (var i = 0; i < expr.properties.length; i++) { - var prop = expr.properties[i]; - if (prop.type === "Property") prop = prop.value; - this.checkLVal(prop, 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 "SpreadProperty": - case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes); - break; - - default: - this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); - } - }; -},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],9:[function(require,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 = require("./state"); - - var _location = require("./location"); - -// Start an AST node, attaching a start offset. - - var pp = _state.Parser.prototype; - - var Node = function Node() { - _classCallCheck(this, Node); - }; - - exports.Node = Node; - - pp.startNode = function () { - var node = new Node(); - node.start = this.start; - if (this.options.locations) node.loc = new _location.SourceLocation(this, this.startLoc); - if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; - if (this.options.ranges) node.range = [this.start, 0]; - return node; - }; - - pp.startNodeAt = function (pos) { - var node = new Node(), - start = pos; - if (this.options.locations) { - node.loc = new _location.SourceLocation(this, start[1]); - start = pos[0]; - } - node.start = start; - if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; - if (this.options.ranges) node.range = [start, 0]; - return node; - }; - -// Finish an AST node, adding `type` and `end` properties. - - pp.finishNode = function (node, type) { - node.type = type; - node.end = this.lastTokEnd; - if (this.options.locations) node.loc.end = this.lastTokEndLoc; - if (this.options.ranges) node.range[1] = this.lastTokEnd; - return node; - }; - -// Finish node at given position - - pp.finishNodeAt = function (node, type, pos) { - if (this.options.locations) { - node.loc.end = pos[1];pos = pos[0]; - } - node.type = type; - node.end = pos; - if (this.options.ranges) node.range[1] = pos; - return node; - }; -},{"./location":6,"./state":12}],10:[function(require,module,exports){ - "use strict"; - - exports.__esModule = true; - -// Interpret and default an options object - - exports.getOptions = getOptions; - - var _util = require("./util"); - - var _location = require("./location"); - -// 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. - ecmaVersion: 5, - // 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 not enforced. Disable - // `allowReserved` to enforce them. When this option has the - // value "never", reserved words and keywords can also not be - // used as property names. - allowReserved: true, - // 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 tokenize() returns. 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: {}, - // Babel-specific options - features: {}, - strictMode: null - };exports.defaultOptions = defaultOptions; - - function getOptions(opts) { - var options = {}; - for (var opt in defaultOptions) { - options[opt] = opts && (0, _util.has)(opts, opt) ? opts[opt] : defaultOptions[opt]; - }if ((0, _util.isArray)(options.onToken)) { - (function () { - var tokens = options.onToken; - options.onToken = function (token) { - return tokens.push(token); - }; - })(); - } - if ((0, _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 _location.SourceLocation(this, startLoc, endLoc); - if (options.ranges) comment.range = [start, end]; - array.push(comment); - }; - } -},{"./location":6,"./util":17}],11:[function(require,module,exports){ - "use strict"; - - var _tokentype = require("./tokentype"); - - var _state = require("./state"); - - var _whitespace = require("./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.value === "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"); - }; -},{"./state":12,"./tokentype":16,"./whitespace":18}],12:[function(require,module,exports){ - "use strict"; - - exports.__esModule = true; - exports.Parser = Parser; - - var _identifier = require("./identifier"); - - var _tokentype = require("./tokentype"); - - function Parser(options, input, startPos) { - this.options = options; - this.loadPlugins(this.options.plugins); - this.sourceFile = this.options.sourceFile || null; - this.isKeyword = _identifier.keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; - this.isReservedWord = _identifier.reservedWords[this.options.ecmaVersion]; - this.input = input; - - // 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(_tokentype.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 = null; - - // 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.inModule = this.options.sourceType === "module"; - this.strict = this.options.strictMode === false ? false : this.inModule; - - // 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 = []; - - this.decorators = []; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); - } - - Parser.prototype.extend = function (name, f) { - this[name] = f(this[name]); - }; - -// Registered plugins - - var plugins = {}; - - exports.plugins = plugins; - Parser.prototype.loadPlugins = function (plugins) { - for (var _name in plugins) { - var plugin = exports.plugins[_name]; - if (!plugin) throw new Error("Plugin '" + _name + "' not found"); - plugin(this, plugins[_name]); - } - }; -},{"./identifier":4,"./tokentype":16}],13:[function(require,module,exports){ - "use strict"; - - var _tokentype = require("./tokentype"); - - var _state = require("./state"); - - var _whitespace = require("./whitespace"); - - 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 && 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" }; - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - - pp.parseStatement = function (declaration, topLevel) { - if (this.type === _tokentype.types.at) { - this.parseDecorators(true); - } - - var starttype = this.type, - node = this.startNode(); - - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case _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(); - this.takeDecorators(node); - 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._let:case _tokentype.types._const: - if (!declaration) this.unexpected(); // NOTE: falls through to _var - case _tokentype.types._var: - return this.parseVarStatement(node, starttype); - 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); - - case _tokentype.types.name: - if (this.options.features["es7.asyncFunctions"] && this.value === "async" && this.lookahead().type === _tokentype.types._function) { - this.next(); - this.expect(_tokentype.types._function); - return this.parseFunction(node, true, false, true); - } - - // 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.takeDecorators = function (node) { - if (this.decorators.length) { - node.decorators = this.decorators; - this.decorators = []; - } - }; - - pp.parseDecorators = function (allowExport) { - while (this.type === _tokentype.types.at) { - this.decorators.push(this.parseDecorator()); - } - - if (allowExport && this.type === _tokentype.types._export) { - return; - } - - if (this.type !== _tokentype.types._class) { - this.raise(this.start, "Leading decorators must be attached to a class declaration"); - } - }; - - pp.parseDecorator = function (allowExport) { - if (!this.options.features["es7.decorators"]) { - this.unexpected(); - } - var node = this.startNode(); - this.next(); - node.expression = this.parseMaybeAssign(); - return this.finishNode(node, "Decorator"); - }; - - pp.parseBreakContinueStatement = function (node, keyword) { - var isBreak = keyword == "break"; - this.next(); - if (this.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) { - var start = this.markPosition(); - 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); - if (this.type === _tokentype.types._var || this.type === _tokentype.types._let || this.type === _tokentype.types._const) { - var _init = this.startNode(), - varKind = this.type; - this.next(); - this.parseVar(_init, true, varKind); - this.finishNode(_init, "VariableDeclaration"); - if ((this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== _tokentype.types._var && _init.declarations[0].init)) return this.parseForIn(node, _init); - return this.parseFor(node, _init); - } - var refShorthandDefaultPos = { start: 0 }; - var init = this.parseExpression(true, refShorthandDefaultPos); - if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { - this.toAssignable(init); - this.checkLVal(init); - return this.parseForIn(node, init); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - 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; 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.raise(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.guard = null; - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.guardedHandlers = empty; - 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; - this.labels.push({ name: maybeName, kind: kind }); - 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.keyword; - for (;;) { - var decl = this.startNode(); - this.parseVarHead(decl); - if (this.eat(_tokentype.types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === _tokentype.types._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.parseVarHead = function (decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true); - }; - -// Parse a function declaration or literal (depending on the -// `isStatement` parameter). - - pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync) { - this.initFunction(node, isAsync); - if (this.options.ecmaVersion >= 6) node.generator = this.eat(_tokentype.types.star); - if (isStatement || this.type === _tokentype.types.name) node.id = this.parseIdent(); - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody); - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); - }; - - pp.parseFunctionParams = function (node) { - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, this.options.features["es7.trailingFunctionCommas"]); - }; - -// 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(); - classBody.body = []; - this.expect(_tokentype.types.braceL); - var decorators = []; - while (!this.eat(_tokentype.types.braceR)) { - if (this.eat(_tokentype.types.semi)) continue; - if (this.type === _tokentype.types.at) { - decorators.push(this.parseDecorator()); - continue; - } - var method = this.startNode(); - if (decorators.length) { - method.decorators = decorators; - decorators = []; - } - var isGenerator = this.eat(_tokentype.types.star), - isAsync = false; - this.parsePropertyName(method); - if (this.type !== _tokentype.types.parenL && !method.computed && method.key.type === "Identifier" && method.key.name === "static") { - if (isGenerator) this.unexpected(); - method["static"] = true; - isGenerator = this.eat(_tokentype.types.star); - this.parsePropertyName(method); - } else { - method["static"] = false; - } - if (!isGenerator && method.key.type === "Identifier" && !method.computed && this.isClassProperty()) { - classBody.body.push(this.parseClassProperty(method)); - continue; - } - if (this.options.features["es7.asyncFunctions"] && this.type !== _tokentype.types.parenL && !method.computed && method.key.type === "Identifier" && method.key.name === "async") { - isAsync = true; - this.parsePropertyName(method); - } - method.kind = "method"; - if (!method.computed && !isGenerator && !isAsync) { - if (method.key.type === "Identifier") { - if (this.type !== _tokentype.types.parenL && (method.key.name === "get" || method.key.name === "set")) { - method.kind = method.key.name; - this.parsePropertyName(method); - } else if (!method["static"] && method.key.name === "constructor") { - method.kind = "constructor"; - } - } else if (!method["static"] && method.key.type === "Literal" && method.key.value === "constructor") { - method.kind = "constructor"; - } - } - if (method.kind === "constructor" && method.decorators) { - this.raise(method.start, "You can't attach decorators to a class constructor"); - } - this.parseClassMethod(classBody, method, isGenerator, isAsync); - } - if (decorators.length) { - this.raise(this.start, "You have trailing decorators with no method"); - } - node.body = this.finishNode(classBody, "ClassBody"); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); - }; - - pp.isClassProperty = function () { - return this.type === _tokentype.types.eq || (this.type === _tokentype.types.semi || this.canInsertSemicolon()); - }; - - pp.parseClassProperty = function (node) { - if (this.type === _tokentype.types.eq) { - if (!this.options.features["es7.classProperties"]) this.unexpected(); - this.next(); - node.value = this.parseMaybeAssign(); - } else { - node.value = null; - } - this.semicolon(); - return this.finishNode(node, "ClassProperty"); - }; - - pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) { - method.value = this.parseMethod(isGenerator, isAsync); - 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.type === _tokentype.types.star) { - var specifier = this.startNode(); - this.next(); - if (this.options.features["es7.exportExtensions"] && this.eatContextual("as")) { - specifier.exported = this.parseIdent(); - node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; - this.parseExportSpecifiersMaybe(node); - this.parseExportFrom(node); - } else { - this.parseExportFrom(node); - return this.finishNode(node, "ExportAllDeclaration"); - } - } else if (this.options.features["es7.exportExtensions"] && this.isExportDefaultSpecifier()) { - var specifier = this.startNode(); - specifier.exported = this.parseIdent(true); - node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - if (this.type === _tokentype.types.comma && this.lookahead().type === _tokentype.types.star) { - this.expect(_tokentype.types.comma); - var _specifier = this.startNode(); - this.expect(_tokentype.types.star); - this.expectContextual("as"); - _specifier.exported = this.parseIdent(); - node.specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier")); - } else { - this.parseExportSpecifiersMaybe(node); - } - this.parseExportFrom(node); - } else if (this.eat(_tokentype.types._default)) { - // export default ... - var _expr = this.parseMaybeAssign(); - var needsSemi = true; - if (_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(); - this.checkExport(node); - return this.finishNode(node, "ExportDefaultDeclaration"); - } else if (this.type.keyword || this.shouldParseExportDeclaration()) { - 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 { - node.source = null; - } - this.semicolon(); - } - this.checkExport(node); - return this.finishNode(node, "ExportNamedDeclaration"); - }; - - pp.isExportDefaultSpecifier = function () { - if (this.type === _tokentype.types.name) { - return this.value !== "type" && this.value !== "async"; - } - - if (this.type !== _tokentype.types._default) { - return false; - } - - var lookahead = this.lookahead(); - return lookahead.type === _tokentype.types.comma || lookahead.type === _tokentype.types.name && lookahead.value === "from"; - }; - - pp.parseExportSpecifiersMaybe = function (node) { - if (this.eat(_tokentype.types.comma)) { - node.specifiers = node.specifiers.concat(this.parseExportSpecifiers()); - } - }; - - pp.parseExportFrom = function (node) { - this.expectContextual("from"); - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - this.semicolon(); - this.checkExport(node); - }; - - pp.shouldParseExportDeclaration = function () { - return this.options.features["es7.asyncFunctions"] && this.isContextual("async"); - }; - - pp.checkExport = function (node) { - if (this.decorators.length) { - var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); - if (!node.declaration || !isClass) { - this.raise(node.start, "You can only use decorators on an export when exporting a class"); - } - this.takeDecorators(node.declaration); - } - }; - -// Parses a comma-separated list of module exports. - - pp.parseExportSpecifiers = function () { - var nodes = [], - 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(node); - 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 (node) { - var first = true; - if (this.type === _tokentype.types.name) { - // import defaultObj, { x, y as z } from '...' - var start = this.markPosition(); - node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(), start)); - if (!this.eat(_tokentype.types.comma)) return; - } - if (this.type === _tokentype.types.star) { - var specifier = this.startNode(); - this.next(); - this.expectContextual("as"); - specifier.local = this.parseIdent(); - this.checkLVal(specifier.local, true); - node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier")); - return; - } - 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 specifier = this.startNode(); - specifier.imported = this.parseIdent(true); - specifier.local = this.eatContextual("as") ? this.parseIdent() : specifier.imported; - this.checkLVal(specifier.local, true); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - } - }; - - pp.parseImportSpecifierDefault = function (id, start) { - var node = this.startNodeAt(start); - node.local = id; - this.checkLVal(node.local, true); - return this.finishNode(node, "ImportDefaultSpecifier"); - }; -},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,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 https://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 = require("./state"); - - var _tokentype = require("./tokentype"); - - var _whitespace = require("./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) { - var parent = undefined; - if (prevType === _tokentype.types.colon && (parent = this.curContext()).token == "{") 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) 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 () {}; - - _tokentype.types._function.updateContext = function () { - if (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; - }; - -// tokExprAllowed stays unchanged -},{"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,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 = require("./identifier"); - - var _tokentype = require("./tokentype"); - - var _state = require("./state"); - - var _location = require("./location"); - - var _whitespace = require("./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 _location.SourceLocation(p, p.startLoc, p.endLoc); - if (p.options.ranges) this.range = [p.start, p.end]; - }; - - exports.Token = Token; - -// ## Tokenizer - - var pp = _state.Parser.prototype; - -// Move to the next token - - pp.next = function () { - if (this.options.onToken && !this.isLookahead) 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[Symbol.iterator] = 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 ((0, _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 <= 55295 || code >= 57344) return code; - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 56613888; - }; - - pp.skipBlockComment = function () { - var startLoc = this.options.onComment && this.options.locations && 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.options.locations && this.curPosition()); - }; - - pp.skipLineComment = function (startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.options.locations && 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.options.locations && this.curPosition()); - }; - -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. - - pp.skipSpace = function () { - while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - if (ch === 32) { - // ' ' - ++this.pos; - } else if (ch === 13) { - ++this.pos; - var _next = this.input.charCodeAt(this.pos); - if (_next === 10) { - ++this.pos; - } - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - } else if (ch === 10 || ch === 8232 || ch === 8233) { - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - } else if (ch > 8 && ch < 14) { - ++this.pos; - } else if (ch === 47) { - // '/' - var _next2 = this.input.charCodeAt(this.pos + 1); - if (_next2 === 42) { - // '*' - this.skipBlockComment(); - } else if (_next2 === 47) { - // '/' - this.skipLineComment(2); - } else break; - } else if (ch === 160) { - // '\xa0' - ++this.pos; - } else if (ch >= 5760 && _whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break; - } - } - }; - -// 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 = function (code) { - // '%*' - var type = code === 42 ? _tokentype.types.star : _tokentype.types.modulo; - var width = 1; - var next = this.input.charCodeAt(this.pos + 1); - - if (next === 42) { - // '*' - width++; - next = this.input.charCodeAt(this.pos + 2); - type = _tokentype.types.exponent; - } - - if (next === 61) { - width++; - type = _tokentype.types.assign; - } - - return this.finishOp(type, width); - }; - - 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(); - // ` regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return -1 === s.indexOf(false) - }) - - this.debug(this.pattern, set) - - this.set = set - } - - Minimatch.prototype.parseNegate = parseNegate - function parseNegate () { - var pattern = this.pattern - , negate = false - , options = this.options - , negateOffset = 0 - - if (options.nonegate) return - - for ( var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === "!" - ; i ++) { - negate = !negate - negateOffset ++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate - } - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c - minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) - } - - Minimatch.prototype.braceExpand = braceExpand - - function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) - options = this.options - else - options = {} - } - - pattern = typeof pattern === "undefined" - ? this.pattern : pattern - - if (typeof pattern === "undefined") { - throw new Error("undefined pattern") - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) - } - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. - Minimatch.prototype.parse = parse - var SUBPARSE = {} - function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === "**") return GLOBSTAR - if (pattern === "") return "" - - var re = "" - , hasMagic = !!options.nocase - , escaping = false - // ? => one single character - , patternListStack = [] - , plType - , stateChar - , inClass = false - , reClassStart = -1 - , classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - , patternStart = pattern.charAt(0) === "." ? "" // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" - : "(?!\\.)" - , self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case "*": - re += star - hasMagic = true - break - case "?": - re += qmark - hasMagic = true - break - default: - re += "\\"+stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for ( var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i ++ ) { - - this.debug("%s\t%s %s %j", pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += "\\" + c - escaping = false - continue - } - - SWITCH: switch (c) { - case "/": - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case "\\": - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === "!" && i === classStart + 1) c = "^" - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case "(": - if (inClass) { - re += "(" - continue - } - - if (!stateChar) { - re += "\\(" - continue - } - - plType = stateChar - patternListStack.push({ type: plType - , start: i - 1 - , reStart: re.length }) - // negation is (?:(?!js)[^/]*) - re += stateChar === "!" ? "(?:(?!" : "(?:" - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ")": - if (inClass || !patternListStack.length) { - re += "\\)" - continue - } - - clearStateChar() - hasMagic = true - re += ")" - plType = patternListStack.pop().type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case "!": - re += "[^/]*?)" - break - case "?": - case "+": - case "*": re += plType - case "@": break // the default anyway - } - continue - - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|" - escaping = false - continue - } - - clearStateChar() - re += "|" - continue - - // these are mostly the same in regexp and glob - case "[": - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += "\\" + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case "]": - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += "\\" + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - new RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === "^" && inClass)) { - re += "\\" - } - - re += c - - } // switch - } // for - - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - var cs = pattern.substr(classStart + 1) - , sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - var pl - while (pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = "\\" - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + "|" - }) - - this.debug("tail=%j\n %s", tail, tail) - var t = pl.type === "*" ? star - : pl.type === "?" ? qmark - : "\\" + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) - + t + "\\(" - + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += "\\\\" - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case ".": - case "[": - case "(": addPatternStart = true - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== "" && hasMagic) re = "(?=.)" + re - - if (addPatternStart) re = patternStart + re - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [ re, hasMagic ] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? "i" : "" - , regExp = new RegExp("^" + re + "$", flags) - - regExp._glob = pattern - regExp._src = re - - return regExp - } - - minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() - } - - Minimatch.prototype.makeRe = makeRe - function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) return this.regexp = false - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - , flags = options.nocase ? "i" : "" - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === "string") ? regExpEscape(p) - : p._src - }).join("\\\/") - }).join("|") - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = "^(?:" + re + ")$" - - // can match anything, as long as it's not this. - if (this.negate) re = "^(?!" + re + ").*$" - - try { - return this.regexp = new RegExp(re, flags) - } catch (ex) { - return this.regexp = false - } - } - - minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list - } - - Minimatch.prototype.match = match - function match (f, partial) { - this.debug("match", f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === "" - - if (f === "/" && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (isWindows) - f = f.split("\\").join("/") - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, "split", f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, "set", set) - - // Find the basename of the path by looking for the last non-empty segment - var filename; - for (var i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (var i = 0, l = set.length; i < l; i ++) { - var pattern = set[i], file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate - } - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. - Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug("matchOne", - { "this": this - , file: file - , pattern: pattern }) - - this.debug("matchOne", file.length, pattern.length) - - for ( var fi = 0 - , pi = 0 - , fl = file.length - , pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi ++, pi ++ ) { - - this.debug("matchOne loop") - var p = pattern[pi] - , f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - , pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for ( ; fi < fl; fi ++) { - if (file[fi] === "." || file[fi] === ".." || - (!options.dot && file[fi].charAt(0) === ".")) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - WHILE: while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', - file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === "." || swallowee === ".." || - (!options.dot && swallowee.charAt(0) === ".")) { - this.debug("dot detected!", file, fr, pattern, pr) - break WHILE - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr ++ - } - } - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug("\n>>> no match, partial?", file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === "string") { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug("string match", p, f, hit) - } else { - hit = f.match(p) - this.debug("pattern match", p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") - return emptyFileEnd - } - - // should be unreachable. - throw new Error("wtf?") - } - - -// replace stuff like \* with * - function globUnescape (s) { - return s.replace(/\\(.)/g, "$1") - } - - - function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") - } - - }).call(this,require('_process')) -},{"_process":213,"brace-expansion":444}],444:[function(require,module,exports){ - var concatMap = require('concat-map'); - var balanced = require('balanced-match'); - - module.exports = expandTop; - - var escSlash = '\0SLASH'+Math.random()+'\0'; - var escOpen = '\0OPEN'+Math.random()+'\0'; - var escClose = '\0CLOSE'+Math.random()+'\0'; - var escComma = '\0COMMA'+Math.random()+'\0'; - var escPeriod = '\0PERIOD'+Math.random()+'\0'; - - function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); - } - - function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); - } - - function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); - } - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} - function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; - } - - function expandTop(str) { - if (!str) - return []; - - return expand(escapeBraces(str), true).map(unescapeBraces); - } - - function identity(e) { - return e; - } - - function embrace(str) { - return '{' + str + '}'; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - - function lte(i, y) { - return i <= y; - } - function gte(i, y) { - return i >= y; - } - - function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = /^(.*,)+(.+)?$/.test(m.body); - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; - } - - -},{"balanced-match":445,"concat-map":446}],445:[function(require,module,exports){ - module.exports = balanced; - function balanced(a, b, str) { - var bal = 0; - var m = {}; - var ended = false; - - for (var i = 0; i < str.length; i++) { - if (a == str.substr(i, a.length)) { - if (!('start' in m)) m.start = i; - bal++; - } - else if (b == str.substr(i, b.length) && 'start' in m) { - ended = true; - bal--; - if (!bal) { - m.end = i; - m.pre = str.substr(0, m.start); - m.body = (m.end - m.start > 1) - ? str.substring(m.start + a.length, m.end) - : ''; - m.post = str.slice(m.end + b.length); - return m; - } - } - } - - // if we opened more than we closed, find the one we closed - if (bal && ended) { - var start = m.start + a.length; - m = balanced(a, b, str.substr(start)); - if (m) { - m.start += start; - m.end += start; - m.pre = str.slice(0, start) + m.pre; - } - return m; - } - } - -},{}],446:[function(require,module,exports){ - module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - - var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; - }; - -},{}],447:[function(require,module,exports){ - (function (process){ - 'use strict'; - - function posix(path) { - return path.charAt(0) === '/'; - }; - - function win32(path) { - // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = !!device && device.charAt(1) !== ':'; - - // UNC paths are always absolute - return !!result[2] || isUnc; - }; - - module.exports = process.platform === 'win32' ? win32 : posix; - module.exports.posix = posix; - module.exports.win32 = win32; - - }).call(this,require('_process')) -},{"_process":213}],448:[function(require,module,exports){ - "use strict"; - - var originalObject = Object; - var originalDefProp = Object.defineProperty; - var originalCreate = Object.create; - - function defProp(obj, name, value) { - if (originalDefProp) try { - originalDefProp.call(originalObject, obj, name, { value: value }); - } catch (definePropertyIsBrokenInIE8) { - obj[name] = value; - } else { - obj[name] = value; - } - } - -// For functions that will be invoked using .call or .apply, we need to -// define those methods on the function objects themselves, rather than -// inheriting them from Function.prototype, so that a malicious or clumsy -// third party cannot interfere with the functionality of this module by -// redefining Function.prototype.call or .apply. - function makeSafeToCall(fun) { - if (fun) { - defProp(fun, "call", fun.call); - defProp(fun, "apply", fun.apply); - } - return fun; - } - - makeSafeToCall(originalDefProp); - makeSafeToCall(originalCreate); - - var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty); - var numToStr = makeSafeToCall(Number.prototype.toString); - var strSlice = makeSafeToCall(String.prototype.slice); - - var cloner = function(){}; - function create(prototype) { - if (originalCreate) { - return originalCreate.call(originalObject, prototype); - } - cloner.prototype = prototype || null; - return new cloner; - } - - var rand = Math.random; - var uniqueKeys = create(null); - - function makeUniqueKey() { - // Collisions are highly unlikely, but this module is in the business of - // making guarantees rather than safe bets. - do var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2)); - while (hasOwn.call(uniqueKeys, uniqueKey)); - return uniqueKeys[uniqueKey] = uniqueKey; - } - - function internString(str) { - var obj = {}; - obj[str] = true; - return Object.keys(obj)[0]; - } - -// External users might find this function useful, but it is not necessary -// for the typical use of this module. - defProp(exports, "makeUniqueKey", makeUniqueKey); - -// Object.getOwnPropertyNames is the only way to enumerate non-enumerable -// properties, so if we wrap it to ignore our secret keys, there should be -// no way (except guessing) to access those properties. - var originalGetOPNs = Object.getOwnPropertyNames; - Object.getOwnPropertyNames = function getOwnPropertyNames(object) { - for (var names = originalGetOPNs(object), - src = 0, - dst = 0, - len = names.length; - src < len; - ++src) { - if (!hasOwn.call(uniqueKeys, names[src])) { - if (src > dst) { - names[dst] = names[src]; - } - ++dst; - } - } - names.length = dst; - return names; - }; - - function defaultCreatorFn(object) { - return create(null); - } - - function makeAccessor(secretCreatorFn) { - var brand = makeUniqueKey(); - var passkey = create(null); - - secretCreatorFn = secretCreatorFn || defaultCreatorFn; - - function register(object) { - var secret; // Created lazily. - - function vault(key, forget) { - // Only code that has access to the passkey can retrieve (or forget) - // the secret object. - if (key === passkey) { - return forget - ? secret = null - : secret || (secret = secretCreatorFn(object)); - } - } - - defProp(object, brand, vault); - } - - function accessor(object) { - if (!hasOwn.call(object, brand)) - register(object); - return object[brand](passkey); - } - - accessor.forget = function(object) { - if (hasOwn.call(object, brand)) - object[brand](passkey, true); - }; - - return accessor; - } - - defProp(exports, "makeAccessor", makeAccessor); - -},{}],449:[function(require,module,exports){ - /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - - var assert = require("assert"); - var types = require("recast").types; - var isArray = types.builtInTypes.array; - var b = types.builders; - var n = types.namedTypes; - var leap = require("./leap"); - var meta = require("./meta"); - var util = require("./util"); - var runtimeProperty = util.runtimeProperty; - var hasOwn = Object.prototype.hasOwnProperty; - - function Emitter(contextId) { - assert.ok(this instanceof Emitter); - n.Identifier.assert(contextId); - - // Used to generate unique temporary names. - this.nextTempId = 0; - - Object.defineProperties(this, { - // In order to make sure the context object does not collide with - // anything in the local scope, we might have to rename it, so we - // refer to it symbolically instead of just assuming that it will be - // called "context". - contextId: { value: contextId }, - - // An append-only list of Statements that grows each time this.emit is - // called. - listing: { value: [] }, - - // A sparse array whose keys correspond to locations in this.listing - // that have been marked as branch/jump targets. - marked: { value: [true] }, - - // The last location will be marked when this.getDispatchLoop is - // called. - finalLoc: { value: loc() }, - - // A list of all leap.TryEntry statements emitted. - tryEntries: { value: [] } - }); - - // The .leapManager property needs to be defined by a separate - // defineProperties call so that .finalLoc will be visible to the - // leap.LeapManager constructor. - Object.defineProperties(this, { - // Each time we evaluate the body of a loop, we tell this.leapManager - // to enter a nested loop context that determines the meaning of break - // and continue statements therein. - leapManager: { value: new leap.LeapManager(this) } - }); - } - - var Ep = Emitter.prototype; - exports.Emitter = Emitter; - -// Offsets into this.listing that could be used as targets for branches or -// jumps are represented as numeric Literal nodes. This representation has -// the amazingly convenient benefit of allowing the exact value of the -// location to be determined at any time, even after generating code that -// refers to the location. - function loc() { - return b.literal(-1); - } - -// Sets the exact value of the given location to the offset of the next -// Statement emitted. - Ep.mark = function(loc) { - n.Literal.assert(loc); - var index = this.listing.length; - if (loc.value === -1) { - loc.value = index; - } else { - // Locations can be marked redundantly, but their values cannot change - // once set the first time. - assert.strictEqual(loc.value, index); - } - this.marked[index] = true; - return loc; - }; - - Ep.emit = function(node) { - if (n.Expression.check(node)) - node = b.expressionStatement(node); - n.Statement.assert(node); - this.listing.push(node); - }; - -// Shorthand for emitting assignment statements. This will come in handy -// for assignments to temporary variables. - Ep.emitAssign = function(lhs, rhs) { - this.emit(this.assign(lhs, rhs)); - return lhs; - }; - -// Shorthand for an assignment statement. - Ep.assign = function(lhs, rhs) { - return b.expressionStatement( - b.assignmentExpression("=", lhs, rhs)); - }; - -// Convenience function for generating expressions like context.next, -// context.sent, and context.rval. - Ep.contextProperty = function(name, computed) { - return b.memberExpression( - this.contextId, - computed ? b.literal(name) : b.identifier(name), - !!computed - ); - }; - - var volatileContextPropertyNames = { - prev: true, - next: true, - sent: true, - rval: true - }; - -// A "volatile" context property is a MemberExpression like context.sent -// that should probably be stored in a temporary variable when there's a -// possibility the property will get overwritten. - Ep.isVolatileContextProperty = function(expr) { - if (n.MemberExpression.check(expr)) { - if (expr.computed) { - // If it's a computed property such as context[couldBeAnything], - // assume the worst in terms of volatility. - return true; - } - - if (n.Identifier.check(expr.object) && - n.Identifier.check(expr.property) && - expr.object.name === this.contextId.name && - hasOwn.call(volatileContextPropertyNames, - expr.property.name)) { - return true; - } - } - - return false; - }; - -// Shorthand for setting context.rval and jumping to `context.stop()`. - Ep.stop = function(rval) { - if (rval) { - this.setReturnValue(rval); - } - - this.jump(this.finalLoc); - }; - - Ep.setReturnValue = function(valuePath) { - n.Expression.assert(valuePath.value); - - this.emitAssign( - this.contextProperty("rval"), - this.explodeExpression(valuePath) - ); - }; - - Ep.clearPendingException = function(tryLoc, assignee) { - n.Literal.assert(tryLoc); - - var catchCall = b.callExpression( - this.contextProperty("catch", true), - [tryLoc] - ); - - if (assignee) { - this.emitAssign(assignee, catchCall); - } else { - this.emit(catchCall); - } - }; - -// Emits code for an unconditional jump to the given location, even if the -// exact value of the location is not yet known. - Ep.jump = function(toLoc) { - this.emitAssign(this.contextProperty("next"), toLoc); - this.emit(b.breakStatement()); - }; - -// Conditional jump. - Ep.jumpIf = function(test, toLoc) { - n.Expression.assert(test); - n.Literal.assert(toLoc); - - this.emit(b.ifStatement( - test, - b.blockStatement([ - this.assign(this.contextProperty("next"), toLoc), - b.breakStatement() - ]) - )); - }; - -// Conditional jump, with the condition negated. - Ep.jumpIfNot = function(test, toLoc) { - n.Expression.assert(test); - n.Literal.assert(toLoc); - - var negatedTest; - if (n.UnaryExpression.check(test) && - test.operator === "!") { - // Avoid double negation. - negatedTest = test.argument; - } else { - negatedTest = b.unaryExpression("!", test); - } - - this.emit(b.ifStatement( - negatedTest, - b.blockStatement([ - this.assign(this.contextProperty("next"), toLoc), - b.breakStatement() - ]) - )); - }; - -// Returns a unique MemberExpression that can be used to store and -// retrieve temporary values. Since the object of the member expression is -// the context object, which is presumed to coexist peacefully with all -// other local variables, and since we just increment `nextTempId` -// monotonically, uniqueness is assured. - Ep.makeTempVar = function() { - return this.contextProperty("t" + this.nextTempId++); - }; - - Ep.getContextFunction = function(id) { - return b.functionExpression( - id || null/*Anonymous*/, - [this.contextId], - b.blockStatement([this.getDispatchLoop()]), - false, // Not a generator anymore! - false // Nor an expression. - ); - }; - -// Turns this.listing into a loop of the form -// -// while (1) switch (context.next) { -// case 0: -// ... -// case n: -// return context.stop(); -// } -// -// Each marked location in this.listing will correspond to one generated -// case statement. - Ep.getDispatchLoop = function() { - var self = this; - var cases = []; - var current; - - // If we encounter a break, continue, or return statement in a switch - // case, we can skip the rest of the statements until the next case. - var alreadyEnded = false; - - self.listing.forEach(function(stmt, i) { - if (self.marked.hasOwnProperty(i)) { - cases.push(b.switchCase( - b.literal(i), - current = [])); - alreadyEnded = false; - } - - if (!alreadyEnded) { - current.push(stmt); - if (isSwitchCaseEnder(stmt)) - alreadyEnded = true; - } - }); - - // Now that we know how many statements there will be in this.listing, - // we can finally resolve this.finalLoc.value. - this.finalLoc.value = this.listing.length; - - cases.push( - b.switchCase(this.finalLoc, [ - // Intentionally fall through to the "end" case... - ]), - - // So that the runtime can jump to the final location without having - // to know its offset, we provide the "end" case as a synonym. - b.switchCase(b.literal("end"), [ - // This will check/clear both context.thrown and context.rval. - b.returnStatement( - b.callExpression(this.contextProperty("stop"), []) - ) - ]) - ); - - return b.whileStatement( - b.literal(1), - b.switchStatement( - b.assignmentExpression( - "=", - this.contextProperty("prev"), - this.contextProperty("next") - ), - cases - ) - ); - }; - -// See comment above re: alreadyEnded. - function isSwitchCaseEnder(stmt) { - return n.BreakStatement.check(stmt) - || n.ContinueStatement.check(stmt) - || n.ReturnStatement.check(stmt) - || n.ThrowStatement.check(stmt); - } - - Ep.getTryLocsList = function() { - if (this.tryEntries.length === 0) { - // To avoid adding a needless [] to the majority of runtime.wrap - // argument lists, force the caller to handle this case specially. - return null; - } - - var lastLocValue = 0; - - return b.arrayExpression( - this.tryEntries.map(function(tryEntry) { - var thisLocValue = tryEntry.firstLoc.value; - assert.ok(thisLocValue >= lastLocValue, "try entries out of order"); - lastLocValue = thisLocValue; - - var ce = tryEntry.catchEntry; - var fe = tryEntry.finallyEntry; - - var locs = [ - tryEntry.firstLoc, - // The null here makes a hole in the array. - ce ? ce.firstLoc : null - ]; - - if (fe) { - locs[2] = fe.firstLoc; - locs[3] = fe.afterLoc; - } - - return b.arrayExpression(locs); - }) - ); - }; - -// All side effects must be realized in order. - -// If any subexpression harbors a leap, all subexpressions must be -// neutered of side effects. - -// No destructive modification of AST nodes. - - Ep.explode = function(path, ignoreResult) { - assert.ok(path instanceof types.NodePath); - - var node = path.value; - var self = this; - - n.Node.assert(node); - - if (n.Statement.check(node)) - return self.explodeStatement(path); - - if (n.Expression.check(node)) - return self.explodeExpression(path, ignoreResult); - - if (n.Declaration.check(node)) - throw getDeclError(node); - - switch (node.type) { - case "Program": - return path.get("body").map( - self.explodeStatement, - self - ); - - case "VariableDeclarator": - throw getDeclError(node); - - // These node types should be handled by their parent nodes - // (ObjectExpression, SwitchStatement, and TryStatement, respectively). - case "Property": - case "SwitchCase": - case "CatchClause": - throw new Error( - node.type + " nodes should be handled by their parents"); - - default: - throw new Error( - "unknown Node of type " + - JSON.stringify(node.type)); - } - }; - - function getDeclError(node) { - return new Error( - "all declarations should have been transformed into " + - "assignments before the Exploder began its work: " + - JSON.stringify(node)); - } - - Ep.explodeStatement = function(path, labelId) { - assert.ok(path instanceof types.NodePath); - - var stmt = path.value; - var self = this; - - n.Statement.assert(stmt); - - if (labelId) { - n.Identifier.assert(labelId); - } else { - labelId = null; - } - - // Explode BlockStatement nodes even if they do not contain a yield, - // because we don't want or need the curly braces. - if (n.BlockStatement.check(stmt)) { - return path.get("body").each( - self.explodeStatement, - self - ); - } - - if (!meta.containsLeap(stmt)) { - // Technically we should be able to avoid emitting the statement - // altogether if !meta.hasSideEffects(stmt), but that leads to - // confusing generated code (for instance, `while (true) {}` just - // disappears) and is probably a more appropriate job for a dedicated - // dead code elimination pass. - self.emit(stmt); - return; - } - - switch (stmt.type) { - case "ExpressionStatement": - self.explodeExpression(path.get("expression"), true); - break; - - case "LabeledStatement": - var after = loc(); - - // Did you know you can break from any labeled block statement or - // control structure? Well, you can! Note: when a labeled loop is - // encountered, the leap.LabeledEntry created here will immediately - // enclose a leap.LoopEntry on the leap manager's stack, and both - // entries will have the same label. Though this works just fine, it - // may seem a bit redundant. In theory, we could check here to - // determine if stmt knows how to handle its own label; for example, - // stmt happens to be a WhileStatement and so we know it's going to - // establish its own LoopEntry when we explode it (below). Then this - // LabeledEntry would be unnecessary. Alternatively, we might be - // tempted not to pass stmt.label down into self.explodeStatement, - // because we've handled the label here, but that's a mistake because - // labeled loops may contain labeled continue statements, which is not - // something we can handle in this generic case. All in all, I think a - // little redundancy greatly simplifies the logic of this case, since - // it's clear that we handle all possible LabeledStatements correctly - // here, regardless of whether they interact with the leap manager - // themselves. Also remember that labels and break/continue-to-label - // statements are rare, and all of this logic happens at transform - // time, so it has no additional runtime cost. - self.leapManager.withEntry( - new leap.LabeledEntry(after, stmt.label), - function() { - self.explodeStatement(path.get("body"), stmt.label); - } - ); - - self.mark(after); - - break; - - case "WhileStatement": - var before = loc(); - var after = loc(); - - self.mark(before); - self.jumpIfNot(self.explodeExpression(path.get("test")), after); - self.leapManager.withEntry( - new leap.LoopEntry(after, before, labelId), - function() { self.explodeStatement(path.get("body")); } - ); - self.jump(before); - self.mark(after); - - break; - - case "DoWhileStatement": - var first = loc(); - var test = loc(); - var after = loc(); - - self.mark(first); - self.leapManager.withEntry( - new leap.LoopEntry(after, test, labelId), - function() { self.explode(path.get("body")); } - ); - self.mark(test); - self.jumpIf(self.explodeExpression(path.get("test")), first); - self.mark(after); - - break; - - case "ForStatement": - var head = loc(); - var update = loc(); - var after = loc(); - - if (stmt.init) { - // We pass true here to indicate that if stmt.init is an expression - // then we do not care about its result. - self.explode(path.get("init"), true); - } - - self.mark(head); - - if (stmt.test) { - self.jumpIfNot(self.explodeExpression(path.get("test")), after); - } else { - // No test means continue unconditionally. - } - - self.leapManager.withEntry( - new leap.LoopEntry(after, update, labelId), - function() { self.explodeStatement(path.get("body")); } - ); - - self.mark(update); - - if (stmt.update) { - // We pass true here to indicate that if stmt.update is an - // expression then we do not care about its result. - self.explode(path.get("update"), true); - } - - self.jump(head); - - self.mark(after); - - break; - - case "ForInStatement": - var head = loc(); - var after = loc(); - - var keyIterNextFn = self.makeTempVar(); - self.emitAssign( - keyIterNextFn, - b.callExpression( - runtimeProperty("keys"), - [self.explodeExpression(path.get("right"))] - ) - ); - - self.mark(head); - - var keyInfoTmpVar = self.makeTempVar(); - self.jumpIf( - b.memberExpression( - b.assignmentExpression( - "=", - keyInfoTmpVar, - b.callExpression(keyIterNextFn, []) - ), - b.identifier("done"), - false - ), - after - ); - - self.emitAssign( - stmt.left, - b.memberExpression( - keyInfoTmpVar, - b.identifier("value"), - false - ) - ); - - self.leapManager.withEntry( - new leap.LoopEntry(after, head, labelId), - function() { self.explodeStatement(path.get("body")); } - ); - - self.jump(head); - - self.mark(after); - - break; - - case "BreakStatement": - self.emitAbruptCompletion({ - type: "break", - target: self.leapManager.getBreakLoc(stmt.label) - }); - - break; - - case "ContinueStatement": - self.emitAbruptCompletion({ - type: "continue", - target: self.leapManager.getContinueLoc(stmt.label) - }); - - break; - - case "SwitchStatement": - // Always save the discriminant into a temporary variable in case the - // test expressions overwrite values like context.sent. - var disc = self.emitAssign( - self.makeTempVar(), - self.explodeExpression(path.get("discriminant")) - ); - - var after = loc(); - var defaultLoc = loc(); - var condition = defaultLoc; - var caseLocs = []; - - // If there are no cases, .cases might be undefined. - var cases = stmt.cases || []; - - for (var i = cases.length - 1; i >= 0; --i) { - var c = cases[i]; - n.SwitchCase.assert(c); - - if (c.test) { - condition = b.conditionalExpression( - b.binaryExpression("===", disc, c.test), - caseLocs[i] = loc(), - condition - ); - } else { - caseLocs[i] = defaultLoc; - } - } - - self.jump(self.explodeExpression( - new types.NodePath(condition, path, "discriminant") - )); - - self.leapManager.withEntry( - new leap.SwitchEntry(after), - function() { - path.get("cases").each(function(casePath) { - var c = casePath.value; - var i = casePath.name; - - self.mark(caseLocs[i]); - - casePath.get("consequent").each( - self.explodeStatement, - self - ); - }); - } - ); - - self.mark(after); - if (defaultLoc.value === -1) { - self.mark(defaultLoc); - assert.strictEqual(after.value, defaultLoc.value); - } - - break; - - case "IfStatement": - var elseLoc = stmt.alternate && loc(); - var after = loc(); - - self.jumpIfNot( - self.explodeExpression(path.get("test")), - elseLoc || after - ); - - self.explodeStatement(path.get("consequent")); - - if (elseLoc) { - self.jump(after); - self.mark(elseLoc); - self.explodeStatement(path.get("alternate")); - } - - self.mark(after); - - break; - - case "ReturnStatement": - self.emitAbruptCompletion({ - type: "return", - value: self.explodeExpression(path.get("argument")) - }); - - break; - - case "WithStatement": - throw new Error( - node.type + " not supported in generator functions."); - - case "TryStatement": - var after = loc(); - - var handler = stmt.handler; - if (!handler && stmt.handlers) { - handler = stmt.handlers[0] || null; - } - - var catchLoc = handler && loc(); - var catchEntry = catchLoc && new leap.CatchEntry( - catchLoc, - handler.param - ); - - var finallyLoc = stmt.finalizer && loc(); - var finallyEntry = finallyLoc && - new leap.FinallyEntry(finallyLoc, after); - - var tryEntry = new leap.TryEntry( - self.getUnmarkedCurrentLoc(), - catchEntry, - finallyEntry - ); - - self.tryEntries.push(tryEntry); - self.updateContextPrevLoc(tryEntry.firstLoc); - - self.leapManager.withEntry(tryEntry, function() { - self.explodeStatement(path.get("block")); - - if (catchLoc) { - if (finallyLoc) { - // If we have both a catch block and a finally block, then - // because we emit the catch block first, we need to jump over - // it to the finally block. - self.jump(finallyLoc); - - } else { - // If there is no finally block, then we need to jump over the - // catch block to the fall-through location. - self.jump(after); - } - - self.updateContextPrevLoc(self.mark(catchLoc)); - - var bodyPath = path.get("handler", "body"); - var safeParam = self.makeTempVar(); - self.clearPendingException(tryEntry.firstLoc, safeParam); - - var catchScope = bodyPath.scope; - var catchParamName = handler.param.name; - n.CatchClause.assert(catchScope.node); - assert.strictEqual(catchScope.lookup(catchParamName), catchScope); - - types.visit(bodyPath, { - visitIdentifier: function(path) { - if (util.isReference(path, catchParamName) && - path.scope.lookup(catchParamName) === catchScope) { - return safeParam; - } - - this.traverse(path); - }, - - visitFunction: function(path) { - if (path.scope.declares(catchParamName)) { - // Don't descend into nested scopes that shadow the catch - // parameter with their own declarations. This isn't - // logically necessary because of the path.scope.lookup we - // do in visitIdentifier, but it saves time. - return false; - } - - this.traverse(path); - } - }); - - self.leapManager.withEntry(catchEntry, function() { - self.explodeStatement(bodyPath); - }); - } - - if (finallyLoc) { - self.updateContextPrevLoc(self.mark(finallyLoc)); - - self.leapManager.withEntry(finallyEntry, function() { - self.explodeStatement(path.get("finalizer")); - }); - - self.emit(b.returnStatement(b.callExpression( - self.contextProperty("finish"), - [finallyEntry.firstLoc] - ))); - } - }); - - self.mark(after); - - break; - - case "ThrowStatement": - self.emit(b.throwStatement( - self.explodeExpression(path.get("argument")) - )); - - break; - - default: - throw new Error( - "unknown Statement of type " + - JSON.stringify(stmt.type)); - } - }; - - Ep.emitAbruptCompletion = function(record) { - if (!isValidCompletion(record)) { - assert.ok( - false, - "invalid completion record: " + - JSON.stringify(record) - ); - } - - assert.notStrictEqual( - record.type, "normal", - "normal completions are not abrupt" - ); - - var abruptArgs = [b.literal(record.type)]; - - if (record.type === "break" || - record.type === "continue") { - n.Literal.assert(record.target); - abruptArgs[1] = record.target; - } else if (record.type === "return" || - record.type === "throw") { - if (record.value) { - n.Expression.assert(record.value); - abruptArgs[1] = record.value; - } - } - - this.emit( - b.returnStatement( - b.callExpression( - this.contextProperty("abrupt"), - abruptArgs - ) - ) - ); - }; - - function isValidCompletion(record) { - var type = record.type; - - if (type === "normal") { - return !hasOwn.call(record, "target"); - } - - if (type === "break" || - type === "continue") { - return !hasOwn.call(record, "value") - && n.Literal.check(record.target); - } - - if (type === "return" || - type === "throw") { - return hasOwn.call(record, "value") - && !hasOwn.call(record, "target"); - } - - return false; - } - - -// Not all offsets into emitter.listing are potential jump targets. For -// example, execution typically falls into the beginning of a try block -// without jumping directly there. This method returns the current offset -// without marking it, so that a switch case will not necessarily be -// generated for this offset (I say "not necessarily" because the same -// location might end up being marked in the process of emitting other -// statements). There's no logical harm in marking such locations as jump -// targets, but minimizing the number of switch cases keeps the generated -// code shorter. - Ep.getUnmarkedCurrentLoc = function() { - return b.literal(this.listing.length); - }; - -// The context.prev property takes the value of context.next whenever we -// evaluate the switch statement discriminant, which is generally good -// enough for tracking the last location we jumped to, but sometimes -// context.prev needs to be more precise, such as when we fall -// successfully out of a try block and into a finally block without -// jumping. This method exists to update context.prev to the freshest -// available location. If we were implementing a full interpreter, we -// would know the location of the current instruction with complete -// precision at all times, but we don't have that luxury here, as it would -// be costly and verbose to set context.prev before every statement. - Ep.updateContextPrevLoc = function(loc) { - if (loc) { - n.Literal.assert(loc); - - if (loc.value === -1) { - // If an uninitialized location literal was passed in, set its value - // to the current this.listing.length. - loc.value = this.listing.length; - } else { - // Otherwise assert that the location matches the current offset. - assert.strictEqual(loc.value, this.listing.length); - } - - } else { - loc = this.getUnmarkedCurrentLoc(); - } - - // Make sure context.prev is up to date in case we fell into this try - // statement without jumping to it. TODO Consider avoiding this - // assignment when we know control must have jumped here. - this.emitAssign(this.contextProperty("prev"), loc); - }; - - Ep.explodeExpression = function(path, ignoreResult) { - assert.ok(path instanceof types.NodePath); - - var expr = path.value; - if (expr) { - n.Expression.assert(expr); - } else { - return expr; - } - - var self = this; - var result; // Used optionally by several cases below. - - function finish(expr) { - n.Expression.assert(expr); - if (ignoreResult) { - self.emit(expr); - } else { - return expr; - } - } - - // If the expression does not contain a leap, then we either emit the - // expression as a standalone statement or return it whole. - if (!meta.containsLeap(expr)) { - return finish(expr); - } - - // If any child contains a leap (such as a yield or labeled continue or - // break statement), then any sibling subexpressions will almost - // certainly have to be exploded in order to maintain the order of their - // side effects relative to the leaping child(ren). - var hasLeapingChildren = meta.containsLeap.onlyChildren(expr); - - // In order to save the rest of explodeExpression from a combinatorial - // trainwreck of special cases, explodeViaTempVar is responsible for - // deciding when a subexpression needs to be "exploded," which is my - // very technical term for emitting the subexpression as an assignment - // to a temporary variable and the substituting the temporary variable - // for the original subexpression. Think of exploded view diagrams, not - // Michael Bay movies. The point of exploding subexpressions is to - // control the precise order in which the generated code realizes the - // side effects of those subexpressions. - function explodeViaTempVar(tempVar, childPath, ignoreChildResult) { - assert.ok(childPath instanceof types.NodePath); - - assert.ok( - !ignoreChildResult || !tempVar, - "Ignoring the result of a child expression but forcing it to " + - "be assigned to a temporary variable?" - ); - - var result = self.explodeExpression(childPath, ignoreChildResult); - - if (ignoreChildResult) { - // Side effects already emitted above. - - } else if (tempVar || (hasLeapingChildren && - (self.isVolatileContextProperty(result) || - meta.hasSideEffects(result)))) { - // If tempVar was provided, then the result will always be assigned - // to it, even if the result does not otherwise need to be assigned - // to a temporary variable. When no tempVar is provided, we have - // the flexibility to decide whether a temporary variable is really - // necessary. In general, temporary assignment is required only - // when some other child contains a leap and the child in question - // is a context property like $ctx.sent that might get overwritten - // or an expression with side effects that need to occur in proper - // sequence relative to the leap. - result = self.emitAssign( - tempVar || self.makeTempVar(), - result - ); - } - return result; - } - - // If ignoreResult is true, then we must take full responsibility for - // emitting the expression with all its side effects, and we should not - // return a result. - - switch (expr.type) { - case "MemberExpression": - return finish(b.memberExpression( - self.explodeExpression(path.get("object")), - expr.computed - ? explodeViaTempVar(null, path.get("property")) - : expr.property, - expr.computed - )); - - case "CallExpression": - var oldCalleePath = path.get("callee"); - var newCallee = self.explodeExpression(oldCalleePath); - - // If the callee was not previously a MemberExpression, then the - // CallExpression was "unqualified," meaning its `this` object should - // be the global object. If the exploded expression has become a - // MemberExpression, then we need to force it to be unqualified by - // using the (0, object.property)(...) trick; otherwise, it will - // receive the object of the MemberExpression as its `this` object. - if (!n.MemberExpression.check(oldCalleePath.node) && - n.MemberExpression.check(newCallee)) { - newCallee = b.sequenceExpression([ - b.literal(0), - newCallee - ]); - } - - return finish(b.callExpression( - newCallee, - path.get("arguments").map(function(argPath) { - return explodeViaTempVar(null, argPath); - }) - )); - - case "NewExpression": - return finish(b.newExpression( - explodeViaTempVar(null, path.get("callee")), - path.get("arguments").map(function(argPath) { - return explodeViaTempVar(null, argPath); - }) - )); - - case "ObjectExpression": - return finish(b.objectExpression( - path.get("properties").map(function(propPath) { - return b.property( - propPath.value.kind, - propPath.value.key, - explodeViaTempVar(null, propPath.get("value")) - ); - }) - )); - - case "ArrayExpression": - return finish(b.arrayExpression( - path.get("elements").map(function(elemPath) { - return explodeViaTempVar(null, elemPath); - }) - )); - - case "SequenceExpression": - var lastIndex = expr.expressions.length - 1; - - path.get("expressions").each(function(exprPath) { - if (exprPath.name === lastIndex) { - result = self.explodeExpression(exprPath, ignoreResult); - } else { - self.explodeExpression(exprPath, true); - } - }); - - return result; - - case "LogicalExpression": - var after = loc(); - - if (!ignoreResult) { - result = self.makeTempVar(); - } - - var left = explodeViaTempVar(result, path.get("left")); - - if (expr.operator === "&&") { - self.jumpIfNot(left, after); - } else { - assert.strictEqual(expr.operator, "||"); - self.jumpIf(left, after); - } - - explodeViaTempVar(result, path.get("right"), ignoreResult); - - self.mark(after); - - return result; - - case "ConditionalExpression": - var elseLoc = loc(); - var after = loc(); - var test = self.explodeExpression(path.get("test")); - - self.jumpIfNot(test, elseLoc); - - if (!ignoreResult) { - result = self.makeTempVar(); - } - - explodeViaTempVar(result, path.get("consequent"), ignoreResult); - self.jump(after); - - self.mark(elseLoc); - explodeViaTempVar(result, path.get("alternate"), ignoreResult); - - self.mark(after); - - return result; - - case "UnaryExpression": - return finish(b.unaryExpression( - expr.operator, - // Can't (and don't need to) break up the syntax of the argument. - // Think about delete a[b]. - self.explodeExpression(path.get("argument")), - !!expr.prefix - )); - - case "BinaryExpression": - return finish(b.binaryExpression( - expr.operator, - explodeViaTempVar(null, path.get("left")), - explodeViaTempVar(null, path.get("right")) - )); - - case "AssignmentExpression": - return finish(b.assignmentExpression( - expr.operator, - self.explodeExpression(path.get("left")), - self.explodeExpression(path.get("right")) - )); - - case "UpdateExpression": - return finish(b.updateExpression( - expr.operator, - self.explodeExpression(path.get("argument")), - expr.prefix - )); - - case "YieldExpression": - var after = loc(); - var arg = expr.argument && self.explodeExpression(path.get("argument")); - - if (arg && expr.delegate) { - var result = self.makeTempVar(); - - self.emit(b.returnStatement(b.callExpression( - self.contextProperty("delegateYield"), [ - arg, - b.literal(result.property.name), - after - ] - ))); - - self.mark(after); - - return result; - } - - self.emitAssign(self.contextProperty("next"), after); - self.emit(b.returnStatement(arg || null)); - self.mark(after); - - return self.contextProperty("sent"); - - default: - throw new Error( - "unknown Expression of type " + - JSON.stringify(expr.type)); - } - }; - -},{"./leap":451,"./meta":452,"./util":453,"assert":203,"recast":480}],450:[function(require,module,exports){ - /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - - var assert = require("assert"); - var types = require("recast").types; - var n = types.namedTypes; - var b = types.builders; - var hasOwn = Object.prototype.hasOwnProperty; - -// The hoist function takes a FunctionExpression or FunctionDeclaration -// and replaces any Declaration nodes in its body with assignments, then -// returns a VariableDeclaration containing just the names of the removed -// declarations. - exports.hoist = function(funPath) { - assert.ok(funPath instanceof types.NodePath); - n.Function.assert(funPath.value); - - var vars = {}; - - function varDeclToExpr(vdec, includeIdentifiers) { - n.VariableDeclaration.assert(vdec); - var exprs = []; - - vdec.declarations.forEach(function(dec) { - vars[dec.id.name] = dec.id; - - if (dec.init) { - exprs.push(b.assignmentExpression( - "=", dec.id, dec.init - )); - } else if (includeIdentifiers) { - exprs.push(dec.id); - } - }); - - if (exprs.length === 0) - return null; - - if (exprs.length === 1) - return exprs[0]; - - return b.sequenceExpression(exprs); - } - - types.visit(funPath.get("body"), { - visitVariableDeclaration: function(path) { - var expr = varDeclToExpr(path.value, false); - if (expr === null) { - path.replace(); - } else { - // We don't need to traverse this expression any further because - // there can't be any new declarations inside an expression. - return b.expressionStatement(expr); - } - - // Since the original node has been either removed or replaced, - // avoid traversing it any further. - return false; - }, - - visitForStatement: function(path) { - var init = path.value.init; - if (n.VariableDeclaration.check(init)) { - path.get("init").replace(varDeclToExpr(init, false)); - } - this.traverse(path); - }, - - visitForInStatement: function(path) { - var left = path.value.left; - if (n.VariableDeclaration.check(left)) { - path.get("left").replace(varDeclToExpr(left, true)); - } - this.traverse(path); - }, - - visitFunctionDeclaration: function(path) { - var node = path.value; - vars[node.id.name] = node.id; - - var parentNode = path.parent.node; - var assignment = b.expressionStatement( - b.assignmentExpression( - "=", - node.id, - b.functionExpression( - node.id, - node.params, - node.body, - node.generator, - node.expression - ) - ) - ); - - if (n.BlockStatement.check(path.parent.node)) { - // Insert the assignment form before the first statement in the - // enclosing block. - path.parent.get("body").unshift(assignment); - - // Remove the function declaration now that we've inserted the - // equivalent assignment form at the beginning of the block. - path.replace(); - - } else { - // If the parent node is not a block statement, then we can just - // replace the declaration with the equivalent assignment form - // without worrying about hoisting it. - path.replace(assignment); - } - - // Don't hoist variables out of inner functions. - return false; - }, - - visitFunctionExpression: function(path) { - // Don't descend into nested function expressions. - return false; - } - }); - - var paramNames = {}; - funPath.get("params").each(function(paramPath) { - var param = paramPath.value; - if (n.Identifier.check(param)) { - paramNames[param.name] = param; - } else { - // Variables declared by destructuring parameter patterns will be - // harmlessly re-declared. - } - }); - - var declarations = []; - - Object.keys(vars).forEach(function(name) { - if (!hasOwn.call(paramNames, name)) { - declarations.push(b.variableDeclarator(vars[name], null)); - } - }); - - if (declarations.length === 0) { - return null; // Be sure to handle this case! - } - - return b.variableDeclaration("var", declarations); - }; - -},{"assert":203,"recast":480}],451:[function(require,module,exports){ - /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - - var assert = require("assert"); - var types = require("recast").types; - var n = types.namedTypes; - var b = types.builders; - var inherits = require("util").inherits; - var hasOwn = Object.prototype.hasOwnProperty; - - function Entry() { - assert.ok(this instanceof Entry); - } - - function FunctionEntry(returnLoc) { - Entry.call(this); - n.Literal.assert(returnLoc); - this.returnLoc = returnLoc; - } - - inherits(FunctionEntry, Entry); - exports.FunctionEntry = FunctionEntry; - - function LoopEntry(breakLoc, continueLoc, label) { - Entry.call(this); - - n.Literal.assert(breakLoc); - n.Literal.assert(continueLoc); - - if (label) { - n.Identifier.assert(label); - } else { - label = null; - } - - this.breakLoc = breakLoc; - this.continueLoc = continueLoc; - this.label = label; - } - - inherits(LoopEntry, Entry); - exports.LoopEntry = LoopEntry; - - function SwitchEntry(breakLoc) { - Entry.call(this); - n.Literal.assert(breakLoc); - this.breakLoc = breakLoc; - } - - inherits(SwitchEntry, Entry); - exports.SwitchEntry = SwitchEntry; - - function TryEntry(firstLoc, catchEntry, finallyEntry) { - Entry.call(this); - - n.Literal.assert(firstLoc); - - if (catchEntry) { - assert.ok(catchEntry instanceof CatchEntry); - } else { - catchEntry = null; - } - - if (finallyEntry) { - assert.ok(finallyEntry instanceof FinallyEntry); - } else { - finallyEntry = null; - } - - // Have to have one or the other (or both). - assert.ok(catchEntry || finallyEntry); - - this.firstLoc = firstLoc; - this.catchEntry = catchEntry; - this.finallyEntry = finallyEntry; - } - - inherits(TryEntry, Entry); - exports.TryEntry = TryEntry; - - function CatchEntry(firstLoc, paramId) { - Entry.call(this); - - n.Literal.assert(firstLoc); - n.Identifier.assert(paramId); - - this.firstLoc = firstLoc; - this.paramId = paramId; - } - - inherits(CatchEntry, Entry); - exports.CatchEntry = CatchEntry; - - function FinallyEntry(firstLoc, afterLoc) { - Entry.call(this); - n.Literal.assert(firstLoc); - n.Literal.assert(afterLoc); - this.firstLoc = firstLoc; - this.afterLoc = afterLoc; - } - - inherits(FinallyEntry, Entry); - exports.FinallyEntry = FinallyEntry; - - function LabeledEntry(breakLoc, label) { - Entry.call(this); - - n.Literal.assert(breakLoc); - n.Identifier.assert(label); - - this.breakLoc = breakLoc; - this.label = label; - } - - inherits(LabeledEntry, Entry); - exports.LabeledEntry = LabeledEntry; - - function LeapManager(emitter) { - assert.ok(this instanceof LeapManager); - - var Emitter = require("./emit").Emitter; - assert.ok(emitter instanceof Emitter); - - this.emitter = emitter; - this.entryStack = [new FunctionEntry(emitter.finalLoc)]; - } - - var LMp = LeapManager.prototype; - exports.LeapManager = LeapManager; - - LMp.withEntry = function(entry, callback) { - assert.ok(entry instanceof Entry); - this.entryStack.push(entry); - try { - callback.call(this.emitter); - } finally { - var popped = this.entryStack.pop(); - assert.strictEqual(popped, entry); - } - }; - - LMp._findLeapLocation = function(property, label) { - for (var i = this.entryStack.length - 1; i >= 0; --i) { - var entry = this.entryStack[i]; - var loc = entry[property]; - if (loc) { - if (label) { - if (entry.label && - entry.label.name === label.name) { - return loc; - } - } else if (entry instanceof LabeledEntry) { - // Ignore LabeledEntry entries unless we are actually breaking to - // a label. - } else { - return loc; - } - } - } - - return null; - }; - - LMp.getBreakLoc = function(label) { - return this._findLeapLocation("breakLoc", label); - }; - - LMp.getContinueLoc = function(label) { - return this._findLeapLocation("continueLoc", label); - }; - -},{"./emit":449,"assert":203,"recast":480,"util":229}],452:[function(require,module,exports){ - /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - - var assert = require("assert"); - var m = require("private").makeAccessor(); - var types = require("recast").types; - var isArray = types.builtInTypes.array; - var n = types.namedTypes; - var hasOwn = Object.prototype.hasOwnProperty; - - function makePredicate(propertyName, knownTypes) { - function onlyChildren(node) { - n.Node.assert(node); - - // Assume no side effects until we find out otherwise. - var result = false; - - function check(child) { - if (result) { - // Do nothing. - } else if (isArray.check(child)) { - child.some(check); - } else if (n.Node.check(child)) { - assert.strictEqual(result, false); - result = predicate(child); - } - return result; - } - - types.eachField(node, function(name, child) { - check(child); - }); - - return result; - } - - function predicate(node) { - n.Node.assert(node); - - var meta = m(node); - if (hasOwn.call(meta, propertyName)) - return meta[propertyName]; - - // Certain types are "opaque," which means they have no side - // effects or leaps and we don't care about their subexpressions. - if (hasOwn.call(opaqueTypes, node.type)) - return meta[propertyName] = false; - - if (hasOwn.call(knownTypes, node.type)) - return meta[propertyName] = true; - - return meta[propertyName] = onlyChildren(node); - } - - predicate.onlyChildren = onlyChildren; - - return predicate; - } - - var opaqueTypes = { - FunctionExpression: true - }; - -// These types potentially have side effects regardless of what side -// effects their subexpressions have. - var sideEffectTypes = { - CallExpression: true, // Anything could happen! - ForInStatement: true, // Modifies the key variable. - UnaryExpression: true, // Think delete. - BinaryExpression: true, // Might invoke .toString() or .valueOf(). - AssignmentExpression: true, // Side-effecting by definition. - UpdateExpression: true, // Updates are essentially assignments. - NewExpression: true // Similar to CallExpression. - }; - -// These types are the direct cause of all leaps in control flow. - var leapTypes = { - YieldExpression: true, - BreakStatement: true, - ContinueStatement: true, - ReturnStatement: true, - ThrowStatement: true - }; - -// All leap types are also side effect types. - for (var type in leapTypes) { - if (hasOwn.call(leapTypes, type)) { - sideEffectTypes[type] = leapTypes[type]; - } - } - - exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes); - exports.containsLeap = makePredicate("containsLeap", leapTypes); - -},{"assert":203,"private":448,"recast":480}],453:[function(require,module,exports){ - /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - - var assert = require("assert"); - var types = require("recast").types; - var n = types.namedTypes; - var b = types.builders; - var hasOwn = Object.prototype.hasOwnProperty; - - exports.defaults = function(obj) { - var len = arguments.length; - var extension; - - for (var i = 1; i < len; ++i) { - if ((extension = arguments[i])) { - for (var key in extension) { - if (hasOwn.call(extension, key) && !hasOwn.call(obj, key)) { - obj[key] = extension[key]; - } - } - } - } - - return obj; - }; - - exports.runtimeProperty = function(name) { - return b.memberExpression( - b.identifier("regeneratorRuntime"), - b.identifier(name), - false - ); - }; - -// Inspired by the isReference function from ast-util: -// https://github.com/eventualbuddha/ast-util/blob/9bf91c5ce8/lib/index.js#L466-L506 - exports.isReference = function(path, name) { - var node = path.value; - - if (!n.Identifier.check(node)) { - return false; - } - - if (name && node.name !== name) { - return false; - } - - var parent = path.parent.value; - - switch (parent.type) { - case "VariableDeclarator": - return path.name === "init"; - - case "MemberExpression": - return path.name === "object" || ( - parent.computed && path.name === "property" - ); - - case "FunctionExpression": - case "FunctionDeclaration": - case "ArrowFunctionExpression": - if (path.name === "id") { - return false; - } - - if (parent.params === path.parentPath && - parent.params[path.name] === node) { - return false; - } - - return true; - - case "ClassDeclaration": - case "ClassExpression": - return path.name !== "id"; - - case "CatchClause": - return path.name !== "param"; - - case "Property": - case "MethodDefinition": - return path.name !== "key"; - - case "ImportSpecifier": - case "ImportDefaultSpecifier": - case "ImportNamespaceSpecifier": - case "LabeledStatement": - return false; - - default: - return true; - } - }; - -},{"assert":203,"recast":480}],454:[function(require,module,exports){ - /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - - var assert = require("assert"); - var fs = require("fs"); - var recast = require("recast"); - var types = recast.types; - var n = types.namedTypes; - var b = types.builders; - var isArray = types.builtInTypes.array; - var isObject = types.builtInTypes.object; - var NodePath = types.NodePath; - var hoist = require("./hoist").hoist; - var Emitter = require("./emit").Emitter; - var runtimeProperty = require("./util").runtimeProperty; - var getMarkInfo = require("private").makeAccessor(); - - exports.transform = function transform(node, options) { - options = options || {}; - - var path = node instanceof NodePath ? node : new NodePath(node); - visitor.visit(path, options); - node = path.value; - - if (options.includeRuntime === true || - (options.includeRuntime === 'if used' && visitor.wasChangeReported())) { - injectRuntime(n.File.check(node) ? node.program : node); - } - - options.madeChanges = visitor.wasChangeReported(); - - return node; - }; - - function injectRuntime(program) { - n.Program.assert(program); - - // Include the runtime by modifying the AST rather than by concatenating - // strings. This technique will allow for more accurate source mapping. - var runtimePath = require("..").runtime.path; - var runtime = fs.readFileSync(runtimePath, "utf8"); - var runtimeBody = recast.parse(runtime, { - sourceFileName: runtimePath - }).program.body; - - var body = program.body; - body.unshift.apply(body, runtimeBody); - } - - var visitor = types.PathVisitor.fromMethodsObject({ - reset: function(node, options) { - this.options = options; - }, - - visitFunction: function(path) { - // Calling this.traverse(path) first makes for a post-order traversal. - this.traverse(path); - - var node = path.value; - var shouldTransformAsync = node.async && !this.options.disableAsync; - - if (!node.generator && !shouldTransformAsync) { - return; - } - - this.reportChanged(); - - if (node.expression) { - // Transform expression lambdas into normal functions. - node.expression = false; - node.body = b.blockStatement([ - b.returnStatement(node.body) - ]); - } - - if (shouldTransformAsync) { - awaitVisitor.visit(path.get("body")); - } - - var outerBody = []; - var innerBody = []; - var bodyPath = path.get("body", "body"); - - bodyPath.each(function(childPath) { - var node = childPath.value; - if (node && node._blockHoist != null) { - outerBody.push(node); - } else { - innerBody.push(node); - } - }); - - if (outerBody.length > 0) { - // Only replace the inner body if we actually hoisted any statements - // to the outer body. - bodyPath.replace(innerBody); - } - - var outerFnExpr = getOuterFnExpr(path); - // Note that getOuterFnExpr has the side-effect of ensuring that the - // function has a name (so node.id will always be an Identifier), even - // if a temporary name has to be synthesized. - n.Identifier.assert(node.id); - var innerFnId = b.identifier(node.id.name + "$"); - var contextId = path.scope.declareTemporary("context$"); - var argsId = path.scope.declareTemporary("args$"); - var shouldAliasArguments = renameArguments(path, argsId); - var vars = hoist(path); - - if (shouldAliasArguments) { - vars = vars || b.variableDeclaration("var", []); - vars.declarations.push(b.variableDeclarator( - argsId, b.identifier("arguments") - )); - } - - var emitter = new Emitter(contextId); - emitter.explode(path.get("body")); - - if (vars && vars.declarations.length > 0) { - outerBody.push(vars); - } - - var wrapArgs = [ - emitter.getContextFunction(innerFnId), - // Async functions that are not generators don't care about the - // outer function because they don't need it to be marked and don't - // inherit from its .prototype. - node.generator ? outerFnExpr : b.literal(null), - b.thisExpression() - ]; - - var tryLocsList = emitter.getTryLocsList(); - if (tryLocsList) { - wrapArgs.push(tryLocsList); - } - - var wrapCall = b.callExpression( - runtimeProperty(shouldTransformAsync ? "async" : "wrap"), - wrapArgs - ); - - outerBody.push(b.returnStatement(wrapCall)); - node.body = b.blockStatement(outerBody); - - var wasGeneratorFunction = node.generator; - if (wasGeneratorFunction) { - node.generator = false; - } - - if (shouldTransformAsync) { - node.async = false; - } - - if (wasGeneratorFunction && - n.Expression.check(node)) { - return b.callExpression(runtimeProperty("mark"), [node]); - } - }, - - visitForOfStatement: function(path) { - this.traverse(path); - - var node = path.value; - var tempIterId = path.scope.declareTemporary("t$"); - var tempIterDecl = b.variableDeclarator( - tempIterId, - b.callExpression( - runtimeProperty("values"), - [node.right] - ) - ); - - var tempInfoId = path.scope.declareTemporary("t$"); - var tempInfoDecl = b.variableDeclarator(tempInfoId, null); - - var init = node.left; - var loopId; - if (n.VariableDeclaration.check(init)) { - loopId = init.declarations[0].id; - init.declarations.push(tempIterDecl, tempInfoDecl); - } else { - loopId = init; - init = b.variableDeclaration("var", [ - tempIterDecl, - tempInfoDecl - ]); - } - n.Identifier.assert(loopId); - - var loopIdAssignExprStmt = b.expressionStatement( - b.assignmentExpression( - "=", - loopId, - b.memberExpression( - tempInfoId, - b.identifier("value"), - false - ) - ) - ); - - if (n.BlockStatement.check(node.body)) { - node.body.body.unshift(loopIdAssignExprStmt); - } else { - node.body = b.blockStatement([ - loopIdAssignExprStmt, - node.body - ]); - } - - return b.forStatement( - init, - b.unaryExpression( - "!", - b.memberExpression( - b.assignmentExpression( - "=", - tempInfoId, - b.callExpression( - b.memberExpression( - tempIterId, - b.identifier("next"), - false - ), - [] - ) - ), - b.identifier("done"), - false - ) - ), - null, - node.body - ); - } - }); - -// Given a NodePath for a Function, return an Expression node that can be -// used to refer reliably to the function object from inside the function. -// This expression is essentially a replacement for arguments.callee, with -// the key advantage that it works in strict mode. - function getOuterFnExpr(funPath) { - var node = funPath.value; - n.Function.assert(node); - - if (node.generator && // Non-generator functions don't need to be marked. - n.FunctionDeclaration.check(node)) { - var pp = funPath.parent; - - while (pp && !(n.BlockStatement.check(pp.value) || - n.Program.check(pp.value))) { - pp = pp.parent; - } - - if (!pp) { - return node.id; - } - - var markDecl = getRuntimeMarkDecl(pp); - var markedArray = markDecl.declarations[0].id; - var funDeclIdArray = markDecl.declarations[0].init.callee.object; - n.ArrayExpression.assert(funDeclIdArray); - - var index = funDeclIdArray.elements.length; - funDeclIdArray.elements.push(node.id); - - return b.memberExpression( - markedArray, - b.literal(index), - true - ); - } - - return node.id || ( - node.id = funPath.scope.parent.declareTemporary("callee$") - ); - } - - function getRuntimeMarkDecl(blockPath) { - assert.ok(blockPath instanceof NodePath); - var block = blockPath.node; - isArray.assert(block.body); - - var info = getMarkInfo(block); - if (info.decl) { - return info.decl; - } - - info.decl = b.variableDeclaration("var", [ - b.variableDeclarator( - blockPath.scope.declareTemporary("marked"), - b.callExpression( - b.memberExpression( - b.arrayExpression([]), - b.identifier("map"), - false - ), - [runtimeProperty("mark")] - ) - ) - ]); - - for (var i = 0; i < block.body.length; ++i) { - if (!shouldNotHoistAbove(blockPath.get("body", i))) { - break; - } - } - - blockPath.get("body").insertAt(i, info.decl); - - return info.decl; - } - - function shouldNotHoistAbove(stmtPath) { - var value = stmtPath.value; - n.Statement.assert(value); - - // If the first statement is a "use strict" declaration, make sure to - // insert hoisted declarations afterwards. - return n.ExpressionStatement.check(value) && - n.Literal.check(value.expression) && - value.expression.value === "use strict"; - } - - function renameArguments(funcPath, argsId) { - assert.ok(funcPath instanceof types.NodePath); - var func = funcPath.value; - var didReplaceArguments = false; - var hasImplicitArguments = false; - - recast.visit(funcPath, { - visitFunction: function(path) { - if (path.value === func) { - hasImplicitArguments = !path.scope.lookup("arguments"); - this.traverse(path); - } else { - return false; - } - }, - - visitIdentifier: function(path) { - if (path.value.name === "arguments") { - var isMemberProperty = - n.MemberExpression.check(path.parent.node) && - path.name === "property" && - !path.parent.node.computed; - - if (!isMemberProperty) { - path.replace(argsId); - didReplaceArguments = true; - return false; - } - } - - this.traverse(path); - } - }); - - // If the traversal replaced any arguments identifiers, and those - // identifiers were free variables, then we need to alias the outer - // function's arguments object to the variable named by argsId. - return didReplaceArguments && hasImplicitArguments; - } - - var awaitVisitor = types.PathVisitor.fromMethodsObject({ - visitFunction: function(path) { - return false; // Don't descend into nested function scopes. - }, - - visitAwaitExpression: function(path) { - // Convert await and await* expressions to yield expressions. - var argument = path.value.argument; - - // If the parser supports await* syntax using a boolean .all property - // (#171), desugar that syntax to yield Promise.all(argument). - if (path.value.all) { - argument = b.callExpression( - b.memberExpression( - b.identifier("Promise"), - b.identifier("all"), - false - ), - [argument] - ); - } - - // Transforming `await x` to `yield regeneratorRuntime.awrap(x)` - // causes the argument to be wrapped in such a way that the runtime - // can distinguish between awaited and merely yielded values. - return b.yieldExpression( - b.callExpression( - runtimeProperty("awrap"), - [argument] - ), - false - ); - } - }); - -},{"..":455,"./emit":449,"./hoist":450,"./util":453,"assert":203,"fs":202,"private":448,"recast":480}],455:[function(require,module,exports){ - (function (__dirname){ - /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - - var assert = require("assert"); - var path = require("path"); - var fs = require("fs"); - var through = require("through"); - var transform = require("./lib/visit").transform; - var utils = require("./lib/util"); - var recast = require("recast"); - var types = recast.types; - var genOrAsyncFunExp = /\bfunction\s*\*|\basync\b/; - var blockBindingExp = /\b(let|const)\s+/; - - function exports(file, options) { - var data = []; - return through(write, end); - - function write(buf) { - data.push(buf); - } - - function end() { - this.queue(compile(data.join(""), options).code); - this.queue(null); - } - } - -// To get a writable stream for use as a browserify transform, call -// require("regenerator")(). - module.exports = exports; - -// To include the runtime globally in the current node process, call -// require("regenerator").runtime(). - function runtime() { - require("./runtime"); - } - exports.runtime = runtime; - runtime.path = path.join(__dirname, "runtime.js"); - - function compile(source, options) { - options = normalizeOptions(options); - - if (!genOrAsyncFunExp.test(source)) { - return { - // Shortcut: no generators or async functions to transform. - code: (options.includeRuntime === true ? fs.readFileSync( - path.join(__dirname, "runtime.js"), "utf-8" - ) + "\n" : "") + source - }; - } - - var recastOptions = getRecastOptions(options); - var ast = recast.parse(source, recastOptions); - var nodePath = new types.NodePath(ast); - var programPath = nodePath.get("program"); - - if (shouldVarify(source, options)) { - // Transpile let/const into var declarations. - varifyAst(programPath.node); - } - - transform(programPath, options); - - return recast.print(nodePath, recastOptions); - } - - function normalizeOptions(options) { - options = utils.defaults(options || {}, { - includeRuntime: false, - supportBlockBinding: true - }); - - if (!options.esprima) { - options.esprima = require("esprima-fb"); - } - - assert.ok( - /harmony/.test(options.esprima.version), - "Bad esprima version: " + options.esprima.version - ); - - return options; - } - - function getRecastOptions(options) { - var recastOptions = { - range: true - }; - - function copy(name) { - if (name in options) { - recastOptions[name] = options[name]; - } - } - - copy("esprima"); - copy("sourceFileName"); - copy("sourceMapName"); - copy("inputSourceMap"); - copy("sourceRoot"); - - return recastOptions; - } - - function shouldVarify(source, options) { - var supportBlockBinding = !!options.supportBlockBinding; - if (supportBlockBinding) { - if (!blockBindingExp.test(source)) { - supportBlockBinding = false; - } - } - - return supportBlockBinding; - } - - function varify(source, options) { - var recastOptions = getRecastOptions(normalizeOptions(options)); - var ast = recast.parse(source, recastOptions); - varifyAst(ast.program); - return recast.print(ast, recastOptions).code; - } - - function varifyAst(ast) { - types.namedTypes.Program.assert(ast); - - var defsResult = require("defs")(ast, { - ast: true, - disallowUnknownReferences: false, - disallowDuplicated: false, - disallowVars: false, - loopClosures: "iife" - }); - - if (defsResult.errors) { - throw new Error(defsResult.errors.join("\n")) - } - - return ast; - } - -// Convenience for just translating let/const to var declarations. - exports.varify = varify; - -// Transforms a string of source code, returning the { code, map? } result -// from recast.print. - exports.compile = compile; - -// To modify an AST directly, call require("regenerator").transform(ast). - exports.transform = transform; - - }).call(this,"/node_modules/regenerator") -},{"./lib/util":453,"./lib/visit":454,"./runtime":482,"assert":203,"defs":456,"esprima-fb":202,"fs":202,"path":212,"recast":480,"through":481}],456:[function(require,module,exports){ - "use strict"; - - var assert = require("assert"); - var is = require("simple-is"); - var fmt = require("simple-fmt"); - var stringmap = require("stringmap"); - var stringset = require("stringset"); - var alter = require("alter"); - var traverse = require("ast-traverse"); - var breakable = require("breakable"); - var Scope = require("./scope"); - var error = require("./error"); - var getline = error.getline; - var options = require("./options"); - var Stats = require("./stats"); - var jshint_vars = require("./jshint_globals/vars.js"); - - - function isConstLet(kind) { - return is.someof(kind, ["const", "let"]); - } - - function isVarConstLet(kind) { - return is.someof(kind, ["var", "const", "let"]); - } - - function isNonFunctionBlock(node) { - return node.type === "BlockStatement" && is.noneof(node.$parent.type, ["FunctionDeclaration", "FunctionExpression"]); - } - - function isForWithConstLet(node) { - return node.type === "ForStatement" && node.init && node.init.type === "VariableDeclaration" && isConstLet(node.init.kind); - } - - function isForInOfWithConstLet(node) { - return isForInOf(node) && node.left.type === "VariableDeclaration" && isConstLet(node.left.kind); - } - - function isForInOf(node) { - return is.someof(node.type, ["ForInStatement", "ForOfStatement"]); - } - - function isFunction(node) { - return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]); - } - - function isLoop(node) { - return is.someof(node.type, ["ForStatement", "ForInStatement", "ForOfStatement", "WhileStatement", "DoWhileStatement"]); - } - - function isReference(node) { - var parent = node.$parent; - return node.$refToScope || - node.type === "Identifier" && - !(parent.type === "VariableDeclarator" && parent.id === node) && // var|let|const $ - !(parent.type === "MemberExpression" && parent.computed === false && parent.property === node) && // obj.$ - !(parent.type === "Property" && parent.key === node) && // {$: ...} - !(parent.type === "LabeledStatement" && parent.label === node) && // $: ... - !(parent.type === "CatchClause" && parent.param === node) && // catch($) - !(isFunction(parent) && parent.id === node) && // function $(.. - !(isFunction(parent) && is.someof(node, parent.params)) && // function f($).. - true; - } - - function isLvalue(node) { - return isReference(node) && - ((node.$parent.type === "AssignmentExpression" && node.$parent.left === node) || - (node.$parent.type === "UpdateExpression" && node.$parent.argument === node)); - } - - function createScopes(node, parent) { - assert(!node.$scope); - - node.$parent = parent; - node.$scope = node.$parent ? node.$parent.$scope : null; // may be overridden - - if (node.type === "Program") { - // Top-level program is a scope - // There's no block-scope under it - node.$scope = new Scope({ - kind: "hoist", - node: node, - parent: null, - }); - - } else if (isFunction(node)) { - // Function is a scope, with params in it - // There's no block-scope under it - - node.$scope = new Scope({ - kind: "hoist", - node: node, - parent: node.$parent.$scope, - }); - - // function has a name - if (node.id) { - assert(node.id.type === "Identifier"); - - if (node.type === "FunctionDeclaration") { - // Function name goes in parent scope for declared functions - node.$parent.$scope.add(node.id.name, "fun", node.id, null); - } else if (node.type === "FunctionExpression") { - // Function name goes in function's scope for named function expressions - node.$scope.add(node.id.name, "fun", node.id, null); - } else { - assert(false); - } - } - - node.params.forEach(function(param) { - node.$scope.add(param.name, "param", param, null); - }); - - } else if (node.type === "VariableDeclaration") { - // Variable declarations names goes in current scope - assert(isVarConstLet(node.kind)); - node.declarations.forEach(function(declarator) { - assert(declarator.type === "VariableDeclarator"); - var name = declarator.id.name; - if (options.disallowVars && node.kind === "var") { - error(getline(declarator), "var {0} is not allowed (use let or const)", name); - } - node.$scope.add(name, node.kind, declarator.id, declarator.range[1]); - }); - - } else if (isForWithConstLet(node) || isForInOfWithConstLet(node)) { - // For(In/Of) loop with const|let declaration is a scope, with declaration in it - // There may be a block-scope under it - node.$scope = new Scope({ - kind: "block", - node: node, - parent: node.$parent.$scope, - }); - - } else if (isNonFunctionBlock(node)) { - // A block node is a scope unless parent is a function - node.$scope = new Scope({ - kind: "block", - node: node, - parent: node.$parent.$scope, - }); - - } else if (node.type === "CatchClause") { - var identifier = node.param; - - node.$scope = new Scope({ - kind: "catch-block", - node: node, - parent: node.$parent.$scope, - }); - node.$scope.add(identifier.name, "caught", identifier, null); - - // All hoist-scope keeps track of which variables that are propagated through, - // i.e. an reference inside the scope points to a declaration outside the scope. - // This is used to mark "taint" the name since adding a new variable in the scope, - // with a propagated name, would change the meaning of the existing references. - // - // catch(e) is special because even though e is a variable in its own scope, - // we want to make sure that catch(e){let e} is never transformed to - // catch(e){var e} (but rather var e$0). For that reason we taint the use of e - // in the closest hoist-scope, i.e. where var e$0 belongs. - node.$scope.closestHoistScope().markPropagates(identifier.name); - } - } - - function createTopScope(programScope, environments, globals) { - function inject(obj) { - for (var name in obj) { - var writeable = obj[name]; - var kind = (writeable ? "var" : "const"); - if (topScope.hasOwn(name)) { - topScope.remove(name); - } - topScope.add(name, kind, {loc: {start: {line: -1}}}, -1); - } - } - - var topScope = new Scope({ - kind: "hoist", - node: {}, - parent: null, - }); - - var complementary = { - undefined: false, - Infinity: false, - console: false, - }; - - inject(complementary); - inject(jshint_vars.reservedVars); - inject(jshint_vars.ecmaIdentifiers); - if (environments) { - environments.forEach(function(env) { - if (!jshint_vars[env]) { - error(-1, 'environment "{0}" not found', env); - } else { - inject(jshint_vars[env]); - } - }); - } - if (globals) { - inject(globals); - } - - // link it in - programScope.parent = topScope; - topScope.children.push(programScope); - - return topScope; - } - - function setupReferences(ast, allIdentifiers, opts) { - var analyze = (is.own(opts, "analyze") ? opts.analyze : true); - - function visit(node) { - if (!isReference(node)) { - return; - } - allIdentifiers.add(node.name); - - var scope = node.$scope.lookup(node.name); - if (analyze && !scope && options.disallowUnknownReferences) { - error(getline(node), "reference to unknown global variable {0}", node.name); - } - // check const and let for referenced-before-declaration - if (analyze && scope && is.someof(scope.getKind(node.name), ["const", "let"])) { - var allowedFromPos = scope.getFromPos(node.name); - var referencedAtPos = node.range[0]; - assert(is.finitenumber(allowedFromPos)); - assert(is.finitenumber(referencedAtPos)); - if (referencedAtPos < allowedFromPos) { - if (!node.$scope.hasFunctionScopeBetween(scope)) { - error(getline(node), "{0} is referenced before its declaration", node.name); - } - } - } - node.$refToScope = scope; - } - - traverse(ast, {pre: visit}); - } - -// TODO for loops init and body props are parallel to each other but init scope is outer that of body -// TODO is this a problem? - - function varify(ast, stats, allIdentifiers, changes) { - function unique(name) { - assert(allIdentifiers.has(name)); - for (var cnt = 0; ; cnt++) { - var genName = name + "$" + String(cnt); - if (!allIdentifiers.has(genName)) { - return genName; - } - } - } - - function renameDeclarations(node) { - if (node.type === "VariableDeclaration" && isConstLet(node.kind)) { - var hoistScope = node.$scope.closestHoistScope(); - var origScope = node.$scope; - - // text change const|let => var - changes.push({ - start: node.range[0], - end: node.range[0] + node.kind.length, - str: "var", - }); - - node.declarations.forEach(function(declarator) { - assert(declarator.type === "VariableDeclarator"); - var name = declarator.id.name; - - stats.declarator(node.kind); - - // rename if - // 1) name already exists in hoistScope, or - // 2) name is already propagated (passed) through hoistScope or manually tainted - var rename = (origScope !== hoistScope && - (hoistScope.hasOwn(name) || hoistScope.doesPropagate(name))); - - var newName = (rename ? unique(name) : name); - - origScope.remove(name); - hoistScope.add(newName, "var", declarator.id, declarator.range[1]); - - origScope.moves = origScope.moves || stringmap(); - origScope.moves.set(name, { - name: newName, - scope: hoistScope, - }); - - allIdentifiers.add(newName); - - if (newName !== name) { - stats.rename(name, newName, getline(declarator)); - - declarator.id.originalName = name; - declarator.id.name = newName; - - // textchange var x => var x$1 - changes.push({ - start: declarator.id.range[0], - end: declarator.id.range[1], - str: newName, - }); - } - }); - - // ast change const|let => var - node.kind = "var"; - } - } - - function renameReferences(node) { - if (!node.$refToScope) { - return; - } - var move = node.$refToScope.moves && node.$refToScope.moves.get(node.name); - if (!move) { - return; - } - node.$refToScope = move.scope; - - if (node.name !== move.name) { - node.originalName = node.name; - node.name = move.name; - - if (node.alterop) { - // node has no range because it is the result of another alter operation - var existingOp = null; - for (var i = 0; i < changes.length; i++) { - var op = changes[i]; - if (op.node === node) { - existingOp = op; - break; - } - } - assert(existingOp); - - // modify op - existingOp.str = move.name; - } else { - changes.push({ - start: node.range[0], - end: node.range[1], - str: move.name, - }); - } - } - } - - traverse(ast, {pre: renameDeclarations}); - traverse(ast, {pre: renameReferences}); - ast.$scope.traverse({pre: function(scope) { - delete scope.moves; - }}); - } - - - function detectLoopClosures(ast) { - traverse(ast, {pre: visit}); - - function detectIifyBodyBlockers(body, node) { - return breakable(function(brk) { - traverse(body, {pre: function(n) { - // if we hit an inner function of the loop body, don't traverse further - if (isFunction(n)) { - return false; - } - - var err = true; // reset to false in else-statement below - var msg = "loop-variable {0} is captured by a loop-closure that can't be transformed due to use of {1} at line {2}"; - if (n.type === "BreakStatement") { - error(getline(node), msg, node.name, "break", getline(n)); - } else if (n.type === "ContinueStatement") { - error(getline(node), msg, node.name, "continue", getline(n)); - } else if (n.type === "ReturnStatement") { - error(getline(node), msg, node.name, "return", getline(n)); - } else if (n.type === "YieldExpression") { - error(getline(node), msg, node.name, "yield", getline(n)); - } else if (n.type === "Identifier" && n.name === "arguments") { - error(getline(node), msg, node.name, "arguments", getline(n)); - } else if (n.type === "VariableDeclaration" && n.kind === "var") { - error(getline(node), msg, node.name, "var", getline(n)); - } else { - err = false; - } - if (err) { - brk(true); // break traversal - } - }}); - return false; - }); - } - - function visit(node) { - // forbidden pattern: - // * * * * - var loopNode = null; - if (isReference(node) && node.$refToScope && isConstLet(node.$refToScope.getKind(node.name))) { - // traverse nodes up towards root from constlet-def - // if we hit a function (before a loop) - ok! - // if we hit a loop - maybe-ouch - // if we reach root - ok! - for (var n = node.$refToScope.node; ; ) { - if (isFunction(n)) { - // we're ok (function-local) - return; - } else if (isLoop(n)) { - loopNode = n; - // maybe not ok (between loop and function) - break; - } - n = n.$parent; - if (!n) { - // ok (reached root) - return; - } - } - - assert(isLoop(loopNode)); - - // traverse scopes from reference-scope up towards definition-scope - // if we hit a function, ouch! - var defScope = node.$refToScope; - var generateIIFE = (options.loopClosures === "iife"); - - for (var s = node.$scope; s; s = s.parent) { - if (s === defScope) { - // we're ok - return; - } else if (isFunction(s.node)) { - // not ok (there's a function between the reference and definition) - // may be transformable via IIFE - - if (!generateIIFE) { - var msg = "loop-variable {0} is captured by a loop-closure. Tried \"loopClosures\": \"iife\" in defs-config.json?"; - return error(getline(node), msg, node.name); - } - - // here be dragons - // for (let x = ..; .. ; ..) { (function(){x})() } is forbidden because of current - // spec and VM status - if (loopNode.type === "ForStatement" && defScope.node === loopNode) { - var declarationNode = defScope.getNode(node.name); - return error(getline(declarationNode), "Not yet specced ES6 feature. {0} is declared in for-loop header and then captured in loop closure", declarationNode.name); - } - - // speak now or forever hold your peace - if (detectIifyBodyBlockers(loopNode.body, node)) { - // error already generated - return; - } - - // mark loop for IIFE-insertion - loopNode.$iify = true; - } - } - } - } - } - - function transformLoopClosures(root, ops, options) { - function insertOp(pos, str, node) { - var op = { - start: pos, - end: pos, - str: str, - } - if (node) { - op.node = node; - } - ops.push(op); - } - - traverse(root, {pre: function(node) { - if (!node.$iify) { - return; - } - - var hasBlock = (node.body.type === "BlockStatement"); - - var insertHead = (hasBlock ? - node.body.range[0] + 1 : // just after body { - node.body.range[0]); // just before existing expression - var insertFoot = (hasBlock ? - node.body.range[1] - 1 : // just before body } - node.body.range[1]); // just after existing expression - - var forInName = (isForInOf(node) && node.left.declarations[0].id.name);; - var iifeHead = fmt("(function({0}){", forInName ? forInName : ""); - var iifeTail = fmt("}).call(this{0});", forInName ? ", " + forInName : ""); - - // modify AST - var iifeFragment = options.parse(iifeHead + iifeTail); - var iifeExpressionStatement = iifeFragment.body[0]; - var iifeBlockStatement = iifeExpressionStatement.expression.callee.object.body; - - if (hasBlock) { - var forBlockStatement = node.body; - var tmp = forBlockStatement.body; - forBlockStatement.body = [iifeExpressionStatement]; - iifeBlockStatement.body = tmp; - } else { - var tmp$0 = node.body; - node.body = iifeExpressionStatement; - iifeBlockStatement.body[0] = tmp$0; - } - - // create ops - insertOp(insertHead, iifeHead); - - if (forInName) { - insertOp(insertFoot, "}).call(this, "); - - var args = iifeExpressionStatement.expression.arguments; - var iifeArgumentIdentifier = args[1]; - iifeArgumentIdentifier.alterop = true; - insertOp(insertFoot, forInName, iifeArgumentIdentifier); - - insertOp(insertFoot, ");"); - } else { - insertOp(insertFoot, iifeTail); - } - }}); - } - - function detectConstAssignment(ast) { - traverse(ast, {pre: function(node) { - if (isLvalue(node)) { - var scope = node.$scope.lookup(node.name); - if (scope && scope.getKind(node.name) === "const") { - error(getline(node), "can't assign to const variable {0}", node.name); - } - } - }}); - } - - function detectConstantLets(ast) { - traverse(ast, {pre: function(node) { - if (isLvalue(node)) { - var scope = node.$scope.lookup(node.name); - if (scope) { - scope.markWrite(node.name); - } - } - }}); - - ast.$scope.detectUnmodifiedLets(); - } - - function setupScopeAndReferences(root, opts) { - // setup scopes - traverse(root, {pre: createScopes}); - var topScope = createTopScope(root.$scope, options.environments, options.globals); - - // allIdentifiers contains all declared and referenced vars - // collect all declaration names (including those in topScope) - var allIdentifiers = stringset(); - topScope.traverse({pre: function(scope) { - allIdentifiers.addMany(scope.decls.keys()); - }}); - - // setup node.$refToScope, check for errors. - // also collects all referenced names to allIdentifiers - setupReferences(root, allIdentifiers, opts); - return allIdentifiers; - } - - function cleanupTree(root) { - traverse(root, {pre: function(node) { - for (var prop in node) { - if (prop[0] === "$") { - delete node[prop]; - } - } - }}); - } - - function run(src, config) { - // alter the options singleton with user configuration - for (var key in config) { - options[key] = config[key]; - } - - var parsed; - - if (is.object(src)) { - if (!options.ast) { - return { - errors: [ - "Can't produce string output when input is an AST. " + - "Did you forget to set options.ast = true?" - ], - }; - } - - // Received an AST object as src, so no need to parse it. - parsed = src; - - } else if (is.string(src)) { - try { - parsed = options.parse(src, { - loc: true, - range: true, - }); - } catch (e) { - return { - errors: [ - fmt("line {0} column {1}: Error during input file parsing\n{2}\n{3}", - e.lineNumber, - e.column, - src.split("\n")[e.lineNumber - 1], - fmt.repeat(" ", e.column - 1) + "^") - ], - }; - } - - } else { - return { - errors: ["Input was neither an AST object nor a string."], - }; - } - - var ast = parsed; - - // TODO detect unused variables (never read) - error.reset(); - - var allIdentifiers = setupScopeAndReferences(ast, {}); - - // static analysis passes - detectLoopClosures(ast); - detectConstAssignment(ast); - //detectConstantLets(ast); - - var changes = []; - transformLoopClosures(ast, changes, options); - - //ast.$scope.print(); process.exit(-1); - - if (error.errors.length >= 1) { - return { - errors: error.errors, - }; - } - - if (changes.length > 0) { - cleanupTree(ast); - allIdentifiers = setupScopeAndReferences(ast, {analyze: false}); - } - assert(error.errors.length === 0); - - // change constlet declarations to var, renamed if needed - // varify modifies the scopes and AST accordingly and - // returns a list of change fragments (to use with alter) - var stats = new Stats(); - varify(ast, stats, allIdentifiers, changes); - - if (options.ast) { - // return the modified AST instead of src code - // get rid of all added $ properties first, such as $parent and $scope - cleanupTree(ast); - return { - stats: stats, - ast: ast, - }; - } else { - // apply changes produced by varify and return the transformed src - var transformedSrc = alter(src, changes); - return { - stats: stats, - src: transformedSrc, - }; - } - } - - module.exports = run; - -},{"./error":457,"./jshint_globals/vars.js":458,"./options":459,"./scope":460,"./stats":461,"alter":462,"assert":203,"ast-traverse":464,"breakable":465,"simple-fmt":466,"simple-is":467,"stringmap":468,"stringset":469}],457:[function(require,module,exports){ - "use strict"; - - var fmt = require("simple-fmt"); - var assert = require("assert"); - - function error(line, var_args) { - assert(arguments.length >= 2); - - var msg = (arguments.length === 2 ? - String(var_args) : fmt.apply(fmt, Array.prototype.slice.call(arguments, 1))); - - error.errors.push(line === -1 ? msg : fmt("line {0}: {1}", line, msg)); - } - - error.reset = function() { - error.errors = []; - }; - - error.getline = function(node) { - if (node && node.loc && node.loc.start) { - return node.loc.start.line; - } - return -1; - }; - - error.reset(); - - module.exports = error; - -},{"assert":203,"simple-fmt":466}],458:[function(require,module,exports){ -// jshint -W001 - - "use strict"; - -// Identifiers provided by the ECMAScript standard. - - exports.reservedVars = { - arguments : false, - NaN : false - }; - - exports.ecmaIdentifiers = { - Array : false, - Boolean : false, - Date : false, - decodeURI : false, - decodeURIComponent : false, - encodeURI : false, - encodeURIComponent : false, - Error : false, - "eval" : false, - EvalError : false, - Function : false, - hasOwnProperty : false, - isFinite : false, - isNaN : false, - JSON : false, - Math : false, - Map : false, - Number : false, - Object : false, - parseInt : false, - parseFloat : false, - RangeError : false, - ReferenceError : false, - RegExp : false, - Set : false, - String : false, - SyntaxError : false, - TypeError : false, - URIError : false, - WeakMap : false - }; - -// Global variables commonly provided by a web browser environment. - - exports.browser = { - ArrayBuffer : false, - ArrayBufferView : false, - Audio : false, - Blob : false, - addEventListener : false, - applicationCache : false, - atob : false, - blur : false, - btoa : false, - clearInterval : false, - clearTimeout : false, - close : false, - closed : false, - DataView : false, - DOMParser : false, - defaultStatus : false, - document : false, - Element : false, - event : false, - FileReader : false, - Float32Array : false, - Float64Array : false, - FormData : false, - focus : false, - frames : false, - getComputedStyle : false, - HTMLElement : false, - HTMLAnchorElement : false, - HTMLBaseElement : false, - HTMLBlockquoteElement: false, - HTMLBodyElement : false, - HTMLBRElement : false, - HTMLButtonElement : false, - HTMLCanvasElement : false, - HTMLDirectoryElement : false, - HTMLDivElement : false, - HTMLDListElement : false, - HTMLFieldSetElement : false, - HTMLFontElement : false, - HTMLFormElement : false, - HTMLFrameElement : false, - HTMLFrameSetElement : false, - HTMLHeadElement : false, - HTMLHeadingElement : false, - HTMLHRElement : false, - HTMLHtmlElement : false, - HTMLIFrameElement : false, - HTMLImageElement : false, - HTMLInputElement : false, - HTMLIsIndexElement : false, - HTMLLabelElement : false, - HTMLLayerElement : false, - HTMLLegendElement : false, - HTMLLIElement : false, - HTMLLinkElement : false, - HTMLMapElement : false, - HTMLMenuElement : false, - HTMLMetaElement : false, - HTMLModElement : false, - HTMLObjectElement : false, - HTMLOListElement : false, - HTMLOptGroupElement : false, - HTMLOptionElement : false, - HTMLParagraphElement : false, - HTMLParamElement : false, - HTMLPreElement : false, - HTMLQuoteElement : false, - HTMLScriptElement : false, - HTMLSelectElement : false, - HTMLStyleElement : false, - HTMLTableCaptionElement: false, - HTMLTableCellElement : false, - HTMLTableColElement : false, - HTMLTableElement : false, - HTMLTableRowElement : false, - HTMLTableSectionElement: false, - HTMLTextAreaElement : false, - HTMLTitleElement : false, - HTMLUListElement : false, - HTMLVideoElement : false, - history : false, - Int16Array : false, - Int32Array : false, - Int8Array : false, - Image : false, - length : false, - localStorage : false, - location : false, - MessageChannel : false, - MessageEvent : false, - MessagePort : false, - moveBy : false, - moveTo : false, - MutationObserver : false, - name : false, - Node : false, - NodeFilter : false, - navigator : false, - onbeforeunload : true, - onblur : true, - onerror : true, - onfocus : true, - onload : true, - onresize : true, - onunload : true, - open : false, - openDatabase : false, - opener : false, - Option : false, - parent : false, - print : false, - removeEventListener : false, - resizeBy : false, - resizeTo : false, - screen : false, - scroll : false, - scrollBy : false, - scrollTo : false, - sessionStorage : false, - setInterval : false, - setTimeout : false, - SharedWorker : false, - status : false, - top : false, - Uint16Array : false, - Uint32Array : false, - Uint8Array : false, - Uint8ClampedArray : false, - WebSocket : false, - window : false, - Worker : false, - XMLHttpRequest : false, - XMLSerializer : false, - XPathEvaluator : false, - XPathException : false, - XPathExpression : false, - XPathNamespace : false, - XPathNSResolver : false, - XPathResult : false - }; - - exports.devel = { - alert : false, - confirm: false, - console: false, - Debug : false, - opera : false, - prompt : false - }; - - exports.worker = { - importScripts: true, - postMessage : true, - self : true - }; - -// Widely adopted global names that are not part of ECMAScript standard - exports.nonstandard = { - escape : false, - unescape: false - }; - -// Globals provided by popular JavaScript environments. - - exports.couch = { - "require" : false, - respond : false, - getRow : false, - emit : false, - send : false, - start : false, - sum : false, - log : false, - exports : false, - module : false, - provides : false - }; - - exports.node = { - __filename : false, - __dirname : false, - Buffer : false, - DataView : false, - console : false, - exports : true, // In Node it is ok to exports = module.exports = foo(); - GLOBAL : false, - global : false, - module : false, - process : false, - require : false, - setTimeout : false, - clearTimeout : false, - setInterval : false, - clearInterval: false - }; - - exports.phantom = { - phantom : true, - require : true, - WebPage : true - }; - - exports.rhino = { - defineClass : false, - deserialize : false, - gc : false, - help : false, - importPackage: false, - "java" : false, - load : false, - loadClass : false, - print : false, - quit : false, - readFile : false, - readUrl : false, - runCommand : false, - seal : false, - serialize : false, - spawn : false, - sync : false, - toint32 : false, - version : false - }; - - exports.wsh = { - ActiveXObject : true, - Enumerator : true, - GetObject : true, - ScriptEngine : true, - ScriptEngineBuildVersion : true, - ScriptEngineMajorVersion : true, - ScriptEngineMinorVersion : true, - VBArray : true, - WSH : true, - WScript : true, - XDomainRequest : true - }; - -// Globals provided by popular JavaScript libraries. - - exports.dojo = { - dojo : false, - dijit : false, - dojox : false, - define : false, - "require": false - }; - - exports.jquery = { - "$" : false, - jQuery : false - }; - - exports.mootools = { - "$" : false, - "$$" : false, - Asset : false, - Browser : false, - Chain : false, - Class : false, - Color : false, - Cookie : false, - Core : false, - Document : false, - DomReady : false, - DOMEvent : false, - DOMReady : false, - Drag : false, - Element : false, - Elements : false, - Event : false, - Events : false, - Fx : false, - Group : false, - Hash : false, - HtmlTable : false, - Iframe : false, - IframeShim : false, - InputValidator: false, - instanceOf : false, - Keyboard : false, - Locale : false, - Mask : false, - MooTools : false, - Native : false, - Options : false, - OverText : false, - Request : false, - Scroller : false, - Slick : false, - Slider : false, - Sortables : false, - Spinner : false, - Swiff : false, - Tips : false, - Type : false, - typeOf : false, - URI : false, - Window : false - }; - - exports.prototypejs = { - "$" : false, - "$$" : false, - "$A" : false, - "$F" : false, - "$H" : false, - "$R" : false, - "$break" : false, - "$continue" : false, - "$w" : false, - Abstract : false, - Ajax : false, - Class : false, - Enumerable : false, - Element : false, - Event : false, - Field : false, - Form : false, - Hash : false, - Insertion : false, - ObjectRange : false, - PeriodicalExecuter: false, - Position : false, - Prototype : false, - Selector : false, - Template : false, - Toggle : false, - Try : false, - Autocompleter : false, - Builder : false, - Control : false, - Draggable : false, - Draggables : false, - Droppables : false, - Effect : false, - Sortable : false, - SortableObserver : false, - Sound : false, - Scriptaculous : false - }; - - exports.yui = { - YUI : false, - Y : false, - YUI_config: false - }; - - -},{}],459:[function(require,module,exports){ -// default configuration - - module.exports = { - disallowVars: false, - disallowDuplicated: true, - disallowUnknownReferences: true, - parse: require("esprima-fb").parse, - }; - -},{"esprima-fb":202}],460:[function(require,module,exports){ - "use strict"; - - var assert = require("assert"); - var stringmap = require("stringmap"); - var stringset = require("stringset"); - var is = require("simple-is"); - var fmt = require("simple-fmt"); - var error = require("./error"); - var getline = error.getline; - var options = require("./options"); - - function Scope(args) { - assert(is.someof(args.kind, ["hoist", "block", "catch-block"])); - assert(is.object(args.node)); - assert(args.parent === null || is.object(args.parent)); - - // kind === "hoist": function scopes, program scope, injected globals - // kind === "block": ES6 block scopes - // kind === "catch-block": catch block scopes - this.kind = args.kind; - - // the AST node the block corresponds to - this.node = args.node; - - // parent scope - this.parent = args.parent; - - // children scopes for easier traversal (populated internally) - this.children = []; - - // scope declarations. decls[variable_name] = { - // kind: "fun" for functions, - // "param" for function parameters, - // "caught" for catch parameter - // "var", - // "const", - // "let" - // node: the AST node the declaration corresponds to - // from: source code index from which it is visible at earliest - // (only stored for "const", "let" [and "var"] nodes) - // } - this.decls = stringmap(); - - // names of all declarations within this scope that was ever written - // TODO move to decls.w? - // TODO create corresponding read? - this.written = stringset(); - - // names of all variables declared outside this hoist scope but - // referenced in this scope (immediately or in child). - // only stored on hoist scopes for efficiency - // (because we currently generate lots of empty block scopes) - this.propagates = (this.kind === "hoist" ? stringset() : null); - - // scopes register themselves with their parents for easier traversal - if (this.parent) { - this.parent.children.push(this); - } - } - - Scope.prototype.print = function(indent) { - indent = indent || 0; - var scope = this; - var names = this.decls.keys().map(function(name) { - return fmt("{0} [{1}]", name, scope.decls.get(name).kind); - }).join(", "); - var propagates = this.propagates ? this.propagates.items().join(", ") : ""; - console.log(fmt("{0}{1}: {2}. propagates: {3}", fmt.repeat(" ", indent), this.node.type, names, propagates)); - this.children.forEach(function(c) { - c.print(indent + 2); - }); - }; - - Scope.prototype.add = function(name, kind, node, referableFromPos) { - assert(is.someof(kind, ["fun", "param", "var", "caught", "const", "let"])); - - function isConstLet(kind) { - return is.someof(kind, ["const", "let"]); - } - - var scope = this; - - // search nearest hoist-scope for fun, param and var's - // const, let and caught variables go directly in the scope (which may be hoist, block or catch-block) - if (is.someof(kind, ["fun", "param", "var"])) { - while (scope.kind !== "hoist") { - if (scope.decls.has(name) && isConstLet(scope.decls.get(name).kind)) { // could be caught - return error(getline(node), "{0} is already declared", name); - } - scope = scope.parent; - } - } - // name exists in scope and either new or existing kind is const|let => error - if (scope.decls.has(name) && (options.disallowDuplicated || isConstLet(scope.decls.get(name).kind) || isConstLet(kind))) { - return error(getline(node), "{0} is already declared", name); - } - - var declaration = { - kind: kind, - node: node, - }; - if (referableFromPos) { - assert(is.someof(kind, ["var", "const", "let"])); - declaration.from = referableFromPos; - } - scope.decls.set(name, declaration); - }; - - Scope.prototype.getKind = function(name) { - assert(is.string(name)); - var decl = this.decls.get(name); - return decl ? decl.kind : null; - }; - - Scope.prototype.getNode = function(name) { - assert(is.string(name)); - var decl = this.decls.get(name); - return decl ? decl.node : null; - }; - - Scope.prototype.getFromPos = function(name) { - assert(is.string(name)); - var decl = this.decls.get(name); - return decl ? decl.from : null; - }; - - Scope.prototype.hasOwn = function(name) { - return this.decls.has(name); - }; - - Scope.prototype.remove = function(name) { - return this.decls.remove(name); - }; - - Scope.prototype.doesPropagate = function(name) { - return this.propagates.has(name); - }; - - Scope.prototype.markPropagates = function(name) { - this.propagates.add(name); - }; - - Scope.prototype.closestHoistScope = function() { - var scope = this; - while (scope.kind !== "hoist") { - scope = scope.parent; - } - return scope; - }; - - Scope.prototype.hasFunctionScopeBetween = function(outer) { - function isFunction(node) { - return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]); - } - - for (var scope = this; scope; scope = scope.parent) { - if (scope === outer) { - return false; - } - if (isFunction(scope.node)) { - return true; - } - } - - throw new Error("wasn't inner scope of outer"); - }; - - Scope.prototype.lookup = function(name) { - for (var scope = this; scope; scope = scope.parent) { - if (scope.decls.has(name)) { - return scope; - } else if (scope.kind === "hoist") { - scope.propagates.add(name); - } - } - return null; - }; - - Scope.prototype.markWrite = function(name) { - assert(is.string(name)); - this.written.add(name); - }; - -// detects let variables that are never modified (ignores top-level) - Scope.prototype.detectUnmodifiedLets = function() { - var outmost = this; - - function detect(scope) { - if (scope !== outmost) { - scope.decls.keys().forEach(function(name) { - if (scope.getKind(name) === "let" && !scope.written.has(name)) { - return error(getline(scope.getNode(name)), "{0} is declared as let but never modified so could be const", name); - } - }); - } - - scope.children.forEach(function(childScope) { - detect(childScope); - }); - } - detect(this); - }; - - Scope.prototype.traverse = function(options) { - options = options || {}; - var pre = options.pre; - var post = options.post; - - function visit(scope) { - if (pre) { - pre(scope); - } - scope.children.forEach(function(childScope) { - visit(childScope); - }); - if (post) { - post(scope); - } - } - - visit(this); - }; - - module.exports = Scope; - -},{"./error":457,"./options":459,"assert":203,"simple-fmt":466,"simple-is":467,"stringmap":468,"stringset":469}],461:[function(require,module,exports){ - var fmt = require("simple-fmt"); - var is = require("simple-is"); - var assert = require("assert"); - - function Stats() { - this.lets = 0; - this.consts = 0; - this.renames = []; - } - - Stats.prototype.declarator = function(kind) { - assert(is.someof(kind, ["const", "let"])); - if (kind === "const") { - this.consts++; - } else { - this.lets++; - } - }; - - Stats.prototype.rename = function(oldName, newName, line) { - this.renames.push({ - oldName: oldName, - newName: newName, - line: line, - }); - }; - - Stats.prototype.toString = function() { -// console.log("defs.js stats for file {0}:", filename) - - var renames = this.renames.map(function(r) { - return r; - }).sort(function(a, b) { - return a.line - b.line; - }); // sort a copy of renames - - var renameStr = renames.map(function(rename) { - return fmt("\nline {0}: {1} => {2}", rename.line, rename.oldName, rename.newName); - }).join(""); - - var sum = this.consts + this.lets; - var constlets = (sum === 0 ? - "can't calculate const coverage (0 consts, 0 lets)" : - fmt("{0}% const coverage ({1} consts, {2} lets)", - Math.floor(100 * this.consts / sum), this.consts, this.lets)); - - return constlets + renameStr + "\n"; - }; - - module.exports = Stats; - -},{"assert":203,"simple-fmt":466,"simple-is":467}],462:[function(require,module,exports){ -// alter.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013 Olov Lassus - - var assert = require("assert"); - var stableSort = require("stable"); - -// fragments is a list of {start: index, end: index, str: string to replace with} - function alter(str, fragments) { - "use strict"; - - var isArray = Array.isArray || function(v) { - return Object.prototype.toString.call(v) === "[object Array]"; - };; - - assert(typeof str === "string"); - assert(isArray(fragments)); - - // stableSort isn't in-place so no need to copy array first - var sortedFragments = stableSort(fragments, function(a, b) { - return a.start - b.start; - }); - - var outs = []; - - var pos = 0; - for (var i = 0; i < sortedFragments.length; i++) { - var frag = sortedFragments[i]; - - assert(pos <= frag.start); - assert(frag.start <= frag.end); - outs.push(str.slice(pos, frag.start)); - outs.push(frag.str); - pos = frag.end; - } - if (pos < str.length) { - outs.push(str.slice(pos)); - } - - return outs.join(""); - } - - if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = alter; - } - -},{"assert":203,"stable":463}],463:[function(require,module,exports){ -//! stable.js 0.1.5, https://github.com/Two-Screen/stable -//! © 2014 Angry Bytes and contributors. MIT licensed. - - (function() { - -// A stable array sort, because `Array#sort()` is not guaranteed stable. -// This is an implementation of merge sort, without recursion. - - var stable = function(arr, comp) { - return exec(arr.slice(), comp); - }; - - stable.inplace = function(arr, comp) { - var result = exec(arr, comp); - - // This simply copies back if the result isn't in the original array, - // which happens on an odd number of passes. - if (result !== arr) { - pass(result, null, arr.length, arr); - } - - return arr; - }; - -// Execute the sort using the input array and a second buffer as work space. -// Returns one of those two, containing the final result. - function exec(arr, comp) { - if (typeof(comp) !== 'function') { - comp = function(a, b) { - return String(a).localeCompare(b); - }; - } - - // Short-circuit when there's nothing to sort. - var len = arr.length; - if (len <= 1) { - return arr; - } - - // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. - // Chunks are the size of the left or right hand in merge sort. - // Stop when the left-hand covers all of the array. - var buffer = new Array(len); - for (var chk = 1; chk < len; chk *= 2) { - pass(arr, comp, chk, buffer); - - var tmp = arr; - arr = buffer; - buffer = tmp; - } - - return arr; - } - -// Run a single pass with the given chunk size. - var pass = function(arr, comp, chk, result) { - var len = arr.length; - var i = 0; - // Step size / double chunk size. - var dbl = chk * 2; - // Bounds of the left and right chunks. - var l, r, e; - // Iterators over the left and right chunk. - var li, ri; - - // Iterate over pairs of chunks. - for (l = 0; l < len; l += dbl) { - r = l + chk; - e = r + chk; - if (r > len) r = len; - if (e > len) e = len; - - // Iterate both chunks in parallel. - li = l; - ri = r; - while (true) { - // Compare the chunks. - if (li < r && ri < e) { - // This works for a regular `sort()` compatible comparator, - // but also for a simple comparator like: `a > b` - if (comp(arr[li], arr[ri]) <= 0) { - result[i++] = arr[li++]; - } - else { - result[i++] = arr[ri++]; - } - } - // Nothing to compare, just flush what's left. - else if (li < r) { - result[i++] = arr[li++]; - } - else if (ri < e) { - result[i++] = arr[ri++]; - } - // Both iterators are at the chunk ends. - else { - break; - } - } - } - }; - -// Export using CommonJS or to the window. - if (typeof(module) !== 'undefined') { - module.exports = stable; - } - else { - window.stable = stable; - } - - })(); - -},{}],464:[function(require,module,exports){ - function traverse(root, options) { - "use strict"; - - options = options || {}; - var pre = options.pre; - var post = options.post; - var skipProperty = options.skipProperty; - - function visit(node, parent, prop, idx) { - if (!node || typeof node.type !== "string") { - return; - } - - var res = undefined; - if (pre) { - res = pre(node, parent, prop, idx); - } - - if (res !== false) { - for (var prop in node) { - if (skipProperty ? skipProperty(prop, node) : prop[0] === "$") { - continue; - } - - var child = node[prop]; - - if (Array.isArray(child)) { - for (var i = 0; i < child.length; i++) { - visit(child[i], node, prop, i); - } - } else { - visit(child, node, prop); - } - } - } - - if (post) { - post(node, parent, prop, idx); - } - } - - visit(root, null); - }; - - if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = traverse; - } - -},{}],465:[function(require,module,exports){ -// breakable.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013-2014 Olov Lassus - - var breakable = (function() { - "use strict"; - - function Val(val, brk) { - this.val = val; - this.brk = brk; - } - - function make_brk() { - return function brk(val) { - throw new Val(val, brk); - }; - } - - function breakable(fn) { - var brk = make_brk(); - try { - return fn(brk); - } catch (e) { - if (e instanceof Val && e.brk === brk) { - return e.val; - } - throw e; - } - } - - return breakable; - })(); - - if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = breakable; - } - -},{}],466:[function(require,module,exports){ -// simple-fmt.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013 Olov Lassus - - var fmt = (function() { - "use strict"; - - function fmt(str, var_args) { - var args = Array.prototype.slice.call(arguments, 1); - return str.replace(/\{(\d+)\}/g, function(s, match) { - return (match in args ? args[match] : s); - }); - } - - function obj(str, obj) { - return str.replace(/\{([_$a-zA-Z0-9][_$a-zA-Z0-9]*)\}/g, function(s, match) { - return (match in obj ? obj[match] : s); - }); - } - - function repeat(str, n) { - return (new Array(n + 1)).join(str); - } - - fmt.fmt = fmt; - fmt.obj = obj; - fmt.repeat = repeat; - return fmt; - })(); - - if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = fmt; - } - -},{}],467:[function(require,module,exports){ -// simple-is.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013 Olov Lassus - - var is = (function() { - "use strict"; - - var hasOwnProperty = Object.prototype.hasOwnProperty; - var toString = Object.prototype.toString; - var _undefined = void 0; - - return { - nan: function(v) { - return v !== v; - }, - boolean: function(v) { - return typeof v === "boolean"; - }, - number: function(v) { - return typeof v === "number"; - }, - string: function(v) { - return typeof v === "string"; - }, - fn: function(v) { - return typeof v === "function"; - }, - object: function(v) { - return v !== null && typeof v === "object"; - }, - primitive: function(v) { - var t = typeof v; - return v === null || v === _undefined || - t === "boolean" || t === "number" || t === "string"; - }, - array: Array.isArray || function(v) { - return toString.call(v) === "[object Array]"; - }, - finitenumber: function(v) { - return typeof v === "number" && isFinite(v); - }, - someof: function(v, values) { - return values.indexOf(v) >= 0; - }, - noneof: function(v, values) { - return values.indexOf(v) === -1; - }, - own: function(obj, prop) { - return hasOwnProperty.call(obj, prop); - }, - }; - })(); - - if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = is; - } - -},{}],468:[function(require,module,exports){ -// stringmap.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013 Olov Lassus - - var StringMap = (function() { - "use strict"; - - // to save us a few characters - var hasOwnProperty = Object.prototype.hasOwnProperty; - - var create = (function() { - function hasOwnEnumerableProps(obj) { - for (var prop in obj) { - if (hasOwnProperty.call(obj, prop)) { - return true; - } - } - return false; - } - // FF <= 3.6: - // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true - // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false - function hasOwnPollutedProps(obj) { - return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__"); - } - - var useObjectCreate = false; - if (typeof Object.create === "function") { - if (!hasOwnEnumerableProps(Object.create(null))) { - useObjectCreate = true; - } - } - if (useObjectCreate === false) { - if (hasOwnEnumerableProps({})) { - throw new Error("StringMap environment error 0, please file a bug at https://github.com/olov/stringmap/issues"); - } - } - // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims) - - var o = (useObjectCreate ? Object.create(null) : {}); - var useProtoClear = false; - if (hasOwnPollutedProps(o)) { - o.__proto__ = null; - if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) { - throw new Error("StringMap environment error 1, please file a bug at https://github.com/olov/stringmap/issues"); - } - useProtoClear = true; - } - // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims) - - return function() { - var o = (useObjectCreate ? Object.create(null) : {}); - if (useProtoClear) { - o.__proto__ = null; - } - return o; - }; - })(); - - // stringmap ctor - function stringmap(optional_object) { - // use with or without new - if (!(this instanceof stringmap)) { - return new stringmap(optional_object); - } - this.obj = create(); - this.hasProto = false; // false (no __proto__ key) or true (has __proto__ key) - this.proto = undefined; // value for __proto__ key when hasProto is true, undefined otherwise - - if (optional_object) { - this.setMany(optional_object); - } - }; - - // primitive methods that deals with data representation - stringmap.prototype.has = function(key) { - // The type-check of key in has, get, set and delete is important because otherwise an object - // {toString: function() { return "__proto__"; }} can avoid the key === "__proto__" test. - // The alternative to type-checking would be to force string conversion, i.e. key = String(key); - if (typeof key !== "string") { - throw new Error("StringMap expected string key"); - } - return (key === "__proto__" ? - this.hasProto : - hasOwnProperty.call(this.obj, key)); - }; - - stringmap.prototype.get = function(key) { - if (typeof key !== "string") { - throw new Error("StringMap expected string key"); - } - return (key === "__proto__" ? - this.proto : - (hasOwnProperty.call(this.obj, key) ? this.obj[key] : undefined)); - }; - - stringmap.prototype.set = function(key, value) { - if (typeof key !== "string") { - throw new Error("StringMap expected string key"); - } - if (key === "__proto__") { - this.hasProto = true; - this.proto = value; - } else { - this.obj[key] = value; - } - }; - - stringmap.prototype.remove = function(key) { - if (typeof key !== "string") { - throw new Error("StringMap expected string key"); - } - var didExist = this.has(key); - if (key === "__proto__") { - this.hasProto = false; - this.proto = undefined; - } else { - delete this.obj[key]; - } - return didExist; - }; - - // alias remove to delete but beware: - // sm.delete("key"); // OK in ES5 and later - // sm['delete']("key"); // OK in all ES versions - // sm.remove("key"); // OK in all ES versions - stringmap.prototype['delete'] = stringmap.prototype.remove; - - stringmap.prototype.isEmpty = function() { - for (var key in this.obj) { - if (hasOwnProperty.call(this.obj, key)) { - return false; - } - } - return !this.hasProto; - }; - - stringmap.prototype.size = function() { - var len = 0; - for (var key in this.obj) { - if (hasOwnProperty.call(this.obj, key)) { - ++len; - } - } - return (this.hasProto ? len + 1 : len); - }; - - stringmap.prototype.keys = function() { - var keys = []; - for (var key in this.obj) { - if (hasOwnProperty.call(this.obj, key)) { - keys.push(key); - } - } - if (this.hasProto) { - keys.push("__proto__"); - } - return keys; - }; - - stringmap.prototype.values = function() { - var values = []; - for (var key in this.obj) { - if (hasOwnProperty.call(this.obj, key)) { - values.push(this.obj[key]); - } - } - if (this.hasProto) { - values.push(this.proto); - } - return values; - }; - - stringmap.prototype.items = function() { - var items = []; - for (var key in this.obj) { - if (hasOwnProperty.call(this.obj, key)) { - items.push([key, this.obj[key]]); - } - } - if (this.hasProto) { - items.push(["__proto__", this.proto]); - } - return items; - }; - - - // methods that rely on the above primitives - stringmap.prototype.setMany = function(object) { - if (object === null || (typeof object !== "object" && typeof object !== "function")) { - throw new Error("StringMap expected Object"); - } - for (var key in object) { - if (hasOwnProperty.call(object, key)) { - this.set(key, object[key]); - } - } - return this; - }; - - stringmap.prototype.merge = function(other) { - var keys = other.keys(); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - this.set(key, other.get(key)); - } - return this; - }; - - stringmap.prototype.map = function(fn) { - var keys = this.keys(); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - keys[i] = fn(this.get(key), key); // re-use keys array for results - } - return keys; - }; - - stringmap.prototype.forEach = function(fn) { - var keys = this.keys(); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - fn(this.get(key), key); - } - }; - - stringmap.prototype.clone = function() { - var other = stringmap(); - return other.merge(this); - }; - - stringmap.prototype.toString = function() { - var self = this; - return "{" + this.keys().map(function(key) { - return JSON.stringify(key) + ":" + JSON.stringify(self.get(key)); - }).join(",") + "}"; - }; - - return stringmap; - })(); - - if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = StringMap; - } - -},{}],469:[function(require,module,exports){ -// stringset.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013 Olov Lassus - - var StringSet = (function() { - "use strict"; - - // to save us a few characters - var hasOwnProperty = Object.prototype.hasOwnProperty; - - var create = (function() { - function hasOwnEnumerableProps(obj) { - for (var prop in obj) { - if (hasOwnProperty.call(obj, prop)) { - return true; - } - } - return false; - } - - // FF <= 3.6: - // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true - // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false - function hasOwnPollutedProps(obj) { - return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__"); - } - - var useObjectCreate = false; - if (typeof Object.create === "function") { - if (!hasOwnEnumerableProps(Object.create(null))) { - useObjectCreate = true; - } - } - if (useObjectCreate === false) { - if (hasOwnEnumerableProps({})) { - throw new Error("StringSet environment error 0, please file a bug at https://github.com/olov/stringset/issues"); - } - } - // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims) - - var o = (useObjectCreate ? Object.create(null) : {}); - var useProtoClear = false; - if (hasOwnPollutedProps(o)) { - o.__proto__ = null; - if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) { - throw new Error("StringSet environment error 1, please file a bug at https://github.com/olov/stringset/issues"); - } - useProtoClear = true; - } - // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims) - - return function() { - var o = (useObjectCreate ? Object.create(null) : {}); - if (useProtoClear) { - o.__proto__ = null; - } - return o; - }; - })(); - - // stringset ctor - function stringset(optional_array) { - // use with or without new - if (!(this instanceof stringset)) { - return new stringset(optional_array); - } - this.obj = create(); - this.hasProto = false; // false (no __proto__ item) or true (has __proto__ item) - - if (optional_array) { - this.addMany(optional_array); - } - }; - - // primitive methods that deals with data representation - stringset.prototype.has = function(item) { - // The type-check of item in has, get, set and delete is important because otherwise an object - // {toString: function() { return "__proto__"; }} can avoid the item === "__proto__" test. - // The alternative to type-checking would be to force string conversion, i.e. item = String(item); - if (typeof item !== "string") { - throw new Error("StringSet expected string item"); - } - return (item === "__proto__" ? - this.hasProto : - hasOwnProperty.call(this.obj, item)); - }; - - stringset.prototype.add = function(item) { - if (typeof item !== "string") { - throw new Error("StringSet expected string item"); - } - if (item === "__proto__") { - this.hasProto = true; - } else { - this.obj[item] = true; - } - }; - - stringset.prototype.remove = function(item) { - if (typeof item !== "string") { - throw new Error("StringSet expected string item"); - } - var didExist = this.has(item); - if (item === "__proto__") { - this.hasProto = false; - } else { - delete this.obj[item]; - } - return didExist; - }; - - // alias remove to delete but beware: - // ss.delete("key"); // OK in ES5 and later - // ss['delete']("key"); // OK in all ES versions - // ss.remove("key"); // OK in all ES versions - stringset.prototype['delete'] = stringset.prototype.remove; - - stringset.prototype.isEmpty = function() { - for (var item in this.obj) { - if (hasOwnProperty.call(this.obj, item)) { - return false; - } - } - return !this.hasProto; - }; - - stringset.prototype.size = function() { - var len = 0; - for (var item in this.obj) { - if (hasOwnProperty.call(this.obj, item)) { - ++len; - } - } - return (this.hasProto ? len + 1 : len); - }; - - stringset.prototype.items = function() { - var items = []; - for (var item in this.obj) { - if (hasOwnProperty.call(this.obj, item)) { - items.push(item); - } - } - if (this.hasProto) { - items.push("__proto__"); - } - return items; - }; - - - // methods that rely on the above primitives - stringset.prototype.addMany = function(items) { - if (!Array.isArray(items)) { - throw new Error("StringSet expected array"); - } - for (var i = 0; i < items.length; i++) { - this.add(items[i]); - } - return this; - }; - - stringset.prototype.merge = function(other) { - this.addMany(other.items()); - return this; - }; - - stringset.prototype.clone = function() { - var other = stringset(); - return other.merge(this); - }; - - stringset.prototype.toString = function() { - return "{" + this.items().map(JSON.stringify).join(",") + "}"; - }; - - return stringset; - })(); - - if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = StringSet; - } - -},{}],470:[function(require,module,exports){ - var assert = require("assert"); - var types = require("./types"); - var n = types.namedTypes; - var isArray = types.builtInTypes.array; - var isObject = types.builtInTypes.object; - var linesModule = require("./lines"); - var fromString = linesModule.fromString; - var Lines = linesModule.Lines; - var concat = linesModule.concat; - var util = require("./util"); - var comparePos = util.comparePos; - var childNodesCacheKey = require("private").makeUniqueKey(); - -// TODO Move a non-caching implementation of this function into ast-types, -// and implement a caching wrapper function here. - function getSortedChildNodes(node, resultArray) { - if (!node) { - return; - } - - // The .loc checks below are sensitive to some of the problems that - // are fixed by this utility function. Specifically, if it decides to - // set node.loc to null, indicating that the node's .loc information - // is unreliable, then we don't want to add node to the resultArray. - util.fixFaultyLocations(node); - - if (resultArray) { - if (n.Node.check(node) && - n.SourceLocation.check(node.loc)) { - // This reverse insertion sort almost always takes constant - // time because we almost always (maybe always?) append the - // nodes in order anyway. - for (var i = resultArray.length - 1; i >= 0; --i) { - if (comparePos(resultArray[i].loc.end, - node.loc.start) <= 0) { - break; - } - } - resultArray.splice(i + 1, 0, node); - return; - } - } else if (node[childNodesCacheKey]) { - return node[childNodesCacheKey]; - } - - var names; - if (isArray.check(node)) { - names = Object.keys(node); - } else if (isObject.check(node)) { - names = types.getFieldNames(node); - } else { - return; - } - - if (!resultArray) { - Object.defineProperty(node, childNodesCacheKey, { - value: resultArray = [], - enumerable: false - }); - } - - for (var i = 0, nameCount = names.length; i < nameCount; ++i) { - getSortedChildNodes(node[names[i]], resultArray); - } - - return resultArray; - } - -// As efficiently as possible, decorate the comment object with -// .precedingNode, .enclosingNode, and/or .followingNode properties, at -// least one of which is guaranteed to be defined. - function decorateComment(node, comment) { - var childNodes = getSortedChildNodes(node); - - // Time to dust off the old binary search robes and wizard hat. - var left = 0, right = childNodes.length; - while (left < right) { - var middle = (left + right) >> 1; - var child = childNodes[middle]; - - if (comparePos(child.loc.start, comment.loc.start) <= 0 && - comparePos(comment.loc.end, child.loc.end) <= 0) { - // The comment is completely contained by this child node. - decorateComment(comment.enclosingNode = child, comment); - return; // Abandon the binary search at this level. - } - - if (comparePos(child.loc.end, comment.loc.start) <= 0) { - // This child node falls completely before the comment. - // Because we will never consider this node or any nodes - // before it again, this node must be the closest preceding - // node we have encountered so far. - var precedingNode = child; - left = middle + 1; - continue; - } - - if (comparePos(comment.loc.end, child.loc.start) <= 0) { - // This child node falls completely after the comment. - // Because we will never consider this node or any nodes after - // it again, this node must be the closest following node we - // have encountered so far. - var followingNode = child; - right = middle; - continue; - } - - throw new Error("Comment location overlaps with node location"); - } - - if (precedingNode) { - comment.precedingNode = precedingNode; - } - - if (followingNode) { - comment.followingNode = followingNode; - } - } - - exports.attach = function(comments, ast, lines) { - if (!isArray.check(comments)) { - return; - } - - var tiesToBreak = []; - - comments.forEach(function(comment) { - comment.loc.lines = lines; - decorateComment(ast, comment); - - var pn = comment.precedingNode; - var en = comment.enclosingNode; - var fn = comment.followingNode; - - if (pn && fn) { - var tieCount = tiesToBreak.length; - if (tieCount > 0) { - var lastTie = tiesToBreak[tieCount - 1]; - - assert.strictEqual( - lastTie.precedingNode === comment.precedingNode, - lastTie.followingNode === comment.followingNode - ); - - if (lastTie.followingNode !== comment.followingNode) { - breakTies(tiesToBreak, lines); - } - } - - tiesToBreak.push(comment); - - } else if (pn) { - // No contest: we have a trailing comment. - breakTies(tiesToBreak, lines); - addTrailingComment(pn, comment); - - } else if (fn) { - // No contest: we have a leading comment. - breakTies(tiesToBreak, lines); - addLeadingComment(fn, comment); - - } else if (en) { - // The enclosing node has no child nodes at all, so what we - // have here is a dangling comment, e.g. [/* crickets */]. - breakTies(tiesToBreak, lines); - addDanglingComment(en, comment); - - } else { - throw new Error("AST contains no nodes at all?"); - } - }); - - breakTies(tiesToBreak, lines); - - comments.forEach(function(comment) { - // These node references were useful for breaking ties, but we - // don't need them anymore, and they create cycles in the AST that - // may lead to infinite recursion if we don't delete them here. - delete comment.precedingNode; - delete comment.enclosingNode; - delete comment.followingNode; - }); - }; - - function breakTies(tiesToBreak, lines) { - var tieCount = tiesToBreak.length; - if (tieCount === 0) { - return; - } - - var pn = tiesToBreak[0].precedingNode; - var fn = tiesToBreak[0].followingNode; - var gapEndPos = fn.loc.start; - - // Iterate backwards through tiesToBreak, examining the gaps - // between the tied comments. In order to qualify as leading, a - // comment must be separated from fn by an unbroken series of - // whitespace-only gaps (or other comments). - for (var indexOfFirstLeadingComment = tieCount; - indexOfFirstLeadingComment > 0; - --indexOfFirstLeadingComment) { - var comment = tiesToBreak[indexOfFirstLeadingComment - 1]; - assert.strictEqual(comment.precedingNode, pn); - assert.strictEqual(comment.followingNode, fn); - - var gap = lines.sliceString(comment.loc.end, gapEndPos); - if (/\S/.test(gap)) { - // The gap string contained something other than whitespace. - break; - } - - gapEndPos = comment.loc.start; - } - - while (indexOfFirstLeadingComment <= tieCount && - (comment = tiesToBreak[indexOfFirstLeadingComment]) && - // If the comment is a //-style comment and indented more - // deeply than the node itself, reconsider it as trailing. - comment.type === "Line" && - comment.loc.start.column > fn.loc.start.column) { - ++indexOfFirstLeadingComment; - } - - tiesToBreak.forEach(function(comment, i) { - if (i < indexOfFirstLeadingComment) { - addTrailingComment(pn, comment); - } else { - addLeadingComment(fn, comment); - } - }); - - tiesToBreak.length = 0; - } - - function addCommentHelper(node, comment) { - var comments = node.comments || (node.comments = []); - comments.push(comment); - } - - function addLeadingComment(node, comment) { - comment.leading = true; - comment.trailing = false; - addCommentHelper(node, comment); - } - - function addDanglingComment(node, comment) { - comment.leading = false; - comment.trailing = false; - addCommentHelper(node, comment); - } - - function addTrailingComment(node, comment) { - comment.leading = false; - comment.trailing = true; - addCommentHelper(node, comment); - } - - function printLeadingComment(commentPath, print) { - var comment = commentPath.getValue(); - n.Comment.assert(comment); - - var loc = comment.loc; - var lines = loc && loc.lines; - var parts = [print(commentPath)]; - - if (comment.trailing) { - // When we print trailing comments as leading comments, we don't - // want to bring any trailing spaces along. - parts.push("\n"); - - } else if (lines instanceof Lines) { - var trailingSpace = lines.slice( - loc.end, - lines.skipSpaces(loc.end) - ); - - if (trailingSpace.length === 1) { - // If the trailing space contains no newlines, then we want to - // preserve it exactly as we found it. - parts.push(trailingSpace); - } else { - // If the trailing space contains newlines, then replace it - // with just that many newlines, with all other spaces removed. - parts.push(new Array(trailingSpace.length).join("\n")); - } - - } else { - parts.push("\n"); - } - - return concat(parts); - } - - function printTrailingComment(commentPath, print) { - var comment = commentPath.getValue(commentPath); - n.Comment.assert(comment); - - var loc = comment.loc; - var lines = loc && loc.lines; - var parts = []; - - if (lines instanceof Lines) { - var fromPos = lines.skipSpaces(loc.start, true) || lines.firstPos(); - var leadingSpace = lines.slice(fromPos, loc.start); - - if (leadingSpace.length === 1) { - // If the leading space contains no newlines, then we want to - // preserve it exactly as we found it. - parts.push(leadingSpace); - } else { - // If the leading space contains newlines, then replace it - // with just that many newlines, sans all other spaces. - parts.push(new Array(leadingSpace.length).join("\n")); - } - } - - parts.push(print(commentPath)); - - return concat(parts); - } - - exports.printComments = function(path, print) { - var value = path.getValue(); - var innerLines = print(path); - var comments = n.Node.check(value) && - types.getFieldValue(value, "comments"); - - if (!comments || comments.length === 0) { - return innerLines; - } - - var leadingParts = []; - var trailingParts = [innerLines]; - - path.each(function(commentPath) { - var comment = commentPath.getValue(); - var leading = types.getFieldValue(comment, "leading"); - var trailing = types.getFieldValue(comment, "trailing"); - - if (leading || (trailing && comment.type !== "Block")) { - leadingParts.push(printLeadingComment(commentPath, print)); - } else if (trailing) { - assert.strictEqual(comment.type, "Block"); - trailingParts.push(printTrailingComment(commentPath, print)); - } - }, "comments"); - - leadingParts.push.apply(leadingParts, trailingParts); - return concat(leadingParts); - }; - -},{"./lines":472,"./types":478,"./util":479,"assert":203,"private":448}],471:[function(require,module,exports){ - var assert = require("assert"); - var types = require("./types"); - var n = types.namedTypes; - var Node = n.Node; - var isArray = types.builtInTypes.array; - var isNumber = types.builtInTypes.number; - - function FastPath(value) { - assert.ok(this instanceof FastPath); - this.stack = [value]; - } - - var FPp = FastPath.prototype; - module.exports = FastPath; - -// Static convenience function for coercing a value to a FastPath. - FastPath.from = function(obj) { - if (obj instanceof FastPath) { - // Return a defensive copy of any existing FastPath instances. - return obj.copy(); - } - - if (obj instanceof types.NodePath) { - // For backwards compatibility, unroll NodePath instances into - // lightweight FastPath [..., name, value] stacks. - var copy = Object.create(FastPath.prototype); - var stack = [obj.value]; - for (var pp; (pp = obj.parentPath); obj = pp) - stack.push(obj.name, pp.value); - copy.stack = stack.reverse(); - return copy; - } - - // Otherwise use obj as the value of the new FastPath instance. - return new FastPath(obj); - }; - - FPp.copy = function copy() { - var copy = Object.create(FastPath.prototype); - copy.stack = this.stack.slice(0); - return copy; - }; - -// The name of the current property is always the penultimate element of -// this.stack, and always a String. - FPp.getName = function getName() { - var s = this.stack; - var len = s.length; - if (len > 1) { - return s[len - 2]; - } - // Since the name is always a string, null is a safe sentinel value to - // return if we do not know the name of the (root) value. - return null; - }; - -// The value of the current property is always the final element of -// this.stack. - FPp.getValue = function getValue() { - var s = this.stack; - return s[s.length - 1]; - }; - - function getNodeHelper(path, count) { - var s = path.stack; - - for (var i = s.length - 1; i >= 0; i -= 2) { - var value = s[i]; - if (n.Node.check(value) && --count < 0) { - return value; - } - } - - return null; - } - - FPp.getNode = function getNode(count) { - return getNodeHelper(this, ~~count); - }; - - FPp.getParentNode = function getParentNode(count) { - return getNodeHelper(this, ~~count + 1); - }; - -// The length of the stack can be either even or odd, depending on whether -// or not we have a name for the root value. The difference between the -// index of the root value and the index of the final value is always -// even, though, which allows us to return the root value in constant time -// (i.e. without iterating backwards through the stack). - FPp.getRootValue = function getRootValue() { - var s = this.stack; - if (s.length % 2 === 0) { - return s[1]; - } - return s[0]; - }; - -// Temporarily push properties named by string arguments given after the -// callback function onto this.stack, then call the callback with a -// reference to this (modified) FastPath object. Note that the stack will -// be restored to its original state after the callback is finished, so it -// is probably a mistake to retain a reference to the path. - FPp.call = function call(callback/*, name1, name2, ... */) { - var s = this.stack; - var origLen = s.length; - var value = s[origLen - 1]; - var argc = arguments.length; - for (var i = 1; i < argc; ++i) { - var name = arguments[i]; - value = value[name]; - s.push(name, value); - } - var result = callback(this); - s.length = origLen; - return result; - }; - -// Similar to FastPath.prototype.call, except that the value obtained by -// accessing this.getValue()[name1][name2]... should be array-like. The -// callback will be called with a reference to this path object for each -// element of the array. - FPp.each = function each(callback/*, name1, name2, ... */) { - var s = this.stack; - var origLen = s.length; - var value = s[origLen - 1]; - var argc = arguments.length; - - for (var i = 1; i < argc; ++i) { - var name = arguments[i]; - value = value[name]; - s.push(name, value); - } - - for (var i = 0; i < value.length; ++i) { - if (i in value) { - s.push(i, value[i]); - // If the callback needs to know the value of i, call - // path.getName(), assuming path is the parameter name. - callback(this); - s.length -= 2; - } - } - - s.length = origLen; - }; - -// Similar to FastPath.prototype.each, except that the results of the -// callback function invocations are stored in an array and returned at -// the end of the iteration. - FPp.map = function map(callback/*, name1, name2, ... */) { - var s = this.stack; - var origLen = s.length; - var value = s[origLen - 1]; - var argc = arguments.length; - - for (var i = 1; i < argc; ++i) { - var name = arguments[i]; - value = value[name]; - s.push(name, value); - } - - var result = new Array(value.length); - - for (var i = 0; i < value.length; ++i) { - if (i in value) { - s.push(i, value[i]); - result[i] = callback(this, i); - s.length -= 2; - } - } - - s.length = origLen; - - return result; - }; - -// Inspired by require("ast-types").NodePath.prototype.needsParens, but -// more efficient because we're iterating backwards through a stack. - FPp.needsParens = function(assumeExpressionContext) { - var parent = this.getParentNode(); - if (!parent) { - return false; - } - - var name = this.getName(); - var node = this.getNode(); - - // If the value of this path is some child of a Node and not a Node - // itself, then it doesn't need parentheses. Only Node objects (in - // fact, only Expression nodes) need parentheses. - if (this.getValue() !== node) { - return false; - } - - // Only expressions need parentheses. - if (!n.Expression.check(node)) { - return false; - } - - // Identifiers never need parentheses. - if (node.type === "Identifier") { - return false; - } - - switch (node.type) { - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - return parent.type === "MemberExpression" - && name === "object" - && parent.object === node; - - case "BinaryExpression": - case "LogicalExpression": - switch (parent.type) { - case "CallExpression": - return name === "callee" - && parent.callee === node; - - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - return true; - - case "MemberExpression": - return name === "object" - && parent.object === node; - - case "BinaryExpression": - case "LogicalExpression": - var po = parent.operator; - var pp = PRECEDENCE[po]; - var no = node.operator; - var np = PRECEDENCE[no]; - - if (pp > np) { - return true; - } - - if (pp === np && name === "right") { - assert.strictEqual(parent.right, node); - return true; - } - - default: - return false; - } - - case "SequenceExpression": - switch (parent.type) { - case "ForStatement": - // Although parentheses wouldn't hurt around sequence - // expressions in the head of for loops, traditional style - // dictates that e.g. i++, j++ should not be wrapped with - // parentheses. - return false; - - case "ExpressionStatement": - return name !== "expression"; - - default: - // Otherwise err on the side of overparenthesization, adding - // explicit exceptions above if this proves overzealous. - return true; - } - - case "YieldExpression": - switch (parent.type) { - case "BinaryExpression": - case "LogicalExpression": - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - case "CallExpression": - case "MemberExpression": - case "NewExpression": - case "ConditionalExpression": - case "YieldExpression": - return true; - - default: - return false; - } - - case "Literal": - return parent.type === "MemberExpression" - && isNumber.check(node.value) - && name === "object" - && parent.object === node; - - case "AssignmentExpression": - case "ConditionalExpression": - switch (parent.type) { - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - case "BinaryExpression": - case "LogicalExpression": - return true; - - case "CallExpression": - return name === "callee" - && parent.callee === node; - - case "ConditionalExpression": - return name === "test" - && parent.test === node; - - case "MemberExpression": - return name === "object" - && parent.object === node; - - default: - return false; - } - - case "ArrowFunctionExpression": - return isBinary(parent); - - case "ObjectExpression": - if (parent.type === "ArrowFunctionExpression" && - name === "body") { - return true; - } - - default: - if (parent.type === "NewExpression" && - name === "callee" && - parent.callee === node) { - return containsCallExpression(node); - } - } - - if (assumeExpressionContext !== true && - !this.canBeFirstInStatement() && - this.firstInStatement()) - return true; - - return false; - }; - - function isBinary(node) { - return n.BinaryExpression.check(node) - || n.LogicalExpression.check(node); - } - - function isUnaryLike(node) { - return n.UnaryExpression.check(node) - // I considered making SpreadElement and SpreadProperty subtypes - // of UnaryExpression, but they're not really Expression nodes. - || (n.SpreadElement && n.SpreadElement.check(node)) - || (n.SpreadProperty && n.SpreadProperty.check(node)); - } - - var PRECEDENCE = {}; - [["||"], - ["&&"], - ["|"], - ["^"], - ["&"], - ["==", "===", "!=", "!=="], - ["<", ">", "<=", ">=", "in", "instanceof"], - [">>", "<<", ">>>"], - ["+", "-"], - ["*", "/", "%"] - ].forEach(function(tier, i) { - tier.forEach(function(op) { - PRECEDENCE[op] = i; - }); - }); - - function containsCallExpression(node) { - if (n.CallExpression.check(node)) { - return true; - } - - if (isArray.check(node)) { - return node.some(containsCallExpression); - } - - if (n.Node.check(node)) { - return types.someField(node, function(name, child) { - return containsCallExpression(child); - }); - } - - return false; - } - - FPp.canBeFirstInStatement = function() { - var node = this.getNode(); - return !n.FunctionExpression.check(node) - && !n.ObjectExpression.check(node); - }; - - FPp.firstInStatement = function() { - var s = this.stack; - var parentName, parent; - var childName, child; - - for (var i = s.length - 1; i >= 0; i -= 2) { - if (n.Node.check(s[i])) { - childName = parentName; - child = parent; - parentName = s[i - 1]; - parent = s[i]; - } - - if (!parent || !child) { - continue; - } - - if (n.BlockStatement.check(parent) && - parentName === "body" && - childName === 0) { - assert.strictEqual(parent.body[0], child); - return true; - } - - if (n.ExpressionStatement.check(parent) && - childName === "expression") { - assert.strictEqual(parent.expression, child); - return true; - } - - if (n.SequenceExpression.check(parent) && - parentName === "expressions" && - childName === 0) { - assert.strictEqual(parent.expressions[0], child); - continue; - } - - if (n.CallExpression.check(parent) && - childName === "callee") { - assert.strictEqual(parent.callee, child); - continue; - } - - if (n.MemberExpression.check(parent) && - childName === "object") { - assert.strictEqual(parent.object, child); - continue; - } - - if (n.ConditionalExpression.check(parent) && - childName === "test") { - assert.strictEqual(parent.test, child); - continue; - } - - if (isBinary(parent) && - childName === "left") { - assert.strictEqual(parent.left, child); - continue; - } - - if (n.UnaryExpression.check(parent) && - !parent.prefix && - childName === "argument") { - assert.strictEqual(parent.argument, child); - continue; - } - - return false; - } - - return true; - }; - -},{"./types":478,"assert":203}],472:[function(require,module,exports){ - var assert = require("assert"); - var sourceMap = require("source-map"); - var normalizeOptions = require("./options").normalize; - var secretKey = require("private").makeUniqueKey(); - var types = require("./types"); - var isString = types.builtInTypes.string; - var comparePos = require("./util").comparePos; - var Mapping = require("./mapping"); - -// Goals: -// 1. Minimize new string creation. -// 2. Keep (de)identation O(lines) time. -// 3. Permit negative indentations. -// 4. Enforce immutability. -// 5. No newline characters. - - function getSecret(lines) { - return lines[secretKey]; - } - - function Lines(infos, sourceFileName) { - assert.ok(this instanceof Lines); - assert.ok(infos.length > 0); - - if (sourceFileName) { - isString.assert(sourceFileName); - } else { - sourceFileName = null; - } - - Object.defineProperty(this, secretKey, { - value: { - infos: infos, - mappings: [], - name: sourceFileName, - cachedSourceMap: null - } - }); - - if (sourceFileName) { - getSecret(this).mappings.push(new Mapping(this, { - start: this.firstPos(), - end: this.lastPos() - })); - } - } - -// Exposed for instanceof checks. The fromString function should be used -// to create new Lines objects. - exports.Lines = Lines; - var Lp = Lines.prototype; - -// These properties used to be assigned to each new object in the Lines -// constructor, but we can more efficiently stuff them into the secret and -// let these lazy accessors compute their values on-the-fly. - Object.defineProperties(Lp, { - length: { - get: function() { - return getSecret(this).infos.length; - } - }, - - name: { - get: function() { - return getSecret(this).name; - } - } - }); - - function copyLineInfo(info) { - return { - line: info.line, - indent: info.indent, - sliceStart: info.sliceStart, - sliceEnd: info.sliceEnd - }; - } - - var fromStringCache = {}; - var hasOwn = fromStringCache.hasOwnProperty; - var maxCacheKeyLen = 10; - - function countSpaces(spaces, tabWidth) { - var count = 0; - var len = spaces.length; - - for (var i = 0; i < len; ++i) { - switch (spaces.charCodeAt(i)) { - case 9: // '\t' - assert.strictEqual(typeof tabWidth, "number"); - assert.ok(tabWidth > 0); - - var next = Math.ceil(count / tabWidth) * tabWidth; - if (next === count) { - count += tabWidth; - } else { - count = next; - } - - break; - - case 11: // '\v' - case 12: // '\f' - case 13: // '\r' - case 0xfeff: // zero-width non-breaking space - // These characters contribute nothing to indentation. - break; - - case 32: // ' ' - default: // Treat all other whitespace like ' '. - count += 1; - break; - } - } - - return count; - } - exports.countSpaces = countSpaces; - - var leadingSpaceExp = /^\s*/; - - /** - * @param {Object} options - Options object that configures printing. - */ - function fromString(string, options) { - if (string instanceof Lines) - return string; - - string += ""; - - var tabWidth = options && options.tabWidth; - var tabless = string.indexOf("\t") < 0; - var cacheable = !options && tabless && (string.length <= maxCacheKeyLen); - - assert.ok(tabWidth || tabless, "No tab width specified but encountered tabs in string\n" + string); - - if (cacheable && hasOwn.call(fromStringCache, string)) - return fromStringCache[string]; - - var lines = new Lines(string.split("\n").map(function(line) { - var spaces = leadingSpaceExp.exec(line)[0]; - return { - line: line, - indent: countSpaces(spaces, tabWidth), - sliceStart: spaces.length, - sliceEnd: line.length - }; - }), normalizeOptions(options).sourceFileName); - - if (cacheable) - fromStringCache[string] = lines; - - return lines; - } - exports.fromString = fromString; - - function isOnlyWhitespace(string) { - return !/\S/.test(string); - } - - Lp.toString = function(options) { - return this.sliceString(this.firstPos(), this.lastPos(), options); - }; - - Lp.getSourceMap = function(sourceMapName, sourceRoot) { - if (!sourceMapName) { - // Although we could make up a name or generate an anonymous - // source map, instead we assume that any consumer who does not - // provide a name does not actually want a source map. - return null; - } - - var targetLines = this; - - function updateJSON(json) { - json = json || {}; - - isString.assert(sourceMapName); - json.file = sourceMapName; - - if (sourceRoot) { - isString.assert(sourceRoot); - json.sourceRoot = sourceRoot; - } - - return json; - } - - var secret = getSecret(targetLines); - if (secret.cachedSourceMap) { - // Since Lines objects are immutable, we can reuse any source map - // that was previously generated. Nevertheless, we return a new - // JSON object here to protect the cached source map from outside - // modification. - return updateJSON(secret.cachedSourceMap.toJSON()); - } - - var smg = new sourceMap.SourceMapGenerator(updateJSON()); - var sourcesToContents = {}; - - secret.mappings.forEach(function(mapping) { - var sourceCursor = mapping.sourceLines.skipSpaces( - mapping.sourceLoc.start - ) || mapping.sourceLines.lastPos(); - - var targetCursor = targetLines.skipSpaces( - mapping.targetLoc.start - ) || targetLines.lastPos(); - - while (comparePos(sourceCursor, mapping.sourceLoc.end) < 0 && - comparePos(targetCursor, mapping.targetLoc.end) < 0) { - - var sourceChar = mapping.sourceLines.charAt(sourceCursor); - var targetChar = targetLines.charAt(targetCursor); - assert.strictEqual(sourceChar, targetChar); - - var sourceName = mapping.sourceLines.name; - - // Add mappings one character at a time for maximum resolution. - smg.addMapping({ - source: sourceName, - original: { line: sourceCursor.line, - column: sourceCursor.column }, - generated: { line: targetCursor.line, - column: targetCursor.column } - }); - - if (!hasOwn.call(sourcesToContents, sourceName)) { - var sourceContent = mapping.sourceLines.toString(); - smg.setSourceContent(sourceName, sourceContent); - sourcesToContents[sourceName] = sourceContent; - } - - targetLines.nextPos(targetCursor, true); - mapping.sourceLines.nextPos(sourceCursor, true); - } - }); - - secret.cachedSourceMap = smg; - - return smg.toJSON(); - }; - - Lp.bootstrapCharAt = function(pos) { - assert.strictEqual(typeof pos, "object"); - assert.strictEqual(typeof pos.line, "number"); - assert.strictEqual(typeof pos.column, "number"); - - var line = pos.line, - column = pos.column, - strings = this.toString().split("\n"), - string = strings[line - 1]; - - if (typeof string === "undefined") - return ""; - - if (column === string.length && - line < strings.length) - return "\n"; - - if (column >= string.length) - return ""; - - return string.charAt(column); - }; - - Lp.charAt = function(pos) { - assert.strictEqual(typeof pos, "object"); - assert.strictEqual(typeof pos.line, "number"); - assert.strictEqual(typeof pos.column, "number"); - - var line = pos.line, - column = pos.column, - secret = getSecret(this), - infos = secret.infos, - info = infos[line - 1], - c = column; - - if (typeof info === "undefined" || c < 0) - return ""; - - var indent = this.getIndentAt(line); - if (c < indent) - return " "; - - c += info.sliceStart - indent; - - if (c === info.sliceEnd && - line < this.length) - return "\n"; - - if (c >= info.sliceEnd) - return ""; - - return info.line.charAt(c); - }; - - Lp.stripMargin = function(width, skipFirstLine) { - if (width === 0) - return this; - - assert.ok(width > 0, "negative margin: " + width); - - if (skipFirstLine && this.length === 1) - return this; - - var secret = getSecret(this); - - var lines = new Lines(secret.infos.map(function(info, i) { - if (info.line && (i > 0 || !skipFirstLine)) { - info = copyLineInfo(info); - info.indent = Math.max(0, info.indent - width); - } - return info; - })); - - if (secret.mappings.length > 0) { - var newMappings = getSecret(lines).mappings; - assert.strictEqual(newMappings.length, 0); - secret.mappings.forEach(function(mapping) { - newMappings.push(mapping.indent(width, skipFirstLine, true)); - }); - } - - return lines; - }; - - Lp.indent = function(by) { - if (by === 0) - return this; - - var secret = getSecret(this); - - var lines = new Lines(secret.infos.map(function(info) { - if (info.line) { - info = copyLineInfo(info); - info.indent += by; - } - return info - })); - - if (secret.mappings.length > 0) { - var newMappings = getSecret(lines).mappings; - assert.strictEqual(newMappings.length, 0); - secret.mappings.forEach(function(mapping) { - newMappings.push(mapping.indent(by)); - }); - } - - return lines; - }; - - Lp.indentTail = function(by) { - if (by === 0) - return this; - - if (this.length < 2) - return this; - - var secret = getSecret(this); - - var lines = new Lines(secret.infos.map(function(info, i) { - if (i > 0 && info.line) { - info = copyLineInfo(info); - info.indent += by; - } - - return info; - })); - - if (secret.mappings.length > 0) { - var newMappings = getSecret(lines).mappings; - assert.strictEqual(newMappings.length, 0); - secret.mappings.forEach(function(mapping) { - newMappings.push(mapping.indent(by, true)); - }); - } - - return lines; - }; - - Lp.getIndentAt = function(line) { - assert.ok(line >= 1, "no line " + line + " (line numbers start from 1)"); - var secret = getSecret(this), - info = secret.infos[line - 1]; - return Math.max(info.indent, 0); - }; - - Lp.guessTabWidth = function() { - var secret = getSecret(this); - if (hasOwn.call(secret, "cachedTabWidth")) { - return secret.cachedTabWidth; - } - - var counts = []; // Sparse array. - var lastIndent = 0; - - for (var line = 1, last = this.length; line <= last; ++line) { - var info = secret.infos[line - 1]; - var sliced = info.line.slice(info.sliceStart, info.sliceEnd); - - // Whitespace-only lines don't tell us much about the likely tab - // width of this code. - if (isOnlyWhitespace(sliced)) { - continue; - } - - var diff = Math.abs(info.indent - lastIndent); - counts[diff] = ~~counts[diff] + 1; - lastIndent = info.indent; - } - - var maxCount = -1; - var result = 2; - - for (var tabWidth = 1; - tabWidth < counts.length; - tabWidth += 1) { - if (hasOwn.call(counts, tabWidth) && - counts[tabWidth] > maxCount) { - maxCount = counts[tabWidth]; - result = tabWidth; - } - } - - return secret.cachedTabWidth = result; - }; - - Lp.isOnlyWhitespace = function() { - return isOnlyWhitespace(this.toString()); - }; - - Lp.isPrecededOnlyByWhitespace = function(pos) { - var secret = getSecret(this); - var info = secret.infos[pos.line - 1]; - var indent = Math.max(info.indent, 0); - - var diff = pos.column - indent; - if (diff <= 0) { - // If pos.column does not exceed the indentation amount, then - // there must be only whitespace before it. - return true; - } - - var start = info.sliceStart; - var end = Math.min(start + diff, info.sliceEnd); - var prefix = info.line.slice(start, end); - - return isOnlyWhitespace(prefix); - }; - - Lp.getLineLength = function(line) { - var secret = getSecret(this), - info = secret.infos[line - 1]; - return this.getIndentAt(line) + info.sliceEnd - info.sliceStart; - }; - - Lp.nextPos = function(pos, skipSpaces) { - var l = Math.max(pos.line, 0), - c = Math.max(pos.column, 0); - - if (c < this.getLineLength(l)) { - pos.column += 1; - - return skipSpaces - ? !!this.skipSpaces(pos, false, true) - : true; - } - - if (l < this.length) { - pos.line += 1; - pos.column = 0; - - return skipSpaces - ? !!this.skipSpaces(pos, false, true) - : true; - } - - return false; - }; - - Lp.prevPos = function(pos, skipSpaces) { - var l = pos.line, - c = pos.column; - - if (c < 1) { - l -= 1; - - if (l < 1) - return false; - - c = this.getLineLength(l); - - } else { - c = Math.min(c - 1, this.getLineLength(l)); - } - - pos.line = l; - pos.column = c; - - return skipSpaces - ? !!this.skipSpaces(pos, true, true) - : true; - }; - - Lp.firstPos = function() { - // Trivial, but provided for completeness. - return { line: 1, column: 0 }; - }; - - Lp.lastPos = function() { - return { - line: this.length, - column: this.getLineLength(this.length) - }; - }; - - Lp.skipSpaces = function(pos, backward, modifyInPlace) { - if (pos) { - pos = modifyInPlace ? pos : { - line: pos.line, - column: pos.column - }; - } else if (backward) { - pos = this.lastPos(); - } else { - pos = this.firstPos(); - } - - if (backward) { - while (this.prevPos(pos)) { - if (!isOnlyWhitespace(this.charAt(pos)) && - this.nextPos(pos)) { - return pos; - } - } - - return null; - - } else { - while (isOnlyWhitespace(this.charAt(pos))) { - if (!this.nextPos(pos)) { - return null; - } - } - - return pos; - } - }; - - Lp.trimLeft = function() { - var pos = this.skipSpaces(this.firstPos(), false, true); - return pos ? this.slice(pos) : emptyLines; - }; - - Lp.trimRight = function() { - var pos = this.skipSpaces(this.lastPos(), true, true); - return pos ? this.slice(this.firstPos(), pos) : emptyLines; - }; - - Lp.trim = function() { - var start = this.skipSpaces(this.firstPos(), false, true); - if (start === null) - return emptyLines; - - var end = this.skipSpaces(this.lastPos(), true, true); - assert.notStrictEqual(end, null); - - return this.slice(start, end); - }; - - Lp.eachPos = function(callback, startPos, skipSpaces) { - var pos = this.firstPos(); - - if (startPos) { - pos.line = startPos.line, - pos.column = startPos.column - } - - if (skipSpaces && !this.skipSpaces(pos, false, true)) { - return; // Encountered nothing but spaces. - } - - do callback.call(this, pos); - while (this.nextPos(pos, skipSpaces)); - }; - - Lp.bootstrapSlice = function(start, end) { - var strings = this.toString().split("\n").slice( - start.line - 1, end.line); - - strings.push(strings.pop().slice(0, end.column)); - strings[0] = strings[0].slice(start.column); - - return fromString(strings.join("\n")); - }; - - Lp.slice = function(start, end) { - if (!end) { - if (!start) { - // The client seems to want a copy of this Lines object, but - // Lines objects are immutable, so it's perfectly adequate to - // return the same object. - return this; - } - - // Slice to the end if no end position was provided. - end = this.lastPos(); - } - - var secret = getSecret(this); - var sliced = secret.infos.slice(start.line - 1, end.line); - - if (start.line === end.line) { - sliced[0] = sliceInfo(sliced[0], start.column, end.column); - } else { - assert.ok(start.line < end.line); - sliced[0] = sliceInfo(sliced[0], start.column); - sliced.push(sliceInfo(sliced.pop(), 0, end.column)); - } - - var lines = new Lines(sliced); - - if (secret.mappings.length > 0) { - var newMappings = getSecret(lines).mappings; - assert.strictEqual(newMappings.length, 0); - secret.mappings.forEach(function(mapping) { - var sliced = mapping.slice(this, start, end); - if (sliced) { - newMappings.push(sliced); - } - }, this); - } - - return lines; - }; - - function sliceInfo(info, startCol, endCol) { - var sliceStart = info.sliceStart; - var sliceEnd = info.sliceEnd; - var indent = Math.max(info.indent, 0); - var lineLength = indent + sliceEnd - sliceStart; - - if (typeof endCol === "undefined") { - endCol = lineLength; - } - - startCol = Math.max(startCol, 0); - endCol = Math.min(endCol, lineLength); - endCol = Math.max(endCol, startCol); - - if (endCol < indent) { - indent = endCol; - sliceEnd = sliceStart; - } else { - sliceEnd -= lineLength - endCol; - } - - lineLength = endCol; - lineLength -= startCol; - - if (startCol < indent) { - indent -= startCol; - } else { - startCol -= indent; - indent = 0; - sliceStart += startCol; - } - - assert.ok(indent >= 0); - assert.ok(sliceStart <= sliceEnd); - assert.strictEqual(lineLength, indent + sliceEnd - sliceStart); - - if (info.indent === indent && - info.sliceStart === sliceStart && - info.sliceEnd === sliceEnd) { - return info; - } - - return { - line: info.line, - indent: indent, - sliceStart: sliceStart, - sliceEnd: sliceEnd - }; - } - - Lp.bootstrapSliceString = function(start, end, options) { - return this.slice(start, end).toString(options); - }; - - Lp.sliceString = function(start, end, options) { - if (!end) { - if (!start) { - // The client seems to want a copy of this Lines object, but - // Lines objects are immutable, so it's perfectly adequate to - // return the same object. - return this; - } - - // Slice to the end if no end position was provided. - end = this.lastPos(); - } - - options = normalizeOptions(options); - - var infos = getSecret(this).infos; - var parts = []; - var tabWidth = options.tabWidth; - - for (var line = start.line; line <= end.line; ++line) { - var info = infos[line - 1]; - - if (line === start.line) { - if (line === end.line) { - info = sliceInfo(info, start.column, end.column); - } else { - info = sliceInfo(info, start.column); - } - } else if (line === end.line) { - info = sliceInfo(info, 0, end.column); - } - - var indent = Math.max(info.indent, 0); - - var before = info.line.slice(0, info.sliceStart); - if (options.reuseWhitespace && - isOnlyWhitespace(before) && - countSpaces(before, options.tabWidth) === indent) { - // Reuse original spaces if the indentation is correct. - parts.push(info.line.slice(0, info.sliceEnd)); - continue; - } - - var tabs = 0; - var spaces = indent; - - if (options.useTabs) { - tabs = Math.floor(indent / tabWidth); - spaces -= tabs * tabWidth; - } - - var result = ""; - - if (tabs > 0) { - result += new Array(tabs + 1).join("\t"); - } - - if (spaces > 0) { - result += new Array(spaces + 1).join(" "); - } - - result += info.line.slice(info.sliceStart, info.sliceEnd); - - parts.push(result); - } - - return parts.join("\n"); - }; - - Lp.isEmpty = function() { - return this.length < 2 && this.getLineLength(1) < 1; - }; - - Lp.join = function(elements) { - var separator = this; - var separatorSecret = getSecret(separator); - var infos = []; - var mappings = []; - var prevInfo; - - function appendSecret(secret) { - if (secret === null) - return; - - if (prevInfo) { - var info = secret.infos[0]; - var indent = new Array(info.indent + 1).join(" "); - var prevLine = infos.length; - var prevColumn = Math.max(prevInfo.indent, 0) + - prevInfo.sliceEnd - prevInfo.sliceStart; - - prevInfo.line = prevInfo.line.slice( - 0, prevInfo.sliceEnd) + indent + info.line.slice( - info.sliceStart, info.sliceEnd); - - prevInfo.sliceEnd = prevInfo.line.length; - - if (secret.mappings.length > 0) { - secret.mappings.forEach(function(mapping) { - mappings.push(mapping.add(prevLine, prevColumn)); - }); - } - - } else if (secret.mappings.length > 0) { - mappings.push.apply(mappings, secret.mappings); - } - - secret.infos.forEach(function(info, i) { - if (!prevInfo || i > 0) { - prevInfo = copyLineInfo(info); - infos.push(prevInfo); - } - }); - } - - function appendWithSeparator(secret, i) { - if (i > 0) - appendSecret(separatorSecret); - appendSecret(secret); - } - - elements.map(function(elem) { - var lines = fromString(elem); - if (lines.isEmpty()) - return null; - return getSecret(lines); - }).forEach(separator.isEmpty() - ? appendSecret - : appendWithSeparator); - - if (infos.length < 1) - return emptyLines; - - var lines = new Lines(infos); - - getSecret(lines).mappings = mappings; - - return lines; - }; - - exports.concat = function(elements) { - return emptyLines.join(elements); - }; - - Lp.concat = function(other) { - var args = arguments, - list = [this]; - list.push.apply(list, args); - assert.strictEqual(list.length, args.length + 1); - return emptyLines.join(list); - }; - -// The emptyLines object needs to be created all the way down here so that -// Lines.prototype will be fully populated. - var emptyLines = fromString(""); - -},{"./mapping":473,"./options":474,"./types":478,"./util":479,"assert":203,"private":448,"source-map":493}],473:[function(require,module,exports){ - var assert = require("assert"); - var types = require("./types"); - var isString = types.builtInTypes.string; - var isNumber = types.builtInTypes.number; - var SourceLocation = types.namedTypes.SourceLocation; - var Position = types.namedTypes.Position; - var linesModule = require("./lines"); - var comparePos = require("./util").comparePos; - - function Mapping(sourceLines, sourceLoc, targetLoc) { - assert.ok(this instanceof Mapping); - assert.ok(sourceLines instanceof linesModule.Lines); - SourceLocation.assert(sourceLoc); - - if (targetLoc) { - // In certain cases it's possible for targetLoc.{start,end}.column - // values to be negative, which technically makes them no longer - // valid SourceLocation nodes, so we need to be more forgiving. - assert.ok( - isNumber.check(targetLoc.start.line) && - isNumber.check(targetLoc.start.column) && - isNumber.check(targetLoc.end.line) && - isNumber.check(targetLoc.end.column) - ); - } else { - // Assume identity mapping if no targetLoc specified. - targetLoc = sourceLoc; - } - - Object.defineProperties(this, { - sourceLines: { value: sourceLines }, - sourceLoc: { value: sourceLoc }, - targetLoc: { value: targetLoc } - }); - } - - var Mp = Mapping.prototype; - module.exports = Mapping; - - Mp.slice = function(lines, start, end) { - assert.ok(lines instanceof linesModule.Lines); - Position.assert(start); - - if (end) { - Position.assert(end); - } else { - end = lines.lastPos(); - } - - var sourceLines = this.sourceLines; - var sourceLoc = this.sourceLoc; - var targetLoc = this.targetLoc; - - function skip(name) { - var sourceFromPos = sourceLoc[name]; - var targetFromPos = targetLoc[name]; - var targetToPos = start; - - if (name === "end") { - targetToPos = end; - } else { - assert.strictEqual(name, "start"); - } - - return skipChars( - sourceLines, sourceFromPos, - lines, targetFromPos, targetToPos - ); - } - - if (comparePos(start, targetLoc.start) <= 0) { - if (comparePos(targetLoc.end, end) <= 0) { - targetLoc = { - start: subtractPos(targetLoc.start, start.line, start.column), - end: subtractPos(targetLoc.end, start.line, start.column) - }; - - // The sourceLoc can stay the same because the contents of the - // targetLoc have not changed. - - } else if (comparePos(end, targetLoc.start) <= 0) { - return null; - - } else { - sourceLoc = { - start: sourceLoc.start, - end: skip("end") - }; - - targetLoc = { - start: subtractPos(targetLoc.start, start.line, start.column), - end: subtractPos(end, start.line, start.column) - }; - } - - } else { - if (comparePos(targetLoc.end, start) <= 0) { - return null; - } - - if (comparePos(targetLoc.end, end) <= 0) { - sourceLoc = { - start: skip("start"), - end: sourceLoc.end - }; - - targetLoc = { - // Same as subtractPos(start, start.line, start.column): - start: { line: 1, column: 0 }, - end: subtractPos(targetLoc.end, start.line, start.column) - }; - - } else { - sourceLoc = { - start: skip("start"), - end: skip("end") - }; - - targetLoc = { - // Same as subtractPos(start, start.line, start.column): - start: { line: 1, column: 0 }, - end: subtractPos(end, start.line, start.column) - }; - } - } - - return new Mapping(this.sourceLines, sourceLoc, targetLoc); - }; - - Mp.add = function(line, column) { - return new Mapping(this.sourceLines, this.sourceLoc, { - start: addPos(this.targetLoc.start, line, column), - end: addPos(this.targetLoc.end, line, column) - }); - }; - - function addPos(toPos, line, column) { - return { - line: toPos.line + line - 1, - column: (toPos.line === 1) - ? toPos.column + column - : toPos.column - }; - } - - Mp.subtract = function(line, column) { - return new Mapping(this.sourceLines, this.sourceLoc, { - start: subtractPos(this.targetLoc.start, line, column), - end: subtractPos(this.targetLoc.end, line, column) - }); - }; - - function subtractPos(fromPos, line, column) { - return { - line: fromPos.line - line + 1, - column: (fromPos.line === line) - ? fromPos.column - column - : fromPos.column - }; - } - - Mp.indent = function(by, skipFirstLine, noNegativeColumns) { - if (by === 0) { - return this; - } - - var targetLoc = this.targetLoc; - var startLine = targetLoc.start.line; - var endLine = targetLoc.end.line; - - if (skipFirstLine && startLine === 1 && endLine === 1) { - return this; - } - - targetLoc = { - start: targetLoc.start, - end: targetLoc.end - }; - - if (!skipFirstLine || startLine > 1) { - var startColumn = targetLoc.start.column + by; - targetLoc.start = { - line: startLine, - column: noNegativeColumns - ? Math.max(0, startColumn) - : startColumn - }; - } - - if (!skipFirstLine || endLine > 1) { - var endColumn = targetLoc.end.column + by; - targetLoc.end = { - line: endLine, - column: noNegativeColumns - ? Math.max(0, endColumn) - : endColumn - }; - } - - return new Mapping(this.sourceLines, this.sourceLoc, targetLoc); - }; - - function skipChars( - sourceLines, sourceFromPos, - targetLines, targetFromPos, targetToPos - ) { - assert.ok(sourceLines instanceof linesModule.Lines); - assert.ok(targetLines instanceof linesModule.Lines); - Position.assert(sourceFromPos); - Position.assert(targetFromPos); - Position.assert(targetToPos); - - var targetComparison = comparePos(targetFromPos, targetToPos); - if (targetComparison === 0) { - // Trivial case: no characters to skip. - return sourceFromPos; - } - - if (targetComparison < 0) { - // Skipping forward. - - var sourceCursor = sourceLines.skipSpaces(sourceFromPos); - var targetCursor = targetLines.skipSpaces(targetFromPos); - - var lineDiff = targetToPos.line - targetCursor.line; - sourceCursor.line += lineDiff; - targetCursor.line += lineDiff; - - if (lineDiff > 0) { - // If jumping to later lines, reset columns to the beginnings - // of those lines. - sourceCursor.column = 0; - targetCursor.column = 0; - } else { - assert.strictEqual(lineDiff, 0); - } - - while (comparePos(targetCursor, targetToPos) < 0 && - targetLines.nextPos(targetCursor, true)) { - assert.ok(sourceLines.nextPos(sourceCursor, true)); - assert.strictEqual( - sourceLines.charAt(sourceCursor), - targetLines.charAt(targetCursor) - ); - } - - } else { - // Skipping backward. - - var sourceCursor = sourceLines.skipSpaces(sourceFromPos, true); - var targetCursor = targetLines.skipSpaces(targetFromPos, true); - - var lineDiff = targetToPos.line - targetCursor.line; - sourceCursor.line += lineDiff; - targetCursor.line += lineDiff; - - if (lineDiff < 0) { - // If jumping to earlier lines, reset columns to the ends of - // those lines. - sourceCursor.column = sourceLines.getLineLength(sourceCursor.line); - targetCursor.column = targetLines.getLineLength(targetCursor.line); - } else { - assert.strictEqual(lineDiff, 0); - } - - while (comparePos(targetToPos, targetCursor) < 0 && - targetLines.prevPos(targetCursor, true)) { - assert.ok(sourceLines.prevPos(sourceCursor, true)); - assert.strictEqual( - sourceLines.charAt(sourceCursor), - targetLines.charAt(targetCursor) - ); - } - } - - return sourceCursor; - } - -},{"./lines":472,"./types":478,"./util":479,"assert":203}],474:[function(require,module,exports){ - var defaults = { - // If you want to use a different branch of esprima, or any other - // module that supports a .parse function, pass that module object to - // recast.parse as options.esprima. - esprima: require("esprima-fb"), - - // Number of spaces the pretty-printer should use per tab for - // indentation. If you do not pass this option explicitly, it will be - // (quite reliably!) inferred from the original code. - tabWidth: 4, - - // If you really want the pretty-printer to use tabs instead of - // spaces, make this option true. - useTabs: false, - - // The reprinting code leaves leading whitespace untouched unless it - // has to reindent a line, or you pass false for this option. - reuseWhitespace: true, - - // Some of the pretty-printer code (such as that for printing function - // parameter lists) makes a valiant attempt to prevent really long - // lines. You can adjust the limit by changing this option; however, - // there is no guarantee that line length will fit inside this limit. - wrapColumn: 74, // Aspirational for now. - - // Pass a string as options.sourceFileName to recast.parse to tell the - // reprinter to keep track of reused code so that it can construct a - // source map automatically. - sourceFileName: null, - - // Pass a string as options.sourceMapName to recast.print, and - // (provided you passed options.sourceFileName earlier) the - // PrintResult of recast.print will have a .map property for the - // generated source map. - sourceMapName: null, - - // If provided, this option will be passed along to the source map - // generator as a root directory for relative source file paths. - sourceRoot: null, - - // If you provide a source map that was generated from a previous call - // to recast.print as options.inputSourceMap, the old source map will - // be composed with the new source map. - inputSourceMap: null, - - // If you want esprima to generate .range information (recast only - // uses .loc internally), pass true for this option. - range: false, - - // If you want esprima not to throw exceptions when it encounters - // non-fatal errors, keep this option true. - tolerant: true, - - // If you want to override the quotes used in string literals, specify - // either "single", "double", or "auto" here ("auto" will select the one - // which results in the shorter literal) - // Otherwise, the input marks will be preserved - quote: null, - }, hasOwn = defaults.hasOwnProperty; - -// Copy options and fill in default values. - exports.normalize = function(options) { - options = options || defaults; - - function get(key) { - return hasOwn.call(options, key) - ? options[key] - : defaults[key]; - } - - return { - tabWidth: +get("tabWidth"), - useTabs: !!get("useTabs"), - reuseWhitespace: !!get("reuseWhitespace"), - wrapColumn: Math.max(get("wrapColumn"), 0), - sourceFileName: get("sourceFileName"), - sourceMapName: get("sourceMapName"), - sourceRoot: get("sourceRoot"), - inputSourceMap: get("inputSourceMap"), - esprima: get("esprima"), - range: get("range"), - tolerant: get("tolerant"), - quote: get("quote"), - }; - }; - -},{"esprima-fb":202}],475:[function(require,module,exports){ - var assert = require("assert"); - var types = require("./types"); - var n = types.namedTypes; - var b = types.builders; - var isObject = types.builtInTypes.object; - var isArray = types.builtInTypes.array; - var isFunction = types.builtInTypes.function; - var Patcher = require("./patcher").Patcher; - var normalizeOptions = require("./options").normalize; - var fromString = require("./lines").fromString; - var attachComments = require("./comments").attach; - var util = require("./util"); - - exports.parse = function parse(source, options) { - options = normalizeOptions(options); - - var lines = fromString(source, options); - - var sourceWithoutTabs = lines.toString({ - tabWidth: options.tabWidth, - reuseWhitespace: false, - useTabs: false - }); - - var program = options.esprima.parse(sourceWithoutTabs, { - loc: true, - range: options.range, - comment: true, - tolerant: options.tolerant, - sourceType: 'module' - }); - - // Expand the Program node's .loc to include all comments, since - // typically its .loc.start and .loc.end will coincide with those of - // the first and last statements, respectively, excluding any comments - // that fall outside that region. - program.loc = util.getTrueLoc(program); - - var comments = program.comments; - delete program.comments; - - // In order to ensure we reprint leading and trailing program - // comments, wrap the original Program node with a File node. - var file = b.file(program); - file.loc = { - lines: lines, - indent: 0, - start: lines.firstPos(), - end: lines.lastPos() - }; - - // Passing file.program here instead of just file means that initial - // comments will be attached to program.body[0] instead of program. - attachComments( - comments, - program.body.length ? file.program : file, - lines - ); - - // Return a copy of the original AST so that any changes made may be - // compared to the original. - return new TreeCopier(lines).copy(file); - }; - - function TreeCopier(lines) { - assert.ok(this instanceof TreeCopier); - this.lines = lines; - this.indent = 0; - } - - var TCp = TreeCopier.prototype; - - TCp.copy = function(node) { - if (isArray.check(node)) { - return node.map(this.copy, this); - } - - if (!isObject.check(node)) { - return node; - } - - util.fixFaultyLocations(node); - - var copy = Object.create(Object.getPrototypeOf(node), { - original: { // Provide a link from the copy to the original. - value: node, - configurable: false, - enumerable: false, - writable: true - } - }); - - var loc = node.loc; - var oldIndent = this.indent; - var newIndent = oldIndent; - - if (loc) { - // When node is a comment, we set node.loc.indent to - // node.loc.start.column so that, when/if we print the comment by - // itself, we can strip that much whitespace from the left margin - // of the comment. This only really matters for multiline Block - // comments, but it doesn't hurt for Line comments. - if (node.type === "Block" || node.type === "Line" || - this.lines.isPrecededOnlyByWhitespace(loc.start)) { - newIndent = this.indent = loc.start.column; - } - - loc.lines = this.lines; - loc.indent = newIndent; - } - - var keys = Object.keys(node); - var keyCount = keys.length; - for (var i = 0; i < keyCount; ++i) { - var key = keys[i]; - if (key === "loc") { - copy[key] = node[key]; - } else { - copy[key] = this.copy(node[key]); - } - } - - this.indent = oldIndent; - - return copy; - }; - -},{"./comments":470,"./lines":472,"./options":474,"./patcher":476,"./types":478,"./util":479,"assert":203}],476:[function(require,module,exports){ - var assert = require("assert"); - var linesModule = require("./lines"); - var types = require("./types"); - var getFieldValue = types.getFieldValue; - var Printable = types.namedTypes.Printable; - var Expression = types.namedTypes.Expression; - var SourceLocation = types.namedTypes.SourceLocation; - var util = require("./util"); - var comparePos = util.comparePos; - var FastPath = require("./fast-path"); - var isObject = types.builtInTypes.object; - var isArray = types.builtInTypes.array; - var isString = types.builtInTypes.string; - var riskyAdjoiningCharExp = /[0-9a-z_$]/i; - - function Patcher(lines) { - assert.ok(this instanceof Patcher); - assert.ok(lines instanceof linesModule.Lines); - - var self = this, - replacements = []; - - self.replace = function(loc, lines) { - if (isString.check(lines)) - lines = linesModule.fromString(lines); - - replacements.push({ - lines: lines, - start: loc.start, - end: loc.end - }); - }; - - self.get = function(loc) { - // If no location is provided, return the complete Lines object. - loc = loc || { - start: { line: 1, column: 0 }, - end: { line: lines.length, - column: lines.getLineLength(lines.length) } - }; - - var sliceFrom = loc.start, - toConcat = []; - - function pushSlice(from, to) { - assert.ok(comparePos(from, to) <= 0); - toConcat.push(lines.slice(from, to)); - } - - replacements.sort(function(a, b) { - return comparePos(a.start, b.start); - }).forEach(function(rep) { - if (comparePos(sliceFrom, rep.start) > 0) { - // Ignore nested replacement ranges. - } else { - pushSlice(sliceFrom, rep.start); - toConcat.push(rep.lines); - sliceFrom = rep.end; - } - }); - - pushSlice(sliceFrom, loc.end); - - return linesModule.concat(toConcat); - }; - } - exports.Patcher = Patcher; - - var Pp = Patcher.prototype; - - Pp.tryToReprintComments = function(newNode, oldNode, print) { - var patcher = this; - - if (!newNode.comments && - !oldNode.comments) { - // We were (vacuously) able to reprint all the comments! - return true; - } - - var newPath = FastPath.from(newNode); - var oldPath = FastPath.from(oldNode); - - newPath.stack.push("comments", getSurroundingComments(newNode)); - oldPath.stack.push("comments", getSurroundingComments(oldNode)); - - var reprints = []; - var ableToReprintComments = - findArrayReprints(newPath, oldPath, reprints); - - // No need to pop anything from newPath.stack or oldPath.stack, since - // newPath and oldPath are fresh local variables. - - if (ableToReprintComments && reprints.length > 0) { - reprints.forEach(function(reprint) { - var oldComment = reprint.oldPath.getValue(); - assert.ok(oldComment.leading || oldComment.trailing); - patcher.replace( - oldComment.loc, - // Comments can't have .comments, so it doesn't matter - // whether we print with comments or without. - print(reprint.newPath).indentTail(oldComment.loc.indent) - ); - }); - } - - return ableToReprintComments; - }; - -// Get all comments that are either leading or trailing, ignoring any -// comments that occur inside node.loc. Returns an empty array for nodes -// with no leading or trailing comments. - function getSurroundingComments(node) { - var result = []; - if (node.comments && - node.comments.length > 0) { - node.comments.forEach(function(comment) { - if (comment.leading || comment.trailing) { - result.push(comment); - } - }); - } - return result; - } - - Pp.deleteComments = function(node) { - if (!node.comments) { - return; - } - - var patcher = this; - - node.comments.forEach(function(comment) { - if (comment.leading) { - // Delete leading comments along with any trailing whitespace - // they might have. - patcher.replace({ - start: comment.loc.start, - end: node.loc.lines.skipSpaces( - comment.loc.end, false, false) - }, ""); - - } else if (comment.trailing) { - // Delete trailing comments along with any leading whitespace - // they might have. - patcher.replace({ - start: node.loc.lines.skipSpaces( - comment.loc.start, true, false), - end: comment.loc.end - }, ""); - } - }); - }; - - exports.getReprinter = function(path) { - assert.ok(path instanceof FastPath); - - // Make sure that this path refers specifically to a Node, rather than - // some non-Node subproperty of a Node. - var node = path.getValue(); - if (!Printable.check(node)) - return; - - var orig = node.original; - var origLoc = orig && orig.loc; - var lines = origLoc && origLoc.lines; - var reprints = []; - - if (!lines || !findReprints(path, reprints)) - return; - - return function(print) { - var patcher = new Patcher(lines); - - reprints.forEach(function(reprint) { - var newNode = reprint.newPath.getValue(); - var oldNode = reprint.oldPath.getValue(); - - SourceLocation.assert(oldNode.loc, true); - - var needToPrintNewPathWithComments = - !patcher.tryToReprintComments(newNode, oldNode, print) - - if (needToPrintNewPathWithComments) { - // Since we were not able to preserve all leading/trailing - // comments, we delete oldNode's comments, print newPath - // with comments, and then patch the resulting lines where - // oldNode used to be. - patcher.deleteComments(oldNode); - } - - var pos = util.copyPos(oldNode.loc.start); - var needsLeadingSpace = lines.prevPos(pos) && - riskyAdjoiningCharExp.test(lines.charAt(pos)); - - var newLines = print( - reprint.newPath, - needToPrintNewPathWithComments - ).indentTail(oldNode.loc.indent); - - var needsTrailingSpace = - riskyAdjoiningCharExp.test(lines.charAt(oldNode.loc.end)); - - // If we try to replace the argument of a ReturnStatement like - // return"asdf" with e.g. a literal null expression, we run - // the risk of ending up with returnnull, so we need to add an - // extra leading space in situations where that might - // happen. Likewise for "asdf"in obj. See #170. - if (needsLeadingSpace || needsTrailingSpace) { - var newParts = []; - needsLeadingSpace && newParts.push(" "); - newParts.push(newLines); - needsTrailingSpace && newParts.push(" "); - newLines = linesModule.concat(newParts); - } - - patcher.replace(oldNode.loc, newLines); - }); - - // Recall that origLoc is the .loc of an ancestor node that is - // guaranteed to contain all the reprinted nodes and comments. - return patcher.get(origLoc).indentTail(-orig.loc.indent); - }; - }; - - function findReprints(newPath, reprints) { - var newNode = newPath.getValue(); - Printable.assert(newNode); - - var oldNode = newNode.original; - Printable.assert(oldNode); - - assert.deepEqual(reprints, []); - - if (newNode.type !== oldNode.type) { - return false; - } - - var oldPath = new FastPath(oldNode); - var canReprint = findChildReprints(newPath, oldPath, reprints); - - if (!canReprint) { - // Make absolutely sure the calling code does not attempt to reprint - // any nodes. - reprints.length = 0; - } - - return canReprint; - } - - function findAnyReprints(newPath, oldPath, reprints) { - var newNode = newPath.getValue(); - var oldNode = oldPath.getValue(); - - if (newNode === oldNode) - return true; - - if (isArray.check(newNode)) - return findArrayReprints(newPath, oldPath, reprints); - - if (isObject.check(newNode)) - return findObjectReprints(newPath, oldPath, reprints); - - return false; - } - - function findArrayReprints(newPath, oldPath, reprints) { - var newNode = newPath.getValue(); - var oldNode = oldPath.getValue(); - isArray.assert(newNode); - var len = newNode.length; - - if (!(isArray.check(oldNode) && - oldNode.length === len)) - return false; - - for (var i = 0; i < len; ++i) { - newPath.stack.push(i, newNode[i]); - oldPath.stack.push(i, oldNode[i]); - var canReprint = findAnyReprints(newPath, oldPath, reprints); - newPath.stack.length -= 2; - oldPath.stack.length -= 2; - if (!canReprint) { - return false; - } - } - - return true; - } - - function findObjectReprints(newPath, oldPath, reprints) { - var newNode = newPath.getValue(); - isObject.assert(newNode); - - if (newNode.original === null) { - // If newNode.original node was set to null, reprint the node. - return false; - } - - var oldNode = oldPath.getValue(); - if (!isObject.check(oldNode)) - return false; - - if (Printable.check(newNode)) { - if (!Printable.check(oldNode)) { - return false; - } - - // Here we need to decide whether the reprinted code for newNode - // is appropriate for patching into the location of oldNode. - - if (newNode.type === oldNode.type) { - var childReprints = []; - - if (findChildReprints(newPath, oldPath, childReprints)) { - reprints.push.apply(reprints, childReprints); - } else if (oldNode.loc) { - // If we have no .loc information for oldNode, then we - // won't be able to reprint it. - reprints.push({ - oldPath: oldPath.copy(), - newPath: newPath.copy() - }); - } else { - return false; - } - - return true; - } - - if (Expression.check(newNode) && - Expression.check(oldNode) && - // If we have no .loc information for oldNode, then we won't - // be able to reprint it. - oldNode.loc) { - - // If both nodes are subtypes of Expression, then we should be - // able to fill the location occupied by the old node with - // code printed for the new node with no ill consequences. - reprints.push({ - oldPath: oldPath.copy(), - newPath: newPath.copy() - }); - - return true; - } - - // The nodes have different types, and at least one of the types - // is not a subtype of the Expression type, so we cannot safely - // assume the nodes are syntactically interchangeable. - return false; - } - - return findChildReprints(newPath, oldPath, reprints); - } - -// This object is reused in hasOpeningParen and hasClosingParen to avoid -// having to allocate a temporary object. - var reusablePos = { line: 1, column: 0 }; - var nonSpaceExp = /\S/; - - function hasOpeningParen(oldPath) { - var oldNode = oldPath.getValue(); - var loc = oldNode.loc; - var lines = loc && loc.lines; - - if (lines) { - var pos = reusablePos; - pos.line = loc.start.line; - pos.column = loc.start.column; - - while (lines.prevPos(pos)) { - var ch = lines.charAt(pos); - - if (ch === "(") { - // If we found an opening parenthesis but it occurred before - // the start of the original subtree for this reprinting, then - // we must not return true for hasOpeningParen(oldPath). - return comparePos(oldPath.getRootValue().loc.start, pos) <= 0; - } - - if (nonSpaceExp.test(ch)) { - return false; - } - } - } - - return false; - } - - function hasClosingParen(oldPath) { - var oldNode = oldPath.getValue(); - var loc = oldNode.loc; - var lines = loc && loc.lines; - - if (lines) { - var pos = reusablePos; - pos.line = loc.end.line; - pos.column = loc.end.column; - - do { - var ch = lines.charAt(pos); - - if (ch === ")") { - // If we found a closing parenthesis but it occurred after the - // end of the original subtree for this reprinting, then we - // must not return true for hasClosingParen(oldPath). - return comparePos(pos, oldPath.getRootValue().loc.end) <= 0; - } - - if (nonSpaceExp.test(ch)) { - return false; - } - - } while (lines.nextPos(pos)); - } - - return false; - } - - function hasParens(oldPath) { - // This logic can technically be fooled if the node has parentheses - // but there are comments intervening between the parentheses and the - // node. In such cases the node will be harmlessly wrapped in an - // additional layer of parentheses. - return hasOpeningParen(oldPath) && hasClosingParen(oldPath); - } - - function findChildReprints(newPath, oldPath, reprints) { - var newNode = newPath.getValue(); - var oldNode = oldPath.getValue(); - - isObject.assert(newNode); - isObject.assert(oldNode); - - if (newNode.original === null) { - // If newNode.original node was set to null, reprint the node. - return false; - } - - // If this type of node cannot come lexically first in its enclosing - // statement (e.g. a function expression or object literal), and it - // seems to be doing so, then the only way we can ignore this problem - // and save ourselves from falling back to the pretty printer is if an - // opening parenthesis happens to precede the node. For example, - // (function(){ ... }()); does not need to be reprinted, even though - // the FunctionExpression comes lexically first in the enclosing - // ExpressionStatement and fails the hasParens test, because the - // parent CallExpression passes the hasParens test. If we relied on - // the path.needsParens() && !hasParens(oldNode) check below, the - // absence of a closing parenthesis after the FunctionExpression would - // trigger pretty-printing unnecessarily. - if (!newPath.canBeFirstInStatement() && - newPath.firstInStatement() && - !hasOpeningParen(oldPath)) - return false; - - // If this node needs parentheses and will not be wrapped with - // parentheses when reprinted, then return false to skip reprinting - // and let it be printed generically. - if (newPath.needsParens(true) && !hasParens(oldPath)) { - return false; - } - - for (var k in util.getUnionOfKeys(newNode, oldNode)) { - if (k === "loc") - continue; - - newPath.stack.push(k, types.getFieldValue(newNode, k)); - oldPath.stack.push(k, types.getFieldValue(oldNode, k)); - var canReprint = findAnyReprints(newPath, oldPath, reprints); - newPath.stack.length -= 2; - oldPath.stack.length -= 2; - - if (!canReprint) { - return false; - } - } - - return true; - } - -},{"./fast-path":471,"./lines":472,"./types":478,"./util":479,"assert":203}],477:[function(require,module,exports){ - var assert = require("assert"); - var sourceMap = require("source-map"); - var printComments = require("./comments").printComments; - var linesModule = require("./lines"); - var fromString = linesModule.fromString; - var concat = linesModule.concat; - var normalizeOptions = require("./options").normalize; - var getReprinter = require("./patcher").getReprinter; - var types = require("./types"); - var namedTypes = types.namedTypes; - var isString = types.builtInTypes.string; - var isObject = types.builtInTypes.object; - var FastPath = require("./fast-path"); - var util = require("./util"); - - function PrintResult(code, sourceMap) { - assert.ok(this instanceof PrintResult); - - isString.assert(code); - this.code = code; - - if (sourceMap) { - isObject.assert(sourceMap); - this.map = sourceMap; - } - } - - var PRp = PrintResult.prototype; - var warnedAboutToString = false; - - PRp.toString = function() { - if (!warnedAboutToString) { - console.warn( - "Deprecation warning: recast.print now returns an object with " + - "a .code property. You appear to be treating the object as a " + - "string, which might still work but is strongly discouraged." - ); - - warnedAboutToString = true; - } - - return this.code; - }; - - var emptyPrintResult = new PrintResult(""); - - function Printer(originalOptions) { - assert.ok(this instanceof Printer); - - var explicitTabWidth = originalOptions && originalOptions.tabWidth; - var options = normalizeOptions(originalOptions); - assert.notStrictEqual(options, originalOptions); - - // It's common for client code to pass the same options into both - // recast.parse and recast.print, but the Printer doesn't need (and - // can be confused by) options.sourceFileName, so we null it out. - options.sourceFileName = null; - - function printWithComments(path) { - assert.ok(path instanceof FastPath); - return printComments(path, print); - } - - function print(path, includeComments) { - if (includeComments) - return printWithComments(path); - - assert.ok(path instanceof FastPath); - - if (!explicitTabWidth) { - var oldTabWidth = options.tabWidth; - var loc = path.getNode().loc; - if (loc && loc.lines && loc.lines.guessTabWidth) { - options.tabWidth = loc.lines.guessTabWidth(); - var lines = maybeReprint(path); - options.tabWidth = oldTabWidth; - return lines; - } - } - - return maybeReprint(path); - } - - function maybeReprint(path) { - var reprinter = getReprinter(path); - if (reprinter) - return maybeAddParens(path, reprinter(print)); - return printRootGenerically(path); - } - - // Print the root node generically, but then resume reprinting its - // children non-generically. - function printRootGenerically(path) { - return genericPrint(path, options, printWithComments); - } - - // Print the entire AST generically. - function printGenerically(path) { - return genericPrint(path, options, printGenerically); - } - - this.print = function(ast) { - if (!ast) { - return emptyPrintResult; - } - - var lines = print(FastPath.from(ast), true); - - return new PrintResult( - lines.toString(options), - util.composeSourceMaps( - options.inputSourceMap, - lines.getSourceMap( - options.sourceMapName, - options.sourceRoot - ) - ) - ); - }; - - this.printGenerically = function(ast) { - if (!ast) { - return emptyPrintResult; - } - - var path = FastPath.from(ast); - var oldReuseWhitespace = options.reuseWhitespace; - - // Do not reuse whitespace (or anything else, for that matter) - // when printing generically. - options.reuseWhitespace = false; - - // TODO Allow printing of comments? - var pr = new PrintResult(printGenerically(path).toString(options)); - options.reuseWhitespace = oldReuseWhitespace; - return pr; - }; - } - - exports.Printer = Printer; - - function maybeAddParens(path, lines) { - return path.needsParens() ? concat(["(", lines, ")"]) : lines; - } - - function genericPrint(path, options, printPath) { - assert.ok(path instanceof FastPath); - return maybeAddParens(path, genericPrintNoParens(path, options, printPath)); - } - - function genericPrintNoParens(path, options, print) { - var n = path.getValue(); - - if (!n) { - return fromString(""); - } - - if (typeof n === "string") { - return fromString(n, options); - } - - namedTypes.Printable.assert(n); - - switch (n.type) { - case "File": - return path.call(print, "program"); - - case "Program": - return maybeAddSemicolon(path.call(function(bodyPath) { - return printStatementSequence(bodyPath, options, print); - }, "body")); - - case "EmptyStatement": - return fromString(""); - - case "ExpressionStatement": - return concat([path.call(print, "expression"), ";"]); - - case "BinaryExpression": - case "LogicalExpression": - case "AssignmentExpression": - return fromString(" ").join([ - path.call(print, "left"), - n.operator, - path.call(print, "right") - ]); - - case "AssignmentPattern": - return concat([ - path.call(print, "left"), - "=", - path.call(print, "right") - ]); - - case "MemberExpression": - var parts = [path.call(print, "object")]; - - var property = path.call(print, "property"); - if (n.computed) { - parts.push("[", property, "]"); - } else { - parts.push(".", property); - } - - return concat(parts); - - case "Path": - return fromString(".").join(n.body); - - case "Identifier": - return concat([ - fromString(n.name, options), - path.call(print, "typeAnnotation") - ]); - - case "SpreadElement": - case "SpreadElementPattern": - case "SpreadProperty": - case "SpreadPropertyPattern": - case "RestElement": - return concat(["...", path.call(print, "argument")]); - - case "FunctionDeclaration": - case "FunctionExpression": - var parts = []; - - if (n.async) - parts.push("async "); - - parts.push("function"); - - if (n.generator) - parts.push("*"); - - if (n.id) { - parts.push( - " ", - path.call(print, "id"), - path.call(print, "typeParameters") - ); - } - - parts.push( - "(", - printFunctionParams(path, options, print), - ")", - path.call(print, "returnType"), - " ", - path.call(print, "body") - ); - - return concat(parts); - - case "ArrowFunctionExpression": - var parts = []; - - if (n.async) - parts.push("async "); - - if (n.params.length === 1 && !n.rest) { - parts.push(path.call(print, "params", 0)); - } else { - parts.push( - "(", - printFunctionParams(path, options, print), - ")" - ); - } - - parts.push(" => ", path.call(print, "body")); - - return concat(parts); - - case "MethodDefinition": - var parts = []; - - if (n.static) { - parts.push("static "); - } - - parts.push(printMethod(path, options, print)); - - return concat(parts); - - case "YieldExpression": - var parts = ["yield"]; - - if (n.delegate) - parts.push("*"); - - if (n.argument) - parts.push(" ", path.call(print, "argument")); - - return concat(parts); - - case "AwaitExpression": - var parts = ["await"]; - - if (n.all) - parts.push("*"); - - if (n.argument) - parts.push(" ", path.call(print, "argument")); - - return concat(parts); - - case "ModuleDeclaration": - var parts = ["module", path.call(print, "id")]; - - if (n.source) { - assert.ok(!n.body); - parts.push("from", path.call(print, "source")); - } else { - parts.push(path.call(print, "body")); - } - - return fromString(" ").join(parts); - - case "ImportSpecifier": - case "ExportSpecifier": - var parts = [path.call(print, "id")]; - - if (n.name) - parts.push(" as ", path.call(print, "name")); - - return concat(parts); - - case "ExportBatchSpecifier": - return fromString("*"); - - case "ImportNamespaceSpecifier": - return concat(["* as ", path.call(print, "id")]); - - case "ImportDefaultSpecifier": - return path.call(print, "id"); - - case "ExportDeclaration": - var parts = ["export"]; - - if (n["default"]) { - parts.push(" default"); - - } else if (n.specifiers && - n.specifiers.length > 0) { - - if (n.specifiers.length === 1 && - n.specifiers[0].type === "ExportBatchSpecifier") { - parts.push(" *"); - } else { - parts.push( - " { ", - fromString(", ").join(path.map(print, "specifiers")), - " }" - ); - } - - if (n.source) - parts.push(" from ", path.call(print, "source")); - - parts.push(";"); - - return concat(parts); - } - - if (n.declaration) { - if (!namedTypes.Node.check(n.declaration)) { - console.log(JSON.stringify(n, null, 2)); - } - var decLines = path.call(print, "declaration"); - parts.push(" ", decLines); - if (lastNonSpaceCharacter(decLines) !== ";") { - parts.push(";"); - } - } - - return concat(parts); - - case "ImportDeclaration": - var parts = ["import "]; - - if (n.specifiers && - n.specifiers.length > 0) { - - var foundImportSpecifier = false; - - path.each(function(specifierPath) { - var i = specifierPath.getName(); - if (i > 0) { - parts.push(", "); - } - - var value = specifierPath.getValue(); - - if (namedTypes.ImportDefaultSpecifier.check(value) || - namedTypes.ImportNamespaceSpecifier.check(value)) { - assert.strictEqual(foundImportSpecifier, false); - } else { - namedTypes.ImportSpecifier.assert(value); - if (!foundImportSpecifier) { - foundImportSpecifier = true; - parts.push("{"); - } - } - - parts.push(print(specifierPath)); - }, "specifiers"); - - if (foundImportSpecifier) { - parts.push("}"); - } - - parts.push(" from "); - } - - parts.push(path.call(print, "source"), ";"); - - return concat(parts); - - case "BlockStatement": - var naked = path.call(function(bodyPath) { - return printStatementSequence(bodyPath, options, print); - }, "body"); - - if (naked.isEmpty()) { - return fromString("{}"); - } - - return concat([ - "{\n", - naked.indent(options.tabWidth), - "\n}" - ]); - - case "ReturnStatement": - var parts = ["return"]; - - if (n.argument) { - var argLines = path.call(print, "argument"); - if (argLines.length > 1 && - (namedTypes.XJSElement && - namedTypes.XJSElement.check(n.argument) || - namedTypes.JSXElement && - namedTypes.JSXElement.check(n.argument))) { - parts.push( - " (\n", - argLines.indent(options.tabWidth), - "\n)" - ); - } else { - parts.push(" ", argLines); - } - } - - parts.push(";"); - - return concat(parts); - - case "CallExpression": - return concat([ - path.call(print, "callee"), - printArgumentsList(path, options, print) - ]); - - case "ObjectExpression": - case "ObjectPattern": - case "ObjectTypeAnnotation": - var allowBreak = false; - var isTypeAnnotation = n.type === "ObjectTypeAnnotation"; - var separator = isTypeAnnotation ? ';' : ','; - var fields = []; - - if (isTypeAnnotation) { - fields.push("indexers", "callProperties"); - } - - fields.push("properties"); - - var len = 0; - fields.forEach(function(field) { - len += n[field].length; - }); - - var oneLine = (isTypeAnnotation && len === 1) || len === 0; - var parts = [oneLine ? "{" : "{\n"]; - - fields.forEach(function(field) { - path.map(function(childPath) { - var i = childPath.getName(); - var prop = childPath.getValue(); - var lines = print(childPath); - - if (!oneLine) { - lines = lines.indent(options.tabWidth); - } - - var multiLine = !isTypeAnnotation && lines.length > 1; - if (multiLine && allowBreak) { - // Similar to the logic for BlockStatement. - parts.push("\n"); - } - - parts.push(lines); - - if (i < len - 1) { - // Add an extra line break if the previous object property - // had a multi-line value. - parts.push(separator + (multiLine ? "\n\n" : "\n")); - allowBreak = !multiLine; - } else if (len !== 1 && isTypeAnnotation) { - parts.push(separator); - } - }, field); - }); - - parts.push(oneLine ? "}" : "\n}"); - - return concat(parts); - - case "PropertyPattern": - return concat([ - path.call(print, "key"), - ": ", - path.call(print, "pattern") - ]); - - case "Property": // Non-standard AST node type. - if (n.method || n.kind === "get" || n.kind === "set") { - return printMethod(path, options, print); - } - - var key = path.call(print, "key"); - if (n.computed) { - key = concat(["[", key, "]"]); - } - - if (n.shorthand) { - return key; - } - - return concat([key, ": ", path.call(print, "value")]); - - case "ArrayExpression": - case "ArrayPattern": - var elems = n.elements, - len = elems.length, - parts = ["["]; - - path.each(function(elemPath) { - var i = elemPath.getName(); - var elem = elemPath.getValue(); - if (!elem) { - // If the array expression ends with a hole, that hole - // will be ignored by the interpreter, but if it ends with - // two (or more) holes, we need to write out two (or more) - // commas so that the resulting code is interpreted with - // both (all) of the holes. - parts.push(","); - } else { - if (i > 0) - parts.push(" "); - parts.push(print(elemPath)); - if (i < len - 1) - parts.push(","); - } - }, "elements"); - - parts.push("]"); - - return concat(parts); - - case "SequenceExpression": - return fromString(", ").join(path.map(print, "expressions")); - - case "ThisExpression": - return fromString("this"); - - case "Literal": - if (typeof n.value !== "string") - return fromString(n.value, options); - - // intentionally fall through... - - case "ModuleSpecifier": - return fromString(nodeStr(n.value, options), options); - - case "UnaryExpression": - var parts = [n.operator]; - if (/[a-z]$/.test(n.operator)) - parts.push(" "); - parts.push(path.call(print, "argument")); - return concat(parts); - - case "UpdateExpression": - var parts = [path.call(print, "argument"), n.operator]; - - if (n.prefix) - parts.reverse(); - - return concat(parts); - - case "ConditionalExpression": - return concat([ - "(", path.call(print, "test"), - " ? ", path.call(print, "consequent"), - " : ", path.call(print, "alternate"), ")" - ]); - - case "NewExpression": - var parts = ["new ", path.call(print, "callee")]; - var args = n.arguments; - if (args) { - parts.push(printArgumentsList(path, options, print)); - } - - return concat(parts); - - case "VariableDeclaration": - var parts = [n.kind, " "]; - var maxLen = 0; - var printed = path.map(function(childPath) { - var lines = print(childPath); - maxLen = Math.max(lines.length, maxLen); - return lines; - }, "declarations"); - - if (maxLen === 1) { - parts.push(fromString(", ").join(printed)); - } else if (printed.length > 1 ) { - parts.push( - fromString(",\n").join(printed) - .indentTail(n.kind.length + 1) - ); - } else { - parts.push(printed[0]); - } - - // We generally want to terminate all variable declarations with a - // semicolon, except when they are children of for loops. - var parentNode = path.getParentNode(); - if (!namedTypes.ForStatement.check(parentNode) && - !namedTypes.ForInStatement.check(parentNode) && - !(namedTypes.ForOfStatement && - namedTypes.ForOfStatement.check(parentNode))) { - parts.push(";"); - } - - return concat(parts); - - case "VariableDeclarator": - return n.init ? fromString(" = ").join([ - path.call(print, "id"), - path.call(print, "init") - ]) : path.call(print, "id"); - - case "WithStatement": - return concat([ - "with (", - path.call(print, "object"), - ") ", - path.call(print, "body") - ]); - - case "IfStatement": - var con = adjustClause(path.call(print, "consequent"), options), - parts = ["if (", path.call(print, "test"), ")", con]; - - if (n.alternate) - parts.push( - endsWithBrace(con) ? " else" : "\nelse", - adjustClause(path.call(print, "alternate"), options)); - - return concat(parts); - - case "ForStatement": - // TODO Get the for (;;) case right. - var init = path.call(print, "init"), - sep = init.length > 1 ? ";\n" : "; ", - forParen = "for (", - indented = fromString(sep).join([ - init, - path.call(print, "test"), - path.call(print, "update") - ]).indentTail(forParen.length), - head = concat([forParen, indented, ")"]), - clause = adjustClause(path.call(print, "body"), options), - parts = [head]; - - if (head.length > 1) { - parts.push("\n"); - clause = clause.trimLeft(); - } - - parts.push(clause); - - return concat(parts); - - case "WhileStatement": - return concat([ - "while (", - path.call(print, "test"), - ")", - adjustClause(path.call(print, "body"), options) - ]); - - case "ForInStatement": - // Note: esprima can't actually parse "for each (". - return concat([ - n.each ? "for each (" : "for (", - path.call(print, "left"), - " in ", - path.call(print, "right"), - ")", - adjustClause(path.call(print, "body"), options) - ]); - - case "ForOfStatement": - return concat([ - "for (", - path.call(print, "left"), - " of ", - path.call(print, "right"), - ")", - adjustClause(path.call(print, "body"), options) - ]); - - case "DoWhileStatement": - var doBody = concat([ - "do", - adjustClause(path.call(print, "body"), options) - ]), parts = [doBody]; - - if (endsWithBrace(doBody)) - parts.push(" while"); - else - parts.push("\nwhile"); - - parts.push(" (", path.call(print, "test"), ");"); - - return concat(parts); - - case "BreakStatement": - var parts = ["break"]; - if (n.label) - parts.push(" ", path.call(print, "label")); - parts.push(";"); - return concat(parts); - - case "ContinueStatement": - var parts = ["continue"]; - if (n.label) - parts.push(" ", path.call(print, "label")); - parts.push(";"); - return concat(parts); - - case "LabeledStatement": - return concat([ - path.call(print, "label"), - ":\n", - path.call(print, "body") - ]); - - case "TryStatement": - var parts = [ - "try ", - path.call(print, "block") - ]; - - if (n.handler) { - parts.push(" ", path.call(print, "handler")); - } else if (n.handlers) { - path.each(function(handlerPath) { - parts.push(" ", print(handlerPath)); - }, "handlers"); - } - - if (n.finalizer) { - parts.push(" finally ", path.call(print, "finalizer")); - } - - return concat(parts); - - case "CatchClause": - var parts = ["catch (", path.call(print, "param")]; - - if (n.guard) - // Note: esprima does not recognize conditional catch clauses. - parts.push(" if ", path.call(print, "guard")); - - parts.push(") ", path.call(print, "body")); - - return concat(parts); - - case "ThrowStatement": - return concat(["throw ", path.call(print, "argument"), ";"]); - - case "SwitchStatement": - return concat([ - "switch (", - path.call(print, "discriminant"), - ") {\n", - fromString("\n").join(path.map(print, "cases")), - "\n}" - ]); - - // Note: ignoring n.lexical because it has no printing consequences. - - case "SwitchCase": - var parts = []; - - if (n.test) - parts.push("case ", path.call(print, "test"), ":"); - else - parts.push("default:"); - - if (n.consequent.length > 0) { - parts.push("\n", path.call(function(consequentPath) { - return printStatementSequence(consequentPath, options, print); - }, "consequent").indent(options.tabWidth)); - } - - return concat(parts); - - case "DebuggerStatement": - return fromString("debugger;"); - - // JSX extensions below. - - case "XJSAttribute": - case "JSXAttribute": - var parts = [path.call(print, "name")]; - if (n.value) - parts.push("=", path.call(print, "value")); - return concat(parts); - - case "XJSIdentifier": - case "JSXIdentifier": - return fromString(n.name, options); - - case "XJSNamespacedName": - case "JSXNamespacedName": - return fromString(":").join([ - path.call(print, "namespace"), - path.call(print, "name") - ]); - - case "XJSMemberExpression": - case "JSXMemberExpression": - return fromString(".").join([ - path.call(print, "object"), - path.call(print, "property") - ]); - - case "XJSSpreadAttribute": - case "JSXSpreadAttribute": - return concat(["{...", path.call(print, "argument"), "}"]); - - case "XJSExpressionContainer": - case "JSXExpressionContainer": - return concat(["{", path.call(print, "expression"), "}"]); - - case "XJSElement": - case "JSXElement": - var openingLines = path.call(print, "openingElement"); - - if (n.openingElement.selfClosing) { - assert.ok(!n.closingElement); - return openingLines; - } - - var childLines = concat( - path.map(function(childPath) { - var child = childPath.getValue(); - - if (namedTypes.Literal.check(child) && - typeof child.value === "string") { - if (/\S/.test(child.value)) { - return child.value.replace(/^\s+|\s+$/g, ""); - } else if (/\n/.test(child.value)) { - return "\n"; - } - } - - return print(childPath); - }, "children") - ).indentTail(options.tabWidth); - - var closingLines = path.call(print, "closingElement"); - - return concat([ - openingLines, - childLines, - closingLines - ]); - - case "XJSOpeningElement": - case "JSXOpeningElement": - var parts = ["<", path.call(print, "name")]; - var attrParts = []; - - path.each(function(attrPath) { - attrParts.push(" ", print(attrPath)); - }, "attributes"); - - var attrLines = concat(attrParts); - - var needLineWrap = ( - attrLines.length > 1 || - attrLines.getLineLength(1) > options.wrapColumn - ); - - if (needLineWrap) { - attrParts.forEach(function(part, i) { - if (part === " ") { - assert.strictEqual(i % 2, 0); - attrParts[i] = "\n"; - } - }); - - attrLines = concat(attrParts).indentTail(options.tabWidth); - } - - parts.push(attrLines, n.selfClosing ? " />" : ">"); - - return concat(parts); - - case "XJSClosingElement": - case "JSXClosingElement": - return concat([""]); - - case "XJSText": - case "JSXText": - return fromString(n.value, options); - - case "XJSEmptyExpression": - case "JSXEmptyExpression": - return fromString(""); - - case "TypeAnnotatedIdentifier": - return concat([ - path.call(print, "annotation"), - " ", - path.call(print, "identifier") - ]); - - case "ClassBody": - if (n.body.length === 0) { - return fromString("{}"); - } - - return concat([ - "{\n", - path.call(function(bodyPath) { - return printStatementSequence(bodyPath, options, print); - }, "body").indent(options.tabWidth), - "\n}" - ]); - - case "ClassPropertyDefinition": - var parts = ["static ", path.call(print, "definition")]; - if (!namedTypes.MethodDefinition.check(n.definition)) - parts.push(";"); - return concat(parts); - - case "ClassProperty": - return concat([ - path.call(print, "key"), - path.call(print, "typeAnnotation"), - ";" - ]); - - case "ClassDeclaration": - case "ClassExpression": - var parts = ["class"]; - - if (n.id) { - parts.push( - " ", - path.call(print, "id"), - path.call(print, "typeParameters") - ); - } - - if (n.superClass) { - parts.push( - " extends ", - path.call(print, "superClass"), - path.call(print, "superTypeParameters") - ); - } - - if (n["implements"]) { - parts.push( - " implements ", - fromString(", ").join(path.map(print, "implements")) - ); - } - - parts.push(" ", path.call(print, "body")); - - return concat(parts); - - // These types are unprintable because they serve as abstract - // supertypes for other (printable) types. - case "Node": - case "Printable": - case "SourceLocation": - case "Position": - case "Statement": - case "Function": - case "Pattern": - case "Expression": - case "Declaration": - case "Specifier": - case "NamedSpecifier": - case "Comment": // Supertype of Block and Line. - case "MemberTypeAnnotation": // Flow - case "TupleTypeAnnotation": // Flow - case "Type": // Flow - throw new Error("unprintable type: " + JSON.stringify(n.type)); - - case "Block": // Block comment. - return concat(["/*", fromString(n.value, options), "*/"]); - - case "Line": // Line comment. - return concat(["//", fromString(n.value, options)]); - - // Type Annotations for Facebook Flow, typically stripped out or - // transformed away before printing. - case "TypeAnnotation": - var parts = []; - - if (n.typeAnnotation) { - if (n.typeAnnotation.type !== "FunctionTypeAnnotation") { - parts.push(": "); - } - parts.push(path.call(print, "typeAnnotation")); - return concat(parts); - } - - return fromString(""); - - case "AnyTypeAnnotation": - return fromString("any", options); - - case "ArrayTypeAnnotation": - return concat([ - path.call(print, "elementType"), - "[]" - ]); - - case "BooleanTypeAnnotation": - return fromString("boolean", options); - - case "DeclareClass": - return concat([ - fromString("declare class ", options), - path.call(print, "id"), - " ", - path.call(print, "body"), - ]); - - case "DeclareFunction": - return concat([ - fromString("declare function ", options), - path.call(print, "id") - ]); - - case "DeclareModule": - return concat([ - fromString("declare module ", options), - path.call(print, "id"), - " ", - path.call(print, "body"), - ]); - - case "DeclareVariable": - return concat([ - fromString("declare var ", options), - path.call(print, "id") - ]); - - case "FunctionTypeAnnotation": - // FunctionTypeAnnotation is ambiguous: - // declare function(a: B): void; OR - // var A: (a: B) => void; - var parts = []; - var parent = path.getParentNode(0); - var isArrowFunctionTypeAnnotation = !( - namedTypes.ObjectTypeCallProperty.check(parent) || - namedTypes.DeclareFunction.check(path.getParentNode(2)) - ); - - var needsColon = - isArrowFunctionTypeAnnotation && - !namedTypes.FunctionTypeParam.check(parent); - - if (needsColon) { - parts.push(": "); - } - - parts.push( - "(", - fromString(", ").join(path.map(print, "params")), - ")" - ); - - // The returnType is not wrapped in a TypeAnnotation, so the colon - // needs to be added separately. - if (n.returnType) { - parts.push( - isArrowFunctionTypeAnnotation ? " => " : ": ", - path.call(print, "returnType") - ); - } - - return concat(parts); - - case "FunctionTypeParam": - return concat([ - path.call(print, "name"), - ": ", - path.call(print, "typeAnnotation"), - ]); - - case "GenericTypeAnnotation": - return concat([ - path.call(print, "id"), - path.call(print, "typeParameters") - ]); - - case "InterfaceDeclaration": - var parts = [ - fromString("interface ", options), - path.call(print, "id"), - path.call(print, "typeParameters"), - " " - ]; - - if (n["extends"]) { - parts.push( - "extends ", - fromString(", ").join(path.map(print, "extends")) - ); - } - - parts.push(path.call(print, "body")); - - return concat(parts); - - case "ClassImplements": - case "InterfaceExtends": - return concat([ - path.call(print, "id"), - path.call(print, "typeParameters") - ]); - - case "IntersectionTypeAnnotation": - return fromString(" & ").join(path.map(print, "types")); - - case "NullableTypeAnnotation": - return concat([ - "?", - path.call(print, "typeAnnotation") - ]); - - case "NumberTypeAnnotation": - return fromString("number", options); - - case "ObjectTypeCallProperty": - return path.call(print, "value"); - - case "ObjectTypeIndexer": - return concat([ - "[", - path.call(print, "id"), - ": ", - path.call(print, "key"), - "]: ", - path.call(print, "value") - ]); - - case "ObjectTypeProperty": - return concat([ - path.call(print, "key"), - ": ", - path.call(print, "value") - ]); - - case "QualifiedTypeIdentifier": - return concat([ - path.call(print, "qualification"), - ".", - path.call(print, "id") - ]); - - case "StringLiteralTypeAnnotation": - return fromString(nodeStr(n.value, options), options); - - case "StringTypeAnnotation": - return fromString("string", options); - - case "TypeAlias": - return concat([ - "type ", - path.call(print, "id"), - " = ", - path.call(print, "right") - ]); - - case "TypeCastExpression": - return concat([ - "(", - path.call(print, "expression"), - path.call(print, "typeAnnotation"), - ")" - ]); - - case "TypeParameterDeclaration": - case "TypeParameterInstantiation": - return concat([ - "<", - fromString(", ").join(path.map(print, "params")), - ">" - ]); - - case "TypeofTypeAnnotation": - return concat([ - fromString("typeof ", options), - path.call(print, "argument") - ]); - - case "UnionTypeAnnotation": - return fromString(" | ").join(path.map(print, "types")); - - case "VoidTypeAnnotation": - return fromString("void", options); - - // Unhandled types below. If encountered, nodes of these types should - // be either left alone or desugared into AST types that are fully - // supported by the pretty-printer. - case "ClassHeritage": // TODO - case "ComprehensionBlock": // TODO - case "ComprehensionExpression": // TODO - case "Glob": // TODO - case "TaggedTemplateExpression": // TODO - case "TemplateElement": // TODO - case "TemplateLiteral": // TODO - case "GeneratorExpression": // TODO - case "LetStatement": // TODO - case "LetExpression": // TODO - case "GraphExpression": // TODO - case "GraphIndexExpression": // TODO - - // XML types that nobody cares about or needs to print. - case "XMLDefaultDeclaration": - case "XMLAnyName": - case "XMLQualifiedIdentifier": - case "XMLFunctionQualifiedIdentifier": - case "XMLAttributeSelector": - case "XMLFilterExpression": - case "XML": - case "XMLElement": - case "XMLList": - case "XMLEscape": - case "XMLText": - case "XMLStartTag": - case "XMLEndTag": - case "XMLPointTag": - case "XMLName": - case "XMLAttribute": - case "XMLCdata": - case "XMLComment": - case "XMLProcessingInstruction": - default: - debugger; - throw new Error("unknown type: " + JSON.stringify(n.type)); - } - - return p; - } - - function printStatementSequence(path, options, print) { - var inClassBody = - namedTypes.ClassBody && - namedTypes.ClassBody.check(path.getParentNode()); - - var filtered = []; - path.each(function(stmtPath) { - var i = stmtPath.getName(); - var stmt = stmtPath.getValue(); - - // Just in case the AST has been modified to contain falsy - // "statements," it's safer simply to skip them. - if (!stmt) { - return; - } - - // Skip printing EmptyStatement nodes to avoid leaving stray - // semicolons lying around. - if (stmt.type === "EmptyStatement") { - return; - } - - if (!inClassBody) { - namedTypes.Statement.assert(stmt); - } - - // We can't hang onto stmtPath outside of this function, because - // it's just a reference to a mutable FastPath object, so we have - // to go ahead and print it here. - filtered.push({ - node: stmt, - printed: print(stmtPath) - }); - }); - - var prevTrailingSpace = null; - var len = filtered.length; - var parts = []; - - filtered.forEach(function(info, i) { - var printed = info.printed; - var stmt = info.node; - var needSemicolon = true; - var multiLine = printed.length > 1; - var notFirst = i > 0; - var notLast = i < len - 1; - var leadingSpace; - var trailingSpace; - - if (inClassBody) { - if (namedTypes.MethodDefinition.check(stmt) || - (namedTypes.ClassPropertyDefinition.check(stmt) && - namedTypes.MethodDefinition.check(stmt.definition))) { - needSemicolon = false; - } - } - - if (needSemicolon) { - // Try to add a semicolon to anything that isn't a method in a - // class body. - printed = maybeAddSemicolon(printed); - } - - var trueLoc = options.reuseWhitespace && util.getTrueLoc(stmt); - var lines = trueLoc && trueLoc.lines; - - if (notFirst) { - if (lines) { - var beforeStart = lines.skipSpaces(trueLoc.start, true); - var beforeStartLine = beforeStart ? beforeStart.line : 1; - var leadingGap = trueLoc.start.line - beforeStartLine; - leadingSpace = Array(leadingGap + 1).join("\n"); - } else { - leadingSpace = multiLine ? "\n\n" : "\n"; - } - } else { - leadingSpace = ""; - } - - if (notLast) { - if (lines) { - var afterEnd = lines.skipSpaces(trueLoc.end); - var afterEndLine = afterEnd ? afterEnd.line : lines.length; - var trailingGap = afterEndLine - trueLoc.end.line; - trailingSpace = Array(trailingGap + 1).join("\n"); - } else { - trailingSpace = multiLine ? "\n\n" : "\n"; - } - } else { - trailingSpace = ""; - } - - parts.push( - maxSpace(prevTrailingSpace, leadingSpace), - printed - ); - - if (notLast) { - prevTrailingSpace = trailingSpace; - } else if (trailingSpace) { - parts.push(trailingSpace); - } - }); - - return concat(parts); - } - - function maxSpace(s1, s2) { - if (!s1 && !s2) { - return fromString(""); - } - - if (!s1) { - return fromString(s2); - } - - if (!s2) { - return fromString(s1); - } - - var spaceLines1 = fromString(s1); - var spaceLines2 = fromString(s2); - - if (spaceLines2.length > spaceLines1.length) { - return spaceLines2; - } - - return spaceLines1; - } - - function printMethod(path, options, print) { - var node = path.getNode(); - var kind = node.kind; - var parts = []; - - namedTypes.FunctionExpression.assert(node.value); - - if (node.value.async) { - parts.push("async "); - } - - if (!kind || kind === "init") { - if (node.value.generator) { - parts.push("*"); - } - } else { - assert.ok(kind === "get" || kind === "set"); - parts.push(kind, " "); - } - - var key = path.call(print, "key"); - if (node.computed) { - key = concat(["[", key, "]"]); - } - - parts.push( - key, - path.call(print, "value", "typeParameters"), - "(", - path.call(function(valuePath) { - return printFunctionParams(valuePath, options, print); - }, "value"), - ")", - path.call(print, "value", "returnType"), - " ", - path.call(print, "value", "body") - ); - - return concat(parts); - } - - function printArgumentsList(path, options, print) { - var printed = path.map(print, "arguments"); - - var joined = fromString(", ").join(printed); - if (joined.getLineLength(1) > options.wrapColumn) { - joined = fromString(",\n").join(printed); - return concat(["(\n", joined.indent(options.tabWidth), "\n)"]); - } - - return concat(["(", joined, ")"]); - } - - function printFunctionParams(path, options, print) { - var fun = path.getValue(); - namedTypes.Function.assert(fun); - - var printed = path.map(print, "params"); - - if (fun.defaults) { - path.each(function(defExprPath) { - var i = defExprPath.getName(); - var p = printed[i]; - if (p && defExprPath.getValue()) { - printed[i] = concat([p, "=", print(defExprPath)]); - } - }, "defaults"); - } - - if (fun.rest) { - printed.push(concat(["...", path.call(print, "rest")])); - } - - var joined = fromString(", ").join(printed); - if (joined.length > 1 || - joined.getLineLength(1) > options.wrapColumn) { - joined = fromString(",\n").join(printed); - return concat(["\n", joined.indent(options.tabWidth)]); - } - - return joined; - } - - function adjustClause(clause, options) { - if (clause.length > 1) - return concat([" ", clause]); - - return concat([ - "\n", - maybeAddSemicolon(clause).indent(options.tabWidth) - ]); - } - - function lastNonSpaceCharacter(lines) { - var pos = lines.lastPos(); - do { - var ch = lines.charAt(pos); - if (/\S/.test(ch)) - return ch; - } while (lines.prevPos(pos)); - } - - function endsWithBrace(lines) { - return lastNonSpaceCharacter(lines) === "}"; - } - - function swapQuotes(str) { - return str.replace(/['"]/g, function(m) { - return m === '"' ? '\'' : '"'; - }); - } - - function nodeStr(str, options) { - isString.assert(str); - switch (options.quote) { - case "auto": - var double = JSON.stringify(str); - var single = swapQuotes(JSON.stringify(swapQuotes(str))); - return double.length > single.length ? single : double; - case "single": - return swapQuotes(JSON.stringify(swapQuotes(str))); - case "double": - default: - return JSON.stringify(str); - } - } - - function maybeAddSemicolon(lines) { - var eoc = lastNonSpaceCharacter(lines); - if (!eoc || "\n};".indexOf(eoc) < 0) - return concat([lines, ";"]); - return lines; - } - -},{"./comments":470,"./fast-path":471,"./lines":472,"./options":474,"./patcher":476,"./types":478,"./util":479,"assert":203,"source-map":493}],478:[function(require,module,exports){ - var types = require("ast-types"); - var def = types.Type.def; - - def("File") - .bases("Node") - .build("program") - .field("program", def("Program")); - - types.finalize(); - - module.exports = types; - -},{"ast-types":201}],479:[function(require,module,exports){ - var assert = require("assert"); - var types = require("./types"); - var getFieldValue = types.getFieldValue; - var n = types.namedTypes; - var sourceMap = require("source-map"); - var SourceMapConsumer = sourceMap.SourceMapConsumer; - var SourceMapGenerator = sourceMap.SourceMapGenerator; - var hasOwn = Object.prototype.hasOwnProperty; - - function getUnionOfKeys() { - var result = {}; - var argc = arguments.length; - for (var i = 0; i < argc; ++i) { - var keys = Object.keys(arguments[i]); - var keyCount = keys.length; - for (var j = 0; j < keyCount; ++j) { - result[keys[j]] = true; - } - } - return result; - } - exports.getUnionOfKeys = getUnionOfKeys; - - function comparePos(pos1, pos2) { - return (pos1.line - pos2.line) || (pos1.column - pos2.column); - } - exports.comparePos = comparePos; - - function copyPos(pos) { - return { - line: pos.line, - column: pos.column - }; - } - exports.copyPos = copyPos; - - exports.composeSourceMaps = function(formerMap, latterMap) { - if (formerMap) { - if (!latterMap) { - return formerMap; - } - } else { - return latterMap || null; - } - - var smcFormer = new SourceMapConsumer(formerMap); - var smcLatter = new SourceMapConsumer(latterMap); - var smg = new SourceMapGenerator({ - file: latterMap.file, - sourceRoot: latterMap.sourceRoot - }); - - var sourcesToContents = {}; - - smcLatter.eachMapping(function(mapping) { - var origPos = smcFormer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - - var sourceName = origPos.source; - if (sourceName === null) { - return; - } - - smg.addMapping({ - source: sourceName, - original: copyPos(origPos), - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - }, - name: mapping.name - }); - - var sourceContent = smcFormer.sourceContentFor(sourceName); - if (sourceContent && !hasOwn.call(sourcesToContents, sourceName)) { - sourcesToContents[sourceName] = sourceContent; - smg.setSourceContent(sourceName, sourceContent); - } - }); - - return smg.toJSON(); - }; - - exports.getTrueLoc = function(node) { - // It's possible that node is newly-created (not parsed by Esprima), - // in which case it probably won't have a .loc property (or an - // .original property for that matter). That's fine; we'll just - // pretty-print it as usual. - if (!node.loc) { - return null; - } - - if (!node.comments) { - // If the node has no comments, regard node.loc as true. - return node.loc; - } - - var start = node.loc.start; - var end = node.loc.end; - - // If the node has any comments, their locations might contribute to - // the true start/end positions of the node. - node.comments.forEach(function(comment) { - if (comment.loc) { - if (comparePos(comment.loc.start, start) < 0) { - start = comment.loc.start; - } - - if (comparePos(end, comment.loc.end) < 0) { - end = comment.loc.end; - } - } - }); - - return { - lines: node.loc.lines, - start: start, - end: end - }; - }; - - exports.fixFaultyLocations = function(node) { - if ((n.MethodDefinition && n.MethodDefinition.check(node)) || - (n.Property.check(node) && (node.method || node.shorthand))) { - // If the node is a MethodDefinition or a .method or .shorthand - // Property, then the location information stored in - // node.value.loc is very likely untrustworthy (just the {body} - // part of a method, or nothing in the case of shorthand - // properties), so we null out that information to prevent - // accidental reuse of bogus source code during reprinting. - node.value.loc = null; - - if (n.FunctionExpression.check(node.value)) { - // FunctionExpression method values should be anonymous, - // because their .id fields are ignored anyway. - node.value.id = null; - } - } - - var loc = node.loc; - if (loc) { - if (loc.start.line < 1) { - loc.start.line = 1; - } - - if (loc.end.line < 1) { - loc.end.line = 1; - } - } - }; - -},{"./types":478,"assert":203,"source-map":493}],480:[function(require,module,exports){ - (function (process){ - var types = require("./lib/types"); - var parse = require("./lib/parser").parse; - var Printer = require("./lib/printer").Printer; - - function print(node, options) { - return new Printer(options).print(node); - } - - function prettyPrint(node, options) { - return new Printer(options).printGenerically(node); - } - - function run(transformer, options) { - return runFile(process.argv[2], transformer, options); - } - - function runFile(path, transformer, options) { - require("fs").readFile(path, "utf-8", function(err, code) { - if (err) { - console.error(err); - return; - } - - runString(code, transformer, options); - }); - } - - function defaultWriteback(output) { - process.stdout.write(output); - } - - function runString(code, transformer, options) { - var writeback = options && options.writeback || defaultWriteback; - transformer(parse(code, options), function(node) { - writeback(print(node, options).code); - }); - } - - Object.defineProperties(exports, { - /** - * Parse a string of code into an augmented syntax tree suitable for - * arbitrary modification and reprinting. - */ - parse: { - enumerable: true, - value: parse - }, - - /** - * Traverse and potentially modify an abstract syntax tree using a - * convenient visitor syntax: - * - * recast.visit(ast, { - * names: [], - * visitIdentifier: function(path) { - * var node = path.value; - * this.visitor.names.push(node.name); - * this.traverse(path); - * } - * }); - */ - visit: { - enumerable: true, - value: types.visit - }, - - /** - * Reprint a modified syntax tree using as much of the original source - * code as possible. - */ - print: { - enumerable: true, - value: print - }, - - /** - * Print without attempting to reuse any original source code. - */ - prettyPrint: { - enumerable: false, - value: prettyPrint - }, - - /** - * Customized version of require("ast-types"). - */ - types: { - enumerable: false, - value: types - }, - - /** - * Convenient command-line interface (see e.g. example/add-braces). - */ - run: { - enumerable: false, - value: run - } - }); - - }).call(this,require('_process')) -},{"./lib/parser":475,"./lib/printer":477,"./lib/types":478,"_process":213,"fs":202}],481:[function(require,module,exports){ - (function (process){ - var Stream = require('stream') - -// through -// -// a stream that does nothing but re-emit the input. -// useful for aggregating a series of changing but not ending streams into one stream) - - exports = module.exports = through - through.through = through - -//create a readable writable stream. - - function through (write, end, opts) { - write = write || function (data) { this.queue(data) } - end = end || function () { this.queue(null) } - - var ended = false, destroyed = false, buffer = [], _ended = false - var stream = new Stream() - stream.readable = stream.writable = true - stream.paused = false - -// stream.autoPause = !(opts && opts.autoPause === false) - stream.autoDestroy = !(opts && opts.autoDestroy === false) - - stream.write = function (data) { - write.call(this, data) - return !stream.paused - } - - function drain() { - while(buffer.length && !stream.paused) { - var data = buffer.shift() - if(null === data) - return stream.emit('end') - else - stream.emit('data', data) - } - } - - stream.queue = stream.push = function (data) { -// console.error(ended) - if(_ended) return stream - if(data === null) _ended = true - buffer.push(data) - drain() - return stream - } - - //this will be registered as the first 'end' listener - //must call destroy next tick, to make sure we're after any - //stream piped from here. - //this is only a problem if end is not emitted synchronously. - //a nicer way to do this is to make sure this is the last listener for 'end' - - stream.on('end', function () { - stream.readable = false - if(!stream.writable && stream.autoDestroy) - process.nextTick(function () { - stream.destroy() - }) - }) - - function _end () { - stream.writable = false - end.call(stream) - if(!stream.readable && stream.autoDestroy) - stream.destroy() - } - - stream.end = function (data) { - if(ended) return - ended = true - if(arguments.length) stream.write(data) - _end() // will emit or queue - return stream - } - - stream.destroy = function () { - if(destroyed) return - destroyed = true - ended = true - buffer.length = 0 - stream.writable = stream.readable = false - stream.emit('close') - return stream - } - - stream.pause = function () { - if(stream.paused) return - stream.paused = true - return stream - } - - stream.resume = function () { - if(stream.paused) { - stream.paused = false - stream.emit('resume') - } - drain() - //may have become paused again, - //as drain emits 'data'. - if(!stream.paused) - stream.emit('drain') - return stream - } - return stream - } - - - }).call(this,require('_process')) -},{"_process":213,"stream":225}],482:[function(require,module,exports){ - (function (process,global){ - /** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - - !(function(global) { - "use strict"; - - var hasOwn = Object.prototype.hasOwnProperty; - var undefined; // More compressible than void 0. - var iteratorSymbol = - typeof Symbol === "function" && Symbol.iterator || "@@iterator"; - - var inModule = typeof module === "object"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - // If regeneratorRuntime is defined globally and we're in a module, - // make the exports object identical to regeneratorRuntime. - module.exports = runtime; - } - // Don't bother evaluating the rest of this file if the runtime was - // already defined globally. - return; - } - - // Define the runtime globally (as expected by generated code) as either - // module.exports (if we're in a module) or a new, empty object. - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided, then outerFn.prototype instanceof Generator. - var generator = Object.create((outerFn || Generator).prototype); - - generator._invoke = makeInvokeMethod( - innerFn, self || null, - new Context(tryLocsList || []) - ); - - return generator; - } - runtime.wrap = wrap; - - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } - - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; - - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; - - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunction.displayName = "GeneratorFunction"; - - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - }); - } - - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; - - runtime.mark = function(genFun) { - genFun.__proto__ = GeneratorFunctionPrototype; - genFun.prototype = Object.create(Gp); - return genFun; - }; - - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `value instanceof AwaitArgument` to determine if the yielded value is - // meant to be awaited. Some may consider the name of this method too - // cutesy, but they are curmudgeons. - runtime.awrap = function(arg) { - return new AwaitArgument(arg); - }; - - function AwaitArgument(arg) { - this.arg = arg; - } - - function AsyncIterator(generator) { - // This invoke function is written in a style that assumes some - // calling function (or Promise) will handle exceptions. - function invoke(method, arg) { - var result = generator[method](arg); - var value = result.value; - return value instanceof AwaitArgument - ? Promise.resolve(value.arg).then(invokeNext, invokeThrow) - : result; - } - - if (typeof process === "object" && process.domain) { - invoke = process.domain.bind(invoke); - } - - var invokeNext = invoke.bind(generator, "next"); - var invokeThrow = invoke.bind(generator, "throw"); - var invokeReturn = invoke.bind(generator, "return"); - var previousPromise; - - function enqueue(method, arg) { - var enqueueResult = - // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then(function() { - return invoke(method, arg); - }) : new Promise(function(resolve) { - resolve(invoke(method, arg)); - }); - - // Avoid propagating enqueueResult failures to Promises returned by - // later invocations of the iterator, and call generator.return() to - // allow the generator a chance to clean up. - previousPromise = enqueueResult["catch"](invokeReturn); - - return enqueueResult; - } - - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } - - defineIteratorMethods(AsyncIterator.prototype); - - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator( - wrap(innerFn, outerFn, self, tryLocsList) - ); - - return runtime.isGeneratorFunction(outerFn) - ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function(result) { - return result.done ? result.value : iter.next(); - }); - }; - - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } - - if (state === GenStateCompleted) { - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); - } - - while (true) { - var delegate = context.delegate; - if (delegate) { - if (method === "return" || - (method === "throw" && delegate.iterator[method] === undefined)) { - // A return or throw (when the delegate iterator has no throw - // method) always terminates the yield* loop. - context.delegate = null; - - // If the delegate iterator has a return method, give it a - // chance to clean up. - var returnMethod = delegate.iterator["return"]; - if (returnMethod) { - var record = tryCatch(returnMethod, delegate.iterator, arg); - if (record.type === "throw") { - // If the return method threw an exception, let that - // exception prevail over the original return or throw. - method = "throw"; - arg = record.arg; - continue; - } - } - - if (method === "return") { - // Continue with the outer return, now that the delegate - // iterator has been terminated. - continue; - } - } - - var record = tryCatch( - delegate.iterator[method], - delegate.iterator, - arg - ); - - if (record.type === "throw") { - context.delegate = null; - - // Like returning generator.throw(uncaught), but without the - // overhead of an extra function call. - method = "throw"; - arg = record.arg; - continue; - } - - // Delegate generator ran and handled its own exceptions so - // regardless of what the method was, we continue as if it is - // "next" with an undefined arg. - method = "next"; - arg = undefined; - - var info = record.arg; - if (info.done) { - context[delegate.resultName] = info.value; - context.next = delegate.nextLoc; - } else { - state = GenStateSuspendedYield; - return info; - } - - context.delegate = null; - } - - if (method === "next") { - if (state === GenStateSuspendedYield) { - context.sent = arg; - } else { - delete context.sent; - } - - } else if (method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw arg; - } - - if (context.dispatchException(arg)) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - method = "next"; - arg = undefined; - } - - } else if (method === "return") { - context.abrupt("return", arg); - } - - state = GenStateExecuting; - - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; - - var info = { - value: record.arg, - done: context.done - }; - - if (record.arg === ContinueSentinel) { - if (context.delegate && method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - arg = undefined; - } - } else { - return info; - } - - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(arg) call above. - method = "throw"; - arg = record.arg; - } - } - }; - } - - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); - - Gp[iteratorSymbol] = function() { - return this; - }; - - Gp.toString = function() { - return "[object Generator]"; - }; - - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; - - if (1 in locs) { - entry.catchLoc = locs[1]; - } - - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - - this.tryEntries.push(entry); - } - - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(); - } - - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; - - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - - if (typeof iterable.next === "function") { - return iterable; - } - - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - - next.value = undefined; - next.done = true; - - return next; - }; - - return next.next = next; - } - } - - // Return an iterator with no values. - return { next: doneResult }; - } - runtime.values = values; - - function doneResult() { - return { value: undefined, done: true }; - } - - Context.prototype = { - constructor: Context, - - reset: function() { - this.prev = 0; - this.next = 0; - this.sent = undefined; - this.done = false; - this.delegate = null; - - this.tryEntries.forEach(resetTryEntry); - - // Pre-initialize at least 20 temporary variables to enable hidden - // class optimizations for simple generators. - for (var tempIndex = 0, tempName; - hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20; - ++tempIndex) { - this[tempName] = null; - } - }, - - stop: function() { - this.done = true; - - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - - return this.rval; - }, - - dispatchException: function(exception) { - if (this.done) { - throw exception; - } - - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - return !!caught; - } - - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } - - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, - - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } - - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - - if (finallyEntry) { - this.next = finallyEntry.finallyLoc; - } else { - this.complete(record); - } - - return ContinueSentinel; - }, - - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = record.arg; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - }, - - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, - - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - - return ContinueSentinel; - } - }; - })( - // Among the various tricks for obtaining a reference to the global - // object, this seems to be the most reliable technique that does not - // use indirect eval (which violates Content Security Policy). - typeof global === "object" ? global : - typeof window === "object" ? window : - typeof self === "object" ? self : this - ); - - }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":213}],483:[function(require,module,exports){ -// Generated by `/scripts/character-class-escape-sets.js`. Do not edit. - var regenerate = require('regenerate'); - - exports.REGULAR = { - 'd': regenerate() - .addRange(0x30, 0x39), - 'D': regenerate() - .addRange(0x0, 0x2F) - .addRange(0x3A, 0xFFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) - .addRange(0x9, 0xD) - .addRange(0x2000, 0x200A) - .addRange(0x2028, 0x2029), - 'S': regenerate() - .addRange(0x0, 0x8) - .addRange(0xE, 0x1F) - .addRange(0x21, 0x9F) - .addRange(0xA1, 0x167F) - .addRange(0x1681, 0x180D) - .addRange(0x180F, 0x1FFF) - .addRange(0x200B, 0x2027) - .addRange(0x202A, 0x202E) - .addRange(0x2030, 0x205E) - .addRange(0x2060, 0x2FFF) - .addRange(0x3001, 0xFEFE) - .addRange(0xFF00, 0xFFFF), - 'w': regenerate(0x5F) - .addRange(0x30, 0x39) - .addRange(0x41, 0x5A) - .addRange(0x61, 0x7A), - 'W': regenerate(0x60) - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x40) - .addRange(0x5B, 0x5E) - .addRange(0x7B, 0xFFFF) - }; - - exports.UNICODE = { - 'd': regenerate() - .addRange(0x30, 0x39), - 'D': regenerate() - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x10FFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) - .addRange(0x9, 0xD) - .addRange(0x2000, 0x200A) - .addRange(0x2028, 0x2029), - 'S': regenerate() - .addRange(0x0, 0x8) - .addRange(0xE, 0x1F) - .addRange(0x21, 0x9F) - .addRange(0xA1, 0x167F) - .addRange(0x1681, 0x180D) - .addRange(0x180F, 0x1FFF) - .addRange(0x200B, 0x2027) - .addRange(0x202A, 0x202E) - .addRange(0x2030, 0x205E) - .addRange(0x2060, 0x2FFF) - .addRange(0x3001, 0xFEFE) - .addRange(0xFF00, 0x10FFFF), - 'w': regenerate(0x5F) - .addRange(0x30, 0x39) - .addRange(0x41, 0x5A) - .addRange(0x61, 0x7A), - 'W': regenerate(0x60) - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x40) - .addRange(0x5B, 0x5E) - .addRange(0x7B, 0x10FFFF) - }; - - exports.UNICODE_IGNORE_CASE = { - 'd': regenerate() - .addRange(0x30, 0x39), - 'D': regenerate() - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x10FFFF), - 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) - .addRange(0x9, 0xD) - .addRange(0x2000, 0x200A) - .addRange(0x2028, 0x2029), - 'S': regenerate() - .addRange(0x0, 0x8) - .addRange(0xE, 0x1F) - .addRange(0x21, 0x9F) - .addRange(0xA1, 0x167F) - .addRange(0x1681, 0x180D) - .addRange(0x180F, 0x1FFF) - .addRange(0x200B, 0x2027) - .addRange(0x202A, 0x202E) - .addRange(0x2030, 0x205E) - .addRange(0x2060, 0x2FFF) - .addRange(0x3001, 0xFEFE) - .addRange(0xFF00, 0x10FFFF), - 'w': regenerate(0x5F, 0x17F, 0x212A) - .addRange(0x30, 0x39) - .addRange(0x41, 0x5A) - .addRange(0x61, 0x7A), - 'W': regenerate(0x4B, 0x53, 0x60) - .addRange(0x0, 0x2F) - .addRange(0x3A, 0x40) - .addRange(0x5B, 0x5E) - .addRange(0x7B, 0x10FFFF) - }; - -},{"regenerate":485}],484:[function(require,module,exports){ - module.exports={ - "75": 8490, - "83": 383, - "107": 8490, - "115": 383, - "181": 924, - "197": 8491, - "383": 83, - "452": 453, - "453": 452, - "455": 456, - "456": 455, - "458": 459, - "459": 458, - "497": 498, - "498": 497, - "837": 8126, - "914": 976, - "917": 1013, - "920": 1012, - "921": 8126, - "922": 1008, - "924": 181, - "928": 982, - "929": 1009, - "931": 962, - "934": 981, - "937": 8486, - "962": 931, - "976": 914, - "977": 1012, - "981": 934, - "982": 928, - "1008": 922, - "1009": 929, - "1012": [ - 920, - 977 - ], - "1013": 917, - "7776": 7835, - "7835": 7776, - "8126": [ - 837, - 921 - ], - "8486": 937, - "8490": 75, - "8491": 197, - "66560": 66600, - "66561": 66601, - "66562": 66602, - "66563": 66603, - "66564": 66604, - "66565": 66605, - "66566": 66606, - "66567": 66607, - "66568": 66608, - "66569": 66609, - "66570": 66610, - "66571": 66611, - "66572": 66612, - "66573": 66613, - "66574": 66614, - "66575": 66615, - "66576": 66616, - "66577": 66617, - "66578": 66618, - "66579": 66619, - "66580": 66620, - "66581": 66621, - "66582": 66622, - "66583": 66623, - "66584": 66624, - "66585": 66625, - "66586": 66626, - "66587": 66627, - "66588": 66628, - "66589": 66629, - "66590": 66630, - "66591": 66631, - "66592": 66632, - "66593": 66633, - "66594": 66634, - "66595": 66635, - "66596": 66636, - "66597": 66637, - "66598": 66638, - "66599": 66639, - "66600": 66560, - "66601": 66561, - "66602": 66562, - "66603": 66563, - "66604": 66564, - "66605": 66565, - "66606": 66566, - "66607": 66567, - "66608": 66568, - "66609": 66569, - "66610": 66570, - "66611": 66571, - "66612": 66572, - "66613": 66573, - "66614": 66574, - "66615": 66575, - "66616": 66576, - "66617": 66577, - "66618": 66578, - "66619": 66579, - "66620": 66580, - "66621": 66581, - "66622": 66582, - "66623": 66583, - "66624": 66584, - "66625": 66585, - "66626": 66586, - "66627": 66587, - "66628": 66588, - "66629": 66589, - "66630": 66590, - "66631": 66591, - "66632": 66592, - "66633": 66593, - "66634": 66594, - "66635": 66595, - "66636": 66596, - "66637": 66597, - "66638": 66598, - "66639": 66599, - "71840": 71872, - "71841": 71873, - "71842": 71874, - "71843": 71875, - "71844": 71876, - "71845": 71877, - "71846": 71878, - "71847": 71879, - "71848": 71880, - "71849": 71881, - "71850": 71882, - "71851": 71883, - "71852": 71884, - "71853": 71885, - "71854": 71886, - "71855": 71887, - "71856": 71888, - "71857": 71889, - "71858": 71890, - "71859": 71891, - "71860": 71892, - "71861": 71893, - "71862": 71894, - "71863": 71895, - "71864": 71896, - "71865": 71897, - "71866": 71898, - "71867": 71899, - "71868": 71900, - "71869": 71901, - "71870": 71902, - "71871": 71903, - "71872": 71840, - "71873": 71841, - "71874": 71842, - "71875": 71843, - "71876": 71844, - "71877": 71845, - "71878": 71846, - "71879": 71847, - "71880": 71848, - "71881": 71849, - "71882": 71850, - "71883": 71851, - "71884": 71852, - "71885": 71853, - "71886": 71854, - "71887": 71855, - "71888": 71856, - "71889": 71857, - "71890": 71858, - "71891": 71859, - "71892": 71860, - "71893": 71861, - "71894": 71862, - "71895": 71863, - "71896": 71864, - "71897": 71865, - "71898": 71866, - "71899": 71867, - "71900": 71868, - "71901": 71869, - "71902": 71870, - "71903": 71871 - } - -},{}],485:[function(require,module,exports){ - (function (global){ - /*! https://mths.be/regenerate v1.2.0 by @mathias | MIT license */ - ;(function(root) { - - // Detect free variables `exports`. - var freeExports = typeof exports == 'object' && exports; - - // Detect free variable `module`. - var freeModule = typeof module == 'object' && module && - module.exports == freeExports && module; - - // Detect free variable `global`, from Node.js or Browserified code, - // and use it as `root`. - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - var ERRORS = { - 'rangeOrder': 'A range\u2019s `stop` value must be greater than or equal ' + - 'to the `start` value.', - 'codePointRange': 'Invalid code point value. Code points range from ' + - 'U+000000 to U+10FFFF.' - }; - - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs - var HIGH_SURROGATE_MIN = 0xD800; - var HIGH_SURROGATE_MAX = 0xDBFF; - var LOW_SURROGATE_MIN = 0xDC00; - var LOW_SURROGATE_MAX = 0xDFFF; - - // In Regenerate output, `\0` will never be preceded by `\` because we sort - // by code point value, so let’s keep this regular expression simple. - var regexNull = /\\x00([^0123456789]|$)/g; - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - var extend = function(destination, source) { - var key; - for (key in source) { - if (hasOwnProperty.call(source, key)) { - destination[key] = source[key]; - } - } - return destination; - }; - - var forEach = function(array, callback) { - var index = -1; - var length = array.length; - while (++index < length) { - callback(array[index], index); - } - }; - - var toString = object.toString; - var isArray = function(value) { - return toString.call(value) == '[object Array]'; - }; - var isNumber = function(value) { - return typeof value == 'number' || - toString.call(value) == '[object Number]'; - }; - - // This assumes that `number` is a positive integer that `toString()`s nicely - // (which is the case for all code point values). - var zeroes = '0000'; - var pad = function(number, totalCharacters) { - var string = String(number); - return string.length < totalCharacters - ? (zeroes + string).slice(-totalCharacters) - : string; - }; - - var hex = function(number) { - return Number(number).toString(16).toUpperCase(); - }; - - var slice = [].slice; - - /*--------------------------------------------------------------------------*/ - - var dataFromCodePoints = function(codePoints) { - var index = -1; - var length = codePoints.length; - var max = length - 1; - var result = []; - var isStart = true; - var tmp; - var previous = 0; - while (++index < length) { - tmp = codePoints[index]; - if (isStart) { - result.push(tmp); - previous = tmp; - isStart = false; - } else { - if (tmp == previous + 1) { - if (index != max) { - previous = tmp; - continue; - } else { - isStart = true; - result.push(tmp + 1); - } - } else { - // End the previous range and start a new one. - result.push(previous + 1, tmp); - previous = tmp; - } - } - } - if (!isStart) { - result.push(tmp + 1); - } - return result; - }; - - var dataRemove = function(data, codePoint) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - if (codePoint >= start && codePoint < end) { - // Modify this pair. - if (codePoint == start) { - if (end == start + 1) { - // Just remove `start` and `end`. - data.splice(index, 2); - return data; - } else { - // Just replace `start` with a new value. - data[index] = codePoint + 1; - return data; - } - } else if (codePoint == end - 1) { - // Just replace `end` with a new value. - data[index + 1] = codePoint; - return data; - } else { - // Replace `[start, end]` with `[startA, endA, startB, endB]`. - data.splice(index, 2, start, codePoint, codePoint + 1, end); - return data; - } - } - index += 2; - } - return data; - }; - - var dataRemoveRange = function(data, rangeStart, rangeEnd) { - if (rangeEnd < rangeStart) { - throw Error(ERRORS.rangeOrder); - } - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - while (index < data.length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - - // Exit as soon as no more matching pairs can be found. - if (start > rangeEnd) { - return data; - } - - // Check if this range pair is equal to, or forms a subset of, the range - // to be removed. - // E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`. - // E.g. we have `[40, 51]` and want to remove 0-100 → `[]`. - if (rangeStart <= start && rangeEnd >= end) { - // Remove this pair. - data.splice(index, 2); - continue; - } - - // Check if both `rangeStart` and `rangeEnd` are within the bounds of - // this pair. - // E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`. - if (rangeStart >= start && rangeEnd < end) { - if (rangeStart == start) { - // Replace `[start, end]` with `[startB, endB]`. - data[index] = rangeEnd + 1; - data[index + 1] = end + 1; - return data; - } - // Replace `[start, end]` with `[startA, endA, startB, endB]`. - data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1); - return data; - } - - // Check if only `rangeStart` is within the bounds of this pair. - // E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`. - if (rangeStart >= start && rangeStart <= end) { - // Replace `end` with `rangeStart`. - data[index + 1] = rangeStart; - // Note: we cannot `return` just yet, in case any following pairs still - // contain matching code points. - // E.g. we have `[0, 11, 14, 31]` and want to remove 4-20 - // → `[0, 4, 21, 31]`. - } - - // Check if only `rangeEnd` is within the bounds of this pair. - // E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`. - else if (rangeEnd >= start && rangeEnd <= end) { - // Just replace `start`. - data[index] = rangeEnd + 1; - return data; - } - - index += 2; - } - return data; - }; - - var dataAdd = function(data, codePoint) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var lastIndex = null; - var length = data.length; - if (codePoint < 0x0 || codePoint > 0x10FFFF) { - throw RangeError(ERRORS.codePointRange); - } - while (index < length) { - start = data[index]; - end = data[index + 1]; - - // Check if the code point is already in the set. - if (codePoint >= start && codePoint < end) { - return data; - } - - if (codePoint == start - 1) { - // Just replace `start` with a new value. - data[index] = codePoint; - return data; - } - - // At this point, if `start` is `greater` than `codePoint`, insert a new - // `[start, end]` pair before the current pair, or after the current pair - // if there is a known `lastIndex`. - if (start > codePoint) { - data.splice( - lastIndex != null ? lastIndex + 2 : 0, - 0, - codePoint, - codePoint + 1 - ); - return data; - } - - if (codePoint == end) { - // Check if adding this code point causes two separate ranges to become - // a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`. - if (codePoint + 1 == data[index + 2]) { - data.splice(index, 4, start, data[index + 3]); - return data; - } - // Else, just replace `end` with a new value. - data[index + 1] = codePoint + 1; - return data; - } - lastIndex = index; - index += 2; - } - // The loop has finished; add the new pair to the end of the data set. - data.push(codePoint, codePoint + 1); - return data; - }; - - var dataAddData = function(dataA, dataB) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var data = dataA.slice(); - var length = dataB.length; - while (index < length) { - start = dataB[index]; - end = dataB[index + 1] - 1; - if (start == end) { - data = dataAdd(data, start); - } else { - data = dataAddRange(data, start, end); - } - index += 2; - } - return data; - }; - - var dataRemoveData = function(dataA, dataB) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var data = dataA.slice(); - var length = dataB.length; - while (index < length) { - start = dataB[index]; - end = dataB[index + 1] - 1; - if (start == end) { - data = dataRemove(data, start); - } else { - data = dataRemoveRange(data, start, end); - } - index += 2; - } - return data; - }; - - var dataAddRange = function(data, rangeStart, rangeEnd) { - if (rangeEnd < rangeStart) { - throw Error(ERRORS.rangeOrder); - } - if ( - rangeStart < 0x0 || rangeStart > 0x10FFFF || - rangeEnd < 0x0 || rangeEnd > 0x10FFFF - ) { - throw RangeError(ERRORS.codePointRange); - } - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var added = false; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - - if (added) { - // The range has already been added to the set; at this point, we just - // need to get rid of the following ranges in case they overlap. - - // Check if this range can be combined with the previous range. - if (start == rangeEnd + 1) { - data.splice(index - 1, 2); - return data; - } - - // Exit as soon as no more possibly overlapping pairs can be found. - if (start > rangeEnd) { - return data; - } - - // E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have - // `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the - // `0,16` range that was previously added. - if (start >= rangeStart && start <= rangeEnd) { - // `start` lies within the range that was previously added. - - if (end > rangeStart && end - 1 <= rangeEnd) { - // `end` lies within the range that was previously added as well, - // so remove this pair. - data.splice(index, 2); - index -= 2; - // Note: we cannot `return` just yet, as there may still be other - // overlapping pairs. - } else { - // `start` lies within the range that was previously added, but - // `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so - // now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`. - // Remove the previously added `end` and the current `start`. - data.splice(index - 1, 2); - index -= 2; - } - - // Note: we cannot return yet. - } - - } - - else if (start == rangeEnd + 1) { - data[index] = rangeStart; - return data; - } - - // Check if a new pair must be inserted *before* the current one. - else if (start > rangeEnd) { - data.splice(index, 0, rangeStart, rangeEnd + 1); - return data; - } - - else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) { - // The new range lies entirely within an existing range pair. No action - // needed. - return data; - } - - else if ( - // E.g. `[0, 11]` and you add 5-15 → `[0, 16]`. - (rangeStart >= start && rangeStart < end) || - // E.g. `[0, 3]` and you add 3-6 → `[0, 7]`. - end == rangeStart - ) { - // Replace `end` with the new value. - data[index + 1] = rangeEnd + 1; - // Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]` - // and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part. - added = true; - // Note: we cannot `return` just yet. - } - - else if (rangeStart <= start && rangeEnd + 1 >= end) { - // The new range is a superset of the old range. - data[index] = rangeStart; - data[index + 1] = rangeEnd + 1; - added = true; - } - - index += 2; - } - // The loop has finished without doing anything; add the new pair to the end - // of the data set. - if (!added) { - data.push(rangeStart, rangeEnd + 1); - } - return data; - }; - - var dataContains = function(data, codePoint) { - var index = 0; - var length = data.length; - // Exit early if `codePoint` is not within `data`’s overall range. - var start = data[index]; - var end = data[length - 1]; - if (length >= 2) { - if (codePoint < start || codePoint > end) { - return false; - } - } - // Iterate over the data per `(start, end)` pair. - while (index < length) { - start = data[index]; - end = data[index + 1]; - if (codePoint >= start && codePoint < end) { - return true; - } - index += 2; - } - return false; - }; - - var dataIntersection = function(data, codePoints) { - var index = 0; - var length = codePoints.length; - var codePoint; - var result = []; - while (index < length) { - codePoint = codePoints[index]; - if (dataContains(data, codePoint)) { - result.push(codePoint); - } - ++index; - } - return dataFromCodePoints(result); - }; - - var dataIsEmpty = function(data) { - return !data.length; - }; - - var dataIsSingleton = function(data) { - // Check if the set only represents a single code point. - return data.length == 2 && data[0] + 1 == data[1]; - }; - - var dataToArray = function(data) { - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var result = []; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1]; - while (start < end) { - result.push(start); - ++start; - } - index += 2; - } - return result; - }; - - /*--------------------------------------------------------------------------*/ - - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var floor = Math.floor; - var highSurrogate = function(codePoint) { - return parseInt( - floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, - 10 - ); - }; - - var lowSurrogate = function(codePoint) { - return parseInt( - (codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, - 10 - ); - }; - - var stringFromCharCode = String.fromCharCode; - var codePointToString = function(codePoint) { - var string; - // https://mathiasbynens.be/notes/javascript-escapes#single - // Note: the `\b` escape sequence for U+0008 BACKSPACE in strings has a - // different meaning in regular expressions (word boundary), so it cannot - // be used here. - if (codePoint == 0x09) { - string = '\\t'; - } - // Note: IE < 9 treats `'\v'` as `'v'`, so avoid using it. - // else if (codePoint == 0x0B) { - // string = '\\v'; - // } - else if (codePoint == 0x0A) { - string = '\\n'; - } - else if (codePoint == 0x0C) { - string = '\\f'; - } - else if (codePoint == 0x0D) { - string = '\\r'; - } - else if (codePoint == 0x5C) { - string = '\\\\'; - } - else if ( - codePoint == 0x24 || - (codePoint >= 0x28 && codePoint <= 0x2B) || - codePoint == 0x2D || codePoint == 0x2E || codePoint == 0x3F || - (codePoint >= 0x5B && codePoint <= 0x5E) || - (codePoint >= 0x7B && codePoint <= 0x7D) - ) { - // The code point maps to an unsafe printable ASCII character; - // backslash-escape it. Here’s the list of those symbols: - // - // $()*+-.?[\]^{|} - // - // See #7 for more info. - string = '\\' + stringFromCharCode(codePoint); - } - else if (codePoint >= 0x20 && codePoint <= 0x7E) { - // The code point maps to one of these printable ASCII symbols - // (including the space character): - // - // !"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO - // PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~ - // - // These can safely be used directly. - string = stringFromCharCode(codePoint); - } - else if (codePoint <= 0xFF) { - // https://mathiasbynens.be/notes/javascript-escapes#hexadecimal - string = '\\x' + pad(hex(codePoint), 2); - } - else { // `codePoint <= 0xFFFF` holds true. - // https://mathiasbynens.be/notes/javascript-escapes#unicode - string = '\\u' + pad(hex(codePoint), 4); - } - - // There’s no need to account for astral symbols / surrogate pairs here, - // since `codePointToString` is private and only used for BMP code points. - // But if that’s what you need, just add an `else` block with this code: - // - // string = '\\u' + pad(hex(highSurrogate(codePoint)), 4) - // + '\\u' + pad(hex(lowSurrogate(codePoint)), 4); - - return string; - }; - - var symbolToCodePoint = function(symbol) { - var length = symbol.length; - var first = symbol.charCodeAt(0); - var second; - if ( - first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && - length > 1 // There is a next code unit. - ) { - // `first` is a high surrogate, and there is a next character. Assume - // it’s a low surrogate (else it’s invalid usage of Regenerate anyway). - second = symbol.charCodeAt(1); - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - HIGH_SURROGATE_MIN) * 0x400 + - second - LOW_SURROGATE_MIN + 0x10000; - } - return first; - }; - - var createBMPCharacterClasses = function(data) { - // Iterate over the data per `(start, end)` pair. - var result = ''; - var index = 0; - var start; - var end; - var length = data.length; - if (dataIsSingleton(data)) { - return codePointToString(data[0]); - } - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - if (start == end) { - result += codePointToString(start); - } else if (start + 1 == end) { - result += codePointToString(start) + codePointToString(end); - } else { - result += codePointToString(start) + '-' + codePointToString(end); - } - index += 2; - } - return '[' + result + ']'; - }; - - var splitAtBMP = function(data) { - // Iterate over the data per `(start, end)` pair. - var loneHighSurrogates = []; - var loneLowSurrogates = []; - var bmp = []; - var astral = []; - var index = 0; - var start; - var end; - var length = data.length; - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. - - if (start < HIGH_SURROGATE_MIN) { - - // The range starts and ends before the high surrogate range. - // E.g. (0, 0x10). - if (end < HIGH_SURROGATE_MIN) { - bmp.push(start, end + 1); - } - - // The range starts before the high surrogate range and ends within it. - // E.g. (0, 0xD855). - if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1); - } - - // The range starts before the high surrogate range and ends in the low - // surrogate range. E.g. (0, 0xDCFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); - } - - // The range starts before the high surrogate range and ends after the - // low surrogate range. E.g. (0, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - bmp.push(start, HIGH_SURROGATE_MIN); - loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - - } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) { - - // The range starts and ends in the high surrogate range. - // E.g. (0xD855, 0xD866). - if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { - loneHighSurrogates.push(start, end + 1); - } - - // The range starts in the high surrogate range and ends in the low - // surrogate range. E.g. (0xD855, 0xDCFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); - } - - // The range starts in the high surrogate range and ends after the low - // surrogate range. E.g. (0xD855, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); - loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - - } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) { - - // The range starts and ends in the low surrogate range. - // E.g. (0xDCFF, 0xDDFF). - if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { - loneLowSurrogates.push(start, end + 1); - } - - // The range starts in the low surrogate range and ends after the low - // surrogate range. E.g. (0xDCFF, 0x10FFFF). - if (end > LOW_SURROGATE_MAX) { - loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1); - if (end <= 0xFFFF) { - bmp.push(LOW_SURROGATE_MAX + 1, end + 1); - } else { - bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - } - - } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) { - - // The range starts and ends after the low surrogate range. - // E.g. (0xFFAA, 0x10FFFF). - if (end <= 0xFFFF) { - bmp.push(start, end + 1); - } else { - bmp.push(start, 0xFFFF + 1); - astral.push(0xFFFF + 1, end + 1); - } - - } else { - - // The range starts and ends in the astral range. - astral.push(start, end + 1); - - } - - index += 2; - } - return { - 'loneHighSurrogates': loneHighSurrogates, - 'loneLowSurrogates': loneLowSurrogates, - 'bmp': bmp, - 'astral': astral - }; - }; - - var optimizeSurrogateMappings = function(surrogateMappings) { - var result = []; - var tmpLow = []; - var addLow = false; - var mapping; - var nextMapping; - var highSurrogates; - var lowSurrogates; - var nextHighSurrogates; - var nextLowSurrogates; - var index = -1; - var length = surrogateMappings.length; - while (++index < length) { - mapping = surrogateMappings[index]; - nextMapping = surrogateMappings[index + 1]; - if (!nextMapping) { - result.push(mapping); - continue; - } - highSurrogates = mapping[0]; - lowSurrogates = mapping[1]; - nextHighSurrogates = nextMapping[0]; - nextLowSurrogates = nextMapping[1]; - - // Check for identical high surrogate ranges. - tmpLow = lowSurrogates; - while ( - nextHighSurrogates && - highSurrogates[0] == nextHighSurrogates[0] && - highSurrogates[1] == nextHighSurrogates[1] - ) { - // Merge with the next item. - if (dataIsSingleton(nextLowSurrogates)) { - tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]); - } else { - tmpLow = dataAddRange( - tmpLow, - nextLowSurrogates[0], - nextLowSurrogates[1] - 1 - ); - } - ++index; - mapping = surrogateMappings[index]; - highSurrogates = mapping[0]; - lowSurrogates = mapping[1]; - nextMapping = surrogateMappings[index + 1]; - nextHighSurrogates = nextMapping && nextMapping[0]; - nextLowSurrogates = nextMapping && nextMapping[1]; - addLow = true; - } - result.push([ - highSurrogates, - addLow ? tmpLow : lowSurrogates - ]); - addLow = false; - } - return optimizeByLowSurrogates(result); - }; - - var optimizeByLowSurrogates = function(surrogateMappings) { - if (surrogateMappings.length == 1) { - return surrogateMappings; - } - var index = -1; - var innerIndex = -1; - while (++index < surrogateMappings.length) { - var mapping = surrogateMappings[index]; - var lowSurrogates = mapping[1]; - var lowSurrogateStart = lowSurrogates[0]; - var lowSurrogateEnd = lowSurrogates[1]; - innerIndex = index; // Note: the loop starts at the next index. - while (++innerIndex < surrogateMappings.length) { - var otherMapping = surrogateMappings[innerIndex]; - var otherLowSurrogates = otherMapping[1]; - var otherLowSurrogateStart = otherLowSurrogates[0]; - var otherLowSurrogateEnd = otherLowSurrogates[1]; - if ( - lowSurrogateStart == otherLowSurrogateStart && - lowSurrogateEnd == otherLowSurrogateEnd - ) { - // Add the code points in the other item to this one. - if (dataIsSingleton(otherMapping[0])) { - mapping[0] = dataAdd(mapping[0], otherMapping[0][0]); - } else { - mapping[0] = dataAddRange( - mapping[0], - otherMapping[0][0], - otherMapping[0][1] - 1 - ); - } - // Remove the other, now redundant, item. - surrogateMappings.splice(innerIndex, 1); - --innerIndex; - } - } - } - return surrogateMappings; - }; - - var surrogateSet = function(data) { - // Exit early if `data` is an empty set. - if (!data.length) { - return []; - } - - // Iterate over the data per `(start, end)` pair. - var index = 0; - var start; - var end; - var startHigh; - var startLow; - var prevStartHigh = 0; - var prevEndHigh = 0; - var tmpLow = []; - var endHigh; - var endLow; - var surrogateMappings = []; - var length = data.length; - var dataHigh = []; - while (index < length) { - start = data[index]; - end = data[index + 1] - 1; - - startHigh = highSurrogate(start); - startLow = lowSurrogate(start); - endHigh = highSurrogate(end); - endLow = lowSurrogate(end); - - var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN; - var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX; - var complete = false; - - // Append the previous high-surrogate-to-low-surrogate mappings. - // Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`. - if ( - startHigh == endHigh || - startsWithLowestLowSurrogate && endsWithHighestLowSurrogate - ) { - surrogateMappings.push([ - [startHigh, endHigh + 1], - [startLow, endLow + 1] - ]); - complete = true; - } else { - surrogateMappings.push([ - [startHigh, startHigh + 1], - [startLow, LOW_SURROGATE_MAX + 1] - ]); - } - - // Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to - // `(endHigh - 1, LOW_SURROGATE_MAX)`. - if (!complete && startHigh + 1 < endHigh) { - if (endsWithHighestLowSurrogate) { - // Combine step 2 and step 3. - surrogateMappings.push([ - [startHigh + 1, endHigh + 1], - [LOW_SURROGATE_MIN, endLow + 1] - ]); - complete = true; - } else { - surrogateMappings.push([ - [startHigh + 1, endHigh], - [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1] - ]); - } - } - - // Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`. - if (!complete) { - surrogateMappings.push([ - [endHigh, endHigh + 1], - [LOW_SURROGATE_MIN, endLow + 1] - ]); - } - - prevStartHigh = startHigh; - prevEndHigh = endHigh; - - index += 2; - } - - // The format of `surrogateMappings` is as follows: - // - // [ surrogateMapping1, surrogateMapping2 ] - // - // i.e.: - // - // [ - // [ highSurrogates1, lowSurrogates1 ], - // [ highSurrogates2, lowSurrogates2 ] - // ] - return optimizeSurrogateMappings(surrogateMappings); - }; - - var createSurrogateCharacterClasses = function(surrogateMappings) { - var result = []; - forEach(surrogateMappings, function(surrogateMapping) { - var highSurrogates = surrogateMapping[0]; - var lowSurrogates = surrogateMapping[1]; - result.push( - createBMPCharacterClasses(highSurrogates) + - createBMPCharacterClasses(lowSurrogates) - ); - }); - return result.join('|'); - }; - - var createCharacterClassesFromData = function(data, bmpOnly) { - var result = []; - - var parts = splitAtBMP(data); - var loneHighSurrogates = parts.loneHighSurrogates; - var loneLowSurrogates = parts.loneLowSurrogates; - var bmp = parts.bmp; - var astral = parts.astral; - var hasAstral = !dataIsEmpty(parts.astral); - var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates); - var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates); - - var surrogateMappings = surrogateSet(astral); - - if (bmpOnly) { - bmp = dataAddData(bmp, loneHighSurrogates); - hasLoneHighSurrogates = false; - bmp = dataAddData(bmp, loneLowSurrogates); - hasLoneLowSurrogates = false; - } - - if (!dataIsEmpty(bmp)) { - // The data set contains BMP code points that are not high surrogates - // needed for astral code points in the set. - result.push(createBMPCharacterClasses(bmp)); - } - if (surrogateMappings.length) { - // The data set contains astral code points; append character classes - // based on their surrogate pairs. - result.push(createSurrogateCharacterClasses(surrogateMappings)); - } - // https://gist.github.com/mathiasbynens/bbe7f870208abcfec860 - if (hasLoneHighSurrogates) { - result.push( - createBMPCharacterClasses(loneHighSurrogates) + - // Make sure the high surrogates aren’t part of a surrogate pair. - '(?![\\uDC00-\\uDFFF])' - ); - } - if (hasLoneLowSurrogates) { - result.push( - // Make sure the low surrogates aren’t part of a surrogate pair. - '(?:[^\\uD800-\\uDBFF]|^)' + - createBMPCharacterClasses(loneLowSurrogates) - ); - } - return result.join('|'); - }; - - /*--------------------------------------------------------------------------*/ - - // `regenerate` can be used as a constructor (and new methods can be added to - // its prototype) but also as a regular function, the latter of which is the - // documented and most common usage. For that reason, it’s not capitalized. - var regenerate = function(value) { - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (this instanceof regenerate) { - this.data = []; - return value ? this.add(value) : this; - } - return (new regenerate).add(value); - }; - - regenerate.version = '1.2.0'; - - var proto = regenerate.prototype; - extend(proto, { - 'add': function(value) { - var $this = this; - if (value == null) { - return $this; - } - if (value instanceof regenerate) { - // Allow passing other Regenerate instances. - $this.data = dataAddData($this.data, value.data); - return $this; - } - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (isArray(value)) { - forEach(value, function(item) { - $this.add(item); - }); - return $this; - } - $this.data = dataAdd( - $this.data, - isNumber(value) ? value : symbolToCodePoint(value) - ); - return $this; - }, - 'remove': function(value) { - var $this = this; - if (value == null) { - return $this; - } - if (value instanceof regenerate) { - // Allow passing other Regenerate instances. - $this.data = dataRemoveData($this.data, value.data); - return $this; - } - if (arguments.length > 1) { - value = slice.call(arguments); - } - if (isArray(value)) { - forEach(value, function(item) { - $this.remove(item); - }); - return $this; - } - $this.data = dataRemove( - $this.data, - isNumber(value) ? value : symbolToCodePoint(value) - ); - return $this; - }, - 'addRange': function(start, end) { - var $this = this; - $this.data = dataAddRange($this.data, - isNumber(start) ? start : symbolToCodePoint(start), - isNumber(end) ? end : symbolToCodePoint(end) - ); - return $this; - }, - 'removeRange': function(start, end) { - var $this = this; - var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start); - var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end); - $this.data = dataRemoveRange( - $this.data, - startCodePoint, - endCodePoint - ); - return $this; - }, - 'intersection': function(argument) { - var $this = this; - // Allow passing other Regenerate instances. - // TODO: Optimize this by writing and using `dataIntersectionData()`. - var array = argument instanceof regenerate ? - dataToArray(argument.data) : - argument; - $this.data = dataIntersection($this.data, array); - return $this; - }, - 'contains': function(codePoint) { - return dataContains( - this.data, - isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint) - ); - }, - 'clone': function() { - var set = new regenerate; - set.data = this.data.slice(0); - return set; - }, - 'toString': function(options) { - var result = createCharacterClassesFromData( - this.data, - options ? options.bmpOnly : false - ); - // Use `\0` instead of `\x00` where possible. - return result.replace(regexNull, '\\0$1'); - }, - 'toRegExp': function(flags) { - return RegExp(this.toString(), flags || ''); - }, - 'valueOf': function() { // Note: `valueOf` is aliased as `toArray`. - return dataToArray(this.data); - } - }); - - proto.toArray = proto.valueOf; - - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define(function() { - return regenerate; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = regenerate; - } else { // in Narwhal or RingoJS v0.7.0- - freeExports.regenerate = regenerate; - } - } else { // in Rhino or a web browser - root.regenerate = regenerate; - } - - }(this)); - - }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],486:[function(require,module,exports){ - (function (global){ - /*! - * RegJSGen - * Copyright 2014 Benjamin Tan - * Available under MIT license - */ - ;(function() { - 'use strict'; - - /** Used to determine if values are of the language type `Object` */ - var objectTypes = { - 'function': true, - 'object': true - }; - - /** Used as a reference to the global object */ - var root = (objectTypes[typeof window] && window) || this; - - /** Backup possible global object */ - var oldRoot = root; - - /** Detect free variable `exports` */ - var freeExports = objectTypes[typeof exports] && exports; - - /** Detect free variable `module` */ - var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; - - /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ - var freeGlobal = freeExports && freeModule && typeof global == 'object' && global; - if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - /*! Based on https://mths.be/fromcodepoint v0.2.0 by @mathias */ - - var stringFromCharCode = String.fromCharCode; - var floor = Math.floor; - function fromCodePoint() { - var MAX_SIZE = 0x4000; - var codeUnits = []; - var highSurrogate; - var lowSurrogate; - var index = -1; - var length = arguments.length; - if (!length) { - return ''; - } - var result = ''; - while (++index < length) { - var codePoint = Number(arguments[index]); - if ( - !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity` - codePoint < 0 || // not a valid Unicode code point - codePoint > 0x10FFFF || // not a valid Unicode code point - floor(codePoint) != codePoint // not an integer - ) { - throw RangeError('Invalid code point: ' + codePoint); - } - if (codePoint <= 0xFFFF) { - // BMP code point - codeUnits.push(codePoint); - } else { - // Astral code point; split in surrogate halves - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - codePoint -= 0x10000; - highSurrogate = (codePoint >> 10) + 0xD800; - lowSurrogate = (codePoint % 0x400) + 0xDC00; - codeUnits.push(highSurrogate, lowSurrogate); - } - if (index + 1 == length || codeUnits.length > MAX_SIZE) { - result += stringFromCharCode.apply(null, codeUnits); - codeUnits.length = 0; - } - } - return result; - } - - function assertType(type, expected) { - if (expected.indexOf('|') == -1) { - if (type == expected) { - return; - } - - throw Error('Invalid node type: ' + type); - } - - expected = assertType.hasOwnProperty(expected) - ? assertType[expected] - : (assertType[expected] = RegExp('^(?:' + expected + ')$')); - - if (expected.test(type)) { - return; - } - - throw Error('Invalid node type: ' + type); - } - - /*--------------------------------------------------------------------------*/ - - function generate(node) { - var type = node.type; - - if (generate.hasOwnProperty(type) && typeof generate[type] == 'function') { - return generate[type](node); - } - - throw Error('Invalid node type: ' + type); - } - - /*--------------------------------------------------------------------------*/ - - function generateAlternative(node) { - assertType(node.type, 'alternative'); - - var terms = node.body, - length = terms ? terms.length : 0; - - if (length == 1) { - return generateTerm(terms[0]); - } else { - var i = -1, - result = ''; - - while (++i < length) { - result += generateTerm(terms[i]); - } - - return result; - } - } - - function generateAnchor(node) { - assertType(node.type, 'anchor'); - - switch (node.kind) { - case 'start': - return '^'; - case 'end': - return '$'; - case 'boundary': - return '\\b'; - case 'not-boundary': - return '\\B'; - default: - throw Error('Invalid assertion'); - } - } - - function generateAtom(node) { - assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value'); - - return generate(node); - } - - function generateCharacterClass(node) { - assertType(node.type, 'characterClass'); - - var classRanges = node.body, - length = classRanges ? classRanges.length : 0; - - var i = -1, - result = '['; - - if (node.negative) { - result += '^'; - } - - while (++i < length) { - result += generateClassAtom(classRanges[i]); - } - - result += ']'; - - return result; - } - - function generateCharacterClassEscape(node) { - assertType(node.type, 'characterClassEscape'); - - return '\\' + node.value; - } - - function generateCharacterClassRange(node) { - assertType(node.type, 'characterClassRange'); - - var min = node.min, - max = node.max; - - if (min.type == 'characterClassRange' || max.type == 'characterClassRange') { - throw Error('Invalid character class range'); - } - - return generateClassAtom(min) + '-' + generateClassAtom(max); - } - - function generateClassAtom(node) { - assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value'); - - return generate(node); - } - - function generateDisjunction(node) { - assertType(node.type, 'disjunction'); - - var body = node.body, - length = body ? body.length : 0; - - if (length == 0) { - throw Error('No body'); - } else if (length == 1) { - return generate(body[0]); - } else { - var i = -1, - result = ''; - - while (++i < length) { - if (i != 0) { - result += '|'; - } - result += generate(body[i]); - } - - return result; - } - } - - function generateDot(node) { - assertType(node.type, 'dot'); - - return '.'; - } - - function generateGroup(node) { - assertType(node.type, 'group'); - - var result = '('; - - switch (node.behavior) { - case 'normal': - break; - case 'ignore': - result += '?:'; - break; - case 'lookahead': - result += '?='; - break; - case 'negativeLookahead': - result += '?!'; - break; - default: - throw Error('Invalid behaviour: ' + node.behaviour); - } - - var body = node.body, - length = body ? body.length : 0; - - if (length == 1) { - result += generate(body[0]); - } else { - var i = -1; - - while (++i < length) { - result += generate(body[i]); - } - } - - result += ')'; - - return result; - } - - function generateQuantifier(node) { - assertType(node.type, 'quantifier'); - - var quantifier = '', - min = node.min, - max = node.max; - - switch (max) { - case undefined: - case null: - switch (min) { - case 0: - quantifier = '*' - break; - case 1: - quantifier = '+'; - break; - default: - quantifier = '{' + min + ',}'; - break; - } - break; - default: - if (min == max) { - quantifier = '{' + min + '}'; - } - else if (min == 0 && max == 1) { - quantifier = '?'; - } else { - quantifier = '{' + min + ',' + max + '}'; - } - break; - } - - if (!node.greedy) { - quantifier += '?'; - } - - return generateAtom(node.body[0]) + quantifier; - } - - function generateReference(node) { - assertType(node.type, 'reference'); - - return '\\' + node.matchIndex; - } - - function generateTerm(node) { - assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value'); - - return generate(node); - } - - function generateValue(node) { - assertType(node.type, 'value'); - - var kind = node.kind, - codePoint = node.codePoint; - - switch (kind) { - case 'controlLetter': - return '\\c' + fromCodePoint(codePoint + 64); - case 'hexadecimalEscape': - return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2); - case 'identifier': - return '\\' + fromCodePoint(codePoint); - case 'null': - return '\\' + codePoint; - case 'octal': - return '\\' + codePoint.toString(8); - case 'singleEscape': - switch (codePoint) { - case 0x0008: - return '\\b'; - case 0x009: - return '\\t'; - case 0x00A: - return '\\n'; - case 0x00B: - return '\\v'; - case 0x00C: - return '\\f'; - case 0x00D: - return '\\r'; - default: - throw Error('Invalid codepoint: ' + codePoint); - } - case 'symbol': - return fromCodePoint(codePoint); - case 'unicodeEscape': - return '\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4); - case 'unicodeCodePointEscape': - return '\\u{' + codePoint.toString(16).toUpperCase() + '}'; - default: - throw Error('Unsupported node kind: ' + kind); - } - } - - /*--------------------------------------------------------------------------*/ - - generate.alternative = generateAlternative; - generate.anchor = generateAnchor; - generate.characterClass = generateCharacterClass; - generate.characterClassEscape = generateCharacterClassEscape; - generate.characterClassRange = generateCharacterClassRange; - generate.disjunction = generateDisjunction; - generate.dot = generateDot; - generate.group = generateGroup; - generate.quantifier = generateQuantifier; - generate.reference = generateReference; - generate.value = generateValue; - - /*--------------------------------------------------------------------------*/ - - // export regjsgen - // some AMD build optimizers, like r.js, check for condition patterns like the following: - if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { - // define as an anonymous module so, through path mapping, it can be aliased - define(function() { - return { - 'generate': generate - }; - }); - } - // check for `exports` after `define` in case a build optimizer adds an `exports` object - else if (freeExports && freeModule) { - // in Narwhal, Node.js, Rhino -require, or RingoJS - freeExports.generate = generate; - } - // in a browser or Rhino - else { - root.regjsgen = { - 'generate': generate - }; - } - }.call(this)); - - }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],487:[function(require,module,exports){ -// regjsparser -// -// ================================================================== -// -// See ECMA-262 Standard: 15.10.1 -// -// NOTE: The ECMA-262 standard uses the term "Assertion" for /^/. Here the -// term "Anchor" is used. -// -// Pattern :: -// Disjunction -// -// Disjunction :: -// Alternative -// Alternative | Disjunction -// -// Alternative :: -// [empty] -// Alternative Term -// -// Term :: -// Anchor -// Atom -// Atom Quantifier -// -// Anchor :: -// ^ -// $ -// \ b -// \ B -// ( ? = Disjunction ) -// ( ? ! Disjunction ) -// -// Quantifier :: -// QuantifierPrefix -// QuantifierPrefix ? -// -// QuantifierPrefix :: -// * -// + -// ? -// { DecimalDigits } -// { DecimalDigits , } -// { DecimalDigits , DecimalDigits } -// -// Atom :: -// PatternCharacter -// . -// \ AtomEscape -// CharacterClass -// ( Disjunction ) -// ( ? : Disjunction ) -// -// PatternCharacter :: -// SourceCharacter but not any of: ^ $ \ . * + ? ( ) [ ] { } | -// -// AtomEscape :: -// DecimalEscape -// CharacterEscape -// CharacterClassEscape -// -// CharacterEscape[U] :: -// ControlEscape -// c ControlLetter -// HexEscapeSequence -// RegExpUnicodeEscapeSequence[?U] (ES6) -// IdentityEscape[?U] -// -// ControlEscape :: -// one of f n r t v -// ControlLetter :: -// one of -// a b c d e f g h i j k l m n o p q r s t u v w x y z -// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z -// -// IdentityEscape :: -// SourceCharacter but not IdentifierPart -// -// -// -// DecimalEscape :: -// DecimalIntegerLiteral [lookahead ∉ DecimalDigit] -// -// CharacterClassEscape :: -// one of d D s S w W -// -// CharacterClass :: -// [ [lookahead ∉ {^}] ClassRanges ] -// [ ^ ClassRanges ] -// -// ClassRanges :: -// [empty] -// NonemptyClassRanges -// -// NonemptyClassRanges :: -// ClassAtom -// ClassAtom NonemptyClassRangesNoDash -// ClassAtom - ClassAtom ClassRanges -// -// NonemptyClassRangesNoDash :: -// ClassAtom -// ClassAtomNoDash NonemptyClassRangesNoDash -// ClassAtomNoDash - ClassAtom ClassRanges -// -// ClassAtom :: -// - -// ClassAtomNoDash -// -// ClassAtomNoDash :: -// SourceCharacter but not one of \ or ] or - -// \ ClassEscape -// -// ClassEscape :: -// DecimalEscape -// b -// CharacterEscape -// CharacterClassEscape - - (function() { - - function parse(str, flags) { - function addRaw(node) { - node.raw = str.substring(node.range[0], node.range[1]); - return node; - } - - function updateRawStart(node, start) { - node.range[0] = start; - return addRaw(node); - } - - function createAnchor(kind, rawLength) { - return addRaw({ - type: 'anchor', - kind: kind, - range: [ - pos - rawLength, - pos - ] - }); - } - - function createValue(kind, codePoint, from, to) { - return addRaw({ - type: 'value', - kind: kind, - codePoint: codePoint, - range: [from, to] - }); - } - - function createEscaped(kind, codePoint, value, fromOffset) { - fromOffset = fromOffset || 0; - return createValue(kind, codePoint, pos - (value.length + fromOffset), pos); - } - - function createCharacter(matches) { - var _char = matches[0]; - var first = _char.charCodeAt(0); - if (hasUnicodeFlag) { - var second; - if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) { - second = lookahead().charCodeAt(0); - if (second >= 0xDC00 && second <= 0xDFFF) { - // Unicode surrogate pair - pos++; - return createValue( - 'symbol', - (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000, - pos - 2, pos); - } - } - } - return createValue('symbol', first, pos - 1, pos); - } - - function createDisjunction(alternatives, from, to) { - return addRaw({ - type: 'disjunction', - body: alternatives, - range: [ - from, - to - ] - }); - } - - function createDot() { - return addRaw({ - type: 'dot', - range: [ - pos - 1, - pos - ] - }); - } - - function createCharacterClassEscape(value) { - return addRaw({ - type: 'characterClassEscape', - value: value, - range: [ - pos - 2, - pos - ] - }); - } - - function createReference(matchIndex) { - return addRaw({ - type: 'reference', - matchIndex: parseInt(matchIndex, 10), - range: [ - pos - 1 - matchIndex.length, - pos - ] - }); - } - - function createGroup(behavior, disjunction, from, to) { - return addRaw({ - type: 'group', - behavior: behavior, - body: disjunction, - range: [ - from, - to - ] - }); - } - - function createQuantifier(min, max, from, to) { - if (to == null) { - from = pos - 1; - to = pos; - } - - return addRaw({ - type: 'quantifier', - min: min, - max: max, - greedy: true, - body: null, // set later on, - range: [ - from, - to - ] - }); - } - - function createAlternative(terms, from, to) { - return addRaw({ - type: 'alternative', - body: terms, - range: [ - from, - to - ] - }); - } - - function createCharacterClass(classRanges, negative, from, to) { - return addRaw({ - type: 'characterClass', - body: classRanges, - negative: negative, - range: [ - from, - to - ] - }); - } - - function createClassRange(min, max, from, to) { - // See 15.10.2.15: - if (min.codePoint > max.codePoint) { - throw SyntaxError('invalid range in character class'); - } - - return addRaw({ - type: 'characterClassRange', - min: min, - max: max, - range: [ - from, - to - ] - }); - } - - function flattenBody(body) { - if (body.type === 'alternative') { - return body.body; - } else { - return [body]; - } - } - - function isEmpty(obj) { - return obj.type === 'empty'; - } - - function incr(amount) { - amount = (amount || 1); - var res = str.substring(pos, pos + amount); - pos += (amount || 1); - return res; - } - - function skip(value) { - if (!match(value)) { - throw SyntaxError('character: ' + value); - } - } - - function match(value) { - if (str.indexOf(value, pos) === pos) { - return incr(value.length); - } - } - - function lookahead() { - return str[pos]; - } - - function current(value) { - return str.indexOf(value, pos) === pos; - } - - function next(value) { - return str[pos + 1] === value; - } - - function matchReg(regExp) { - var subStr = str.substring(pos); - var res = subStr.match(regExp); - if (res) { - res.range = []; - res.range[0] = pos; - incr(res[0].length); - res.range[1] = pos; - } - return res; - } - - function parseDisjunction() { - // Disjunction :: - // Alternative - // Alternative | Disjunction - var res = [], from = pos; - res.push(parseAlternative()); - - while (match('|')) { - res.push(parseAlternative()); - } - - if (res.length === 1) { - return res[0]; - } - - return createDisjunction(res, from, pos); - } - - function parseAlternative() { - var res = [], from = pos; - var term; - - // Alternative :: - // [empty] - // Alternative Term - while (term = parseTerm()) { - res.push(term); - } - - if (res.length === 1) { - return res[0]; - } - - return createAlternative(res, from, pos); - } - - function parseTerm() { - // Term :: - // Anchor - // Atom - // Atom Quantifier - - if (pos >= str.length || current('|') || current(')')) { - return null; /* Means: The term is empty */ - } - - var anchor = parseAnchor(); - - if (anchor) { - return anchor; - } - - var atom = parseAtom(); - if (!atom) { - throw SyntaxError('Expected atom') - } - var quantifier = parseQuantifier() || false; - if (quantifier) { - quantifier.body = flattenBody(atom); - // The quantifier contains the atom. Therefore, the beginning of the - // quantifier range is given by the beginning of the atom. - updateRawStart(quantifier, atom.range[0]); - return quantifier; - } - return atom; - } - - function parseGroup(matchA, typeA, matchB, typeB) { - var type = null, from = pos; - - if (match(matchA)) { - type = typeA; - } else if (match(matchB)) { - type = typeB; - } else { - return false; - } - - var body = parseDisjunction(); - if (!body) { - throw SyntaxError('Expected disjunction'); - } - skip(')'); - var group = createGroup(type, flattenBody(body), from, pos); - - if (type == 'normal') { - // Keep track of the number of closed groups. This is required for - // parseDecimalEscape(). In case the string is parsed a second time the - // value already holds the total count and no incrementation is required. - if (firstIteration) { - closedCaptureCounter++; - } - } - return group; - } - - function parseAnchor() { - // Anchor :: - // ^ - // $ - // \ b - // \ B - // ( ? = Disjunction ) - // ( ? ! Disjunction ) - var res, from = pos; - - if (match('^')) { - return createAnchor('start', 1 /* rawLength */); - } else if (match('$')) { - return createAnchor('end', 1 /* rawLength */); - } else if (match('\\b')) { - return createAnchor('boundary', 2 /* rawLength */); - } else if (match('\\B')) { - return createAnchor('not-boundary', 2 /* rawLength */); - } else { - return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead'); - } - } - - function parseQuantifier() { - // Quantifier :: - // QuantifierPrefix - // QuantifierPrefix ? - // - // QuantifierPrefix :: - // * - // + - // ? - // { DecimalDigits } - // { DecimalDigits , } - // { DecimalDigits , DecimalDigits } - - var res; - var quantifier; - var min, max; - - if (match('*')) { - quantifier = createQuantifier(0); - } - else if (match('+')) { - quantifier = createQuantifier(1); - } - else if (match('?')) { - quantifier = createQuantifier(0, 1); - } - else if (res = matchReg(/^\{([0-9]+)\}/)) { - min = parseInt(res[1], 10); - quantifier = createQuantifier(min, min, res.range[0], res.range[1]); - } - else if (res = matchReg(/^\{([0-9]+),\}/)) { - min = parseInt(res[1], 10); - quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]); - } - else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) { - min = parseInt(res[1], 10); - max = parseInt(res[2], 10); - if (min > max) { - throw SyntaxError('numbers out of order in {} quantifier'); - } - quantifier = createQuantifier(min, max, res.range[0], res.range[1]); - } - - if (quantifier) { - if (match('?')) { - quantifier.greedy = false; - quantifier.range[1] += 1; - } - } - - return quantifier; - } - - function parseAtom() { - // Atom :: - // PatternCharacter - // . - // \ AtomEscape - // CharacterClass - // ( Disjunction ) - // ( ? : Disjunction ) - - var res; - - // jviereck: allow ']', '}' here as well to be compatible with browser's - // implementations: ']'.match(/]/); - // if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) { - if (res = matchReg(/^[^^$\\.*+?(){[|]/)) { - // PatternCharacter - return createCharacter(res); - } - else if (match('.')) { - // . - return createDot(); - } - else if (match('\\')) { - // \ AtomEscape - res = parseAtomEscape(); - if (!res) { - throw SyntaxError('atomEscape'); - } - return res; - } - else if (res = parseCharacterClass()) { - return res; - } - else { - // ( Disjunction ) - // ( ? : Disjunction ) - return parseGroup('(?:', 'ignore', '(', 'normal'); - } - } - - function parseUnicodeSurrogatePairEscape(firstEscape) { - if (hasUnicodeFlag) { - var first, second; - if (firstEscape.kind == 'unicodeEscape' && - (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF && - current('\\') && next('u') ) { - var prevPos = pos; - pos++; - var secondEscape = parseClassEscape(); - if (secondEscape.kind == 'unicodeEscape' && - (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) { - // Unicode surrogate pair - firstEscape.range[1] = secondEscape.range[1]; - firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - firstEscape.type = 'value'; - firstEscape.kind = 'unicodeCodePointEscape'; - addRaw(firstEscape); - } - else { - pos = prevPos; - } - } - } - return firstEscape; - } - - function parseClassEscape() { - return parseAtomEscape(true); - } - - function parseAtomEscape(insideCharacterClass) { - // AtomEscape :: - // DecimalEscape - // CharacterEscape - // CharacterClassEscape - - var res; - - res = parseDecimalEscape(); - if (res) { - return res; - } - - // For ClassEscape - if (insideCharacterClass) { - if (match('b')) { - // 15.10.2.19 - // The production ClassEscape :: b evaluates by returning the - // CharSet containing the one character (Unicode value 0008). - return createEscaped('singleEscape', 0x0008, '\\b'); - } else if (match('B')) { - throw SyntaxError('\\B not possible inside of CharacterClass'); - } - } - - res = parseCharacterEscape(); - - return res; - } - - - function parseDecimalEscape() { - // DecimalEscape :: - // DecimalIntegerLiteral [lookahead ∉ DecimalDigit] - // CharacterClassEscape :: one of d D s S w W - - var res, match; - - if (res = matchReg(/^(?!0)\d+/)) { - match = res[0]; - var refIdx = parseInt(res[0], 10); - if (refIdx <= closedCaptureCounter) { - // If the number is smaller than the normal-groups found so - // far, then it is a reference... - return createReference(res[0]); - } else { - // ... otherwise it needs to be interpreted as a octal (if the - // number is in an octal format). If it is NOT octal format, - // then the slash is ignored and the number is matched later - // as normal characters. - - // Recall the negative decision to decide if the input must be parsed - // a second time with the total normal-groups. - backrefDenied.push(refIdx); - - // Reset the position again, as maybe only parts of the previous - // matched numbers are actual octal numbers. E.g. in '019' only - // the '01' should be matched. - incr(-res[0].length); - if (res = matchReg(/^[0-7]{1,3}/)) { - return createEscaped('octal', parseInt(res[0], 8), res[0], 1); - } else { - // If we end up here, we have a case like /\91/. Then the - // first slash is to be ignored and the 9 & 1 to be treated - // like ordinary characters. Create a character for the - // first number only here - other number-characters - // (if available) will be matched later. - res = createCharacter(matchReg(/^[89]/)); - return updateRawStart(res, res.range[0] - 1); - } - } - } - // Only allow octal numbers in the following. All matched numbers start - // with a zero (if the do not, the previous if-branch is executed). - // If the number is not octal format and starts with zero (e.g. `091`) - // then only the zeros `0` is treated here and the `91` are ordinary - // characters. - // Example: - // /\091/.exec('\091')[0].length === 3 - else if (res = matchReg(/^[0-7]{1,3}/)) { - match = res[0]; - if (/^0{1,3}$/.test(match)) { - // If they are all zeros, then only take the first one. - return createEscaped('null', 0x0000, '0', match.length + 1); - } else { - return createEscaped('octal', parseInt(match, 8), match, 1); - } - } else if (res = matchReg(/^[dDsSwW]/)) { - return createCharacterClassEscape(res[0]); - } - return false; - } - - function parseCharacterEscape() { - // CharacterEscape :: - // ControlEscape - // c ControlLetter - // HexEscapeSequence - // UnicodeEscapeSequence - // IdentityEscape - - var res; - if (res = matchReg(/^[fnrtv]/)) { - // ControlEscape - var codePoint = 0; - switch (res[0]) { - case 't': codePoint = 0x009; break; - case 'n': codePoint = 0x00A; break; - case 'v': codePoint = 0x00B; break; - case 'f': codePoint = 0x00C; break; - case 'r': codePoint = 0x00D; break; - } - return createEscaped('singleEscape', codePoint, '\\' + res[0]); - } else if (res = matchReg(/^c([a-zA-Z])/)) { - // c ControlLetter - return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2); - } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) { - // HexEscapeSequence - return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2); - } else if (res = matchReg(/^u([0-9a-fA-F]{4})/)) { - // UnicodeEscapeSequence - return parseUnicodeSurrogatePairEscape( - createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2) - ); - } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) { - // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape) - return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4); - } else { - // IdentityEscape - return parseIdentityEscape(); - } - } - - // Taken from the Esprima parser. - function isIdentifierPart(ch) { - // Generated by `tools/generate-identifier-regex.js`. - var NonAsciiIdentifierPart = new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]'); - - return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) - (ch >= 65 && ch <= 90) || // A..Z - (ch >= 97 && ch <= 122) || // a..z - (ch >= 48 && ch <= 57) || // 0..9 - (ch === 92) || // \ (backslash) - ((ch >= 0x80) && NonAsciiIdentifierPart.test(String.fromCharCode(ch))); - } - - function parseIdentityEscape() { - // IdentityEscape :: - // SourceCharacter but not IdentifierPart - // - // - - var ZWJ = '\u200C'; - var ZWNJ = '\u200D'; - - var res; - var tmp; - - if (!isIdentifierPart(lookahead())) { - tmp = incr(); - return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1); - } - - if (match(ZWJ)) { - // - return createEscaped('identifier', 0x200C, ZWJ); - } else if (match(ZWNJ)) { - // - return createEscaped('identifier', 0x200D, ZWNJ); - } - - return null; - } - - function parseCharacterClass() { - // CharacterClass :: - // [ [lookahead ∉ {^}] ClassRanges ] - // [ ^ ClassRanges ] - - var res, from = pos; - if (res = matchReg(/^\[\^/)) { - res = parseClassRanges(); - skip(']'); - return createCharacterClass(res, true, from, pos); - } else if (match('[')) { - res = parseClassRanges(); - skip(']'); - return createCharacterClass(res, false, from, pos); - } - - return null; - } - - function parseClassRanges() { - // ClassRanges :: - // [empty] - // NonemptyClassRanges - - var res; - if (current(']')) { - // Empty array means nothing insinde of the ClassRange. - return []; - } else { - res = parseNonemptyClassRanges(); - if (!res) { - throw SyntaxError('nonEmptyClassRanges'); - } - return res; - } - } - - function parseHelperClassRanges(atom) { - var from, to, res; - if (current('-') && !next(']')) { - // ClassAtom - ClassAtom ClassRanges - skip('-'); - - res = parseClassAtom(); - if (!res) { - throw SyntaxError('classAtom'); - } - to = pos; - var classRanges = parseClassRanges(); - if (!classRanges) { - throw SyntaxError('classRanges'); - } - from = atom.range[0]; - if (classRanges.type === 'empty') { - return [createClassRange(atom, res, from, to)]; - } - return [createClassRange(atom, res, from, to)].concat(classRanges); - } - - res = parseNonemptyClassRangesNoDash(); - if (!res) { - throw SyntaxError('nonEmptyClassRangesNoDash'); - } - - return [atom].concat(res); - } - - function parseNonemptyClassRanges() { - // NonemptyClassRanges :: - // ClassAtom - // ClassAtom NonemptyClassRangesNoDash - // ClassAtom - ClassAtom ClassRanges - - var atom = parseClassAtom(); - if (!atom) { - throw SyntaxError('classAtom'); - } - - if (current(']')) { - // ClassAtom - return [atom]; - } - - // ClassAtom NonemptyClassRangesNoDash - // ClassAtom - ClassAtom ClassRanges - return parseHelperClassRanges(atom); - } - - function parseNonemptyClassRangesNoDash() { - // NonemptyClassRangesNoDash :: - // ClassAtom - // ClassAtomNoDash NonemptyClassRangesNoDash - // ClassAtomNoDash - ClassAtom ClassRanges - - var res = parseClassAtom(); - if (!res) { - throw SyntaxError('classAtom'); - } - if (current(']')) { - // ClassAtom - return res; - } - - // ClassAtomNoDash NonemptyClassRangesNoDash - // ClassAtomNoDash - ClassAtom ClassRanges - return parseHelperClassRanges(res); - } - - function parseClassAtom() { - // ClassAtom :: - // - - // ClassAtomNoDash - if (match('-')) { - return createCharacter('-'); - } else { - return parseClassAtomNoDash(); - } - } - - function parseClassAtomNoDash() { - // ClassAtomNoDash :: - // SourceCharacter but not one of \ or ] or - - // \ ClassEscape - - var res; - if (res = matchReg(/^[^\\\]-]/)) { - return createCharacter(res[0]); - } else if (match('\\')) { - res = parseClassEscape(); - if (!res) { - throw SyntaxError('classEscape'); - } - - return parseUnicodeSurrogatePairEscape(res); - } - } - - var backrefDenied = []; - var closedCaptureCounter = 0; - var firstIteration = true; - var hasUnicodeFlag = (flags || "").indexOf("u") !== -1; - var pos = 0; - - // Convert the input to a string and treat the empty string special. - str = String(str); - if (str === '') { - str = '(?:)'; - } - - var result = parseDisjunction(); - - if (result.range[1] !== str.length) { - throw SyntaxError('Could not parse entire input - got stuck: ' + str); - } - - // The spec requires to interpret the `\2` in `/\2()()/` as backreference. - // As the parser collects the number of capture groups as the string is - // parsed it is impossible to make these decisions at the point the `\2` is - // handled. In case the local decision turns out to be wrongq after the - // parsing has finished, the input string is parsed a second time with the - // total count of capture groups set. - // - // SEE: https://github.com/jviereck/regjsparser/issues/70 - for (var i = 0; i < backrefDenied.length; i++) { - if (backrefDenied[i] <= closedCaptureCounter) { - // Parse the input a second time. - pos = 0; - firstIteration = false; - return parseDisjunction(); - } - } - - return result; - }; - - var regjsparser = { - parse: parse - }; - - if (typeof module !== 'undefined' && module.exports) { - module.exports = regjsparser; - } else { - window.regjsparser = regjsparser; - } - - }()); - -},{}],488:[function(require,module,exports){ - var generate = require('regjsgen').generate; - var parse = require('regjsparser').parse; - var regenerate = require('regenerate'); - var iuMappings = require('./data/iu-mappings.json'); - var ESCAPE_SETS = require('./data/character-class-escape-sets.js'); - - function getCharacterClassEscapeSet(character) { - if (unicode) { - if (ignoreCase) { - return ESCAPE_SETS.UNICODE_IGNORE_CASE[character]; - } - return ESCAPE_SETS.UNICODE[character]; - } - return ESCAPE_SETS.REGULAR[character]; - } - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - function has(object, property) { - return hasOwnProperty.call(object, property); - } - -// Prepare a Regenerate set containing all code points, used for negative -// character classes (if any). - var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF); -// Without the `u` flag, the range stops at 0xFFFF. -// https://mths.be/es6#sec-pattern-semantics - var BMP_SET = regenerate().addRange(0x0, 0xFFFF); - -// Prepare a Regenerate set containing all code points that are supposed to be -// matched by `/./u`. https://mths.be/es6#sec-atom - var DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points - .remove( - // minus `LineTerminator`s (https://mths.be/es6#sec-line-terminators): - 0x000A, // Line Feed - 0x000D, // Carriage Return - 0x2028, // Line Separator - 0x2029 // Paragraph Separator - ); -// Prepare a Regenerate set containing all code points that are supposed to be -// matched by `/./` (only BMP code points). - var DOT_SET = DOT_SET_UNICODE.clone() - .intersection(BMP_SET); - -// Add a range of code points + any case-folded code points in that range to a -// set. - regenerate.prototype.iuAddRange = function(min, max) { - var $this = this; - do { - var folded = caseFold(min); - if (folded) { - $this.add(folded); - } - } while (++min <= max); - return $this; - }; - - function assign(target, source) { - for (var key in source) { - // Note: `hasOwnProperty` is not needed here. - target[key] = source[key]; - } - } - - function update(item, pattern) { - // TODO: Test if memoizing `pattern` here is worth the effort. - if (!pattern) { - return; - } - var tree = parse(pattern, ''); - switch (tree.type) { - case 'characterClass': - case 'group': - case 'value': - // No wrapping needed. - break; - default: - // Wrap the pattern in a non-capturing group. - tree = wrap(tree, pattern); - } - assign(item, tree); - } - - function wrap(tree, pattern) { - // Wrap the pattern in a non-capturing group. - return { - 'type': 'group', - 'behavior': 'ignore', - 'body': [tree], - 'raw': '(?:' + pattern + ')' - }; - } - - function caseFold(codePoint) { - return has(iuMappings, codePoint) ? iuMappings[codePoint] : false; - } - - var ignoreCase = false; - var unicode = false; - function processCharacterClass(characterClassItem) { - var set = regenerate(); - var body = characterClassItem.body.forEach(function(item) { - switch (item.type) { - case 'value': - set.add(item.codePoint); - if (ignoreCase && unicode) { - var folded = caseFold(item.codePoint); - if (folded) { - set.add(folded); - } - } - break; - case 'characterClassRange': - var min = item.min.codePoint; - var max = item.max.codePoint; - set.addRange(min, max); - if (ignoreCase && unicode) { - set.iuAddRange(min, max); - } - break; - case 'characterClassEscape': - set.add(getCharacterClassEscapeSet(item.value)); - break; - // The `default` clause is only here as a safeguard; it should never be - // reached. Code coverage tools should ignore it. - /* istanbul ignore next */ - default: - throw Error('Unknown term type: ' + item.type); - } - }); - if (characterClassItem.negative) { - set = (unicode ? UNICODE_SET : BMP_SET).clone().remove(set); - } - update(characterClassItem, set.toString()); - return characterClassItem; - } - - function processTerm(item) { - switch (item.type) { - case 'dot': - update( - item, - (unicode ? DOT_SET_UNICODE : DOT_SET).toString() - ); - break; - case 'characterClass': - item = processCharacterClass(item); - break; - case 'characterClassEscape': - update( - item, - getCharacterClassEscapeSet(item.value).toString() - ); - break; - case 'alternative': - case 'disjunction': - case 'group': - case 'quantifier': - item.body = item.body.map(processTerm); - break; - case 'value': - var codePoint = item.codePoint; - var set = regenerate(codePoint); - if (ignoreCase && unicode) { - var folded = caseFold(codePoint); - if (folded) { - set.add(folded); - } - } - update(item, set.toString()); - break; - case 'anchor': - case 'empty': - case 'group': - case 'reference': - // Nothing to do here. - break; - // The `default` clause is only here as a safeguard; it should never be - // reached. Code coverage tools should ignore it. - /* istanbul ignore next */ - default: - throw Error('Unknown term type: ' + item.type); - } - return item; - }; - - module.exports = function(pattern, flags) { - var tree = parse(pattern, flags); - ignoreCase = flags ? flags.indexOf('i') > -1 : false; - unicode = flags ? flags.indexOf('u') > -1 : false; - assign(tree, processTerm(tree)); - return generate(tree); - }; - -},{"./data/character-class-escape-sets.js":483,"./data/iu-mappings.json":484,"regenerate":485,"regjsgen":486,"regjsparser":487}],489:[function(require,module,exports){ - 'use strict'; - var isFinite = require('is-finite'); - - module.exports = function (str, n) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string as the first argument'); - } - - if (n < 0 || !isFinite(n)) { - throw new TypeError('Expected a finite positive number'); - } - - var ret = ''; - - do { - if (n & 1) { - ret += str; - } - - str += str; - } while (n = n >> 1); - - return ret; - }; - -},{"is-finite":490}],490:[function(require,module,exports){ - arguments[4][331][0].apply(exports,arguments) -},{"dup":331}],491:[function(require,module,exports){ - 'use strict'; - module.exports = /^#!.*/; - -},{}],492:[function(require,module,exports){ - 'use strict'; - module.exports = function (str) { - var isExtendedLengthPath = /^\\\\\?\\/.test(str); - var hasNonAscii = /[^\x00-\x80]+/.test(str); - - if (isExtendedLengthPath || hasNonAscii) { - return str; - } - - return str.replace(/\\/g, '/'); - }; - -},{}],493:[function(require,module,exports){ - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; - exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; - exports.SourceNode = require('./source-map/source-node').SourceNode; - -},{"./source-map/source-map-consumer":499,"./source-map/source-map-generator":500,"./source-map/source-node":501}],494:[function(require,module,exports){ - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - if (typeof define !== 'function') { - var define = require('amdefine')(module, require); - } - define(function (require, exports, module) { - - var util = require('./util'); - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = {}; - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var isDuplicate = this.has(aStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - this._set[util.toSetString(aStr)] = idx; - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - return Object.prototype.hasOwnProperty.call(this._set, - util.toSetString(aStr)); - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (this.has(aStr)) { - return this._set[util.toSetString(aStr)]; - } - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - }); - -},{"./util":502,"amdefine":503}],495:[function(require,module,exports){ - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS 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. - */ - if (typeof define !== 'function') { - var define = require('amdefine')(module, require); - } - define(function (require, exports, module) { - - var base64 = require('./base64'); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - digit = base64.decode(aStr.charAt(aIndex++)); - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - }); - -},{"./base64":496,"amdefine":503}],496:[function(require,module,exports){ - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - if (typeof define !== 'function') { - var define = require('amdefine')(module, require); - } - define(function (require, exports, module) { - - var charToIntMap = {}; - var intToCharMap = {}; - - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' - .split('') - .forEach(function (ch, index) { - charToIntMap[ch] = index; - intToCharMap[index] = ch; - }); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function base64_encode(aNumber) { - if (aNumber in intToCharMap) { - return intToCharMap[aNumber]; - } - throw new TypeError("Must be between 0 and 63: " + aNumber); - }; - - /** - * Decode a single base 64 digit to an integer. - */ - exports.decode = function base64_decode(aChar) { - if (aChar in charToIntMap) { - return charToIntMap[aChar]; - } - throw new TypeError("Not a valid base 64 digit: " + aChar); - }; - - }); - -},{"amdefine":503}],497:[function(require,module,exports){ - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - if (typeof define !== 'function') { - var define = require('amdefine')(module, require); - } - define(function (require, exports, module) { - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - }); - -},{"amdefine":503}],498:[function(require,module,exports){ - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - if (typeof define !== 'function') { - var define = require('amdefine')(module, require); - } - define(function (require, exports, module) { - - var util = require('./util'); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositions(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - var mapping; - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositions); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - }); - -},{"./util":502,"amdefine":503}],499:[function(require,module,exports){ - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - if (typeof define !== 'function') { - var define = require('amdefine')(module, require); - } - define(function (require, exports, module) { - - var util = require('./util'); - var binarySearch = require('./binary-search'); - var ArraySet = require('./array-set').ArraySet; - var base64VLQ = require('./base64-vlq'); - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this.__generatedMappings = []; - this.__originalMappings = []; - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this.__generatedMappings = []; - this.__originalMappings = []; - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._nextCharIsMappingSeparator = - function SourceMapConsumer_nextCharIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source; - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name - }; - }).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a single line. Otherwise, returns all mappings - * corresponding to a single line and column. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - var originalLine = mapping.originalLine; - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line. Since mappings are sorted, this is - // guaranteed to find all mappings for the line we are searching for. - while (mapping && mapping.originalLine === originalLine && - (aArgs.column === undefined || - mapping.originalColumn === originalColumn)) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - sources = sources.map(util.normalize); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names, true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - smc.__generatedMappings = aSourceMap._mappings.toArray().slice(); - smc.__originalMappings = aSourceMap._mappings.toArray().slice() - .sort(util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedValues = {}; - var temp = {}; - var mapping, str, values, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - ++index; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - ++index; - } - else { - mapping = {}; - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; ++end) { - if (this._nextCharIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - values = cachedValues[str]; - if (values) { - index += str.length; - } else { - values = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - values.push(value); - } - cachedValues[str] = values; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + values[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (values.length > 1) { - // Original source. - mapping.source = this._sources.at(previousSource + values[1]); - previousSource += values[1]; - if (values.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - // Original line. - mapping.originalLine = previousOriginalLine + values[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - if (values.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - // Original column. - mapping.originalColumn = previousOriginalColumn + values[3]; - previousOriginalColumn = mapping.originalColumn; - - if (values.length > 4) { - // Original name. - mapping.name = this._names.at(previousName + values[4]); - previousName += values[4]; - } - } - - this.__generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - this.__originalMappings.push(mapping); - } - } - } - - this.__generatedMappings.sort(util.compareByGeneratedPositions); - this.__originalMappings.sort(util.compareByOriginalPositions); - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source != null && this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: util.getArg(mapping, 'name', null) - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * availible. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - }; - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[i]; - - var source = mapping.source; - var sourceRoot = section.consumer.sourceRoot; - - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.column + - (section.generatedOffset.generatedLine === mapping.generatedLine) - ? section.generatedOffset.generatedColumn - 1 - : 0, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - }; - }; - - this.__generatedMappings.sort(util.compareByGeneratedPositions); - this.__originalMappings.sort(util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - }); - -},{"./array-set":494,"./base64-vlq":495,"./binary-search":497,"./util":502,"amdefine":503}],500:[function(require,module,exports){ - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - if (typeof define !== 'function') { - var define = require('amdefine')(module, require); - } - define(function (require, exports, module) { - - var base64VLQ = require('./base64-vlq'); - var util = require('./util'); - var ArraySet = require('./array-set').ArraySet; - var MappingList = require('./mapping-list').MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null && !this._sources.has(source)) { - this._sources.add(source); - } - - if (name != null && !this._names.has(name)) { - this._names.add(name); - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = {}; - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var mapping; - - var mappings = this._mappings.toArray(); - - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - result += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositions(mapping, mappings[i - 1])) { - continue; - } - result += ','; - } - } - - result += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - result += base64VLQ.encode(this._sources.indexOf(mapping.source) - - previousSource); - previousSource = this._sources.indexOf(mapping.source); - - // lines are stored 0-based in SourceMap spec version 3 - result += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - result += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - result += base64VLQ.encode(this._names.indexOf(mapping.name) - - previousName); - previousName = this._names.indexOf(mapping.name); - } - } - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, - key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - }); - -},{"./array-set":494,"./base64-vlq":495,"./mapping-list":498,"./util":502,"amdefine":503}],501:[function(require,module,exports){ - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - if (typeof define !== 'function') { - var define = require('amdefine')(module, require); - } - define(function (require, exports, module) { - - var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; - var util = require('./util'); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are removed from this array, by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var shiftNextLine = function() { - var lineContents = remainingLines.shift(); - // The last line of a file might not have a newline. - var newLine = remainingLines.shift() || ""; - return lineContents + newLine; - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - var code = ""; - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[0]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[0] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[0]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[0] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLines.length > 0) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - }); - -},{"./source-map-generator":500,"./util":502,"amdefine":503}],502:[function(require,module,exports){ - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - if (typeof define !== 'function') { - var define = require('amdefine')(module, require); - } - define(function (require, exports, module) { - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consequtive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = (path.charAt(0) === '/'); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // XXX: It is possible to remove this block, and the tests still pass! - var url = urlParse(aRoot); - if (aPath.charAt(0) == "/" && url && url.path == "/") { - return aPath.slice(1); - } - - return aPath.indexOf(aRoot + '/') === 0 - ? aPath.substr(aRoot.length + 1) - : aPath; - } - exports.relative = relative; - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - return '$' + aStr; - } - exports.toSetString = toSetString; - - function fromSetString(aStr) { - return aStr.substr(1); - } - exports.fromSetString = fromSetString; - - function strcmp(aStr1, aStr2) { - var s1 = aStr1 || ""; - var s2 = aStr2 || ""; - return (s1 > s2) - (s1 < s2); - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp; - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - }; - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings where the generated positions are - * compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { - var cmp; - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - }; - exports.compareByGeneratedPositions = compareByGeneratedPositions; - - }); - -},{"amdefine":503}],503:[function(require,module,exports){ - (function (process,__filename){ - /** vim: et:ts=4:sw=4:sts=4 - * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/amdefine for details - */ - - /*jslint node: true */ - /*global module, process */ - 'use strict'; - - /** - * Creates a define for node. - * @param {Object} module the "module" object that is defined by Node for the - * current module. - * @param {Function} [requireFn]. Node's require function for the current module. - * It only needs to be passed in Node versions before 0.5, when module.require - * did not exist. - * @returns {Function} a define function that is usable for the current node - * module. - */ - function amdefine(module, requireFn) { - 'use strict'; - var defineCache = {}, - loaderCache = {}, - alreadyCalled = false, - path = require('path'), - makeRequire, stringRequire; - - /** - * Trims the . and .. from an array of path segments. - * It will keep a leading path segment if a .. will become - * the first path segment, to help with module name lookups, - * which act like paths, but can be remapped. But the end result, - * all paths that use this function should look normalized. - * NOTE: this method MODIFIES the input array. - * @param {Array} ary the array of path segments. - */ - function trimDots(ary) { - var i, part; - for (i = 0; ary[i]; i+= 1) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { - //End of the line. Keep at least one non-dot - //path segment at the front so it can be mapped - //correctly to disk. Otherwise, there is likely - //no path mapping for a path starting with '..'. - //This can still fail, but catches the most reasonable - //uses of .. - break; - } else if (i > 0) { - ary.splice(i - 1, 2); - i -= 2; - } - } - } - } - - function normalize(name, baseName) { - var baseParts; - - //Adjust any relative paths. - if (name && name.charAt(0) === '.') { - //If have a base name, try to normalize against it, - //otherwise, assume it is a top-level require that will - //be relative to baseUrl in the end. - if (baseName) { - baseParts = baseName.split('/'); - baseParts = baseParts.slice(0, baseParts.length - 1); - baseParts = baseParts.concat(name.split('/')); - trimDots(baseParts); - name = baseParts.join('/'); - } - } - - return name; - } - - /** - * Create the normalize() function passed to a loader plugin's - * normalize method. - */ - function makeNormalize(relName) { - return function (name) { - return normalize(name, relName); - }; - } - - function makeLoad(id) { - function load(value) { - loaderCache[id] = value; - } - - load.fromText = function (id, text) { - //This one is difficult because the text can/probably uses - //define, and any relative paths and requires should be relative - //to that id was it would be found on disk. But this would require - //bootstrapping a module/require fairly deeply from node core. - //Not sure how best to go about that yet. - throw new Error('amdefine does not implement load.fromText'); - }; - - return load; - } - - makeRequire = function (systemRequire, exports, module, relId) { - function amdRequire(deps, callback) { - if (typeof deps === 'string') { - //Synchronous, single module require('') - return stringRequire(systemRequire, exports, module, deps, relId); - } else { - //Array of dependencies with a callback. - - //Convert the dependencies to modules. - deps = deps.map(function (depName) { - return stringRequire(systemRequire, exports, module, depName, relId); - }); - - //Wait for next tick to call back the require call. - process.nextTick(function () { - callback.apply(null, deps); - }); - } - } - - amdRequire.toUrl = function (filePath) { - if (filePath.indexOf('.') === 0) { - return normalize(filePath, path.dirname(module.filename)); - } else { - return filePath; - } - }; - - return amdRequire; - }; - - //Favor explicit value, passed in if the module wants to support Node 0.4. - requireFn = requireFn || function req() { - return module.require.apply(module, arguments); - }; - - function runFactory(id, deps, factory) { - var r, e, m, result; - - if (id) { - e = loaderCache[id] = {}; - m = { - id: id, - uri: __filename, - exports: e - }; - r = makeRequire(requireFn, e, m, id); - } else { - //Only support one define call per file - if (alreadyCalled) { - throw new Error('amdefine with no module ID cannot be called more than once per file.'); - } - alreadyCalled = true; - - //Use the real variables from node - //Use module.exports for exports, since - //the exports in here is amdefine exports. - e = module.exports; - m = module; - r = makeRequire(requireFn, e, m, module.id); - } - - //If there are dependencies, they are strings, so need - //to convert them to dependency values. - if (deps) { - deps = deps.map(function (depName) { - return r(depName); - }); - } - - //Call the factory with the right dependencies. - if (typeof factory === 'function') { - result = factory.apply(m.exports, deps); - } else { - result = factory; - } - - if (result !== undefined) { - m.exports = result; - if (id) { - loaderCache[id] = m.exports; - } - } - } - - stringRequire = function (systemRequire, exports, module, id, relId) { - //Split the ID by a ! so that - var index = id.indexOf('!'), - originalId = id, - prefix, plugin; - - if (index === -1) { - id = normalize(id, relId); - - //Straight module lookup. If it is one of the special dependencies, - //deal with it, otherwise, delegate to node. - if (id === 'require') { - return makeRequire(systemRequire, exports, module, relId); - } else if (id === 'exports') { - return exports; - } else if (id === 'module') { - return module; - } else if (loaderCache.hasOwnProperty(id)) { - return loaderCache[id]; - } else if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; - } else { - if(systemRequire) { - return systemRequire(originalId); - } else { - throw new Error('No module with ID: ' + id); - } - } - } else { - //There is a plugin in play. - prefix = id.substring(0, index); - id = id.substring(index + 1, id.length); - - plugin = stringRequire(systemRequire, exports, module, prefix, relId); - - if (plugin.normalize) { - id = plugin.normalize(id, makeNormalize(relId)); - } else { - //Normalize the ID normally. - id = normalize(id, relId); - } - - if (loaderCache[id]) { - return loaderCache[id]; - } else { - plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); - - return loaderCache[id]; - } - } - }; - - //Create a define function specific to the module asking for amdefine. - function define(id, deps, factory) { - if (Array.isArray(id)) { - factory = deps; - deps = id; - id = undefined; - } else if (typeof id !== 'string') { - factory = id; - id = deps = undefined; - } - - if (deps && !Array.isArray(deps)) { - factory = deps; - deps = undefined; - } - - if (!deps) { - deps = ['require', 'exports', 'module']; - } - - //Set up properties for this module. If an ID, then use - //internal cache. If no ID, then use the external variables - //for this node module. - if (id) { - //Put the module in deep freeze until there is a - //require call for it. - defineCache[id] = [id, deps, factory]; - } else { - runFactory(id, deps, factory); - } - } - - //define.require, which has access to all the values in the - //cache. Useful for AMD modules that all have IDs in the file, - //but need to finally export a value to node based on one of those - //IDs. - define.require = function (id) { - if (loaderCache[id]) { - return loaderCache[id]; - } - - if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; - } - }; - - define.amd = {}; - - return define; - } - - module.exports = amdefine; - - }).call(this,require('_process'),"/node_modules/source-map/node_modules/amdefine/amdefine.js") -},{"_process":213,"path":212}],504:[function(require,module,exports){ - /*! - strip-json-comments - Strip comments from JSON. Lets you use comments in your JSON files! - https://github.com/sindresorhus/strip-json-comments - by Sindre Sorhus - MIT License - */ - (function () { - 'use strict'; - - function stripJsonComments(str) { - var currentChar; - var nextChar; - var insideString = false; - var insideComment = false; - var ret = ''; - - for (var i = 0; i < str.length; i++) { - currentChar = str[i]; - nextChar = str[i + 1]; - - if (!insideComment && str[i - 1] !== '\\' && currentChar === '"') { - insideString = !insideString; - } - - if (insideString) { - ret += currentChar; - continue; - } - - if (!insideComment && currentChar + nextChar === '//') { - insideComment = 'single'; - i++; - } else if (insideComment === 'single' && currentChar + nextChar === '\r\n') { - insideComment = false; - i++; - ret += currentChar; - ret += nextChar; - continue; - } else if (insideComment === 'single' && currentChar === '\n') { - insideComment = false; - } else if (!insideComment && currentChar + nextChar === '/*') { - insideComment = 'multi'; - i++; - continue; - } else if (insideComment === 'multi' && currentChar + nextChar === '*/') { - insideComment = false; - i++; - continue; - } - - if (insideComment) { - continue; - } - - ret += currentChar; - } - - return ret; - } - - if (typeof module !== 'undefined' && module.exports) { - module.exports = stripJsonComments; - } else { - window.stripJsonComments = stripJsonComments; - } - })(); - -},{}],505:[function(require,module,exports){ - 'use strict'; - module.exports = function toFastProperties(obj) { - /*jshint -W027*/ - function f() {} - f.prototype = obj; - new f(); - return; - eval(obj); - }; - -},{}],506:[function(require,module,exports){ - 'use strict'; - module.exports = function (str) { - return str.replace(/[\s\uFEFF\xA0]+$/g, ''); - }; - -},{}],507:[function(require,module,exports){ - module.exports={ - "name": "babel-core", - "description": "A compiler for writing next generation JavaScript", - "version": "5.5.5", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "repository": "babel/babel", - "main": "lib/babel/api/node.js", - "browser": { - "./lib/babel/api/register/node.js": "./lib/babel/api/register/browser.js" - }, - "keywords": [ - "harmony", - "classes", - "modules", - "let", - "const", - "var", - "es6", - "transpile", - "transpiler", - "6to5", - "babel" - ], - "scripts": { - "bench": "make bench", - "test": "make test" - }, - "dependencies": { - "acorn-jsx": "^1.0.0", - "ast-types": "~0.7.0", - "bluebird": "^2.9.25", - "chalk": "^1.0.0", - "convert-source-map": "^1.1.0", - "core-js": "^0.9.0", - "debug": "^2.1.1", - "detect-indent": "^3.0.0", - "esquery": "^0.4.0", - "estraverse": "^4.0.0", - "esutils": "^2.0.0", - "fs-readdir-recursive": "^0.1.0", - "globals": "^6.4.0", - "home-or-tmp": "^1.0.0", - "is-integer": "^1.0.4", - "js-tokens": "1.0.0", - "leven": "^1.0.1", - "line-numbers": "0.2.0", - "lodash": "^3.6.0", - "minimatch": "^2.0.3", - "output-file-sync": "^1.1.0", - "path-is-absolute": "^1.0.0", - "private": "^0.1.6", - "regenerator": "0.8.28", - "regexpu": "^1.1.2", - "repeating": "^1.1.2", - "resolve": "^1.1.6", - "shebang-regex": "^1.0.0", - "slash": "^1.0.0", - "source-map": "^0.4.0", - "source-map-support": "^0.2.10", - "strip-json-comments": "^1.0.2", - "to-fast-properties": "^1.0.0", - "trim-right": "^1.0.0" - }, - "devDependencies": { - "babel": "5.3.1", - "browserify": "^9.0.8", - "chai": "^2.2.0", - "eslint": "^0.21.2", - "babel-eslint": "^3.1.9", - "esvalid": "^1.1.0", - "istanbul": "^0.3.5", - "matcha": "^0.6.0", - "mocha": "2.2.0", - "rimraf": "^2.3.2", - "uglify-js": "^2.4.16" - } - } - -},{}],508:[function(require,module,exports){ - module.exports={"abstract-expression-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"abstract-expression-delete":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceDelete","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"abstract-expression-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceGet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"abstract-expression-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"PROPERTY","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"referenceSet","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"array-comprehension-container":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"array-from":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"array-push":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"STATEMENT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CONTEXT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"class-decorator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"DECORATOR","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"CLASS_REF","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"class-super-constructor-call-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"class-super-constructor-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"class-super-native-constructor-call":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"NATIVE_REF","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"SUPER_NAME","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"type":"SpreadElement","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"NATIVE_REF","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__proto__","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CLASS_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"NATIVE_REF","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"default-parameter-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"DEFAULT_VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"default-parameter":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"DEFAULT_VALUE","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARGUMENT_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"let","type":"VariableDeclaration","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"exports-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"exports-default-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"VALUE","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"exports-from-assign":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"INIT","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"exports-module-declaration-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"exports-module-declaration":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"value":"__esModule","raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"for-of-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARR","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"for-of-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":null,"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"IS_ARRAY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"operator":">=","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"LOOP_OBJECT","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ID","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"INDEX","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"for-of":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"OBJECT","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"STEP_KEY","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[],"type":"BlockStatement","end":null},"type":"ForStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"CatchClause","end":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_COMPLETION","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ITERATOR_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"ITERATOR_ERROR_KEY","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"TryStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-async-to-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"fn","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"next","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},{"start":null,"loc":null,"range":null,"value":"throw","raw":null,"type":"Literal","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"step","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"gen","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arg","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"reject","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"error","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":null,"type":"ReturnStatement","end":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"CatchClause","end":null,"_paths":null},"guardedHandlers":[],"finalizer":null,"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"info","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Promise","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"resolve","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"then","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"callThrow","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"callNext","type":"Identifier","end":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-bind":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Function","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"bind","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-class-call-check":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"instance","type":"Identifier","end":null},"operator":"instanceof","right":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot call a class as a function","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-create-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-create-decorated-class":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"||","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"The decorator for method ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is of the invalid type ","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"initializers","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"protoProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"protoInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"staticInitializers","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"Constructor","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-create-decorated-object":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"operator":"delete","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"decorators","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"f","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"The decorator for method ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is of the invalid type ","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"decorator","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-default-props":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"defaultProps","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"propName","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForInStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"props","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-defaults":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyNames","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"defaults","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-define-decorated-property-descriptor":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_descriptor","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptors","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"_descriptor","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":null,"type":"ReturnStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_key","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"_descriptor","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"_key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"_key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForInStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"initializer","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"descriptor","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-define-property":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-extends":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"assign","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"||","right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":1,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"source","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForInStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-get":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"get","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"getter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-has-own":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-inherits":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"Super expression must either be null or a function, not ","raw":null,"type":"Literal","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"create","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"enumerable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"configurable","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"subClass","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__proto__","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"superClass","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-instanceof":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"left","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"right","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"right","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"right","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"hasInstance","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"right","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"hasInstance","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"left","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"left","type":"Identifier","end":null},"operator":"instanceof","right":{"start":null,"loc":null,"range":null,"name":"right","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-interop-require-default":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"value":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-interop-require-wildcard":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"newObj","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"!=","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"newObj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"key","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForInStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"newObj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"newObj","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-interop-require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-object-destructuring-empty":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Cannot destructure undefined","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-object-without-properties":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"left":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"keys","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"indexOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"operator":">=","right":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"hasOwnProperty","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"ContinueStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForInStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"target","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-self-global":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"self","type":"Identifier","end":null},"alternate":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-set":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getOwnPropertyDescriptor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"getPrototypeOf","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"object","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":null,"raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"parent","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"property","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"value":"value","raw":null,"type":"Literal","end":null},"operator":"in","right":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"writable","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"desc","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"set","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"setter","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"call","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"receiver","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-slice":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"slice","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-sliced-to-array-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_iterator","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_step","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-sliced-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"in","right":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"elements":[],"type":"ArrayExpression","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"leadingComments":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":false,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"undefined","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"iterator","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"init":null,"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"right":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"next","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"done","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"UnaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"push","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_s","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"label":null,"type":"BreakStatement","end":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"handler":{"start":null,"loc":null,"range":null,"param":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"guard":null,"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"right":{"start":null,"loc":null,"range":null,"name":"err","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"CatchClause","end":null,"_paths":null},"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"block":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"!","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"_n","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"_i","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"return","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"handler":null,"guardedHandlers":[],"finalizer":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"_d","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_e","type":"Identifier","end":null},"type":"ThrowStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"TryStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"TryStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"_arr","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"TypeError","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"value":"Invalid attempt to destructure non-iterable instance","raw":null,"type":"Literal","end":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-tagged-template-literal-loose":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-tagged-template-literal":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"defineProperties","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"strings","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"value","type":"Identifier","end":null},"value":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Object","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"freeze","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"raw","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-temporal-assert-defined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"val","type":"Identifier","end":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"undef","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"ReferenceError","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"name","type":"Identifier","end":null},"operator":"+","right":{"start":null,"loc":null,"range":null,"value":" is not defined - temporal dead zone","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null}],"type":"NewExpression","end":null,"_paths":null},"type":"ThrowStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-temporal-undefined":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null,"parenthesizedExpression":true},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-to-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"alternate":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-to-consumable-array":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"isArray","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":0,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"operator":"<","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"i","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"arr2","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"from","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"arr","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"helper-typeof":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"constructor","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"name":"Symbol","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"value":"symbol","raw":null,"type":"Literal","end":null},"alternate":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"obj","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"type":"ConditionalExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"let-scoping-return":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"RETURN","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"v","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null},"alternate":null,"type":"IfStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"named-function":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"GET_OUTER_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"property-method-assignment-wrapper-generator":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":true,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"delegate":true,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"YieldExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"property-method-assignment-wrapper":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"apply","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"type":"ThisExpression","end":null},{"start":null,"loc":null,"range":null,"name":"arguments","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"FUNCTION_KEY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"toString","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[],"type":"CallExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"FUNCTION","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"prototype-identifier":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"CLASS_NAME","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"prototype","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"require-assign-key":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"VARIABLE_NAME","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"require":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"require","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"rest":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"init":{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"length","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"init":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"Array","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"ARRAY_LEN","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"name":"START","type":"Identifier","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"operator":"<","right":{"start":null,"loc":null,"range":null,"name":"LEN","type":"Identifier","end":null},"type":"BinaryExpression","end":null,"_paths":null},"update":{"loc":null,"start":null,"range":null,"operator":"++","prefix":false,"argument":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"type":"UpdateExpression","end":null,"_paths":null},"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARRAY","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"ARRAY_KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"ARGUMENTS","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"KEY","type":"Identifier","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"ForStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"self-contained-helpers-head":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"value":"default","raw":null,"type":"Literal","end":null},"computed":true,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"name":"HELPER","type":"Identifier","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"__esModule","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"system":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"System","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"register","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"MODULE_NAME","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"MODULE_DEPENDENCIES","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"EXPORT_IDENTIFIER","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"argument":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"setters","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"SETTERS","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"execute","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"name":"EXECUTE","type":"Identifier","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null},"type":"ReturnStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"tail-call-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"value":true,"raw":null,"type":"Literal","end":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"body":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"AGAIN_ID","type":"Identifier","end":null},"body":{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"BLOCK","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null},"type":"WhileStatement","end":null,"_paths":null},"label":{"start":null,"loc":null,"range":null,"name":"FUNCTION_ID","type":"Identifier","end":null},"type":"LabeledStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"test-exports":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"test-module":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"module","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"!==","right":{"start":null,"loc":null,"range":null,"value":"undefined","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"umd-commonjs-strict":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"root","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"object","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"UMD_ROOT","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"FACTORY_PARAMETERS","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"name":"FACTORY_BODY","type":"Identifier","end":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"_paths":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null},"umd-runner-body":{"loc":null,"start":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"start":null,"loc":null,"range":null,"id":null,"generator":false,"expression":false,"params":[{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"body":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"test":{"loc":null,"start":null,"range":null,"left":{"loc":null,"start":null,"range":null,"left":{"start":null,"loc":null,"range":null,"operator":"typeof","prefix":true,"argument":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"type":"UnaryExpression","end":null,"_paths":null},"operator":"===","right":{"start":null,"loc":null,"range":null,"value":"function","raw":null,"type":"Literal","end":null},"type":"BinaryExpression","end":null,"_paths":null},"operator":"&&","right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"amd","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"LogicalExpression","end":null,"_paths":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"define","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"AMD_ARGUMENTS","type":"Identifier","end":null},{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"test":{"start":null,"loc":null,"range":null,"name":"COMMON_TEST","type":"Identifier","end":null},"consequent":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"start":null,"loc":null,"range":null,"name":"COMMON_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"alternate":{"start":null,"loc":null,"range":null,"body":[{"start":null,"loc":null,"range":null,"declarations":[{"start":null,"loc":null,"range":null,"id":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"init":{"start":null,"loc":null,"range":null,"properties":[{"start":null,"loc":null,"range":null,"method":false,"shorthand":false,"computed":false,"key":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"value":{"start":null,"loc":null,"range":null,"properties":[],"type":"ObjectExpression","end":null},"kind":"init","type":"Property","end":null,"_paths":null}],"type":"ObjectExpression","end":null,"_paths":null},"type":"VariableDeclarator","end":null,"_paths":null}],"kind":"var","type":"VariableDeclaration","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"callee":{"start":null,"loc":null,"range":null,"name":"factory","type":"Identifier","end":null},"arguments":[{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"name":"BROWSER_ARGUMENTS","type":"Identifier","end":null}],"type":"CallExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null},{"start":null,"loc":null,"range":null,"expression":{"loc":null,"start":null,"range":null,"operator":"=","left":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"global","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"GLOBAL_ARG","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"right":{"loc":null,"start":null,"range":null,"object":{"start":null,"loc":null,"range":null,"name":"mod","type":"Identifier","end":null},"property":{"start":null,"loc":null,"range":null,"name":"exports","type":"Identifier","end":null},"computed":false,"type":"MemberExpression","end":null,"_paths":null},"type":"AssignmentExpression","end":null,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null},"type":"IfStatement","end":null,"_paths":null}],"type":"BlockStatement","end":null,"_paths":null},"type":"FunctionExpression","end":null,"parenthesizedExpression":true,"_paths":null},"type":"ExpressionStatement","end":null,"_paths":null}],"type":"Program","end":null,"_paths":null}} -},{}]},{},[19])(19) -}); diff --git a/babel.min.js b/babel.min.js deleted file mode 100644 index d7aee65..0000000 --- a/babel.min.js +++ /dev/null @@ -1,62 +0,0 @@ -(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.babel=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o")){node.params.push(this.flow_parseTypeAnnotatableIdentifier());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");return this.finishNode(node,"TypeParameterDeclaration")};pp.flow_parseTypeParameterInstantiation=function(){var node=this.startNode(),oldInType=this.inType;node.params=[];this.inType=true;this.expectRelational("<");while(!this.isRelational(">")){node.params.push(this.flow_parseType());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");this.inType=oldInType;return this.finishNode(node,"TypeParameterInstantiation")};pp.flow_parseObjectPropertyKey=function(){return this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.flow_parseObjectTypeIndexer=function(node,isStatic){node["static"]=isStatic;this.expect(tt.bracketL);node.id=this.flow_parseObjectPropertyKey();this.expect(tt.colon);node.key=this.flow_parseType();this.expect(tt.bracketR);this.expect(tt.colon);node.value=this.flow_parseType();this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeIndexer")};pp.flow_parseObjectTypeMethodish=function(node){node.params=[];node.rest=null;node.typeParameters=null;if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}this.expect(tt.parenL);while(this.type===tt.name){node.params.push(this.flow_parseFunctionTypeParam());if(this.type!==tt.parenR){this.expect(tt.comma)}}if(this.eat(tt.ellipsis)){node.rest=this.flow_parseFunctionTypeParam()}this.expect(tt.parenR);this.expect(tt.colon);node.returnType=this.flow_parseType();return this.finishNode(node,"FunctionTypeAnnotation")};pp.flow_parseObjectTypeMethod=function(start,isStatic,key){var node=this.startNodeAt(start);node.value=this.flow_parseObjectTypeMethodish(this.startNodeAt(start));node["static"]=isStatic;node.key=key;node.optional=false;this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeProperty")};pp.flow_parseObjectTypeCallProperty=function(node,isStatic){var valueNode=this.startNode();node["static"]=isStatic;node.value=this.flow_parseObjectTypeMethodish(valueNode);this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeCallProperty")};pp.flow_parseObjectType=function(allowStatic){var nodeStart=this.startNode();var node;var optional=false;var property;var propertyKey;var propertyTypeAnnotation;var token;var isStatic;nodeStart.callProperties=[];nodeStart.properties=[];nodeStart.indexers=[];this.expect(tt.braceL);while(this.type!==tt.braceR){var start=this.markPosition();node=this.startNode();if(allowStatic&&this.isContextual("static")){this.next();isStatic=true}if(this.type===tt.bracketL){nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node,isStatic))}else if(this.type===tt.parenL||this.isRelational("<")){nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node,allowStatic))}else{if(isStatic&&this.type===tt.colon){propertyKey=this.parseIdent()}else{propertyKey=this.flow_parseObjectPropertyKey()}if(this.isRelational("<")||this.type===tt.parenL){nodeStart.properties.push(this.flow_parseObjectTypeMethod(start,isStatic,propertyKey))}else{if(this.eat(tt.question)){optional=true}this.expect(tt.colon);node.key=propertyKey;node.value=this.flow_parseType();node.optional=optional;node["static"]=isStatic;this.flow_objectTypeSemicolon();nodeStart.properties.push(this.finishNode(node,"ObjectTypeProperty"))}}}this.expect(tt.braceR);return this.finishNode(nodeStart,"ObjectTypeAnnotation")};pp.flow_objectTypeSemicolon=function(){if(!this.eat(tt.semi)&&!this.eat(tt.comma)&&this.type!==tt.braceR){this.unexpected()}};pp.flow_parseGenericType=function(start,id){var node=this.startNodeAt(start);node.typeParameters=null;node.id=id;while(this.eat(tt.dot)){var node2=this.startNodeAt(start);node2.qualification=node.id;node2.id=this.parseIdent();node.id=this.finishNode(node2,"QualifiedTypeIdentifier")}if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterInstantiation()}return this.finishNode(node,"GenericTypeAnnotation")};pp.flow_parseVoidType=function(){var node=this.startNode();this.expect(tt._void);return this.finishNode(node,"VoidTypeAnnotation")};pp.flow_parseTypeofType=function(){var node=this.startNode();this.expect(tt._typeof);node.argument=this.flow_parsePrimaryType();return this.finishNode(node,"TypeofTypeAnnotation")};pp.flow_parseTupleType=function(){var node=this.startNode();node.types=[];this.expect(tt.bracketL);while(this.pos. It looks like "+"you are trying to write a function type, but you ended up "+"writing a grouped type followed by an =>, which is a syntax "+"error. Remember, function type parameters are named so function "+"types look like (name1: type1, name2: type2) => returnType. You "+"probably wrote (type1) => returnType")}return type}tmp=this.flow_parseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;this.expect(tt.parenR);this.expect(tt.arrow);node.returnType=this.flow_parseType();node.typeParameters=null;return this.finishNode(node,"FunctionTypeAnnotation");case tt.string:node.value=this.value;node.raw=this.input.slice(this.start,this.end);this.next();return this.finishNode(node,"StringLiteralTypeAnnotation");default:if(this.type.keyword){switch(this.type.keyword){case"void":return this.flow_parseVoidType();case"typeof":return this.flow_parseTypeofType()}}}this.unexpected()};pp.flow_parsePostfixType=function(){var node=this.startNode();var type=node.elementType=this.flow_parsePrimaryType();if(this.type===tt.bracketL){this.expect(tt.bracketL);this.expect(tt.bracketR);return this.finishNode(node,"ArrayTypeAnnotation")}return type};pp.flow_parsePrefixType=function(){var node=this.startNode();if(this.eat(tt.question)){node.typeAnnotation=this.flow_parsePrefixType();return this.finishNode(node,"NullableTypeAnnotation")}return this.flow_parsePostfixType()};pp.flow_parseIntersectionType=function(){var node=this.startNode();var type=this.flow_parsePrefixType();node.types=[type];while(this.eat(tt.bitwiseAND)){node.types.push(this.flow_parsePrefixType())}return node.types.length===1?type:this.finishNode(node,"IntersectionTypeAnnotation")};pp.flow_parseUnionType=function(){var node=this.startNode();var type=this.flow_parseIntersectionType();node.types=[type];while(this.eat(tt.bitwiseOR)){node.types.push(this.flow_parseIntersectionType())}return node.types.length===1?type:this.finishNode(node,"UnionTypeAnnotation")};pp.flow_parseType=function(){var oldInType=this.inType;this.inType=true;var type=this.flow_parseUnionType();this.inType=oldInType;return type};pp.flow_parseTypeAnnotation=function(){var node=this.startNode();var oldInType=this.inType;this.inType=true;this.expect(tt.colon);node.typeAnnotation=this.flow_parseType();this.inType=oldInType;return this.finishNode(node,"TypeAnnotation")};pp.flow_parseTypeAnnotatableIdentifier=function(requireTypeAnnotation,canBeOptionalParam){var node=this.startNode();var ident=this.parseIdent();var isOptionalParam=false;if(canBeOptionalParam&&this.eat(tt.question)){this.expect(tt.question);isOptionalParam=true}if(requireTypeAnnotation||this.type===tt.colon){ident.typeAnnotation=this.flow_parseTypeAnnotation();this.finishNode(ident,ident.type)}if(isOptionalParam){ident.optional=true;this.finishNode(ident,ident.type)}return ident};acorn.plugins.flow=function(instance){instance.extend("parseFunctionBody",function(inner){return function(node,allowExpression){if(this.type===tt.colon){node.returnType=this.flow_parseTypeAnnotation()}return inner.call(this,node,allowExpression)}});instance.extend("parseStatement",function(inner){return function(declaration,topLevel){if(this.strict&&this.type===tt.name&&this.value==="interface"){var node=this.startNode();this.next();return this.flow_parseInterface(node)}else{return inner.call(this,declaration,topLevel)}}});instance.extend("parseExpressionStatement",function(inner){return function(node,expr){if(expr.type==="Identifier"){if(expr.name==="declare"){if(this.type===tt._class||this.type===tt.name||this.type===tt._function||this.type===tt._var){return this.flow_parseDeclare(node)}}else if(this.type===tt.name){if(expr.name==="interface"){return this.flow_parseInterface(node)}else if(expr.name==="type"){return this.flow_parseTypeAlias(node)}}}return inner.call(this,node,expr)}});instance.extend("shouldParseExportDeclaration",function(inner){return function(){return this.isContextual("type")||inner.call(this)}});instance.extend("parseParenItem",function(inner){return function(node,start){if(this.type===tt.colon){var typeCastNode=this.startNodeAt(start);typeCastNode.expression=node;typeCastNode.typeAnnotation=this.flow_parseTypeAnnotation();return this.finishNode(typeCastNode,"TypeCastExpression")}else{return node}}});instance.extend("parseClassId",function(inner){return function(node,isStatement){inner.call(this,node,isStatement);if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}}});instance.extend("readToken",function(inner){return function(code){if(this.inType&&(code===62||code===60)){return this.finishOp(tt.relational,1)}else{return inner.call(this,code)}}});instance.extend("jsx_readToken",function(inner){return function(){if(!this.inType)return inner.call(this)}});instance.extend("parseParenArrowList",function(inner){return function(start,exprList,isAsync){for(var i=0;i=6)return;var key=prop.key,name=undefined;switch(key.type){case"Identifier":name=key.name;break;case"Literal":name=String(key.value);break;default:return}var kind=prop.kind||"init",other=undefined;if((0,_util.has)(propHash,name)){other=propHash[name];var isGetSet=kind!=="init";if((this.strict||isGetSet)&&other[kind]||!(isGetSet^other.init))this.raise(key.start,"Redefinition of property")}else{other=propHash[name]={init:false,get:false,set:false}}other[kind]=true};pp.parseExpression=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeAssign(noIn,refShorthandDefaultPos);if(this.type===_tokentype.types.comma){var node=this.startNodeAt(start);node.expressions=[expr];while(this.eat(_tokentype.types.comma))node.expressions.push(this.parseMaybeAssign(noIn,refShorthandDefaultPos));return this.finishNode(node,"SequenceExpression")}return expr};pp.parseMaybeAssign=function(noIn,refShorthandDefaultPos,afterLeftParse){if(this.type==_tokentype.types._yield&&this.inGenerator)return this.parseYield();var failOnShorthandAssign=undefined;if(!refShorthandDefaultPos){refShorthandDefaultPos={start:0};failOnShorthandAssign=true}else{failOnShorthandAssign=false}var start=this.markPosition();if(this.type==_tokentype.types.parenL||this.type==_tokentype.types.name)this.potentialArrowAt=this.start;var left=this.parseMaybeConditional(noIn,refShorthandDefaultPos);if(afterLeftParse)left=afterLeftParse.call(this,left,start);if(this.type.isAssign){var node=this.startNodeAt(start);node.operator=this.value;node.left=this.type===_tokentype.types.eq?this.toAssignable(left):left;refShorthandDefaultPos.start=0;this.checkLVal(left);if(left.parenthesizedExpression){var errorMsg=undefined;if(left.type==="ObjectPattern"){errorMsg="`({a}) = 0` use `({a} = 0)`"}else if(left.type==="ArrayPattern"){errorMsg="`([a]) = 0` use `([a] = 0)`"}if(errorMsg){this.raise(left.start,"You're trying to assign to a parenthesized expression, eg. instead of "+errorMsg)}}this.next();node.right=this.parseMaybeAssign(noIn);return this.finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return left};pp.parseMaybeConditional=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;if(this.eat(_tokentype.types.question)){var node=this.startNodeAt(start);node.test=expr;node.consequent=this.parseMaybeAssign();this.expect(_tokentype.types.colon);node.alternate=this.parseMaybeAssign(noIn);return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseExprOp(expr,start,-1,noIn)};pp.parseExprOp=function(left,leftStart,minPrec,noIn){var prec=this.type.binop;if(prec!=null&&(!noIn||this.type!==_tokentype.types._in)){if(prec>minPrec){var node=this.startNodeAt(leftStart);node.left=left;node.operator=this.value;var op=this.type;this.next();var _start=this.markPosition();node.right=this.parseExprOp(this.parseMaybeUnary(),_start,op.rightAssociative?prec-1:prec,noIn);this.finishNode(node,op===_tokentype.types.logicalOR||op===_tokentype.types.logicalAND?"LogicalExpression":"BinaryExpression");return this.parseExprOp(node,leftStart,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){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();if(refShorthandDefaultPos&&refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(update)this.checkLVal(node.argument);else if(this.strict&&node.operator==="delete"&&node.argument.type==="Identifier")this.raise(node.start,"Deleting local variable in strict mode");return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var start=this.markPosition();var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.type.postfix&&!this.canInsertSemicolon()){var node=this.startNodeAt(start);node.operator=this.value;node.prefix=false;node.argument=expr;this.checkLVal(expr);this.next();expr=this.finishNode(node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprAtom(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseSubscripts(expr,start)};pp.parseSubscripts=function(base,start,noCalls){if(!noCalls&&this.eat(_tokentype.types.doubleColon)){var node=this.startNodeAt(start);node.object=base;node.callee=this.parseNoCallExpr();return this.parseSubscripts(this.finishNode(node,"BindExpression"),start,noCalls)}else if(this.eat(_tokentype.types.dot)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseIdent(true);node.computed=false;return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(this.eat(_tokentype.types.bracketL)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseExpression();node.computed=true;this.expect(_tokentype.types.bracketR);return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(!noCalls&&this.eat(_tokentype.types.parenL)){var node=this.startNodeAt(start);node.callee=base;node.arguments=this.parseExprList(_tokentype.types.parenR,this.options.features["es7.trailingFunctionCommas"]);return this.parseSubscripts(this.finishNode(node,"CallExpression"),start,noCalls)}else if(this.type===_tokentype.types.backQuote){var node=this.startNodeAt(start);node.tag=base;node.quasi=this.parseTemplate();return this.parseSubscripts(this.finishNode(node,"TaggedTemplateExpression"),start,noCalls)}return base};pp.parseNoCallExpr=function(){var start=this.markPosition();return this.parseSubscripts(this.parseExprAtom(),start,true)};pp.parseExprAtom=function(refShorthandDefaultPos){var node=undefined,canBeArrow=this.potentialArrowAt==this.start;switch(this.type){case _tokentype.types._this:case _tokentype.types._super:var type=this.type===_tokentype.types._this?"ThisExpression":"Super";node=this.startNode();this.next();return this.finishNode(node,type);case _tokentype.types._yield:if(this.inGenerator)this.unexpected();case _tokentype.types._do:if(this.options.features["es7.doExpressions"]){var _node=this.startNode();this.next();var oldInFunction=this.inFunction;var oldLabels=this.labels;this.labels=[];this.inFunction=false;_node.body=this.parseBlock();this.inFunction=oldInFunction;this.labels=oldLabels;return this.finishNode(_node,"DoExpression")}case _tokentype.types.name:var start=this.markPosition();node=this.startNode();var id=this.parseIdent(this.type!==_tokentype.types.name);if(this.options.features["es7.asyncFunctions"]){if(id.name==="async"){if(this.type===_tokentype.types.parenL){var expr=this.parseParenAndDistinguishExpression(start,true,true);if(expr&&expr.type==="ArrowFunctionExpression"){return expr}else{node.callee=id;if(!expr){node.arguments=[]}else if(expr.type==="SequenceExpression"){node.arguments=expr.expressions}else{node.arguments=[expr]}return this.parseSubscripts(this.finishNode(node,"CallExpression"),start)}}else if(this.type===_tokentype.types.name){id=this.parseIdent();this.expect(_tokentype.types.arrow);return this.parseArrowExpression(node,[id],true)}if(this.type===_tokentype.types._function&&!this.canInsertSemicolon()){this.next();return this.parseFunction(node,false,false,true)}}else if(id.name==="await"){if(this.inAsync)return this.parseAwait(node)}}if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokentype.types.arrow))return this.parseArrowExpression(this.startNodeAt(start),[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(null,null,canBeArrow);case _tokentype.types.bracketL:node=this.startNode();this.next();if((this.options.ecmaVersion>=7||this.options.features["es7.comprehensions"])&&this.type===_tokentype.types._for){return this.parseComprehension(node,false)}node.elements=this.parseExprList(_tokentype.types.bracketR,true,true,refShorthandDefaultPos);return this.finishNode(node,"ArrayExpression");case _tokentype.types.braceL:return this.parseObj(false,refShorthandDefaultPos);case _tokentype.types._function:node=this.startNode();this.next();return this.parseFunction(node,false);case _tokentype.types.at:this.parseDecorators();case _tokentype.types._class:node=this.startNode();this.takeDecorators(node);return this.parseClass(node,false);case _tokentype.types._new:return this.parseNew();case _tokentype.types.backQuote:return this.parseTemplate();case _tokentype.types.doubleColon:node=this.startNode();this.next();node.object=null;var callee=node.callee=this.parseNoCallExpr();if(callee.type!=="MemberExpression")this.raise(callee.start,"Binding should be performed on object property.");return this.finishNode(node,"BindExpression");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(start,isAsync,canBeArrow){start=start||this.markPosition();var val=undefined;if(this.options.ecmaVersion>=6){this.next();if((this.options.features["es7.comprehensions"]||this.options.ecmaVersion>=7)&&this.type===_tokentype.types._for){return this.parseComprehension(this.startNodeAt(start),true)}var innerStart=this.markPosition(),exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=undefined,innerParenStart=undefined;while(this.type!==_tokentype.types.parenR){first?first=false:this.expect(_tokentype.types.comma);if(this.type===_tokentype.types.ellipsis){var spreadNodeStart=this.markPosition();spreadStart=this.start;exprList.push(this.parseParenItem(this.parseRest(),spreadNodeStart));break}else{if(this.type===_tokentype.types.parenL&&!innerParenStart){innerParenStart=this.start}exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem))}}var innerEnd=this.markPosition();this.expect(_tokentype.types.parenR);if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokentype.types.arrow)){if(innerParenStart)this.unexpected(innerParenStart);return this.parseParenArrowList(start,exprList,isAsync)}if(!exprList.length){if(isAsync){return}else{this.unexpected(this.lastTokStart)}}if(spreadStart)this.unexpected(spreadStart);if(refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(exprList.length>1){val=this.startNodeAt(innerStart);val.expressions=exprList;this.finishNodeAt(val,"SequenceExpression",innerEnd)}else{val=exprList[0]}}else{val=this.parseParenExpression()}if(this.options.preserveParens){var par=this.startNodeAt(start);par.expression=val;return this.finishNode(par,"ParenthesizedExpression")}else{val.parenthesizedExpression=true; - - return val}};pp.parseParenArrowList=function(start,exprList,isAsync){return this.parseArrowExpression(this.startNodeAt(start),exprList,isAsync)};pp.parseParenItem=function(node,start){return node};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.raise(node.property.start,"The only valid meta property for new is new.target");return this.finishNode(node,"MetaProperty")}node.callee=this.parseNoCallExpr();if(this.eat(_tokentype.types.parenL))node.arguments=this.parseExprList(_tokentype.types.parenR,this.options.features["es7.trailingFunctionCommas"]);else node.arguments=empty;return this.finishNode(node,"NewExpression")};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")};pp.parseObj=function(isPattern,refShorthandDefaultPos){var node=this.startNode(),first=true,propHash={};node.properties=[];var decorators=[];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;while(this.type===_tokentype.types.at){decorators.push(this.parseDecorator())}var prop=this.startNode(),isGenerator=false,isAsync=false,_start2=undefined;if(decorators.length){prop.decorators=decorators;decorators=[]}if(this.options.features["es7.objectRestSpread"]&&this.type===_tokentype.types.ellipsis){prop=this.parseSpread();prop.type="SpreadProperty";node.properties.push(prop);continue}if(this.options.ecmaVersion>=6){prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos)_start2=this.markPosition();if(!isPattern)isGenerator=this.eat(_tokentype.types.star)}if(this.options.features["es7.asyncFunctions"]&&this.isContextual("async")){if(isGenerator||isPattern)this.unexpected();var asyncId=this.parseIdent();if(this.type===_tokentype.types.colon||this.type===_tokentype.types.parenL){prop.key=asyncId}else{isAsync=true;this.parsePropertyName(prop)}}else{this.parsePropertyName(prop)}this.parseObjPropValue(prop,_start2,isGenerator,isAsync,isPattern,refShorthandDefaultPos);this.checkPropClash(prop,propHash);node.properties.push(this.finishNode(prop,"Property"))}if(decorators.length){this.raise(this.start,"You have trailing decorators with no property")}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")};pp.parseObjPropValue=function(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos){if(this.eat(_tokentype.types.colon)){prop.value=isPattern?this.parseMaybeDefault():this.parseMaybeAssign(false,refShorthandDefaultPos);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,isAsync)}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||isAsync||isPattern)this.unexpected();prop.kind=prop.key.name;this.parsePropertyName(prop);prop.value=this.parseMethod(false)}else if(this.options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"){prop.kind="init";if(isPattern){if(this.isKeyword(prop.key.name)||this.strict&&(_identifier.reservedWords.strictBind(prop.key.name)||_identifier.reservedWords.strict(prop.key.name))||!this.options.allowReserved&&this.isReservedWord(prop.key.name))this.raise(prop.key.start,"Binding "+prop.key.name);prop.value=this.parseMaybeDefault(start,prop.key)}else if(this.type===_tokentype.types.eq&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start)refShorthandDefaultPos.start=this.start;prop.value=this.parseMaybeDefault(start,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}else{prop.computed=false}}prop.key=this.type===_tokentype.types.num||this.type===_tokentype.types.string?this.parseExprAtom():this.parseIdent(true)};pp.initFunction=function(node,isAsync){node.id=null;if(this.options.ecmaVersion>=6){node.generator=false;node.expression=false}if(this.options.features["es7.asyncFunctions"]){node.async=!!isAsync}};pp.parseMethod=function(isGenerator,isAsync){var node=this.startNode();this.initFunction(node,isAsync);this.expect(_tokentype.types.parenL);node.params=this.parseBindingList(_tokentype.types.parenR,false,this.options.features["es7.trailingFunctionCommas"]);if(this.options.ecmaVersion>=6){node.generator=isGenerator}this.parseFunctionBody(node);return this.finishNode(node,"FunctionExpression")};pp.parseArrowExpression=function(node,params,isAsync){this.initFunction(node,isAsync);node.params=this.toAssignableList(params,true);this.parseFunctionBody(node,true);return this.finishNode(node,"ArrowFunctionExpression")};pp.parseFunctionBody=function(node,allowExpression){var isExpression=allowExpression&&this.type!==_tokentype.types.braceL;var oldInAsync=this.inAsync;this.inAsync=node.async;if(isExpression){node.body=this.parseMaybeAssign();node.expression=true}else{var oldInFunc=this.inFunction,oldInGen=this.inGenerator,oldLabels=this.labels;this.inFunction=true;this.inGenerator=node.generator;this.labels=[];node.body=this.parseBlock(true);node.expression=false;this.inFunction=oldInFunc;this.inGenerator=oldInGen;this.labels=oldLabels}this.inAsync=oldInAsync;if(this.strict||!isExpression&&node.body.body.length&&this.isUseStrict(node.body.body[0])){var nameHash={},oldStrict=this.strict;this.strict=true;if(node.id)this.checkLVal(node.id,true);for(var i=0;i=6||this.input.slice(this.start,this.end).indexOf("\\")==-1)))this.raise(this.start,"The keyword '"+this.value+"' is reserved");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")};pp.parseAwait=function(node){if(this.eat(_tokentype.types.semi)||this.canInsertSemicolon()){this.unexpected()}node.all=this.eat(_tokentype.types.star);node.argument=this.parseMaybeUnary();return this.finishNode(node,"AwaitExpression")};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")};pp.parseComprehension=function(node,isGenerator){node.blocks=[];while(this.type===_tokentype.types._for){var block=this.startNode();this.next();this.expect(_tokentype.types.parenL);block.left=this.parseBindingAtom();this.checkLVal(block.left,true);this.expectContextual("of");block.right=this.parseExpression();this.expect(_tokentype.types.parenR);node.blocks.push(this.finishNode(block,"ComprehensionBlock"))}node.filter=this.eat(_tokentype.types._if)?this.parseParenExpression():null;node.body=this.parseExpression();this.expect(isGenerator?_tokentype.types.parenR:_tokentype.types.bracketR);node.generator=isGenerator;return this.finishNode(node,"ComprehensionExpression")}},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isIdentifierStart=isIdentifierStart;exports.isIdentifierChar=isIdentifierChar;function makePredicate(words){words=words.split(" ");return function(str){return words.indexOf(str)>=0}}var reservedWords={3:makePredicate("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:makePredicate("class enum extends super const export import"),6:makePredicate("enum await"),strict:makePredicate("implements interface let package private protected public static yield"),strictBind:makePredicate("eval arguments")};exports.reservedWords=reservedWords;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:makePredicate(ecma5AndLessKeywords),6:makePredicate(ecma5AndLessKeywords+" let const class extends export import yield super")};exports.keywords=keywords;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;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,98,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,955,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,38,17,2,24,133,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,32,4,287,47,21,1,2,0,185,46,82,47,21,0,60,42,502,63,32,0,449,56,1288,920,104,110,2962,1070,13266,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,16355,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,16,9,83,11,168,11,6,9,8,2,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,316,19,13,9,214,6,3,8,112,16,16,9,82,12,9,9,535,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,4305,6,792618,239];function isInAstralSet(code,set){var pos=65536;for(var i=0;icode)return false;pos+=set[i+1];if(pos>=code)return true}}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<=65535)return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)}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<=65535)return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}},{}],5:[function(require,module,exports){"use strict";exports.__esModule=true;exports.parse=parse;exports.parseExpressionAt=parseExpressionAt;exports.tokenizer=tokenizer;var _state=require("./state");var _options=require("./options");require("./parseutil");require("./statement");require("./lval");require("./expression");require("./lookahead");exports.Parser=_state.Parser;exports.plugins=_state.plugins;exports.defaultOptions=_options.defaultOptions;var _location=require("./location");exports.SourceLocation=_location.SourceLocation;exports.getLineInfo=_location.getLineInfo;var _node=require("./node");exports.Node=_node.Node;var _tokentype=require("./tokentype");exports.TokenType=_tokentype.TokenType;exports.tokTypes=_tokentype.types;var _tokencontext=require("./tokencontext");exports.TokContext=_tokencontext.TokContext;exports.tokContexts=_tokencontext.types;var _identifier=require("./identifier");exports.isIdentifierChar=_identifier.isIdentifierChar;exports.isIdentifierStart=_identifier.isIdentifierStart;var _tokenize=require("./tokenize");exports.Token=_tokenize.Token;var _whitespace=require("./whitespace");exports.isNewLine=_whitespace.isNewLine;exports.lineBreak=_whitespace.lineBreak;exports.lineBreakG=_whitespace.lineBreakG;var version="1.0.0";exports.version=version;function parse(input,options){var p=parser(options,input);var startPos=p.options.locations?[p.pos,p.curPosition()]:p.pos;p.nextToken();return p.parseTopLevel(p.options.program||p.startNodeAt(startPos))}function parseExpressionAt(input,pos,options){var p=parser(options,input,pos);p.nextToken();return p.parseExpression()}function tokenizer(input,options){return parser(options,input)}function parser(options,input){return new _state.Parser((0,_options.getOptions)(options),String(input))}},{"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,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 _state=require("./state");var _whitespace=require("./whitespace");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};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=6&&node){switch(node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var i=0;i=6){node.sourceType=this.options.sourceType}return this.finishNode(node,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp.parseStatement=function(declaration,topLevel){if(this.type===_tokentype.types.at){this.parseDecorators(true)}var starttype=this.type,node=this.startNode();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();this.takeDecorators(node);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._let:case _tokentype.types._const:if(!declaration)this.unexpected();case _tokentype.types._var:return this.parseVarStatement(node,starttype);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);case _tokentype.types.name:if(this.options.features["es7.asyncFunctions"]&&this.value==="async"&&this.lookahead().type===_tokentype.types._function){this.next();this.expect(_tokentype.types._function);return this.parseFunction(node,true,false,true)}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.takeDecorators=function(node){if(this.decorators.length){node.decorators=this.decorators;this.decorators=[]}};pp.parseDecorators=function(allowExport){while(this.type===_tokentype.types.at){this.decorators.push(this.parseDecorator())}if(allowExport&&this.type===_tokentype.types._export){ - return}if(this.type!==_tokentype.types._class){this.raise(this.start,"Leading decorators must be attached to a class declaration")}};pp.parseDecorator=function(allowExport){if(!this.options.features["es7.decorators"]){this.unexpected()}var node=this.startNode();this.next();node.expression=this.parseMaybeAssign();return this.finishNode(node,"Decorator")};pp.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword=="break";this.next();if(this.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()}for(var i=0;i=6)this.eat(_tokentype.types.semi);else this.semicolon();return this.finishNode(node,"DoWhileStatement")};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);if(this.type===_tokentype.types._var||this.type===_tokentype.types._let||this.type===_tokentype.types._const){var _init=this.startNode(),varKind=this.type;this.next();this.parseVar(_init,true,varKind);this.finishNode(_init,"VariableDeclaration");if((this.type===_tokentype.types._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&_init.declarations.length===1&&!(varKind!==_tokentype.types._var&&_init.declarations[0].init))return this.parseForIn(node,_init);return this.parseFor(node,_init)}var refShorthandDefaultPos={start:0};var init=this.parseExpression(true,refShorthandDefaultPos);if(this.type===_tokentype.types._in||this.options.ecmaVersion>=6&&this.isContextual("of")){this.toAssignable(init);this.checkLVal(init);return this.parseForIn(node,init)}else if(refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}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();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);for(var cur,sawDefault;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.raise(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();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")};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.guard=null;clause.body=this.parseBlock();node.handler=this.finishNode(clause,"CatchClause")}node.guardedHandlers=empty;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=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.parseVarHead=function(decl){decl.id=this.parseBindingAtom();this.checkLVal(decl.id,true)};pp.parseFunction=function(node,isStatement,allowExpressionBody,isAsync){this.initFunction(node,isAsync);if(this.options.ecmaVersion>=6)node.generator=this.eat(_tokentype.types.star);if(isStatement||this.type===_tokentype.types.name)node.id=this.parseIdent();this.parseFunctionParams(node);this.parseFunctionBody(node,allowExpressionBody);return this.finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")};pp.parseFunctionParams=function(node){this.expect(_tokentype.types.parenL);node.params=this.parseBindingList(_tokentype.types.parenR,false,this.options.features["es7.trailingFunctionCommas"])};pp.parseClass=function(node,isStatement){this.next();this.parseClassId(node,isStatement);this.parseClassSuper(node);var classBody=this.startNode();classBody.body=[];this.expect(_tokentype.types.braceL);var decorators=[];while(!this.eat(_tokentype.types.braceR)){if(this.eat(_tokentype.types.semi))continue;if(this.type===_tokentype.types.at){decorators.push(this.parseDecorator());continue}var method=this.startNode();if(decorators.length){method.decorators=decorators;decorators=[]}var isGenerator=this.eat(_tokentype.types.star),isAsync=false;this.parsePropertyName(method);if(this.type!==_tokentype.types.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="static"){if(isGenerator)this.unexpected();method["static"]=true;isGenerator=this.eat(_tokentype.types.star);this.parsePropertyName(method)}else{method["static"]=false}if(!isGenerator&&method.key.type==="Identifier"&&!method.computed&&this.isClassProperty()){classBody.body.push(this.parseClassProperty(method));continue}if(this.options.features["es7.asyncFunctions"]&&this.type!==_tokentype.types.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async"){isAsync=true;this.parsePropertyName(method)}method.kind="method";if(!method.computed&&!isGenerator&&!isAsync){if(method.key.type==="Identifier"){if(this.type!==_tokentype.types.parenL&&(method.key.name==="get"||method.key.name==="set")){method.kind=method.key.name;this.parsePropertyName(method)}else if(!method["static"]&&method.key.name==="constructor"){method.kind="constructor"}}else if(!method["static"]&&method.key.type==="Literal"&&method.key.value==="constructor"){method.kind="constructor"}}if(method.kind==="constructor"&&method.decorators){this.raise(method.start,"You can't attach decorators to a class constructor")}this.parseClassMethod(classBody,method,isGenerator,isAsync)}if(decorators.length){this.raise(this.start,"You have trailing decorators with no method")}node.body=this.finishNode(classBody,"ClassBody");return this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")};pp.isClassProperty=function(){return this.type===_tokentype.types.eq||(this.type===_tokentype.types.semi||this.canInsertSemicolon())};pp.parseClassProperty=function(node){if(this.type===_tokentype.types.eq){if(!this.options.features["es7.classProperties"])this.unexpected();this.next();node.value=this.parseMaybeAssign()}else{node.value=null}this.semicolon();return this.finishNode(node,"ClassProperty")};pp.parseClassMethod=function(classBody,method,isGenerator,isAsync){method.value=this.parseMethod(isGenerator,isAsync);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};pp.parseExport=function(node){this.next();if(this.type===_tokentype.types.star){var specifier=this.startNode();this.next();if(this.options.features["es7.exportExtensions"]&&this.eatContextual("as")){specifier.exported=this.parseIdent();node.specifiers=[this.finishNode(specifier,"ExportNamespaceSpecifier")];this.parseExportSpecifiersMaybe(node);this.parseExportFrom(node)}else{this.parseExportFrom(node);return this.finishNode(node,"ExportAllDeclaration")}}else if(this.options.features["es7.exportExtensions"]&&this.isExportDefaultSpecifier()){var specifier=this.startNode();specifier.exported=this.parseIdent(true);node.specifiers=[this.finishNode(specifier,"ExportDefaultSpecifier")];if(this.type===_tokentype.types.comma&&this.lookahead().type===_tokentype.types.star){this.expect(_tokentype.types.comma);var _specifier=this.startNode();this.expect(_tokentype.types.star);this.expectContextual("as");_specifier.exported=this.parseIdent();node.specifiers.push(this.finishNode(_specifier,"ExportNamespaceSpecifier"))}else{this.parseExportSpecifiersMaybe(node)}this.parseExportFrom(node)}else if(this.eat(_tokentype.types._default)){var _expr=this.parseMaybeAssign();var needsSemi=true;if(_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();this.checkExport(node);return this.finishNode(node,"ExportDefaultDeclaration")}else if(this.type.keyword||this.shouldParseExportDeclaration()){node.declaration=this.parseStatement(true);node.specifiers=[];node.source=null}else{node.declaration=null;node.specifiers=this.parseExportSpecifiers();if(this.eatContextual("from")){node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected()}else{node.source=null}this.semicolon()}this.checkExport(node);return this.finishNode(node,"ExportNamedDeclaration")};pp.isExportDefaultSpecifier=function(){if(this.type===_tokentype.types.name){return this.value!=="type"&&this.value!=="async"}if(this.type!==_tokentype.types._default){return false}var lookahead=this.lookahead();return lookahead.type===_tokentype.types.comma||lookahead.type===_tokentype.types.name&&lookahead.value==="from"};pp.parseExportSpecifiersMaybe=function(node){if(this.eat(_tokentype.types.comma)){node.specifiers=node.specifiers.concat(this.parseExportSpecifiers())}};pp.parseExportFrom=function(node){this.expectContextual("from");node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected();this.semicolon();this.checkExport(node)};pp.shouldParseExportDeclaration=function(){return this.options.features["es7.asyncFunctions"]&&this.isContextual("async")};pp.checkExport=function(node){if(this.decorators.length){var isClass=node.declaration&&(node.declaration.type==="ClassDeclaration"||node.declaration.type==="ClassExpression");if(!node.declaration||!isClass){this.raise(node.start,"You can only use decorators on an export when exporting a class")}this.takeDecorators(node.declaration)}};pp.parseExportSpecifiers=function(){var nodes=[],first=true;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};pp.parseImport=function(node){this.next();if(this.type===_tokentype.types.string){node.specifiers=empty;node.source=this.parseExprAtom()}else{node.specifiers=[];this.parseImportSpecifiers(node);this.expectContextual("from");node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(node,"ImportDeclaration")};pp.parseImportSpecifiers=function(node){var first=true;if(this.type===_tokentype.types.name){var start=this.markPosition();node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(),start));if(!this.eat(_tokentype.types.comma))return}if(this.type===_tokentype.types.star){var specifier=this.startNode();this.next();this.expectContextual("as");specifier.local=this.parseIdent();this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportNamespaceSpecifier"));return}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 specifier=this.startNode();specifier.imported=this.parseIdent(true);specifier.local=this.eatContextual("as")?this.parseIdent():specifier.imported;this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportSpecifier"))}};pp.parseImportSpecifierDefault=function(id,start){var node=this.startNodeAt(start);node.local=id;this.checkLVal(node.local,true);return this.finishNode(node,"ImportDefaultSpecifier")}},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,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=require("./state");var _tokentype=require("./tokentype");var _whitespace=require("./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){var parent=undefined;if(prevType===_tokentype.types.colon&&(parent=this.curContext()).token=="{")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)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};_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(){};_tokentype.types._function.updateContext=function(){if(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":12,"./tokentype":16,"./whitespace":18}],15:[function(require,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=require("./identifier");var _tokentype=require("./tokentype");var _state=require("./state");var _location=require("./location");var _whitespace=require("./whitespace");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 _location.SourceLocation(p,p.startLoc,p.endLoc);if(p.options.ranges)this.range=[p.start,p.end]};exports.Token=Token;var pp=_state.Parser.prototype;pp.next=function(){if(this.options.onToken&&!this.isLookahead)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(typeof Symbol!=="undefined")pp[Symbol.iterator]=function(){var self=this;return{next:function next(){var token=self.getToken();return{done:token.type===_tokentype.types.eof,value:token}}}};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.input.length)return this.finishToken(_tokentype.types.eof);if(curContext.override)return curContext.override(this);else this.readToken(this.fullCharCodeAtPos())};pp.readToken=function(code){if((0,_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<=55295||code>=57344)return code;var next=this.input.charCodeAt(this.pos+1);return(code<<10)+next-56613888};pp.skipBlockComment=function(){var startLoc=this.options.onComment&&this.options.locations&&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.index8&&ch<14){++this.pos}else if(ch===47){var _next2=this.input.charCodeAt(this.pos+1);if(_next2===42){this.skipBlockComment()}else if(_next2===47){this.skipLineComment(2)}else break}else if(ch===160){++this.pos}else if(ch>=5760&&_whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))){++this.pos}else{break}}};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)};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){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=function(code){var type=code===42?_tokentype.types.star:_tokentype.types.modulo;var width=1;var next=this.input.charCodeAt(this.pos+1);if(next===42){width++;next=this.input.charCodeAt(this.pos+2);type=_tokentype.types.exponent}if(next===61){width++;type=_tokentype.types.assign}return this.finishOp(type,width)};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))){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();this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(next===61)size=this.input.charCodeAt(this.pos+2)===61?3: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){case 46:return this.readToken_dot();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:if(this.options.features["es7.functionBind"]&&this.input.charCodeAt(this.pos+1)===58)return this.finishOp(_tokentype.types.doubleColon,2);++this.pos;return this.finishToken(_tokentype.types.colon);case 63:++this.pos;return this.finishToken(_tokentype.types.question);case 64:++this.pos;return this.finishToken(_tokentype.types.at);case 96:if(this.options.ecmaVersion<6)break;++this.pos;return this.finishToken(_tokentype.types.backQuote);case 48:var next=this.input.charCodeAt(this.pos+1);if(next===120||next===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(next===111||next===79)return this.readRadixNumber(8);if(next===98||next===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(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)};var regexpUnicodeSupport=false;try{new RegExp("￿","u");regexpUnicodeSupport=true}catch(e){}pp.readRegexp=function(){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;var mods=this.readWord1();var tmp=content;if(mods){var validFlags=/^[gmsiy]*$/;if(this.options.ecmaVersion>=6)validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))this.raise(start,"Invalid regular expression flag");if(mods.indexOf("u")>=0&&!regexpUnicodeSupport){tmp=tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x")}}try{new RegExp(tmp)}catch(e){if(e instanceof SyntaxError)this.raise(start,"Error parsing regular expression: "+e.message);this.raise(e)}var value=undefined;try{value=new RegExp(content,mods)}catch(err){value=null}return this.finishToken(_tokentype.types.regexp,{pattern:content,flags:mods,value:value})};pp.readInt=function(radix,len){var start=this.pos,total=0;for(var i=0,e=len==null?Infinity:len;i=97)val=code-97+10;else if(code>=65)val=code-65+10;else if(code>=48&&code<=57)val=code-48;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;var val=this.readInt(radix);if(val==null)this.raise(this.start+2,"Expected number in radix "+radix);if((0,_identifier.isIdentifierStart)(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(_tokentype.types.num,val)};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");if(this.input.charCodeAt(this.pos)===46){++this.pos;this.readInt(10);isFloat=true}var next=this.input.charCodeAt(this.pos);if(next===69||next===101){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((0,_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)};pp.readCodePoint=function(){var ch=this.input.charCodeAt(this.pos),code=undefined;if(ch===123){if(this.options.ecmaVersion<6)this.unexpected();++this.pos;code=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(code>1114111)this.unexpected()}else{code=this.readHexChar(4)}return code};function codePointToString(code){if(code<=65535)return String.fromCharCode(code);return String.fromCharCode((code-65536>>10)+55296,(code-65536&1023)+56320)}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();chunkStart=this.pos}else{if((0,_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)};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();chunkStart=this.pos}else if((0,_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}}};pp.readEscapedChar=function(){var ch=this.input.charCodeAt(++this.pos);var octal=/^[0-7]+/.exec(this.input.slice(this.pos,this.pos+3));if(octal)octal=octal[0];while(octal&&parseInt(octal,8)>255)octal=octal.slice(0,-1);if(octal==="0")octal=null;++this.pos;if(octal){if(this.strict)this.raise(this.pos-2,"Octal literal in strict mode");this.pos+=octal.length-1;return String.fromCharCode(parseInt(octal,8))}else{switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return" ";case 102:return"\f";case 48:return"\x00";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations){this.lineStart=this.pos;++this.curLine}return"";default:return String.fromCharCode(ch)}}};pp.readHexChar=function(len){var n=this.readInt(16,len);if(n===null)this.raise(this.start,"Bad character escape sequence");return n};var containsEsc;pp.readWord1=function(){containsEsc=false;var word="",first=true,chunkStart=this.pos;var astral=this.options.ecmaVersion>=6;while(this.pos=6||!containsEsc)&&this.isKeyword(word))type=_tokentype.keywords[word];return this.finishToken(type,word)}},{"./identifier":4,"./location":6,"./state":12,"./tokentype":16,"./whitespace":18}],16:[function(require,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=function TokenType(label){var conf=arguments[1]===undefined?{}:arguments[1];_classCallCheck(this,TokenType);this.label=label;this.keyword=conf.keyword;this.beforeExpr=!!conf.beforeExpr;this.startsExpr=!!conf.startsExpr;this.rightAssociative=!!conf.rightAssociative;this.isLoop=!!conf.isLoop;this.isAssign=!!conf.isAssign;this.prefix=!!conf.prefix;this.postfix=!!conf.postfix;this.binop=conf.binop||null;this.updateContext=null};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"),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),doubleColon: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}),at:new TokenType("@"),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),exponent:new TokenType("**",{beforeExpr:true,binop:11,rightAssociative:true})};exports.types=types;var keywords={};exports.keywords=keywords;function kw(name){var options=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");kw("do",{isLoop: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("let");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("yield",{beforeExpr:true,startsExpr:true});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})},{}],17:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isArray=isArray;exports.has=has;function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function has(obj,propName){return Object.prototype.hasOwnProperty.call(obj,propName)}},{}],18:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isNewLine=isNewLine;var lineBreak=/\r\n?|\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===8232||code==8233}var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;exports.nonASCIIwhitespace=nonASCIIwhitespace},{}],19:[function(require,module,exports){(function(global){"use strict";require("./node");var transform=module.exports=require("../transformation");transform.options=require("../transformation/file/options");transform.version=require("../../../package").version;transform.transform=transform;transform.run=function(code){var opts=arguments[1]===undefined?{}:arguments[1];opts.sourceMaps="inline";return new Function(transform(code,opts).code)()};transform.load=function(url,callback,_x2,hold){var opts=arguments[2]===undefined?{}:arguments[2];opts.filename=opts.filename||url;var xhr=global.ActiveXObject?new global.ActiveXObject("Microsoft.XMLHTTP"):new global.XMLHttpRequest;xhr.open("GET",url,true);if("overrideMimeType"in xhr)xhr.overrideMimeType("text/plain");xhr.onreadystatechange=function(){if(xhr.readyState!==4)return;var status=xhr.status;if(status===0||status===200){var param=[xhr.responseText,opts];if(!hold)transform.run.apply(transform,param);if(callback)callback(param)}else{throw new Error("Could not load "+url)}};xhr.send(null)};var runScripts=function runScripts(){var scripts=[];var types=["text/ecmascript-6","text/6to5","text/babel","module"];var index=0;var exec=function exec(){var param=scripts[index];if(param instanceof Array){transform.run.apply(transform,param);index++;exec()}};var run=function run(script,i){var opts={};if(script.src){transform.load(script.src,function(param){scripts[i]=param;exec()},opts,true)}else{opts.filename="embedded";scripts[i]=[script.innerHTML,opts]}};var _scripts=global.document.getElementsByTagName("script");for(var i=0;i<_scripts.length;++i){var _script=_scripts[i];if(types.indexOf(_script.type)>=0)scripts.push(_script)}for(i in scripts){run(scripts[i],i)}exec()};if(global.addEventListener){global.addEventListener("DOMContentLoaded",runScripts,false)}else if(global.attachEvent){global.attachEvent("onload",runScripts)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../../../package":507,"../transformation":71,"../transformation/file/options":56,"./node":20}],20:[function(require,module,exports){"use strict";exports.__esModule=true;exports.register=register;exports.polyfill=polyfill;exports.transformFile=transformFile;exports.transformFileSync=transformFileSync;exports.parse=parse;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsFunction=require("lodash/lang/isFunction");var _lodashLangIsFunction2=_interopRequireDefault(_lodashLangIsFunction);var _transformation=require("../transformation");var _transformation2=_interopRequireDefault(_transformation);var _acorn=require("../../acorn");var acorn=_interopRequireWildcard(_acorn);var _util=require("../util");var util=_interopRequireWildcard(_util);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("../types");var t=_interopRequireWildcard(_types);exports.util=util;exports.acorn=acorn;exports.transform=_transformation2["default"];exports.pipeline=_transformation.pipeline;exports.canCompile=_util.canCompile;var _transformationFileOptions=require("../transformation/file/options");exports.options=_interopRequire(_transformationFileOptions);var _transformationTransformer=require("../transformation/transformer");exports.Transformer=_interopRequire(_transformationTransformer);var _transformationTransformerPipeline=require("../transformation/transformer-pipeline");exports.TransformerPipeline=_interopRequire(_transformationTransformerPipeline);var _traversal=require("../traversal");exports.traverse=_interopRequire(_traversal);var _toolsBuildExternalHelpers=require("../tools/build-external-helpers");exports.buildExternalHelpers=_interopRequire(_toolsBuildExternalHelpers);var _package=require("../../../package");exports.version=_package.version;exports.types=t;function register(opts){var callback=require("./register/node-polyfill");if(opts!=null)callback(opts);return callback}function polyfill(){require("../polyfill")}function transformFile(filename,opts,callback){if((0,_lodashLangIsFunction2["default"])(opts)){callback=opts;opts={}}opts.filename=filename;_fs2["default"].readFile(filename,function(err,code){if(err)return callback(err);var result;try{result=(0,_transformation2["default"])(code,opts)}catch(err){return callback(err)}callback(null,result)})}function transformFileSync(filename){var opts=arguments[1]===undefined?{}:arguments[1];opts.filename=filename;return(0,_transformation2["default"])(_fs2["default"].readFileSync(filename,"utf8"),opts)}function parse(code){var opts=arguments[1]===undefined?{}:arguments[1];opts.allowHashBang=true;opts.sourceType="module";opts.ecmaVersion=Infinity;opts.plugins={jsx:true,flow:true};opts.features={};for(var key in _transformation2["default"].pipeline.transformers){opts.features[key]=true}return acorn.parse(code,opts)}},{"../../../package":507,"../../acorn":1,"../polyfill":50,"../tools/build-external-helpers":51,"../transformation":71,"../transformation/file/options":56,"../transformation/transformer":85,"../transformation/transformer-pipeline":84,"../traversal":159,"../types":182,"../util":186,"./register/node-polyfill":22,fs:202,"lodash/lang/isFunction":421}],21:[function(require,module,exports){"use strict";exports.__esModule=true;require("../../polyfill");exports["default"]=function(){};module.exports=exports["default"]},{"../../polyfill":50}],22:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}require("../../polyfill");var _node=require("./node");exports["default"]=_interopRequire(_node);module.exports=exports["default"]},{"../../polyfill":50,"./node":21}],23:[function(require,module,exports){"use strict";exports.__esModule=true;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")}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _trimRight=require("trim-right");var _trimRight2=_interopRequireDefault(_trimRight);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var Buffer=function(){function Buffer(position,format){_classCallCheck(this,Buffer);this.position=position;this._indent=format.indent.base;this.format=format;this.buf=""}Buffer.prototype.get=function get(){return(0,_trimRight2["default"])(this.buf)};Buffer.prototype.getIndent=function getIndent(){if(this.format.compact||this.format.concise){return""}else{return(0,_repeating2["default"])(this.format.indent.style,this._indent)}};Buffer.prototype.indentSize=function indentSize(){return this.getIndent().length};Buffer.prototype.indent=function indent(){this._indent++};Buffer.prototype.dedent=function dedent(){this._indent--};Buffer.prototype.semicolon=function semicolon(){this.push(";")};Buffer.prototype.ensureSemicolon=function ensureSemicolon(){if(!this.isLast(";"))this.semicolon()};Buffer.prototype.rightBrace=function rightBrace(){this.newline(true);this.push("}")};Buffer.prototype.keyword=function keyword(name){this.push(name);this.space()};Buffer.prototype.space=function space(){if(this.format.compact)return;if(this.buf&&!this.isLast(" ")&&!this.isLast("\n")){this.push(" ")}};Buffer.prototype.removeLast=function removeLast(cha){if(this.format.compact)return;if(!this.isLast(cha))return;this.buf=this.buf.substr(0,this.buf.length-1);this.position.unshift(cha)};Buffer.prototype.newline=function newline(i,removeLast){if(this.format.compact||this.format.retainLines)return;if(this.format.concise){this.space();return}removeLast=removeLast||false;if((0,_lodashLangIsNumber2["default"])(i)){i=Math.min(2,i);if(this.endsWith("{\n")||this.endsWith(":\n"))i--;if(i<=0)return;while(i>0){this._newline(removeLast);i--}return}if((0,_lodashLangIsBoolean2["default"])(i)){removeLast=i}this._newline(removeLast)};Buffer.prototype._newline=function _newline(removeLast){if(this.endsWith("\n\n"))return;if(removeLast&&this.isLast("\n"))this.removeLast("\n");this.removeLast(" ");this._removeSpacesAfterLastNewline();this._push("\n")};Buffer.prototype._removeSpacesAfterLastNewline=function _removeSpacesAfterLastNewline(){var lastNewlineIndex=this.buf.lastIndexOf("\n");if(lastNewlineIndex===-1){return}var index=this.buf.length-1;while(index>lastNewlineIndex){if(this.buf[index]!==" "){break}index--}if(index===lastNewlineIndex){this.buf=this.buf.substring(0,index+1)}};Buffer.prototype.push=function push(str,noIndent){if(!this.format.compact&&this._indent&&!noIndent&&str!=="\n"){var indent=this.getIndent();str=str.replace(/\n/g,"\n"+indent);if(this.isLast("\n"))this._push(indent)}this._push(str)};Buffer.prototype._push=function _push(str){this.position.push(str);this.buf+=str};Buffer.prototype.endsWith=function endsWith(str){return this.buf.slice(-str.length)===str};Buffer.prototype.isLast=function isLast(cha){if(this.format.compact)return false;var buf=this.buf;var last=buf[buf.length-1];if(Array.isArray(cha)){return(0,_lodashCollectionIncludes2["default"])(cha,last)}else{return cha===last}};return Buffer}();exports["default"]=Buffer;module.exports=exports["default"]},{"lodash/collection/includes":345,"lodash/lang/isBoolean":419,"lodash/lang/isNumber":423,repeating:489,"trim-right":506}],24:[function(require,module,exports){"use strict";exports.__esModule=true;exports.File=File;exports.Program=Program;exports.BlockStatement=BlockStatement;exports.Noop=Noop;function File(node,print){print.plain(node.program)}function Program(node,print){print.sequence(node.body)}function BlockStatement(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();print.sequence(node.body,{indent:true});if(!this.format.retainLines)this.removeLast("\n");this.rightBrace()}}function Noop(){}},{}],25:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ClassDeclaration=ClassDeclaration;exports.ClassBody=ClassBody;exports.ClassProperty=ClassProperty;exports.MethodDefinition=MethodDefinition;function ClassDeclaration(node,print){print.list(node.decorators);this.push("class");if(node.id){this.push(" ");print.plain(node.id)}print.plain(node.typeParameters);if(node.superClass){this.push(" extends ");print.plain(node.superClass);print.plain(node.superTypeParameters)}if(node["implements"]){this.push(" implements ");print.join(node["implements"],{separator:", "})}this.space();print.plain(node.body)}exports.ClassExpression=ClassDeclaration;function ClassBody(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();this.indent();print.sequence(node.body);this.dedent();this.rightBrace()}}function ClassProperty(node,print){print.list(node.decorators);if(node["static"])this.push("static ");print.plain(node.key);print.plain(node.typeAnnotation);if(node.value){this.space();this.push("=");this.space();print.plain(node.value)}this.semicolon()}function MethodDefinition(node,print){print.list(node.decorators);if(node["static"]){this.push("static ")}this._method(node,print)}},{}],26:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ComprehensionBlock=ComprehensionBlock;exports.ComprehensionExpression=ComprehensionExpression;function ComprehensionBlock(node,print){this.keyword("for");this.push("(");print.plain(node.left);this.push(" of ");print.plain(node.right);this.push(")")}function ComprehensionExpression(node,print){this.push(node.generator?"(":"[");print.join(node.blocks,{separator:" "});this.space();if(node.filter){this.keyword("if");this.push("(");print.plain(node.filter);this.push(")");this.space()}print.plain(node.body);this.push(node.generator?")":"]")}},{}],27:[function(require,module,exports){"use strict";exports.__esModule=true;exports.UnaryExpression=UnaryExpression;exports.DoExpression=DoExpression;exports.UpdateExpression=UpdateExpression;exports.ConditionalExpression=ConditionalExpression;exports.NewExpression=NewExpression;exports.SequenceExpression=SequenceExpression;exports.ThisExpression=ThisExpression;exports.Super=Super;exports.Decorator=Decorator;exports.CallExpression=CallExpression;exports.EmptyStatement=EmptyStatement;exports.ExpressionStatement=ExpressionStatement;exports.AssignmentExpression=AssignmentExpression;exports.BindExpression=BindExpression;exports.MemberExpression=MemberExpression;exports.MetaProperty=MetaProperty;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _isInteger=require("is-integer");var _isInteger2=_interopRequireDefault(_isInteger);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var _types=require("../../types");var t=_interopRequireWildcard(_types);function UnaryExpression(node,print){var hasSpace=/[a-z]$/.test(node.operator);var arg=node.argument;if(t.isUpdateExpression(arg)||t.isUnaryExpression(arg)){hasSpace=true}if(t.isUnaryExpression(arg)&&arg.operator==="!"){hasSpace=false}this.push(node.operator);if(hasSpace)this.push(" ");print.plain(node.argument)}function DoExpression(node,print){this.push("do");this.space();print.plain(node.body)}function UpdateExpression(node,print){if(node.prefix){this.push(node.operator);print.plain(node.argument)}else{print.plain(node.argument);this.push(node.operator)}}function ConditionalExpression(node,print){print.plain(node.test);this.space();this.push("?");this.space();print.plain(node.consequent);this.space();this.push(":");this.space();print.plain(node.alternate)}function NewExpression(node,print){this.push("new ");print.plain(node.callee);this.push("(");print.list(node.arguments);this.push(")")}function SequenceExpression(node,print){print.list(node.expressions)}function ThisExpression(){this.push("this")}function Super(){this.push("super")}function Decorator(node,print){this.push("@");print.plain(node.expression)}function CallExpression(node,print){print.plain(node.callee);this.push("(");var separator=",";var isPrettyCall=node._prettyCall&&!this.format.retainLines;if(isPrettyCall){separator+="\n";this.newline();this.indent()}else{separator+=" "}print.list(node.arguments,{separator:separator});if(isPrettyCall){this.newline();this.dedent()}this.push(")")}var buildYieldAwait=function buildYieldAwait(keyword){return function(node,print){this.push(keyword);if(node.delegate||node.all){this.push("*")}if(node.argument){this.push(" ");print.plain(node.argument)}}};var YieldExpression=buildYieldAwait("yield");exports.YieldExpression=YieldExpression;var AwaitExpression=buildYieldAwait("await");exports.AwaitExpression=AwaitExpression;function EmptyStatement(){this.semicolon()}function ExpressionStatement(node,print){print.plain(node.expression);this.semicolon()}function AssignmentExpression(node,print){print.plain(node.left);this.push(" ");this.push(node.operator);this.push(" ");print.plain(node.right)}function BindExpression(node,print){print.plain(node.object);this.push("::");print.plain(node.callee)}exports.BinaryExpression=AssignmentExpression;exports.LogicalExpression=AssignmentExpression;exports.AssignmentPattern=AssignmentExpression;var SCIENTIFIC_NOTATION=/e/i;function MemberExpression(node,print){var obj=node.object;print.plain(obj);if(!node.computed&&t.isMemberExpression(node.property)){throw new TypeError("Got a MemberExpression for MemberExpression property")}var computed=node.computed;if(t.isLiteral(node.property)&&(0,_lodashLangIsNumber2["default"])(node.property.value)){computed=true}if(computed){this.push("[");print.plain(node.property);this.push("]")}else{if(t.isLiteral(obj)&&(0,_isInteger2["default"])(obj.value)&&!SCIENTIFIC_NOTATION.test(obj.value.toString())){this.push(".")}this.push(".");print.plain(node.property)}}function MetaProperty(node,print){print.plain(node.meta);this.push(".");print.plain(node.property)}},{"../../types":182,"is-integer":330,"lodash/lang/isNumber":423}],28:[function(require,module,exports){"use strict";exports.__esModule=true;exports.AnyTypeAnnotation=AnyTypeAnnotation;exports.ArrayTypeAnnotation=ArrayTypeAnnotation;exports.BooleanTypeAnnotation=BooleanTypeAnnotation;exports.DeclareClass=DeclareClass;exports.DeclareFunction=DeclareFunction;exports.DeclareModule=DeclareModule;exports.DeclareVariable=DeclareVariable;exports.FunctionTypeAnnotation=FunctionTypeAnnotation;exports.FunctionTypeParam=FunctionTypeParam;exports.InterfaceExtends=InterfaceExtends;exports._interfaceish=_interfaceish;exports.InterfaceDeclaration=InterfaceDeclaration;exports.IntersectionTypeAnnotation=IntersectionTypeAnnotation;exports.MixedTypeAnnotation=MixedTypeAnnotation;exports.NullableTypeAnnotation=NullableTypeAnnotation;exports.NumberTypeAnnotation=NumberTypeAnnotation;exports.StringLiteralTypeAnnotation=StringLiteralTypeAnnotation;exports.StringTypeAnnotation=StringTypeAnnotation;exports.TupleTypeAnnotation=TupleTypeAnnotation;exports.TypeofTypeAnnotation=TypeofTypeAnnotation;exports.TypeAlias=TypeAlias;exports.TypeAnnotation=TypeAnnotation;exports.TypeParameterInstantiation=TypeParameterInstantiation;exports.ObjectTypeAnnotation=ObjectTypeAnnotation;exports.ObjectTypeCallProperty=ObjectTypeCallProperty;exports.ObjectTypeIndexer=ObjectTypeIndexer;exports.ObjectTypeProperty=ObjectTypeProperty;exports.QualifiedTypeIdentifier=QualifiedTypeIdentifier;exports.UnionTypeAnnotation=UnionTypeAnnotation;exports.TypeCastExpression=TypeCastExpression;exports.VoidTypeAnnotation=VoidTypeAnnotation;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function AnyTypeAnnotation(){this.push("any")}function ArrayTypeAnnotation(node,print){print.plain(node.elementType);this.push("[");this.push("]")}function BooleanTypeAnnotation(node){this.push("bool")}function DeclareClass(node,print){this.push("declare class ");this._interfaceish(node,print)}function DeclareFunction(node,print){this.push("declare function ");print.plain(node.id);print.plain(node.id.typeAnnotation.typeAnnotation);this.semicolon()}function DeclareModule(node,print){this.push("declare module ");print.plain(node.id);this.space();print.plain(node.body)}function DeclareVariable(node,print){this.push("declare var ");print.plain(node.id);print.plain(node.id.typeAnnotation);this.semicolon()}function FunctionTypeAnnotation(node,print,parent){print.plain(node.typeParameters);this.push("(");print.list(node.params);if(node.rest){if(node.params.length){this.push(",");this.space()}this.push("...");print.plain(node.rest)}this.push(")");if(parent.type==="ObjectTypeProperty"||parent.type==="ObjectTypeCallProperty"||parent.type==="DeclareFunction"){this.push(":")}else{this.space();this.push("=>")}this.space();print.plain(node.returnType)}function FunctionTypeParam(node,print){print.plain(node.name);if(node.optional)this.push("?");this.push(":");this.space();print.plain(node.typeAnnotation)}function InterfaceExtends(node,print){print.plain(node.id);print.plain(node.typeParameters)}exports.ClassImplements=InterfaceExtends;exports.GenericTypeAnnotation=InterfaceExtends;function _interfaceish(node,print){print.plain(node.id);print.plain(node.typeParameters);if(node["extends"].length){this.push(" extends ");print.join(node["extends"],{separator:", "})}this.space();print.plain(node.body)}function InterfaceDeclaration(node,print){this.push("interface ");this._interfaceish(node,print)}function IntersectionTypeAnnotation(node,print){print.join(node.types,{separator:" & "})}function MixedTypeAnnotation(){this.push("mixed")}function NullableTypeAnnotation(node,print){this.push("?");print.plain(node.typeAnnotation)}function NumberTypeAnnotation(){this.push("number")}function StringLiteralTypeAnnotation(node){this._stringLiteral(node.value)}function StringTypeAnnotation(){this.push("string")}function TupleTypeAnnotation(node,print){this.push("[");print.join(node.types,{separator:", "});this.push("]")}function TypeofTypeAnnotation(node,print){this.push("typeof ");print.plain(node.argument)}function TypeAlias(node,print){this.push("type ");print.plain(node.id);print.plain(node.typeParameters);this.space();this.push("=");this.space();print.plain(node.right);this.semicolon()}function TypeAnnotation(node,print){this.push(":");this.space();if(node.optional)this.push("?");print.plain(node.typeAnnotation)}function TypeParameterInstantiation(node,print){this.push("<");print.join(node.params,{separator:", "});this.push(">")}exports.TypeParameterDeclaration=TypeParameterInstantiation;function ObjectTypeAnnotation(node,print){var _this=this;this.push("{");var props=node.properties.concat(node.callProperties,node.indexers);if(props.length){this.space();print.list(props,{separator:false,indent:true,iterator:function iterator(){if(props.length!==1){_this.semicolon();_this.space()}}});this.space()}this.push("}")}function ObjectTypeCallProperty(node,print){if(node["static"])this.push("static ");print.plain(node.value)}function ObjectTypeIndexer(node,print){if(node["static"])this.push("static ");this.push("[");print.plain(node.id);this.push(":");this.space();print.plain(node.key);this.push("]");this.push(":");this.space();print.plain(node.value)}function ObjectTypeProperty(node,print){if(node["static"])this.push("static ");print.plain(node.key);if(node.optional)this.push("?");if(!t.isFunctionTypeAnnotation(node.value)){this.push(":");this.space()}print.plain(node.value)}function QualifiedTypeIdentifier(node,print){print.plain(node.qualification);this.push(".");print.plain(node.id)}function UnionTypeAnnotation(node,print){print.join(node.types,{separator:" | "})}function TypeCastExpression(node,print){this.push("(");print.plain(node.expression);print.plain(node.typeAnnotation);this.push(")")}function VoidTypeAnnotation(node){this.push("void")}},{"../../types":182}],29:[function(require,module,exports){"use strict";exports.__esModule=true;exports.JSXAttribute=JSXAttribute;exports.JSXIdentifier=JSXIdentifier;exports.JSXNamespacedName=JSXNamespacedName;exports.JSXMemberExpression=JSXMemberExpression;exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXExpressionContainer=JSXExpressionContainer;exports.JSXElement=JSXElement;exports.JSXOpeningElement=JSXOpeningElement;exports.JSXClosingElement=JSXClosingElement;exports.JSXEmptyExpression=JSXEmptyExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj; - - return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function JSXAttribute(node,print){print.plain(node.name);if(node.value){this.push("=");print.plain(node.value)}}function JSXIdentifier(node){this.push(node.name)}function JSXNamespacedName(node,print){print.plain(node.namespace);this.push(":");print.plain(node.name)}function JSXMemberExpression(node,print){print.plain(node.object);this.push(".");print.plain(node.property)}function JSXSpreadAttribute(node,print){this.push("{...");print.plain(node.argument);this.push("}")}function JSXExpressionContainer(node,print){this.push("{");print.plain(node.expression);this.push("}")}function JSXElement(node,print){var open=node.openingElement;print.plain(open);if(open.selfClosing)return;this.indent();var _arr=node.children;for(var _i=0;_i<_arr.length;_i++){var child=_arr[_i];if(t.isLiteral(child)){this.push(child.value,true)}else{print.plain(child)}}this.dedent();print.plain(node.closingElement)}function JSXOpeningElement(node,print){this.push("<");print.plain(node.name);if(node.attributes.length>0){this.push(" ");print.join(node.attributes,{separator:" "})}this.push(node.selfClosing?" />":">")}function JSXClosingElement(node,print){this.push("")}function JSXEmptyExpression(){}},{"../../types":182}],30:[function(require,module,exports){"use strict";exports.__esModule=true;exports._params=_params;exports._method=_method;exports.FunctionExpression=FunctionExpression;exports.ArrowFunctionExpression=ArrowFunctionExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function _params(node,print){var _this=this;print.plain(node.typeParameters);this.push("(");print.list(node.params,{iterator:function iterator(node){if(node.optional)_this.push("?");print.plain(node.typeAnnotation)}});this.push(")");if(node.returnType){print.plain(node.returnType)}}function _method(node,print){var value=node.value;var kind=node.kind;var key=node.key;if(kind==="method"||kind==="init"){if(value.generator){this.push("*")}}if(kind==="get"||kind==="set"){this.push(kind+" ")}if(value.async)this.push("async ");if(node.computed){this.push("[");print.plain(key);this.push("]")}else{print.plain(key)}this._params(value,print);this.push(" ");print.plain(value.body)}function FunctionExpression(node,print){if(node.async)this.push("async ");this.push("function");if(node.generator)this.push("*");if(node.id){this.push(" ");print.plain(node.id)}else{this.space()}this._params(node,print);this.space();print.plain(node.body)}exports.FunctionDeclaration=FunctionExpression;function ArrowFunctionExpression(node,print){if(node.async)this.push("async ");if(node.params.length===1&&t.isIdentifier(node.params[0])){print.plain(node.params[0])}else{this._params(node,print)}this.push(" => ");var bodyNeedsParens=t.isObjectExpression(node.body);if(bodyNeedsParens){this.push("(")}print.plain(node.body);if(bodyNeedsParens){this.push(")")}}},{"../../types":182}],31:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ImportSpecifier=ImportSpecifier;exports.ImportDefaultSpecifier=ImportDefaultSpecifier;exports.ExportDefaultSpecifier=ExportDefaultSpecifier;exports.ExportSpecifier=ExportSpecifier;exports.ExportNamespaceSpecifier=ExportNamespaceSpecifier;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ImportDeclaration=ImportDeclaration;exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);function ImportSpecifier(node,print){print.plain(node.imported);if(node.local&&node.local.name!==node.imported.name){this.push(" as ");print.plain(node.local)}}function ImportDefaultSpecifier(node,print){print.plain(node.local)}function ExportDefaultSpecifier(node,print){print.plain(node.exported)}function ExportSpecifier(node,print){print.plain(node.local);if(node.exported&&node.local.name!==node.exported.name){this.push(" as ");print.plain(node.exported)}}function ExportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.exported)}function ExportAllDeclaration(node,print){this.push("export *");if(node.exported){this.push(" as ");print.plain(node.exported)}this.push(" from ");print.plain(node.source);this.semicolon()}function ExportNamedDeclaration(node,print){this.push("export ");ExportDeclaration.call(this,node,print)}function ExportDefaultDeclaration(node,print){this.push("export default ");ExportDeclaration.call(this,node,print)}function ExportDeclaration(node,print){var specifiers=node.specifiers;if(node.declaration){var declar=node.declaration;print.plain(declar);if(t.isStatement(declar)||t.isFunction(declar)||t.isClass(declar))return}else{var first=specifiers[0];var hasSpecial=false;if(t.isExportDefaultSpecifier(first)||t.isExportNamespaceSpecifier(first)){hasSpecial=true;print.plain(specifiers.shift());if(specifiers.length){this.push(", ")}}if(specifiers.length||!specifiers.length&&!hasSpecial){this.push("{");if(specifiers.length){this.space();print.join(specifiers,{separator:", "});this.space()}this.push("}")}if(node.source){this.push(" from ");print.plain(node.source)}}this.ensureSemicolon()}function ImportDeclaration(node,print){this.push("import ");if(node.isType){this.push("type ")}var specfiers=node.specifiers;if(specfiers&&specfiers.length){var first=node.specifiers[0];if(t.isImportDefaultSpecifier(first)||t.isImportNamespaceSpecifier(first)){print.plain(node.specifiers.shift());if(node.specifiers.length){this.push(", ")}}if(node.specifiers.length){this.push("{");this.space();print.join(node.specifiers,{separator:", "});this.space();this.push("}")}this.push(" from ")}print.plain(node.source);this.semicolon()}function ImportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.local)}},{"../../types":182}],32:[function(require,module,exports){"use strict";exports.__esModule=true;exports.WithStatement=WithStatement;exports.IfStatement=IfStatement;exports.ForStatement=ForStatement;exports.WhileStatement=WhileStatement;exports.DoWhileStatement=DoWhileStatement;exports.LabeledStatement=LabeledStatement;exports.TryStatement=TryStatement;exports.CatchClause=CatchClause;exports.ThrowStatement=ThrowStatement;exports.SwitchStatement=SwitchStatement;exports.SwitchCase=SwitchCase;exports.DebuggerStatement=DebuggerStatement;exports.VariableDeclaration=VariableDeclaration;exports.VariableDeclarator=VariableDeclarator;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _types=require("../../types");var t=_interopRequireWildcard(_types);function WithStatement(node,print){this.keyword("with");this.push("(");print.plain(node.object);this.push(")");print.block(node.body)}function IfStatement(node,print){this.keyword("if");this.push("(");print.plain(node.test);this.push(")");this.space();print.indentOnComments(node.consequent);if(node.alternate){if(this.isLast("}"))this.space();this.push("else ");print.indentOnComments(node.alternate)}}function ForStatement(node,print){this.keyword("for");this.push("(");print.plain(node.init);this.push(";");if(node.test){this.push(" ");print.plain(node.test)}this.push(";");if(node.update){this.push(" ");print.plain(node.update)}this.push(")");print.block(node.body)}function WhileStatement(node,print){this.keyword("while");this.push("(");print.plain(node.test);this.push(")");print.block(node.body)}var buildForXStatement=function buildForXStatement(op){return function(node,print){this.keyword("for");this.push("(");print.plain(node.left);this.push(" "+op+" ");print.plain(node.right);this.push(")");print.block(node.body)}};var ForInStatement=buildForXStatement("in");exports.ForInStatement=ForInStatement;var ForOfStatement=buildForXStatement("of");exports.ForOfStatement=ForOfStatement;function DoWhileStatement(node,print){this.push("do ");print.plain(node.body);this.space();this.keyword("while");this.push("(");print.plain(node.test);this.push(");")}var buildLabelStatement=function buildLabelStatement(prefix,key){return function(node,print){this.push(prefix);var label=node[key||"label"];if(label){this.push(" ");print.plain(label)}this.semicolon()}};var ContinueStatement=buildLabelStatement("continue");exports.ContinueStatement=ContinueStatement;var ReturnStatement=buildLabelStatement("return","argument");exports.ReturnStatement=ReturnStatement;var BreakStatement=buildLabelStatement("break");exports.BreakStatement=BreakStatement;function LabeledStatement(node,print){print.plain(node.label);this.push(": ");print.plain(node.body)}function TryStatement(node,print){this.keyword("try");print.plain(node.block);this.space();if(node.handlers){print.plain(node.handlers[0])}else{print.plain(node.handler)}if(node.finalizer){this.space();this.push("finally ");print.plain(node.finalizer)}}function CatchClause(node,print){this.keyword("catch");this.push("(");print.plain(node.param);this.push(") ");print.plain(node.body)}function ThrowStatement(node,print){this.push("throw ");print.plain(node.argument);this.semicolon()}function SwitchStatement(node,print){this.keyword("switch");this.push("(");print.plain(node.discriminant);this.push(")");this.space();this.push("{");print.sequence(node.cases,{indent:true,addNewlines:function addNewlines(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}});this.push("}")}function SwitchCase(node,print){if(node.test){this.push("case ");print.plain(node.test);this.push(":")}else{this.push("default:")}if(node.consequent.length){this.newline();print.sequence(node.consequent,{indent:true})}}function DebuggerStatement(){this.push("debugger;")}function VariableDeclaration(node,print,parent){this.push(node.kind+" ");var hasInits=false;if(!t.isFor(parent)){var _arr=node.declarations;for(var _i=0;_i<_arr.length;_i++){var declar=_arr[_i];if(declar.init){hasInits=true}}}var sep=",";if(!this.format.compact&&!this.format.concise&&hasInits&&!this.format.retainLines){sep+="\n"+(0,_repeating2["default"])(" ",node.kind.length+1)}else{sep+=" "}print.list(node.declarations,{separator:sep});if(t.isFor(parent)){if(parent.left===node||parent.init===node)return}this.semicolon()}function VariableDeclarator(node,print){print.plain(node.id);print.plain(node.id.typeAnnotation);if(node.init){this.space();this.push("=");this.space();print.plain(node.init)}}},{"../../types":182,repeating:489}],33:[function(require,module,exports){"use strict";exports.__esModule=true;exports.TaggedTemplateExpression=TaggedTemplateExpression;exports.TemplateElement=TemplateElement;exports.TemplateLiteral=TemplateLiteral;function TaggedTemplateExpression(node,print){print.plain(node.tag);print.plain(node.quasi)}function TemplateElement(node){this._push(node.value.raw)}function TemplateLiteral(node,print){this.push("`");var quasis=node.quasis;var len=quasis.length;for(var i=0;i0)this.push(" ");print.plain(elem);if(i1e5;if(format.compact){console.error("[BABEL] "+messages.get("codeGeneratorDeopt",opts.filename,"100KB"))}}return format};CodeGenerator.findCommonStringDelimiter=function findCommonStringDelimiter(code,tokens){var occurences={single:0,"double":0};var checked=0;for(var i=0;i=3)break}if(occurences.single>occurences.double){return"single"}else{return"double"}};CodeGenerator.prototype.generate=function generate(){var ast=this.ast;this.print(ast);if(ast.comments){var comments=[];var _arr=ast.comments;for(var _i=0;_i<_arr.length;_i++){var comment=_arr[_i];if(!comment._displayed)comments.push(comment)}this._printComments(comments)}return{map:this.map.get(),code:this.buffer.get()}};CodeGenerator.prototype.buildPrint=function buildPrint(parent){return new _nodePrinter2["default"](this,parent)};CodeGenerator.prototype.catchUp=function catchUp(node,parent,leftParenPrinted){if(node.loc&&this.format.retainLines&&this.buffer.buf){var needsParens=false;if(!leftParenPrinted&&parent&&this.position.line","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(tier,i){(0,_lodashCollectionEach2["default"])(tier,function(op){PRECEDENCE[op]=i})});function NullableTypeAnnotation(node,parent){return t.isArrayTypeAnnotation(parent)}exports.FunctionTypeAnnotation=NullableTypeAnnotation;function UpdateExpression(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}}function ObjectExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function Binary(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node){return true}}}function BinaryExpression(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}}function SequenceExpression(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}return true}function YieldExpression(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)||t.isConditionalExpression(parent)||t.isYieldExpression(parent)}function ClassExpression(node,parent){return t.isExpressionStatement(parent)}function UnaryLike(node,parent){return t.isMemberExpression(parent)&&parent.object===node}function FunctionExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isCallExpression(parent)&&parent.callee===node){return true}}function ConditionalExpression(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isCallExpression(parent)||t.isNewExpression(parent)){if(parent.callee===node){return true}}if(t.isConditionalExpression(parent)&&parent.test===node){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function AssignmentExpression(node){ - if(t.isObjectPattern(node.left)){return true}else{return ConditionalExpression.apply(undefined,arguments)}}},{"../../types":182,"lodash/collection/each":343}],38:[function(require,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 NodePrinter=function(){function NodePrinter(generator,parent){_classCallCheck(this,NodePrinter);this.generator=generator;this.parent=parent}NodePrinter.prototype.plain=function plain(node,opts){return this.generator.print(node,this.parent,opts)};NodePrinter.prototype.sequence=function sequence(nodes){var opts=arguments[1]===undefined?{}:arguments[1];opts.statement=true;return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.join=function join(nodes,opts){return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.list=function list(items){var opts=arguments[1]===undefined?{}:arguments[1];if(opts.separator==null)opts.separator=", ";return this.join(items,opts)};NodePrinter.prototype.block=function block(node){return this.generator.printBlock(this,node)};NodePrinter.prototype.indentOnComments=function indentOnComments(node){return this.generator.printAndIndentOnComments(this,node)};return NodePrinter}();exports["default"]=NodePrinter;module.exports=exports["default"]},{}],39:[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashCollectionMap=require("lodash/collection/map");var _lodashCollectionMap2=_interopRequireDefault(_lodashCollectionMap);var _types=require("../../types");var t=_interopRequireWildcard(_types);function crawl(node){var state=arguments[1]===undefined?{}:arguments[1];if(t.isMemberExpression(node)){crawl(node.object,state);if(node.computed)crawl(node.property,state)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){crawl(node.left,state);crawl(node.right,state)}else if(t.isCallExpression(node)){state.hasCall=true;crawl(node.callee,state)}else if(t.isFunction(node)){state.hasFunction=true}else if(t.isIdentifier(node)){state.hasHelper=state.hasHelper||isHelper(node.callee)}return state}function isHelper(node){if(t.isMemberExpression(node)){return isHelper(node.object)||isHelper(node.property)}else if(t.isIdentifier(node)){return node.name==="require"||node.name[0]==="_"}else if(t.isCallExpression(node)){return isHelper(node.callee)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){return t.isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)}else{return false}}function isType(node){return t.isLiteral(node)||t.isObjectExpression(node)||t.isArrayExpression(node)||t.isIdentifier(node)||t.isMemberExpression(node)}exports.nodes={AssignmentExpression:function AssignmentExpression(node){var state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction){return{before:state.hasFunction,after:true}}},SwitchCase:function SwitchCase(node,parent){return{before:node.consequent.length||parent.cases[0]===node}},LogicalExpression:function LogicalExpression(node){if(t.isFunction(node.left)||t.isFunction(node.right)){return{after:true}}},Literal:function Literal(node){if(node.value==="use strict"){return{after:true}}},CallExpression:function CallExpression(node){if(t.isFunction(node.callee)||isHelper(node)){return{before:true,after:true}}},VariableDeclaration:function VariableDeclaration(node){for(var i=0;i=max){i-=max}return i}var Whitespace=function(){function Whitespace(tokens){_classCallCheck(this,Whitespace);this.tokens=tokens;this.used={};this._lastFoundIndex=0}Whitespace.prototype.getNewlinesBefore=function getNewlinesBefore(node){var startToken;var endToken;var tokens=this.tokens;for(var j=0;j")}}).join("\n")};module.exports=exports["default"]},{chalk:230,esutils:327,"js-tokens":333,"line-numbers":335,repeating:489}],44:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashObjectMerge=require("lodash/object/merge");var _lodashObjectMerge2=_interopRequireDefault(_lodashObjectMerge);exports["default"]=function(dest,src){if(!dest||!src)return;return(0,_lodashObjectMerge2["default"])(dest,src,function(a,b){if(Array.isArray(a)){var c=a.slice(0);for(var _iterator=b,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var v=_ref;if(a.indexOf(v)<0){c.push(v)}}return c}})};module.exports=exports["default"]},{"lodash/object/merge":436}],45:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../types");var t=_interopRequireWildcard(_types);exports["default"]=function(ast,comments,tokens){if(ast&&ast.type==="Program"){return t.file(ast,comments||[],tokens||[])}else{throw new Error("Not a valid ast?")}};module.exports=exports["default"]},{"../types":182}],46:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]=function(){return Object.create(null)};module.exports=exports["default"]},{}],47:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _normalizeAst=require("./normalize-ast");var _normalizeAst2=_interopRequireDefault(_normalizeAst);var _estraverse=require("estraverse");var _estraverse2=_interopRequireDefault(_estraverse);var _acorn=require("../../acorn");var acorn=_interopRequireWildcard(_acorn);exports["default"]=function(code){var opts=arguments[1]===undefined?{}:arguments[1];var commentsAndTokens=[];var comments=[];var tokens=[];var parseOpts={allowImportExportEverywhere:opts.looseModules,allowReturnOutsideFunction:opts.looseModules,allowHashBang:true,ecmaVersion:6,strictMode:opts.strictMode,sourceType:opts.sourceType,locations:true,features:opts.features||{},plugins:opts.plugins||{},onToken:tokens,ranges:true};parseOpts.onToken=function(token){tokens.push(token);commentsAndTokens.push(token)};parseOpts.onComment=function(block,text,start,end,startLoc,endLoc){var comment={type:block?"CommentBlock":"CommentLine",value:text,start:start,end:end,loc:new acorn.SourceLocation(this,startLoc,endLoc),range:[start,end]};commentsAndTokens.push(comment);comments.push(comment)};if(opts.nonStandard){parseOpts.plugins.jsx=true;parseOpts.plugins.flow=true}var ast=acorn.parse(code,parseOpts);_estraverse2["default"].attachComments(ast,comments,tokens);ast=(0,_normalizeAst2["default"])(ast,comments,commentsAndTokens);return ast};module.exports=exports["default"]},{"../../acorn":1,"./normalize-ast":45,estraverse:322}],48:[function(require,module,exports){"use strict";exports.__esModule=true;exports.get=get;exports.parseArgs=parseArgs;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _util=require("util");var util=_interopRequireWildcard(_util);var MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned so it's probably be dereferenced so we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",classesIllegalConstructorKind:"Illegal kind for constructor method",scopeDuplicateDeclaration:"Duplicate declaration $1",settersInvalidParamLength:"Setters must have exactly one parameter",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemeberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",modulesIllegalExportName:"Illegal export $1",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this nodes position, likely because the AST was directly manipulated",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"Must pass a scope and parentPath unless traversing a Program/File got a $1 node",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginIllegalKind:"Illegal kind $1 for plugin $2",pluginIllegalPosition:"Illegal position $1 for plugin $2",pluginKeyCollision:"The plugin $1 collides with another of the same name",pluginNotTransformer:"The plugin $1 didn't export a Transformer instance",pluginUnknown:"Unknown plugin $1",transformerNotFile:"Transformer $1 is resolving to a different Babel version to what is doing the actual transformation..."};exports.MESSAGES=MESSAGES;function get(key){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var msg=MESSAGES[key];if(!msg)throw new ReferenceError("Unknown message "+JSON.stringify(key));args=parseArgs(args);return msg.replace(/\$(\d+)/g,function(str,i){return args[--i]})}function parseArgs(args){return args.map(function(val){if(val!=null&&val.inspect){return val.inspect()}else{try{return JSON.stringify(val)||val+""}catch(e){return util.inspect(val)}}})}},{util:229}],49:[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _estraverse=require("estraverse");var _estraverse2=_interopRequireDefault(_estraverse);var _lodashObjectExtend=require("lodash/object/extend");var _lodashObjectExtend2=_interopRequireDefault(_lodashObjectExtend);var _astTypes=require("ast-types");var _astTypes2=_interopRequireDefault(_astTypes);var _types=require("./types");var t=_interopRequireWildcard(_types);(0,_lodashObjectExtend2["default"])(_estraverse2["default"].VisitorKeys,t.VISITOR_KEYS);var def=_astTypes2["default"].Type.def;var or=_astTypes2["default"].Type.or;def("Noop");def("AssignmentPattern").bases("Pattern").build("left","right").field("left",def("Pattern")).field("right",def("Expression"));def("RestElement").bases("Pattern").build("argument").field("argument",def("expression"));def("DoExpression").bases("Expression").build("body").field("body",[def("Statement")]);def("Super").bases("Expression");def("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null));def("ExportNamedDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"))]).field("source",or(def("ModuleSpecifier"),null));def("ExportNamespaceSpecifier").bases("Specifier").field("exported",def("Identifier"));def("ExportDefaultSpecifier").bases("Specifier").field("exported",def("Identifier"));def("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",def("Identifier")).field("source",def("Literal"));def("BindExpression").bases("Expression").build("object","callee").field("object",or(def("Expression"),null)).field("callee",def("Expression"));_astTypes2["default"].finalize()},{"./types":182,"ast-types":201,estraverse:322,"lodash/object/extend":432}],50:[function(require,module,exports){(function(global){"use strict";require("core-js/shim");require("regenerator/runtime");if(global._babelPolyfill){throw new Error("only one instance of babel/polyfill is allowed")}global._babelPolyfill=true}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"core-js/shim":315,"regenerator/runtime":482}],51:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _generation=require("../generation");var _generation2=_interopRequireDefault(_generation);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../util");var util=_interopRequireWildcard(_util);var _transformationFile=require("../transformation/file");var _transformationFile2=_interopRequireDefault(_transformationFile);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _types=require("../types");var t=_interopRequireWildcard(_types);function buildGlobal(namespace,builder){var body=[];var container=t.functionExpression(null,[t.identifier("global")],t.blockStatement(body));var tree=t.program([t.expressionStatement(t.callExpression(container,[util.template("helper-self-global")]))]);body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.assignmentExpression("=",t.memberExpression(t.identifier("global"),namespace),t.objectExpression([])))]));builder(body);return tree}function buildUmd(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.identifier("global"))]));builder(body);var container=util.template("umd-commonjs-strict",{FACTORY_PARAMETERS:t.identifier("global"),BROWSER_ARGUMENTS:t.assignmentExpression("=",t.memberExpression(t.identifier("root"),namespace),t.objectExpression({})),COMMON_ARGUMENTS:t.identifier("exports"),AMD_ARGUMENTS:t.arrayExpression([t.literal("exports")]),FACTORY_BODY:body,UMD_ROOT:t.identifier("this")});return t.program([container])}function buildVar(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.objectExpression({}))]));builder(body);return t.program(body)}function buildHelpers(body,namespace,whitelist){(0,_lodashCollectionEach2["default"])(_transformationFile2["default"].helpers,function(name){if(whitelist&&whitelist.indexOf(name)===-1)return;var key=t.identifier(t.toIdentifier(name));body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(namespace,key),util.template("helper-"+name))))})}exports["default"]=function(whitelist){var outputType=arguments[1]===undefined?"global":arguments[1];var namespace=t.identifier("babelHelpers");var builder=function builder(body){return buildHelpers(body,namespace,whitelist)};var tree;var build={global:buildGlobal,umd:buildUmd,"var":buildVar}[outputType];if(build){tree=build(namespace,builder)}else{throw new Error(messages.get("unsupportedOutputType",outputType))}return(0,_generation2["default"])(tree).code};module.exports=exports["default"]},{"../generation":35,"../messages":48,"../transformation/file":53,"../types":182,"../util":186,"lodash/collection/each":343}],52:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _stripJsonComments=require("strip-json-comments");var _stripJsonComments2=_interopRequireDefault(_stripJsonComments);var _helpersMerge=require("../helpers/merge");var _helpersMerge2=_interopRequireDefault(_helpersMerge);var _path=require("path");var _path2=_interopRequireDefault(_path);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var cache={};var jsons={};function exists(filename){if(!_fs2["default"].existsSync)return false;var cached=cache[filename];if(cached!=null)return cached;return cache[filename]=_fs2["default"].existsSync(filename)}exports["default"]=function(loc){var opts=arguments[1]===undefined?{}:arguments[1];var rel=".babelrc";if(!opts.babelrc){opts.babelrc=[]}function find(start,rel){var file=_path2["default"].join(start,rel);if(opts.babelrc.indexOf(file)>=0){return}if(exists(file)){var content=_fs2["default"].readFileSync(file,"utf8");var json;try{json=jsons[content]=jsons[content]||JSON.parse((0,_stripJsonComments2["default"])(content))}catch(err){err.message=""+file+": "+err.message;throw err}opts.babelrc.push(file);if(json.breakConfig)return;(0,_helpersMerge2["default"])(opts,json)}var up=_path2["default"].dirname(start);if(up!==start){find(up,rel)}}if(opts.babelrc.indexOf(loc)<0&&opts.breakConfig!==true){find(loc,rel)}return opts};module.exports=exports["default"]},{"../helpers/merge":44,fs:202,path:212,"strip-json-comments":504}],53:[function(require,module,exports){(function(process){"use strict";exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=0)continue;var group=pass.transformer.metadata.group;if(!pass.canTransform()||!group){stack.push(pass);continue}var mergeStack=[];var _arr4=_stack;for(var _i4=0;_i4<_arr4.length;_i4++){var _pass=_arr4[_i4];if(_pass.transformer.metadata.group===group){mergeStack.push(_pass);ignore.push(_pass)}}var visitors=[];var _arr5=mergeStack;for(var _i5=0;_i5<_arr5.length;_i5++){var _pass2=_arr5[_i5];visitors.push(_pass2.handlers)}var visitor=_traversal2["default"].visitors.merge(visitors);var mergeTransformer=new _transformer2["default"](group,visitor);stack.push(mergeTransformer.buildPass(this))}return stack};File.prototype.set=function set(key,val){return this.data[key]=val};File.prototype.setDynamic=function setDynamic(key,fn){this.dynamicData[key]=fn};File.prototype.get=function get(key){var data=this.data[key];if(data){return data}else{var dynamic=this.dynamicData[key];if(dynamic){return this.set(key,dynamic())}}};File.prototype.resolveModuleSource=function resolveModuleSource(source){var resolveModuleSource=this.opts.resolveModuleSource;if(resolveModuleSource)source=resolveModuleSource(source,this.opts.filename);return source};File.prototype.addImport=function addImport(source,name,type){name=name||source;var id=this.dynamicImportIds[name];if(!id){source=this.resolveModuleSource(source);id=this.dynamicImportIds[name]=this.scope.generateUidIdentifier(name);var specifiers=[t.importDefaultSpecifier(id)];var declar=t.importDeclaration(specifiers,t.literal(source));declar._blockHoist=3;if(type){var modules=this.dynamicImportTypes[type]=this.dynamicImportTypes[type]||[];modules.push(declar)}if(this.transformers["es6.modules"].canTransform()){this.moduleFormatter.importSpecifier(specifiers[0],declar,this.dynamicImports);this.moduleFormatter.hasLocalImports=true}else{this.dynamicImports.push(declar)}}return id};File.prototype.attachAuxiliaryComment=function attachAuxiliaryComment(node){var comment=this.opts.auxiliaryComment;if(comment){node.leadingComments=node.leadingComments||[];node.leadingComments.push({type:"CommentLine",value:" "+comment})}return node};File.prototype.addHelper=function addHelper(name){var isSolo=(0,_lodashCollectionIncludes2["default"])(File.soloHelpers,name);if(!isSolo&&!(0,_lodashCollectionIncludes2["default"])(File.helpers,name)){throw new ReferenceError("Unknown helper "+name)}var declar=this.declarations[name];if(declar)return declar;this.usedHelpers[name]=true;if(!isSolo){var generator=this.get("helperGenerator");var runtime=this.get("helpersNamespace");if(generator){return generator(name)}else if(runtime){var id=t.identifier(t.toIdentifier(name));return t.memberExpression(runtime,id)}}var ref=util.template("helper-"+name);var uid=this.declarations[name]=this.scope.generateUidIdentifier(name);if(t.isFunctionExpression(ref)&&!ref.id){ref.body._compact=true;ref._generated=true;ref.id=uid;ref.type="FunctionDeclaration";this.attachAuxiliaryComment(ref);this.path.unshiftContainer("body",ref)}else{ref._compact=true;this.scope.push({id:uid,init:ref,unique:true})}return uid};File.prototype.errorWithNode=function errorWithNode(node,msg){var Error=arguments[2]===undefined?SyntaxError:arguments[2];var err;if(node.loc){var loc=node.loc.start;err=new Error("Line "+loc.line+": "+msg);err.loc=loc}else{err=new Error("There's been an error on a dynamic node. This is almost certainly an internal error. Please report it.")}return err};File.prototype.mergeSourceMap=function mergeSourceMap(map){var opts=this.opts;var inputMap=opts.inputSourceMap;if(inputMap){map.sources[0]=inputMap.file;var inputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(inputMap);var outputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(map);var outputMapGenerator=_sourceMap2["default"].SourceMapGenerator.fromSourceMap(outputMapConsumer);outputMapGenerator.applySourceMap(inputMapConsumer);var mergedMap=outputMapGenerator.toJSON();mergedMap.sources=inputMap.sources;mergedMap.file=inputMap.file;return mergedMap}return map};File.prototype.getModuleFormatter=function getModuleFormatter(type){if((0,_lodashLangIsFunction2["default"])(type)||!_modules2["default"][type]){this.log.deprecate("Custom module formatters are deprecated and will be removed in the next major. Please use Babel plugins instead.")}var ModuleFormatter=(0,_lodashLangIsFunction2["default"])(type)?type:_modules2["default"][type];if(!ModuleFormatter){var loc=util.resolveRelative(type);if(loc)ModuleFormatter=require(loc)}if(!ModuleFormatter){throw new ReferenceError("Unknown module formatter type "+JSON.stringify(type))}return new ModuleFormatter(this)};File.prototype.parse=function parse(code){var opts=this.opts;var parseOpts={highlightCode:opts.highlightCode,nonStandard:opts.nonStandard,filename:opts.filename,plugins:{}};var features=parseOpts.features={};for(var key in this.transformers){var transformer=this.transformers[key];features[key]=transformer.canTransform()}parseOpts.looseModules=this.isLoose("es6.modules");parseOpts.strictMode=features.strict;parseOpts.sourceType="module";this.log.debug("Parse start");var tree=(0,_helpersParse2["default"])(code,parseOpts);this.log.debug("Parse stop");return tree};File.prototype._addAst=function _addAst(ast){this.path=_traversalPath2["default"].get({hub:this.hub,parentPath:null,parent:ast,container:ast,key:"program"}).setContext();this.scope=this.path.scope;this.ast=ast};File.prototype.addAst=function addAst(ast){this.log.debug("Start set AST");this._addAst(ast);this.log.debug("End set AST");this.log.debug("Start module formatter init");var modFormatter=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);if(modFormatter.init&&this.transformers["es6.modules"].canTransform()){modFormatter.init()}this.log.debug("End module formatter init")};File.prototype.transform=function transform(){this.call("pre");var _arr6=this.transformerStack;for(var _i6=0;_i6<_arr6.length;_i6++){var pass=_arr6[_i6];pass.transform()}this.call("post");return this.generate()};File.prototype.wrap=function wrap(code,callback){code=code+"";try{if(this.shouldIgnore()){return this.makeResult({code:code,ignored:true})}else{return callback()}}catch(err){if(err._babel){throw err}else{err._babel=true}var message=err.message=""+this.opts.filename+": "+err.message;var loc=err.loc;if(loc){err.codeFrame=(0,_helpersCodeFrame2["default"])(code,loc.line,loc.column+1,this.opts);message+="\n"+err.codeFrame}if(err.stack){var newStack=err.stack.replace(err.message,message);try{err.stack=newStack}catch(e){}}throw err}};File.prototype.addCode=function addCode(code){code=(code||"")+"";code=this.parseInputSourceMap(code);this.code=code};File.prototype.parseCode=function parseCode(){this.parseShebang();this.addAst(this.parse(this.code))};File.prototype.shouldIgnore=function shouldIgnore(){var opts=this.opts;return util.shouldIgnore(opts.filename,opts.ignore,opts.only)};File.prototype.call=function call(key){var _arr7=this.uncollapsedTransformerStack;for(var _i7=0;_i7<_arr7.length;_i7++){var pass=_arr7[_i7];var fn=pass.transformer[key];if(fn)fn(this)}};File.prototype.parseInputSourceMap=function parseInputSourceMap(code){var opts=this.opts;if(opts.inputSourceMap!==false){var inputMap=_convertSourceMap2["default"].fromSource(code);if(inputMap){opts.inputSourceMap=inputMap.toObject();code=_convertSourceMap2["default"].removeComments(code)}}return code};File.prototype.parseShebang=function parseShebang(){var shebangMatch=_shebangRegex2["default"].exec(this.code);if(shebangMatch){this.shebang=shebangMatch[0];this.code=this.code.replace(_shebangRegex2["default"],"")}};File.prototype.makeResult=function makeResult(_ref){var code=_ref.code;var _ref$map=_ref.map;var map=_ref$map===undefined?null:_ref$map;var ast=_ref.ast;var ignored=_ref.ignored;var result={metadata:null,ignored:!!ignored,code:null,ast:null,map:map};if(this.opts.code){result.code=code}if(this.opts.ast){result.ast=ast}if(this.opts.metadata){result.metadata=this.metadata;result.metadata.usedHelpers=Object.keys(this.usedHelpers)}return result};File.prototype.generate=function generate(){var opts=this.opts;var ast=this.ast;var result={ast:ast};if(!opts.code)return this.makeResult(result);this.log.debug("Generation start");var _result=(0,_generation2["default"])(ast,opts,this.code);result.code=_result.code;result.map=_result.map;this.log.debug("Generation end");if(this.shebang){result.code=""+this.shebang+"\n"+result.code}if(result.map){result.map=this.mergeSourceMap(result.map)}if(opts.sourceMaps==="inline"||opts.sourceMaps==="both"){result.code+="\n"+_convertSourceMap2["default"].fromObject(result.map).toComment()}if(opts.sourceMaps==="inline"){result.map=null}return this.makeResult(result)};_createClass(File,null,[{key:"helpers",value:["inherits","defaults","create-class","create-decorated-class","create-decorated-object","define-decorated-property-descriptor","tagged-template-literal","tagged-template-literal-loose","to-array","to-consumable-array","sliced-to-array","sliced-to-array-loose","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-require-wildcard","interop-require-default","typeof","extends","get","set","class-call-check","object-destructuring-empty","temporal-undefined","temporal-assert-defined","self-global","default-props","instanceof","interop-require"],enumerable:true},{key:"soloHelpers",value:[],enumerable:true},{key:"options",value:require("./options"),enumerable:true}]);return File}();exports["default"]=File;module.exports=exports["default"]}).call(this,require("_process"))},{"../../generation":35,"../../helpers/code-frame":43,"../../helpers/merge":44,"../../helpers/parse":47,"../../tools/resolve-rc":52,"../../traversal":159,"../../traversal/hub":158,"../../traversal/path":166,"../../types":182,"../../util":186,"../modules":79,"../transformer":85,"./logger":54,"./option-parsers":55,"./options":56,"./plugin-manager":57,_process:213,"convert-source-map":238,"lodash/collection/includes":345,"lodash/lang/clone":415,"lodash/lang/isFunction":421,"lodash/object/assign":430,"lodash/object/defaults":431,path:212,"path-is-absolute":447,"shebang-regex":491,slash:492,"source-map":493}],54:[function(require,module,exports){"use strict";exports.__esModule=true;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")}}var _debugNode=require("debug/node");var _debugNode2=_interopRequireDefault(_debugNode);var verboseDebug=(0,_debugNode2["default"])("babel:verbose");var generalDebug=(0,_debugNode2["default"])("babel");var Logger=function(){function Logger(file,filename){_classCallCheck(this,Logger);this.filename=filename;this.file=file}Logger.prototype._buildMessage=function _buildMessage(msg){var parts="[BABEL] "+this.filename;if(msg)parts+=": "+msg;return parts};Logger.prototype.warn=function warn(msg){console.warn(this._buildMessage(msg))};Logger.prototype.error=function error(msg){var Constructor=arguments[1]===undefined?Error:arguments[1];throw new Constructor(this._buildMessage(msg))};Logger.prototype.deprecate=function deprecate(msg){if(!this.file.opts.suppressDeprecationMessages){console.error(this._buildMessage(msg))}};Logger.prototype.verbose=function verbose(msg){if(verboseDebug.enabled)verboseDebug(this._buildMessage(msg))};Logger.prototype.debug=function debug(msg){if(generalDebug.enabled)generalDebug(this._buildMessage(msg))};Logger.prototype.deopt=function deopt(node,msg){this.debug(msg)};return Logger}();exports["default"]=Logger;module.exports=exports["default"]},{"debug/node":317}],55:[function(require,module,exports){"use strict";exports.__esModule=true;exports.transformerList=transformerList;exports.number=number;exports.boolean=boolean;exports.booleanString=booleanString;exports.list=list;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _util=require("../../util");var util=_interopRequireWildcard(_util);function transformerList(key,val,pipeline){val=util.arrayify(val);if(val.indexOf("all")>=0||val.indexOf(true)>=0){val=Object.keys(pipeline.transformers)}return pipeline._ensureTransformerNames(key,val)}function number(key,val){return+val}function boolean(key,val){return!!val}function booleanString(key,val){return util.booleanify(val)}function list(key,val){return util.list(val)}},{"../../util":186}],56:[function(require,module,exports){module.exports={filename:{type:"string",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:true,type:"string"},inputSourceMap:{hidden:true},extra:{hidden:true,"default":{}},env:{hidden:true,"default":{}},moduleId:{description:"specify a custom name for module ids",type:"string"},getModuleId:{hidden:true},retainLines:{type:"boolean","default":false,description:"retain line numbers - will result in really ugly code"},nonStandard:{type:"boolean","default":true,description:"enable/disable support for JSX and Flow (on by default)"},experimental:{type:"boolean",description:"allow use of experimental transformers","default":false},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean","default":true},suppressDeprecationMessages:{type:"boolean","default":false,hidden:true},resolveModuleSource:{hidden:true},stage:{description:"ECMAScript proposal stage version to allow [0-4]",shorthand:"e",type:"number","default":2},blacklist:{type:"transformerList",description:"blacklist of transformers to NOT use",shorthand:"b"},whitelist:{type:"transformerList",optional:true,description:"whitelist of transformers to ONLY use",shorthand:"l"},optional:{type:"transformerList",description:"list of optional transformers to enable"},modules:{type:"string",description:"module formatter type to use [common]","default":"common",shorthand:"m"},moduleIds:{type:"boolean","default":false,shorthand:"M",description:"insert an explicit id for modules"},loose:{type:"transformerList",description:"list of transformers to enable loose mode ON",shorthand:"L"},jsxPragma:{type:"string",description:"custom pragma to use with JSX (same functionality as @jsx comments)","default":"React.createElement",shorthand:"P"},plugins:{type:"list",description:""},ignore:{type:"list",description:"list of glob paths to **not** compile"},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:true,"default":true,type:"boolean"},metadata:{hidden:true,"default":true,type:"boolean"},ast:{hidden:true,"default":true,type:"boolean"},comments:{type:"boolean","default":true,description:"strip/output comments in generated output (on by default)"},compact:{type:"booleanString","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},keepModuleIdExtensions:{type:"boolean",description:"keep extensions when generating module ids","default":false,shorthand:"k"},auxiliaryComment:{type:"string","default":"",shorthand:"a",description:"attach a comment before all helper declarations and auxiliary code"},externalHelpers:{type:"boolean","default":false,shorthand:"r",description:"uses a reference to `babelHelpers` instead of placing helpers at the top of your code."},metadataUsedHelpers:{deprecated:"Not required anymore as this is enabled by default",type:"boolean","default":false,hidden:true},sourceMap:{alias:"sourceMaps",hidden:true},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":false,shorthand:"s"},sourceMapName:{alias:"sourceMapTarget",description:"DEPRECATED - Please use sourceMapTarget"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"string",description:"the root from which all sources are relative"},moduleRoot:{type:"string",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},breakConfig:{type:"boolean","default":false,hidden:true,description:"stop trying to load .babelrc files"},babelrc:{hidden:true,description:"do not load the same .babelrc file twice"}}},{}],57:[function(require,module,exports){"use strict";exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=3){callExpr._prettyCall=true}return t.inherits(callExpr,node)}};var addDisplayName=function addDisplayName(id,call){var props=call.arguments[0].properties;var safe=true;for(var i=0;i=0}function pullFlag(node,flag){var flags=node.regex.flags.split("");if(node.regex.flags.indexOf(flag)<0)return;(0,_lodashArrayPull2["default"])(flags,flag);node.regex.flags=flags.join("")}},{"../../types":182,"lodash/array/pull":340}],69:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);var awaitVisitor={Function:function Function(){this.skip()},AwaitExpression:function AwaitExpression(node){node.type="YieldExpression";if(node.all){node.all=false;node.argument=t.callExpression(t.memberExpression(t.identifier("Promise"),t.identifier("all")),[node.argument])}}};var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){var name=state.id.name;if(node.name===name&&scope.bindingIdentifierEquals(name,state.id)){return state.ref=state.ref||scope.generateUidIdentifier(name)}}};exports["default"]=function(path,callId){var node=path.node;node.async=false;node.generator=true;path.traverse(awaitVisitor,state);var call=t.callExpression(callId,[node]);var id=node.id;node.id=null;if(t.isFunctionDeclaration(node)){var declar=t.variableDeclaration("let",[t.variableDeclarator(id,call)]);declar._blockHoist=true;return declar}else{if(id){var state={id:id};path.traverse(referenceVisitor,state);if(state.ref){path.scope.parent.push({id:state.ref});return t.assignmentExpression("=",state.ref,call)}}return call}};module.exports=exports["default"]},{"../../types":182}],70:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../../types");var t=_interopRequireWildcard(_types);function isIllegalBareSuper(node,parent){if(!t.isSuper(node))return false;if(t.isMemberExpression(parent,{computed:false}))return false;if(t.isCallExpression(parent,{callee:node}))return false;return true}function isMemberExpressionSuper(node){return t.isMemberExpression(node)&&t.isSuper(node.object)}var visitor={enter:function enter(node,parent,scope,state){var topLevel=state.topLevel;var self=state.self;if(t.isFunction(node)&&!t.isArrowFunctionExpression(node)){self.traverseLevel(this,false);return this.skip()}if(t.isProperty(node,{method:true})||t.isMethodDefinition(node)){return this.skip()}var getThisReference=topLevel?t.thisExpression:self.getThisReference.bind(self);var callback=self.specHandle;if(self.isLoose)callback=self.looseHandle;var result=callback.call(self,this,getThisReference);if(result)this.hasSuper=true;if(result===true)return;return result}};var ReplaceSupers=function(){function ReplaceSupers(opts){var inClass=arguments[1]===undefined?false:arguments[1];_classCallCheck(this,ReplaceSupers);this.topLevelThisReference=opts.topLevelThisReference;this.methodPath=opts.methodPath;this.methodNode=opts.methodNode;this.superRef=opts.superRef;this.isStatic=opts.isStatic;this.hasSuper=false;this.inClass=inClass;this.isLoose=opts.isLoose;this.scope=opts.scope;this.file=opts.file;this.opts=opts}ReplaceSupers.prototype.getObjectRef=function getObjectRef(){return this.opts.objectRef||this.opts.getObjectRef()};ReplaceSupers.prototype.setSuperProperty=function setSuperProperty(property,value,isComputed,thisExpression){return t.callExpression(this.file.addHelper("set"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),value,thisExpression])};ReplaceSupers.prototype.getSuperProperty=function getSuperProperty(property,isComputed,thisExpression){return t.callExpression(this.file.addHelper("get"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),thisExpression])};ReplaceSupers.prototype.replace=function replace(){this.traverseLevel(this.methodPath.get("value"),true)};ReplaceSupers.prototype.traverseLevel=function traverseLevel(path,topLevel){var state={self:this,topLevel:topLevel};path.traverse(visitor,state)};ReplaceSupers.prototype.getThisReference=function getThisReference(){if(this.topLevelThisReference){return this.topLevelThisReference}else{var ref=this.topLevelThisReference=this.scope.generateUidIdentifier("this");this.methodNode.value.body.body.unshift(t.variableDeclaration("var",[t.variableDeclarator(this.topLevelThisReference,t.thisExpression())]));return ref}};ReplaceSupers.prototype.getLooseSuperProperty=function getLooseSuperProperty(id,parent){var methodNode=this.methodNode;var methodName=methodNode.key;var superRef=this.superRef||t.identifier("Function");if(parent.property===id){return}else if(t.isCallExpression(parent,{callee:id})){parent.arguments.unshift(t.thisExpression());if(methodName.name==="constructor"){return t.memberExpression(superRef,t.identifier("call"))}else{id=superRef;if(!methodNode["static"]){id=t.memberExpression(id,t.identifier("prototype"))}id=t.memberExpression(id,methodName,methodNode.computed);return t.memberExpression(id,t.identifier("call"))}}else if(t.isMemberExpression(parent)&&!methodNode["static"]){return t.memberExpression(superRef,t.identifier("prototype"))}else{return superRef}};ReplaceSupers.prototype.looseHandle=function looseHandle(path,getThisReference){var node=path.node;if(path.isSuper()){return this.getLooseSuperProperty(node,path.parent)}else if(path.isCallExpression()){var callee=node.callee;if(!t.isMemberExpression(callee))return;if(!t.isSuper(callee.object))return;t.appendToMemberExpression(callee,t.identifier("call"));node.arguments.unshift(getThisReference());return true}};ReplaceSupers.prototype.specHandleAssignmentExpression=function specHandleAssignmentExpression(ref,path,node,getThisReference){if(node.operator==="="){return this.setSuperProperty(node.left.property,node.right,node.left.computed,getThisReference())}else{ref=ref||path.scope.generateUidIdentifier("ref");return[t.variableDeclaration("var",[t.variableDeclarator(ref,node.left)]),t.expressionStatement(t.assignmentExpression("=",node.left,t.binaryExpression(node.operator[0],ref,node.right)))]}};ReplaceSupers.prototype.specHandle=function specHandle(path,getThisReference){var methodNode=this.methodNode;var property;var computed;var args;var thisReference;var parent=path.parent;var node=path.node;if(isIllegalBareSuper(node,parent)){throw path.errorWithNode(messages.get("classesIllegalBareSuper"))}if(t.isCallExpression(node)){var callee=node.callee;if(t.isSuper(callee)){property=methodNode.key;computed=methodNode.computed;args=node.arguments;if(methodNode.key.name!=="constructor"||!this.inClass){var methodName=methodNode.key.name||"METHOD_NAME";throw this.file.errorWithNode(node,messages.get("classesIllegalSuperCall",methodName))}}else if(isMemberExpressionSuper(callee)){property=callee.property;computed=callee.computed;args=node.arguments}}else if(t.isMemberExpression(node)&&t.isSuper(node.object)){property=node.property;computed=node.computed}else if(t.isUpdateExpression(node)&&isMemberExpressionSuper(node.argument)){var binary=t.binaryExpression(node.operator[0],node.argument,t.literal(1));if(node.prefix){return this.specHandleAssignmentExpression(null,path,binary,getThisReference)}else{var ref=path.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(ref,path,binary,getThisReference).concat(t.expressionStatement(ref))}}else if(t.isAssignmentExpression(node)&&isMemberExpressionSuper(node.left)){return this.specHandleAssignmentExpression(null,path,node,getThisReference)}if(!property)return;thisReference=getThisReference();var superProperty=this.getSuperProperty(property,computed,thisReference);if(args){if(args.length===1&&t.isSpreadElement(args[0])){return t.callExpression(t.memberExpression(superProperty,t.identifier("apply")),[thisReference,args[0].argument])}else{return t.callExpression(t.memberExpression(superProperty,t.identifier("call")),[thisReference].concat(args))}}else{return superProperty}};return ReplaceSupers}();exports["default"]=ReplaceSupers;module.exports=exports["default"]},{"../../messages":48,"../../types":182}],71:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _transformerPipeline=require("./transformer-pipeline");var _transformerPipeline2=_interopRequireDefault(_transformerPipeline);var _transformers=require("./transformers");var _transformers2=_interopRequireDefault(_transformers);var _transformersDeprecated=require("./transformers/deprecated");var _transformersDeprecated2=_interopRequireDefault(_transformersDeprecated);var _transformersAliases=require("./transformers/aliases");var _transformersAliases2=_interopRequireDefault(_transformersAliases);var _transformersFilters=require("./transformers/filters");var filters=_interopRequireWildcard(_transformersFilters);var pipeline=new _transformerPipeline2["default"];for(var key in _transformers2["default"]){var transformer=_transformers2["default"][key];var metadata=transformer.metadata=transformer.metadata||{};metadata.group=metadata.group||"builtin-basic"}pipeline.addTransformers(_transformers2["default"]);pipeline.addDeprecated(_transformersDeprecated2["default"]);pipeline.addAliases(_transformersAliases2["default"]);pipeline.addFilter(filters.internal);pipeline.addFilter(filters.blacklist);pipeline.addFilter(filters.whitelist);pipeline.addFilter(filters.stage);pipeline.addFilter(filters.optional);var transform=pipeline.transform.bind(pipeline);transform.fromAst=pipeline.transformFromAst.bind(pipeline);transform.pipeline=pipeline;exports["default"]=transform;module.exports=exports["default"]},{"./transformer-pipeline":84,"./transformers":122,"./transformers/aliases":86,"./transformers/deprecated":87,"./transformers/filters":121}],72:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _lodashObjectExtend=require("lodash/object/extend");var _lodashObjectExtend2=_interopRequireDefault(_lodashObjectExtend);var _helpersObject=require("../../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _util=require("../../util");var util=_interopRequireWildcard(_util);var _types=require("../../types");var t=_interopRequireWildcard(_types);var remapVisitor={enter:function enter(node){if(node._skipModulesRemap){return this.skip()}},ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,formatter){var remap=formatter.internalRemap[node.name];if(remap&&node!==remap){if(!scope.hasBinding(node.name)||scope.bindingIdentifierEquals(node.name,formatter.localImports[node.name])){if(this.key==="callee"&&this.parentPath.isCallExpression()){return t.sequenceExpression([t.literal(0),remap])}else{return remap}}}},AssignmentExpression:{exit:function exit(node,parent,scope,formatter){if(!node._ignoreModulesRemap){var exported=formatter.getExport(node.left,scope);if(exported){return formatter.remapExportAssignment(node,exported)}}}},UpdateExpression:function UpdateExpression(node,parent,scope,formatter){var exported=formatter.getExport(node.argument,scope);if(!exported)return;this.skip();var assign=t.assignmentExpression(node.operator[0]+"=",node.argument,t.literal(1));var remapped=formatter.remapExportAssignment(assign,exported);if(t.isExpressionStatement(parent)||node.prefix){return remapped}var nodes=[];nodes.push(remapped);var operator;if(node.operator==="--"){operator="+"}else{operator="-"}nodes.push(t.binaryExpression(operator,node.argument,t.literal(1)));return t.sequenceExpression(nodes)}};var metadataVisitor={ModuleDeclaration:function ModuleDeclaration(node,parent,scope,formatter){if(node.source){node.source.value=formatter.file.resolveModuleSource(node.source.value)}},ImportDeclaration:function ImportDeclaration(node,parent,scope,formatter){formatter.hasLocalImports=true;var specifiers=[];var imported=[];formatter.metadata.imports.push({source:node.source.value,imported:imported,specifiers:specifiers});var _arr=this.get("specifiers");for(var _i=0;_i<_arr.length;_i++){var specifier=_arr[_i];var ids=specifier.getBindingIdentifiers();(0,_lodashObjectExtend2["default"])(formatter.localImports,ids);var local=specifier.node.local.name;if(specifier.isImportDefaultSpecifier()){imported.push("default");specifiers.push({kind:"named",imported:"default",local:local})}if(specifier.isImportSpecifier()){var importedName=specifier.node.imported.name;imported.push(importedName);specifiers.push({kind:"named",imported:importedName,local:local})}if(specifier.isImportNamespaceSpecifier()){imported.push("*");specifiers.push({kind:"namespace",local:local})}}},ExportDeclaration:function ExportDeclaration(node,parent,scope,formatter){formatter.hasLocalExports=true;var source=node.source?node.source.value:null;var exports=formatter.metadata.exports;var declar=this.get("declaration");if(declar.isStatement()){var bindings=declar.getBindingIdentifiers();for(var name in bindings){var binding=bindings[name];formatter._addExport(name,binding);exports.exported.push(name);exports.specifiers.push({kind:"local",local:name,exported:this.isExportDefaultDeclaration()?"default":name})}}if(this.isExportNamedDeclaration()&&node.specifiers){var _arr2=node.specifiers;for(var _i2=0;_i2<_arr2.length;_i2++){var specifier=_arr2[_i2];var exported=specifier.exported.name;exports.exported.push(exported);if(t.isExportDefaultSpecifier(specifier)){exports.specifiers.push({kind:"external",local:exported,exported:exported,source:source})}if(t.isExportNamespaceSpecifier(specifier)){exports.specifiers.push({kind:"external-namespace",exported:exported,source:source})}var local=specifier.local;if(!local)continue;formatter._addExport(local.name,specifier.exported);if(source){exports.specifiers.push({kind:"external",local:local.name,exported:exported,source:source})}if(!source){exports.specifiers.push({kind:"local",local:local.name,exported:exported})}}}if(this.isExportAllDeclaration()){exports.specifiers.push({kind:"external-all",source:source})}if(!t.isExportDefaultDeclaration(node)){var onlyDefault=node.specifiers&&node.specifiers.length===1&&t.isSpecifierDefault(node.specifiers[0]);if(!onlyDefault){formatter.hasNonDefaultExports=true}}},Scope:function Scope(){this.skip()}};var DefaultFormatter=function(){function DefaultFormatter(file){_classCallCheck(this,DefaultFormatter);this.internalRemap=(0,_helpersObject2["default"])();this.defaultIds=(0,_helpersObject2["default"])();this.scope=file.scope;this.file=file;this.ids=(0,_helpersObject2["default"])();this.hasNonDefaultExports=false;this.hasLocalExports=false;this.hasLocalImports=false;this.localExports=(0,_helpersObject2["default"])();this.localImports=(0,_helpersObject2["default"])();this.metadata=file.metadata.modules;this.getMetadata()}DefaultFormatter.prototype.isModuleType=function isModuleType(node,type){var modules=this.file.dynamicImportTypes[type];return modules&&modules.indexOf(node)>=0};DefaultFormatter.prototype.transform=function transform(){this.remapAssignments()};DefaultFormatter.prototype.doDefaultExportInterop=function doDefaultExportInterop(node){return(t.isExportDefaultDeclaration(node)||t.isSpecifierDefault(node))&&!this.noInteropRequireExport&&!this.hasNonDefaultExports};DefaultFormatter.prototype.getMetadata=function getMetadata(){var has=false;var _arr3=this.file.ast.program.body;for(var _i3=0;_i3<_arr3.length;_i3++){var node=_arr3[_i3];if(t.isModuleDeclaration(node)){has=true;break}}if(has)this.file.path.traverse(metadataVisitor,this)};DefaultFormatter.prototype.remapAssignments=function remapAssignments(){if(this.hasLocalExports||this.hasLocalImports){this.file.path.traverse(remapVisitor,this)}};DefaultFormatter.prototype.remapExportAssignment=function remapExportAssignment(node,exported){var assign=node;for(var i=0;i=0){return}loopText=""+loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(state.inSwitchCase)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(this.isReturnStatement()){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);this.skip();return t.inherits(replace,node)}}};var BlockScoping=function(){function BlockScoping(loopPath,blockPath,parent,scope,file){_classCallCheck(this,BlockScoping);this.parent=parent;this.scope=scope;this.file=file;this.blockPath=blockPath;this.block=blockPath.node;this.outsideLetReferences=(0,_helpersObject2["default"])();this.hasLetReferences=false;this.letReferences=this.block._letReferences=(0,_helpersObject2["default"])();this.body=[];if(loopPath){this.loopParent=loopPath.parent;this.loopLabel=t.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=loopPath;this.loop=loopPath.node}}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}if(this.loopLabel&&!t.isLabeledStatement(this.loopParent)){return t.labeledStatement(this.loopLabel,this.loop)}};BlockScoping.prototype.remap=function remap(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=(0,_helpersObject2["default"])();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loop=this.loop;if(loop){traverseReplace(loop.right,loop,scope,remaps);traverseReplace(loop.test,loop,scope,remaps);traverseReplace(loop.update,loop,scope,remaps)}this.blockPath.traverse(replaceVisitor,remaps)};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loop){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=(0,_lodashObjectValues2["default"])(outsideRefs);var args=(0,_lodashObjectValues2["default"])(outsideRefs);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn.shadow=true;this.addContinuations(fn);block.body=this.body;var ref=fn;if(this.loop){ref=this.scope.generateUidIdentifier("loop");this.loopPath.insertBefore(t.variableDeclaration("var",[t.variableDeclarator(ref,fn)]))}var call=t.callExpression(ref,args);var ret=this.scope.generateUidIdentifier("ret");var hasYield=_traversal2["default"].hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=_traversal2["default"].hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call)}this.buildClosure(ret,call)};BlockScoping.prototype.buildClosure=function buildClosure(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.addContinuations=function addContinuations(fn){var state={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(fn,continuationVisitor,state);for(var i=0;i=spreadPropIndex)break;if(t.isSpreadProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key)&&!prop.computed)key=t.literal(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef)}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[objRef])))}if(pattern.properties.length>1&&t.isMemberExpression(objRef)){var temp=this.scope.generateUidIdentifierBasedOnNode(objRef,this.file);this.nodes.push(this.buildVariableDeclaration(temp,objRef));objRef=temp}for(var i=0;iarr.elements.length)return;if(pattern.elements.length0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.literal(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)){var memo=this.scope.maybeGenerateMemoised(ref,true);if(memo){this.nodes.push(this.buildVariableDeclaration(memo,ref));ref=memo}}this.push(pattern,ref);return this.nodes};return DestructuringTransformer}()},{"../../../messages":48,"../../../types":182}],96:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ForOfStatement=ForOfStatement;exports._ForOfStatementArray=_ForOfStatementArray;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _messages=require("../../../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);function ForOfStatement(node,parent,scope,file){if(this.get("right").isArrayExpression()){return _ForOfStatementArray.call(this,node,scope,file)}var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,file);var declar=build.declar;var loop=build.loop;var block=loop.body;t.ensureBlock(node);if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);t.inherits(loop.body,node.body);if(build.replaceParent){this.parentPath.replaceWithMultiple(build.node);this.dangerouslyRemove()}else{return build.node}}function _ForOfStatementArray(node,scope,file){var nodes=[];var right=node.right;if(!t.isIdentifier(right)||!scope.hasBinding(right.name)){var uid=scope.generateUidIdentifier("arr");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,right)]));right=uid}var iterationKey=scope.generateUidIdentifier("i");var loop=util.template("for-of-array",{BODY:node.body,KEY:iterationKey,ARR:right});t.inherits(loop,node);t.ensureBlock(loop);var iterationValue=t.memberExpression(right,iterationKey,true);var left=node.left;if(t.isVariableDeclaration(left)){left.declarations[0].init=iterationValue;loop.body.body.unshift(left)}else{loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=",left,iterationValue)))}if(this.parentPath.isLabeledStatement()){loop=t.labeledStatement(this.parentPath.node.label,loop)}nodes.push(loop);return nodes}var loose=function loose(node,parent,scope,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=util.template("for-of-loose",{LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,node:loop,loop:loop}};var spec=function spec(node,parent,scope,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=util.template("for-of",{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}}},{"../../../messages":48,"../../../types":182,"../../../util":186}],97:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ImportDeclaration=ImportDeclaration;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function keepBlockHoist(node,nodes){if(node._blockHoist){for(var i=0;ilastNonDefaultParam}var lastNonDefaultParam=(0,_helpersGetFunctionArity2["default"])(node);var params=this.get("params");for(var i=0;i",len,start),t.binaryExpression("-",len,start),t.literal(0))}var loop=util.template("rest",{ARRAY_TYPE:restParam.typeAnnotation,ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}},{"../../../types":182,"../../../util":186}],101:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function loose(node,body,objId){for(var i=0;i0){var declarations=(0,_lodashArrayFlatten2["default"])((0,_lodashCollectionMap2["default"])(this.vars,function(decl){return decl.declarations}));var assignment=(0,_lodashCollectionReduceRight2["default"])(declarations,function(expr,decl){return t.assignmentExpression("=",decl.id,expr)},t.identifier("undefined"));var statement=t.expressionStatement(assignment);statement._blockHoist=Infinity;body.unshift(statement)}var paramDecls=this.paramDecls;if(paramDecls.length>0){var paramDecl=t.variableDeclaration("var",paramDecls);paramDecl._blockHoist=Infinity;body.unshift(paramDecl)}body.unshift(t.expressionStatement(t.assignmentExpression("=",this.getAgainId(),t.literal(false))));node.body=util.template("tail-call-body",{FUNCTION_ID:this.getFunctionId(),AGAIN_ID:this.getAgainId(),BLOCK:node.body});var topVars=[];if(this.needsThis){var _arr=this.thisPaths;for(var _i=0;_i<_arr.length;_i++){var path=_arr[_i];path.replaceWith(this.getThisId())}topVars.push(t.variableDeclarator(this.getThisId(),t.thisExpression()))}if(this.needsArguments||this.setsArguments){var _arr2=this.argumentsPaths;for(var _i2=0;_i2<_arr2.length;_i2++){var _path=_arr2[_i2];_path.replaceWith(this.argumentsId)}var decl=t.variableDeclarator(this.argumentsId);if(this.argumentsId){decl.init=t.identifier("arguments");decl.init._shadowedFunctionLiteral=true}topVars.push(decl)}var leftId=this.leftId;if(leftId){topVars.push(t.variableDeclarator(leftId))}if(topVars.length>0){node.body.body.unshift(t.variableDeclaration("var",topVars))}};TailCallTransformer.prototype.subTransform=function subTransform(node){if(!node)return;var handler=this["subTransform"+node.type];if(handler)return handler.call(this,node)};TailCallTransformer.prototype.subTransformConditionalExpression=function subTransformConditionalExpression(node){var callConsequent=this.subTransform(node.consequent);var callAlternate=this.subTransform(node.alternate);if(!callConsequent&&!callAlternate){return}node.type="IfStatement";node.consequent=callConsequent?t.toBlock(callConsequent):returnBlock(node.consequent);if(callAlternate){node.alternate=t.isIfStatement(callAlternate)?callAlternate:t.toBlock(callAlternate)}else{node.alternate=returnBlock(node.alternate)}return[node]};TailCallTransformer.prototype.subTransformLogicalExpression=function subTransformLogicalExpression(node){var callRight=this.subTransform(node.right);if(!callRight)return;var leftId=this.getLeftId();var testExpr=t.assignmentExpression("=",leftId,node.left);if(node.operator==="&&"){testExpr=t.unaryExpression("!",testExpr)}return[t.ifStatement(testExpr,returnBlock(leftId))].concat(callRight)};TailCallTransformer.prototype.subTransformSequenceExpression=function subTransformSequenceExpression(node){var seq=node.expressions;var lastCall=this.subTransform(seq[seq.length-1]);if(!lastCall){return}if(--seq.length===1){node=seq[0]}return[t.expressionStatement(node)].concat(lastCall)};TailCallTransformer.prototype.subTransformCallExpression=function subTransformCallExpression(node){var callee=node.callee;var thisBinding,args;if(t.isMemberExpression(callee,{computed:false})&&t.isIdentifier(callee.property)){switch(callee.property.name){case"call":args=t.arrayExpression(node.arguments.slice(1));break;case"apply":args=node.arguments[1]||t.identifier("undefined");this.needsArguments=true;break;default:return}thisBinding=node.arguments[0];callee=callee.object}if(!t.isIdentifier(callee)||!this.scope.bindingIdentifierEquals(callee.name,this.ownerId)){return}this.hasTailRecursion=true;if(this.hasDeopt())return;var body=[];if(this.needsThis&&!t.isThisExpression(thisBinding)){body.push(t.expressionStatement(t.assignmentExpression("=",this.getThisId(),thisBinding||t.identifier("undefined"))))}if(!args){args=t.arrayExpression(node.arguments)}if(t.isArrayExpression(args)&&args.elements.length>this.node.params.length){this.needsArguments=true}var argumentsId=this.getArgumentsId();var params=this.getParams();if(this.needsArguments){body.push(t.expressionStatement(t.assignmentExpression("=",argumentsId,args)))}if(t.isArrayExpression(args)){var elems=args.elements;for(var i=0;i1){var last=nodes[nodes.length-1];if(t.isLiteral(last,{value:""}))nodes.pop();var root=buildBinaryExpression(nodes.shift(),nodes.shift());var _arr3=nodes;for(var _i3=0;_i3<_arr3.length;_i3++){var _node=_arr3[_i3];root=buildBinaryExpression(root,_node)}this.replaceWith(root)}else{return nodes[0]}}},{"../../../types":182}],111:[function(require,module,exports){"use strict";exports.__esModule=true;var metadata={stage:1};exports.metadata=metadata},{}],112:[function(require,module,exports){"use strict";exports.__esModule=true;var metadata={stage:0,dependencies:["es6.classes"]};exports.metadata=metadata},{}],113:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ComprehensionExpression=ComprehensionExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersBuildComprehension=require("../../helpers/build-comprehension");var _helpersBuildComprehension2=_interopRequireDefault(_helpersBuildComprehension);var _traversal=require("../../../traversal");var _traversal2=_interopRequireDefault(_traversal);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={stage:0};exports.metadata=metadata;function ComprehensionExpression(node,parent,scope,file){var callback=array;if(node.generator)callback=generator;return callback(node,parent,scope)}function generator(node){var body=[];var container=t.functionExpression(null,[],t.blockStatement(body),true);container.shadow=true;body.push((0,_helpersBuildComprehension2["default"])(node,function(){return t.expressionStatement(t.yieldExpression(node.body))}));return t.callExpression(container,[])}function array(node,parent,scope){var uid=scope.generateUidIdentifierBasedOnNode(parent);var container=util.template("array-comprehension-container",{KEY:uid});container.callee.shadow=true;var block=container.callee.body;var body=block.body;if(_traversal2["default"].hasType(node,scope,"YieldExpression",t.FUNCTION_TYPES)){container.callee.generator=true;container=t.yieldExpression(container,true)}var returnStatement=body.pop();body.push((0,_helpersBuildComprehension2["default"])(node,function(){return util.template("array-push",{STATEMENT:node.body,KEY:uid},true)}));body.push(returnStatement);return container}},{"../../../traversal":159,"../../../types":182,"../../../util":186,"../../helpers/build-comprehension":59}],114:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ObjectExpression=ObjectExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersMemoiseDecorators=require("../../helpers/memoise-decorators");var _helpersMemoiseDecorators2=_interopRequireDefault(_helpersMemoiseDecorators);var _helpersDefineMap=require("../../helpers/define-map");var defineMap=_interopRequireWildcard(_helpersDefineMap);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={dependencies:["es6.classes"],optional:true,stage:1};exports.metadata=metadata;function ObjectExpression(node,parent,scope,file){var hasDecorators=false;for(var i=0;i=1){nodes.push(node)}return nodes}},{"../../../types":182}],118:[function(require,module,exports){"use strict";exports.__esModule=true;exports.CallExpression=CallExpression;exports.BindExpression=BindExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={optional:true,stage:0};exports.metadata=metadata;function getTempId(scope){var id=scope.path.getData("functionBind");if(id)return id;id=scope.generateDeclaredUidIdentifier("context");return scope.path.setData("functionBind",id)}function getStaticContext(bind,scope){var object=bind.object||bind.callee.object;return scope.isStatic(object)&&object}function inferBindContext(bind,scope){var staticContext=getStaticContext(bind,scope);if(staticContext)return staticContext;var tempId=getTempId(scope);if(bind.object){bind.callee=t.sequenceExpression([t.assignmentExpression("=",tempId,bind.object),bind.callee])}else{bind.callee.object=t.assignmentExpression("=",tempId,bind.callee.object)}return tempId}function CallExpression(node,parent,scope,file){var bind=node.callee;if(!t.isBindExpression(bind))return;var context=inferBindContext(bind,scope);node.callee=t.memberExpression(bind.callee,t.identifier("call"));node.arguments.unshift(context)}function BindExpression(node,parent,scope,file){var context=inferBindContext(node,scope);return t.callExpression(t.memberExpression(node.callee,t.identifier("bind")),[context])}},{"../../../types":182}],119:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ObjectExpression=ObjectExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={stage:1,dependencies:["es6.destructuring"]};exports.metadata=metadata;var hasSpread=function hasSpread(node){for(var i=0;i=opts.stage)return true}function optional(transformer,opts){if(transformer.metadata.optional&&!(0,_lodashCollectionIncludes2["default"])(opts.optional,transformer.key))return false}},{"lodash/collection/includes":345}],122:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]={"minification.constantFolding":require("./minification/constant-folding"),strict:require("./other/strict"),eval:require("./other/eval"),_explode:require("./internal/explode"),_validation:require("./internal/validation"),_hoistDirectives:require("./internal/hoist-directives"),"minification.removeDebugger":require("./minification/remove-debugger"),"minification.removeConsole":require("./minification/remove-console"),"utility.inlineEnvironmentVariables":require("./utility/inline-environment-variables"),"minification.deadCodeElimination":require("./minification/dead-code-elimination"),_modules:require("./internal/modules"),"spec.functionName":require("./spec/function-name"),"es6.spec.templateLiterals":require("./es6/spec.template-literals"),"es6.templateLiterals":require("./es6/template-literals"),"es7.classProperties":require("./es7/class-properties"),"es7.trailingFunctionCommas":require("./es7/trailing-function-commas"),"es7.asyncFunctions":require("./es7/async-functions"),"es7.decorators":require("./es7/decorators"),"validation.undeclaredVariableCheck":require("./validation/undeclared-variable-check"),"validation.react":require("./validation/react"),"es6.arrowFunctions":require("./es6/arrow-functions"),"spec.blockScopedFunctions":require("./spec/block-scoped-functions"),"optimisation.react.constantElements":require("./optimisation/react.constant-elements"),"optimisation.react.inlineElements":require("./optimisation/react.inline-elements"),"es7.comprehensions":require("./es7/comprehensions"),"es6.classes":require("./es6/classes"),asyncToGenerator:require("./other/async-to-generator"),bluebirdCoroutines:require("./other/bluebird-coroutines"),"es6.objectSuper":require("./es6/object-super"),"es7.objectRestSpread":require("./es7/object-rest-spread"),"es7.exponentiationOperator":require("./es7/exponentiation-operator"),"es5.properties.mutators":require("./es5/properties.mutators"),"es6.properties.shorthand":require("./es6/properties.shorthand"),"es6.properties.computed":require("./es6/properties.computed"),"optimisation.flow.forOf":require("./optimisation/flow.for-of"),"es6.forOf":require("./es6/for-of"),"es6.regex.sticky":require("./es6/regex.sticky"),"es6.regex.unicode":require("./es6/regex.unicode"),"es6.constants":require("./es6/constants"),"es6.parameters.rest":require("./es6/parameters.rest"),"es6.spread":require("./es6/spread"),"es6.parameters.default":require("./es6/parameters.default"),"es7.exportExtensions":require("./es7/export-extensions"),"spec.protoToAssign":require("./spec/proto-to-assign"),"es7.doExpressions":require("./es7/do-expressions"),"es6.spec.symbols":require("./es6/spec.symbols"),"es7.functionBind":require("./es7/function-bind"),"spec.undefinedToVoid":require("./spec/undefined-to-void"),"es6.destructuring":require("./es6/destructuring"),"es6.blockScoping":require("./es6/block-scoping"),"es6.spec.blockScoping":require("./es6/spec.block-scoping"),reactCompat:require("./other/react-compat"),react:require("./other/react"),regenerator:require("./other/regenerator"),runtime:require("./other/runtime"),"es6.modules":require("./es6/modules"),_moduleFormatter:require("./internal/module-formatter"),"es6.tailCall":require("./es6/tail-call"),_shadowFunctions:require("./internal/shadow-functions"),"es3.propertyLiterals":require("./es3/property-literals"),"es3.memberExpressionLiterals":require("./es3/member-expression-literals"),"minification.memberExpressionLiterals":require("./minification/member-expression-literals"),"minification.propertyLiterals":require("./minification/property-literals"),_blockHoist:require("./internal/block-hoist"),jscript:require("./other/jscript"),flow:require("./other/flow")};module.exports=exports["default"]},{"./es3/member-expression-literals":88,"./es3/property-literals":89,"./es5/properties.mutators":90,"./es6/arrow-functions":91,"./es6/block-scoping":92,"./es6/classes":93,"./es6/constants":94,"./es6/destructuring":95,"./es6/for-of":96,"./es6/modules":97,"./es6/object-super":98,"./es6/parameters.default":99,"./es6/parameters.rest":100,"./es6/properties.computed":101,"./es6/properties.shorthand":102,"./es6/regex.sticky":103,"./es6/regex.unicode":104,"./es6/spec.block-scoping":105,"./es6/spec.symbols":106,"./es6/spec.template-literals":107,"./es6/spread":108,"./es6/tail-call":109,"./es6/template-literals":110,"./es7/async-functions":111,"./es7/class-properties":112,"./es7/comprehensions":113,"./es7/decorators":114,"./es7/do-expressions":115,"./es7/exponentiation-operator":116,"./es7/export-extensions":117,"./es7/function-bind":118,"./es7/object-rest-spread":119,"./es7/trailing-function-commas":120,"./internal/block-hoist":123,"./internal/explode":124,"./internal/hoist-directives":125,"./internal/module-formatter":126,"./internal/modules":127,"./internal/shadow-functions":128,"./internal/validation":129,"./minification/constant-folding":130,"./minification/dead-code-elimination":131,"./minification/member-expression-literals":132,"./minification/property-literals":133,"./minification/remove-console":134,"./minification/remove-debugger":135,"./optimisation/flow.for-of":136,"./optimisation/react.constant-elements":137,"./optimisation/react.inline-elements":138,"./other/async-to-generator":139,"./other/bluebird-coroutines":140,"./other/eval":141,"./other/flow":142,"./other/jscript":143,"./other/react":145,"./other/react-compat":144,"./other/regenerator":146,"./other/runtime":148,"./other/strict":149,"./spec/block-scoped-functions":150,"./spec/function-name":151,"./spec/proto-to-assign":152,"./spec/undefined-to-void":153,"./utility/inline-environment-variables":154,"./validation/react":155,"./validation/undeclared-variable-check":156}],123:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashCollectionSortBy=require("lodash/collection/sortBy");var _lodashCollectionSortBy2=_interopRequireDefault(_lodashCollectionSortBy);var metadata={group:"builtin-trailing"};exports.metadata=metadata;var BlockStatement={exit:function exit(node){var hasChange=false;for(var i=0;i1||!binding.constant)return;if(binding.kind==="param"||binding.kind==="module")return;var replacement=binding.path.node;if(t.isVariableDeclarator(replacement)){replacement=replacement.init}if(!replacement)return;if(!scope.isPure(replacement,true))return;if(t.isClass(replacement)||t.isFunction(replacement)){if(binding.path.scope.parent!==scope)return}if(this.findParent(function(path){return path.node===replacement})){return}t.toExpression(replacement);scope.removeBinding(node.name);binding.path.dangerouslyRemove();return replacement}function FunctionDeclaration(node,parent,scope){var bindingInfo=scope.getBinding(node.id.name);if(bindingInfo&&!bindingInfo.referenced){this.dangerouslyRemove()}}exports.ClassDeclaration=FunctionDeclaration;function VariableDeclarator(node,parent,scope){if(!t.isIdentifier(node.id)||!scope.isPure(node.init,true))return;FunctionDeclaration.apply(this,arguments)}function ConditionalExpression(node,parent,scope){var evaluateTest=this.get("test").evaluateTruthy();if(evaluateTest===true){return node.consequent}else if(evaluateTest===false){return node.alternate}}function BlockStatement(node){var paths=this.get("body");var purge=false;for(var i=0;i0){nodePath=nodePath.get(keysAlongPath.pop())}return nodePath}},{"../../../types":182,"ast-types":201,regenerator:455}],147:[function(require,module,exports){module.exports={builtins:{Symbol:"symbol",Promise:"promise",Map:"map",WeakMap:"weak-map",Set:"set",WeakSet:"weak-set"},methods:{Array:{concat:"array/concat",copyWithin:"array/copy-within",entries:"array/entries",every:"array/every",fill:"array/fill",filter:"array/filter",findIndex:"array/find-index",find:"array/find",forEach:"array/for-each",from:"array/from",includes:"array/includes",indexOf:"array/index-of",join:"array/join",keys:"array/keys",lastIndexOf:"array/last-index-of",map:"array/map",of:"array/of",pop:"array/pop",push:"array/push",reduceRight:"array/reduce-right",reduce:"array/reduce",reverse:"array/reverse",shift:"array/shift",slice:"array/slice",some:"array/some",sort:"array/sort",splice:"array/splice",turn:"array/turn",unshift:"array/unshift",values:"array/values"},Object:{assign:"object/assign",classof:"object/classof",create:"object/create",define:"object/define",defineProperties:"object/define-properties",defineProperty:"object/define-property",entries:"object/entries",freeze:"object/freeze",getOwnPropertyDescriptor:"object/get-own-property-descriptor",getOwnPropertyDescriptors:"object/get-own-property-descriptors",getOwnPropertyNames:"object/get-own-property-names",getOwnPropertySymbols:"object/get-own-property-symbols",getPrototypePf:"object/get-prototype-of",index:"object/index",isExtensible:"object/is-extensible",isFrozen:"object/is-frozen",isObject:"object/is-object",isSealed:"object/is-sealed",is:"object/is",keys:"object/keys",make:"object/make",preventExtensions:"object/prevent-extensions",seal:"object/seal",setPrototypeOf:"object/set-prototype-of",values:"object/values"},RegExp:{escape:"regexp/escape"},Function:{only:"function/only",part:"function/part"},Math:{acosh:"math/acosh",asinh:"math/asinh",atanh:"math/atanh",cbrt:"math/cbrt",clz32:"math/clz32",cosh:"math/cosh",expm1:"math/expm1",fround:"math/fround",hypot:"math/hypot",pot:"math/pot",imul:"math/imul",log10:"math/log10",log1p:"math/log1p",log2:"math/log2",sign:"math/sign",sinh:"math/sinh",tanh:"math/tanh",trunc:"math/trunc"},Date:{addLocale:"date/add-locale",formatUTC:"date/format-utc",format:"date/format"},Symbol:{"for":"symbol/for",hasInstance:"symbol/for-instance","is-concat-spreadable":"symbol/is-concat-spreadable",iterator:"symbol/iterator",keyFor:"symbol/key-for",match:"symbol/match",replace:"symbol/replace",search:"symbol/search",species:"symbol/species",split:"symbol/split",toPrimitive:"symbol/to-primitive",toStringTag:"symbol/to-string-tag",unscopables:"symbol/unscopables"},String:{at:"string/at",codePointAt:"string/code-point-at",endsWith:"string/ends-with",escapeHTML:"string/escape-html",fromCodePoint:"string/from-code-point",includes:"string/includes",raw:"string/raw",repeat:"string/repeat",startsWith:"string/starts-with",unescapeHTML:"string/unescape-html"},Number:{EPSILON:"number/epsilon",isFinite:"number/is-finite",isInteger:"number/is-integer",isNaN:"number/is-nan",isSafeInteger:"number/is-safe-integer",MAX_SAFE_INTEGER:"number/max-safe-integer",MIN_SAFE_INTEGER:"number/min-safe-integer",parseFloat:"number/parse-float",parseInt:"number/parse-int",random:"number/random"},Reflect:{apply:"reflect/apply",construct:"reflect/construct",defineProperty:"reflect/define-property",deleteProperty:"reflect/delete-property",enumerate:"reflect/enumerate",getOwnPropertyDescriptor:"reflect/get-own-property-descriptor",getPrototypeOf:"reflect/get-prototype-of",get:"reflect/get",has:"reflect/has",isExtensible:"reflect/is-extensible",ownKeys:"reflect/own-keys",preventExtensions:"reflect/prevent-extensions",setPrototypeOf:"reflect/set-prototype-of",set:"reflect/set"}}}},{}],148:[function(require,module,exports){"use strict";exports.__esModule=true;exports.pre=pre;exports.ReferencedIdentifier=ReferencedIdentifier;exports.CallExpression=CallExpression;exports.BinaryExpression=BinaryExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _types=require("../../../../types");var t=_interopRequireWildcard(_types);var _definitions=require("./definitions");var _definitions2=_interopRequireDefault(_definitions);var RUNTIME_MODULE_NAME="babel-runtime";var metadata={optional:true,group:"builtin-post-modules"};exports.metadata=metadata;function pre(file){file.set("helperGenerator",function(name){return file.addImport(""+RUNTIME_MODULE_NAME+"/helpers/"+name,name,"absoluteDefault")});file.setDynamic("regeneratorIdentifier",function(){return file.addImport(""+RUNTIME_MODULE_NAME+"/regenerator","regeneratorRuntime","absoluteDefault")})}function ReferencedIdentifier(node,parent,scope,file){if(node.name==="regeneratorRuntime"){ - return file.get("regeneratorIdentifier")}if(t.isMemberExpression(parent))return;if(!(0,_lodashObjectHas2["default"])(_definitions2["default"].builtins,node.name))return;if(scope.getBindingIdentifier(node.name))return;var modulePath=_definitions2["default"].builtins[node.name];return file.addImport(""+RUNTIME_MODULE_NAME+"/core-js/"+modulePath,node.name,"absoluteDefault")}function CallExpression(node,parent,scope,file){if(node.arguments.length)return;var callee=node.callee;if(!t.isMemberExpression(callee))return;if(!callee.computed)return;if(!this.get("callee.property").matchesPattern("Symbol.iterator"))return;return t.callExpression(file.addImport(""+RUNTIME_MODULE_NAME+"/core-js/get-iterator","getIterator","absoluteDefault"),[callee.object])}function BinaryExpression(node,parent,scope,file){if(node.operator!=="in")return;if(!this.get("left").matchesPattern("Symbol.iterator"))return;return t.callExpression(file.addImport(""+RUNTIME_MODULE_NAME+"/core-js/is-iterable","isIterable","absoluteDefault"),[node.right])}var MemberExpression={enter:function enter(node,parent,scope,file){if(!this.isReferenced())return;var obj=node.object;var prop=node.property;if(!t.isReferenced(obj,node))return;if(node.computed)return;if(!(0,_lodashObjectHas2["default"])(_definitions2["default"].methods,obj.name))return;var methods=_definitions2["default"].methods[obj.name];if(!(0,_lodashObjectHas2["default"])(methods,prop.name))return;if(scope.getBindingIdentifier(obj.name))return;var modulePath=methods[prop.name];return file.addImport(""+RUNTIME_MODULE_NAME+"/core-js/"+modulePath,""+obj.name+"$"+prop.name,"absoluteDefault")},exit:function exit(node,parent,scope,file){if(!this.isReferenced())return;var prop=node.property;var obj=node.object;if(!(0,_lodashObjectHas2["default"])(_definitions2["default"].builtins,obj.name))return;if(scope.getBindingIdentifier(obj.name))return;var modulePath=_definitions2["default"].builtins[obj.name];return t.memberExpression(file.addImport(""+RUNTIME_MODULE_NAME+"/core-js/"+modulePath,""+obj.name,"absoluteDefault"),prop)}};exports.MemberExpression=MemberExpression},{"../../../../types":182,"./definitions":147,"lodash/object/has":433}],149:[function(require,module,exports){"use strict";exports.__esModule=true;exports.ThisExpression=ThisExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var metadata={group:"builtin-pre"};exports.metadata=metadata;var THIS_BREAK_KEYS=["FunctionExpression","FunctionDeclaration","ClassExpression","ClassDeclaration"];var Program={enter:function enter(program){var first=program.body[0];var directive;if(t.isExpressionStatement(first)&&t.isLiteral(first.expression,{value:"use strict"})){directive=first}else{directive=t.expressionStatement(t.literal("use strict"));this.unshiftContainer("body",directive);if(first){directive.leadingComments=first.leadingComments;first.leadingComments=[]}}directive._blockHoist=Infinity}};exports.Program=Program;function ThisExpression(){if(!this.findParent(function(path){return!path.is("shadow")&&THIS_BREAK_KEYS.indexOf(path.type)>=0})){return t.identifier("undefined")}}},{"../../../types":182}],150:[function(require,module,exports){"use strict";exports.__esModule=true;exports.BlockStatement=BlockStatement;exports.SwitchCase=SwitchCase;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);function statementList(key,path){var paths=path.get(key);for(var i=0;i3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}var msg;if(closest){msg=messages.get("undeclaredVariableSuggestion",node.name,closest)}else{msg=messages.get("undeclaredVariable",node.name)}throw this.errorWithNode(msg,ReferenceError)}},{"../../../messages":48,leven:334}],157:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _path=require("./path");var _path2=_interopRequireDefault(_path);var _types=require("../types");var t=_interopRequireWildcard(_types);var TraversalContext=function(){function TraversalContext(scope,opts,state,parentPath){_classCallCheck(this,TraversalContext);this.parentPath=parentPath;this.scope=scope;this.state=state;this.opts=opts}TraversalContext.prototype.shouldVisit=function shouldVisit(node){var opts=this.opts;if(opts.enter||opts.exit)return true;if(opts[node.type])return true;var keys=t.VISITOR_KEYS[node.type];if(!keys||!keys.length)return false;var _arr=keys;for(var _i=0;_i<_arr.length;_i++){var key=_arr[_i];if(node[key])return true}return false};TraversalContext.prototype.create=function create(node,obj,key,containerKey){var path=_path2["default"].get({parentPath:this.parentPath,parent:node,container:obj,key:key,containerKey:containerKey});path.unshiftContext(this);return path};TraversalContext.prototype.visitMultiple=function visitMultiple(container,parent,containerKey){if(container.length===0)return false;var visited=[];var queue=this.queue=[];var stop=false;for(var key=0;key=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}}var _arr3=queue;for(var _i3=0;_i3<_arr3.length;_i3++){var path=_arr3[_i3];path.shiftContext()}this.queue=null;return stop};TraversalContext.prototype.visitSingle=function visitSingle(node,key){if(this.shouldVisit(node[key])){var path=this.create(node,node,key);path.visit();path.shiftContext()}};TraversalContext.prototype.visit=function visit(node,key){var nodes=node[key];if(!nodes)return;if(Array.isArray(nodes)){return this.visitMultiple(nodes,node,key)}else{return this.visitSingle(node,key)}};return TraversalContext}();exports["default"]=TraversalContext;module.exports=exports["default"]},{"../types":182,"./path":166}],158:[function(require,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 Hub=function Hub(file){_classCallCheck(this,Hub);this.file=file};exports["default"]=Hub;module.exports=exports["default"]},{}],159:[function(require,module,exports){"use strict";exports.__esModule=true;exports["default"]=traverse;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _context=require("./context");var _context2=_interopRequireDefault(_context);var _visitors=require("./visitors");var visitors=_interopRequireWildcard(_visitors);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _types=require("../types");var t=_interopRequireWildcard(_types);function traverse(parent,opts,scope,state,parentPath){if(!parent)return;if(!opts.noScope&&!scope){if(parent.type!=="Program"&&parent.type!=="File"){throw new Error(messages.get("traverseNeedsParent",parent.type))}}if(!opts)opts={};visitors.verify(opts);visitors.explode(opts);if(Array.isArray(parent)){for(var i=0;i-1}function visit(){if(this.isBlacklisted())return false;if(this.opts.shouldSkip&&this.opts.shouldSkip(this))return false;this.call("enter");if(this.shouldSkip){return this.shouldStop}var node=this.node;var opts=this.opts;if(node){if(Array.isArray(node)){for(var i=0;i":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right}}if(path.isCallExpression()){var callee=path.get("callee");var context;var func;if(callee.isIdentifier()&&!path.scope.getBinding(callee.node.name,true)&&VALID_CALLEES.indexOf(callee.node.name)>=0){func=global[node.callee.name]}if(callee.isMemberExpression()){var object=callee.get("object");var property=callee.get("property");if(object.isIdentifier()&&property.isIdentifier()&&VALID_CALLEES.indexOf(object.node.name)>=0){context=global[object.node.name];func=context[property.node.name]}if(object.isLiteral()&&property.isIdentifier()){var type=typeof object.node.value;if(type==="string"||type==="number"){context=object.node.value;func=context[property.node.name]}}}if(func){var args=path.get("arguments").map(evaluate);if(!confident)return;return func.apply(context,args)}}confident=false}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],165:[function(require,module,exports){"use strict";exports.__esModule=true;exports.getStatementParent=getStatementParent;exports.getCompletionRecords=getCompletionRecords;exports.getSibling=getSibling;exports.get=get;exports._getKey=_getKey;exports._getPattern=_getPattern;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);function getStatementParent(){var path=this;do{if(!path.parentPath||Array.isArray(path.container)&&path.isStatement()){break}else{path=path.parentPath}}while(path);if(path&&(path.isProgram()||path.isFile())){throw new Error("File/Program node, we can't possibly find a statement parent to this")}return path}function getCompletionRecords(){var paths=[];var add=function add(path){if(path)paths=paths.concat(path.getCompletionRecords())};if(this.isIfStatement()){add(this.get("consequent"));add(this.get("alternate"))}else if(this.isDoExpression()||this.isFor()||this.isWhile()){add(this.get("body"))}else if(this.isProgram()||this.isBlockStatement()){add(this.get("body").pop())}else if(this.isFunction()){return this.get("body").getCompletionRecords()}else{paths.push(this)}return paths}function getSibling(key){return _index2["default"].get({parentPath:this.parentPath,parent:this.parent,container:this.container,containerKey:this.containerKey,key:key})}function get(key){var parts=key.split(".");if(parts.length===1){return this._getKey(key)}else{return this._getPattern(parts)}}function _getKey(key){var _this=this;var node=this.node;var container=node[key];if(Array.isArray(container)){return container.map(function(_,i){return _index2["default"].get({containerKey:key,parentPath:_this,parent:node,container:container,key:i}).setContext()})}else{return _index2["default"].get({parentPath:this,parent:node,container:node,key:key}).setContext()}}function _getPattern(parts){var path=this;var _arr=parts;for(var _i=0;_i<_arr.length;_i++){var part=_arr[_i];if(part==="."){path=path.parentPath}else{if(Array.isArray(path)){path=path[part]}else{path=path.get(part)}}}return path}function getBindingIdentifiers(){return t.getBindingIdentifiers(this.node)}},{"../../types":182,"./index":166}],166:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _libVirtualTypes=require("./lib/virtual-types");var virtualTypes=_interopRequireWildcard(_libVirtualTypes);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _lodashObjectAssign=require("lodash/object/assign");var _lodashObjectAssign2=_interopRequireDefault(_lodashObjectAssign);var _scope=require("../scope");var _scope2=_interopRequireDefault(_scope);var _types=require("../../types");var t=_interopRequireWildcard(_types);var NodePath=function(){function NodePath(hub,parent){_classCallCheck(this,NodePath);this.contexts=[];this.parent=parent;this.data={};this.hub=hub}NodePath.get=function get(_ref){var hub=_ref.hub;var parentPath=_ref.parentPath;var parent=_ref.parent;var container=_ref.container;var containerKey=_ref.containerKey;var key=_ref.key;if(!hub&&parentPath){hub=parentPath.hub}var targetNode=container[key];var paths=parent._paths=parent._paths||[];var path;for(var i=0;iparts.length){return false}}return true}function has(key){var val=this.node[key];if(val&&Array.isArray(val)){return!!val.length}else{return!!val}}var is=has;exports.is=is;function isnt(key){return!this.has(key)}function equals(key,value){return this.node[key]===value}function isNodeType(type){return t.isType(this.type,type)}function canHaveVariableDeclarationOrExpression(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function isCompletionRecord(allowInsideFunction){var path=this;var first=true;do{var container=path.container;if(path.isFunction()&&!first){return!!allowInsideFunction}first=false;if(Array.isArray(container)&&path.key!==container.length-1){return false}}while((path=path.parentPath)&&!path.isProgram());return true}function isStatementOrBlock(){if(this.parentPath.isLabeledStatement()||t.isBlockStatement(this.container)){return false}else{return(0,_lodashCollectionIncludes2["default"])(t.STATEMENT_OR_BLOCK_KEYS,this.key)}}function isUser(){return this.node&&!!this.node.loc}function isGenerated(){return!this.isUser()}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier())return false;var binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return false;var path=binding.path;if(!path.isImportDeclaration())return false;if(path.node.source.value===moduleSource){if(!importName)return true}else{return false}var _arr=path.node.specifiers;for(var _i=0;_i<_arr.length;_i++){var specifier=_arr[_i];if(t.isSpecifierDefault(specifier)&&importName==="default"){return true}if(t.isImportNamespaceSpecifier(specifier)&&importName==="*"){return true}if(t.isImportSpecifier(specifier)&&specifier.imported.name===importName){return true}}return false}function getSource(){var node=this.node;if(node.end){return this.hub.file.code.slice(node.start,node.end)}else{return""}}},{"../../types":182,"lodash/collection/includes":345}],168:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){if(this.isJSXIdentifier()&&react.isCompatTag(node.name)){return}var bindingInfo=scope.getBinding(node.name);if(!bindingInfo)return;if(bindingInfo!==state.scope.getBinding(node.name))return;if(bindingInfo.constant){state.bindings[node.name]=bindingInfo}else{var _arr=bindingInfo.constantViolations;for(var _i=0;_i<_arr.length;_i++){var violationPath=_arr[_i];state.breakOnScopePaths.push(violationPath.scope.path)}}}};var PathHoister=function(){function PathHoister(path,scope){_classCallCheck(this,PathHoister);this.breakOnScopePaths=[];this.bindings={};this.scopes=[];this.scope=scope;this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var scope=this.path.scope;do{if(this.isCompatibleScope(scope)){this.scopes.push(scope)}else{break}if(this.breakOnScopePaths.indexOf(scope.path)>=0){break}}while(scope=scope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(!scope)return;if(scope.path.isFunction()){if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;return scope.path.get("body").get("body")[0]}else{return this.getNextScopeStatementParent()}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasOwnParamBindings=function hasOwnParamBindings(scope){for(var name in this.bindings){if(!scope.hasOwnBinding(name))continue;var binding=this.bindings[name];if(binding.kind==="param")return true}return false};PathHoister.prototype.run=function run(){var node=this.path.node;if(node._hoisted)return;node._hoisted=true;this.path.traverse(referenceVisitor,this);this.getCompatibleScopes();var path=this.getAttachmentPath();if(!path)return;var uid=path.scope.generateUidIdentifier("ref");path.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);var parent=this.path.parentPath;if(parent.isJSXElement()&&this.path.container===parent.node.children){uid=t.jSXExpressionContainer(uid)}this.path.replaceWith(uid)};return PathHoister}();exports["default"]=PathHoister;module.exports=exports["default"]},{"../../../transformation/helpers/react":67,"../../../types":182}],169:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);var pre=[function(self){if(self.key==="body"&&(self.isBlockStatement()||self.isClassBody())){self.node.body=[];return true}},function(self,parent){var replace=false;replace=replace||self.key==="body"&&parent.isArrowFunctionExpression();replace=replace||self.key==="argument"&&parent.isThrowStatement();if(replace){self.replaceWith(t.identifier("undefined"));return true}}];exports.pre=pre;var post=[function(self,parent){var removeParent=false;removeParent=removeParent||self.key==="test"&&(parent.isWhile()||parent.isSwitchCase());removeParent=removeParent||self.key==="declaration"&&parent.isExportDeclaration();removeParent=removeParent||self.key==="body"&&parent.isLabeledStatement();removeParent=removeParent||self.containerKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===0;removeParent=removeParent||self.key==="expression"&&parent.isExpressionStatement();removeParent=removeParent||self.key==="test"&&parent.isIfStatement();if(removeParent){parent.dangerouslyRemove();return true}},function(self,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1){parent.replaceWith(parent.node.expressions[0]);return true}},function(self,parent){if(parent.isBinary()){if(self.key==="left"){parent.replaceWith(parent.node.right)}else{parent.replaceWith(parent.node.left)}return true}}];exports.post=post},{"../../../types":182}],170:[function(require,module,exports){"use strict";exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);var ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function checkPath(_ref,opts){var node=_ref.node;var parent=_ref.parent;if(!t.isIdentifier(node,opts)){if(t.isJSXIdentifier(node,opts)){if(react.isCompatTag(node.name))return false}else{return false}}return t.isReferenced(node,parent)}};exports.ReferencedIdentifier=ReferencedIdentifier;var Expression={types:["Expression"],checkPath:function checkPath(path){if(path.isIdentifier()){return path.isReferencedIdentifier()}else{return t.isExpression(path.node)}}};exports.Expression=Expression;var Scope={types:["Scopable"],checkPath:function checkPath(path){return t.isScope(path.node,path.parent)}};exports.Scope=Scope;var Referenced={checkPath:function checkPath(path){return t.isReferenced(path.node,path.parent)}};exports.Referenced=Referenced;var BlockScoped={checkPath:function checkPath(path){return t.isBlockScoped(path.node)}};exports.BlockScoped=BlockScoped;var Var={types:["VariableDeclaration"],checkPath:function checkPath(path){return t.isVar(path.node)}};exports.Var=Var},{"../../../transformation/helpers/react":67,"../../../types":182}],171:[function(require,module,exports){"use strict";exports.__esModule=true;exports.insertBefore=insertBefore;exports._containerInsert=_containerInsert;exports._containerInsertBefore=_containerInsertBefore;exports._containerInsertAfter=_containerInsertAfter;exports._maybePopFromStatements=_maybePopFromStatements;exports.insertAfter=insertAfter;exports.updateSiblingKeys=updateSiblingKeys;exports._verifyNodeList=_verifyNodeList;exports.unshiftContainer=unshiftContainer;exports.pushContainer=pushContainer;exports.hoist=hoist;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _libHoister=require("./lib/hoister");var _libHoister2=_interopRequireDefault(_libHoister);var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);function insertBefore(nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);if(this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement()){return this.parentPath.insertBefore(nodes)}else if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&this.key==="init"){if(this.node)nodes.push(this.node);this.replaceExpressionWithStatements(nodes)}else if(this.isNodeType("Statement")||!this.type){this._maybePopFromStatements(nodes);if(Array.isArray(this.container)){return this._containerInsertBefore(nodes)}else if(this.isStatementOrBlock()){if(this.node)nodes.push(this.node);this.node=this.container[this.key]=t.blockStatement(nodes)}else{throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}else{throw new Error("No clue what to do with this node type.")}return[this]}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);var paths=[];for(var i=0;i=fromIndex){path.key+=incrementBy}}}function _verifyNodeList(nodes){if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;i=0)return;resolved=resolved||[];resolved.push(this);if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve(dangerous,resolved)}else{}}else if(this.isReferencedIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding)return;if(!binding.constant)return;if(binding.kind==="module")return;if(binding.path!==this){return binding.path.resolve(dangerous,resolved)}}else if(dangerous&&this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){var props=target.get("properties");var _arr=props;for(var _i=0;_i<_arr.length;_i++){var prop=_arr[_i];if(!prop.isProperty())continue;var key=prop.get("key");var match=prop.isnt("computed")&&key.isIdentifier({name:targetName});match=match||key.isLiteral({value:targetName});if(match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){var elems=target.get("elements");var elem=elems[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}function getTypeAnnotation(force){if(this.typeAnnotation)return this.typeAnnotation;var type=this._getTypeAnnotation(force)||t.anyTypeAnnotation();if(t.isTypeAnnotation(type))type=type.typeAnnotation;return this.typeAnnotation=type}function _getTypeAnnotationBindingConstantViolations(name){var types=arguments[1]===undefined?[]:arguments[1];var binding=this.scope.getBinding(name);var _arr2=binding.constantViolations;for(var _i2=0;_i2<_arr2.length;_i2++){var constantViolation=_arr2[_i2];types.push(constantViolation.getTypeAnnotation())}if(types.length){return t.createUnionTypeAnnotation(types)}}function _getTypeAnnotation(force){var node=this.node;if(!node){if(this.key==="init"&&this.parentPath.isVariableDeclarator()){var declar=this.parentPath.parentPath;var declarParent=declar.parentPath;if(declar.key==="left"&&declarParent.isForInStatement()){return t.stringTypeAnnotation()}if(declar.key==="left"&&declarParent.isForOfStatement()){return t.anyTypeAnnotation()}return t.voidTypeAnnotation()}else{return}}if(node.typeAnnotation){return node.typeAnnotation}if(this.isVariableDeclarator()){var id=this.get("id");if(id.isIdentifier()){return this._getTypeAnnotationBindingConstantViolations(id.node.name,[this.get("init").getTypeAnnotation()])}else{return}}if(this.parentPath.isTypeCastExpression()){return this.parentPath.getTypeAnnotation()}if(this.isTypeCastExpression()){return node.typeAnnotation}if(this.isRestElement()||this.parentPath.isRestElement()||this.isArrayExpression()){return t.genericTypeAnnotation(t.identifier("Array"),t.typeParameterInstantiation([t.anyTypeAnnotation()]))}if(!force&&this.parentPath.isReturnStatement()){return this.parentPath.getTypeAnnotation()}if(this.isReturnStatement()){var funcPath=this.findParent(function(path){return path.isFunction()});if(!funcPath)return;var returnType=funcPath.node.returnType;if(returnType){return returnType}else{return this.get("argument").getTypeAnnotation(true)}}if(this.isNewExpression()&&this.get("callee").isIdentifier()){return t.genericTypeAnnotation(node.callee)}if(this.isReferencedIdentifier()){var binding=this.scope.getBinding(node.name);if(binding){if(binding.identifier.typeAnnotation){return binding.identifier.typeAnnotation}else{return this._getTypeAnnotationBindingConstantViolations(node.name,[binding.path.getTypeAnnotation()])}}if(node.name==="undefined"){return t.voidTypeAnnotation()}else if(node.name==="NaN"||node.name==="Infinity"){return t.numberTypeAnnotation()}else if(node.name==="arguments"){}}if(this.isObjectExpression()){return t.genericTypeAnnotation(t.identifier("Object"))}if(this.isFunction()||this.isClass()){return t.genericTypeAnnotation(t.identifier("Function"))}if(this.isTemplateLiteral()){return t.stringTypeAnnotation()}if(this.isUnaryExpression()){var operator=node.operator;if(operator==="void"){return t.voidTypeAnnotation()}else if(t.NUMBER_UNARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.STRING_UNARY_OPERATORS.indexOf(operator)>=0){return t.stringTypeAnnotation()}else if(t.BOOLEAN_UNARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}}if(this.isBinaryExpression()){var operator=node.operator;if(t.NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.BOOLEAN_BINARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}else if(operator==="+"){var right=this.get("right");var left=this.get("left");if(left.isGenericType("Number")&&right.isGenericType("Number")){return t.numberTypeAnnotation()}else if(left.isGenericType("String")||right.isGenericType("String")){return t.stringTypeAnnotation()}return t.unionTypeAnnotation([t.stringTypeAnnotation(),t.numberTypeAnnotation()])}}if(this.isLogicalExpression()){return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}if(this.isConditionalExpression()){return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}if(this.isSequenceExpression()){return this.get("expressions").pop().getTypeAnnotation(force)}if(this.isAssignmentExpression()){return this.get("right").getTypeAnnotation(force)}if(this.isUpdateExpression()){var operator=node.operator;if(operator==="++"||operator==="--"){return t.numberTypeAnnotation()}}if(this.isLiteral()){var value=node.value;if(typeof value==="string")return t.stringTypeAnnotation();if(typeof value==="number")return t.numberTypeAnnotation();if(typeof value==="boolean")return t.booleanTypeAnnotation();if(node.regex)return t.genericTypeAnnotation(t.identifier("RegExp"))}var callPath;if(this.isCallExpression())callPath=this.get("callee");if(this.isTaggedTemplateExpression())callPath=this.get("tag");if(callPath){var callee=callPath.resolve();if(callee.isFunction()){if(callee.is("async")){if(callee.is("generator")){return t.genericTypeAnnotation(t.identifier("AsyncIterator"))}else{return t.genericTypeAnnotation(t.identifier("Promise"))}}else{if(callee.node.returnType){return callee.node.returnType}else{}}}}}function isGenericType(genericName){var type=this.getTypeAnnotation();if(t.isGenericTypeAnnotation(type)&&t.isIdentifier(type.id,{name:genericName})){return true}if(genericName==="String"){return t.isStringTypeAnnotation(type)}else if(genericName==="Number"){return t.isNumberTypeAnnotation(type)}else if(genericName==="Boolean"){return t.isBooleanTypeAnnotation(type)}return false}},{"../../types":182}],175:[function(require,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 Binding=function(){function Binding(_ref){var identifier=_ref.identifier;var scope=_ref.scope;var path=_ref.path;var kind=_ref.kind;_classCallCheck(this,Binding);this.constantViolations=[];this.constant=true;this.identifier=identifier;this.references=0;this.referenced=false;this.scope=scope;this.path=path;this.kind=kind;this.clearValue()}Binding.prototype.deoptValue=function deoptValue(){this.clearValue();this.hasDeoptedValue=true};Binding.prototype.setValue=function setValue(value){if(this.hasDeoptedValue)return;this.hasValue=true;this.value=value};Binding.prototype.clearValue=function clearValue(){this.hasDeoptedValue=false;this.hasValue=false;this.value=null};Binding.prototype.reassign=function reassign(path){this.constant=false;this.constantViolations.push(path)};Binding.prototype.reference=function reference(){this.referenced=true;this.references++};Binding.prototype.dereference=function dereference(){this.references--;this.referenced=!!this.references};Binding.prototype.isCompatibleWithType=function isCompatibleWithType(){return false};return Binding}();exports["default"]=Binding;module.exports=exports["default"]},{}],176:[function(require,module,exports){"use strict";exports.__esModule=true;var _createClass=function(){ - function defineProperties(target,props){for(var i=0;i1)id+=i;return"_"+id};Scope.prototype.generateUidIdentifierBasedOnNode=function generateUidIdentifierBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function add(node){if(t.isModuleDeclaration(node)){if(node.source){add(node.source)}else if(node.specifiers&&node.specifiers.length){var _arr4=node.specifiers;for(var _i4=0;_i4<_arr4.length;_i4++){var specifier=_arr4[_i4];add(specifier)}}else if(node.declaration){add(node.declaration)}}else if(t.isModuleSpecifier(node)){add(node.local)}else if(t.isMemberExpression(node)){add(node.object);add(node.property)}else if(t.isIdentifier(node)){parts.push(node.name)}else if(t.isLiteral(node)){parts.push(node.value)}else if(t.isCallExpression(node)){add(node.callee)}else if(t.isObjectExpression(node)||t.isObjectPattern(node)){var _arr5=node.properties;for(var _i5=0;_i5<_arr5.length;_i5++){var prop=_arr5[_i5];add(prop.key||prop.argument)}}};add(node);var id=parts.join("$");id=id.replace(/^_/,"")||defaultName||"ref";return this.generateUidIdentifier(id)};Scope.prototype.isStatic=function isStatic(node){if(t.isThisExpression(node)||t.isSuper(node)){return true}if(t.isIdentifier(node)&&this.hasBinding(node.name)){return true}return false};Scope.prototype.maybeGenerateMemoised=function maybeGenerateMemoised(node,dontPush){if(this.isStatic(node)){return null}else{var id=this.generateUidIdentifierBasedOnNode(node);if(!dontPush)this.push({id:id});return id}};Scope.prototype.checkBlockScopedCollisions=function checkBlockScopedCollisions(local,kind,name,id){if(kind==="param")return;if(kind==="hoisted"&&local.kind==="let")return;var duplicate=false;if(!duplicate)duplicate=kind==="let"||local.kind==="let"||local.kind==="const"||local.kind==="module";if(!duplicate)duplicate=local.kind==="param"&&(kind==="let"||kind==="const");if(duplicate){throw this.hub.file.errorWithNode(id,messages.get("scopeDuplicateDeclaration",name),TypeError)}};Scope.prototype.rename=function rename(oldName,newName,block){newName=newName||this.generateUidIdentifier(oldName).name;var info=this.getBinding(oldName);if(!info)return;var state={newName:newName,oldName:oldName,binding:info.identifier,info:info};var scope=info.scope;scope.traverse(block||scope.block,renameVisitor,state);if(!block){scope.removeOwnBinding(oldName);scope.bindings[newName]=info;state.binding.name=newName}var file=this.hub.file;if(file){this._renameFromMap(file.moduleFormatter.localImports,oldName,newName,state.binding)}};Scope.prototype._renameFromMap=function _renameFromMap(map,oldName,newName,value){if(map[oldName]){map[newName]=value;map[oldName]=null}};Scope.prototype.dump=function dump(){var sep=(0,_repeating2["default"])("-",60);console.log(sep);var scope=this;do{console.log("#",scope.block.type);for(var name in scope.bindings){var binding=scope.bindings[name];console.log(" -",name,{constant:binding.constant,references:binding.references})}}while(scope=scope.parent);console.log(sep)};Scope.prototype.toArray=function toArray(node,i){var file=this.hub.file;if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding&&binding.constant&&binding.path.isGenericType("Array"))return node}if(t.isArrayExpression(node)){return node}if(t.isIdentifier(node,{name:"arguments"})){return t.callExpression(t.memberExpression(file.addHelper("slice"),t.identifier("call")),[node])}var helperName="to-array";var args=[node];if(i===true){helperName="to-consumable-array"}else if(i){args.push(t.literal(i));helperName="sliced-to-array";if(this.hub.file.isLoose("es6.forOf"))helperName+="-loose"}return t.callExpression(file.addHelper(helperName),args)};Scope.prototype.registerDeclaration=function registerDeclaration(path){var node=path.node;if(t.isFunctionDeclaration(node)){this.registerBinding("hoisted",path)}else if(t.isVariableDeclaration(node)){var declarations=path.get("declarations");var _arr6=declarations;for(var _i6=0;_i6<_arr6.length;_i6++){var declar=_arr6[_i6];this.registerBinding(node.kind,declar)}}else if(t.isClassDeclaration(node)){this.registerBinding("let",path)}else if(t.isImportDeclaration(node)||t.isExportDeclaration(node)){this.registerBinding("module",path)}else if(t.isFlowDeclaration()){this.registerBinding("type",path)}else{this.registerBinding("unknown",path)}};Scope.prototype.registerConstantViolation=function registerConstantViolation(root,left,right){var ids=left.getBindingIdentifiers();for(var name in ids){var binding=this.getBinding(name);if(!binding)continue;if(right){var rightType=right.typeAnnotation;if(rightType&&binding.isCompatibleWithType(rightType))continue}binding.reassign(root,left,right)}};Scope.prototype.registerBinding=function registerBinding(kind,path){if(!kind)throw new ReferenceError("no `kind`");if(path.isVariableDeclaration()){var declarators=path.get("declarations");var _arr7=declarators;for(var _i7=0;_i7<_arr7.length;_i7++){var declar=_arr7[_i7];this.registerBinding(kind,declar)}return}var parent=this.getProgramParent();var ids=path.getBindingIdentifiers();for(var name in ids){var id=ids[name];var local=this.getOwnBindingInfo(name);if(local){if(kind==="type")continue;if(local.identifier===id)continue;this.checkBlockScopedCollisions(local,kind,name,id)}parent.references[name]=true;this.bindings[name]=new _binding2["default"]({identifier:id,scope:this,path:path,kind:kind})}};Scope.prototype.addGlobal=function addGlobal(node){this.globals[node.name]=node};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.uids[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasGlobal=function hasGlobal(name){var scope=this;do{if(scope.globals[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasReference=function hasReference(name){var scope=this;do{if(scope.references[name])return true}while(scope=scope.parent);return false};Scope.prototype.isPure=function isPure(node,constantsOnly){if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(!binding)return false;if(constantsOnly)return binding.constant;return true}else if(t.isClass(node)){return!node.superClass||this.isPure(node.superClass,constantsOnly)}else if(t.isBinary(node)){return this.isPure(node.left,constantsOnly)&&this.isPure(node.right,constantsOnly)}else if(t.isArrayExpression(node)){var _arr8=node.elements;for(var _i8=0;_i8<_arr8.length;_i8++){var elem=_arr8[_i8];if(!this.isPure(elem,constantsOnly))return false}return true}else if(t.isObjectExpression(node)){var _arr9=node.properties;for(var _i9=0;_i9<_arr9.length;_i9++){var prop=_arr9[_i9];if(!this.isPure(prop,constantsOnly))return false}return true}else if(t.isProperty(node)){if(node.computed&&!this.isPure(node.key,constantsOnly))return false;return this.isPure(node.value,constantsOnly)}else{return t.isPure(node)}};Scope.prototype.init=function init(){if(!this.references)this.crawl()};Scope.prototype.crawl=function crawl(){var path=this.path;var info=this.block._scopeInfo;if(info)return(0,_lodashObjectExtend2["default"])(this,info);info=this.block._scopeInfo={references:(0,_helpersObject2["default"])(),bindings:(0,_helpersObject2["default"])(),globals:(0,_helpersObject2["default"])(),uids:(0,_helpersObject2["default"])()};(0,_lodashObjectExtend2["default"])(this,info);if(path.isLoop()){var _arr10=t.FOR_INIT_KEYS;for(var _i10=0;_i10<_arr10.length;_i10++){var key=_arr10[_i10];var node=path.get(key);if(node.isBlockScoped())this.registerBinding(node.node.kind,node)}}if(path.isFunctionExpression()&&path.has("id")){if(!t.isProperty(path.parent,{method:true})){this.registerBinding("var",path)}}if(path.isClassExpression()&&path.has("id")){this.registerBinding("var",path)}if(path.isFunction()){var params=path.get("params");var _arr11=params;for(var _i11=0;_i11<_arr11.length;_i11++){var param=_arr11[_i11];this.registerBinding("param",param)}}if(path.isCatchClause()){this.registerBinding("let",path)}if(path.isComprehensionExpression()){this.registerBinding("let",path)}var parent=this.getProgramParent();if(parent.crawling)return;this.crawling=true;path.traverse(collectorVisitor);this.crawling=false};Scope.prototype.push=function push(opts){var path=this.path;if(path.isSwitchStatement()){path=this.getFunctionParent().path}if(path.isLoop()||path.isCatchClause()||path.isFunction()){t.ensureBlock(path.node);path=path.get("body")}if(!path.isBlockStatement()&&!path.isProgram()){path=this.getBlockParent().path}var unique=opts.unique;var kind=opts.kind||"var";var dataKey="declaration:"+kind;var declar=!unique&&path.getData(dataKey);if(!declar){declar=t.variableDeclaration(kind,[]);declar._generated=true;declar._blockHoist=2;this.hub.file.attachAuxiliaryComment(declar);var _path$unshiftContainer=path.unshiftContainer("body",[declar]);var declarPath=_path$unshiftContainer[0];this.registerBinding(kind,declarPath);if(!unique)path.setData(dataKey,declar)}declar.declarations.push(t.variableDeclarator(opts.id,opts.init))};Scope.prototype.getProgramParent=function getProgramParent(){var scope=this;do{if(scope.path.isProgram()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getFunctionParent=function getFunctionParent(){var scope=this;do{if(scope.path.isFunctionParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getBlockParent=function getBlockParent(){var scope=this;do{if(scope.path.isBlockParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")};Scope.prototype.getAllBindings=function getAllBindings(){var ids=(0,_helpersObject2["default"])();var scope=this;do{(0,_lodashObjectDefaults2["default"])(ids,scope.bindings);scope=scope.parent}while(scope);return ids};Scope.prototype.getAllBindingsOfKind=function getAllBindingsOfKind(){var ids=(0,_helpersObject2["default"])();var _arr12=arguments;for(var _i12=0;_i12<_arr12.length;_i12++){var kind=_arr12[_i12];var scope=this;do{for(var name in scope.bindings){var binding=scope.bindings[name];if(binding.kind===kind)ids[name]=binding}scope=scope.parent}while(scope)}return ids};Scope.prototype.bindingIdentifierEquals=function bindingIdentifierEquals(name,node){return this.getBindingIdentifier(name)===node};Scope.prototype.getBinding=function getBinding(name){var scope=this;do{var binding=scope.getOwnBindingInfo(name);if(binding)return binding}while(scope=scope.parent)};Scope.prototype.getOwnBindingInfo=function getOwnBindingInfo(name){return this.bindings[name]};Scope.prototype.getBindingIdentifier=function getBindingIdentifier(name){var info=this.getBinding(name);return info&&info.identifier};Scope.prototype.getOwnBindingIdentifier=function getOwnBindingIdentifier(name){var binding=this.bindings[name];return binding&&binding.identifier};Scope.prototype.hasOwnBinding=function hasOwnBinding(name){return!!this.getOwnBindingInfo(name)};Scope.prototype.hasBinding=function hasBinding(name,noGlobals){if(!name)return false;if(this.hasOwnBinding(name))return true;if(this.parentHasBinding(name,noGlobals))return true;if(this.hasUid(name))return true;if(!noGlobals&&(0,_lodashCollectionIncludes2["default"])(Scope.globals,name))return true;if(!noGlobals&&(0,_lodashCollectionIncludes2["default"])(Scope.contextVariables,name))return true;return false};Scope.prototype.parentHasBinding=function parentHasBinding(name,noGlobals){return this.parent&&this.parent.hasBinding(name,noGlobals)};Scope.prototype.moveBindingTo=function moveBindingTo(name,scope){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name);info.scope=scope;scope.bindings[name]=info}};Scope.prototype.removeOwnBinding=function removeOwnBinding(name){delete this.bindings[name]};Scope.prototype.removeBinding=function removeBinding(name){var info=this.getBinding(name);if(info)info.scope.removeOwnBinding(name)};_createClass(Scope,null,[{key:"globals",value:(0,_lodashArrayFlatten2["default"])([_globals2["default"].builtin,_globals2["default"].browser,_globals2["default"].node].map(Object.keys)),enumerable:true},{key:"contextVariables",value:["arguments","undefined","Infinity","NaN"],enumerable:true}]);return Scope}();exports["default"]=Scope;module.exports=exports["default"]},{"../../helpers/object":46,"../../messages":48,"../../types":182,"../index":159,"./binding":175,globals:329,"lodash/array/flatten":338,"lodash/collection/includes":345,"lodash/object/defaults":431,"lodash/object/extend":432,repeating:489}],177:[function(require,module,exports){"use strict";exports.__esModule=true;exports.explode=explode;exports.verify=verify;exports.merge=merge;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _pathLibVirtualTypes=require("./path/lib/virtual-types");var virtualTypes=_interopRequireWildcard(_pathLibVirtualTypes);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../types");var t=_interopRequireWildcard(_types);var _lodashLangClone=require("lodash/lang/clone");var _lodashLangClone2=_interopRequireDefault(_lodashLangClone);var _esquery=require("esquery");var _esquery2=_interopRequireDefault(_esquery);function explode(visitor){if(visitor._exploded)return visitor;visitor._exploded=true;delete visitor.__esModule;if(visitor.queries){ensureEntranceObjects(visitor.queries);addQueries(visitor);delete visitor.queries}ensureEntranceObjects(visitor);for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var wrapper=virtualTypes[nodeType];if(!wrapper)continue;var fns=visitor[nodeType];for(var type in fns){fns[type]=wrapCheck(wrapper,fns[type])}delete visitor[nodeType];if(wrapper.types){var _arr=wrapper.types;for(var _i=0;_i<_arr.length;_i++){var type=_arr[_i];if(visitor[type]){mergePair(visitor[type],fns)}else{visitor[type]=fns}}}else{mergePair(visitor,fns)}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var fns=visitor[nodeType];var aliases=t.FLIPPED_ALIAS_KEYS[nodeType];if(!aliases)continue;delete visitor[nodeType];var _arr2=aliases;for(var _i2=0;_i2<_arr2.length;_i2++){var alias=_arr2[_i2];var existing=visitor[alias];if(existing){mergePair(existing,fns)}else{visitor[alias]=(0,_lodashLangClone2["default"])(fns)}}}return visitor}function verify(visitor){if(visitor._verified)return;if(typeof visitor==="function"){throw new Error(messages.get("traverseVerifyRootFunction"))}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;if(t.TYPES.indexOf(nodeType)<0&&!virtualTypes[nodeType]){throw new Error(messages.get("traverseVerifyNodeType",nodeType))}var visitors=visitor[nodeType];if(typeof visitors==="object"){for(var visitorKey in visitors){if(visitorKey==="enter"||visitorKey==="exit")continue;throw new Error(messages.get("traverseVerifyVisitorProperty",nodeType,visitorKey))}}}visitor._verified=true}function merge(visitors){var rootVisitor={};var _arr3=visitors;for(var _i3=0;_i3<_arr3.length;_i3++){var visitor=_arr3[_i3];for(var type in visitor){var nodeVisitor=rootVisitor[type]=rootVisitor[type]||{};mergePair(nodeVisitor,visitor[type])}}return rootVisitor}function ensureEntranceObjects(obj){for(var key in obj){if(shouldIgnoreKey(key))continue;var fns=obj[key];if(typeof fns==="function"){obj[key]={enter:fns}}}}function addQueries(visitor){for(var selector in visitor.queries){var fns=visitor.queries[selector];addSelector(visitor,selector,fns)}}function addSelector(visitor,selector,fns){selector=_esquery2["default"].parse(selector);var _loop=function(){var fn=fns[key];fns[key]=function(node){if(_esquery2["default"].matches(node,selector,this.getAncestry())){return fn.apply(this,arguments)}}};for(var key in fns){_loop()}mergePair(visitor,fns)}function wrapCheck(wrapper,fn){return function(){if(wrapper.checkPath(this)){return fn.apply(this,arguments)}}}function shouldIgnoreKey(key){if(key[0]==="_")return true;if(key==="enter"||key==="exit"||key==="shouldSkip")return true;if(key==="blacklist"||key==="noScope"||key==="skipKeys")return true;return false}function mergePair(dest,src){for(var key in src){dest[key]=[].concat(dest[key]||[],src[key])}}},{"../messages":48,"../types":182,"./path/lib/virtual-types":170,esquery:320,"lodash/lang/clone":415}],178:[function(require,module,exports){module.exports={ExpressionStatement:["Statement"],DebuggerStatement:["Statement"],IfStatement:["Statement"],TryStatement:["Statement"],WithStatement:["Statement"],EmptyStatement:["Statement"],LabeledStatement:["Statement"],VariableDeclaration:["Statement","Declaration"],BreakStatement:["Statement","Terminatorless","CompletionStatement"],ContinueStatement:["Statement","Terminatorless","CompletionStatement"],ReturnStatement:["Statement","Terminatorless","CompletionStatement"],ThrowStatement:["Statement","Terminatorless","CompletionStatement"],DoWhileStatement:["Statement","BlockParent","Loop","While","Scopable"],WhileStatement:["Statement","BlockParent","Loop","While","Scopable"],SwitchStatement:["Statement","BlockParent","Scopable"],ImportSpecifier:["ModuleSpecifier"],ExportSpecifier:["ModuleSpecifier"],ImportDefaultSpecifier:["ModuleSpecifier"],ExportDefaultSpecifier:["ModuleSpecifier"],ExportNamespaceSpecifier:["ModuleSpecifier"],ExportDefaultFromSpecifier:["ModuleSpecifier"],ExportAllDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ExportDefaultDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ExportNamedDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ImportDeclaration:["Statement","Declaration","ModuleDeclaration"],ArrowFunctionExpression:["Scopable","Function","Func","BlockParent","FunctionParent","Expression","Pure"],FunctionDeclaration:["Scopable","Function","Func","BlockParent","FunctionParent","Statement","Pure","Declaration"],FunctionExpression:["Scopable","Function","Func","BlockParent","FunctionParent","Expression","Pure"],BlockStatement:["Scopable","BlockParent","Block","Statement"],Program:["Scopable","BlockParent","Block","FunctionParent"],CatchClause:["Scopable"],LogicalExpression:["Binary","Expression"],BinaryExpression:["Binary","Expression"],UnaryExpression:["UnaryLike","Expression"],SpreadProperty:["UnaryLike"],SpreadElement:["UnaryLike"],ClassDeclaration:["Scopable","Class","Statement","Declaration"],ClassExpression:["Scopable","Class","Expression"],ForOfStatement:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],ForInStatement:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],ForStatement:["Scopable","Statement","For","BlockParent","Loop"],ObjectPattern:["Pattern"],ArrayPattern:["Pattern"],AssignmentPattern:["Pattern"],Property:["UserWhitespacable"],AwaitExpression:["Expression","Terminatorless"],YieldExpression:["Expression","Terminatorless"],ArrayExpression:["Expression"],AssignmentExpression:["Expression"],CallExpression:["Expression"],ComprehensionExpression:["Expression","Scopable"],ConditionalExpression:["Expression"],DoExpression:["Expression"],Identifier:["Expression"],Literal:["Expression","Pure"],MemberExpression:["Expression"],MetaProperty:["Expression"],NewExpression:["Expression"],ObjectExpression:["Expression"],SequenceExpression:["Expression"],TaggedTemplateExpression:["Expression"],ThisExpression:["Expression"],Super:["Expression"],UpdateExpression:["Expression"],JSXEmptyExpression:["Expression"],JSXMemberExpression:["Expression"],AnyTypeAnnotation:["Flow","FlowBaseAnnotation"],ArrayTypeAnnotation:["Flow"],BooleanTypeAnnotation:["Flow","FlowBaseAnnotation"],ClassImplements:["Flow"],DeclareClass:["Flow","FlowDeclaration","Statement","Declaration"],DeclareFunction:["Flow","FlowDeclaration","Statement","Declaration"],DeclareModule:["Flow","FlowDeclaration","Statement"],DeclareVariable:["Flow","FlowDeclaration","Statement","Declaration"],FunctionTypeAnnotation:["Flow"],FunctionTypeParam:["Flow"],GenericTypeAnnotation:["Flow"],InterfaceExtends:["Flow"],InterfaceDeclaration:["Flow","FlowDeclaration","Statement","Declaration"],IntersectionTypeAnnotation:["Flow"],MixedTypeAnnotation:["Flow","FlowBaseAnnotation"],NullableTypeAnnotation:["Flow"],NumberTypeAnnotation:["Flow","FlowBaseAnnotation"],StringLiteralTypeAnnotation:["Flow"],StringTypeAnnotation:["Flow","FlowBaseAnnotation"],TupleTypeAnnotation:["Flow"],TypeofTypeAnnotation:["Flow"],TypeAlias:["Flow","FlowDeclaration","Statement","Declaration"],TypeAnnotation:["Flow"],TypeCastExpression:["Flow"],TypeParameterDeclaration:["Flow"],TypeParameterInstantiation:["Flow"],ObjectTypeAnnotation:["Flow"],ObjectTypeCallProperty:["Flow","UserWhitespacable"],ObjectTypeIndexer:["Flow","UserWhitespacable"],ObjectTypeProperty:["Flow","UserWhitespacable"],QualifiedTypeIdentifier:["Flow"],UnionTypeAnnotation:["Flow"],VoidTypeAnnotation:["Flow","FlowBaseAnnotation"],JSXAttribute:["JSX","Immutable"],JSXClosingElement:["JSX","Immutable"],JSXElement:["JSX","Immutable","Expression"],JSXEmptyExpression:["JSX","Immutable"],JSXExpressionContainer:["JSX","Immutable"],JSXIdentifier:["JSX"],JSXMemberExpression:["JSX"],JSXNamespacedName:["JSX"],JSXOpeningElement:["JSX","Immutable"],JSXSpreadAttribute:["JSX"]}},{}],179:[function(require,module,exports){module.exports={ArrayExpression:{elements:null},ArrowFunctionExpression:{params:null,body:null},AssignmentExpression:{operator:null,left:null,right:null},BinaryExpression:{operator:null,left:null,right:null},BindExpression:{object:null,callee:null},BlockStatement:{body:null},CallExpression:{callee:null,arguments:null},ConditionalExpression:{test:null,consequent:null,alternate:null},ExpressionStatement:{expression:null},File:{program:null,comments:null,tokens:null},FunctionExpression:{id:null,params:null,body:null,generator:false,async:false},FunctionDeclaration:{id:null,params:null,body:null,generator:false,async:false},GenericTypeAnnotation:{id:null,typeParameters:null},Identifier:{name:null},IfStatement:{test:null,consequent:null,alternate:null},ImportDeclaration:{specifiers:null,source:null},ImportSpecifier:{local:null,imported:null},LabeledStatement:{label:null,body:null},Literal:{value:null},LogicalExpression:{operator:null,left:null,right:null},MemberExpression:{object:null,property:null,computed:false},MethodDefinition:{key:null,value:null,kind:"method",computed:false,"static":false},NewExpression:{callee:null,arguments:null},ObjectExpression:{properties:null},Program:{body:null},Property:{kind:null,key:null,value:null,computed:false},ReturnStatement:{argument:null},SequenceExpression:{expressions:null},TemplateLiteral:{quasis:null,expressions:null},ThrowExpression:{argument:null},UnaryExpression:{operator:null,argument:null,prefix:null},VariableDeclaration:{kind:null,declarations:null},VariableDeclarator:{id:null,init:null},WithStatement:{object:null,body:null},YieldExpression:{argument:null,delegate:null}}},{}],180:[function(require,module,exports){"use strict";exports.__esModule=true;exports.toComputedKey=toComputedKey;exports.toSequenceExpression=toSequenceExpression;exports.toKeyAlias=toKeyAlias;exports.toIdentifier=toIdentifier;exports.toStatement=toStatement;exports.toExpression=toExpression;exports.toBlock=toBlock;exports.valueToNode=valueToNode;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _lodashLangIsPlainObject=require("lodash/lang/isPlainObject");var _lodashLangIsPlainObject2=_interopRequireDefault(_lodashLangIsPlainObject);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _traversal=require("../traversal");var _traversal2=_interopRequireDefault(_traversal);var _index=require("./index");var t=_interopRequireWildcard(_index);function toComputedKey(node){var key=arguments[1]===undefined?node.key||node.property:arguments[1];return function(){if(!node.computed){if(t.isIdentifier(key))key=t.literal(key.name)}return key}()}function toSequenceExpression(nodes,scope){var declars=[];var bailed=false;var result=convert(nodes);if(bailed)return;for(var i=0;i","<",">=","<=","in","instanceof"];exports.BOOLEAN_BINARY_OPERATORS=BOOLEAN_BINARY_OPERATORS;var NUMBER_BINARY_OPERATORS=["-","/","*","**","&","|",">>",">>>","<<","^"];exports.NUMBER_BINARY_OPERATORS=NUMBER_BINARY_OPERATORS;var BOOLEAN_UNARY_OPERATORS=["delete","!"];exports.BOOLEAN_UNARY_OPERATORS=BOOLEAN_UNARY_OPERATORS;var NUMBER_UNARY_OPERATORS=["+","-","++","--","~"];exports.NUMBER_UNARY_OPERATORS=NUMBER_UNARY_OPERATORS;var STRING_UNARY_OPERATORS=["typeof"];exports.STRING_UNARY_OPERATORS=STRING_UNARY_OPERATORS;var VISITOR_KEYS=require("./visitor-keys");exports.VISITOR_KEYS=VISITOR_KEYS;var BUILDER_KEYS=require("./builder-keys");exports.BUILDER_KEYS=BUILDER_KEYS;var ALIAS_KEYS=require("./alias-keys");exports.ALIAS_KEYS=ALIAS_KEYS;t.FLIPPED_ALIAS_KEYS={};(0,_lodashCollectionEach2["default"])(t.VISITOR_KEYS,function(keys,type){registerType(type,true)});(0,_lodashCollectionEach2["default"])(t.ALIAS_KEYS,function(aliases,type){(0,_lodashCollectionEach2["default"])(aliases,function(alias){var types=t.FLIPPED_ALIAS_KEYS[alias]=t.FLIPPED_ALIAS_KEYS[alias]||[];types.push(type)})});(0,_lodashCollectionEach2["default"])(t.FLIPPED_ALIAS_KEYS,function(types,type){t[type.toUpperCase()+"_TYPES"]=types;registerType(type,false)});var TYPES=Object.keys(t.VISITOR_KEYS).concat(Object.keys(t.FLIPPED_ALIAS_KEYS));exports.TYPES=TYPES;function is(type,node,opts,skipAliasCheck){if(!node)return false;var matches=isType(node.type,type);if(!matches)return false;if(typeof opts==="undefined"){return true}else{return t.shallowEqual(node,opts)}}function isType(nodeType,targetType){if(nodeType===targetType)return true;var aliases=t.FLIPPED_ALIAS_KEYS[targetType];if(aliases){if(aliases[0]===nodeType)return true;var _arr=aliases;for(var _i=0;_i<_arr.length;_i++){var alias=_arr[_i];if(nodeType===alias)return true}}return false}(0,_lodashCollectionEach2["default"])(t.VISITOR_KEYS,function(keys,type){if(t.BUILDER_KEYS[type])return;var defs={};(0,_lodashCollectionEach2["default"])(keys,function(key){defs[key]=null});t.BUILDER_KEYS[type]=defs});(0,_lodashCollectionEach2["default"])(t.BUILDER_KEYS,function(keys,type){t[type[0].toLowerCase()+type.slice(1)]=function(){var node={};node.start=null;node.type=type;var i=0;for(var key in keys){var arg=arguments[i++];if(arg===undefined)arg=keys[key];node[key]=arg}return node}});function shallowEqual(actual,expected){var keys=Object.keys(expected);var _arr2=keys;for(var _i2=0;_i2<_arr2.length;_i2++){var key=_arr2[_i2];if(actual[key]!==expected[key]){return false}}return true}function appendToMemberExpression(member,append,computed){member.object=t.memberExpression(member.object,member.property,member.computed);member.property=append;member.computed=!!computed;return member}function prependToMemberExpression(member,append){member.object=t.memberExpression(append,member.object);return member}function ensureBlock(node){var key=arguments[1]===undefined?"body":arguments[1];return node[key]=t.toBlock(node[key],node)}function clone(node){var newNode={};for(var key in node){if(key[0]==="_")continue;newNode[key]=node[key]}return newNode}function cloneDeep(node){var newNode={};for(var key in node){if(key[0]==="_")continue;var val=node[key];if(val){if(val.type){val=t.cloneDeep(val)}else if(Array.isArray(val)){val=val.map(t.cloneDeep)}}newNode[key]=val}return newNode}function buildMatchMemberExpression(match,allowPartial){var parts=match.split(".");return function(member){if(!t.isMemberExpression(member))return false;var search=[member];var i=0;while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(parts[i]!==node.name)return false}else if(t.isLiteral(node)){if(parts[i]!==node.value)return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.push(node.object);search.push(node.property);continue}}else{return false}if(++i>parts.length){return false}}return true}}function removeComments(child){var _arr3=COMMENT_KEYS;for(var _i3=0;_i3<_arr3.length;_i3++){var key=_arr3[_i3];delete child[key]}return child}function inheritsComments(child,parent){if(child&&parent){var _arr4=COMMENT_KEYS;for(var _i4=0;_i4<_arr4.length;_i4++){var key=_arr4[_i4];child[key]=(0,_lodashArrayUniq2["default"])((0,_lodashArrayCompact2["default"])([].concat(child[key],parent[key])))}}return child}function inherits(child,parent){if(!child||!parent)return child;child._scopeInfo=parent._scopeInfo;child._paths=parent._paths;child.range=parent.range;child.start=parent.start;child.loc=parent.loc;child.end=parent.end;child.typeAnnotation=parent.typeAnnotation;child.returnType=parent.returnType;t.inheritsComments(child,parent);return child}(0,_toFastProperties2["default"])(t);(0,_toFastProperties2["default"])(t.VISITOR_KEYS);exports.__esModule=true;(0,_lodashObjectAssign2["default"])(t,require("./retrievers"));(0,_lodashObjectAssign2["default"])(t,require("./validators"));(0,_lodashObjectAssign2["default"])(t,require("./converters"));(0,_lodashObjectAssign2["default"])(t,require("./flow"))},{"./alias-keys":178,"./builder-keys":179,"./converters":180,"./flow":181,"./retrievers":183,"./validators":184,"./visitor-keys":185,"lodash/array/compact":337,"lodash/array/uniq":341,"lodash/collection/each":343,"lodash/object/assign":430,"to-fast-properties":505}],183:[function(require,module,exports){"use strict";exports.__esModule=true;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _helpersObject=require("../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _index=require("./index");var t=_interopRequireWildcard(_index);function getBindingIdentifiers(node){var search=[].concat(node);var ids=(0,_helpersObject2["default"])();while(search.length){var id=search.shift();if(!id)continue;var key=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){ids[id.name]=id}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(key&&id[key]){search=search.concat(id[key])}}return ids}getBindingIdentifiers.keys={DeclareClass:"id",DeclareFunction:"id",DeclareModule:"id",DeclareVariable:"id",InterfaceDeclaration:"id",TypeAlias:"id",ComprehensionExpression:"blocks",ComprehensionBlock:"left",CatchClause:"param",UnaryExpression:"argument",AssignmentExpression:"left",ImportSpecifier:"local",ImportNamespaceSpecifier:"local",ImportDefaultSpecifier:"local",ImportDeclaration:"specifiers",FunctionDeclaration:"id",FunctionExpression:"id",ClassDeclaration:"id",ClassExpression:"id",SpreadElement:"argument",RestElement:"argument",UpdateExpression:"argument",SpreadProperty:"argument",Property:"value",AssignmentPattern:"left",ArrayPattern:"elements",ObjectPattern:"properties",VariableDeclaration:"declarations",VariableDeclarator:"id"}},{"../helpers/object":46,"./index":182}],184:[function(require,module,exports){"use strict";exports.__esModule=true;exports.isReferenced=isReferenced;exports.isValidIdentifier=isValidIdentifier;exports.isLet=isLet;exports.isBlockScoped=isBlockScoped;exports.isVar=isVar;exports.isSpecifierDefault=isSpecifierDefault;exports.isScope=isScope;exports.isImmutable=isImmutable;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _esutils=require("esutils");var _esutils2=_interopRequireDefault(_esutils);var _index=require("./index");var t=_interopRequireWildcard(_index);function isReferenced(node,parent){switch(parent.type){case"MemberExpression":if(parent.property===node&&parent.computed){return true}else if(parent.object===node){return true}else{return false}case"MetaProperty":return false;case"Property":if(parent.key===node){return parent.computed}case"VariableDeclarator":return parent.id!==node;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":var _arr=parent.params;for(var _i=0;_i<_arr.length;_i++){var param=_arr[_i];if(param===node)return false}return parent.id!==node;case"ExportSpecifier":if(parent.source){return false}else{return parent.local===node}case"ImportDefaultSpecifier":return false;case"ImportNamespaceSpecifier":return false;case"JSXAttribute":return parent.name!==node;case"ImportSpecifier":return false;case"ClassDeclaration":case"ClassExpression":return parent.id!==node;case"MethodDefinition":return parent.key===node&&parent.computed;case"LabeledStatement":return false;case"CatchClause":return parent.param!==node;case"RestElement":return false;case"AssignmentExpression":case"AssignmentPattern":return parent.right===node;case"ObjectPattern":case"ArrayPattern":return false}return true}function isValidIdentifier(name){if(typeof name!=="string"||_esutils2["default"].keyword.isReservedWordES6(name,true)){return false}else{return _esutils2["default"].keyword.isIdentifierNameES6(name)}}function isLet(node){return t.isVariableDeclaration(node)&&(node.kind!=="var"||node._let)}function isBlockScoped(node){return t.isFunctionDeclaration(node)||t.isClassDeclaration(node)||t.isLet(node)}function isVar(node){return t.isVariableDeclaration(node,{kind:"var"})&&!node._let}function isSpecifierDefault(specifier){return t.isImportDefaultSpecifier(specifier)||t.isIdentifier(specifier.imported||specifier.exported,{name:"default"})}function isScope(node,parent){if(t.isBlockStatement(node)&&t.isFunction(parent,{body:node})){return false}return t.isScopable(node)}function isImmutable(node){if(t.isType(node.type,"Immutable"))return true;if(t.isLiteral(node)){if(node.regex){return false}else{return true}}else if(t.isIdentifier(node)){if(node.name==="undefined"){return true}else{return false}}return false}},{"./index":182,esutils:327}],185:[function(require,module,exports){module.exports={ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation"],ArrowFunctionExpression:["params","body","returnType"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BindExpression:["object","callee"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass","typeParameters","superTypeParameters","implements","decorators"],ClassExpression:["id","body","superClass","typeParameters","superTypeParameters","implements","decorators"],ComprehensionBlock:["left","right"],ComprehensionExpression:["filter","blocks","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],Decorator:["expression"],DebuggerStatement:[],DoWhileStatement:["body","test"],DoExpression:["body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation"],IfStatement:["test","consequent","alternate"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDeclaration:["specifiers","source"],ImportSpecifier:["imported","local"],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value","decorators"],NewExpression:["callee","arguments"],Noop:[],ObjectExpression:["properties"],ObjectPattern:["properties","typeAnnotation"],Program:["body"],Property:["key","value","decorators"],RestElement:["argument","typeAnnotation"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SpreadProperty:["argument"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"],ExportAllDeclaration:["source","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportDefaultSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportSpecifier:["local","exported"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],ClassImplements:["id","typeParameters"],ClassProperty:["key","value","typeAnnotation","decorators"],DeclareClass:["id","typeParameters","extends","body"],DeclareFunction:["id"],DeclareModule:["id","body"],DeclareVariable:["id"],FunctionTypeAnnotation:["typeParameters","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberTypeAnnotation:[],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],TupleTypeAnnotation:["types"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],ObjectTypeAnnotation:["properties","indexers","callProperties"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value"],ObjectTypeProperty:["key","value"],QualifiedTypeIdentifier:["id","qualification"],UnionTypeAnnotation:["types"],VoidTypeAnnotation:[],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","closingElement","children"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXSpreadAttribute:["argument"]}},{}],186:[function(require,module,exports){(function(process,__dirname){"use strict";exports.__esModule=true;exports.canCompile=canCompile;exports.resolve=resolve;exports.resolveRelative=resolveRelative;exports.list=list;exports.regexify=regexify;exports.arrayify=arrayify;exports.booleanify=booleanify;exports.shouldIgnore=shouldIgnore;exports.template=template;exports.parseTemplate=parseTemplate;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}require("./patch");var _lodashStringEscapeRegExp=require("lodash/string/escapeRegExp");var _lodashStringEscapeRegExp2=_interopRequireDefault(_lodashStringEscapeRegExp);var _lodashStringStartsWith=require("lodash/string/startsWith");var _lodashStringStartsWith2=_interopRequireDefault(_lodashStringStartsWith);var _lodashLangCloneDeep=require("lodash/lang/cloneDeep");var _lodashLangCloneDeep2=_interopRequireDefault(_lodashLangCloneDeep);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _messages=require("./messages");var messages=_interopRequireWildcard(_messages);var _minimatch=require("minimatch");var _minimatch2=_interopRequireDefault(_minimatch);var _lodashCollectionContains=require("lodash/collection/contains");var _lodashCollectionContains2=_interopRequireDefault(_lodashCollectionContains);var _traversal=require("./traversal");var _traversal2=_interopRequireDefault(_traversal);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _module2=require("module");var _module3=_interopRequireDefault(_module2);var _lodashLangIsEmpty=require("lodash/lang/isEmpty");var _lodashLangIsEmpty2=_interopRequireDefault(_lodashLangIsEmpty);var _helpersParse=require("./helpers/parse");var _helpersParse2=_interopRequireDefault(_helpersParse);var _path=require("path");var _path2=_interopRequireDefault(_path);var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("./types");var t=_interopRequireWildcard(_types);var _slash=require("slash");var _slash2=_interopRequireDefault(_slash);var _util=require("util");exports.inherits=_util.inherits;exports.inspect=_util.inspect;function canCompile(filename,altExts){var exts=altExts||canCompile.EXTENSIONS;var ext=_path2["default"].extname(filename);return(0,_lodashCollectionContains2["default"])(exts,ext)}canCompile.EXTENSIONS=[".js",".jsx",".es6",".es"];function resolve(loc){try{return require.resolve(loc)}catch(err){return null}}var relativeMod;function resolveRelative(loc){if(typeof _module3["default"]==="object")return null;if(!relativeMod){relativeMod=new _module3["default"];relativeMod.paths=_module3["default"]._nodeModulePaths(process.cwd())}try{return _module3["default"]._resolveFilename(loc,relativeMod)}catch(err){return null}}function list(val){if(!val){return[]}else if(Array.isArray(val)){return val}else if(typeof val==="string"){return val.split(",")}else{return[val]}}function regexify(val){if(!val)return new RegExp(/.^/);if(Array.isArray(val))val=new RegExp(val.map(_lodashStringEscapeRegExp2["default"]).join("|"),"i");if((0,_lodashLangIsString2["default"])(val)){val=(0,_slash2["default"])(val);if((0,_lodashStringStartsWith2["default"])(val,"./")||(0,_lodashStringStartsWith2["default"])(val,"*/"))val=val.slice(2);if((0,_lodashStringStartsWith2["default"])(val,"**/"))val=val.slice(3);var regex=_minimatch2["default"].makeRe(val,{nocase:true});return new RegExp(regex.source.slice(1,-1),"i")}if((0,_lodashLangIsRegExp2["default"])(val))return val;throw new TypeError("illegal type for regexify")}function arrayify(val,mapFn){if(!val)return[];if((0,_lodashLangIsBoolean2["default"])(val))return arrayify([val],mapFn);if((0,_lodashLangIsString2["default"])(val))return arrayify(list(val),mapFn);if(Array.isArray(val)){if(mapFn)val=val.map(mapFn);return val}return[val]}function booleanify(val){if(val==="true")return true;if(val==="false")return false;return val}function shouldIgnore(filename,ignore,only){filename=(0,_slash2["default"])(filename);if(only.length){var _arr=only;for(var _i=0;_i<_arr.length;_i++){var pattern=_arr[_i];if(pattern.test(filename))return false}return true}else if(ignore.length){var _arr2=ignore;for(var _i2=0;_i2<_arr2.length;_i2++){var pattern=_arr2[_i2];if(pattern.test(filename))return true}}return false}var templateVisitor={noScope:true,enter:function enter(node,parent,scope,nodes){if(t.isExpressionStatement(node)){node=node.expression}if(t.isIdentifier(node)&&(0,_lodashObjectHas2["default"])(nodes,node.name)){this.skip();this.replaceInline(nodes[node.name])}},exit:function exit(node){_traversal2["default"].clearNode(node)}};function template(name,nodes,keepExpression){var ast=exports.templates[name];if(!ast)throw new ReferenceError("unknown template "+name);if(nodes===true){keepExpression=true;nodes=null}ast=(0,_lodashLangCloneDeep2["default"])(ast);if(!(0,_lodashLangIsEmpty2["default"])(nodes)){(0,_traversal2["default"])(ast,templateVisitor,null,nodes)}if(ast.body.length>1)return ast.body;var node=ast.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}}function parseTemplate(loc,code){var ast=(0,_helpersParse2["default"])(code,{filename:loc,looseModules:true}).program;ast=_traversal2["default"].removeProperties(ast);return ast}function loadTemplates(){var templates={};var templatesLoc=_path2["default"].join(__dirname,"transformation/templates");if(!_fs2["default"].existsSync(templatesLoc)){throw new ReferenceError(messages.get("missingTemplatesDirectory"))}var _arr3=_fs2["default"].readdirSync(templatesLoc);for(var _i3=0;_i3<_arr3.length;_i3++){var name=_arr3[_i3];if(name[0]===".")return;var key=_path2["default"].basename(name,_path2["default"].extname(name));var loc=_path2["default"].join(templatesLoc,name);var code=_fs2["default"].readFileSync(loc,"utf8");templates[key]=parseTemplate(loc,code)}return templates}try{exports.templates=require("../../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}}).call(this,require("_process"),"/lib/babel")},{"../../templates.json":508,"./helpers/parse":47,"./messages":48,"./patch":49,"./traversal":159,"./types":182,_process:213,fs:202,"lodash/collection/contains":342,"lodash/lang/cloneDeep":416,"lodash/lang/isBoolean":419,"lodash/lang/isEmpty":420,"lodash/lang/isRegExp":426,"lodash/lang/isString":427,"lodash/object/has":433,"lodash/string/escapeRegExp":438,"lodash/string/startsWith":439,minimatch:443,module:202,path:212,slash:492,util:229}],187:[function(require,module,exports){"use strict";module.exports=function(acorn){var tt=acorn.tokTypes;var tc=acorn.tokContexts;tc.j_oTag=new acorn.TokContext("...",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);this.context.push(tc.j_oTag);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;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);++this.pos;if(ch===13&&this.input.charCodeAt(this.pos)===10){++this.pos;out+="\n"}else{out+=String.fromCharCode(ch)}if(this.options.locations){++this.curLine;this.lineStart=this.pos}chunkStart=this.pos}else{++this.pos}}}};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{++this.pos}}out+=this.input.slice(chunkStart,this.pos++);return this.finishToken(tt.string,out)};var XHTMLEntities={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡", - bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};var hexNumber=/^[\da-fA-F]+$/;var decimalNumber=/^\d+$/;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")}node.openingElement=openingElement;node.closingElement=closingElement;node.children=children;if(this.type===tt.relational&&this.value==="<"){this.raise(this.pos,"Adjacent JSX elements must be wrapped in an enclosing tag")}return this.finishNode(node,"JSXElement")};pp.jsx_parseElement=function(){var start=this.markPosition();this.next();return this.jsx_parseElementAt(start)};acorn.plugins.jsx=function(instance){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;this.context.push(tc.j_cTag);this.exprAllowed=false}else{return inner.call(this,prevType)}}})};return acorn}},{}],188:[function(require,module,exports){var types=require("../lib/types");var Type=types.Type;var def=Type.def;var or=Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var isRegExp=builtin.RegExp;var shared=require("../lib/shared");var defaults=shared.defaults;var geq=shared.geq;def("Printable").field("loc",or(def("SourceLocation"),null),defaults["null"],true);def("Node").bases("Printable").field("type",isString).field("comments",or([def("Comment")],null),defaults["null"],true);def("SourceLocation").build("start","end","source").field("start",def("Position")).field("end",def("Position")).field("source",or(isString,null),defaults["null"]);def("Position").build("line","column").field("line",geq(1)).field("column",geq(0));def("Program").bases("Node").build("body").field("body",[def("Statement")]);def("Function").bases("Node").field("id",or(def("Identifier"),null),defaults["null"]).field("params",[def("Pattern")]).field("body",def("BlockStatement"));def("Statement").bases("Node");def("EmptyStatement").bases("Statement").build();def("BlockStatement").bases("Statement").build("body").field("body",[def("Statement")]);def("ExpressionStatement").bases("Statement").build("expression").field("expression",def("Expression"));def("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Statement")).field("alternate",or(def("Statement"),null),defaults["null"]);def("LabeledStatement").bases("Statement").build("label","body").field("label",def("Identifier")).field("body",def("Statement"));def("BreakStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("ContinueStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("WithStatement").bases("Statement").build("object","body").field("object",def("Expression")).field("body",def("Statement"));def("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",def("Expression")).field("cases",[def("SwitchCase")]).field("lexical",isBoolean,defaults["false"]);def("ReturnStatement").bases("Statement").build("argument").field("argument",or(def("Expression"),null));def("ThrowStatement").bases("Statement").build("argument").field("argument",def("Expression"));def("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",def("BlockStatement")).field("handler",or(def("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[def("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[def("CatchClause")],defaults.emptyArray).field("finalizer",or(def("BlockStatement"),null),defaults["null"]);def("CatchClause").bases("Node").build("param","guard","body").field("param",def("Pattern")).field("guard",or(def("Expression"),null),defaults["null"]).field("body",def("BlockStatement"));def("WhileStatement").bases("Statement").build("test","body").field("test",def("Expression")).field("body",def("Statement"));def("DoWhileStatement").bases("Statement").build("body","test").field("body",def("Statement")).field("test",def("Expression"));def("ForStatement").bases("Statement").build("init","test","update","body").field("init",or(def("VariableDeclaration"),def("Expression"),null)).field("test",or(def("Expression"),null)).field("update",or(def("Expression"),null)).field("body",def("Statement"));def("ForInStatement").bases("Statement").build("left","right","body","each").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement")).field("each",isBoolean);def("DebuggerStatement").bases("Statement").build();def("Declaration").bases("Statement");def("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",def("Identifier"));def("FunctionExpression").bases("Function","Expression").build("id","params","body");def("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",or("var","let","const")).field("declarations",[or(def("VariableDeclarator"),def("Identifier"))]);def("VariableDeclarator").bases("Node").build("id","init").field("id",def("Pattern")).field("init",or(def("Expression"),null));def("Expression").bases("Node","Pattern");def("ThisExpression").bases("Expression").build();def("ArrayExpression").bases("Expression").build("elements").field("elements",[or(def("Expression"),null)]);def("ObjectExpression").bases("Expression").build("properties").field("properties",[def("Property")]);def("Property").bases("Node").build("kind","key","value").field("kind",or("init","get","set")).field("key",or(def("Literal"),def("Identifier"))).field("value",or(def("Expression"),def("Pattern")));def("SequenceExpression").bases("Expression").build("expressions").field("expressions",[def("Expression")]);var UnaryOperator=or("-","+","!","~","typeof","void","delete");def("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",UnaryOperator).field("argument",def("Expression")).field("prefix",isBoolean,defaults["true"]);var BinaryOperator=or("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");def("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",BinaryOperator).field("left",def("Expression")).field("right",def("Expression"));var AssignmentOperator=or("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");def("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",AssignmentOperator).field("left",def("Pattern")).field("right",def("Expression"));var UpdateOperator=or("++","--");def("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",UpdateOperator).field("argument",def("Expression")).field("prefix",isBoolean);var LogicalOperator=or("||","&&");def("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",LogicalOperator).field("left",def("Expression")).field("right",def("Expression"));def("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Expression")).field("alternate",def("Expression"));def("NewExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("CallExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("MemberExpression").bases("Expression").build("object","property","computed").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("Pattern").bases("Node");def("ObjectPattern").bases("Pattern").build("properties").field("properties",[or(def("PropertyPattern"),def("Property"))]);def("PropertyPattern").bases("Pattern").build("key","pattern").field("key",or(def("Literal"),def("Identifier"))).field("pattern",def("Pattern"));def("ArrayPattern").bases("Pattern").build("elements").field("elements",[or(def("Pattern"),null)]);def("SwitchCase").bases("Node").build("test","consequent").field("test",or(def("Expression"),null)).field("consequent",[def("Statement")]);def("Identifier").bases("Node","Expression","Pattern").build("name").field("name",isString);def("Literal").bases("Node","Expression").build("value").field("value",or(isString,isBoolean,null,isNumber,isRegExp)).field("regex",or({pattern:isString,flags:isString},null),function(){if(!isRegExp.check(this.value))return null;var flags="";if(this.value.ignoreCase)flags+="i";if(this.value.multiline)flags+="m";if(this.value.global)flags+="g";return{pattern:this.value.source,flags:flags}});def("Comment").bases("Printable").field("value",isString).field("leading",isBoolean,defaults["true"]).field("trailing",isBoolean,defaults["false"]);def("Block").bases("Comment").build("value","leading","trailing");def("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":199,"../lib/types":200}],189:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;def("XMLDefaultDeclaration").bases("Declaration").field("namespace",def("Expression"));def("XMLAnyName").bases("Expression");def("XMLQualifiedIdentifier").bases("Expression").field("left",or(def("Identifier"),def("XMLAnyName"))).field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLAttributeSelector").bases("Expression").field("attribute",def("Expression"));def("XMLFilterExpression").bases("Expression").field("left",def("Expression")).field("right",def("Expression"));def("XMLElement").bases("XML","Expression").field("contents",[def("XML")]);def("XMLList").bases("XML","Expression").field("contents",[def("XML")]);def("XML").bases("Node");def("XMLEscape").bases("XML").field("expression",def("Expression"));def("XMLText").bases("XML").field("text",isString);def("XMLStartTag").bases("XML").field("contents",[def("XML")]);def("XMLEndTag").bases("XML").field("contents",[def("XML")]);def("XMLPointTag").bases("XML").field("contents",[def("XML")]);def("XMLName").bases("XML").field("contents",or(isString,[def("XML")]));def("XMLAttribute").bases("XML").field("value",isString);def("XMLCdata").bases("XML").field("contents",isString);def("XMLComment").bases("XML").field("contents",isString);def("XMLProcessingInstruction").bases("XML").field("target",isString).field("contents",or(isString,null))},{"../lib/types":200,"./core":188}],190:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var isObject=builtin.object;var isString=builtin.string;var defaults=require("../lib/shared").defaults;def("Function").field("generator",isBoolean,defaults["false"]).field("expression",isBoolean,defaults["false"]).field("defaults",[or(def("Expression"),null)],defaults.emptyArray).field("rest",or(def("Identifier"),null),defaults["null"]);def("FunctionDeclaration").build("id","params","body","generator","expression");def("FunctionExpression").build("id","params","body","generator","expression");def("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,defaults["null"]).field("body",or(def("BlockStatement"),def("Expression"))).field("generator",false,defaults["false"]);def("YieldExpression").bases("Expression").build("argument","delegate").field("argument",or(def("Expression"),null)).field("delegate",isBoolean,defaults["false"]);def("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionBlock").bases("Node").build("left","right","each").field("left",def("Pattern")).field("right",def("Expression")).field("each",isBoolean);def("ModuleSpecifier").bases("Literal").build("value").field("value",isString);def("Property").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("method",isBoolean,defaults["false"]).field("shorthand",isBoolean,defaults["false"]).field("computed",isBoolean,defaults["false"]);def("PropertyPattern").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",or("init","get","set","")).field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("value",def("Function")).field("computed",isBoolean,defaults["false"]).field("static",isBoolean,defaults["false"]);def("SpreadElement").bases("Node").build("argument").field("argument",def("Expression"));def("ArrayExpression").field("elements",[or(def("Expression"),def("SpreadElement"),null)]);def("NewExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("CallExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("SpreadElementPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ArrayPattern").field("elements",[or(def("Pattern"),null,def("SpreadElement"))]);var ClassBodyElement=or(def("MethodDefinition"),def("VariableDeclarator"),def("ClassPropertyDefinition"),def("ClassProperty"));def("ClassProperty").bases("Declaration").build("key").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",ClassBodyElement);def("ClassBody").bases("Declaration").build("body").field("body",[ClassBodyElement]);def("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",or(def("Identifier"),null)).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]);def("ClassExpression").bases("Expression").build("id","body","superClass").field("id",or(def("Identifier"),null),defaults["null"]).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]).field("implements",[def("ClassImplements")],defaults.emptyArray);def("ClassImplements").bases("Node").build("id").field("id",def("Identifier")).field("superClass",or(def("Expression"),null),defaults["null"]);def("Specifier").bases("Node");def("NamedSpecifier").bases("Specifier").field("id",def("Identifier")).field("name",or(def("Identifier"),null),defaults["null"]);def("ExportSpecifier").bases("NamedSpecifier").build("id","name");def("ExportBatchSpecifier").bases("Specifier").build();def("ImportSpecifier").bases("NamedSpecifier").build("id","name");def("ImportNamespaceSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ImportDefaultSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",isBoolean).field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"),def("ExportBatchSpecifier"))],defaults.emptyArray).field("source",or(def("Literal"),def("ModuleSpecifier"),null),defaults["null"]);def("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[or(def("ImportSpecifier"),def("ImportNamespaceSpecifier"),def("ImportDefaultSpecifier"))],defaults.emptyArray).field("source",or(def("Literal"),def("ModuleSpecifier")));def("TaggedTemplateExpression").bases("Expression").field("tag",def("Expression")).field("quasi",def("TemplateLiteral"));def("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[def("TemplateElement")]).field("expressions",[def("Expression")]);def("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:isString,raw:isString}).field("tail",isBoolean)},{"../lib/shared":199,"../lib/types":200,"./core":188}],191:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("Function").field("async",isBoolean,defaults["false"]);def("SpreadProperty").bases("Node").build("argument").field("argument",def("Expression"));def("ObjectExpression").field("properties",[or(def("Property"),def("SpreadProperty"))]);def("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ObjectPattern").field("properties",[or(def("PropertyPattern"),def("SpreadPropertyPattern"),def("Property"),def("SpreadProperty"))]);def("AwaitExpression").bases("Expression").build("argument","all").field("argument",or(def("Expression"),null)).field("all",isBoolean,defaults["false"])},{"../lib/shared":199,"../lib/types":200,"./core":188}],192:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("JSXAttribute").bases("Node").build("name","value").field("name",or(def("JSXIdentifier"),def("JSXNamespacedName"))).field("value",or(def("Literal"),def("JSXExpressionContainer"),null),defaults["null"]);def("JSXIdentifier").bases("Identifier").build("name").field("name",isString);def("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",def("JSXIdentifier")).field("name",def("JSXIdentifier"));def("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",or(def("JSXIdentifier"),def("JSXMemberExpression"))).field("property",def("JSXIdentifier")).field("computed",isBoolean,defaults.false);var JSXElementName=or(def("JSXIdentifier"),def("JSXNamespacedName"),def("JSXMemberExpression"));def("JSXSpreadAttribute").bases("Node").build("argument").field("argument",def("Expression"));var JSXAttributes=[or(def("JSXAttribute"),def("JSXSpreadAttribute"))];def("JSXExpressionContainer").bases("Expression").build("expression").field("expression",def("Expression"));def("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",def("JSXOpeningElement")).field("closingElement",or(def("JSXClosingElement"),null),defaults["null"]).field("children",[or(def("JSXElement"),def("JSXExpressionContainer"),def("JSXText"),def("Literal"))],defaults.emptyArray).field("name",JSXElementName,function(){return this.openingElement.name}).field("selfClosing",isBoolean,function(){return this.openingElement.selfClosing}).field("attributes",JSXAttributes,function(){return this.openingElement.attributes});def("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",JSXElementName).field("attributes",JSXAttributes,defaults.emptyArray).field("selfClosing",isBoolean,defaults["false"]);def("JSXClosingElement").bases("Node").build("name").field("name",JSXElementName);def("JSXText").bases("Literal").build("value").field("value",isString);def("JSXEmptyExpression").bases("Expression").build();def("Type").bases("Node");def("AnyTypeAnnotation").bases("Type");def("VoidTypeAnnotation").bases("Type");def("NumberTypeAnnotation").bases("Type");def("StringTypeAnnotation").bases("Type");def("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",isString).field("raw",isString);def("BooleanTypeAnnotation").bases("Type");def("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",def("Type"));def("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",def("Type"));def("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[def("FunctionTypeParam")]).field("returnType",def("Type")).field("rest",or(def("FunctionTypeParam"),null)).field("typeParameters",or(def("TypeParameterDeclaration"),null));def("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",def("Identifier")).field("typeAnnotation",def("Type")).field("optional",isBoolean);def("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",def("Type"));def("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[def("ObjectTypeProperty")]).field("indexers",[def("ObjectTypeIndexer")],defaults.emptyArray).field("callProperties",[def("ObjectTypeCallProperty")],defaults.emptyArray);def("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",or(def("Literal"),def("Identifier"))).field("value",def("Type")).field("optional",isBoolean);def("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",def("Identifier")).field("key",def("Type")).field("value",def("Type"));def("ObjectTypeCallProperty").bases("Node").build("value").field("value",def("FunctionTypeAnnotation")).field("static",isBoolean,false);def("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("id",def("Identifier"));def("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("MemberTypeAnnotation").bases("Type").build("object","property").field("object",def("Identifier")).field("property",or(def("MemberTypeAnnotation"),def("GenericTypeAnnotation")));def("UnionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",def("Type"));def("Identifier").field("typeAnnotation",or(def("TypeAnnotation"),null),defaults["null"]);def("TypeParameterDeclaration").bases("Node").build("params").field("params",[def("Identifier")]);def("TypeParameterInstantiation").bases("Node").build("params").field("params",[def("Type")]);def("Function").field("returnType",or(def("TypeAnnotation"),null),defaults["null"]).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]);def("ClassProperty").build("key","typeAnnotation").field("typeAnnotation",def("TypeAnnotation")).field("static",isBoolean,false);def("ClassImplements").field("typeParameters",or(def("TypeParameterInstantiation"),null),defaults["null"]);def("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]).field("body",def("ObjectTypeAnnotation")).field("extends",[def("InterfaceExtends")]);def("InterfaceExtends").bases("Node").build("id").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null)).field("right",def("Type"));def("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",def("Expression")).field("typeAnnotation",def("TypeAnnotation"));def("TupleTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("DeclareVariable").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareFunction").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareClass").bases("InterfaceDeclaration").build("id");def("DeclareModule").bases("Statement").build("id","body").field("id",or(def("Identifier"),def("Literal"))).field("body",def("BlockStatement"))},{"../lib/shared":199,"../lib/types":200,"./core":188}],193:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var geq=require("../lib/shared").geq;def("Function").field("body",or(def("BlockStatement"),def("Expression")));def("ForOfStatement").bases("Statement").build("left","right","body").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement"));def("LetStatement").bases("Statement").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Statement"));def("LetExpression").bases("Expression").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Expression"));def("GraphExpression").bases("Expression").build("index","expression").field("index",geq(0)).field("expression",def("Literal"));def("GraphIndexExpression").bases("Expression").build("index").field("index",geq(0))},{"../lib/shared":199,"../lib/types":200,"./core":188}],194:[function(require,module,exports){var assert=require("assert");var types=require("../main");var getFieldNames=types.getFieldNames;var getFieldValue=types.getFieldValue;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isDate=types.builtInTypes.Date;var isRegExp=types.builtInTypes.RegExp;var hasOwn=Object.prototype.hasOwnProperty;function astNodesAreEquivalent(a,b,problemPath){if(isArray.check(problemPath)){problemPath.length=0}else{problemPath=null}return areEquivalent(a,b,problemPath); - -}astNodesAreEquivalent.assert=function(a,b){var problemPath=[];if(!astNodesAreEquivalent(a,b,problemPath)){if(problemPath.length===0){assert.strictEqual(a,b)}else{assert.ok(false,"Nodes differ in the following path: "+problemPath.map(subscriptForProperty).join(""))}}};function subscriptForProperty(property){if(/[_$a-z][_$a-z0-9]*/i.test(property)){return"."+property}return"["+JSON.stringify(property)+"]"}function areEquivalent(a,b,problemPath){if(a===b){return true}if(isArray.check(a)){return arraysAreEquivalent(a,b,problemPath)}if(isObject.check(a)){return objectsAreEquivalent(a,b,problemPath)}if(isDate.check(a)){return isDate.check(b)&&+a===+b}if(isRegExp.check(a)){return isRegExp.check(b)&&(a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.ignoreCase===b.ignoreCase)}return a==b}function arraysAreEquivalent(a,b,problemPath){isArray.assert(a);var aLength=a.length;if(!isArray.check(b)||b.length!==aLength){if(problemPath){problemPath.push("length")}return false}for(var i=0;inp){return true}if(pp===np&&this.name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&this.name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&parent.callee===node;case"ConditionalExpression":return this.name==="test"&&parent.test===node;case"MemberExpression":return this.name==="object"&&parent.object===node;default:return false}default:if(parent.type==="NewExpression"&&this.name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}NPp.canBeFirstInStatement=function(){var node=this.node;return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};NPp.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(path){for(var node,parent;path.parent;path=path.parent){node=path.node;parent=path.parent.node;if(n.BlockStatement.check(parent)&&path.parent.name==="body"&&path.name===0){assert.strictEqual(parent.body[0],node);return true}if(n.ExpressionStatement.check(parent)&&path.name==="expression"){assert.strictEqual(parent.expression,node);return true}if(n.SequenceExpression.check(parent)&&path.parent.name==="expressions"&&path.name===0){assert.strictEqual(parent.expressions[0],node);continue}if(n.CallExpression.check(parent)&&path.name==="callee"){assert.strictEqual(parent.callee,node);continue}if(n.MemberExpression.check(parent)&&path.name==="object"){assert.strictEqual(parent.object,node);continue}if(n.ConditionalExpression.check(parent)&&path.name==="test"){assert.strictEqual(parent.test,node);continue}if(isBinary(parent)&&path.name==="left"){assert.strictEqual(parent.left,node);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&path.name==="argument"){assert.strictEqual(parent.argument,node);continue}return false}return true}function cleanUpNodesAfterPrune(remainingNodePath){if(n.VariableDeclaration.check(remainingNodePath.node)){var declarations=remainingNodePath.get("declarations").value;if(!declarations||declarations.length===0){return remainingNodePath.prune()}}else if(n.ExpressionStatement.check(remainingNodePath.node)){if(!remainingNodePath.get("expression").value){return remainingNodePath.prune()}}else if(n.IfStatement.check(remainingNodePath.node)){cleanUpIfStatementAfterPrune(remainingNodePath)}return remainingNodePath}function cleanUpIfStatementAfterPrune(ifStatement){var testExpression=ifStatement.get("test").value;var alternate=ifStatement.get("alternate").value;var consequent=ifStatement.get("consequent").value;if(!consequent&&!alternate){var testExpressionStatement=b.expressionStatement(testExpression);ifStatement.replace(testExpressionStatement)}else if(!consequent&&alternate){var negatedTestExpression=b.unaryExpression("!",testExpression,true);if(n.UnaryExpression.check(testExpression)&&testExpression.operator==="!"){negatedTestExpression=testExpression.argument}ifStatement.get("test").replace(negatedTestExpression);ifStatement.get("consequent").replace(alternate);ifStatement.get("alternate").replace()}}module.exports=NodePath},{"./path":197,"./scope":198,"./types":200,assert:203,util:229}],196:[function(require,module,exports){var assert=require("assert");var types=require("./types");var NodePath=require("./node-path");var Printable=types.namedTypes.Printable;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isFunction=types.builtInTypes.function;var hasOwn=Object.prototype.hasOwnProperty;var undefined;function PathVisitor(){assert.ok(this instanceof PathVisitor);this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this._shouldVisitComments=hasOwn.call(this._methodNameTable,"Block")||hasOwn.call(this._methodNameTable,"Line");this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false}function computeMethodNameTable(visitor){var typeNames=Object.create(null);for(var methodName in visitor){if(/^visit[A-Z]/.test(methodName)){typeNames[methodName.slice("visit".length)]=true}}var supertypeTable=types.computeSupertypeLookupTable(typeNames);var methodNameTable=Object.create(null);var typeNames=Object.keys(supertypeTable);var typeNameCount=typeNames.length;for(var i=0;i=0){parentCache[path.name=i]=path}}else{parentValue[path.name]=path.value;parentCache[path.name]=path}assert.strictEqual(parentValue[path.name],path.value);assert.strictEqual(path.parentPath.get(path.name),path);return path}Pp.replace=function replace(replacement){var results=[];var parentValue=this.parentPath.value;var parentCache=getChildCache(this.parentPath);var count=arguments.length;repairRelationshipWithParent(this);if(isArray.check(parentValue)){var originalLength=parentValue.length;var move=getMoves(this.parentPath,count-1,this.name+1);var spliceArgs=[this.name,1];for(var i=0;i=than},isNumber+" >= "+than)};exports.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return false},"true":function(){return true},undefined:function(){}};var naiveIsPrimitive=Type.or(builtin.string,builtin.number,builtin.boolean,builtin.null,builtin.undefined);exports.isPrimitive=new Type(function(value){if(value===null)return true;var type=typeof value;return!(type==="object"||type==="function")},naiveIsPrimitive.toString())},{"../lib/types":200}],200:[function(require,module,exports){var assert=require("assert");var Ap=Array.prototype;var slice=Ap.slice;var map=Ap.map;var each=Ap.forEach;var Op=Object.prototype;var objToStr=Op.toString;var funObjStr=objToStr.call(function(){});var strObjStr=objToStr.call("");var hasOwn=Op.hasOwnProperty;function Type(check,name){var self=this;assert.ok(self instanceof Type,self);assert.strictEqual(objToStr.call(check),funObjStr,check+" is not a function");var nameObjStr=objToStr.call(name);assert.ok(nameObjStr===funObjStr||nameObjStr===strObjStr,name+" is neither a function nor a string");Object.defineProperties(self,{name:{value:name},check:{value:function(value,deep){var result=check.call(self,value,deep);if(!result&&deep&&objToStr.call(deep)===funObjStr)deep(self,value);return result}}})}var Tp=Type.prototype;exports.Type=Type;Tp.assert=function(value,deep){if(!this.check(value,deep)){var str=shallowStringify(value);assert.ok(false,str+" does not match type "+this);return false}return true};function shallowStringify(value){if(isObject.check(value))return"{"+Object.keys(value).map(function(key){return key+": "+value[key]}).join(", ")+"}";if(isArray.check(value))return"["+value.map(shallowStringify).join(", ")+"]";return JSON.stringify(value)}Tp.toString=function(){var name=this.name;if(isString.check(name))return name;if(isFunction.check(name))return name.call(this)+"";return name+" type"};var builtInTypes={};exports.builtInTypes=builtInTypes;function defBuiltInType(example,name){var objStr=objToStr.call(example);Object.defineProperty(builtInTypes,name,{enumerable:true,value:new Type(function(value){return objToStr.call(value)===objStr},name)});return builtInTypes[name]}var isString=defBuiltInType("","string");var isFunction=defBuiltInType(function(){},"function");var isArray=defBuiltInType([],"array");var isObject=defBuiltInType({},"object");var isRegExp=defBuiltInType(/./,"RegExp");var isDate=defBuiltInType(new Date,"Date");var isNumber=defBuiltInType(3,"number");var isBoolean=defBuiltInType(true,"boolean");var isNull=defBuiltInType(null,"null");var isUndefined=defBuiltInType(void 0,"undefined");function toType(from,name){if(from instanceof Type)return from;if(from instanceof Def)return from.type;if(isArray.check(from))return Type.fromArray(from);if(isObject.check(from))return Type.fromObject(from);if(isFunction.check(from))return new Type(from,name);return new Type(function(value){return value===from},isUndefined.check(name)?function(){return from+""}:name)}Type.or=function(){var types=[];var len=arguments.length;for(var i=0;i=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};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=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};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}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,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/":229}],204:[function(require,module,exports){arguments[4][202][0].apply(exports,arguments)},{dup:202}],205:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var kMaxLength=1073741823;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return arr.foo()===42&&typeof arr.subarray==="function"&&new Uint8Array(1).subarray(1,1).byteLength===0}catch(e){return false}}();function Buffer(subject,encoding){var self=this;if(!(self instanceof Buffer))return new Buffer(subject,encoding);var type=typeof subject;var length;if(type==="number"){length=+subject}else if(type==="string"){length=Buffer.byteLength(subject,encoding)}else if(type==="object"&&subject!==null){if(subject.type==="Buffer"&&isArray(subject.data))subject=subject.data;length=+subject.length}else{throw new TypeError("must start with number, buffer, array or string")}if(length>kMaxLength){throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength.toString(16)+" bytes")}if(length<0)length=0;else length>>>=0;if(Buffer.TYPED_ARRAY_SUPPORT){self=Buffer._augment(new Uint8Array(length))}else{self.length=length;self._isBuffer=true}var i;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof subject.byteLength==="number"){self._set(subject)}else if(isArrayish(subject)){if(Buffer.isBuffer(subject)){for(i=0;i0&&length<=Buffer.poolSize)self.parent=rootParent;return self}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;break;case"utf8":case"utf-8":ret=utf8ToBytes(str).length;break;case"base64":ret=base64ToBytes(str).length;break;default:ret=str.length}return ret};Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined;Buffer.prototype.toString=function toString(encoding,start,end){var loweredCase=false;start=start>>>0;end=end===undefined||end===Infinity?this.length:end>>>0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val)){return arrayIndexOf(this,val,byteOffset)}if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,val,byteOffset)}return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;for(var i=0;byteOffset+iremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;ithis.length){throw new RangeError("attempt to write outside buffer bounds")}var remaining=this.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}encoding=String(encoding||"utf8").toLowerCase();var ret;switch(encoding){case"hex":ret=hexWrite(this,string,offset,length);break;case"utf8":case"utf-8":ret=utf8Write(this,string,offset,length);break;case"ascii":ret=asciiWrite(this,string,offset,length);break;case"binary":ret=binaryWrite(this,string,offset,length);break;case"base64":ret=base64Write(this,string,offset,length);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=utf16leWrite(this,string,offset,length);break;default:throw new TypeError("Unknown encoding: "+encoding)}return ret};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end);for(var i=start;ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||valuebuf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i>>0&255}return offset+byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul>>>0&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value; - - offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||valuebuf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,target_start,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(target_start>=target.length)target_start=target.length;if(!target_start)target_start=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-target_start=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":206,ieee754:207,"is-array":208}],206:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],207:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=nBytes*8-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8);m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8);if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=nBytes*8-mLen-1,eMax=(1<>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8);e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=s*128}},{}],208:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],209:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;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(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i0&&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"){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};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;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}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{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.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};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}},{}],210:[function(require,module,exports){if(typeof Object.create==="function"){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{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],211:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],212:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(isNaN(n)||util.isNull(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else return state.length}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(!util.isNumber(n)||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(util.isNull(ret)){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(!util.isNull(ret))this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(function(){maybeReadMore_(stream,state)})}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;process.nextTick(function(){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}})}}function forEach(xs,f){for(var i=0,l=xs.length;i1){var cbs=[];for(var c=0;c=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:205}],227:[function(require,module,exports){exports.isatty=function(){return false};function ReadStream(){throw new Error("tty.ReadStream is not implemented")}exports.ReadStream=ReadStream;function WriteStream(){throw new Error("tty.ReadStream is not implemented")}exports.WriteStream=WriteStream},{}],228:[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"}},{}],229:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;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=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}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;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]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+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){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}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=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}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");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-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]}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"||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"];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(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){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":228,_process:213,inherits:210}],230:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(process.platform==="win32"){ansiStyles.blue.open=""}function build(_styles){var builder=function builder(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a0;i--){line=lines[i];if(~line.indexOf("sourceMappingURL=data:"))return exports.fromComment(line)}}Converter.prototype.toJSON=function(space){return JSON.stringify(this.sourcemap,null,space)};Converter.prototype.toBase64=function(){var json=this.toJSON();return new Buffer(json).toString("base64")};Converter.prototype.toComment=function(options){var base64=this.toBase64();var data="sourceMappingURL=data:application/json;base64,"+base64;return options&&options.multiline?"/*# "+data+" */":"//# "+data};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(key,value){if(this.sourcemap.hasOwnProperty(key))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(key,value)};Converter.prototype.setProperty=function(key,value){this.sourcemap[key]=value;return this};Converter.prototype.getProperty=function(key){return this.sourcemap[key]};exports.fromObject=function(obj){return new Converter(obj)};exports.fromJSON=function(json){return new Converter(json,{isJSON:true})};exports.fromBase64=function(base64){return new Converter(base64,{isEncoded:true})};exports.fromComment=function(comment){comment=comment.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(comment,{isEncoded:true,hasComment:true})};exports.fromMapFileComment=function(comment,dir){return new Converter(comment,{commentFileDir:dir,isFileComment:true,isJSON:true})};exports.fromSource=function(content,largeSource){if(largeSource)return convertFromLargeSource(content);var m=content.match(commentRx);commentRx.lastIndex=0;return m?exports.fromComment(m.pop()):null};exports.fromMapFileSource=function(content,dir){var m=content.match(mapFileCommentRx);mapFileCommentRx.lastIndex=0;return m?exports.fromMapFileComment(m.pop(),dir):null};exports.removeComments=function(src){commentRx.lastIndex=0;return src.replace(commentRx,"")};exports.removeMapFileComments=function(src){mapFileCommentRx.lastIndex=0;return src.replace(mapFileCommentRx,"")};Object.defineProperty(exports,"commentRegex",{get:function getCommentRegex(){commentRx.lastIndex=0;return commentRx}});Object.defineProperty(exports,"mapFileCommentRegex",{get:function getMapFileCommentRegex(){mapFileCommentRx.lastIndex=0;return mapFileCommentRx}})}).call(this,require("buffer").Buffer)},{buffer:205,fs:202,path:212}],239:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function(IS_INCLUDES){return function(el){var O=$.toObject(this),length=$.toLength(O.length),index=$.toIndex(arguments[1],length),value;if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$":258}],240:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function(callbackfn){var O=Object($.assertDefined(this)),self=$.ES5Object(O),f=ctx(callbackfn,arguments[1],3),length=$.toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$":258,"./$.ctx":248}],241:[function(require,module,exports){var $=require("./$");function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}assert.def=$.assertDefined;assert.fn=function(it){if(!$.isFunction(it))throw TypeError(it+" is not a function!");return it};assert.obj=function(it){if(!$.isObject(it))throw TypeError(it+" is not an object!");return it};assert.inst=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it};module.exports=assert},{"./$":258}],242:[function(require,module,exports){var $=require("./$"),enumKeys=require("./$.enum-keys");module.exports=Object.assign||function assign(target,source){var T=Object($.assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=$.ES5Object(arguments[i++]),keys=enumKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$":258,"./$.enum-keys":250}],243:[function(require,module,exports){var $=require("./$"),TAG=require("./$.wks")("toStringTag"),toString={}.toString;function cof(it){return toString.call(it).slice(8,-1)}cof.classof=function(it){var O,T;return it==undefined?it===undefined?"Undefined":"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:cof(O)};cof.set=function(it,tag,stat){if(it&&!$.has(it=stat?it:it.prototype,TAG))$.hide(it,TAG,tag)};module.exports=cof},{"./$":258,"./$.wks":269}],244:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),step=require("./$.iter").step,has=$.has,set=$.set,isObject=$.isObject,hide=$.hide,isFrozen=Object.isFrozen||$.core.Object.isFrozen,ID=safe("id"),O1=safe("O1"),LAST=safe("last"),FIRST=safe("first"),ITER=safe("iter"),SIZE=$.DESC?safe("size"):"size",id=0;function fastKey(it,create){if(!isObject(it))return(typeof it=="string"?"S":"P")+it;if(isFrozen(it))return"F";if(!has(it,ID)){if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(){var that=assert.inst(this,C,NAME),iterable=arguments[0];set(that,O1,$.create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)}$.mix(C.prototype,{clear:function clear(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function forEach(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function has(key){return!!getEntry(this,key)}});if($.DESC)$.setDesc(C.prototype,"size",{get:function(){return assert.def(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!="F")that[O1][index]=entry}return that},getEntry:getEntry,setIter:function(C,NAME,IS_MAP){require("./$.iter-define")(C,NAME,function(iterated,kind){set(this,ITER,{o:iterated,k:kind})},function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){iter.o=undefined;return step(1)}if(kind=="keys")return step(0,entry.k);if(kind=="values")return step(0,entry.v);return step(0,[entry.k,entry.v])},IS_MAP?"entries":"values",!IS_MAP,true)}}},{"./$":258,"./$.assert":241,"./$.ctx":248,"./$.for-of":251,"./$.iter":257,"./$.iter-define":255,"./$.uid":267}],245:[function(require,module,exports){var $def=require("./$.def"),forOf=require("./$.for-of");module.exports=function(NAME){$def($def.P,NAME,{toJSON:function toJSON(){var arr=[];forOf(this,false,arr.push,arr);return arr}})}},{"./$.def":249,"./$.for-of":251}],246:[function(require,module,exports){"use strict";var $=require("./$"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),_has=$.has,isObject=$.isObject,hide=$.hide,isFrozen=Object.isFrozen||$.core.Object.isFrozen,id=0,ID=safe("id"),WEAK=safe("weak"),LEAK=safe("leak"),method=require("./$.array-methods"),find=method(5),findIndex=method(6);function findFrozen(store,key){return find.call(store.array,function(it){return it[0]===key})}function leakStore(that){return that[LEAK]||hide(that,LEAK,{array:[],get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.array.push([key,value])},"delete":function(key){var index=findIndex.call(this.array,function(it){return it[0]===key});if(~index)this.array.splice(index,1);return!!~index}})[LEAK]}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(){$.set(assert.inst(this,C,NAME),ID,id++);var iterable=arguments[0];if(iterable!=undefined)forOf(iterable,IS_MAP,this[ADDER],this)}$.mix(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this)["delete"](key);return _has(key,WEAK)&&_has(key[WEAK],this[ID])&&delete key[WEAK][this[ID]]},has:function has(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this).has(key);return _has(key,WEAK)&&_has(key[WEAK],this[ID])}});return C},def:function(that,key,value){if(isFrozen(assert.obj(key))){leakStore(that).set(key,value)}else{_has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that[ID]]=value}return that},leakStore:leakStore,WEAK:WEAK,ID:ID}},{"./$":258,"./$.array-methods":240,"./$.assert":241,"./$.for-of":251,"./$.uid":267}],247:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),BUGGY=require("./$.iter").BUGGY,forOf=require("./$.for-of"),species=require("./$.species"),assertInstance=require("./$.assert").inst;module.exports=function(NAME,methods,common,IS_MAP,IS_WEAK){var Base=$.g[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};function fixMethod(KEY,CHAIN){var method=proto[KEY];if($.FW)proto[KEY]=function(a,b){var result=method.call(this,a===0?0:a,b);return CHAIN?this:result}}if(!$.isFunction(C)||!(IS_WEAK||!BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(NAME,IS_MAP,ADDER);$.mix(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](IS_WEAK?{}:-0,1),buggyZero;if(!require("./$.iter-detect")(function(iter){new C(iter)})){C=function(){assertInstance(this,C,NAME);var that=new Base,iterable=arguments[0];if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that);return that};C.prototype=proto;if($.FW)proto.constructor=C}IS_WEAK||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER,true)}require("./$.cof").set(C,NAME);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);species(C);species($.core[NAME]);if(!IS_WEAK)common.setIter(C,NAME,IS_MAP);return C}},{"./$":258,"./$.assert":241,"./$.cof":243,"./$.def":249,"./$.for-of":251,"./$.iter":257,"./$.iter-detect":256,"./$.species":264}],248:[function(require,module,exports){var assertFunction=require("./$.assert").fn;module.exports=function(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.assert":241}],249:[function(require,module,exports){var $=require("./$"),global=$.g,core=$.core,isFunction=$.isFunction;function ctx(fn,that){return function(){return fn.apply(that,arguments)}}global.core=core;$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;function $def(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,target=isGlobal?global:type&$def.S?global[name]:(global[name]||{}).prototype,exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;out=(own?target:source)[key];if(type&$def.B&&own)exp=ctx(out,global);else exp=type&$def.P&&isFunction(out)?ctx(Function.call,out):out;if(target&&!own){if(isGlobal)target[key]=out;else delete target[key]&&$.hide(target,key,out)}if(exports[key]!=out)$.hide(exports,key,exp)}}module.exports=$def},{"./$":258}],250:[function(require,module,exports){var $=require("./$");module.exports=function(it){var keys=$.getKeys(it),getDesc=$.getDesc,getSymbols=$.getSymbols;if(getSymbols)$.each.call(getSymbols(it),function(key){if(getDesc(it,key).enumerable)keys.push(key)});return keys}},{"./$":258}],251:[function(require,module,exports){var ctx=require("./$.ctx"),get=require("./$.iter").get,call=require("./$.iter-call");module.exports=function(iterable,entries,fn,that){var iterator=get(iterable),f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done){if(call(iterator,f,step.value,entries)===false){return call.close(iterator)}}}},{"./$.ctx":248,"./$.iter":257,"./$.iter-call":254}],252:[function(require,module,exports){module.exports=function($){$.FW=true;$.path=$.g;return $}},{}],253:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}},{}],254:[function(require,module,exports){var assertObject=require("./$.assert").obj;function close(iterator){var ret=iterator["return"];if(ret!==undefined)assertObject(ret.call(iterator))}function call(iterator,fn,value,entries){try{return entries?fn(assertObject(value)[0],value[1]):fn(value)}catch(e){close(iterator);throw e}}call.close=close;module.exports=call},{"./$.assert":241}],255:[function(require,module,exports){var $def=require("./$.def"),$=require("./$"),cof=require("./$.cof"),$iter=require("./$.iter"),SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",VALUES="values",Iterators=$iter.Iterators;module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){$iter.create(Constructor,NAME,next);function createMethod(kind){return function(){return new Constructor(this,kind)}}var TAG=NAME+" Iterator",proto=Base.prototype,_native=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],_default=_native||createMethod(DEFAULT),methods,key;if(_native){var IteratorPrototype=$.getProto(_default.call(new Base));cof.set(IteratorPrototype,TAG,true);if($.FW&&$.has(proto,FF_ITERATOR))$iter.set(IteratorPrototype,$.that)}if($.FW)$iter.set(proto,_default);Iterators[NAME]=_default;Iterators[TAG]=$.that;if(DEFAULT){methods={keys:IS_SET?_default:createMethod("keys"),values:DEFAULT==VALUES?_default:createMethod(VALUES),entries:DEFAULT!=VALUES?_default:createMethod("entries")};if(FORCE)for(key in methods){if(!(key in proto))$.hide(proto,key,methods[key])}else $def($def.P+$def.F*$iter.BUGGY,NAME,methods)}}},{"./$":258,"./$.cof":243,"./$.def":249,"./$.iter":257,"./$.wks":269}],256:[function(require,module,exports){var SYMBOL_ITERATOR=require("./$.wks")("iterator"),SAFE_CLOSING=false;try{var riter=[7][SYMBOL_ITERATOR]();riter["return"]=function(){SAFE_CLOSING=true};Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec){if(!SAFE_CLOSING)return false;var safe=false;try{var arr=[7],iter=arr[SYMBOL_ITERATOR]();iter.next=function(){safe=true};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return safe}},{"./$.wks":269}],257:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),assertObject=require("./$.assert").obj,SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",Iterators={},IteratorPrototype={};setIterator(IteratorPrototype,$.that);function setIterator(O,value){$.hide(O,SYMBOL_ITERATOR,value);if(FF_ITERATOR in[])$.hide(O,FF_ITERATOR,value)}module.exports={BUGGY:"keys"in[]&&!("next"in[].keys()),Iterators:Iterators,step:function(done,value){return{value:value,done:!!done}},is:function(it){var O=Object(it),Symbol=$.g.Symbol,SYM=Symbol&&Symbol.iterator||FF_ITERATOR;return SYM in O||SYMBOL_ITERATOR in O||$.has(Iterators,cof.classof(O))},get:function(it){var Symbol=$.g.Symbol,ext=it[Symbol&&Symbol.iterator||FF_ITERATOR],getIter=ext||it[SYMBOL_ITERATOR]||Iterators[cof.classof(it)];return assertObject(getIter.call(it))},set:setIterator,create:function(Constructor,NAME,next,proto){Constructor.prototype=$.create(proto||IteratorPrototype,{next:$.desc(1,next)});cof.set(Constructor,NAME+" Iterator")}}},{"./$":258,"./$.assert":241,"./$.cof":243,"./$.wks":269}],258:[function(require,module,exports){"use strict";var global=typeof self!="undefined"?self:Function("return this")(),core={},defineProperty=Object.defineProperty,hasOwnProperty={}.hasOwnProperty,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min;var DESC=!!function(){try{return defineProperty({},"a",{get:function(){return 2}}).a==2}catch(e){}}();var hide=createDefiner(1);function toInteger(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}function desc(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return $.setDesc(object,key,desc(bitmap,value))}:simpleSet}function isObject(it){return it!==null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}function assertDefined(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}var $=module.exports=require("./$.fw")({g:global,core:core,html:global.document&&document.documentElement,isObject:isObject,isFunction:isFunction,it:function(it){return it},that:function(){return this},toInteger:toInteger,toLength:function(it){return it>0?min(toInteger(it),9007199254740991):0},toIndex:function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)},has:function(it,key){return hasOwnProperty.call(it,key)},create:Object.create,getProto:Object.getPrototypeOf,DESC:DESC,desc:desc,getDesc:Object.getOwnPropertyDescriptor,setDesc:defineProperty,setDescs:Object.defineProperties,getKeys:Object.keys,getNames:Object.getOwnPropertyNames,getSymbols:Object.getOwnPropertySymbols,assertDefined:assertDefined,ES5Object:Object,toObject:function(it){return $.ES5Object(assertDefined(it))},hide:hide,def:createDefiner(0),set:global.Symbol?simpleSet:hide,mix:function(target,src){for(var key in src)hide(target,key,src[key]);return target},each:[].forEach});if(typeof __e!="undefined")__e=core;if(typeof __g!="undefined")__g=global},{"./$.fw":252}],259:[function(require,module,exports){var $=require("./$");module.exports=function(object,el){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":258}],260:[function(require,module,exports){var $=require("./$"),assertObject=require("./$.assert").obj;module.exports=function ownKeys(it){assertObject(it);var keys=$.getNames(it),getSymbols=$.getSymbols;return getSymbols?keys.concat(getSymbols(it)):keys}},{"./$":258,"./$.assert":241}],261:[function(require,module,exports){"use strict";var $=require("./$"),invoke=require("./$.invoke"),assertFunction=require("./$.assert").fn;module.exports=function(){var fn=assertFunction(this),length=arguments.length,pargs=Array(length),i=0,_=$.path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$":258,"./$.assert":241,"./$.invoke":253}],262:[function(require,module,exports){"use strict";module.exports=function(regExp,replace,isStatic){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}},{}],263:[function(require,module,exports){var $=require("./$"),assert=require("./$.assert");function check(O,proto){assert.obj(O);assert(proto===null||$.isObject(proto),proto,": can't set as prototype!")}module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,$.getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined),check:check}},{"./$":258,"./$.assert":241,"./$.ctx":248}],264:[function(require,module,exports){var $=require("./$"),SPECIES=require("./$.wks")("species");module.exports=function(C){if($.DESC&&!(SPECIES in C))$.setDesc(C,SPECIES,{configurable:true,get:$.that})}},{"./$":258,"./$.wks":269}],265:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function(TO_STRING){return function(pos){var s=String($.assertDefined(this)),i=$.toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$":258}],266:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),invoke=require("./$.invoke"),global=$.g,isFunction=$.isFunction,html=$.html,document=global.document,process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,postMessage=global.postMessage,addEventListener=global.addEventListener,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;function run(){var id=+this;if($.has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run.call(event.data)}if(!isFunction(setTask)||!isFunction(clearTask)){setTask=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearTask=function(id){delete queue[id]};if(cof(process)=="process"){defer=function(id){process.nextTick(ctx(run,id,1))}}else if(addEventListener&&isFunction(postMessage)&&!global.importScripts){defer=function(id){postMessage(id,"*")};addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if(document&&ONREADYSTATECHANGE in document.createElement("script")){defer=function(id){html.appendChild(document.createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$":258,"./$.cof":243,"./$.ctx":248,"./$.invoke":253}],267:[function(require,module,exports){var sid=0;function uid(key){return"Symbol("+key+")_"+(++sid+Math.random()).toString(36)}uid.safe=require("./$").g.Symbol||uid;module.exports=uid},{"./$":258}],268:[function(require,module,exports){var $=require("./$"),UNSCOPABLES=require("./$.wks")("unscopables");if($.FW&&!(UNSCOPABLES in[]))$.hide(Array.prototype,UNSCOPABLES,{});module.exports=function(key){if($.FW)[][UNSCOPABLES][key]=true}},{"./$":258,"./$.wks":269}],269:[function(require,module,exports){var global=require("./$").g,store={};module.exports=function(name){return store[name]||(store[name]=global.Symbol&&global.Symbol[name]||require("./$.uid").safe("Symbol."+name))}},{"./$":258,"./$.uid":267}],270:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid").safe("__proto__"),assert=require("./$.assert"),assertObject=assert.obj,ObjectProto=Object.prototype,A=[],slice=A.slice,indexOf=A.indexOf,classof=cof.classof,has=$.has,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,defineProperties=$.setDescs,isFunction=$.isFunction,toObject=$.toObject,toLength=$.toLength,IE8_DOM_DEFINE=false;if(!$.DESC){try{IE8_DOM_DEFINE=defineProperty(document.createElement("div"),"x",{get:function(){return 8}}).x==8}catch(e){}$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)assertObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};$.setDescs=defineProperties=function(O,Properties){assertObject(O);var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!$.DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=document.createElement("iframe"),i=keysLen1,gt=">",iframeDocument;iframe.style.display="none";$.html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write(" + - \ No newline at end of file + diff --git a/demo/index.html b/demo/index.html index 7a46b37..3ed4cc3 100644 --- a/demo/index.html +++ b/demo/index.html @@ -7,7 +7,7 @@ Open console tab in dev tools! - + - \ No newline at end of file + diff --git a/demo/libs/requirejs.js b/demo/libs/require.js similarity index 99% rename from demo/libs/requirejs.js rename to demo/libs/require.js index b65b5ce..3628047 100644 --- a/demo/libs/requirejs.js +++ b/demo/libs/require.js @@ -1,5 +1,5 @@ /** vim: et:ts=4:sw=4:sts=4 - * @license RequireJS 2.1.17+ Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. + * @license RequireJS 2.1.18 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */ @@ -12,7 +12,7 @@ var requirejs, require, define; (function (global) { var req, s, head, baseElement, dataMain, src, interactiveScript, currentlyAddingScript, mainScript, subPath, - version = '2.1.17+', + version = '2.1.18', commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, jsSuffixRegExp = /\.js$/, @@ -589,7 +589,7 @@ var requirejs, require, define; id: mod.map.id, uri: mod.map.url, config: function () { - return getOwn(config.config, mod.map.id) || {}; + return getOwn(config.config, mod.map.id) || {}; }, exports: mod.exports || (mod.exports = {}) }); @@ -1236,7 +1236,8 @@ var requirejs, require, define; while (defQueue.length) { args = defQueue.shift(); if (args[0] === null) { - return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])); + return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + + args[args.length - 1])); } else { //args are id, deps, factory. Should be normalized by the //define() function. @@ -1323,7 +1324,7 @@ var requirejs, require, define; each(cfg.packages, function (pkgObj) { var location, name; - pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj; + pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj; name = pkgObj.name; location = pkgObj.location; @@ -1350,7 +1351,7 @@ var requirejs, require, define; //late to modify them, and ignore unnormalized ones //since they are transient. if (!mod.inited && !mod.map.unnormalized) { - mod.map = makeModuleMap(id); + mod.map = makeModuleMap(id, null, true); } }); @@ -1497,7 +1498,7 @@ var requirejs, require, define; //in array so that the splices do not //mess up the iteration. eachReverse(defQueue, function(args, i) { - if(args[0] === id) { + if (args[0] === id) { defQueue.splice(i, 1); } }); @@ -1984,7 +1985,7 @@ var requirejs, require, define; //like a module name. mainScript = mainScript.replace(jsSuffixRegExp, ''); - //If mainScript is still a path, fall back to dataMain + //If mainScript is still a path, fall back to dataMain if (req.jsExtRegExp.test(mainScript)) { mainScript = dataMain; } @@ -2070,7 +2071,6 @@ var requirejs, require, define; jQuery: true }; - /** * Executes the text. Normally just uses eval, but can be modified * to use a better, environment-specific call. Only used for transpiling diff --git a/demo/main-built.js b/demo/main-built.js index aeaf49b..43ce999 100644 --- a/demo/main-built.js +++ b/demo/main-built.js @@ -2,8 +2,10 @@ var fetchText, _buildMap = {}; define('es6',[ - ], function( - ) { + 'module' +], function( + _module + ) { return { load: function (name, req, onload, config) { }, @@ -28,13 +30,13 @@ define('es6!src/sum',["exports", "module"], function (exports, module) { define('es6!src/class',['exports', 'es6!src/sum'], function (exports, _es6SrcSum) { 'use strict'; - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var _sum = _interopRequire(_es6SrcSum); + var _sum = _interopRequireDefault(_es6SrcSum); - console.log(_sum(1, 2)); + console.log((0, _sum['default'])(1, 2)); var A = function A(a) { _classCallCheck(this, A); diff --git a/external-helpers.js b/external-helpers.js index adfd29b..20a8936 100644 --- a/external-helpers.js +++ b/external-helpers.js @@ -294,20 +294,21 @@ }; babelHelpers._extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; } + } + } - return target; - }; + return target; + }; babelHelpers.get = function get(object, property, receiver) { + if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { diff --git a/external-helpers.min.js b/external-helpers.min.js index f410292..34c6e60 100644 --- a/external-helpers.min.js +++ b/external-helpers.min.js @@ -1 +1 @@ -(function(global){var babelHelpers=global.babelHelpers={};babelHelpers.inherits=function(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)subClass.__proto__=superClass};babelHelpers.defaults=function(obj,defaults){var keys=Object.getOwnPropertyNames(defaults);for(var i=0;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i]}return target};babelHelpers.hasOwn=Object.prototype.hasOwnProperty;babelHelpers.slice=Array.prototype.slice;babelHelpers.bind=Function.prototype.bind;babelHelpers.defineProperty=function(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})};babelHelpers.asyncToGenerator=function(fn){return function(){var gen=fn.apply(this,arguments);return new Promise(function(resolve,reject){var callNext=step.bind(null,"next");var callThrow=step.bind(null,"throw");function step(key,arg){try{var info=gen[key](arg);var value=info.value}catch(error){reject(error);return}if(info.done){resolve(value)}else{Promise.resolve(value).then(callNext,callThrow)}}callNext()})}};babelHelpers.interopRequireWildcard=function(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}};babelHelpers.interopRequireDefault=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};babelHelpers._typeof=function(obj){return obj&&obj.constructor===Symbol?"symbol":typeof obj};babelHelpers._extends=Object.assign||function(target){for(var i=1;i=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i]}return target};babelHelpers.hasOwn=Object.prototype.hasOwnProperty;babelHelpers.slice=Array.prototype.slice;babelHelpers.bind=Function.prototype.bind;babelHelpers.defineProperty=function(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})};babelHelpers.asyncToGenerator=function(fn){return function(){var gen=fn.apply(this,arguments);return new Promise(function(resolve,reject){var callNext=step.bind(null,"next");var callThrow=step.bind(null,"throw");function step(key,arg){try{var info=gen[key](arg);var value=info.value}catch(error){reject(error);return}if(info.done){resolve(value)}else{Promise.resolve(value).then(callNext,callThrow)}}callNext()})}};babelHelpers.interopRequireWildcard=function(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}};babelHelpers.interopRequireDefault=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};babelHelpers._typeof=function(obj){return obj&&obj.constructor===Symbol?"symbol":typeof obj};babelHelpers._extends=Object.assign||function(target){for(var i=1;i")) { + node.params.push(this.flow_parseTypeAnnotatableIdentifier()); + if (!this.isRelational(">")) { + this.expect(tt.comma); + } + } + this.expectRelational(">"); + + return this.finishNode(node, "TypeParameterDeclaration"); +}; + +pp.flow_parseTypeParameterInstantiation = function () { + var node = this.startNode(), + oldInType = this.inType; + node.params = []; + + this.inType = true; + + this.expectRelational("<"); + while (!this.isRelational(">")) { + node.params.push(this.flow_parseType()); + if (!this.isRelational(">")) { + this.expect(tt.comma); + } + } + this.expectRelational(">"); + + this.inType = oldInType; + + return this.finishNode(node, "TypeParameterInstantiation"); +}; + +pp.flow_parseObjectPropertyKey = function () { + return this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); +}; + +pp.flow_parseObjectTypeIndexer = function (node, isStatic) { + node["static"] = isStatic; + + this.expect(tt.bracketL); + node.id = this.flow_parseObjectPropertyKey(); + this.expect(tt.colon); + node.key = this.flow_parseType(); + this.expect(tt.bracketR); + this.expect(tt.colon); + node.value = this.flow_parseType(); + + this.flow_objectTypeSemicolon(); + return this.finishNode(node, "ObjectTypeIndexer"); +}; + +pp.flow_parseObjectTypeMethodish = function (node) { + node.params = []; + node.rest = null; + node.typeParameters = null; + + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + } + + this.expect(tt.parenL); + while (this.type === tt.name) { + node.params.push(this.flow_parseFunctionTypeParam()); + if (this.type !== tt.parenR) { + this.expect(tt.comma); + } + } + + if (this.eat(tt.ellipsis)) { + node.rest = this.flow_parseFunctionTypeParam(); + } + this.expect(tt.parenR); + this.expect(tt.colon); + node.returnType = this.flow_parseType(); + + return this.finishNode(node, "FunctionTypeAnnotation"); +}; + +pp.flow_parseObjectTypeMethod = function (start, isStatic, key) { + var node = this.startNodeAt(start); + node.value = this.flow_parseObjectTypeMethodish(this.startNodeAt(start)); + node["static"] = isStatic; + node.key = key; + node.optional = false; + this.flow_objectTypeSemicolon(); + return this.finishNode(node, "ObjectTypeProperty"); +}; + +pp.flow_parseObjectTypeCallProperty = function (node, isStatic) { + var valueNode = this.startNode(); + node["static"] = isStatic; + node.value = this.flow_parseObjectTypeMethodish(valueNode); + this.flow_objectTypeSemicolon(); + return this.finishNode(node, "ObjectTypeCallProperty"); +}; + +pp.flow_parseObjectType = function (allowStatic) { + var nodeStart = this.startNode(); + var node; + var optional = false; + var property; + var propertyKey; + var propertyTypeAnnotation; + var token; + var isStatic; + + nodeStart.callProperties = []; + nodeStart.properties = []; + nodeStart.indexers = []; + + this.expect(tt.braceL); + + while (this.type !== tt.braceR) { + var start = this.markPosition(); + node = this.startNode(); + if (allowStatic && this.isContextual("static")) { + this.next(); + isStatic = true; + } + + if (this.type === tt.bracketL) { + nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node, isStatic)); + } else if (this.type === tt.parenL || this.isRelational("<")) { + nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node, allowStatic)); + } else { + if (isStatic && this.type === tt.colon) { + propertyKey = this.parseIdent(); + } else { + propertyKey = this.flow_parseObjectPropertyKey(); + } + if (this.isRelational("<") || this.type === tt.parenL) { + // This is a method property + nodeStart.properties.push(this.flow_parseObjectTypeMethod(start, isStatic, propertyKey)); + } else { + if (this.eat(tt.question)) { + optional = true; + } + this.expect(tt.colon); + node.key = propertyKey; + node.value = this.flow_parseType(); + node.optional = optional; + node["static"] = isStatic; + this.flow_objectTypeSemicolon(); + nodeStart.properties.push(this.finishNode(node, "ObjectTypeProperty")); + } + } + } + + this.expect(tt.braceR); + + return this.finishNode(nodeStart, "ObjectTypeAnnotation"); +}; + +pp.flow_objectTypeSemicolon = function () { + if (!this.eat(tt.semi) && !this.eat(tt.comma) && this.type !== tt.braceR) { + this.unexpected(); + } +}; + +pp.flow_parseGenericType = function (start, id) { + var node = this.startNodeAt(start); + + node.typeParameters = null; + node.id = id; + + while (this.eat(tt.dot)) { + var node2 = this.startNodeAt(start); + node2.qualification = node.id; + node2.id = this.parseIdent(); + node.id = this.finishNode(node2, "QualifiedTypeIdentifier"); + } + + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterInstantiation(); + } + + return this.finishNode(node, "GenericTypeAnnotation"); +}; + +pp.flow_parseTypeofType = function () { + var node = this.startNode(); + this.expect(tt._typeof); + node.argument = this.flow_parsePrimaryType(); + return this.finishNode(node, "TypeofTypeAnnotation"); +}; + +pp.flow_parseTupleType = function () { + var node = this.startNode(); + node.types = []; + this.expect(tt.bracketL); + // We allow trailing commas + while (this.pos < this.input.length && this.type !== tt.bracketR) { + node.types.push(this.flow_parseType()); + if (this.type === tt.bracketR) break; + this.expect(tt.comma); + } + this.expect(tt.bracketR); + return this.finishNode(node, "TupleTypeAnnotation"); +}; + +pp.flow_parseFunctionTypeParam = function () { + var optional = false; + var node = this.startNode(); + node.name = this.parseIdent(); + if (this.eat(tt.question)) { + optional = true; + } + this.expect(tt.colon); + node.optional = optional; + node.typeAnnotation = this.flow_parseType(); + return this.finishNode(node, "FunctionTypeParam"); +}; + +pp.flow_parseFunctionTypeParams = function () { + var ret = { params: [], rest: null }; + while (this.type === tt.name) { + ret.params.push(this.flow_parseFunctionTypeParam()); + if (this.type !== tt.parenR) { + this.expect(tt.comma); + } + } + if (this.eat(tt.ellipsis)) { + ret.rest = this.flow_parseFunctionTypeParam(); + } + return ret; +}; + +pp.flow_identToTypeAnnotation = function (start, node, id) { + switch (id.name) { + case "any": + return this.finishNode(node, "AnyTypeAnnotation"); + + case "void": + return this.finishNode(node, "VoidTypeAnnotation"); + + case "bool": + case "boolean": + return this.finishNode(node, "BooleanTypeAnnotation"); + + case "mixed": + return this.finishNode(node, "MixedTypeAnnotation"); + + case "number": + return this.finishNode(node, "NumberTypeAnnotation"); + + case "string": + return this.finishNode(node, "StringTypeAnnotation"); + + default: + return this.flow_parseGenericType(start, id); + } +}; + +// The parsing of types roughly parallels the parsing of expressions, and +// primary types are kind of like primary expressions...they're the +// primitives with which other types are constructed. +pp.flow_parsePrimaryType = function () { + var typeIdentifier = null; + var params = null; + var returnType = null; + var start = this.markPosition(); + var node = this.startNode(); + var rest = null; + var tmp; + var typeParameters; + var token; + var type; + var isGroupedType = false; + + switch (this.type) { + case tt.name: + return this.flow_identToTypeAnnotation(start, node, this.parseIdent()); + + case tt.braceL: + return this.flow_parseObjectType(); + + case tt.bracketL: + return this.flow_parseTupleType(); + + case tt.relational: + if (this.value === "<") { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + this.expect(tt.parenL); + tmp = this.flow_parseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; + this.expect(tt.parenR); + + this.expect(tt.arrow); + + node.returnType = this.flow_parseType(); + + return this.finishNode(node, "FunctionTypeAnnotation"); + } + + case tt.parenL: + this.next(); + + // Check to see if this is actually a grouped type + if (this.type !== tt.parenR && this.type !== tt.ellipsis) { + if (this.type === tt.name) { + var token = this.lookahead().type; + isGroupedType = token !== tt.question && token !== tt.colon; + } else { + isGroupedType = true; + } + } + + if (isGroupedType) { + type = this.flow_parseType(); + this.expect(tt.parenR); + + // If we see a => next then someone was probably confused about + // function types, so we can provide a better error message + if (this.eat(tt.arrow)) { + this.raise(node, "Unexpected token =>. It looks like " + "you are trying to write a function type, but you ended up " + "writing a grouped type followed by an =>, which is a syntax " + "error. Remember, function type parameters are named so function " + "types look like (name1: type1, name2: type2) => returnType. You " + "probably wrote (type1) => returnType"); + } + + return type; + } + + tmp = this.flow_parseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; + + this.expect(tt.parenR); + + this.expect(tt.arrow); + + node.returnType = this.flow_parseType(); + node.typeParameters = null; + + return this.finishNode(node, "FunctionTypeAnnotation"); + + case tt.string: + node.value = this.value; + node.raw = this.input.slice(this.start, this.end); + this.next(); + return this.finishNode(node, "StringLiteralTypeAnnotation"); + + default: + if (this.type.keyword === "typeof") { + return this.flow_parseTypeofType(); + } + } + + this.unexpected(); +}; + +pp.flow_parsePostfixType = function () { + var node = this.startNode(); + var type = node.elementType = this.flow_parsePrimaryType(); + if (this.type === tt.bracketL) { + this.expect(tt.bracketL); + this.expect(tt.bracketR); + return this.finishNode(node, "ArrayTypeAnnotation"); + } + return type; +}; + +pp.flow_parsePrefixType = function () { + var node = this.startNode(); + if (this.eat(tt.question)) { + node.typeAnnotation = this.flow_parsePrefixType(); + return this.finishNode(node, "NullableTypeAnnotation"); + } + return this.flow_parsePostfixType(); +}; + +pp.flow_parseIntersectionType = function () { + var node = this.startNode(); + var type = this.flow_parsePrefixType(); + node.types = [type]; + while (this.eat(tt.bitwiseAND)) { + node.types.push(this.flow_parsePrefixType()); + } + return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); +}; + +pp.flow_parseUnionType = function () { + var node = this.startNode(); + var type = this.flow_parseIntersectionType(); + node.types = [type]; + while (this.eat(tt.bitwiseOR)) { + node.types.push(this.flow_parseIntersectionType()); + } + return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); +}; + +pp.flow_parseType = function () { + var oldInType = this.inType; + this.inType = true; + var type = this.flow_parseUnionType(); + this.inType = oldInType; + return type; +}; + +pp.flow_parseTypeAnnotation = function () { + var node = this.startNode(); + + var oldInType = this.inType; + this.inType = true; + this.expect(tt.colon); + node.typeAnnotation = this.flow_parseType(); + this.inType = oldInType; + + return this.finishNode(node, "TypeAnnotation"); +}; + +pp.flow_parseTypeAnnotatableIdentifier = function (requireTypeAnnotation, canBeOptionalParam) { + var node = this.startNode(); + var ident = this.parseIdent(); + var isOptionalParam = false; + + if (canBeOptionalParam && this.eat(tt.question)) { + this.expect(tt.question); + isOptionalParam = true; + } + + if (requireTypeAnnotation || this.type === tt.colon) { + ident.typeAnnotation = this.flow_parseTypeAnnotation(); + this.finishNode(ident, ident.type); + } + + if (isOptionalParam) { + ident.optional = true; + this.finishNode(ident, ident.type); + } + + return ident; +}; + +acorn.plugins.flow = function (instance) { + // function name(): string {} + instance.extend("parseFunctionBody", function (inner) { + return function (node, allowExpression) { + if (this.type === tt.colon) { + node.returnType = this.flow_parseTypeAnnotation(); + } + + return inner.call(this, node, allowExpression); + }; + }); + + instance.extend("parseStatement", function (inner) { + return function (declaration, topLevel) { + // strict mode handling of `interface` since it's a reserved word + if (this.strict && this.type === tt.name && this.value === "interface") { + var node = this.startNode(); + this.next(); + return this.flow_parseInterface(node); + } else { + return inner.call(this, declaration, topLevel); + } + }; + }); + + instance.extend("parseExpressionStatement", function (inner) { + return function (node, expr) { + if (expr.type === "Identifier") { + if (expr.name === "declare") { + if (this.type === tt._class || this.type === tt.name || this.type === tt._function || this.type === tt._var) { + return this.flow_parseDeclare(node); + } + } else if (this.type === tt.name) { + if (expr.name === "interface") { + return this.flow_parseInterface(node); + } else if (expr.name === "type") { + return this.flow_parseTypeAlias(node); + } + } + } + + return inner.call(this, node, expr); + }; + }); + + instance.extend("shouldParseExportDeclaration", function (inner) { + return function () { + return this.isContextual("type") || inner.call(this); + }; + }); + + instance.extend("parseParenItem", function (inner) { + return function (node, start) { + if (this.type === tt.colon) { + var typeCastNode = this.startNodeAt(start); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.flow_parseTypeAnnotation(); + return this.finishNode(typeCastNode, "TypeCastExpression"); + } else { + return node; + } + }; + }); + + instance.extend("parseClassId", function (inner) { + return function (node, isStatement) { + inner.call(this, node, isStatement); + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + } + }; + }); + + // don't consider `void` to be a keyword as then it'll use the void token type + // and set startExpr + instance.extend("isKeyword", function (inner) { + return function (name) { + if (this.inType && name === "void") { + return false; + } else { + return inner.call(this, name); + } + }; + }); + + instance.extend("readToken", function (inner) { + return function (code) { + if (this.inType && (code === 62 || code === 60)) { + return this.finishOp(tt.relational, 1); + } else { + return inner.call(this, code); + } + }; + }); + + instance.extend("jsx_readToken", function (inner) { + return function () { + if (!this.inType) return inner.call(this); + }; + }); + + instance.extend("parseParenArrowList", function (inner) { + return function (start, exprList, isAsync) { + for (var i = 0; i < exprList.length; i++) { + var listItem = exprList[i]; + if (listItem.type === "TypeCastExpression") { + var expr = listItem.expression; + expr.typeAnnotation = listItem.typeAnnotation; + exprList[i] = expr; + } + } + return inner.call(this, start, exprList, isAsync); + }; + }); + + instance.extend("parseClassProperty", function (inner) { + return function (node) { + if (this.type === tt.colon) { + node.typeAnnotation = this.flow_parseTypeAnnotation(); + } + return inner.call(this, node); + }; + }); + instance.extend("isClassProperty", function (inner) { + return function () { + return this.type === tt.colon || inner.call(this); + }; + }); + + instance.extend("parseClassMethod", function (inner) { + return function (classBody, method, isGenerator, isAsync) { + var typeParameters; + if (this.isRelational("<")) { + typeParameters = this.flow_parseTypeParameterDeclaration(); + } + method.value = this.parseMethod(isGenerator, isAsync); + method.value.typeParameters = typeParameters; + classBody.body.push(this.finishNode(method, "MethodDefinition")); + }; + }); + + instance.extend("parseClassSuper", function (inner) { + return function (node, isStatement) { + inner.call(this, node, isStatement); + if (node.superClass && this.isRelational("<")) { + node.superTypeParameters = this.flow_parseTypeParameterInstantiation(); + } + if (this.isContextual("implements")) { + this.next(); + var implemented = node["implements"] = []; + do { + var node = this.startNode(); + node.id = this.parseIdent(); + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + implemented.push(this.finishNode(node, "ClassImplements")); + } while (this.eat(tt.comma)); + } + }; + }); + + instance.extend("parseObjPropValue", function (inner) { + return function (prop) { + var typeParameters; + if (this.isRelational("<")) { + typeParameters = this.flow_parseTypeParameterDeclaration(); + if (this.type !== tt.parenL) this.unexpected(); + } + inner.apply(this, arguments); + prop.value.typeParameters = typeParameters; + }; + }); + + instance.extend("parseAssignableListItemTypes", function (inner) { + return function (param) { + if (this.eat(tt.question)) { + param.optional = true; + } + if (this.type === tt.colon) { + param.typeAnnotation = this.flow_parseTypeAnnotation(); + } + this.finishNode(param, param.type); + return param; + }; + }); + + instance.extend("parseImportSpecifiers", function (inner) { + return function (node) { + node.isType = false; + if (this.isContextual("type")) { + var start = this.markPosition(); + var typeId = this.parseIdent(); + if (this.type === tt.name && this.value !== "from" || this.type === tt.braceL || this.type === tt.star) { + node.isType = true; + } else { + node.specifiers.push(this.parseImportSpecifierDefault(typeId, start)); + if (this.isContextual("from")) return; + this.eat(tt.comma); + } + } + inner.call(this, node); + }; + }); + + // function foo() {} + instance.extend("parseFunctionParams", function (inner) { + return function (node) { + if (this.isRelational("<")) { + node.typeParameters = this.flow_parseTypeParameterDeclaration(); + } + inner.call(this, node); + }; + }); + + // var foo: string = bar + instance.extend("parseVarHead", function (inner) { + return function (decl) { + inner.call(this, decl); + if (this.type === tt.colon) { + decl.id.typeAnnotation = this.flow_parseTypeAnnotation(); + this.finishNode(decl.id, decl.id.type); + } + }; + }); +}; +},{"../src/index":5}],3:[function(require,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[1]` means `!(x[1])` +// instead of `(!x)[1]` is handled by the fact that the parser +// function that parses unary prefix operators is called first, and +// in turn calls the function that parses `[]` subscripts — that +// way, it'll receive the node for `x[1]` already parsed, and wraps +// *that* in the unary operator node. +// +// Acorn uses an [operator precedence parser][opp] to handle binary +// operator precedence, because it is much more compact than using +// the technique outlined above, which uses different, nesting +// functions to specify precedence, for all of the ten binary +// precedence levels that JavaScript defines. +// +// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser + +"use strict"; + +var _tokentype = require("./tokentype"); + +var _state = require("./state"); + +var _identifier = require("./identifier"); + +var _util = require("./util"); + +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, + 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.raise(key.start, "Redefinition of __proto__ property"); + propHash.proto = true; + } + return; + } + var other = undefined; + if (_util.has(propHash, name)) { + other = propHash[name]; + var isGetSet = kind !== "init"; + if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(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, refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); + if (this.type === _tokentype.types.comma) { + var node = this.startNodeAt(start); + node.expressions = [expr]; + while (this.eat(_tokentype.types.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); + return this.finishNode(node, "SequenceExpression"); + } + return expr; +}; + +// Parse an assignment expression. This includes applications of +// operators like `+=`. + +pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { + if (this.type == _tokentype.types._yield && this.inGenerator) return this.parseYield(); + + var failOnShorthandAssign = undefined; + if (!refShorthandDefaultPos) { + refShorthandDefaultPos = { start: 0 }; + failOnShorthandAssign = true; + } else { + failOnShorthandAssign = false; + } + var start = this.markPosition(); + if (this.type == _tokentype.types.parenL || this.type == _tokentype.types.name) this.potentialArrowAt = this.start; + var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); + if (afterLeftParse) left = afterLeftParse.call(this, left, start); + if (this.type.isAssign) { + var node = this.startNodeAt(start); + node.operator = this.value; + node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left; + refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly + this.checkLVal(left); + if (left.parenthesizedExpression) { + var errorMsg = undefined; + if (left.type === "ObjectPattern") { + errorMsg = "`({a}) = 0` use `({a} = 0)`"; + } else if (left.type === "ArrayPattern") { + errorMsg = "`([a]) = 0` use `([a] = 0)`"; + } + if (errorMsg) { + this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg); + } + } + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression"); + } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + return left; +}; + +// Parse a ternary conditional (`?:`) operator. + +pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseExprOps(noIn, refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + if (this.eat(_tokentype.types.question)) { + var node = this.startNodeAt(start); + 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, refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseMaybeUnary(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + return this.parseExprOp(expr, start, -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, leftStart, minPrec, noIn) { + var prec = this.type.binop; + if (prec != null && (!noIn || this.type !== _tokentype.types._in)) { + if (prec > minPrec) { + var node = this.startNodeAt(leftStart); + node.left = left; + node.operator = this.value; + var op = this.type; + this.next(); + var start = this.markPosition(); + node.right = this.parseExprOp(this.parseMaybeUnary(), start, op.rightAssociative ? prec - 1 : prec, noIn); + this.finishNode(node, op === _tokentype.types.logicalOR || op === _tokentype.types.logicalAND ? "LogicalExpression" : "BinaryExpression"); + return this.parseExprOp(node, leftStart, minPrec, noIn); + } + } + return left; +}; + +// Parse unary operators, both prefix and postfix. + +pp.parseMaybeUnary = function (refShorthandDefaultPos) { + 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(); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); + if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); + return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } + var start = this.markPosition(); + var expr = this.parseExprSubscripts(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + while (this.type.postfix && !this.canInsertSemicolon()) { + var node = this.startNodeAt(start); + node.operator = this.value; + node.prefix = false; + node.argument = expr; + this.checkLVal(expr); + this.next(); + expr = this.finishNode(node, "UpdateExpression"); + } + return expr; +}; + +// Parse call, dot, and `[]`-subscript expressions. + +pp.parseExprSubscripts = function (refShorthandDefaultPos) { + var start = this.markPosition(); + var expr = this.parseExprAtom(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + return this.parseSubscripts(expr, start); +}; + +pp.parseSubscripts = function (base, start, noCalls) { + if (!noCalls && this.eat(_tokentype.types.doubleColon)) { + var node = this.startNodeAt(start); + node.object = base; + node.callee = this.parseNoCallExpr(); + return this.parseSubscripts(this.finishNode(node, "BindExpression"), start, noCalls); + } else if (this.eat(_tokentype.types.dot)) { + var node = this.startNodeAt(start); + node.object = base; + node.property = this.parseIdent(true); + node.computed = false; + return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); + } else if (this.eat(_tokentype.types.bracketL)) { + var node = this.startNodeAt(start); + node.object = base; + node.property = this.parseExpression(); + node.computed = true; + this.expect(_tokentype.types.bracketR); + return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); + } else if (!noCalls && this.eat(_tokentype.types.parenL)) { + var node = this.startNodeAt(start); + node.callee = base; + node.arguments = this.parseExprList(_tokentype.types.parenR, this.options.features["es7.trailingFunctionCommas"]); + return this.parseSubscripts(this.finishNode(node, "CallExpression"), start, noCalls); + } else if (this.type === _tokentype.types.backQuote) { + var node = this.startNodeAt(start); + node.tag = base; + node.quasi = this.parseTemplate(); + return this.parseSubscripts(this.finishNode(node, "TaggedTemplateExpression"), start, noCalls); + }return base; +}; + +// Parse a no-call expression (like argument of `new` or `::` operators). + +pp.parseNoCallExpr = function () { + var start = this.markPosition(); + return this.parseSubscripts(this.parseExprAtom(), start, true); +}; + +// Parse an atomic expression — either a single token that is an +// expression, an expression started by a keyword like `function` or +// `new`, or an expression wrapped in punctuation like `()`, `[]`, +// or `{}`. + +pp.parseExprAtom = function (refShorthandDefaultPos) { + var node = 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._yield: + if (this.inGenerator) this.unexpected(); + + case _tokentype.types._do: + if (this.options.features["es7.doExpressions"]) { + var _node = this.startNode(); + this.next(); + var oldInFunction = this.inFunction; + var oldLabels = this.labels; + this.labels = []; + this.inFunction = false; + _node.body = this.parseBlock(); + this.inFunction = oldInFunction; + this.labels = oldLabels; + return this.finishNode(_node, "DoExpression"); + } + + case _tokentype.types.name: + var start = this.markPosition(); + node = this.startNode(); + var id = this.parseIdent(this.type !== _tokentype.types.name); + + // + if (this.options.features["es7.asyncFunctions"]) { + // async functions! + if (id.name === "async" && !this.canInsertSemicolon()) { + // arrow functions + if (this.type === _tokentype.types.parenL) { + var expr = this.parseParenAndDistinguishExpression(start, true, true); + if (expr && expr.type === "ArrowFunctionExpression") { + return expr; + } else { + node.callee = id; + if (!expr) { + node.arguments = []; + } else if (expr.type === "SequenceExpression") { + node.arguments = expr.expressions; + } else { + node.arguments = [expr]; + } + return this.parseSubscripts(this.finishNode(node, "CallExpression"), start); + } + } else if (this.type === _tokentype.types.name) { + id = this.parseIdent(); + this.expect(_tokentype.types.arrow); + return this.parseArrowExpression(node, [id], true); + } + + // normal functions + if (this.type === _tokentype.types._function && !this.canInsertSemicolon()) { + this.next(); + return this.parseFunction(node, false, false, true); + } + } else if (id.name === "await") { + if (this.inAsync) return this.parseAwait(node); + } + } + // + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) return this.parseArrowExpression(this.startNodeAt(start), [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(null, null, canBeArrow); + + case _tokentype.types.bracketL: + node = this.startNode(); + this.next(); + // check whether this is array comprehension or regular array + if ((this.options.ecmaVersion >= 7 || this.options.features["es7.comprehensions"]) && this.type === _tokentype.types._for) { + return this.parseComprehension(node, false); + } + node.elements = this.parseExprList(_tokentype.types.bracketR, true, true, refShorthandDefaultPos); + return this.finishNode(node, "ArrayExpression"); + + case _tokentype.types.braceL: + return this.parseObj(false, refShorthandDefaultPos); + + case _tokentype.types._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, false); + + case _tokentype.types.at: + this.parseDecorators(); + + case _tokentype.types._class: + node = this.startNode(); + this.takeDecorators(node); + return this.parseClass(node, false); + + case _tokentype.types._new: + return this.parseNew(); + + case _tokentype.types.backQuote: + return this.parseTemplate(); + + case _tokentype.types.doubleColon: + node = this.startNode(); + this.next(); + node.object = null; + var callee = node.callee = this.parseNoCallExpr(); + if (callee.type !== "MemberExpression") this.raise(callee.start, "Binding should be performed on object property."); + return this.finishNode(node, "BindExpression"); + + 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 (start, isAsync, canBeArrow) { + start = start || this.markPosition(); + var val = undefined; + if (this.options.ecmaVersion >= 6) { + this.next(); + + if ((this.options.features["es7.comprehensions"] || this.options.ecmaVersion >= 7) && this.type === _tokentype.types._for) { + return this.parseComprehension(this.startNodeAt(start), true); + } + + var innerStart = this.markPosition(), + exprList = [], + first = true; + var refShorthandDefaultPos = { start: 0 }, + spreadStart = undefined, + innerParenStart = undefined; + while (this.type !== _tokentype.types.parenR) { + first ? first = false : this.expect(_tokentype.types.comma); + if (this.type === _tokentype.types.ellipsis) { + var spreadNodeStart = this.markPosition(); + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStart)); + break; + } else { + if (this.type === _tokentype.types.parenL && !innerParenStart) { + innerParenStart = this.start; + } + exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); + } + } + var innerEnd = this.markPosition(); + this.expect(_tokentype.types.parenR); + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) { + if (innerParenStart) this.unexpected(innerParenStart); + return this.parseParenArrowList(start, exprList, isAsync); + } + + if (!exprList.length) { + if (isAsync) { + return; + } else { + this.unexpected(this.lastTokStart); + } + } + if (spreadStart) this.unexpected(spreadStart); + if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); + + if (exprList.length > 1) { + val = this.startNodeAt(innerStart); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEnd); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(start); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression"); + } else { + val.parenthesizedExpression = true; + return val; + } +}; + +pp.parseParenArrowList = function (start, exprList, isAsync) { + return this.parseArrowExpression(this.startNodeAt(start), exprList, isAsync); +}; + +pp.parseParenItem = function (node, start) { + return node; +}; + +// New's precedence is slightly tricky. It must allow its argument +// to be a `[]` or dot subscript expression, but not a call — at +// least, not without wrapping it in parentheses. Thus, it uses the + +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.raise(node.property.start, "The only valid meta property for new is new.target"); + return this.finishNode(node, "MetaProperty"); + } + node.callee = this.parseNoCallExpr(); + if (this.eat(_tokentype.types.parenL)) node.arguments = this.parseExprList(_tokentype.types.parenR, this.options.features["es7.trailingFunctionCommas"]);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, refShorthandDefaultPos) { + var node = this.startNode(), + first = true, + propHash = {}; + node.properties = []; + var decorators = []; + 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; + while (this.type === _tokentype.types.at) { + decorators.push(this.parseDecorator()); + } + var prop = this.startNode(), + isGenerator = false, + isAsync = false, + start = undefined; + if (decorators.length) { + prop.decorators = decorators; + decorators = []; + } + if (this.options.features["es7.objectRestSpread"] && this.type === _tokentype.types.ellipsis) { + prop = this.parseSpread(); + prop.type = "SpreadProperty"; + node.properties.push(prop); + continue; + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refShorthandDefaultPos) start = this.markPosition(); + if (!isPattern) isGenerator = this.eat(_tokentype.types.star); + } + if (this.options.features["es7.asyncFunctions"] && this.isContextual("async")) { + if (isGenerator || isPattern) this.unexpected(); + var asyncId = this.parseIdent(); + if (this.type === _tokentype.types.colon || this.type === _tokentype.types.parenL) { + prop.key = asyncId; + } else { + isAsync = true; + this.parsePropertyName(prop); + } + } else { + this.parsePropertyName(prop); + } + this.parseObjPropValue(prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos); + this.checkPropClash(prop, propHash); + node.properties.push(this.finishNode(prop, "Property")); + } + if (decorators.length) { + this.raise(this.start, "You have trailing decorators with no property"); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); +}; + +pp.parseObjPropValue = function (prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos) { + if (this.eat(_tokentype.types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault() : this.parseMaybeAssign(false, refShorthandDefaultPos); + 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, isAsync); + } 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 || isAsync || 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.raise(_start, "getter should have no params");else this.raise(_start, "setter should have exactly one param"); + } + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + prop.kind = "init"; + if (isPattern) { + if (this.isKeyword(prop.key.name) || this.strict && (_identifier.reservedWords.strictBind(prop.key.name) || _identifier.reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); + prop.value = this.parseMaybeDefault(start, prop.key); + } else if (this.type === _tokentype.types.eq && refShorthandDefaultPos) { + if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start; + prop.value = this.parseMaybeDefault(start, 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, isAsync) { + node.id = null; + if (this.options.ecmaVersion >= 6) { + node.generator = false; + node.expression = false; + } + if (this.options.features["es7.asyncFunctions"]) { + node.async = !!isAsync; + } +}; + +// Parse object or class method. + +pp.parseMethod = function (isGenerator, isAsync) { + var node = this.startNode(); + this.initFunction(node, isAsync); + this.expect(_tokentype.types.parenL); + node.params = this.parseBindingList(_tokentype.types.parenR, false, this.options.features["es7.trailingFunctionCommas"]); + if (this.options.ecmaVersion >= 6) { + node.generator = isGenerator; + } + this.parseFunctionBody(node); + return this.finishNode(node, "FunctionExpression"); +}; + +// Parse arrow function expression with given parameters. + +pp.parseArrowExpression = function (node, params, isAsync) { + this.initFunction(node, isAsync); + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true); + return this.finishNode(node, "ArrowFunctionExpression"); +}; + +// Parse function body and check parameters. + +pp.parseFunctionBody = function (node, allowExpression) { + var isExpression = allowExpression && this.type !== _tokentype.types.braceL; + + var oldInAsync = this.inAsync; + this.inAsync = node.async; + if (isExpression) { + node.body = this.parseMaybeAssign(); + node.expression = true; + } else { + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldInFunc = this.inFunction, + oldInGen = this.inGenerator, + oldLabels = this.labels; + this.inFunction = true;this.inGenerator = node.generator;this.labels = []; + node.body = this.parseBlock(true); + node.expression = false; + this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; + } + this.inAsync = oldInAsync; + + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { + var nameHash = {}, + oldStrict = this.strict; + this.strict = true; + if (node.id) this.checkLVal(node.id, true); + for (var i = 0; i < node.params.length; i++) { + this.checkLVal(node.params[i], true, nameHash); + }this.strict = oldStrict; + } +}; + +// Parses a comma-separated list of expressions, and returns them as +// an array. `close` is the token type that ends the list, and +// `allowEmpty` can be turned on to allow subsequent commas with +// nothing in between them to be parsed as `null` (which is needed +// for array literals). + +pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) { + var elts = [], + first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(_tokentype.types.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) break; + } else first = false; + + if (allowEmpty && this.type === _tokentype.types.comma) { + elts.push(null); + } else { + if (this.type === _tokentype.types.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos)); + } + } + 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.options.allowReserved && this.isReservedWord(this.value) || this.strict && _identifier.reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); + 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 await expression inside async function. + +pp.parseAwait = function (node) { + if (this.eat(_tokentype.types.semi) || this.canInsertSemicolon()) { + this.unexpected(); + } + node.all = this.eat(_tokentype.types.star); + node.argument = this.parseMaybeUnary(); + return this.finishNode(node, "AwaitExpression"); +}; + +// Parses yield expression inside generator. + +pp.parseYield = function () { + var node = this.startNode(); + this.next(); + if (this.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"); +}; + +// Parses array and generator comprehensions. + +pp.parseComprehension = function (node, isGenerator) { + node.blocks = []; + while (this.type === _tokentype.types._for) { + var block = this.startNode(); + this.next(); + this.expect(_tokentype.types.parenL); + block.left = this.parseBindingAtom(); + this.checkLVal(block.left, true); + this.expectContextual("of"); + block.right = this.parseExpression(); + this.expect(_tokentype.types.parenR); + node.blocks.push(this.finishNode(block, "ComprehensionBlock")); + } + node.filter = this.eat(_tokentype.types._if) ? this.parseParenExpression() : null; + node.body = this.parseExpression(); + this.expect(isGenerator ? _tokentype.types.parenR : _tokentype.types.bracketR); + node.generator = isGenerator; + return this.finishNode(node, "ComprehensionExpression"); +}; +},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){ +// This is a trick taken from Esprima. It turns out that, on +// non-Chrome browsers, to check whether a string is in a set, a +// predicate containing a big ugly `switch` statement is faster than +// a regular expression, and on Chrome the two are about on par. +// This function uses `eval` (non-lexical) to produce such a +// predicate from a space-separated string of words. +// +// It starts by sorting the words by length. + +"use strict"; + +exports.__esModule = true; +exports.isIdentifierStart = isIdentifierStart; +exports.isIdentifierChar = isIdentifierChar; +function makePredicate(words) { + words = words.split(" "); + return function (str) { + return words.indexOf(str) >= 0; + }; +} + +// Reserved word lists for various dialects of the language + +var reservedWords = { + 3: makePredicate("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: makePredicate("class enum extends super const export import"), + 6: makePredicate("enum await"), + strict: makePredicate("implements interface let package private protected public static yield"), + strictBind: makePredicate("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: makePredicate(ecma5AndLessKeywords), + 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield 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 `tools/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 tools/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, 98, 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, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 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, 16355, 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, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 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, 4305, 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); +} +},{}],5:[function(require,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 +// +// http://marijnhaverbeke.nl/git/acorn +// https://github.com/marijnh/acorn.git +// +// Please use the [github bug tracker][ghbt] to report issues. +// +// [ghbt]: https://github.com/marijnh/acorn/issues +// +// This file defines the main parser interface. The library also comes +// with a [error-tolerant parser][dammit] and an +// [abstract syntax tree walker][walk], 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 = require("./state"); + +var _options = require("./options"); + +require("./parseutil"); + +require("./statement"); + +require("./lval"); + +require("./expression"); + +require("./lookahead"); + +exports.Parser = _state.Parser; +exports.plugins = _state.plugins; +exports.defaultOptions = _options.defaultOptions; + +var _location = require("./location"); + +exports.SourceLocation = _location.SourceLocation; +exports.getLineInfo = _location.getLineInfo; + +var _node = require("./node"); + +exports.Node = _node.Node; + +var _tokentype = require("./tokentype"); + +exports.TokenType = _tokentype.TokenType; +exports.tokTypes = _tokentype.types; + +var _tokencontext = require("./tokencontext"); + +exports.TokContext = _tokencontext.TokContext; +exports.tokContexts = _tokencontext.types; + +var _identifier = require("./identifier"); + +exports.isIdentifierChar = _identifier.isIdentifierChar; +exports.isIdentifierStart = _identifier.isIdentifierStart; + +var _tokenize = require("./tokenize"); + +exports.Token = _tokenize.Token; + +var _whitespace = require("./whitespace"); + +exports.isNewLine = _whitespace.isNewLine; +exports.lineBreak = _whitespace.lineBreak; +exports.lineBreakG = _whitespace.lineBreakG; +var version = "1.0.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]. +// +// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API + +function parse(input, options) { + var p = parser(options, input); + var startPos = p.options.locations ? [p.pos, p.curPosition()] : p.pos; + p.nextToken(); + return p.parseTopLevel(p.options.program || p.startNodeAt(startPos)); +} + +// 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 = parser(options, input, pos); + p.nextToken(); + return p.parseExpression(); +} + +// Acorn is organized as a tokenizer and a recursive-descent parser. +// The `tokenize` export provides an interface to the tokenizer. +// Because the tokenizer is optimized for being efficiently used by +// the Acorn parser itself, this interface is somewhat crude and not +// very modular. + +function tokenizer(input, options) { + return parser(options, input); +} + +function parser(options, input) { + return new _state.Parser(_options.getOptions(options), String(input)); +} +},{"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,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 _state = require("./state"); + +var _whitespace = require("./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; +}; + +exports.SourceLocation = SourceLocation; + +// The `getLineInfo` function is mostly useful when the +// `locations` option is off (for performance reasons) and you +// want to find the line/column position for a given character +// offset. `input` should be the code string that the offset refers +// into. + +function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + _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); + } + } +} + +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 = 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.curPosition = function () { + return new Position(this.curLine, this.pos - this.lineStart); +}; + +pp.markPosition = function () { + return this.options.locations ? [this.start, this.startLoc] : this.start; +}; +},{"./state":12,"./whitespace":18}],7:[function(require,module,exports){ +"use strict"; + +var _state = require("./state"); + +var pp = _state.Parser.prototype; + +var STATE_KEYS = ["lastTokStartLoc", "lastTokEndLoc", "lastTokStart", "lastTokEnd", "lineStart", "startLoc", "curLine", "endLoc", "start", "pos", "end", "type", "value", "exprAllowed", "potentialArrowAt", "currLine", "input", "inType", "inFunction", "inGenerator", "labels"]; + +pp.getState = function () { + var state = {}; + for (var i = 0; i < STATE_KEYS.length; i++) { + var key = STATE_KEYS[i]; + state[key] = this[key]; + } + state.context = this.context.slice(); + state.labels = this.labels.slice(); + return state; +}; + +pp.lookahead = function () { + var old = this.getState(); + this.isLookahead = true; + this.next(); + this.isLookahead = false; + var curr = this.getState(); + for (var key in old) this[key] = old[key]; + return curr; +}; +},{"./state":12}],8:[function(require,module,exports){ +"use strict"; + +var _tokentype = require("./tokentype"); + +var _state = require("./state"); + +var _identifier = require("./identifier"); + +var _util = require("./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": + case "AssignmentPattern": + break; + + case "ObjectExpression": + node.type = "ObjectPattern"; + for (var i = 0; i < node.properties.length; i++) { + var prop = node.properties[i]; + if (prop.type === "SpreadProperty") continue; + 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; + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); + } + break; + + case "MemberExpression": + if (!isBinding) break; + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } + return node; +}; + +// Convert list of expression atoms to binding list. + +pp.toAssignableList = function (exprList, isBinding) { + var end = exprList.length; + if (end) { + var last = exprList[end - 1]; + if (last && last.type == "RestElement") { + --end; + } else if (last && last.type == "SpreadElement") { + last.type = "RestElement"; + var arg = last.argument; + this.toAssignable(arg, isBinding); + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start); + --end; + } + } + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) this.toAssignable(elt, isBinding); + } + return exprList; +}; + +// Parses spread element. + +pp.parseSpread = function (refShorthandDefaultPos) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(refShorthandDefaultPos); + return this.finishNode(node, "SpreadElement"); +}; + +pp.parseRest = function () { + var node = this.startNode(); + this.next(); + node.argument = this.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) { + 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) { + elts.push(this.parseAssignableListItemTypes(this.parseRest())); + this.expect(close); + break; + } else { + var left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left); + elts.push(this.parseMaybeDefault(null, left)); + } + } + return elts; +}; + +pp.parseAssignableListItemTypes = function (param) { + return param; +}; + +// Parses assignment pattern around given atom if possible. + +pp.parseMaybeDefault = function (startPos, left) { + startPos = startPos || this.markPosition(); + left = left || this.parseBindingAtom(); + if (!this.eat(_tokentype.types.eq)) return left; + var node = this.startNodeAt(startPos); + node.operator = "="; + 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 && (_identifier.reservedWords.strictBind(expr.name) || _identifier.reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); + if (checkClashes) { + if (_util.has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); + checkClashes[expr.name] = true; + } + break; + + case "MemberExpression": + if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); + break; + + case "ObjectPattern": + for (var i = 0; i < expr.properties.length; i++) { + var prop = expr.properties[i]; + if (prop.type === "Property") prop = prop.value; + this.checkLVal(prop, 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 "SpreadProperty": + 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"); + } +}; +},{"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],9:[function(require,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 = require("./state"); + +var _location = require("./location"); + +// Start an AST node, attaching a start offset. + +var pp = _state.Parser.prototype; + +var Node = function Node() { + _classCallCheck(this, Node); +}; + +exports.Node = Node; + +pp.startNode = function () { + var node = new Node(); + node.start = this.start; + if (this.options.locations) node.loc = new _location.SourceLocation(this, this.startLoc); + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [this.start, 0]; + return node; +}; + +pp.startNodeAt = function (pos) { + var node = new Node(), + start = pos; + if (this.options.locations) { + node.loc = new _location.SourceLocation(this, start[1]); + start = pos[0]; + } + node.start = start; + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [start, 0]; + return node; +}; + +// Finish an AST node, adding `type` and `end` properties. + +pp.finishNode = function (node, type) { + node.type = type; + node.end = this.lastTokEnd; + if (this.options.locations) node.loc.end = this.lastTokEndLoc; + if (this.options.ranges) node.range[1] = this.lastTokEnd; + return node; +}; + +// Finish node at given position + +pp.finishNodeAt = function (node, type, pos) { + if (this.options.locations) { + node.loc.end = pos[1];pos = pos[0]; + } + node.type = type; + node.end = pos; + if (this.options.ranges) node.range[1] = pos; + return node; +}; +},{"./location":6,"./state":12}],10:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; +exports.getOptions = getOptions; + +var _util = require("./util"); + +var _location = require("./location"); + +// 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. + ecmaVersion: 5, + // 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 not enforced. Disable + // `allowReserved` to enforce them. When this option has the + // value "never", reserved words and keywords can also not be + // used as property names. + allowReserved: true, + // 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 tokenize() returns. 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: {}, + // Babel-specific options + features: {}, + strictMode: null +}; + +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 (_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 _location.SourceLocation(this, startLoc, endLoc); + if (options.ranges) comment.range = [start, end]; + array.push(comment); + }; +} +},{"./location":6,"./util":17}],11:[function(require,module,exports){ +"use strict"; + +var _tokentype = require("./tokentype"); + +var _state = require("./state"); + +var _whitespace = require("./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.value === "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"); +}; +},{"./state":12,"./tokentype":16,"./whitespace":18}],12:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; +exports.Parser = Parser; + +var _identifier = require("./identifier"); + +var _tokentype = require("./tokentype"); + +var _whitespace = require("./whitespace"); + +function Parser(options, input, startPos) { + this.options = options; + this.sourceFile = this.options.sourceFile || null; + this.isKeyword = _identifier.keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; + this.isReservedWord = _identifier.reservedWords[this.options.ecmaVersion]; + this.input = input; + this.loadPlugins(this.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 = null; + + // 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.inModule = this.options.sourceType === "module"; + this.strict = this.options.strictMode === false ? false : this.inModule; + + // 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 = []; + + this.decorators = []; + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); +} + +Parser.prototype.extend = function (name, f) { + this[name] = f(this[name]); +}; + +// Registered plugins + +var plugins = {}; + +exports.plugins = plugins; +Parser.prototype.loadPlugins = function (plugins) { + for (var _name in plugins) { + var plugin = exports.plugins[_name]; + if (!plugin) throw new Error("Plugin '" + _name + "' not found"); + plugin(this, plugins[_name]); + } +}; +},{"./identifier":4,"./tokentype":16,"./whitespace":18}],13:[function(require,module,exports){ +"use strict"; + +var _tokentype = require("./tokentype"); + +var _state = require("./state"); + +var _whitespace = require("./whitespace"); + +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 && 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" }; + +// Parse a single statement. +// +// If expecting a statement and finding a slash operator, parse a +// regular expression literal. This is to handle cases like +// `if (foo) /blah/.exec(foo)`, where looking at the previous token +// does not help. + +pp.parseStatement = function (declaration, topLevel) { + if (this.type === _tokentype.types.at) { + this.parseDecorators(true); + } + + var starttype = this.type, + node = this.startNode(); + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case _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(); + this.takeDecorators(node); + 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._let:case _tokentype.types._const: + if (!declaration) this.unexpected(); // NOTE: falls through to _var + case _tokentype.types._var: + return this.parseVarStatement(node, starttype); + 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); + + case _tokentype.types.name: + if (this.options.features["es7.asyncFunctions"] && this.value === "async") { + var lookahead = this.lookahead(); + if (lookahead.type === _tokentype.types._function && !this.canInsertSemicolon.call(lookahead)) { + this.next(); + this.expect(_tokentype.types._function); + return this.parseFunction(node, true, false, true); + } + } + + // 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.takeDecorators = function (node) { + if (this.decorators.length) { + node.decorators = this.decorators; + this.decorators = []; + } +}; + +pp.parseDecorators = function (allowExport) { + while (this.type === _tokentype.types.at) { + this.decorators.push(this.parseDecorator()); + } + + if (allowExport && this.type === _tokentype.types._export) { + return; + } + + if (this.type !== _tokentype.types._class) { + this.raise(this.start, "Leading decorators must be attached to a class declaration"); + } +}; + +pp.parseDecorator = function (allowExport) { + if (!this.options.features["es7.decorators"]) { + this.unexpected(); + } + var node = this.startNode(); + this.next(); + node.expression = this.parseMaybeAssign(); + return this.finishNode(node, "Decorator"); +}; + +pp.parseBreakContinueStatement = function (node, keyword) { + var isBreak = keyword == "break"; + this.next(); + if (this.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) { + var start = this.markPosition(); + 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); + if (this.type === _tokentype.types._var || this.type === _tokentype.types._let || this.type === _tokentype.types._const) { + var _init = this.startNode(), + varKind = this.type; + this.next(); + this.parseVar(_init, true, varKind); + this.finishNode(_init, "VariableDeclaration"); + if ((this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== _tokentype.types._var && _init.declarations[0].init)) return this.parseForIn(node, _init); + return this.parseFor(node, _init); + } + var refShorthandDefaultPos = { start: 0 }; + var init = this.parseExpression(true, refShorthandDefaultPos); + if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { + this.toAssignable(init); + this.checkLVal(init); + return this.parseForIn(node, init); + } else if (refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + 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; 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.raise(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.guard = null; + clause.body = this.parseBlock(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.guardedHandlers = empty; + 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.keyword; + for (;;) { + var decl = this.startNode(); + this.parseVarHead(decl); + if (this.eat(_tokentype.types.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (kind === _tokentype.types._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.parseVarHead = function (decl) { + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, true); +}; + +// Parse a function declaration or literal (depending on the +// `isStatement` parameter). + +pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync) { + this.initFunction(node, isAsync); + if (this.options.ecmaVersion >= 6) node.generator = this.eat(_tokentype.types.star); + if (isStatement || this.type === _tokentype.types.name) node.id = this.parseIdent(); + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody); + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); +}; + +pp.parseFunctionParams = function (node) { + this.expect(_tokentype.types.parenL); + node.params = this.parseBindingList(_tokentype.types.parenR, false, this.options.features["es7.trailingFunctionCommas"]); +}; + +// 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); + var decorators = []; + while (!this.eat(_tokentype.types.braceR)) { + if (this.eat(_tokentype.types.semi)) continue; + if (this.type === _tokentype.types.at) { + decorators.push(this.parseDecorator()); + continue; + } + var method = this.startNode(); + if (decorators.length) { + method.decorators = decorators; + decorators = []; + } + var isMaybeStatic = this.type === _tokentype.types.name && this.value === "static"; + var isGenerator = this.eat(_tokentype.types.star), + isAsync = false; + 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); + } + if (!isGenerator && method.key.type === "Identifier" && !method.computed && this.isClassProperty()) { + classBody.body.push(this.parseClassProperty(method)); + continue; + } + if (this.options.features["es7.asyncFunctions"] && this.type !== _tokentype.types.parenL && !method.computed && method.key.type === "Identifier" && method.key.name === "async") { + isAsync = true; + this.parsePropertyName(method); + } + var isGetSet = false; + method.kind = "method"; + if (!method.computed) { + var key = method.key; + + if (!isAsync && !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"); + if (isAsync) this.raise(key.start, "Constructor can't be an async function"); + method.kind = "constructor"; + hadConstructor = true; + } + } + if (method.kind === "constructor" && method.decorators) { + this.raise(method.start, "You can't attach decorators to a class constructor"); + } + this.parseClassMethod(classBody, method, isGenerator, isAsync); + 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.raise(start, "getter should have no params");else this.raise(start, "setter should have exactly one param"); + } + } + } + if (decorators.length) { + this.raise(this.start, "You have trailing decorators with no method"); + } + node.body = this.finishNode(classBody, "ClassBody"); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); +}; + +pp.isClassProperty = function () { + return this.type === _tokentype.types.eq || (this.type === _tokentype.types.semi || this.canInsertSemicolon()); +}; + +pp.parseClassProperty = function (node) { + if (this.type === _tokentype.types.eq) { + if (!this.options.features["es7.classProperties"]) this.unexpected(); + this.next(); + node.value = this.parseMaybeAssign(); + } else { + node.value = null; + } + this.semicolon(); + return this.finishNode(node, "ClassProperty"); +}; + +pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) { + method.value = this.parseMethod(isGenerator, isAsync); + 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.type === _tokentype.types.star) { + var specifier = this.startNode(); + this.next(); + if (this.options.features["es7.exportExtensions"] && this.eatContextual("as")) { + specifier.exported = this.parseIdent(); + node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; + this.parseExportSpecifiersMaybe(node); + this.parseExportFrom(node); + } else { + this.parseExportFrom(node); + return this.finishNode(node, "ExportAllDeclaration"); + } + } else if (this.options.features["es7.exportExtensions"] && this.isExportDefaultSpecifier()) { + var specifier = this.startNode(); + specifier.exported = this.parseIdent(true); + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + if (this.type === _tokentype.types.comma && this.lookahead().type === _tokentype.types.star) { + this.expect(_tokentype.types.comma); + var _specifier = this.startNode(); + this.expect(_tokentype.types.star); + this.expectContextual("as"); + _specifier.exported = this.parseIdent(); + node.specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier")); + } else { + this.parseExportSpecifiersMaybe(node); + } + this.parseExportFrom(node); + } else if (this.eat(_tokentype.types._default)) { + // export default ... + var expr = this.parseMaybeAssign(); + var needsSemi = true; + if (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(); + this.checkExport(node); + return this.finishNode(node, "ExportDefaultDeclaration"); + } else if (this.type.keyword || this.shouldParseExportDeclaration()) { + 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 { + node.source = null; + } + this.semicolon(); + } + this.checkExport(node); + return this.finishNode(node, "ExportNamedDeclaration"); +}; + +pp.isExportDefaultSpecifier = function () { + if (this.type === _tokentype.types.name) { + return this.value !== "type" && this.value !== "async"; + } + + if (this.type !== _tokentype.types._default) { + return false; + } + + var lookahead = this.lookahead(); + return lookahead.type === _tokentype.types.comma || lookahead.type === _tokentype.types.name && lookahead.value === "from"; +}; + +pp.parseExportSpecifiersMaybe = function (node) { + if (this.eat(_tokentype.types.comma)) { + node.specifiers = node.specifiers.concat(this.parseExportSpecifiers()); + } +}; + +pp.parseExportFrom = function (node) { + this.expectContextual("from"); + node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); + this.semicolon(); + this.checkExport(node); +}; + +pp.shouldParseExportDeclaration = function () { + return this.options.features["es7.asyncFunctions"] && this.isContextual("async"); +}; + +pp.checkExport = function (node) { + if (this.decorators.length) { + var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); + if (!node.declaration || !isClass) { + this.raise(node.start, "You can only use decorators on an export when exporting a class"); + } + this.takeDecorators(node.declaration); + } +}; + +// Parses a comma-separated list of module exports. + +pp.parseExportSpecifiers = function () { + var nodes = [], + 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(node); + 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 (node) { + var first = true; + if (this.type === _tokentype.types.name) { + // import defaultObj, { x, y as z } from '...' + var start = this.markPosition(); + node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(), start)); + if (!this.eat(_tokentype.types.comma)) return; + } + if (this.type === _tokentype.types.star) { + var specifier = this.startNode(); + this.next(); + this.expectContextual("as"); + specifier.local = this.parseIdent(); + this.checkLVal(specifier.local, true); + node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier")); + return; + } + 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 specifier = this.startNode(); + specifier.imported = this.parseIdent(true); + specifier.local = this.eatContextual("as") ? this.parseIdent() : specifier.imported; + this.checkLVal(specifier.local, true); + node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); + } +}; + +pp.parseImportSpecifierDefault = function (id, start) { + var node = this.startNodeAt(start); + node.local = id; + this.checkLVal(node.local, true); + return this.finishNode(node, "ImportDefaultSpecifier"); +}; +},{"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,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 https://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 = require("./state"); + +var _tokentype = require("./tokentype"); + +var _whitespace = require("./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) { + var parent = undefined; + if (prevType === _tokentype.types.colon && (parent = this.curContext()).token == "{") 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) 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 () {}; + +_tokentype.types._function.updateContext = function () { + if (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; +}; + +// tokExprAllowed stays unchanged +},{"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,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 = require("./identifier"); + +var _tokentype = require("./tokentype"); + +var _state = require("./state"); + +var _location = require("./location"); + +var _whitespace = require("./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 _location.SourceLocation(p, p.startLoc, p.endLoc); + if (p.options.ranges) this.range = [p.start, p.end]; +}; + +exports.Token = Token; + +// ## Tokenizer + +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.isLookahead) 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[Symbol.iterator] = 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.options.locations && 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.options.locations && this.curPosition()); +}; + +pp.skipLineComment = function (startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.options.locations && 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.options.locations && this.curPosition()); +}; + +// Called at the start of the parse and after every token. Skips +// whitespace and comments, and. + +pp.skipSpace = function () { + while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + if (ch === 32) { + // ' ' + ++this.pos; + } else if (ch === 13) { + ++this.pos; + var next = this.input.charCodeAt(this.pos); + if (next === 10) { + ++this.pos; + } + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + } else if (ch === 10 || ch === 8232 || ch === 8233) { + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + } else if (ch > 8 && ch < 14) { + ++this.pos; + } else if (ch === 47) { + // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 42) { + // '*' + this.skipBlockComment(); + } else if (next === 47) { + // '/' + this.skipLineComment(2); + } else break; + } else if (ch === 160) { + // '\xa0' + ++this.pos; + } else if (ch >= 5760 && _whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break; + } + } +}; + +// 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 = function (code) { + // '%*' + var type = code === 42 ? _tokentype.types.star : _tokentype.types.modulo; + var width = 1; + var next = this.input.charCodeAt(this.pos + 1); + + if (next === 42) { + // '*' + width++; + next = this.input.charCodeAt(this.pos + 2); + type = _tokentype.types.exponent; + } + + if (next === 61) { + width++; + type = _tokentype.types.assign; + } + + return this.finishOp(type, width); +}; + +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(); + // ` regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new Error('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + plType = stateChar + patternListStack.push({ type: plType, start: i - 1, reStart: re.length }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + re += ')' + plType = patternListStack.pop().type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case '!': + re += '[^/]*?)' + break + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway + } + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (var pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) re = '(?=.)' + re + + if (addPatternStart) re = patternStart + re + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + var regExp = new RegExp('^' + re + '$', flags) + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} + +},{"brace-expansion":476,"path":218}],476:[function(require,module,exports){ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = /^(.*,)+(.+)?$/.test(m.body); + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + + +},{"balanced-match":477,"concat-map":478}],477:[function(require,module,exports){ +module.exports = balanced; +function balanced(a, b, str) { + var bal = 0; + var m = {}; + var ended = false; + + for (var i = 0; i < str.length; i++) { + if (a == str.substr(i, a.length)) { + if (!('start' in m)) m.start = i; + bal++; + } + else if (b == str.substr(i, b.length) && 'start' in m) { + ended = true; + bal--; + if (!bal) { + m.end = i; + m.pre = str.substr(0, m.start); + m.body = (m.end - m.start > 1) + ? str.substring(m.start + a.length, m.end) + : ''; + m.post = str.slice(m.end + b.length); + return m; + } + } + } + + // if we opened more than we closed, find the one we closed + if (bal && ended) { + var start = m.start + a.length; + m = balanced(a, b, str.substr(start)); + if (m) { + m.start += start; + m.end += start; + m.pre = str.slice(0, start) + m.pre; + } + return m; + } +} + +},{}],478:[function(require,module,exports){ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +},{}],479:[function(require,module,exports){ +(function (process){ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +}; + +function win32(path) { + // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = !!device && device.charAt(1) !== ':'; + + // UNC paths are always absolute + return !!result[2] || isUnc; +}; + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; + +}).call(this,require('_process')) +},{"_process":219}],480:[function(require,module,exports){ +"use strict"; + +var originalObject = Object; +var originalDefProp = Object.defineProperty; +var originalCreate = Object.create; + +function defProp(obj, name, value) { + if (originalDefProp) try { + originalDefProp.call(originalObject, obj, name, { value: value }); + } catch (definePropertyIsBrokenInIE8) { + obj[name] = value; + } else { + obj[name] = value; + } +} + +// For functions that will be invoked using .call or .apply, we need to +// define those methods on the function objects themselves, rather than +// inheriting them from Function.prototype, so that a malicious or clumsy +// third party cannot interfere with the functionality of this module by +// redefining Function.prototype.call or .apply. +function makeSafeToCall(fun) { + if (fun) { + defProp(fun, "call", fun.call); + defProp(fun, "apply", fun.apply); + } + return fun; +} + +makeSafeToCall(originalDefProp); +makeSafeToCall(originalCreate); + +var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty); +var numToStr = makeSafeToCall(Number.prototype.toString); +var strSlice = makeSafeToCall(String.prototype.slice); + +var cloner = function(){}; +function create(prototype) { + if (originalCreate) { + return originalCreate.call(originalObject, prototype); + } + cloner.prototype = prototype || null; + return new cloner; +} + +var rand = Math.random; +var uniqueKeys = create(null); + +function makeUniqueKey() { + // Collisions are highly unlikely, but this module is in the business of + // making guarantees rather than safe bets. + do var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2)); + while (hasOwn.call(uniqueKeys, uniqueKey)); + return uniqueKeys[uniqueKey] = uniqueKey; +} + +function internString(str) { + var obj = {}; + obj[str] = true; + return Object.keys(obj)[0]; +} + +// External users might find this function useful, but it is not necessary +// for the typical use of this module. +defProp(exports, "makeUniqueKey", makeUniqueKey); + +// Object.getOwnPropertyNames is the only way to enumerate non-enumerable +// properties, so if we wrap it to ignore our secret keys, there should be +// no way (except guessing) to access those properties. +var originalGetOPNs = Object.getOwnPropertyNames; +Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + for (var names = originalGetOPNs(object), + src = 0, + dst = 0, + len = names.length; + src < len; + ++src) { + if (!hasOwn.call(uniqueKeys, names[src])) { + if (src > dst) { + names[dst] = names[src]; + } + ++dst; + } + } + names.length = dst; + return names; +}; + +function defaultCreatorFn(object) { + return create(null); +} + +function makeAccessor(secretCreatorFn) { + var brand = makeUniqueKey(); + var passkey = create(null); + + secretCreatorFn = secretCreatorFn || defaultCreatorFn; + + function register(object) { + var secret; // Created lazily. + + function vault(key, forget) { + // Only code that has access to the passkey can retrieve (or forget) + // the secret object. + if (key === passkey) { + return forget + ? secret = null + : secret || (secret = secretCreatorFn(object)); + } + } + + defProp(object, brand, vault); + } + + function accessor(object) { + if (!hasOwn.call(object, brand)) + register(object); + return object[brand](passkey); + } + + accessor.forget = function(object) { + if (hasOwn.call(object, brand)) + object[brand](passkey, true); + }; + + return accessor; +} + +defProp(exports, "makeAccessor", makeAccessor); + +},{}],481:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var types = require("recast").types; +var isArray = types.builtInTypes.array; +var b = types.builders; +var n = types.namedTypes; +var leap = require("./leap"); +var meta = require("./meta"); +var util = require("./util"); +var runtimeProperty = util.runtimeProperty; +var hasOwn = Object.prototype.hasOwnProperty; + +function Emitter(contextId) { + assert.ok(this instanceof Emitter); + n.Identifier.assert(contextId); + + // Used to generate unique temporary names. + this.nextTempId = 0; + + Object.defineProperties(this, { + // In order to make sure the context object does not collide with + // anything in the local scope, we might have to rename it, so we + // refer to it symbolically instead of just assuming that it will be + // called "context". + contextId: { value: contextId }, + + // An append-only list of Statements that grows each time this.emit is + // called. + listing: { value: [] }, + + // A sparse array whose keys correspond to locations in this.listing + // that have been marked as branch/jump targets. + marked: { value: [true] }, + + // The last location will be marked when this.getDispatchLoop is + // called. + finalLoc: { value: loc() }, + + // A list of all leap.TryEntry statements emitted. + tryEntries: { value: [] } + }); + + // The .leapManager property needs to be defined by a separate + // defineProperties call so that .finalLoc will be visible to the + // leap.LeapManager constructor. + Object.defineProperties(this, { + // Each time we evaluate the body of a loop, we tell this.leapManager + // to enter a nested loop context that determines the meaning of break + // and continue statements therein. + leapManager: { value: new leap.LeapManager(this) } + }); +} + +var Ep = Emitter.prototype; +exports.Emitter = Emitter; + +// Offsets into this.listing that could be used as targets for branches or +// jumps are represented as numeric Literal nodes. This representation has +// the amazingly convenient benefit of allowing the exact value of the +// location to be determined at any time, even after generating code that +// refers to the location. +function loc() { + return b.literal(-1); +} + +// Sets the exact value of the given location to the offset of the next +// Statement emitted. +Ep.mark = function(loc) { + n.Literal.assert(loc); + var index = this.listing.length; + if (loc.value === -1) { + loc.value = index; + } else { + // Locations can be marked redundantly, but their values cannot change + // once set the first time. + assert.strictEqual(loc.value, index); + } + this.marked[index] = true; + return loc; +}; + +Ep.emit = function(node) { + if (n.Expression.check(node)) + node = b.expressionStatement(node); + n.Statement.assert(node); + this.listing.push(node); +}; + +// Shorthand for emitting assignment statements. This will come in handy +// for assignments to temporary variables. +Ep.emitAssign = function(lhs, rhs) { + this.emit(this.assign(lhs, rhs)); + return lhs; +}; + +// Shorthand for an assignment statement. +Ep.assign = function(lhs, rhs) { + return b.expressionStatement( + b.assignmentExpression("=", lhs, rhs)); +}; + +// Convenience function for generating expressions like context.next, +// context.sent, and context.rval. +Ep.contextProperty = function(name, computed) { + return b.memberExpression( + this.contextId, + computed ? b.literal(name) : b.identifier(name), + !!computed + ); +}; + +// Shorthand for setting context.rval and jumping to `context.stop()`. +Ep.stop = function(rval) { + if (rval) { + this.setReturnValue(rval); + } + + this.jump(this.finalLoc); +}; + +Ep.setReturnValue = function(valuePath) { + n.Expression.assert(valuePath.value); + + this.emitAssign( + this.contextProperty("rval"), + this.explodeExpression(valuePath) + ); +}; + +Ep.clearPendingException = function(tryLoc, assignee) { + n.Literal.assert(tryLoc); + + var catchCall = b.callExpression( + this.contextProperty("catch", true), + [tryLoc] + ); + + if (assignee) { + this.emitAssign(assignee, catchCall); + } else { + this.emit(catchCall); + } +}; + +// Emits code for an unconditional jump to the given location, even if the +// exact value of the location is not yet known. +Ep.jump = function(toLoc) { + this.emitAssign(this.contextProperty("next"), toLoc); + this.emit(b.breakStatement()); +}; + +// Conditional jump. +Ep.jumpIf = function(test, toLoc) { + n.Expression.assert(test); + n.Literal.assert(toLoc); + + this.emit(b.ifStatement( + test, + b.blockStatement([ + this.assign(this.contextProperty("next"), toLoc), + b.breakStatement() + ]) + )); +}; + +// Conditional jump, with the condition negated. +Ep.jumpIfNot = function(test, toLoc) { + n.Expression.assert(test); + n.Literal.assert(toLoc); + + var negatedTest; + if (n.UnaryExpression.check(test) && + test.operator === "!") { + // Avoid double negation. + negatedTest = test.argument; + } else { + negatedTest = b.unaryExpression("!", test); + } + + this.emit(b.ifStatement( + negatedTest, + b.blockStatement([ + this.assign(this.contextProperty("next"), toLoc), + b.breakStatement() + ]) + )); +}; + +// Returns a unique MemberExpression that can be used to store and +// retrieve temporary values. Since the object of the member expression is +// the context object, which is presumed to coexist peacefully with all +// other local variables, and since we just increment `nextTempId` +// monotonically, uniqueness is assured. +Ep.makeTempVar = function() { + return this.contextProperty("t" + this.nextTempId++); +}; + +Ep.getContextFunction = function(id) { + return b.functionExpression( + id || null/*Anonymous*/, + [this.contextId], + b.blockStatement([this.getDispatchLoop()]), + false, // Not a generator anymore! + false // Nor an expression. + ); +}; + +// Turns this.listing into a loop of the form +// +// while (1) switch (context.next) { +// case 0: +// ... +// case n: +// return context.stop(); +// } +// +// Each marked location in this.listing will correspond to one generated +// case statement. +Ep.getDispatchLoop = function() { + var self = this; + var cases = []; + var current; + + // If we encounter a break, continue, or return statement in a switch + // case, we can skip the rest of the statements until the next case. + var alreadyEnded = false; + + self.listing.forEach(function(stmt, i) { + if (self.marked.hasOwnProperty(i)) { + cases.push(b.switchCase( + b.literal(i), + current = [])); + alreadyEnded = false; + } + + if (!alreadyEnded) { + current.push(stmt); + if (isSwitchCaseEnder(stmt)) + alreadyEnded = true; + } + }); + + // Now that we know how many statements there will be in this.listing, + // we can finally resolve this.finalLoc.value. + this.finalLoc.value = this.listing.length; + + cases.push( + b.switchCase(this.finalLoc, [ + // Intentionally fall through to the "end" case... + ]), + + // So that the runtime can jump to the final location without having + // to know its offset, we provide the "end" case as a synonym. + b.switchCase(b.literal("end"), [ + // This will check/clear both context.thrown and context.rval. + b.returnStatement( + b.callExpression(this.contextProperty("stop"), []) + ) + ]) + ); + + return b.whileStatement( + b.literal(1), + b.switchStatement( + b.assignmentExpression( + "=", + this.contextProperty("prev"), + this.contextProperty("next") + ), + cases + ) + ); +}; + +// See comment above re: alreadyEnded. +function isSwitchCaseEnder(stmt) { + return n.BreakStatement.check(stmt) + || n.ContinueStatement.check(stmt) + || n.ReturnStatement.check(stmt) + || n.ThrowStatement.check(stmt); +} + +Ep.getTryLocsList = function() { + if (this.tryEntries.length === 0) { + // To avoid adding a needless [] to the majority of runtime.wrap + // argument lists, force the caller to handle this case specially. + return null; + } + + var lastLocValue = 0; + + return b.arrayExpression( + this.tryEntries.map(function(tryEntry) { + var thisLocValue = tryEntry.firstLoc.value; + assert.ok(thisLocValue >= lastLocValue, "try entries out of order"); + lastLocValue = thisLocValue; + + var ce = tryEntry.catchEntry; + var fe = tryEntry.finallyEntry; + + var locs = [ + tryEntry.firstLoc, + // The null here makes a hole in the array. + ce ? ce.firstLoc : null + ]; + + if (fe) { + locs[2] = fe.firstLoc; + locs[3] = fe.afterLoc; + } + + return b.arrayExpression(locs); + }) + ); +}; + +// All side effects must be realized in order. + +// If any subexpression harbors a leap, all subexpressions must be +// neutered of side effects. + +// No destructive modification of AST nodes. + +Ep.explode = function(path, ignoreResult) { + assert.ok(path instanceof types.NodePath); + + var node = path.value; + var self = this; + + n.Node.assert(node); + + if (n.Statement.check(node)) + return self.explodeStatement(path); + + if (n.Expression.check(node)) + return self.explodeExpression(path, ignoreResult); + + if (n.Declaration.check(node)) + throw getDeclError(node); + + switch (node.type) { + case "Program": + return path.get("body").map( + self.explodeStatement, + self + ); + + case "VariableDeclarator": + throw getDeclError(node); + + // These node types should be handled by their parent nodes + // (ObjectExpression, SwitchStatement, and TryStatement, respectively). + case "Property": + case "SwitchCase": + case "CatchClause": + throw new Error( + node.type + " nodes should be handled by their parents"); + + default: + throw new Error( + "unknown Node of type " + + JSON.stringify(node.type)); + } +}; + +function getDeclError(node) { + return new Error( + "all declarations should have been transformed into " + + "assignments before the Exploder began its work: " + + JSON.stringify(node)); +} + +Ep.explodeStatement = function(path, labelId) { + assert.ok(path instanceof types.NodePath); + + var stmt = path.value; + var self = this; + + n.Statement.assert(stmt); + + if (labelId) { + n.Identifier.assert(labelId); + } else { + labelId = null; + } + + // Explode BlockStatement nodes even if they do not contain a yield, + // because we don't want or need the curly braces. + if (n.BlockStatement.check(stmt)) { + return path.get("body").each( + self.explodeStatement, + self + ); + } + + if (!meta.containsLeap(stmt)) { + // Technically we should be able to avoid emitting the statement + // altogether if !meta.hasSideEffects(stmt), but that leads to + // confusing generated code (for instance, `while (true) {}` just + // disappears) and is probably a more appropriate job for a dedicated + // dead code elimination pass. + self.emit(stmt); + return; + } + + switch (stmt.type) { + case "ExpressionStatement": + self.explodeExpression(path.get("expression"), true); + break; + + case "LabeledStatement": + var after = loc(); + + // Did you know you can break from any labeled block statement or + // control structure? Well, you can! Note: when a labeled loop is + // encountered, the leap.LabeledEntry created here will immediately + // enclose a leap.LoopEntry on the leap manager's stack, and both + // entries will have the same label. Though this works just fine, it + // may seem a bit redundant. In theory, we could check here to + // determine if stmt knows how to handle its own label; for example, + // stmt happens to be a WhileStatement and so we know it's going to + // establish its own LoopEntry when we explode it (below). Then this + // LabeledEntry would be unnecessary. Alternatively, we might be + // tempted not to pass stmt.label down into self.explodeStatement, + // because we've handled the label here, but that's a mistake because + // labeled loops may contain labeled continue statements, which is not + // something we can handle in this generic case. All in all, I think a + // little redundancy greatly simplifies the logic of this case, since + // it's clear that we handle all possible LabeledStatements correctly + // here, regardless of whether they interact with the leap manager + // themselves. Also remember that labels and break/continue-to-label + // statements are rare, and all of this logic happens at transform + // time, so it has no additional runtime cost. + self.leapManager.withEntry( + new leap.LabeledEntry(after, stmt.label), + function() { + self.explodeStatement(path.get("body"), stmt.label); + } + ); + + self.mark(after); + + break; + + case "WhileStatement": + var before = loc(); + var after = loc(); + + self.mark(before); + self.jumpIfNot(self.explodeExpression(path.get("test")), after); + self.leapManager.withEntry( + new leap.LoopEntry(after, before, labelId), + function() { self.explodeStatement(path.get("body")); } + ); + self.jump(before); + self.mark(after); + + break; + + case "DoWhileStatement": + var first = loc(); + var test = loc(); + var after = loc(); + + self.mark(first); + self.leapManager.withEntry( + new leap.LoopEntry(after, test, labelId), + function() { self.explode(path.get("body")); } + ); + self.mark(test); + self.jumpIf(self.explodeExpression(path.get("test")), first); + self.mark(after); + + break; + + case "ForStatement": + var head = loc(); + var update = loc(); + var after = loc(); + + if (stmt.init) { + // We pass true here to indicate that if stmt.init is an expression + // then we do not care about its result. + self.explode(path.get("init"), true); + } + + self.mark(head); + + if (stmt.test) { + self.jumpIfNot(self.explodeExpression(path.get("test")), after); + } else { + // No test means continue unconditionally. + } + + self.leapManager.withEntry( + new leap.LoopEntry(after, update, labelId), + function() { self.explodeStatement(path.get("body")); } + ); + + self.mark(update); + + if (stmt.update) { + // We pass true here to indicate that if stmt.update is an + // expression then we do not care about its result. + self.explode(path.get("update"), true); + } + + self.jump(head); + + self.mark(after); + + break; + + case "ForInStatement": + var head = loc(); + var after = loc(); + + var keyIterNextFn = self.makeTempVar(); + self.emitAssign( + keyIterNextFn, + b.callExpression( + runtimeProperty("keys"), + [self.explodeExpression(path.get("right"))] + ) + ); + + self.mark(head); + + var keyInfoTmpVar = self.makeTempVar(); + self.jumpIf( + b.memberExpression( + b.assignmentExpression( + "=", + keyInfoTmpVar, + b.callExpression(keyIterNextFn, []) + ), + b.identifier("done"), + false + ), + after + ); + + self.emitAssign( + stmt.left, + b.memberExpression( + keyInfoTmpVar, + b.identifier("value"), + false + ) + ); + + self.leapManager.withEntry( + new leap.LoopEntry(after, head, labelId), + function() { self.explodeStatement(path.get("body")); } + ); + + self.jump(head); + + self.mark(after); + + break; + + case "BreakStatement": + self.emitAbruptCompletion({ + type: "break", + target: self.leapManager.getBreakLoc(stmt.label) + }); + + break; + + case "ContinueStatement": + self.emitAbruptCompletion({ + type: "continue", + target: self.leapManager.getContinueLoc(stmt.label) + }); + + break; + + case "SwitchStatement": + // Always save the discriminant into a temporary variable in case the + // test expressions overwrite values like context.sent. + var disc = self.emitAssign( + self.makeTempVar(), + self.explodeExpression(path.get("discriminant")) + ); + + var after = loc(); + var defaultLoc = loc(); + var condition = defaultLoc; + var caseLocs = []; + + // If there are no cases, .cases might be undefined. + var cases = stmt.cases || []; + + for (var i = cases.length - 1; i >= 0; --i) { + var c = cases[i]; + n.SwitchCase.assert(c); + + if (c.test) { + condition = b.conditionalExpression( + b.binaryExpression("===", disc, c.test), + caseLocs[i] = loc(), + condition + ); + } else { + caseLocs[i] = defaultLoc; + } + } + + self.jump(self.explodeExpression( + new types.NodePath(condition, path, "discriminant") + )); + + self.leapManager.withEntry( + new leap.SwitchEntry(after), + function() { + path.get("cases").each(function(casePath) { + var c = casePath.value; + var i = casePath.name; + + self.mark(caseLocs[i]); + + casePath.get("consequent").each( + self.explodeStatement, + self + ); + }); + } + ); + + self.mark(after); + if (defaultLoc.value === -1) { + self.mark(defaultLoc); + assert.strictEqual(after.value, defaultLoc.value); + } + + break; + + case "IfStatement": + var elseLoc = stmt.alternate && loc(); + var after = loc(); + + self.jumpIfNot( + self.explodeExpression(path.get("test")), + elseLoc || after + ); + + self.explodeStatement(path.get("consequent")); + + if (elseLoc) { + self.jump(after); + self.mark(elseLoc); + self.explodeStatement(path.get("alternate")); + } + + self.mark(after); + + break; + + case "ReturnStatement": + self.emitAbruptCompletion({ + type: "return", + value: self.explodeExpression(path.get("argument")) + }); + + break; + + case "WithStatement": + throw new Error( + node.type + " not supported in generator functions."); + + case "TryStatement": + var after = loc(); + + var handler = stmt.handler; + if (!handler && stmt.handlers) { + handler = stmt.handlers[0] || null; + } + + var catchLoc = handler && loc(); + var catchEntry = catchLoc && new leap.CatchEntry( + catchLoc, + handler.param + ); + + var finallyLoc = stmt.finalizer && loc(); + var finallyEntry = finallyLoc && + new leap.FinallyEntry(finallyLoc, after); + + var tryEntry = new leap.TryEntry( + self.getUnmarkedCurrentLoc(), + catchEntry, + finallyEntry + ); + + self.tryEntries.push(tryEntry); + self.updateContextPrevLoc(tryEntry.firstLoc); + + self.leapManager.withEntry(tryEntry, function() { + self.explodeStatement(path.get("block")); + + if (catchLoc) { + if (finallyLoc) { + // If we have both a catch block and a finally block, then + // because we emit the catch block first, we need to jump over + // it to the finally block. + self.jump(finallyLoc); + + } else { + // If there is no finally block, then we need to jump over the + // catch block to the fall-through location. + self.jump(after); + } + + self.updateContextPrevLoc(self.mark(catchLoc)); + + var bodyPath = path.get("handler", "body"); + var safeParam = self.makeTempVar(); + self.clearPendingException(tryEntry.firstLoc, safeParam); + + var catchScope = bodyPath.scope; + var catchParamName = handler.param.name; + n.CatchClause.assert(catchScope.node); + assert.strictEqual(catchScope.lookup(catchParamName), catchScope); + + types.visit(bodyPath, { + visitIdentifier: function(path) { + if (util.isReference(path, catchParamName) && + path.scope.lookup(catchParamName) === catchScope) { + return safeParam; + } + + this.traverse(path); + }, + + visitFunction: function(path) { + if (path.scope.declares(catchParamName)) { + // Don't descend into nested scopes that shadow the catch + // parameter with their own declarations. This isn't + // logically necessary because of the path.scope.lookup we + // do in visitIdentifier, but it saves time. + return false; + } + + this.traverse(path); + } + }); + + self.leapManager.withEntry(catchEntry, function() { + self.explodeStatement(bodyPath); + }); + } + + if (finallyLoc) { + self.updateContextPrevLoc(self.mark(finallyLoc)); + + self.leapManager.withEntry(finallyEntry, function() { + self.explodeStatement(path.get("finalizer")); + }); + + self.emit(b.returnStatement(b.callExpression( + self.contextProperty("finish"), + [finallyEntry.firstLoc] + ))); + } + }); + + self.mark(after); + + break; + + case "ThrowStatement": + self.emit(b.throwStatement( + self.explodeExpression(path.get("argument")) + )); + + break; + + default: + throw new Error( + "unknown Statement of type " + + JSON.stringify(stmt.type)); + } +}; + +Ep.emitAbruptCompletion = function(record) { + if (!isValidCompletion(record)) { + assert.ok( + false, + "invalid completion record: " + + JSON.stringify(record) + ); + } + + assert.notStrictEqual( + record.type, "normal", + "normal completions are not abrupt" + ); + + var abruptArgs = [b.literal(record.type)]; + + if (record.type === "break" || + record.type === "continue") { + n.Literal.assert(record.target); + abruptArgs[1] = record.target; + } else if (record.type === "return" || + record.type === "throw") { + if (record.value) { + n.Expression.assert(record.value); + abruptArgs[1] = record.value; + } + } + + this.emit( + b.returnStatement( + b.callExpression( + this.contextProperty("abrupt"), + abruptArgs + ) + ) + ); +}; + +function isValidCompletion(record) { + var type = record.type; + + if (type === "normal") { + return !hasOwn.call(record, "target"); + } + + if (type === "break" || + type === "continue") { + return !hasOwn.call(record, "value") + && n.Literal.check(record.target); + } + + if (type === "return" || + type === "throw") { + return hasOwn.call(record, "value") + && !hasOwn.call(record, "target"); + } + + return false; +} + + +// Not all offsets into emitter.listing are potential jump targets. For +// example, execution typically falls into the beginning of a try block +// without jumping directly there. This method returns the current offset +// without marking it, so that a switch case will not necessarily be +// generated for this offset (I say "not necessarily" because the same +// location might end up being marked in the process of emitting other +// statements). There's no logical harm in marking such locations as jump +// targets, but minimizing the number of switch cases keeps the generated +// code shorter. +Ep.getUnmarkedCurrentLoc = function() { + return b.literal(this.listing.length); +}; + +// The context.prev property takes the value of context.next whenever we +// evaluate the switch statement discriminant, which is generally good +// enough for tracking the last location we jumped to, but sometimes +// context.prev needs to be more precise, such as when we fall +// successfully out of a try block and into a finally block without +// jumping. This method exists to update context.prev to the freshest +// available location. If we were implementing a full interpreter, we +// would know the location of the current instruction with complete +// precision at all times, but we don't have that luxury here, as it would +// be costly and verbose to set context.prev before every statement. +Ep.updateContextPrevLoc = function(loc) { + if (loc) { + n.Literal.assert(loc); + + if (loc.value === -1) { + // If an uninitialized location literal was passed in, set its value + // to the current this.listing.length. + loc.value = this.listing.length; + } else { + // Otherwise assert that the location matches the current offset. + assert.strictEqual(loc.value, this.listing.length); + } + + } else { + loc = this.getUnmarkedCurrentLoc(); + } + + // Make sure context.prev is up to date in case we fell into this try + // statement without jumping to it. TODO Consider avoiding this + // assignment when we know control must have jumped here. + this.emitAssign(this.contextProperty("prev"), loc); +}; + +Ep.explodeExpression = function(path, ignoreResult) { + assert.ok(path instanceof types.NodePath); + + var expr = path.value; + if (expr) { + n.Expression.assert(expr); + } else { + return expr; + } + + var self = this; + var result; // Used optionally by several cases below. + + function finish(expr) { + n.Expression.assert(expr); + if (ignoreResult) { + self.emit(expr); + } else { + return expr; + } + } + + // If the expression does not contain a leap, then we either emit the + // expression as a standalone statement or return it whole. + if (!meta.containsLeap(expr)) { + return finish(expr); + } + + // If any child contains a leap (such as a yield or labeled continue or + // break statement), then any sibling subexpressions will almost + // certainly have to be exploded in order to maintain the order of their + // side effects relative to the leaping child(ren). + var hasLeapingChildren = meta.containsLeap.onlyChildren(expr); + + // In order to save the rest of explodeExpression from a combinatorial + // trainwreck of special cases, explodeViaTempVar is responsible for + // deciding when a subexpression needs to be "exploded," which is my + // very technical term for emitting the subexpression as an assignment + // to a temporary variable and the substituting the temporary variable + // for the original subexpression. Think of exploded view diagrams, not + // Michael Bay movies. The point of exploding subexpressions is to + // control the precise order in which the generated code realizes the + // side effects of those subexpressions. + function explodeViaTempVar(tempVar, childPath, ignoreChildResult) { + assert.ok(childPath instanceof types.NodePath); + + assert.ok( + !ignoreChildResult || !tempVar, + "Ignoring the result of a child expression but forcing it to " + + "be assigned to a temporary variable?" + ); + + var result = self.explodeExpression(childPath, ignoreChildResult); + + if (ignoreChildResult) { + // Side effects already emitted above. + + } else if (tempVar || (hasLeapingChildren && + !n.Literal.check(result))) { + // If tempVar was provided, then the result will always be assigned + // to it, even if the result does not otherwise need to be assigned + // to a temporary variable. When no tempVar is provided, we have + // the flexibility to decide whether a temporary variable is really + // necessary. Unfortunately, in general, a temporary variable is + // required whenever any child contains a yield expression, since it + // is difficult to prove (at all, let alone efficiently) whether + // this result would evaluate to the same value before and after the + // yield (see #206). One narrow case where we can prove it doesn't + // matter (and thus we do not need a temporary variable) is when the + // result in question is a Literal value. + result = self.emitAssign( + tempVar || self.makeTempVar(), + result + ); + } + return result; + } + + // If ignoreResult is true, then we must take full responsibility for + // emitting the expression with all its side effects, and we should not + // return a result. + + switch (expr.type) { + case "MemberExpression": + return finish(b.memberExpression( + self.explodeExpression(path.get("object")), + expr.computed + ? explodeViaTempVar(null, path.get("property")) + : expr.property, + expr.computed + )); + + case "CallExpression": + var calleePath = path.get("callee"); + var argsPath = path.get("arguments"); + + var newCallee; + var newArgs = []; + + var hasLeapingArgs = false; + argsPath.each(function(argPath) { + hasLeapingArgs = hasLeapingArgs || + meta.containsLeap(argPath.value); + }); + + if (n.MemberExpression.check(calleePath.value)) { + if (hasLeapingArgs) { + // If the arguments of the CallExpression contained any yield + // expressions, then we need to be sure to evaluate the callee + // before evaluating the arguments, but if the callee was a member + // expression, then we must be careful that the object of the + // member expression still gets bound to `this` for the call. + + var newObject = explodeViaTempVar( + // Assign the exploded callee.object expression to a temporary + // variable so that we can use it twice without reevaluating it. + self.makeTempVar(), + calleePath.get("object") + ); + + var newProperty = calleePath.value.computed + ? explodeViaTempVar(null, calleePath.get("property")) + : calleePath.value.property; + + newArgs.unshift(newObject); + + newCallee = b.memberExpression( + b.memberExpression( + newObject, + newProperty, + calleePath.value.computed + ), + b.identifier("call"), + false + ); + + } else { + newCallee = self.explodeExpression(calleePath); + } + + } else { + newCallee = self.explodeExpression(calleePath); + + if (n.MemberExpression.check(newCallee)) { + // If the callee was not previously a MemberExpression, then the + // CallExpression was "unqualified," meaning its `this` object + // should be the global object. If the exploded expression has + // become a MemberExpression (e.g. a context property, probably a + // temporary variable), then we need to force it to be unqualified + // by using the (0, object.property)(...) trick; otherwise, it + // will receive the object of the MemberExpression as its `this` + // object. + newCallee = b.sequenceExpression([ + b.literal(0), + newCallee + ]); + } + } + + argsPath.each(function(argPath) { + newArgs.push(explodeViaTempVar(null, argPath)); + }); + + return finish(b.callExpression( + newCallee, + newArgs + )); + + case "NewExpression": + return finish(b.newExpression( + explodeViaTempVar(null, path.get("callee")), + path.get("arguments").map(function(argPath) { + return explodeViaTempVar(null, argPath); + }) + )); + + case "ObjectExpression": + return finish(b.objectExpression( + path.get("properties").map(function(propPath) { + return b.property( + propPath.value.kind, + propPath.value.key, + explodeViaTempVar(null, propPath.get("value")) + ); + }) + )); + + case "ArrayExpression": + return finish(b.arrayExpression( + path.get("elements").map(function(elemPath) { + return explodeViaTempVar(null, elemPath); + }) + )); + + case "SequenceExpression": + var lastIndex = expr.expressions.length - 1; + + path.get("expressions").each(function(exprPath) { + if (exprPath.name === lastIndex) { + result = self.explodeExpression(exprPath, ignoreResult); + } else { + self.explodeExpression(exprPath, true); + } + }); + + return result; + + case "LogicalExpression": + var after = loc(); + + if (!ignoreResult) { + result = self.makeTempVar(); + } + + var left = explodeViaTempVar(result, path.get("left")); + + if (expr.operator === "&&") { + self.jumpIfNot(left, after); + } else { + assert.strictEqual(expr.operator, "||"); + self.jumpIf(left, after); + } + + explodeViaTempVar(result, path.get("right"), ignoreResult); + + self.mark(after); + + return result; + + case "ConditionalExpression": + var elseLoc = loc(); + var after = loc(); + var test = self.explodeExpression(path.get("test")); + + self.jumpIfNot(test, elseLoc); + + if (!ignoreResult) { + result = self.makeTempVar(); + } + + explodeViaTempVar(result, path.get("consequent"), ignoreResult); + self.jump(after); + + self.mark(elseLoc); + explodeViaTempVar(result, path.get("alternate"), ignoreResult); + + self.mark(after); + + return result; + + case "UnaryExpression": + return finish(b.unaryExpression( + expr.operator, + // Can't (and don't need to) break up the syntax of the argument. + // Think about delete a[b]. + self.explodeExpression(path.get("argument")), + !!expr.prefix + )); + + case "BinaryExpression": + return finish(b.binaryExpression( + expr.operator, + explodeViaTempVar(null, path.get("left")), + explodeViaTempVar(null, path.get("right")) + )); + + case "AssignmentExpression": + return finish(b.assignmentExpression( + expr.operator, + self.explodeExpression(path.get("left")), + self.explodeExpression(path.get("right")) + )); + + case "UpdateExpression": + return finish(b.updateExpression( + expr.operator, + self.explodeExpression(path.get("argument")), + expr.prefix + )); + + case "YieldExpression": + var after = loc(); + var arg = expr.argument && self.explodeExpression(path.get("argument")); + + if (arg && expr.delegate) { + var result = self.makeTempVar(); + + self.emit(b.returnStatement(b.callExpression( + self.contextProperty("delegateYield"), [ + arg, + b.literal(result.property.name), + after + ] + ))); + + self.mark(after); + + return result; + } + + self.emitAssign(self.contextProperty("next"), after); + self.emit(b.returnStatement(arg || null)); + self.mark(after); + + return self.contextProperty("sent"); + + default: + throw new Error( + "unknown Expression of type " + + JSON.stringify(expr.type)); + } +}; + +},{"./leap":483,"./meta":484,"./util":485,"assert":209,"recast":512}],482:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var types = require("recast").types; +var n = types.namedTypes; +var b = types.builders; +var hasOwn = Object.prototype.hasOwnProperty; + +// The hoist function takes a FunctionExpression or FunctionDeclaration +// and replaces any Declaration nodes in its body with assignments, then +// returns a VariableDeclaration containing just the names of the removed +// declarations. +exports.hoist = function(funPath) { + assert.ok(funPath instanceof types.NodePath); + n.Function.assert(funPath.value); + + var vars = {}; + + function varDeclToExpr(vdec, includeIdentifiers) { + n.VariableDeclaration.assert(vdec); + var exprs = []; + + vdec.declarations.forEach(function(dec) { + vars[dec.id.name] = dec.id; + + if (dec.init) { + exprs.push(b.assignmentExpression( + "=", dec.id, dec.init + )); + } else if (includeIdentifiers) { + exprs.push(dec.id); + } + }); + + if (exprs.length === 0) + return null; + + if (exprs.length === 1) + return exprs[0]; + + return b.sequenceExpression(exprs); + } + + types.visit(funPath.get("body"), { + visitVariableDeclaration: function(path) { + var expr = varDeclToExpr(path.value, false); + if (expr === null) { + path.replace(); + } else { + // We don't need to traverse this expression any further because + // there can't be any new declarations inside an expression. + return b.expressionStatement(expr); + } + + // Since the original node has been either removed or replaced, + // avoid traversing it any further. + return false; + }, + + visitForStatement: function(path) { + var init = path.value.init; + if (n.VariableDeclaration.check(init)) { + path.get("init").replace(varDeclToExpr(init, false)); + } + this.traverse(path); + }, + + visitForInStatement: function(path) { + var left = path.value.left; + if (n.VariableDeclaration.check(left)) { + path.get("left").replace(varDeclToExpr(left, true)); + } + this.traverse(path); + }, + + visitFunctionDeclaration: function(path) { + var node = path.value; + vars[node.id.name] = node.id; + + var parentNode = path.parent.node; + var assignment = b.expressionStatement( + b.assignmentExpression( + "=", + node.id, + b.functionExpression( + node.id, + node.params, + node.body, + node.generator, + node.expression + ) + ) + ); + + if (n.BlockStatement.check(path.parent.node)) { + // Insert the assignment form before the first statement in the + // enclosing block. + path.parent.get("body").unshift(assignment); + + // Remove the function declaration now that we've inserted the + // equivalent assignment form at the beginning of the block. + path.replace(); + + } else { + // If the parent node is not a block statement, then we can just + // replace the declaration with the equivalent assignment form + // without worrying about hoisting it. + path.replace(assignment); + } + + // Don't hoist variables out of inner functions. + return false; + }, + + visitFunctionExpression: function(path) { + // Don't descend into nested function expressions. + return false; + } + }); + + var paramNames = {}; + funPath.get("params").each(function(paramPath) { + var param = paramPath.value; + if (n.Identifier.check(param)) { + paramNames[param.name] = param; + } else { + // Variables declared by destructuring parameter patterns will be + // harmlessly re-declared. + } + }); + + var declarations = []; + + Object.keys(vars).forEach(function(name) { + if (!hasOwn.call(paramNames, name)) { + declarations.push(b.variableDeclarator(vars[name], null)); + } + }); + + if (declarations.length === 0) { + return null; // Be sure to handle this case! + } + + return b.variableDeclaration("var", declarations); +}; + +},{"assert":209,"recast":512}],483:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var types = require("recast").types; +var n = types.namedTypes; +var b = types.builders; +var inherits = require("util").inherits; +var hasOwn = Object.prototype.hasOwnProperty; + +function Entry() { + assert.ok(this instanceof Entry); +} + +function FunctionEntry(returnLoc) { + Entry.call(this); + n.Literal.assert(returnLoc); + this.returnLoc = returnLoc; +} + +inherits(FunctionEntry, Entry); +exports.FunctionEntry = FunctionEntry; + +function LoopEntry(breakLoc, continueLoc, label) { + Entry.call(this); + + n.Literal.assert(breakLoc); + n.Literal.assert(continueLoc); + + if (label) { + n.Identifier.assert(label); + } else { + label = null; + } + + this.breakLoc = breakLoc; + this.continueLoc = continueLoc; + this.label = label; +} + +inherits(LoopEntry, Entry); +exports.LoopEntry = LoopEntry; + +function SwitchEntry(breakLoc) { + Entry.call(this); + n.Literal.assert(breakLoc); + this.breakLoc = breakLoc; +} + +inherits(SwitchEntry, Entry); +exports.SwitchEntry = SwitchEntry; + +function TryEntry(firstLoc, catchEntry, finallyEntry) { + Entry.call(this); + + n.Literal.assert(firstLoc); + + if (catchEntry) { + assert.ok(catchEntry instanceof CatchEntry); + } else { + catchEntry = null; + } + + if (finallyEntry) { + assert.ok(finallyEntry instanceof FinallyEntry); + } else { + finallyEntry = null; + } + + // Have to have one or the other (or both). + assert.ok(catchEntry || finallyEntry); + + this.firstLoc = firstLoc; + this.catchEntry = catchEntry; + this.finallyEntry = finallyEntry; +} + +inherits(TryEntry, Entry); +exports.TryEntry = TryEntry; + +function CatchEntry(firstLoc, paramId) { + Entry.call(this); + + n.Literal.assert(firstLoc); + n.Identifier.assert(paramId); + + this.firstLoc = firstLoc; + this.paramId = paramId; +} + +inherits(CatchEntry, Entry); +exports.CatchEntry = CatchEntry; + +function FinallyEntry(firstLoc, afterLoc) { + Entry.call(this); + n.Literal.assert(firstLoc); + n.Literal.assert(afterLoc); + this.firstLoc = firstLoc; + this.afterLoc = afterLoc; +} + +inherits(FinallyEntry, Entry); +exports.FinallyEntry = FinallyEntry; + +function LabeledEntry(breakLoc, label) { + Entry.call(this); + + n.Literal.assert(breakLoc); + n.Identifier.assert(label); + + this.breakLoc = breakLoc; + this.label = label; +} + +inherits(LabeledEntry, Entry); +exports.LabeledEntry = LabeledEntry; + +function LeapManager(emitter) { + assert.ok(this instanceof LeapManager); + + var Emitter = require("./emit").Emitter; + assert.ok(emitter instanceof Emitter); + + this.emitter = emitter; + this.entryStack = [new FunctionEntry(emitter.finalLoc)]; +} + +var LMp = LeapManager.prototype; +exports.LeapManager = LeapManager; + +LMp.withEntry = function(entry, callback) { + assert.ok(entry instanceof Entry); + this.entryStack.push(entry); + try { + callback.call(this.emitter); + } finally { + var popped = this.entryStack.pop(); + assert.strictEqual(popped, entry); + } +}; + +LMp._findLeapLocation = function(property, label) { + for (var i = this.entryStack.length - 1; i >= 0; --i) { + var entry = this.entryStack[i]; + var loc = entry[property]; + if (loc) { + if (label) { + if (entry.label && + entry.label.name === label.name) { + return loc; + } + } else if (entry instanceof LabeledEntry) { + // Ignore LabeledEntry entries unless we are actually breaking to + // a label. + } else { + return loc; + } + } + } + + return null; +}; + +LMp.getBreakLoc = function(label) { + return this._findLeapLocation("breakLoc", label); +}; + +LMp.getContinueLoc = function(label) { + return this._findLeapLocation("continueLoc", label); +}; + +},{"./emit":481,"assert":209,"recast":512,"util":235}],484:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var m = require("private").makeAccessor(); +var types = require("recast").types; +var isArray = types.builtInTypes.array; +var n = types.namedTypes; +var hasOwn = Object.prototype.hasOwnProperty; + +function makePredicate(propertyName, knownTypes) { + function onlyChildren(node) { + n.Node.assert(node); + + // Assume no side effects until we find out otherwise. + var result = false; + + function check(child) { + if (result) { + // Do nothing. + } else if (isArray.check(child)) { + child.some(check); + } else if (n.Node.check(child)) { + assert.strictEqual(result, false); + result = predicate(child); + } + return result; + } + + types.eachField(node, function(name, child) { + check(child); + }); + + return result; + } + + function predicate(node) { + n.Node.assert(node); + + var meta = m(node); + if (hasOwn.call(meta, propertyName)) + return meta[propertyName]; + + // Certain types are "opaque," which means they have no side + // effects or leaps and we don't care about their subexpressions. + if (hasOwn.call(opaqueTypes, node.type)) + return meta[propertyName] = false; + + if (hasOwn.call(knownTypes, node.type)) + return meta[propertyName] = true; + + return meta[propertyName] = onlyChildren(node); + } + + predicate.onlyChildren = onlyChildren; + + return predicate; +} + +var opaqueTypes = { + FunctionExpression: true +}; + +// These types potentially have side effects regardless of what side +// effects their subexpressions have. +var sideEffectTypes = { + CallExpression: true, // Anything could happen! + ForInStatement: true, // Modifies the key variable. + UnaryExpression: true, // Think delete. + BinaryExpression: true, // Might invoke .toString() or .valueOf(). + AssignmentExpression: true, // Side-effecting by definition. + UpdateExpression: true, // Updates are essentially assignments. + NewExpression: true // Similar to CallExpression. +}; + +// These types are the direct cause of all leaps in control flow. +var leapTypes = { + YieldExpression: true, + BreakStatement: true, + ContinueStatement: true, + ReturnStatement: true, + ThrowStatement: true +}; + +// All leap types are also side effect types. +for (var type in leapTypes) { + if (hasOwn.call(leapTypes, type)) { + sideEffectTypes[type] = leapTypes[type]; + } +} + +exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes); +exports.containsLeap = makePredicate("containsLeap", leapTypes); + +},{"assert":209,"private":480,"recast":512}],485:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var types = require("recast").types; +var n = types.namedTypes; +var b = types.builders; +var hasOwn = Object.prototype.hasOwnProperty; + +exports.defaults = function(obj) { + var len = arguments.length; + var extension; + + for (var i = 1; i < len; ++i) { + if ((extension = arguments[i])) { + for (var key in extension) { + if (hasOwn.call(extension, key) && !hasOwn.call(obj, key)) { + obj[key] = extension[key]; + } + } + } + } + + return obj; +}; + +exports.runtimeProperty = function(name) { + return b.memberExpression( + b.identifier("regeneratorRuntime"), + b.identifier(name), + false + ); +}; + +// Inspired by the isReference function from ast-util: +// https://github.com/eventualbuddha/ast-util/blob/9bf91c5ce8/lib/index.js#L466-L506 +exports.isReference = function(path, name) { + var node = path.value; + + if (!n.Identifier.check(node)) { + return false; + } + + if (name && node.name !== name) { + return false; + } + + var parent = path.parent.value; + + switch (parent.type) { + case "VariableDeclarator": + return path.name === "init"; + + case "MemberExpression": + return path.name === "object" || ( + parent.computed && path.name === "property" + ); + + case "FunctionExpression": + case "FunctionDeclaration": + case "ArrowFunctionExpression": + if (path.name === "id") { + return false; + } + + if (path.parentPath.name === "params" && + parent.params === path.parentPath.value && + parent.params[path.name] === node) { + return false; + } + + return true; + + case "ClassDeclaration": + case "ClassExpression": + return path.name !== "id"; + + case "CatchClause": + return path.name !== "param"; + + case "Property": + case "MethodDefinition": + return path.name !== "key"; + + case "ImportSpecifier": + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "LabeledStatement": + return false; + + default: + return true; + } +}; + +},{"assert":209,"recast":512}],486:[function(require,module,exports){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var fs = require("fs"); +var recast = require("recast"); +var types = recast.types; +var n = types.namedTypes; +var b = types.builders; +var isArray = types.builtInTypes.array; +var isObject = types.builtInTypes.object; +var NodePath = types.NodePath; +var hoist = require("./hoist").hoist; +var Emitter = require("./emit").Emitter; +var util = require("./util"); +var runtimeProperty = util.runtimeProperty; +var getMarkInfo = require("private").makeAccessor(); + +exports.transform = function transform(node, options) { + options = options || {}; + + var path = node instanceof NodePath ? node : new NodePath(node); + visitor.visit(path, options); + node = path.value; + + if (options.includeRuntime === true || + (options.includeRuntime === 'if used' && visitor.wasChangeReported())) { + injectRuntime(n.File.check(node) ? node.program : node); + } + + options.madeChanges = visitor.wasChangeReported(); + + return node; +}; + +function injectRuntime(program) { + n.Program.assert(program); + + // Include the runtime by modifying the AST rather than by concatenating + // strings. This technique will allow for more accurate source mapping. + var runtimePath = require("..").runtime.path; + var runtime = fs.readFileSync(runtimePath, "utf8"); + var runtimeBody = recast.parse(runtime, { + sourceFileName: runtimePath + }).program.body; + + var body = program.body; + body.unshift.apply(body, runtimeBody); +} + +var visitor = types.PathVisitor.fromMethodsObject({ + reset: function(node, options) { + this.options = options; + }, + + visitFunction: function(path) { + // Calling this.traverse(path) first makes for a post-order traversal. + this.traverse(path); + + var node = path.value; + var shouldTransformAsync = node.async && !this.options.disableAsync; + + if (!node.generator && !shouldTransformAsync) { + return; + } + + this.reportChanged(); + + if (node.expression) { + // Transform expression lambdas into normal functions. + node.expression = false; + node.body = b.blockStatement([ + b.returnStatement(node.body) + ]); + } + + if (shouldTransformAsync) { + awaitVisitor.visit(path.get("body")); + } + + var outerBody = []; + var innerBody = []; + var bodyPath = path.get("body", "body"); + + bodyPath.each(function(childPath) { + var node = childPath.value; + if (node && node._blockHoist != null) { + outerBody.push(node); + } else { + innerBody.push(node); + } + }); + + if (outerBody.length > 0) { + // Only replace the inner body if we actually hoisted any statements + // to the outer body. + bodyPath.replace(innerBody); + } + + var outerFnExpr = getOuterFnExpr(path); + // Note that getOuterFnExpr has the side-effect of ensuring that the + // function has a name (so node.id will always be an Identifier), even + // if a temporary name has to be synthesized. + n.Identifier.assert(node.id); + var innerFnId = b.identifier(node.id.name + "$"); + var contextId = path.scope.declareTemporary("context$"); + var argsId = path.scope.declareTemporary("args$"); + + // Turn all declarations into vars, and replace the original + // declarations with equivalent assignment expressions. + var vars = hoist(path); + + var didRenameArguments = renameArguments(path, argsId); + if (didRenameArguments) { + vars = vars || b.variableDeclaration("var", []); + vars.declarations.push(b.variableDeclarator( + argsId, b.identifier("arguments") + )); + } + + var emitter = new Emitter(contextId); + emitter.explode(path.get("body")); + + if (vars && vars.declarations.length > 0) { + outerBody.push(vars); + } + + var wrapArgs = [ + emitter.getContextFunction(innerFnId), + // Async functions that are not generators don't care about the + // outer function because they don't need it to be marked and don't + // inherit from its .prototype. + node.generator ? outerFnExpr : b.literal(null), + b.thisExpression() + ]; + + var tryLocsList = emitter.getTryLocsList(); + if (tryLocsList) { + wrapArgs.push(tryLocsList); + } + + var wrapCall = b.callExpression( + runtimeProperty(shouldTransformAsync ? "async" : "wrap"), + wrapArgs + ); + + outerBody.push(b.returnStatement(wrapCall)); + node.body = b.blockStatement(outerBody); + + var wasGeneratorFunction = node.generator; + if (wasGeneratorFunction) { + node.generator = false; + } + + if (shouldTransformAsync) { + node.async = false; + } + + if (wasGeneratorFunction && + n.Expression.check(node)) { + return b.callExpression(runtimeProperty("mark"), [node]); + } + }, + + visitForOfStatement: function(path) { + this.traverse(path); + + var node = path.value; + var tempIterId = path.scope.declareTemporary("t$"); + var tempIterDecl = b.variableDeclarator( + tempIterId, + b.callExpression( + runtimeProperty("values"), + [node.right] + ) + ); + + var tempInfoId = path.scope.declareTemporary("t$"); + var tempInfoDecl = b.variableDeclarator(tempInfoId, null); + + var init = node.left; + var loopId; + if (n.VariableDeclaration.check(init)) { + loopId = init.declarations[0].id; + init.declarations.push(tempIterDecl, tempInfoDecl); + } else { + loopId = init; + init = b.variableDeclaration("var", [ + tempIterDecl, + tempInfoDecl + ]); + } + n.Identifier.assert(loopId); + + var loopIdAssignExprStmt = b.expressionStatement( + b.assignmentExpression( + "=", + loopId, + b.memberExpression( + tempInfoId, + b.identifier("value"), + false + ) + ) + ); + + if (n.BlockStatement.check(node.body)) { + node.body.body.unshift(loopIdAssignExprStmt); + } else { + node.body = b.blockStatement([ + loopIdAssignExprStmt, + node.body + ]); + } + + return b.forStatement( + init, + b.unaryExpression( + "!", + b.memberExpression( + b.assignmentExpression( + "=", + tempInfoId, + b.callExpression( + b.memberExpression( + tempIterId, + b.identifier("next"), + false + ), + [] + ) + ), + b.identifier("done"), + false + ) + ), + null, + node.body + ); + } +}); + +// Given a NodePath for a Function, return an Expression node that can be +// used to refer reliably to the function object from inside the function. +// This expression is essentially a replacement for arguments.callee, with +// the key advantage that it works in strict mode. +function getOuterFnExpr(funPath) { + var node = funPath.value; + n.Function.assert(node); + + if (node.generator && // Non-generator functions don't need to be marked. + n.FunctionDeclaration.check(node)) { + var pp = funPath.parent; + + while (pp && !(n.BlockStatement.check(pp.value) || + n.Program.check(pp.value))) { + pp = pp.parent; + } + + if (!pp) { + return node.id; + } + + var markDecl = getRuntimeMarkDecl(pp); + var markedArray = markDecl.declarations[0].id; + var funDeclIdArray = markDecl.declarations[0].init.callee.object; + n.ArrayExpression.assert(funDeclIdArray); + + var index = funDeclIdArray.elements.length; + funDeclIdArray.elements.push(node.id); + + return b.memberExpression( + markedArray, + b.literal(index), + true + ); + } + + return node.id || ( + node.id = funPath.scope.parent.declareTemporary("callee$") + ); +} + +function getRuntimeMarkDecl(blockPath) { + assert.ok(blockPath instanceof NodePath); + var block = blockPath.node; + isArray.assert(block.body); + + var info = getMarkInfo(block); + if (info.decl) { + return info.decl; + } + + info.decl = b.variableDeclaration("var", [ + b.variableDeclarator( + blockPath.scope.declareTemporary("marked"), + b.callExpression( + b.memberExpression( + b.arrayExpression([]), + b.identifier("map"), + false + ), + [runtimeProperty("mark")] + ) + ) + ]); + + for (var i = 0; i < block.body.length; ++i) { + if (!shouldNotHoistAbove(blockPath.get("body", i))) { + break; + } + } + + blockPath.get("body").insertAt(i, info.decl); + + return info.decl; +} + +function shouldNotHoistAbove(stmtPath) { + var value = stmtPath.value; + n.Statement.assert(value); + + // If the first statement is a "use strict" declaration, make sure to + // insert hoisted declarations afterwards. + return n.ExpressionStatement.check(value) && + n.Literal.check(value.expression) && + value.expression.value === "use strict"; +} + +function renameArguments(funcPath, argsId) { + assert.ok(funcPath instanceof types.NodePath); + var func = funcPath.value; + var didRenameArguments = false; + + recast.visit(funcPath, { + visitFunction: function(path) { + if (path.value === func) { + this.traverse(path); + } else { + return false; + } + }, + + visitIdentifier: function(path) { + if (path.value.name === "arguments" && + util.isReference(path)) { + path.replace(argsId); + didRenameArguments = true; + return false; + } + + this.traverse(path); + } + }); + + // If the traversal replaced any arguments references, then we need to + // alias the outer function's arguments binding (be it the implicit + // arguments object or some other parameter or variable) to the variable + // named by argsId. + return didRenameArguments; +} + +var awaitVisitor = types.PathVisitor.fromMethodsObject({ + visitFunction: function(path) { + return false; // Don't descend into nested function scopes. + }, + + visitAwaitExpression: function(path) { + // Convert await and await* expressions to yield expressions. + var argument = path.value.argument; + + // If the parser supports await* syntax using a boolean .all property + // (#171), desugar that syntax to yield Promise.all(argument). + if (path.value.all) { + argument = b.callExpression( + b.memberExpression( + b.identifier("Promise"), + b.identifier("all"), + false + ), + [argument] + ); + } + + // Transforming `await x` to `yield regeneratorRuntime.awrap(x)` + // causes the argument to be wrapped in such a way that the runtime + // can distinguish between awaited and merely yielded values. + return b.yieldExpression( + b.callExpression( + runtimeProperty("awrap"), + [argument] + ), + false + ); + } +}); + +},{"..":487,"./emit":481,"./hoist":482,"./util":485,"assert":209,"fs":208,"private":480,"recast":512}],487:[function(require,module,exports){ +(function (__dirname){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +var assert = require("assert"); +var path = require("path"); +var fs = require("fs"); +var through = require("through"); +var transform = require("./lib/visit").transform; +var utils = require("./lib/util"); +var recast = require("recast"); +var types = recast.types; +var genOrAsyncFunExp = /\bfunction\s*\*|\basync\b/; +var blockBindingExp = /\b(let|const)\s+/; + +function exports(file, options) { + var data = []; + return through(write, end); + + function write(buf) { + data.push(buf); + } + + function end() { + this.queue(compile(data.join(""), options).code); + this.queue(null); + } +} + +// To get a writable stream for use as a browserify transform, call +// require("regenerator")(). +module.exports = exports; + +// To include the runtime globally in the current node process, call +// require("regenerator").runtime(). +function runtime() { + require("./runtime"); +} +exports.runtime = runtime; +runtime.path = path.join(__dirname, "runtime.js"); + +function compile(source, options) { + options = normalizeOptions(options); + + if (!genOrAsyncFunExp.test(source)) { + return { + // Shortcut: no generators or async functions to transform. + code: (options.includeRuntime === true ? fs.readFileSync( + path.join(__dirname, "runtime.js"), "utf-8" + ) + "\n" : "") + source + }; + } + + var recastOptions = getRecastOptions(options); + var ast = recast.parse(source, recastOptions); + var nodePath = new types.NodePath(ast); + var programPath = nodePath.get("program"); + + if (shouldVarify(source, options)) { + // Transpile let/const into var declarations. + varifyAst(programPath.node); + } + + transform(programPath, options); + + return recast.print(nodePath, recastOptions); +} + +function normalizeOptions(options) { + options = utils.defaults(options || {}, { + includeRuntime: false, + supportBlockBinding: true + }); + + if (!options.esprima) { + options.esprima = require("esprima-fb"); + } + + assert.ok( + /harmony/.test(options.esprima.version), + "Bad esprima version: " + options.esprima.version + ); + + return options; +} + +function getRecastOptions(options) { + var recastOptions = { + range: true + }; + + function copy(name) { + if (name in options) { + recastOptions[name] = options[name]; + } + } + + copy("esprima"); + copy("sourceFileName"); + copy("sourceMapName"); + copy("inputSourceMap"); + copy("sourceRoot"); + + return recastOptions; +} + +function shouldVarify(source, options) { + var supportBlockBinding = !!options.supportBlockBinding; + if (supportBlockBinding) { + if (!blockBindingExp.test(source)) { + supportBlockBinding = false; + } + } + + return supportBlockBinding; +} + +function varify(source, options) { + var recastOptions = getRecastOptions(normalizeOptions(options)); + var ast = recast.parse(source, recastOptions); + varifyAst(ast.program); + return recast.print(ast, recastOptions).code; +} + +function varifyAst(ast) { + types.namedTypes.Program.assert(ast); + + var defsResult = require("defs")(ast, { + ast: true, + disallowUnknownReferences: false, + disallowDuplicated: false, + disallowVars: false, + loopClosures: "iife" + }); + + if (defsResult.errors) { + throw new Error(defsResult.errors.join("\n")) + } + + return ast; +} + +// Convenience for just translating let/const to var declarations. +exports.varify = varify; + +// Transforms a string of source code, returning the { code, map? } result +// from recast.print. +exports.compile = compile; + +// To modify an AST directly, call require("regenerator").transform(ast). +exports.transform = transform; + +}).call(this,"/node_modules/regenerator") +},{"./lib/util":485,"./lib/visit":486,"./runtime":514,"assert":209,"defs":488,"esprima-fb":208,"fs":208,"path":218,"recast":512,"through":513}],488:[function(require,module,exports){ +"use strict"; + +var assert = require("assert"); +var is = require("simple-is"); +var fmt = require("simple-fmt"); +var stringmap = require("stringmap"); +var stringset = require("stringset"); +var alter = require("alter"); +var traverse = require("ast-traverse"); +var breakable = require("breakable"); +var Scope = require("./scope"); +var error = require("./error"); +var getline = error.getline; +var options = require("./options"); +var Stats = require("./stats"); +var jshint_vars = require("./jshint_globals/vars.js"); + + +function isConstLet(kind) { + return is.someof(kind, ["const", "let"]); +} + +function isVarConstLet(kind) { + return is.someof(kind, ["var", "const", "let"]); +} + +function isNonFunctionBlock(node) { + return node.type === "BlockStatement" && is.noneof(node.$parent.type, ["FunctionDeclaration", "FunctionExpression"]); +} + +function isForWithConstLet(node) { + return node.type === "ForStatement" && node.init && node.init.type === "VariableDeclaration" && isConstLet(node.init.kind); +} + +function isForInOfWithConstLet(node) { + return isForInOf(node) && node.left.type === "VariableDeclaration" && isConstLet(node.left.kind); +} + +function isForInOf(node) { + return is.someof(node.type, ["ForInStatement", "ForOfStatement"]); +} + +function isFunction(node) { + return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]); +} + +function isLoop(node) { + return is.someof(node.type, ["ForStatement", "ForInStatement", "ForOfStatement", "WhileStatement", "DoWhileStatement"]); +} + +function isReference(node) { + var parent = node.$parent; + return node.$refToScope || + node.type === "Identifier" && + !(parent.type === "VariableDeclarator" && parent.id === node) && // var|let|const $ + !(parent.type === "MemberExpression" && parent.computed === false && parent.property === node) && // obj.$ + !(parent.type === "Property" && parent.key === node) && // {$: ...} + !(parent.type === "LabeledStatement" && parent.label === node) && // $: ... + !(parent.type === "CatchClause" && parent.param === node) && // catch($) + !(isFunction(parent) && parent.id === node) && // function $(.. + !(isFunction(parent) && is.someof(node, parent.params)) && // function f($).. + true; +} + +function isLvalue(node) { + return isReference(node) && + ((node.$parent.type === "AssignmentExpression" && node.$parent.left === node) || + (node.$parent.type === "UpdateExpression" && node.$parent.argument === node)); +} + +function createScopes(node, parent) { + assert(!node.$scope); + + node.$parent = parent; + node.$scope = node.$parent ? node.$parent.$scope : null; // may be overridden + + if (node.type === "Program") { + // Top-level program is a scope + // There's no block-scope under it + node.$scope = new Scope({ + kind: "hoist", + node: node, + parent: null, + }); + + } else if (isFunction(node)) { + // Function is a scope, with params in it + // There's no block-scope under it + + node.$scope = new Scope({ + kind: "hoist", + node: node, + parent: node.$parent.$scope, + }); + + // function has a name + if (node.id) { + assert(node.id.type === "Identifier"); + + if (node.type === "FunctionDeclaration") { + // Function name goes in parent scope for declared functions + node.$parent.$scope.add(node.id.name, "fun", node.id, null); + } else if (node.type === "FunctionExpression") { + // Function name goes in function's scope for named function expressions + node.$scope.add(node.id.name, "fun", node.id, null); + } else { + assert(false); + } + } + + node.params.forEach(function(param) { + node.$scope.add(param.name, "param", param, null); + }); + + } else if (node.type === "VariableDeclaration") { + // Variable declarations names goes in current scope + assert(isVarConstLet(node.kind)); + node.declarations.forEach(function(declarator) { + assert(declarator.type === "VariableDeclarator"); + var name = declarator.id.name; + if (options.disallowVars && node.kind === "var") { + error(getline(declarator), "var {0} is not allowed (use let or const)", name); + } + node.$scope.add(name, node.kind, declarator.id, declarator.range[1]); + }); + + } else if (isForWithConstLet(node) || isForInOfWithConstLet(node)) { + // For(In/Of) loop with const|let declaration is a scope, with declaration in it + // There may be a block-scope under it + node.$scope = new Scope({ + kind: "block", + node: node, + parent: node.$parent.$scope, + }); + + } else if (isNonFunctionBlock(node)) { + // A block node is a scope unless parent is a function + node.$scope = new Scope({ + kind: "block", + node: node, + parent: node.$parent.$scope, + }); + + } else if (node.type === "CatchClause") { + var identifier = node.param; + + node.$scope = new Scope({ + kind: "catch-block", + node: node, + parent: node.$parent.$scope, + }); + node.$scope.add(identifier.name, "caught", identifier, null); + + // All hoist-scope keeps track of which variables that are propagated through, + // i.e. an reference inside the scope points to a declaration outside the scope. + // This is used to mark "taint" the name since adding a new variable in the scope, + // with a propagated name, would change the meaning of the existing references. + // + // catch(e) is special because even though e is a variable in its own scope, + // we want to make sure that catch(e){let e} is never transformed to + // catch(e){var e} (but rather var e$0). For that reason we taint the use of e + // in the closest hoist-scope, i.e. where var e$0 belongs. + node.$scope.closestHoistScope().markPropagates(identifier.name); + } +} + +function createTopScope(programScope, environments, globals) { + function inject(obj) { + for (var name in obj) { + var writeable = obj[name]; + var kind = (writeable ? "var" : "const"); + if (topScope.hasOwn(name)) { + topScope.remove(name); + } + topScope.add(name, kind, {loc: {start: {line: -1}}}, -1); + } + } + + var topScope = new Scope({ + kind: "hoist", + node: {}, + parent: null, + }); + + var complementary = { + undefined: false, + Infinity: false, + console: false, + }; + + inject(complementary); + inject(jshint_vars.reservedVars); + inject(jshint_vars.ecmaIdentifiers); + if (environments) { + environments.forEach(function(env) { + if (!jshint_vars[env]) { + error(-1, 'environment "{0}" not found', env); + } else { + inject(jshint_vars[env]); + } + }); + } + if (globals) { + inject(globals); + } + + // link it in + programScope.parent = topScope; + topScope.children.push(programScope); + + return topScope; +} + +function setupReferences(ast, allIdentifiers, opts) { + var analyze = (is.own(opts, "analyze") ? opts.analyze : true); + + function visit(node) { + if (!isReference(node)) { + return; + } + allIdentifiers.add(node.name); + + var scope = node.$scope.lookup(node.name); + if (analyze && !scope && options.disallowUnknownReferences) { + error(getline(node), "reference to unknown global variable {0}", node.name); + } + // check const and let for referenced-before-declaration + if (analyze && scope && is.someof(scope.getKind(node.name), ["const", "let"])) { + var allowedFromPos = scope.getFromPos(node.name); + var referencedAtPos = node.range[0]; + assert(is.finitenumber(allowedFromPos)); + assert(is.finitenumber(referencedAtPos)); + if (referencedAtPos < allowedFromPos) { + if (!node.$scope.hasFunctionScopeBetween(scope)) { + error(getline(node), "{0} is referenced before its declaration", node.name); + } + } + } + node.$refToScope = scope; + } + + traverse(ast, {pre: visit}); +} + +// TODO for loops init and body props are parallel to each other but init scope is outer that of body +// TODO is this a problem? + +function varify(ast, stats, allIdentifiers, changes) { + function unique(name) { + assert(allIdentifiers.has(name)); + for (var cnt = 0; ; cnt++) { + var genName = name + "$" + String(cnt); + if (!allIdentifiers.has(genName)) { + return genName; + } + } + } + + function renameDeclarations(node) { + if (node.type === "VariableDeclaration" && isConstLet(node.kind)) { + var hoistScope = node.$scope.closestHoistScope(); + var origScope = node.$scope; + + // text change const|let => var + changes.push({ + start: node.range[0], + end: node.range[0] + node.kind.length, + str: "var", + }); + + node.declarations.forEach(function(declarator) { + assert(declarator.type === "VariableDeclarator"); + var name = declarator.id.name; + + stats.declarator(node.kind); + + // rename if + // 1) name already exists in hoistScope, or + // 2) name is already propagated (passed) through hoistScope or manually tainted + var rename = (origScope !== hoistScope && + (hoistScope.hasOwn(name) || hoistScope.doesPropagate(name))); + + var newName = (rename ? unique(name) : name); + + origScope.remove(name); + hoistScope.add(newName, "var", declarator.id, declarator.range[1]); + + origScope.moves = origScope.moves || stringmap(); + origScope.moves.set(name, { + name: newName, + scope: hoistScope, + }); + + allIdentifiers.add(newName); + + if (newName !== name) { + stats.rename(name, newName, getline(declarator)); + + declarator.id.originalName = name; + declarator.id.name = newName; + + // textchange var x => var x$1 + changes.push({ + start: declarator.id.range[0], + end: declarator.id.range[1], + str: newName, + }); + } + }); + + // ast change const|let => var + node.kind = "var"; + } + } + + function renameReferences(node) { + if (!node.$refToScope) { + return; + } + var move = node.$refToScope.moves && node.$refToScope.moves.get(node.name); + if (!move) { + return; + } + node.$refToScope = move.scope; + + if (node.name !== move.name) { + node.originalName = node.name; + node.name = move.name; + + if (node.alterop) { + // node has no range because it is the result of another alter operation + var existingOp = null; + for (var i = 0; i < changes.length; i++) { + var op = changes[i]; + if (op.node === node) { + existingOp = op; + break; + } + } + assert(existingOp); + + // modify op + existingOp.str = move.name; + } else { + changes.push({ + start: node.range[0], + end: node.range[1], + str: move.name, + }); + } + } + } + + traverse(ast, {pre: renameDeclarations}); + traverse(ast, {pre: renameReferences}); + ast.$scope.traverse({pre: function(scope) { + delete scope.moves; + }}); +} + + +function detectLoopClosures(ast) { + traverse(ast, {pre: visit}); + + function detectIifyBodyBlockers(body, node) { + return breakable(function(brk) { + traverse(body, {pre: function(n) { + // if we hit an inner function of the loop body, don't traverse further + if (isFunction(n)) { + return false; + } + + var err = true; // reset to false in else-statement below + var msg = "loop-variable {0} is captured by a loop-closure that can't be transformed due to use of {1} at line {2}"; + if (n.type === "BreakStatement") { + error(getline(node), msg, node.name, "break", getline(n)); + } else if (n.type === "ContinueStatement") { + error(getline(node), msg, node.name, "continue", getline(n)); + } else if (n.type === "ReturnStatement") { + error(getline(node), msg, node.name, "return", getline(n)); + } else if (n.type === "YieldExpression") { + error(getline(node), msg, node.name, "yield", getline(n)); + } else if (n.type === "Identifier" && n.name === "arguments") { + error(getline(node), msg, node.name, "arguments", getline(n)); + } else if (n.type === "VariableDeclaration" && n.kind === "var") { + error(getline(node), msg, node.name, "var", getline(n)); + } else { + err = false; + } + if (err) { + brk(true); // break traversal + } + }}); + return false; + }); + } + + function visit(node) { + // forbidden pattern: + // * * * * + var loopNode = null; + if (isReference(node) && node.$refToScope && isConstLet(node.$refToScope.getKind(node.name))) { + // traverse nodes up towards root from constlet-def + // if we hit a function (before a loop) - ok! + // if we hit a loop - maybe-ouch + // if we reach root - ok! + for (var n = node.$refToScope.node; ; ) { + if (isFunction(n)) { + // we're ok (function-local) + return; + } else if (isLoop(n)) { + loopNode = n; + // maybe not ok (between loop and function) + break; + } + n = n.$parent; + if (!n) { + // ok (reached root) + return; + } + } + + assert(isLoop(loopNode)); + + // traverse scopes from reference-scope up towards definition-scope + // if we hit a function, ouch! + var defScope = node.$refToScope; + var generateIIFE = (options.loopClosures === "iife"); + + for (var s = node.$scope; s; s = s.parent) { + if (s === defScope) { + // we're ok + return; + } else if (isFunction(s.node)) { + // not ok (there's a function between the reference and definition) + // may be transformable via IIFE + + if (!generateIIFE) { + var msg = "loop-variable {0} is captured by a loop-closure. Tried \"loopClosures\": \"iife\" in defs-config.json?"; + return error(getline(node), msg, node.name); + } + + // here be dragons + // for (let x = ..; .. ; ..) { (function(){x})() } is forbidden because of current + // spec and VM status + if (loopNode.type === "ForStatement" && defScope.node === loopNode) { + var declarationNode = defScope.getNode(node.name); + return error(getline(declarationNode), "Not yet specced ES6 feature. {0} is declared in for-loop header and then captured in loop closure", declarationNode.name); + } + + // speak now or forever hold your peace + if (detectIifyBodyBlockers(loopNode.body, node)) { + // error already generated + return; + } + + // mark loop for IIFE-insertion + loopNode.$iify = true; + } + } + } + } +} + +function transformLoopClosures(root, ops, options) { + function insertOp(pos, str, node) { + var op = { + start: pos, + end: pos, + str: str, + } + if (node) { + op.node = node; + } + ops.push(op); + } + + traverse(root, {pre: function(node) { + if (!node.$iify) { + return; + } + + var hasBlock = (node.body.type === "BlockStatement"); + + var insertHead = (hasBlock ? + node.body.range[0] + 1 : // just after body { + node.body.range[0]); // just before existing expression + var insertFoot = (hasBlock ? + node.body.range[1] - 1 : // just before body } + node.body.range[1]); // just after existing expression + + var forInName = (isForInOf(node) && node.left.declarations[0].id.name);; + var iifeHead = fmt("(function({0}){", forInName ? forInName : ""); + var iifeTail = fmt("}).call(this{0});", forInName ? ", " + forInName : ""); + + // modify AST + var iifeFragment = options.parse(iifeHead + iifeTail); + var iifeExpressionStatement = iifeFragment.body[0]; + var iifeBlockStatement = iifeExpressionStatement.expression.callee.object.body; + + if (hasBlock) { + var forBlockStatement = node.body; + var tmp = forBlockStatement.body; + forBlockStatement.body = [iifeExpressionStatement]; + iifeBlockStatement.body = tmp; + } else { + var tmp$0 = node.body; + node.body = iifeExpressionStatement; + iifeBlockStatement.body[0] = tmp$0; + } + + // create ops + insertOp(insertHead, iifeHead); + + if (forInName) { + insertOp(insertFoot, "}).call(this, "); + + var args = iifeExpressionStatement.expression.arguments; + var iifeArgumentIdentifier = args[1]; + iifeArgumentIdentifier.alterop = true; + insertOp(insertFoot, forInName, iifeArgumentIdentifier); + + insertOp(insertFoot, ");"); + } else { + insertOp(insertFoot, iifeTail); + } + }}); +} + +function detectConstAssignment(ast) { + traverse(ast, {pre: function(node) { + if (isLvalue(node)) { + var scope = node.$scope.lookup(node.name); + if (scope && scope.getKind(node.name) === "const") { + error(getline(node), "can't assign to const variable {0}", node.name); + } + } + }}); +} + +function detectConstantLets(ast) { + traverse(ast, {pre: function(node) { + if (isLvalue(node)) { + var scope = node.$scope.lookup(node.name); + if (scope) { + scope.markWrite(node.name); + } + } + }}); + + ast.$scope.detectUnmodifiedLets(); +} + +function setupScopeAndReferences(root, opts) { + // setup scopes + traverse(root, {pre: createScopes}); + var topScope = createTopScope(root.$scope, options.environments, options.globals); + + // allIdentifiers contains all declared and referenced vars + // collect all declaration names (including those in topScope) + var allIdentifiers = stringset(); + topScope.traverse({pre: function(scope) { + allIdentifiers.addMany(scope.decls.keys()); + }}); + + // setup node.$refToScope, check for errors. + // also collects all referenced names to allIdentifiers + setupReferences(root, allIdentifiers, opts); + return allIdentifiers; +} + +function cleanupTree(root) { + traverse(root, {pre: function(node) { + for (var prop in node) { + if (prop[0] === "$") { + delete node[prop]; + } + } + }}); +} + +function run(src, config) { + // alter the options singleton with user configuration + for (var key in config) { + options[key] = config[key]; + } + + var parsed; + + if (is.object(src)) { + if (!options.ast) { + return { + errors: [ + "Can't produce string output when input is an AST. " + + "Did you forget to set options.ast = true?" + ], + }; + } + + // Received an AST object as src, so no need to parse it. + parsed = src; + + } else if (is.string(src)) { + try { + parsed = options.parse(src, { + loc: true, + range: true, + }); + } catch (e) { + return { + errors: [ + fmt("line {0} column {1}: Error during input file parsing\n{2}\n{3}", + e.lineNumber, + e.column, + src.split("\n")[e.lineNumber - 1], + fmt.repeat(" ", e.column - 1) + "^") + ], + }; + } + + } else { + return { + errors: ["Input was neither an AST object nor a string."], + }; + } + + var ast = parsed; + + // TODO detect unused variables (never read) + error.reset(); + + var allIdentifiers = setupScopeAndReferences(ast, {}); + + // static analysis passes + detectLoopClosures(ast); + detectConstAssignment(ast); + //detectConstantLets(ast); + + var changes = []; + transformLoopClosures(ast, changes, options); + + //ast.$scope.print(); process.exit(-1); + + if (error.errors.length >= 1) { + return { + errors: error.errors, + }; + } + + if (changes.length > 0) { + cleanupTree(ast); + allIdentifiers = setupScopeAndReferences(ast, {analyze: false}); + } + assert(error.errors.length === 0); + + // change constlet declarations to var, renamed if needed + // varify modifies the scopes and AST accordingly and + // returns a list of change fragments (to use with alter) + var stats = new Stats(); + varify(ast, stats, allIdentifiers, changes); + + if (options.ast) { + // return the modified AST instead of src code + // get rid of all added $ properties first, such as $parent and $scope + cleanupTree(ast); + return { + stats: stats, + ast: ast, + }; + } else { + // apply changes produced by varify and return the transformed src + var transformedSrc = alter(src, changes); + return { + stats: stats, + src: transformedSrc, + }; + } +} + +module.exports = run; + +},{"./error":489,"./jshint_globals/vars.js":490,"./options":491,"./scope":492,"./stats":493,"alter":494,"assert":209,"ast-traverse":496,"breakable":497,"simple-fmt":498,"simple-is":499,"stringmap":500,"stringset":501}],489:[function(require,module,exports){ +"use strict"; + +var fmt = require("simple-fmt"); +var assert = require("assert"); + +function error(line, var_args) { + assert(arguments.length >= 2); + + var msg = (arguments.length === 2 ? + String(var_args) : fmt.apply(fmt, Array.prototype.slice.call(arguments, 1))); + + error.errors.push(line === -1 ? msg : fmt("line {0}: {1}", line, msg)); +} + +error.reset = function() { + error.errors = []; +}; + +error.getline = function(node) { + if (node && node.loc && node.loc.start) { + return node.loc.start.line; + } + return -1; +}; + +error.reset(); + +module.exports = error; + +},{"assert":209,"simple-fmt":498}],490:[function(require,module,exports){ +// jshint -W001 + +"use strict"; + +// Identifiers provided by the ECMAScript standard. + +exports.reservedVars = { + arguments : false, + NaN : false +}; + +exports.ecmaIdentifiers = { + Array : false, + Boolean : false, + Date : false, + decodeURI : false, + decodeURIComponent : false, + encodeURI : false, + encodeURIComponent : false, + Error : false, + "eval" : false, + EvalError : false, + Function : false, + hasOwnProperty : false, + isFinite : false, + isNaN : false, + JSON : false, + Math : false, + Map : false, + Number : false, + Object : false, + parseInt : false, + parseFloat : false, + RangeError : false, + ReferenceError : false, + RegExp : false, + Set : false, + String : false, + SyntaxError : false, + TypeError : false, + URIError : false, + WeakMap : false +}; + +// Global variables commonly provided by a web browser environment. + +exports.browser = { + ArrayBuffer : false, + ArrayBufferView : false, + Audio : false, + Blob : false, + addEventListener : false, + applicationCache : false, + atob : false, + blur : false, + btoa : false, + clearInterval : false, + clearTimeout : false, + close : false, + closed : false, + DataView : false, + DOMParser : false, + defaultStatus : false, + document : false, + Element : false, + event : false, + FileReader : false, + Float32Array : false, + Float64Array : false, + FormData : false, + focus : false, + frames : false, + getComputedStyle : false, + HTMLElement : false, + HTMLAnchorElement : false, + HTMLBaseElement : false, + HTMLBlockquoteElement: false, + HTMLBodyElement : false, + HTMLBRElement : false, + HTMLButtonElement : false, + HTMLCanvasElement : false, + HTMLDirectoryElement : false, + HTMLDivElement : false, + HTMLDListElement : false, + HTMLFieldSetElement : false, + HTMLFontElement : false, + HTMLFormElement : false, + HTMLFrameElement : false, + HTMLFrameSetElement : false, + HTMLHeadElement : false, + HTMLHeadingElement : false, + HTMLHRElement : false, + HTMLHtmlElement : false, + HTMLIFrameElement : false, + HTMLImageElement : false, + HTMLInputElement : false, + HTMLIsIndexElement : false, + HTMLLabelElement : false, + HTMLLayerElement : false, + HTMLLegendElement : false, + HTMLLIElement : false, + HTMLLinkElement : false, + HTMLMapElement : false, + HTMLMenuElement : false, + HTMLMetaElement : false, + HTMLModElement : false, + HTMLObjectElement : false, + HTMLOListElement : false, + HTMLOptGroupElement : false, + HTMLOptionElement : false, + HTMLParagraphElement : false, + HTMLParamElement : false, + HTMLPreElement : false, + HTMLQuoteElement : false, + HTMLScriptElement : false, + HTMLSelectElement : false, + HTMLStyleElement : false, + HTMLTableCaptionElement: false, + HTMLTableCellElement : false, + HTMLTableColElement : false, + HTMLTableElement : false, + HTMLTableRowElement : false, + HTMLTableSectionElement: false, + HTMLTextAreaElement : false, + HTMLTitleElement : false, + HTMLUListElement : false, + HTMLVideoElement : false, + history : false, + Int16Array : false, + Int32Array : false, + Int8Array : false, + Image : false, + length : false, + localStorage : false, + location : false, + MessageChannel : false, + MessageEvent : false, + MessagePort : false, + moveBy : false, + moveTo : false, + MutationObserver : false, + name : false, + Node : false, + NodeFilter : false, + navigator : false, + onbeforeunload : true, + onblur : true, + onerror : true, + onfocus : true, + onload : true, + onresize : true, + onunload : true, + open : false, + openDatabase : false, + opener : false, + Option : false, + parent : false, + print : false, + removeEventListener : false, + resizeBy : false, + resizeTo : false, + screen : false, + scroll : false, + scrollBy : false, + scrollTo : false, + sessionStorage : false, + setInterval : false, + setTimeout : false, + SharedWorker : false, + status : false, + top : false, + Uint16Array : false, + Uint32Array : false, + Uint8Array : false, + Uint8ClampedArray : false, + WebSocket : false, + window : false, + Worker : false, + XMLHttpRequest : false, + XMLSerializer : false, + XPathEvaluator : false, + XPathException : false, + XPathExpression : false, + XPathNamespace : false, + XPathNSResolver : false, + XPathResult : false +}; + +exports.devel = { + alert : false, + confirm: false, + console: false, + Debug : false, + opera : false, + prompt : false +}; + +exports.worker = { + importScripts: true, + postMessage : true, + self : true +}; + +// Widely adopted global names that are not part of ECMAScript standard +exports.nonstandard = { + escape : false, + unescape: false +}; + +// Globals provided by popular JavaScript environments. + +exports.couch = { + "require" : false, + respond : false, + getRow : false, + emit : false, + send : false, + start : false, + sum : false, + log : false, + exports : false, + module : false, + provides : false +}; + +exports.node = { + __filename : false, + __dirname : false, + Buffer : false, + DataView : false, + console : false, + exports : true, // In Node it is ok to exports = module.exports = foo(); + GLOBAL : false, + global : false, + module : false, + process : false, + require : false, + setTimeout : false, + clearTimeout : false, + setInterval : false, + clearInterval: false +}; + +exports.phantom = { + phantom : true, + require : true, + WebPage : true +}; + +exports.rhino = { + defineClass : false, + deserialize : false, + gc : false, + help : false, + importPackage: false, + "java" : false, + load : false, + loadClass : false, + print : false, + quit : false, + readFile : false, + readUrl : false, + runCommand : false, + seal : false, + serialize : false, + spawn : false, + sync : false, + toint32 : false, + version : false +}; + +exports.wsh = { + ActiveXObject : true, + Enumerator : true, + GetObject : true, + ScriptEngine : true, + ScriptEngineBuildVersion : true, + ScriptEngineMajorVersion : true, + ScriptEngineMinorVersion : true, + VBArray : true, + WSH : true, + WScript : true, + XDomainRequest : true +}; + +// Globals provided by popular JavaScript libraries. + +exports.dojo = { + dojo : false, + dijit : false, + dojox : false, + define : false, + "require": false +}; + +exports.jquery = { + "$" : false, + jQuery : false +}; + +exports.mootools = { + "$" : false, + "$$" : false, + Asset : false, + Browser : false, + Chain : false, + Class : false, + Color : false, + Cookie : false, + Core : false, + Document : false, + DomReady : false, + DOMEvent : false, + DOMReady : false, + Drag : false, + Element : false, + Elements : false, + Event : false, + Events : false, + Fx : false, + Group : false, + Hash : false, + HtmlTable : false, + Iframe : false, + IframeShim : false, + InputValidator: false, + instanceOf : false, + Keyboard : false, + Locale : false, + Mask : false, + MooTools : false, + Native : false, + Options : false, + OverText : false, + Request : false, + Scroller : false, + Slick : false, + Slider : false, + Sortables : false, + Spinner : false, + Swiff : false, + Tips : false, + Type : false, + typeOf : false, + URI : false, + Window : false +}; + +exports.prototypejs = { + "$" : false, + "$$" : false, + "$A" : false, + "$F" : false, + "$H" : false, + "$R" : false, + "$break" : false, + "$continue" : false, + "$w" : false, + Abstract : false, + Ajax : false, + Class : false, + Enumerable : false, + Element : false, + Event : false, + Field : false, + Form : false, + Hash : false, + Insertion : false, + ObjectRange : false, + PeriodicalExecuter: false, + Position : false, + Prototype : false, + Selector : false, + Template : false, + Toggle : false, + Try : false, + Autocompleter : false, + Builder : false, + Control : false, + Draggable : false, + Draggables : false, + Droppables : false, + Effect : false, + Sortable : false, + SortableObserver : false, + Sound : false, + Scriptaculous : false +}; + +exports.yui = { + YUI : false, + Y : false, + YUI_config: false +}; + + +},{}],491:[function(require,module,exports){ +// default configuration + +module.exports = { + disallowVars: false, + disallowDuplicated: true, + disallowUnknownReferences: true, + parse: require("esprima-fb").parse, +}; + +},{"esprima-fb":208}],492:[function(require,module,exports){ +"use strict"; + +var assert = require("assert"); +var stringmap = require("stringmap"); +var stringset = require("stringset"); +var is = require("simple-is"); +var fmt = require("simple-fmt"); +var error = require("./error"); +var getline = error.getline; +var options = require("./options"); + +function Scope(args) { + assert(is.someof(args.kind, ["hoist", "block", "catch-block"])); + assert(is.object(args.node)); + assert(args.parent === null || is.object(args.parent)); + + // kind === "hoist": function scopes, program scope, injected globals + // kind === "block": ES6 block scopes + // kind === "catch-block": catch block scopes + this.kind = args.kind; + + // the AST node the block corresponds to + this.node = args.node; + + // parent scope + this.parent = args.parent; + + // children scopes for easier traversal (populated internally) + this.children = []; + + // scope declarations. decls[variable_name] = { + // kind: "fun" for functions, + // "param" for function parameters, + // "caught" for catch parameter + // "var", + // "const", + // "let" + // node: the AST node the declaration corresponds to + // from: source code index from which it is visible at earliest + // (only stored for "const", "let" [and "var"] nodes) + // } + this.decls = stringmap(); + + // names of all declarations within this scope that was ever written + // TODO move to decls.w? + // TODO create corresponding read? + this.written = stringset(); + + // names of all variables declared outside this hoist scope but + // referenced in this scope (immediately or in child). + // only stored on hoist scopes for efficiency + // (because we currently generate lots of empty block scopes) + this.propagates = (this.kind === "hoist" ? stringset() : null); + + // scopes register themselves with their parents for easier traversal + if (this.parent) { + this.parent.children.push(this); + } +} + +Scope.prototype.print = function(indent) { + indent = indent || 0; + var scope = this; + var names = this.decls.keys().map(function(name) { + return fmt("{0} [{1}]", name, scope.decls.get(name).kind); + }).join(", "); + var propagates = this.propagates ? this.propagates.items().join(", ") : ""; + console.log(fmt("{0}{1}: {2}. propagates: {3}", fmt.repeat(" ", indent), this.node.type, names, propagates)); + this.children.forEach(function(c) { + c.print(indent + 2); + }); +}; + +Scope.prototype.add = function(name, kind, node, referableFromPos) { + assert(is.someof(kind, ["fun", "param", "var", "caught", "const", "let"])); + + function isConstLet(kind) { + return is.someof(kind, ["const", "let"]); + } + + var scope = this; + + // search nearest hoist-scope for fun, param and var's + // const, let and caught variables go directly in the scope (which may be hoist, block or catch-block) + if (is.someof(kind, ["fun", "param", "var"])) { + while (scope.kind !== "hoist") { + if (scope.decls.has(name) && isConstLet(scope.decls.get(name).kind)) { // could be caught + return error(getline(node), "{0} is already declared", name); + } + scope = scope.parent; + } + } + // name exists in scope and either new or existing kind is const|let => error + if (scope.decls.has(name) && (options.disallowDuplicated || isConstLet(scope.decls.get(name).kind) || isConstLet(kind))) { + return error(getline(node), "{0} is already declared", name); + } + + var declaration = { + kind: kind, + node: node, + }; + if (referableFromPos) { + assert(is.someof(kind, ["var", "const", "let"])); + declaration.from = referableFromPos; + } + scope.decls.set(name, declaration); +}; + +Scope.prototype.getKind = function(name) { + assert(is.string(name)); + var decl = this.decls.get(name); + return decl ? decl.kind : null; +}; + +Scope.prototype.getNode = function(name) { + assert(is.string(name)); + var decl = this.decls.get(name); + return decl ? decl.node : null; +}; + +Scope.prototype.getFromPos = function(name) { + assert(is.string(name)); + var decl = this.decls.get(name); + return decl ? decl.from : null; +}; + +Scope.prototype.hasOwn = function(name) { + return this.decls.has(name); +}; + +Scope.prototype.remove = function(name) { + return this.decls.remove(name); +}; + +Scope.prototype.doesPropagate = function(name) { + return this.propagates.has(name); +}; + +Scope.prototype.markPropagates = function(name) { + this.propagates.add(name); +}; + +Scope.prototype.closestHoistScope = function() { + var scope = this; + while (scope.kind !== "hoist") { + scope = scope.parent; + } + return scope; +}; + +Scope.prototype.hasFunctionScopeBetween = function(outer) { + function isFunction(node) { + return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]); + } + + for (var scope = this; scope; scope = scope.parent) { + if (scope === outer) { + return false; + } + if (isFunction(scope.node)) { + return true; + } + } + + throw new Error("wasn't inner scope of outer"); +}; + +Scope.prototype.lookup = function(name) { + for (var scope = this; scope; scope = scope.parent) { + if (scope.decls.has(name)) { + return scope; + } else if (scope.kind === "hoist") { + scope.propagates.add(name); + } + } + return null; +}; + +Scope.prototype.markWrite = function(name) { + assert(is.string(name)); + this.written.add(name); +}; + +// detects let variables that are never modified (ignores top-level) +Scope.prototype.detectUnmodifiedLets = function() { + var outmost = this; + + function detect(scope) { + if (scope !== outmost) { + scope.decls.keys().forEach(function(name) { + if (scope.getKind(name) === "let" && !scope.written.has(name)) { + return error(getline(scope.getNode(name)), "{0} is declared as let but never modified so could be const", name); + } + }); + } + + scope.children.forEach(function(childScope) { + detect(childScope); + }); + } + detect(this); +}; + +Scope.prototype.traverse = function(options) { + options = options || {}; + var pre = options.pre; + var post = options.post; + + function visit(scope) { + if (pre) { + pre(scope); + } + scope.children.forEach(function(childScope) { + visit(childScope); + }); + if (post) { + post(scope); + } + } + + visit(this); +}; + +module.exports = Scope; + +},{"./error":489,"./options":491,"assert":209,"simple-fmt":498,"simple-is":499,"stringmap":500,"stringset":501}],493:[function(require,module,exports){ +var fmt = require("simple-fmt"); +var is = require("simple-is"); +var assert = require("assert"); + +function Stats() { + this.lets = 0; + this.consts = 0; + this.renames = []; +} + +Stats.prototype.declarator = function(kind) { + assert(is.someof(kind, ["const", "let"])); + if (kind === "const") { + this.consts++; + } else { + this.lets++; + } +}; + +Stats.prototype.rename = function(oldName, newName, line) { + this.renames.push({ + oldName: oldName, + newName: newName, + line: line, + }); +}; + +Stats.prototype.toString = function() { +// console.log("defs.js stats for file {0}:", filename) + + var renames = this.renames.map(function(r) { + return r; + }).sort(function(a, b) { + return a.line - b.line; + }); // sort a copy of renames + + var renameStr = renames.map(function(rename) { + return fmt("\nline {0}: {1} => {2}", rename.line, rename.oldName, rename.newName); + }).join(""); + + var sum = this.consts + this.lets; + var constlets = (sum === 0 ? + "can't calculate const coverage (0 consts, 0 lets)" : + fmt("{0}% const coverage ({1} consts, {2} lets)", + Math.floor(100 * this.consts / sum), this.consts, this.lets)); + + return constlets + renameStr + "\n"; +}; + +module.exports = Stats; + +},{"assert":209,"simple-fmt":498,"simple-is":499}],494:[function(require,module,exports){ +// alter.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus + +var assert = require("assert"); +var stableSort = require("stable"); + +// fragments is a list of {start: index, end: index, str: string to replace with} +function alter(str, fragments) { + "use strict"; + + var isArray = Array.isArray || function(v) { + return Object.prototype.toString.call(v) === "[object Array]"; + };; + + assert(typeof str === "string"); + assert(isArray(fragments)); + + // stableSort isn't in-place so no need to copy array first + var sortedFragments = stableSort(fragments, function(a, b) { + return a.start - b.start; + }); + + var outs = []; + + var pos = 0; + for (var i = 0; i < sortedFragments.length; i++) { + var frag = sortedFragments[i]; + + assert(pos <= frag.start); + assert(frag.start <= frag.end); + outs.push(str.slice(pos, frag.start)); + outs.push(frag.str); + pos = frag.end; + } + if (pos < str.length) { + outs.push(str.slice(pos)); + } + + return outs.join(""); +} + +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = alter; +} + +},{"assert":209,"stable":495}],495:[function(require,module,exports){ +//! stable.js 0.1.5, https://github.com/Two-Screen/stable +//! © 2014 Angry Bytes and contributors. MIT licensed. + +(function() { + +// A stable array sort, because `Array#sort()` is not guaranteed stable. +// This is an implementation of merge sort, without recursion. + +var stable = function(arr, comp) { + return exec(arr.slice(), comp); +}; + +stable.inplace = function(arr, comp) { + var result = exec(arr, comp); + + // This simply copies back if the result isn't in the original array, + // which happens on an odd number of passes. + if (result !== arr) { + pass(result, null, arr.length, arr); + } + + return arr; +}; + +// Execute the sort using the input array and a second buffer as work space. +// Returns one of those two, containing the final result. +function exec(arr, comp) { + if (typeof(comp) !== 'function') { + comp = function(a, b) { + return String(a).localeCompare(b); + }; + } + + // Short-circuit when there's nothing to sort. + var len = arr.length; + if (len <= 1) { + return arr; + } + + // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. + // Chunks are the size of the left or right hand in merge sort. + // Stop when the left-hand covers all of the array. + var buffer = new Array(len); + for (var chk = 1; chk < len; chk *= 2) { + pass(arr, comp, chk, buffer); + + var tmp = arr; + arr = buffer; + buffer = tmp; + } + + return arr; +} + +// Run a single pass with the given chunk size. +var pass = function(arr, comp, chk, result) { + var len = arr.length; + var i = 0; + // Step size / double chunk size. + var dbl = chk * 2; + // Bounds of the left and right chunks. + var l, r, e; + // Iterators over the left and right chunk. + var li, ri; + + // Iterate over pairs of chunks. + for (l = 0; l < len; l += dbl) { + r = l + chk; + e = r + chk; + if (r > len) r = len; + if (e > len) e = len; + + // Iterate both chunks in parallel. + li = l; + ri = r; + while (true) { + // Compare the chunks. + if (li < r && ri < e) { + // This works for a regular `sort()` compatible comparator, + // but also for a simple comparator like: `a > b` + if (comp(arr[li], arr[ri]) <= 0) { + result[i++] = arr[li++]; + } + else { + result[i++] = arr[ri++]; + } + } + // Nothing to compare, just flush what's left. + else if (li < r) { + result[i++] = arr[li++]; + } + else if (ri < e) { + result[i++] = arr[ri++]; + } + // Both iterators are at the chunk ends. + else { + break; + } + } + } +}; + +// Export using CommonJS or to the window. +if (typeof(module) !== 'undefined') { + module.exports = stable; +} +else { + window.stable = stable; +} + +})(); + +},{}],496:[function(require,module,exports){ +function traverse(root, options) { + "use strict"; + + options = options || {}; + var pre = options.pre; + var post = options.post; + var skipProperty = options.skipProperty; + + function visit(node, parent, prop, idx) { + if (!node || typeof node.type !== "string") { + return; + } + + var res = undefined; + if (pre) { + res = pre(node, parent, prop, idx); + } + + if (res !== false) { + for (var prop in node) { + if (skipProperty ? skipProperty(prop, node) : prop[0] === "$") { + continue; + } + + var child = node[prop]; + + if (Array.isArray(child)) { + for (var i = 0; i < child.length; i++) { + visit(child[i], node, prop, i); + } + } else { + visit(child, node, prop); + } + } + } + + if (post) { + post(node, parent, prop, idx); + } + } + + visit(root, null); +}; + +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = traverse; +} + +},{}],497:[function(require,module,exports){ +// breakable.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013-2014 Olov Lassus + +var breakable = (function() { + "use strict"; + + function Val(val, brk) { + this.val = val; + this.brk = brk; + } + + function make_brk() { + return function brk(val) { + throw new Val(val, brk); + }; + } + + function breakable(fn) { + var brk = make_brk(); + try { + return fn(brk); + } catch (e) { + if (e instanceof Val && e.brk === brk) { + return e.val; + } + throw e; + } + } + + return breakable; +})(); + +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = breakable; +} + +},{}],498:[function(require,module,exports){ +// simple-fmt.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus + +var fmt = (function() { + "use strict"; + + function fmt(str, var_args) { + var args = Array.prototype.slice.call(arguments, 1); + return str.replace(/\{(\d+)\}/g, function(s, match) { + return (match in args ? args[match] : s); + }); + } + + function obj(str, obj) { + return str.replace(/\{([_$a-zA-Z0-9][_$a-zA-Z0-9]*)\}/g, function(s, match) { + return (match in obj ? obj[match] : s); + }); + } + + function repeat(str, n) { + return (new Array(n + 1)).join(str); + } + + fmt.fmt = fmt; + fmt.obj = obj; + fmt.repeat = repeat; + return fmt; +})(); + +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = fmt; +} + +},{}],499:[function(require,module,exports){ +// simple-is.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus + +var is = (function() { + "use strict"; + + var hasOwnProperty = Object.prototype.hasOwnProperty; + var toString = Object.prototype.toString; + var _undefined = void 0; + + return { + nan: function(v) { + return v !== v; + }, + boolean: function(v) { + return typeof v === "boolean"; + }, + number: function(v) { + return typeof v === "number"; + }, + string: function(v) { + return typeof v === "string"; + }, + fn: function(v) { + return typeof v === "function"; + }, + object: function(v) { + return v !== null && typeof v === "object"; + }, + primitive: function(v) { + var t = typeof v; + return v === null || v === _undefined || + t === "boolean" || t === "number" || t === "string"; + }, + array: Array.isArray || function(v) { + return toString.call(v) === "[object Array]"; + }, + finitenumber: function(v) { + return typeof v === "number" && isFinite(v); + }, + someof: function(v, values) { + return values.indexOf(v) >= 0; + }, + noneof: function(v, values) { + return values.indexOf(v) === -1; + }, + own: function(obj, prop) { + return hasOwnProperty.call(obj, prop); + }, + }; +})(); + +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = is; +} + +},{}],500:[function(require,module,exports){ +// stringmap.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus + +var StringMap = (function() { + "use strict"; + + // to save us a few characters + var hasOwnProperty = Object.prototype.hasOwnProperty; + + var create = (function() { + function hasOwnEnumerableProps(obj) { + for (var prop in obj) { + if (hasOwnProperty.call(obj, prop)) { + return true; + } + } + return false; + } + // FF <= 3.6: + // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true + // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false + function hasOwnPollutedProps(obj) { + return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__"); + } + + var useObjectCreate = false; + if (typeof Object.create === "function") { + if (!hasOwnEnumerableProps(Object.create(null))) { + useObjectCreate = true; + } + } + if (useObjectCreate === false) { + if (hasOwnEnumerableProps({})) { + throw new Error("StringMap environment error 0, please file a bug at https://github.com/olov/stringmap/issues"); + } + } + // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims) + + var o = (useObjectCreate ? Object.create(null) : {}); + var useProtoClear = false; + if (hasOwnPollutedProps(o)) { + o.__proto__ = null; + if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) { + throw new Error("StringMap environment error 1, please file a bug at https://github.com/olov/stringmap/issues"); + } + useProtoClear = true; + } + // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims) + + return function() { + var o = (useObjectCreate ? Object.create(null) : {}); + if (useProtoClear) { + o.__proto__ = null; + } + return o; + }; + })(); + + // stringmap ctor + function stringmap(optional_object) { + // use with or without new + if (!(this instanceof stringmap)) { + return new stringmap(optional_object); + } + this.obj = create(); + this.hasProto = false; // false (no __proto__ key) or true (has __proto__ key) + this.proto = undefined; // value for __proto__ key when hasProto is true, undefined otherwise + + if (optional_object) { + this.setMany(optional_object); + } + }; + + // primitive methods that deals with data representation + stringmap.prototype.has = function(key) { + // The type-check of key in has, get, set and delete is important because otherwise an object + // {toString: function() { return "__proto__"; }} can avoid the key === "__proto__" test. + // The alternative to type-checking would be to force string conversion, i.e. key = String(key); + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + return (key === "__proto__" ? + this.hasProto : + hasOwnProperty.call(this.obj, key)); + }; + + stringmap.prototype.get = function(key) { + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + return (key === "__proto__" ? + this.proto : + (hasOwnProperty.call(this.obj, key) ? this.obj[key] : undefined)); + }; + + stringmap.prototype.set = function(key, value) { + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + if (key === "__proto__") { + this.hasProto = true; + this.proto = value; + } else { + this.obj[key] = value; + } + }; + + stringmap.prototype.remove = function(key) { + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + var didExist = this.has(key); + if (key === "__proto__") { + this.hasProto = false; + this.proto = undefined; + } else { + delete this.obj[key]; + } + return didExist; + }; + + // alias remove to delete but beware: + // sm.delete("key"); // OK in ES5 and later + // sm['delete']("key"); // OK in all ES versions + // sm.remove("key"); // OK in all ES versions + stringmap.prototype['delete'] = stringmap.prototype.remove; + + stringmap.prototype.isEmpty = function() { + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + return false; + } + } + return !this.hasProto; + }; + + stringmap.prototype.size = function() { + var len = 0; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + ++len; + } + } + return (this.hasProto ? len + 1 : len); + }; + + stringmap.prototype.keys = function() { + var keys = []; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + keys.push(key); + } + } + if (this.hasProto) { + keys.push("__proto__"); + } + return keys; + }; + + stringmap.prototype.values = function() { + var values = []; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + values.push(this.obj[key]); + } + } + if (this.hasProto) { + values.push(this.proto); + } + return values; + }; + + stringmap.prototype.items = function() { + var items = []; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + items.push([key, this.obj[key]]); + } + } + if (this.hasProto) { + items.push(["__proto__", this.proto]); + } + return items; + }; + + + // methods that rely on the above primitives + stringmap.prototype.setMany = function(object) { + if (object === null || (typeof object !== "object" && typeof object !== "function")) { + throw new Error("StringMap expected Object"); + } + for (var key in object) { + if (hasOwnProperty.call(object, key)) { + this.set(key, object[key]); + } + } + return this; + }; + + stringmap.prototype.merge = function(other) { + var keys = other.keys(); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + this.set(key, other.get(key)); + } + return this; + }; + + stringmap.prototype.map = function(fn) { + var keys = this.keys(); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + keys[i] = fn(this.get(key), key); // re-use keys array for results + } + return keys; + }; + + stringmap.prototype.forEach = function(fn) { + var keys = this.keys(); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + fn(this.get(key), key); + } + }; + + stringmap.prototype.clone = function() { + var other = stringmap(); + return other.merge(this); + }; + + stringmap.prototype.toString = function() { + var self = this; + return "{" + this.keys().map(function(key) { + return JSON.stringify(key) + ":" + JSON.stringify(self.get(key)); + }).join(",") + "}"; + }; + + return stringmap; +})(); + +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = StringMap; +} + +},{}],501:[function(require,module,exports){ +// stringset.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus + +var StringSet = (function() { + "use strict"; + + // to save us a few characters + var hasOwnProperty = Object.prototype.hasOwnProperty; + + var create = (function() { + function hasOwnEnumerableProps(obj) { + for (var prop in obj) { + if (hasOwnProperty.call(obj, prop)) { + return true; + } + } + return false; + } + + // FF <= 3.6: + // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true + // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false + function hasOwnPollutedProps(obj) { + return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__"); + } + + var useObjectCreate = false; + if (typeof Object.create === "function") { + if (!hasOwnEnumerableProps(Object.create(null))) { + useObjectCreate = true; + } + } + if (useObjectCreate === false) { + if (hasOwnEnumerableProps({})) { + throw new Error("StringSet environment error 0, please file a bug at https://github.com/olov/stringset/issues"); + } + } + // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims) + + var o = (useObjectCreate ? Object.create(null) : {}); + var useProtoClear = false; + if (hasOwnPollutedProps(o)) { + o.__proto__ = null; + if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) { + throw new Error("StringSet environment error 1, please file a bug at https://github.com/olov/stringset/issues"); + } + useProtoClear = true; + } + // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims) + + return function() { + var o = (useObjectCreate ? Object.create(null) : {}); + if (useProtoClear) { + o.__proto__ = null; + } + return o; + }; + })(); + + // stringset ctor + function stringset(optional_array) { + // use with or without new + if (!(this instanceof stringset)) { + return new stringset(optional_array); + } + this.obj = create(); + this.hasProto = false; // false (no __proto__ item) or true (has __proto__ item) + + if (optional_array) { + this.addMany(optional_array); + } + }; + + // primitive methods that deals with data representation + stringset.prototype.has = function(item) { + // The type-check of item in has, get, set and delete is important because otherwise an object + // {toString: function() { return "__proto__"; }} can avoid the item === "__proto__" test. + // The alternative to type-checking would be to force string conversion, i.e. item = String(item); + if (typeof item !== "string") { + throw new Error("StringSet expected string item"); + } + return (item === "__proto__" ? + this.hasProto : + hasOwnProperty.call(this.obj, item)); + }; + + stringset.prototype.add = function(item) { + if (typeof item !== "string") { + throw new Error("StringSet expected string item"); + } + if (item === "__proto__") { + this.hasProto = true; + } else { + this.obj[item] = true; + } + }; + + stringset.prototype.remove = function(item) { + if (typeof item !== "string") { + throw new Error("StringSet expected string item"); + } + var didExist = this.has(item); + if (item === "__proto__") { + this.hasProto = false; + } else { + delete this.obj[item]; + } + return didExist; + }; + + // alias remove to delete but beware: + // ss.delete("key"); // OK in ES5 and later + // ss['delete']("key"); // OK in all ES versions + // ss.remove("key"); // OK in all ES versions + stringset.prototype['delete'] = stringset.prototype.remove; + + stringset.prototype.isEmpty = function() { + for (var item in this.obj) { + if (hasOwnProperty.call(this.obj, item)) { + return false; + } + } + return !this.hasProto; + }; + + stringset.prototype.size = function() { + var len = 0; + for (var item in this.obj) { + if (hasOwnProperty.call(this.obj, item)) { + ++len; + } + } + return (this.hasProto ? len + 1 : len); + }; + + stringset.prototype.items = function() { + var items = []; + for (var item in this.obj) { + if (hasOwnProperty.call(this.obj, item)) { + items.push(item); + } + } + if (this.hasProto) { + items.push("__proto__"); + } + return items; + }; + + + // methods that rely on the above primitives + stringset.prototype.addMany = function(items) { + if (!Array.isArray(items)) { + throw new Error("StringSet expected array"); + } + for (var i = 0; i < items.length; i++) { + this.add(items[i]); + } + return this; + }; + + stringset.prototype.merge = function(other) { + this.addMany(other.items()); + return this; + }; + + stringset.prototype.clone = function() { + var other = stringset(); + return other.merge(this); + }; + + stringset.prototype.toString = function() { + return "{" + this.items().map(JSON.stringify).join(",") + "}"; + }; + + return stringset; +})(); + +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = StringSet; +} + +},{}],502:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var n = types.namedTypes; +var isArray = types.builtInTypes.array; +var isObject = types.builtInTypes.object; +var linesModule = require("./lines"); +var fromString = linesModule.fromString; +var Lines = linesModule.Lines; +var concat = linesModule.concat; +var util = require("./util"); +var comparePos = util.comparePos; +var childNodesCacheKey = require("private").makeUniqueKey(); + +// TODO Move a non-caching implementation of this function into ast-types, +// and implement a caching wrapper function here. +function getSortedChildNodes(node, resultArray) { + if (!node) { + return; + } + + // The .loc checks below are sensitive to some of the problems that + // are fixed by this utility function. Specifically, if it decides to + // set node.loc to null, indicating that the node's .loc information + // is unreliable, then we don't want to add node to the resultArray. + util.fixFaultyLocations(node); + + if (resultArray) { + if (n.Node.check(node) && + n.SourceLocation.check(node.loc)) { + // This reverse insertion sort almost always takes constant + // time because we almost always (maybe always?) append the + // nodes in order anyway. + for (var i = resultArray.length - 1; i >= 0; --i) { + if (comparePos(resultArray[i].loc.end, + node.loc.start) <= 0) { + break; + } + } + resultArray.splice(i + 1, 0, node); + return; + } + } else if (node[childNodesCacheKey]) { + return node[childNodesCacheKey]; + } + + var names; + if (isArray.check(node)) { + names = Object.keys(node); + } else if (isObject.check(node)) { + names = types.getFieldNames(node); + } else { + return; + } + + if (!resultArray) { + Object.defineProperty(node, childNodesCacheKey, { + value: resultArray = [], + enumerable: false + }); + } + + for (var i = 0, nameCount = names.length; i < nameCount; ++i) { + getSortedChildNodes(node[names[i]], resultArray); + } + + return resultArray; +} + +// As efficiently as possible, decorate the comment object with +// .precedingNode, .enclosingNode, and/or .followingNode properties, at +// least one of which is guaranteed to be defined. +function decorateComment(node, comment) { + var childNodes = getSortedChildNodes(node); + + // Time to dust off the old binary search robes and wizard hat. + var left = 0, right = childNodes.length; + while (left < right) { + var middle = (left + right) >> 1; + var child = childNodes[middle]; + + if (comparePos(child.loc.start, comment.loc.start) <= 0 && + comparePos(comment.loc.end, child.loc.end) <= 0) { + // The comment is completely contained by this child node. + decorateComment(comment.enclosingNode = child, comment); + return; // Abandon the binary search at this level. + } + + if (comparePos(child.loc.end, comment.loc.start) <= 0) { + // This child node falls completely before the comment. + // Because we will never consider this node or any nodes + // before it again, this node must be the closest preceding + // node we have encountered so far. + var precedingNode = child; + left = middle + 1; + continue; + } + + if (comparePos(comment.loc.end, child.loc.start) <= 0) { + // This child node falls completely after the comment. + // Because we will never consider this node or any nodes after + // it again, this node must be the closest following node we + // have encountered so far. + var followingNode = child; + right = middle; + continue; + } + + throw new Error("Comment location overlaps with node location"); + } + + if (precedingNode) { + comment.precedingNode = precedingNode; + } + + if (followingNode) { + comment.followingNode = followingNode; + } +} + +exports.attach = function(comments, ast, lines) { + if (!isArray.check(comments)) { + return; + } + + var tiesToBreak = []; + + comments.forEach(function(comment) { + comment.loc.lines = lines; + decorateComment(ast, comment); + + var pn = comment.precedingNode; + var en = comment.enclosingNode; + var fn = comment.followingNode; + + if (pn && fn) { + var tieCount = tiesToBreak.length; + if (tieCount > 0) { + var lastTie = tiesToBreak[tieCount - 1]; + + assert.strictEqual( + lastTie.precedingNode === comment.precedingNode, + lastTie.followingNode === comment.followingNode + ); + + if (lastTie.followingNode !== comment.followingNode) { + breakTies(tiesToBreak, lines); + } + } + + tiesToBreak.push(comment); + + } else if (pn) { + // No contest: we have a trailing comment. + breakTies(tiesToBreak, lines); + addTrailingComment(pn, comment); + + } else if (fn) { + // No contest: we have a leading comment. + breakTies(tiesToBreak, lines); + addLeadingComment(fn, comment); + + } else if (en) { + // The enclosing node has no child nodes at all, so what we + // have here is a dangling comment, e.g. [/* crickets */]. + breakTies(tiesToBreak, lines); + addDanglingComment(en, comment); + + } else { + throw new Error("AST contains no nodes at all?"); + } + }); + + breakTies(tiesToBreak, lines); + + comments.forEach(function(comment) { + // These node references were useful for breaking ties, but we + // don't need them anymore, and they create cycles in the AST that + // may lead to infinite recursion if we don't delete them here. + delete comment.precedingNode; + delete comment.enclosingNode; + delete comment.followingNode; + }); +}; + +function breakTies(tiesToBreak, lines) { + var tieCount = tiesToBreak.length; + if (tieCount === 0) { + return; + } + + var pn = tiesToBreak[0].precedingNode; + var fn = tiesToBreak[0].followingNode; + var gapEndPos = fn.loc.start; + + // Iterate backwards through tiesToBreak, examining the gaps + // between the tied comments. In order to qualify as leading, a + // comment must be separated from fn by an unbroken series of + // whitespace-only gaps (or other comments). + for (var indexOfFirstLeadingComment = tieCount; + indexOfFirstLeadingComment > 0; + --indexOfFirstLeadingComment) { + var comment = tiesToBreak[indexOfFirstLeadingComment - 1]; + assert.strictEqual(comment.precedingNode, pn); + assert.strictEqual(comment.followingNode, fn); + + var gap = lines.sliceString(comment.loc.end, gapEndPos); + if (/\S/.test(gap)) { + // The gap string contained something other than whitespace. + break; + } + + gapEndPos = comment.loc.start; + } + + while (indexOfFirstLeadingComment <= tieCount && + (comment = tiesToBreak[indexOfFirstLeadingComment]) && + // If the comment is a //-style comment and indented more + // deeply than the node itself, reconsider it as trailing. + comment.type === "Line" && + comment.loc.start.column > fn.loc.start.column) { + ++indexOfFirstLeadingComment; + } + + tiesToBreak.forEach(function(comment, i) { + if (i < indexOfFirstLeadingComment) { + addTrailingComment(pn, comment); + } else { + addLeadingComment(fn, comment); + } + }); + + tiesToBreak.length = 0; +} + +function addCommentHelper(node, comment) { + var comments = node.comments || (node.comments = []); + comments.push(comment); +} + +function addLeadingComment(node, comment) { + comment.leading = true; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addDanglingComment(node, comment) { + comment.leading = false; + comment.trailing = false; + addCommentHelper(node, comment); +} + +function addTrailingComment(node, comment) { + comment.leading = false; + comment.trailing = true; + addCommentHelper(node, comment); +} + +function printLeadingComment(commentPath, print) { + var comment = commentPath.getValue(); + n.Comment.assert(comment); + + var loc = comment.loc; + var lines = loc && loc.lines; + var parts = [print(commentPath)]; + + if (comment.trailing) { + // When we print trailing comments as leading comments, we don't + // want to bring any trailing spaces along. + parts.push("\n"); + + } else if (lines instanceof Lines) { + var trailingSpace = lines.slice( + loc.end, + lines.skipSpaces(loc.end) + ); + + if (trailingSpace.length === 1) { + // If the trailing space contains no newlines, then we want to + // preserve it exactly as we found it. + parts.push(trailingSpace); + } else { + // If the trailing space contains newlines, then replace it + // with just that many newlines, with all other spaces removed. + parts.push(new Array(trailingSpace.length).join("\n")); + } + + } else { + parts.push("\n"); + } + + return concat(parts); +} + +function printTrailingComment(commentPath, print) { + var comment = commentPath.getValue(commentPath); + n.Comment.assert(comment); + + var loc = comment.loc; + var lines = loc && loc.lines; + var parts = []; + + if (lines instanceof Lines) { + var fromPos = lines.skipSpaces(loc.start, true) || lines.firstPos(); + var leadingSpace = lines.slice(fromPos, loc.start); + + if (leadingSpace.length === 1) { + // If the leading space contains no newlines, then we want to + // preserve it exactly as we found it. + parts.push(leadingSpace); + } else { + // If the leading space contains newlines, then replace it + // with just that many newlines, sans all other spaces. + parts.push(new Array(leadingSpace.length).join("\n")); + } + } + + parts.push(print(commentPath)); + + return concat(parts); +} + +exports.printComments = function(path, print) { + var value = path.getValue(); + var innerLines = print(path); + var comments = n.Node.check(value) && + types.getFieldValue(value, "comments"); + + if (!comments || comments.length === 0) { + return innerLines; + } + + var leadingParts = []; + var trailingParts = [innerLines]; + + path.each(function(commentPath) { + var comment = commentPath.getValue(); + var leading = types.getFieldValue(comment, "leading"); + var trailing = types.getFieldValue(comment, "trailing"); + + if (leading || (trailing && comment.type !== "Block")) { + leadingParts.push(printLeadingComment(commentPath, print)); + } else if (trailing) { + assert.strictEqual(comment.type, "Block"); + trailingParts.push(printTrailingComment(commentPath, print)); + } + }, "comments"); + + leadingParts.push.apply(leadingParts, trailingParts); + return concat(leadingParts); +}; + +},{"./lines":504,"./types":510,"./util":511,"assert":209,"private":480}],503:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var n = types.namedTypes; +var Node = n.Node; +var isArray = types.builtInTypes.array; +var isNumber = types.builtInTypes.number; + +function FastPath(value) { + assert.ok(this instanceof FastPath); + this.stack = [value]; +} + +var FPp = FastPath.prototype; +module.exports = FastPath; + +// Static convenience function for coercing a value to a FastPath. +FastPath.from = function(obj) { + if (obj instanceof FastPath) { + // Return a defensive copy of any existing FastPath instances. + return obj.copy(); + } + + if (obj instanceof types.NodePath) { + // For backwards compatibility, unroll NodePath instances into + // lightweight FastPath [..., name, value] stacks. + var copy = Object.create(FastPath.prototype); + var stack = [obj.value]; + for (var pp; (pp = obj.parentPath); obj = pp) + stack.push(obj.name, pp.value); + copy.stack = stack.reverse(); + return copy; + } + + // Otherwise use obj as the value of the new FastPath instance. + return new FastPath(obj); +}; + +FPp.copy = function copy() { + var copy = Object.create(FastPath.prototype); + copy.stack = this.stack.slice(0); + return copy; +}; + +// The name of the current property is always the penultimate element of +// this.stack, and always a String. +FPp.getName = function getName() { + var s = this.stack; + var len = s.length; + if (len > 1) { + return s[len - 2]; + } + // Since the name is always a string, null is a safe sentinel value to + // return if we do not know the name of the (root) value. + return null; +}; + +// The value of the current property is always the final element of +// this.stack. +FPp.getValue = function getValue() { + var s = this.stack; + return s[s.length - 1]; +}; + +function getNodeHelper(path, count) { + var s = path.stack; + + for (var i = s.length - 1; i >= 0; i -= 2) { + var value = s[i]; + if (n.Node.check(value) && --count < 0) { + return value; + } + } + + return null; +} + +FPp.getNode = function getNode(count) { + return getNodeHelper(this, ~~count); +}; + +FPp.getParentNode = function getParentNode(count) { + return getNodeHelper(this, ~~count + 1); +}; + +// The length of the stack can be either even or odd, depending on whether +// or not we have a name for the root value. The difference between the +// index of the root value and the index of the final value is always +// even, though, which allows us to return the root value in constant time +// (i.e. without iterating backwards through the stack). +FPp.getRootValue = function getRootValue() { + var s = this.stack; + if (s.length % 2 === 0) { + return s[1]; + } + return s[0]; +}; + +// Temporarily push properties named by string arguments given after the +// callback function onto this.stack, then call the callback with a +// reference to this (modified) FastPath object. Note that the stack will +// be restored to its original state after the callback is finished, so it +// is probably a mistake to retain a reference to the path. +FPp.call = function call(callback/*, name1, name2, ... */) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + var result = callback(this); + s.length = origLen; + return result; +}; + +// Similar to FastPath.prototype.call, except that the value obtained by +// accessing this.getValue()[name1][name2]... should be array-like. The +// callback will be called with a reference to this path object for each +// element of the array. +FPp.each = function each(callback/*, name1, name2, ... */) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + for (var i = 0; i < value.length; ++i) { + if (i in value) { + s.push(i, value[i]); + // If the callback needs to know the value of i, call + // path.getName(), assuming path is the parameter name. + callback(this); + s.length -= 2; + } + } + + s.length = origLen; +}; + +// Similar to FastPath.prototype.each, except that the results of the +// callback function invocations are stored in an array and returned at +// the end of the iteration. +FPp.map = function map(callback/*, name1, name2, ... */) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } + + var result = new Array(value.length); + + for (var i = 0; i < value.length; ++i) { + if (i in value) { + s.push(i, value[i]); + result[i] = callback(this, i); + s.length -= 2; + } + } + + s.length = origLen; + + return result; +}; + +// Inspired by require("ast-types").NodePath.prototype.needsParens, but +// more efficient because we're iterating backwards through a stack. +FPp.needsParens = function(assumeExpressionContext) { + var parent = this.getParentNode(); + if (!parent) { + return false; + } + + var name = this.getName(); + var node = this.getNode(); + + // If the value of this path is some child of a Node and not a Node + // itself, then it doesn't need parentheses. Only Node objects (in + // fact, only Expression nodes) need parentheses. + if (this.getValue() !== node) { + return false; + } + + // Only expressions need parentheses. + if (!n.Expression.check(node)) { + return false; + } + + // Identifiers never need parentheses. + if (node.type === "Identifier") { + return false; + } + + switch (node.type) { + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + return parent.type === "MemberExpression" + && name === "object" + && parent.object === node; + + case "BinaryExpression": + case "LogicalExpression": + switch (parent.type) { + case "CallExpression": + return name === "callee" + && parent.callee === node; + + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + return true; + + case "MemberExpression": + return name === "object" + && parent.object === node; + + case "BinaryExpression": + case "LogicalExpression": + var po = parent.operator; + var pp = PRECEDENCE[po]; + var no = node.operator; + var np = PRECEDENCE[no]; + + if (pp > np) { + return true; + } + + if (pp === np && name === "right") { + assert.strictEqual(parent.right, node); + return true; + } + + default: + return false; + } + + case "SequenceExpression": + switch (parent.type) { + case "ForStatement": + // Although parentheses wouldn't hurt around sequence + // expressions in the head of for loops, traditional style + // dictates that e.g. i++, j++ should not be wrapped with + // parentheses. + return false; + + case "ExpressionStatement": + return name !== "expression"; + + default: + // Otherwise err on the side of overparenthesization, adding + // explicit exceptions above if this proves overzealous. + return true; + } + + case "YieldExpression": + switch (parent.type) { + case "BinaryExpression": + case "LogicalExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "CallExpression": + case "MemberExpression": + case "NewExpression": + case "ConditionalExpression": + case "YieldExpression": + return true; + + default: + return false; + } + + case "Literal": + return parent.type === "MemberExpression" + && isNumber.check(node.value) + && name === "object" + && parent.object === node; + + case "AssignmentExpression": + case "ConditionalExpression": + switch (parent.type) { + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + return true; + + case "CallExpression": + return name === "callee" + && parent.callee === node; + + case "ConditionalExpression": + return name === "test" + && parent.test === node; + + case "MemberExpression": + return name === "object" + && parent.object === node; + + default: + return false; + } + + case "ArrowFunctionExpression": + return isBinary(parent); + + case "ObjectExpression": + if (parent.type === "ArrowFunctionExpression" && + name === "body") { + return true; + } + + default: + if (parent.type === "NewExpression" && + name === "callee" && + parent.callee === node) { + return containsCallExpression(node); + } + } + + if (assumeExpressionContext !== true && + !this.canBeFirstInStatement() && + this.firstInStatement()) + return true; + + return false; +}; + +function isBinary(node) { + return n.BinaryExpression.check(node) + || n.LogicalExpression.check(node); +} + +function isUnaryLike(node) { + return n.UnaryExpression.check(node) + // I considered making SpreadElement and SpreadProperty subtypes + // of UnaryExpression, but they're not really Expression nodes. + || (n.SpreadElement && n.SpreadElement.check(node)) + || (n.SpreadProperty && n.SpreadProperty.check(node)); +} + +var PRECEDENCE = {}; +[["||"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"] +].forEach(function(tier, i) { + tier.forEach(function(op) { + PRECEDENCE[op] = i; + }); +}); + +function containsCallExpression(node) { + if (n.CallExpression.check(node)) { + return true; + } + + if (isArray.check(node)) { + return node.some(containsCallExpression); + } + + if (n.Node.check(node)) { + return types.someField(node, function(name, child) { + return containsCallExpression(child); + }); + } + + return false; +} + +FPp.canBeFirstInStatement = function() { + var node = this.getNode(); + return !n.FunctionExpression.check(node) + && !n.ObjectExpression.check(node); +}; + +FPp.firstInStatement = function() { + var s = this.stack; + var parentName, parent; + var childName, child; + + for (var i = s.length - 1; i >= 0; i -= 2) { + if (n.Node.check(s[i])) { + childName = parentName; + child = parent; + parentName = s[i - 1]; + parent = s[i]; + } + + if (!parent || !child) { + continue; + } + + if (n.BlockStatement.check(parent) && + parentName === "body" && + childName === 0) { + assert.strictEqual(parent.body[0], child); + return true; + } + + if (n.ExpressionStatement.check(parent) && + childName === "expression") { + assert.strictEqual(parent.expression, child); + return true; + } + + if (n.SequenceExpression.check(parent) && + parentName === "expressions" && + childName === 0) { + assert.strictEqual(parent.expressions[0], child); + continue; + } + + if (n.CallExpression.check(parent) && + childName === "callee") { + assert.strictEqual(parent.callee, child); + continue; + } + + if (n.MemberExpression.check(parent) && + childName === "object") { + assert.strictEqual(parent.object, child); + continue; + } + + if (n.ConditionalExpression.check(parent) && + childName === "test") { + assert.strictEqual(parent.test, child); + continue; + } + + if (isBinary(parent) && + childName === "left") { + assert.strictEqual(parent.left, child); + continue; + } + + if (n.UnaryExpression.check(parent) && + !parent.prefix && + childName === "argument") { + assert.strictEqual(parent.argument, child); + continue; + } + + return false; + } + + return true; +}; + +},{"./types":510,"assert":209}],504:[function(require,module,exports){ +var assert = require("assert"); +var sourceMap = require("source-map"); +var normalizeOptions = require("./options").normalize; +var secretKey = require("private").makeUniqueKey(); +var types = require("./types"); +var isString = types.builtInTypes.string; +var comparePos = require("./util").comparePos; +var Mapping = require("./mapping"); + +// Goals: +// 1. Minimize new string creation. +// 2. Keep (de)identation O(lines) time. +// 3. Permit negative indentations. +// 4. Enforce immutability. +// 5. No newline characters. + +function getSecret(lines) { + return lines[secretKey]; +} + +function Lines(infos, sourceFileName) { + assert.ok(this instanceof Lines); + assert.ok(infos.length > 0); + + if (sourceFileName) { + isString.assert(sourceFileName); + } else { + sourceFileName = null; + } + + Object.defineProperty(this, secretKey, { + value: { + infos: infos, + mappings: [], + name: sourceFileName, + cachedSourceMap: null + } + }); + + if (sourceFileName) { + getSecret(this).mappings.push(new Mapping(this, { + start: this.firstPos(), + end: this.lastPos() + })); + } +} + +// Exposed for instanceof checks. The fromString function should be used +// to create new Lines objects. +exports.Lines = Lines; +var Lp = Lines.prototype; + +// These properties used to be assigned to each new object in the Lines +// constructor, but we can more efficiently stuff them into the secret and +// let these lazy accessors compute their values on-the-fly. +Object.defineProperties(Lp, { + length: { + get: function() { + return getSecret(this).infos.length; + } + }, + + name: { + get: function() { + return getSecret(this).name; + } + } +}); + +function copyLineInfo(info) { + return { + line: info.line, + indent: info.indent, + sliceStart: info.sliceStart, + sliceEnd: info.sliceEnd + }; +} + +var fromStringCache = {}; +var hasOwn = fromStringCache.hasOwnProperty; +var maxCacheKeyLen = 10; + +function countSpaces(spaces, tabWidth) { + var count = 0; + var len = spaces.length; + + for (var i = 0; i < len; ++i) { + switch (spaces.charCodeAt(i)) { + case 9: // '\t' + assert.strictEqual(typeof tabWidth, "number"); + assert.ok(tabWidth > 0); + + var next = Math.ceil(count / tabWidth) * tabWidth; + if (next === count) { + count += tabWidth; + } else { + count = next; + } + + break; + + case 11: // '\v' + case 12: // '\f' + case 13: // '\r' + case 0xfeff: // zero-width non-breaking space + // These characters contribute nothing to indentation. + break; + + case 32: // ' ' + default: // Treat all other whitespace like ' '. + count += 1; + break; + } + } + + return count; +} +exports.countSpaces = countSpaces; + +var leadingSpaceExp = /^\s*/; + +/** + * @param {Object} options - Options object that configures printing. + */ +function fromString(string, options) { + if (string instanceof Lines) + return string; + + string += ""; + + var tabWidth = options && options.tabWidth; + var tabless = string.indexOf("\t") < 0; + var cacheable = !options && tabless && (string.length <= maxCacheKeyLen); + + assert.ok(tabWidth || tabless, "No tab width specified but encountered tabs in string\n" + string); + + if (cacheable && hasOwn.call(fromStringCache, string)) + return fromStringCache[string]; + + var lines = new Lines(string.split("\n").map(function(line) { + var spaces = leadingSpaceExp.exec(line)[0]; + return { + line: line, + indent: countSpaces(spaces, tabWidth), + sliceStart: spaces.length, + sliceEnd: line.length + }; + }), normalizeOptions(options).sourceFileName); + + if (cacheable) + fromStringCache[string] = lines; + + return lines; +} +exports.fromString = fromString; + +function isOnlyWhitespace(string) { + return !/\S/.test(string); +} + +Lp.toString = function(options) { + return this.sliceString(this.firstPos(), this.lastPos(), options); +}; + +Lp.getSourceMap = function(sourceMapName, sourceRoot) { + if (!sourceMapName) { + // Although we could make up a name or generate an anonymous + // source map, instead we assume that any consumer who does not + // provide a name does not actually want a source map. + return null; + } + + var targetLines = this; + + function updateJSON(json) { + json = json || {}; + + isString.assert(sourceMapName); + json.file = sourceMapName; + + if (sourceRoot) { + isString.assert(sourceRoot); + json.sourceRoot = sourceRoot; + } + + return json; + } + + var secret = getSecret(targetLines); + if (secret.cachedSourceMap) { + // Since Lines objects are immutable, we can reuse any source map + // that was previously generated. Nevertheless, we return a new + // JSON object here to protect the cached source map from outside + // modification. + return updateJSON(secret.cachedSourceMap.toJSON()); + } + + var smg = new sourceMap.SourceMapGenerator(updateJSON()); + var sourcesToContents = {}; + + secret.mappings.forEach(function(mapping) { + var sourceCursor = mapping.sourceLines.skipSpaces( + mapping.sourceLoc.start + ) || mapping.sourceLines.lastPos(); + + var targetCursor = targetLines.skipSpaces( + mapping.targetLoc.start + ) || targetLines.lastPos(); + + while (comparePos(sourceCursor, mapping.sourceLoc.end) < 0 && + comparePos(targetCursor, mapping.targetLoc.end) < 0) { + + var sourceChar = mapping.sourceLines.charAt(sourceCursor); + var targetChar = targetLines.charAt(targetCursor); + assert.strictEqual(sourceChar, targetChar); + + var sourceName = mapping.sourceLines.name; + + // Add mappings one character at a time for maximum resolution. + smg.addMapping({ + source: sourceName, + original: { line: sourceCursor.line, + column: sourceCursor.column }, + generated: { line: targetCursor.line, + column: targetCursor.column } + }); + + if (!hasOwn.call(sourcesToContents, sourceName)) { + var sourceContent = mapping.sourceLines.toString(); + smg.setSourceContent(sourceName, sourceContent); + sourcesToContents[sourceName] = sourceContent; + } + + targetLines.nextPos(targetCursor, true); + mapping.sourceLines.nextPos(sourceCursor, true); + } + }); + + secret.cachedSourceMap = smg; + + return smg.toJSON(); +}; + +Lp.bootstrapCharAt = function(pos) { + assert.strictEqual(typeof pos, "object"); + assert.strictEqual(typeof pos.line, "number"); + assert.strictEqual(typeof pos.column, "number"); + + var line = pos.line, + column = pos.column, + strings = this.toString().split("\n"), + string = strings[line - 1]; + + if (typeof string === "undefined") + return ""; + + if (column === string.length && + line < strings.length) + return "\n"; + + if (column >= string.length) + return ""; + + return string.charAt(column); +}; + +Lp.charAt = function(pos) { + assert.strictEqual(typeof pos, "object"); + assert.strictEqual(typeof pos.line, "number"); + assert.strictEqual(typeof pos.column, "number"); + + var line = pos.line, + column = pos.column, + secret = getSecret(this), + infos = secret.infos, + info = infos[line - 1], + c = column; + + if (typeof info === "undefined" || c < 0) + return ""; + + var indent = this.getIndentAt(line); + if (c < indent) + return " "; + + c += info.sliceStart - indent; + + if (c === info.sliceEnd && + line < this.length) + return "\n"; + + if (c >= info.sliceEnd) + return ""; + + return info.line.charAt(c); +}; + +Lp.stripMargin = function(width, skipFirstLine) { + if (width === 0) + return this; + + assert.ok(width > 0, "negative margin: " + width); + + if (skipFirstLine && this.length === 1) + return this; + + var secret = getSecret(this); + + var lines = new Lines(secret.infos.map(function(info, i) { + if (info.line && (i > 0 || !skipFirstLine)) { + info = copyLineInfo(info); + info.indent = Math.max(0, info.indent - width); + } + return info; + })); + + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + newMappings.push(mapping.indent(width, skipFirstLine, true)); + }); + } + + return lines; +}; + +Lp.indent = function(by) { + if (by === 0) + return this; + + var secret = getSecret(this); + + var lines = new Lines(secret.infos.map(function(info) { + if (info.line) { + info = copyLineInfo(info); + info.indent += by; + } + return info + })); + + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + newMappings.push(mapping.indent(by)); + }); + } + + return lines; +}; + +Lp.indentTail = function(by) { + if (by === 0) + return this; + + if (this.length < 2) + return this; + + var secret = getSecret(this); + + var lines = new Lines(secret.infos.map(function(info, i) { + if (i > 0 && info.line) { + info = copyLineInfo(info); + info.indent += by; + } + + return info; + })); + + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + newMappings.push(mapping.indent(by, true)); + }); + } + + return lines; +}; + +Lp.getIndentAt = function(line) { + assert.ok(line >= 1, "no line " + line + " (line numbers start from 1)"); + var secret = getSecret(this), + info = secret.infos[line - 1]; + return Math.max(info.indent, 0); +}; + +Lp.guessTabWidth = function() { + var secret = getSecret(this); + if (hasOwn.call(secret, "cachedTabWidth")) { + return secret.cachedTabWidth; + } + + var counts = []; // Sparse array. + var lastIndent = 0; + + for (var line = 1, last = this.length; line <= last; ++line) { + var info = secret.infos[line - 1]; + var sliced = info.line.slice(info.sliceStart, info.sliceEnd); + + // Whitespace-only lines don't tell us much about the likely tab + // width of this code. + if (isOnlyWhitespace(sliced)) { + continue; + } + + var diff = Math.abs(info.indent - lastIndent); + counts[diff] = ~~counts[diff] + 1; + lastIndent = info.indent; + } + + var maxCount = -1; + var result = 2; + + for (var tabWidth = 1; + tabWidth < counts.length; + tabWidth += 1) { + if (hasOwn.call(counts, tabWidth) && + counts[tabWidth] > maxCount) { + maxCount = counts[tabWidth]; + result = tabWidth; + } + } + + return secret.cachedTabWidth = result; +}; + +Lp.isOnlyWhitespace = function() { + return isOnlyWhitespace(this.toString()); +}; + +Lp.isPrecededOnlyByWhitespace = function(pos) { + var secret = getSecret(this); + var info = secret.infos[pos.line - 1]; + var indent = Math.max(info.indent, 0); + + var diff = pos.column - indent; + if (diff <= 0) { + // If pos.column does not exceed the indentation amount, then + // there must be only whitespace before it. + return true; + } + + var start = info.sliceStart; + var end = Math.min(start + diff, info.sliceEnd); + var prefix = info.line.slice(start, end); + + return isOnlyWhitespace(prefix); +}; + +Lp.getLineLength = function(line) { + var secret = getSecret(this), + info = secret.infos[line - 1]; + return this.getIndentAt(line) + info.sliceEnd - info.sliceStart; +}; + +Lp.nextPos = function(pos, skipSpaces) { + var l = Math.max(pos.line, 0), + c = Math.max(pos.column, 0); + + if (c < this.getLineLength(l)) { + pos.column += 1; + + return skipSpaces + ? !!this.skipSpaces(pos, false, true) + : true; + } + + if (l < this.length) { + pos.line += 1; + pos.column = 0; + + return skipSpaces + ? !!this.skipSpaces(pos, false, true) + : true; + } + + return false; +}; + +Lp.prevPos = function(pos, skipSpaces) { + var l = pos.line, + c = pos.column; + + if (c < 1) { + l -= 1; + + if (l < 1) + return false; + + c = this.getLineLength(l); + + } else { + c = Math.min(c - 1, this.getLineLength(l)); + } + + pos.line = l; + pos.column = c; + + return skipSpaces + ? !!this.skipSpaces(pos, true, true) + : true; +}; + +Lp.firstPos = function() { + // Trivial, but provided for completeness. + return { line: 1, column: 0 }; +}; + +Lp.lastPos = function() { + return { + line: this.length, + column: this.getLineLength(this.length) + }; +}; + +Lp.skipSpaces = function(pos, backward, modifyInPlace) { + if (pos) { + pos = modifyInPlace ? pos : { + line: pos.line, + column: pos.column + }; + } else if (backward) { + pos = this.lastPos(); + } else { + pos = this.firstPos(); + } + + if (backward) { + while (this.prevPos(pos)) { + if (!isOnlyWhitespace(this.charAt(pos)) && + this.nextPos(pos)) { + return pos; + } + } + + return null; + + } else { + while (isOnlyWhitespace(this.charAt(pos))) { + if (!this.nextPos(pos)) { + return null; + } + } + + return pos; + } +}; + +Lp.trimLeft = function() { + var pos = this.skipSpaces(this.firstPos(), false, true); + return pos ? this.slice(pos) : emptyLines; +}; + +Lp.trimRight = function() { + var pos = this.skipSpaces(this.lastPos(), true, true); + return pos ? this.slice(this.firstPos(), pos) : emptyLines; +}; + +Lp.trim = function() { + var start = this.skipSpaces(this.firstPos(), false, true); + if (start === null) + return emptyLines; + + var end = this.skipSpaces(this.lastPos(), true, true); + assert.notStrictEqual(end, null); + + return this.slice(start, end); +}; + +Lp.eachPos = function(callback, startPos, skipSpaces) { + var pos = this.firstPos(); + + if (startPos) { + pos.line = startPos.line, + pos.column = startPos.column + } + + if (skipSpaces && !this.skipSpaces(pos, false, true)) { + return; // Encountered nothing but spaces. + } + + do callback.call(this, pos); + while (this.nextPos(pos, skipSpaces)); +}; + +Lp.bootstrapSlice = function(start, end) { + var strings = this.toString().split("\n").slice( + start.line - 1, end.line); + + strings.push(strings.pop().slice(0, end.column)); + strings[0] = strings[0].slice(start.column); + + return fromString(strings.join("\n")); +}; + +Lp.slice = function(start, end) { + if (!end) { + if (!start) { + // The client seems to want a copy of this Lines object, but + // Lines objects are immutable, so it's perfectly adequate to + // return the same object. + return this; + } + + // Slice to the end if no end position was provided. + end = this.lastPos(); + } + + var secret = getSecret(this); + var sliced = secret.infos.slice(start.line - 1, end.line); + + if (start.line === end.line) { + sliced[0] = sliceInfo(sliced[0], start.column, end.column); + } else { + assert.ok(start.line < end.line); + sliced[0] = sliceInfo(sliced[0], start.column); + sliced.push(sliceInfo(sliced.pop(), 0, end.column)); + } + + var lines = new Lines(sliced); + + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + var sliced = mapping.slice(this, start, end); + if (sliced) { + newMappings.push(sliced); + } + }, this); + } + + return lines; +}; + +function sliceInfo(info, startCol, endCol) { + var sliceStart = info.sliceStart; + var sliceEnd = info.sliceEnd; + var indent = Math.max(info.indent, 0); + var lineLength = indent + sliceEnd - sliceStart; + + if (typeof endCol === "undefined") { + endCol = lineLength; + } + + startCol = Math.max(startCol, 0); + endCol = Math.min(endCol, lineLength); + endCol = Math.max(endCol, startCol); + + if (endCol < indent) { + indent = endCol; + sliceEnd = sliceStart; + } else { + sliceEnd -= lineLength - endCol; + } + + lineLength = endCol; + lineLength -= startCol; + + if (startCol < indent) { + indent -= startCol; + } else { + startCol -= indent; + indent = 0; + sliceStart += startCol; + } + + assert.ok(indent >= 0); + assert.ok(sliceStart <= sliceEnd); + assert.strictEqual(lineLength, indent + sliceEnd - sliceStart); + + if (info.indent === indent && + info.sliceStart === sliceStart && + info.sliceEnd === sliceEnd) { + return info; + } + + return { + line: info.line, + indent: indent, + sliceStart: sliceStart, + sliceEnd: sliceEnd + }; +} + +Lp.bootstrapSliceString = function(start, end, options) { + return this.slice(start, end).toString(options); +}; + +Lp.sliceString = function(start, end, options) { + if (!end) { + if (!start) { + // The client seems to want a copy of this Lines object, but + // Lines objects are immutable, so it's perfectly adequate to + // return the same object. + return this; + } + + // Slice to the end if no end position was provided. + end = this.lastPos(); + } + + options = normalizeOptions(options); + + var infos = getSecret(this).infos; + var parts = []; + var tabWidth = options.tabWidth; + + for (var line = start.line; line <= end.line; ++line) { + var info = infos[line - 1]; + + if (line === start.line) { + if (line === end.line) { + info = sliceInfo(info, start.column, end.column); + } else { + info = sliceInfo(info, start.column); + } + } else if (line === end.line) { + info = sliceInfo(info, 0, end.column); + } + + var indent = Math.max(info.indent, 0); + + var before = info.line.slice(0, info.sliceStart); + if (options.reuseWhitespace && + isOnlyWhitespace(before) && + countSpaces(before, options.tabWidth) === indent) { + // Reuse original spaces if the indentation is correct. + parts.push(info.line.slice(0, info.sliceEnd)); + continue; + } + + var tabs = 0; + var spaces = indent; + + if (options.useTabs) { + tabs = Math.floor(indent / tabWidth); + spaces -= tabs * tabWidth; + } + + var result = ""; + + if (tabs > 0) { + result += new Array(tabs + 1).join("\t"); + } + + if (spaces > 0) { + result += new Array(spaces + 1).join(" "); + } + + result += info.line.slice(info.sliceStart, info.sliceEnd); + + parts.push(result); + } + + return parts.join("\n"); +}; + +Lp.isEmpty = function() { + return this.length < 2 && this.getLineLength(1) < 1; +}; + +Lp.join = function(elements) { + var separator = this; + var separatorSecret = getSecret(separator); + var infos = []; + var mappings = []; + var prevInfo; + + function appendSecret(secret) { + if (secret === null) + return; + + if (prevInfo) { + var info = secret.infos[0]; + var indent = new Array(info.indent + 1).join(" "); + var prevLine = infos.length; + var prevColumn = Math.max(prevInfo.indent, 0) + + prevInfo.sliceEnd - prevInfo.sliceStart; + + prevInfo.line = prevInfo.line.slice( + 0, prevInfo.sliceEnd) + indent + info.line.slice( + info.sliceStart, info.sliceEnd); + + prevInfo.sliceEnd = prevInfo.line.length; + + if (secret.mappings.length > 0) { + secret.mappings.forEach(function(mapping) { + mappings.push(mapping.add(prevLine, prevColumn)); + }); + } + + } else if (secret.mappings.length > 0) { + mappings.push.apply(mappings, secret.mappings); + } + + secret.infos.forEach(function(info, i) { + if (!prevInfo || i > 0) { + prevInfo = copyLineInfo(info); + infos.push(prevInfo); + } + }); + } + + function appendWithSeparator(secret, i) { + if (i > 0) + appendSecret(separatorSecret); + appendSecret(secret); + } + + elements.map(function(elem) { + var lines = fromString(elem); + if (lines.isEmpty()) + return null; + return getSecret(lines); + }).forEach(separator.isEmpty() + ? appendSecret + : appendWithSeparator); + + if (infos.length < 1) + return emptyLines; + + var lines = new Lines(infos); + + getSecret(lines).mappings = mappings; + + return lines; +}; + +exports.concat = function(elements) { + return emptyLines.join(elements); +}; + +Lp.concat = function(other) { + var args = arguments, + list = [this]; + list.push.apply(list, args); + assert.strictEqual(list.length, args.length + 1); + return emptyLines.join(list); +}; + +// The emptyLines object needs to be created all the way down here so that +// Lines.prototype will be fully populated. +var emptyLines = fromString(""); + +},{"./mapping":505,"./options":506,"./types":510,"./util":511,"assert":209,"private":480,"source-map":526}],505:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var isString = types.builtInTypes.string; +var isNumber = types.builtInTypes.number; +var SourceLocation = types.namedTypes.SourceLocation; +var Position = types.namedTypes.Position; +var linesModule = require("./lines"); +var comparePos = require("./util").comparePos; + +function Mapping(sourceLines, sourceLoc, targetLoc) { + assert.ok(this instanceof Mapping); + assert.ok(sourceLines instanceof linesModule.Lines); + SourceLocation.assert(sourceLoc); + + if (targetLoc) { + // In certain cases it's possible for targetLoc.{start,end}.column + // values to be negative, which technically makes them no longer + // valid SourceLocation nodes, so we need to be more forgiving. + assert.ok( + isNumber.check(targetLoc.start.line) && + isNumber.check(targetLoc.start.column) && + isNumber.check(targetLoc.end.line) && + isNumber.check(targetLoc.end.column) + ); + } else { + // Assume identity mapping if no targetLoc specified. + targetLoc = sourceLoc; + } + + Object.defineProperties(this, { + sourceLines: { value: sourceLines }, + sourceLoc: { value: sourceLoc }, + targetLoc: { value: targetLoc } + }); +} + +var Mp = Mapping.prototype; +module.exports = Mapping; + +Mp.slice = function(lines, start, end) { + assert.ok(lines instanceof linesModule.Lines); + Position.assert(start); + + if (end) { + Position.assert(end); + } else { + end = lines.lastPos(); + } + + var sourceLines = this.sourceLines; + var sourceLoc = this.sourceLoc; + var targetLoc = this.targetLoc; + + function skip(name) { + var sourceFromPos = sourceLoc[name]; + var targetFromPos = targetLoc[name]; + var targetToPos = start; + + if (name === "end") { + targetToPos = end; + } else { + assert.strictEqual(name, "start"); + } + + return skipChars( + sourceLines, sourceFromPos, + lines, targetFromPos, targetToPos + ); + } + + if (comparePos(start, targetLoc.start) <= 0) { + if (comparePos(targetLoc.end, end) <= 0) { + targetLoc = { + start: subtractPos(targetLoc.start, start.line, start.column), + end: subtractPos(targetLoc.end, start.line, start.column) + }; + + // The sourceLoc can stay the same because the contents of the + // targetLoc have not changed. + + } else if (comparePos(end, targetLoc.start) <= 0) { + return null; + + } else { + sourceLoc = { + start: sourceLoc.start, + end: skip("end") + }; + + targetLoc = { + start: subtractPos(targetLoc.start, start.line, start.column), + end: subtractPos(end, start.line, start.column) + }; + } + + } else { + if (comparePos(targetLoc.end, start) <= 0) { + return null; + } + + if (comparePos(targetLoc.end, end) <= 0) { + sourceLoc = { + start: skip("start"), + end: sourceLoc.end + }; + + targetLoc = { + // Same as subtractPos(start, start.line, start.column): + start: { line: 1, column: 0 }, + end: subtractPos(targetLoc.end, start.line, start.column) + }; + + } else { + sourceLoc = { + start: skip("start"), + end: skip("end") + }; + + targetLoc = { + // Same as subtractPos(start, start.line, start.column): + start: { line: 1, column: 0 }, + end: subtractPos(end, start.line, start.column) + }; + } + } + + return new Mapping(this.sourceLines, sourceLoc, targetLoc); +}; + +Mp.add = function(line, column) { + return new Mapping(this.sourceLines, this.sourceLoc, { + start: addPos(this.targetLoc.start, line, column), + end: addPos(this.targetLoc.end, line, column) + }); +}; + +function addPos(toPos, line, column) { + return { + line: toPos.line + line - 1, + column: (toPos.line === 1) + ? toPos.column + column + : toPos.column + }; +} + +Mp.subtract = function(line, column) { + return new Mapping(this.sourceLines, this.sourceLoc, { + start: subtractPos(this.targetLoc.start, line, column), + end: subtractPos(this.targetLoc.end, line, column) + }); +}; + +function subtractPos(fromPos, line, column) { + return { + line: fromPos.line - line + 1, + column: (fromPos.line === line) + ? fromPos.column - column + : fromPos.column + }; +} + +Mp.indent = function(by, skipFirstLine, noNegativeColumns) { + if (by === 0) { + return this; + } + + var targetLoc = this.targetLoc; + var startLine = targetLoc.start.line; + var endLine = targetLoc.end.line; + + if (skipFirstLine && startLine === 1 && endLine === 1) { + return this; + } + + targetLoc = { + start: targetLoc.start, + end: targetLoc.end + }; + + if (!skipFirstLine || startLine > 1) { + var startColumn = targetLoc.start.column + by; + targetLoc.start = { + line: startLine, + column: noNegativeColumns + ? Math.max(0, startColumn) + : startColumn + }; + } + + if (!skipFirstLine || endLine > 1) { + var endColumn = targetLoc.end.column + by; + targetLoc.end = { + line: endLine, + column: noNegativeColumns + ? Math.max(0, endColumn) + : endColumn + }; + } + + return new Mapping(this.sourceLines, this.sourceLoc, targetLoc); +}; + +function skipChars( + sourceLines, sourceFromPos, + targetLines, targetFromPos, targetToPos +) { + assert.ok(sourceLines instanceof linesModule.Lines); + assert.ok(targetLines instanceof linesModule.Lines); + Position.assert(sourceFromPos); + Position.assert(targetFromPos); + Position.assert(targetToPos); + + var targetComparison = comparePos(targetFromPos, targetToPos); + if (targetComparison === 0) { + // Trivial case: no characters to skip. + return sourceFromPos; + } + + if (targetComparison < 0) { + // Skipping forward. + + var sourceCursor = sourceLines.skipSpaces(sourceFromPos); + var targetCursor = targetLines.skipSpaces(targetFromPos); + + var lineDiff = targetToPos.line - targetCursor.line; + sourceCursor.line += lineDiff; + targetCursor.line += lineDiff; + + if (lineDiff > 0) { + // If jumping to later lines, reset columns to the beginnings + // of those lines. + sourceCursor.column = 0; + targetCursor.column = 0; + } else { + assert.strictEqual(lineDiff, 0); + } + + while (comparePos(targetCursor, targetToPos) < 0 && + targetLines.nextPos(targetCursor, true)) { + assert.ok(sourceLines.nextPos(sourceCursor, true)); + assert.strictEqual( + sourceLines.charAt(sourceCursor), + targetLines.charAt(targetCursor) + ); + } + + } else { + // Skipping backward. + + var sourceCursor = sourceLines.skipSpaces(sourceFromPos, true); + var targetCursor = targetLines.skipSpaces(targetFromPos, true); + + var lineDiff = targetToPos.line - targetCursor.line; + sourceCursor.line += lineDiff; + targetCursor.line += lineDiff; + + if (lineDiff < 0) { + // If jumping to earlier lines, reset columns to the ends of + // those lines. + sourceCursor.column = sourceLines.getLineLength(sourceCursor.line); + targetCursor.column = targetLines.getLineLength(targetCursor.line); + } else { + assert.strictEqual(lineDiff, 0); + } + + while (comparePos(targetToPos, targetCursor) < 0 && + targetLines.prevPos(targetCursor, true)) { + assert.ok(sourceLines.prevPos(sourceCursor, true)); + assert.strictEqual( + sourceLines.charAt(sourceCursor), + targetLines.charAt(targetCursor) + ); + } + } + + return sourceCursor; +} + +},{"./lines":504,"./types":510,"./util":511,"assert":209}],506:[function(require,module,exports){ +var defaults = { + // If you want to use a different branch of esprima, or any other + // module that supports a .parse function, pass that module object to + // recast.parse as options.esprima. + esprima: require("esprima-fb"), + + // Number of spaces the pretty-printer should use per tab for + // indentation. If you do not pass this option explicitly, it will be + // (quite reliably!) inferred from the original code. + tabWidth: 4, + + // If you really want the pretty-printer to use tabs instead of + // spaces, make this option true. + useTabs: false, + + // The reprinting code leaves leading whitespace untouched unless it + // has to reindent a line, or you pass false for this option. + reuseWhitespace: true, + + // Some of the pretty-printer code (such as that for printing function + // parameter lists) makes a valiant attempt to prevent really long + // lines. You can adjust the limit by changing this option; however, + // there is no guarantee that line length will fit inside this limit. + wrapColumn: 74, // Aspirational for now. + + // Pass a string as options.sourceFileName to recast.parse to tell the + // reprinter to keep track of reused code so that it can construct a + // source map automatically. + sourceFileName: null, + + // Pass a string as options.sourceMapName to recast.print, and + // (provided you passed options.sourceFileName earlier) the + // PrintResult of recast.print will have a .map property for the + // generated source map. + sourceMapName: null, + + // If provided, this option will be passed along to the source map + // generator as a root directory for relative source file paths. + sourceRoot: null, + + // If you provide a source map that was generated from a previous call + // to recast.print as options.inputSourceMap, the old source map will + // be composed with the new source map. + inputSourceMap: null, + + // If you want esprima to generate .range information (recast only + // uses .loc internally), pass true for this option. + range: false, + + // If you want esprima not to throw exceptions when it encounters + // non-fatal errors, keep this option true. + tolerant: true, + + // If you want to override the quotes used in string literals, specify + // either "single", "double", or "auto" here ("auto" will select the one + // which results in the shorter literal) + // Otherwise, the input marks will be preserved + quote: null, + + // If you want to print trailing commas in object literals, + // array expressions, functions calls and function definitions pass true + // for this option. + trailingComma: false, +}, hasOwn = defaults.hasOwnProperty; + +// Copy options and fill in default values. +exports.normalize = function(options) { + options = options || defaults; + + function get(key) { + return hasOwn.call(options, key) + ? options[key] + : defaults[key]; + } + + return { + tabWidth: +get("tabWidth"), + useTabs: !!get("useTabs"), + reuseWhitespace: !!get("reuseWhitespace"), + wrapColumn: Math.max(get("wrapColumn"), 0), + sourceFileName: get("sourceFileName"), + sourceMapName: get("sourceMapName"), + sourceRoot: get("sourceRoot"), + inputSourceMap: get("inputSourceMap"), + esprima: get("esprima"), + range: get("range"), + tolerant: get("tolerant"), + quote: get("quote"), + trailingComma: get("trailingComma"), + }; +}; + +},{"esprima-fb":208}],507:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var n = types.namedTypes; +var b = types.builders; +var isObject = types.builtInTypes.object; +var isArray = types.builtInTypes.array; +var isFunction = types.builtInTypes.function; +var Patcher = require("./patcher").Patcher; +var normalizeOptions = require("./options").normalize; +var fromString = require("./lines").fromString; +var attachComments = require("./comments").attach; +var util = require("./util"); + +exports.parse = function parse(source, options) { + options = normalizeOptions(options); + + var lines = fromString(source, options); + + var sourceWithoutTabs = lines.toString({ + tabWidth: options.tabWidth, + reuseWhitespace: false, + useTabs: false + }); + + var program = options.esprima.parse(sourceWithoutTabs, { + loc: true, + range: options.range, + comment: true, + tolerant: options.tolerant, + sourceType: 'module' + }); + + // Expand the Program node's .loc to include all comments, since + // typically its .loc.start and .loc.end will coincide with those of + // the first and last statements, respectively, excluding any comments + // that fall outside that region. + program.loc = util.getTrueLoc(program); + + var comments = program.comments; + delete program.comments; + + // In order to ensure we reprint leading and trailing program + // comments, wrap the original Program node with a File node. + var file = b.file(program); + file.loc = { + lines: lines, + indent: 0, + start: lines.firstPos(), + end: lines.lastPos() + }; + + // Passing file.program here instead of just file means that initial + // comments will be attached to program.body[0] instead of program. + attachComments( + comments, + program.body.length ? file.program : file, + lines + ); + + // Return a copy of the original AST so that any changes made may be + // compared to the original. + return new TreeCopier(lines).copy(file); +}; + +function TreeCopier(lines) { + assert.ok(this instanceof TreeCopier); + this.lines = lines; + this.indent = 0; +} + +var TCp = TreeCopier.prototype; + +TCp.copy = function(node) { + if (isArray.check(node)) { + return node.map(this.copy, this); + } + + if (!isObject.check(node)) { + return node; + } + + util.fixFaultyLocations(node); + + var copy = Object.create(Object.getPrototypeOf(node), { + original: { // Provide a link from the copy to the original. + value: node, + configurable: false, + enumerable: false, + writable: true + } + }); + + var loc = node.loc; + var oldIndent = this.indent; + var newIndent = oldIndent; + + if (loc) { + // When node is a comment, we set node.loc.indent to + // node.loc.start.column so that, when/if we print the comment by + // itself, we can strip that much whitespace from the left margin + // of the comment. This only really matters for multiline Block + // comments, but it doesn't hurt for Line comments. + if (node.type === "Block" || node.type === "Line" || + this.lines.isPrecededOnlyByWhitespace(loc.start)) { + newIndent = this.indent = loc.start.column; + } + + loc.lines = this.lines; + loc.indent = newIndent; + } + + var keys = Object.keys(node); + var keyCount = keys.length; + for (var i = 0; i < keyCount; ++i) { + var key = keys[i]; + if (key === "loc") { + copy[key] = node[key]; + } else { + copy[key] = this.copy(node[key]); + } + } + + this.indent = oldIndent; + + return copy; +}; + +},{"./comments":502,"./lines":504,"./options":506,"./patcher":508,"./types":510,"./util":511,"assert":209}],508:[function(require,module,exports){ +var assert = require("assert"); +var linesModule = require("./lines"); +var types = require("./types"); +var getFieldValue = types.getFieldValue; +var Printable = types.namedTypes.Printable; +var Expression = types.namedTypes.Expression; +var SourceLocation = types.namedTypes.SourceLocation; +var util = require("./util"); +var comparePos = util.comparePos; +var FastPath = require("./fast-path"); +var isObject = types.builtInTypes.object; +var isArray = types.builtInTypes.array; +var isString = types.builtInTypes.string; +var riskyAdjoiningCharExp = /[0-9a-z_$]/i; + +function Patcher(lines) { + assert.ok(this instanceof Patcher); + assert.ok(lines instanceof linesModule.Lines); + + var self = this, + replacements = []; + + self.replace = function(loc, lines) { + if (isString.check(lines)) + lines = linesModule.fromString(lines); + + replacements.push({ + lines: lines, + start: loc.start, + end: loc.end + }); + }; + + self.get = function(loc) { + // If no location is provided, return the complete Lines object. + loc = loc || { + start: { line: 1, column: 0 }, + end: { line: lines.length, + column: lines.getLineLength(lines.length) } + }; + + var sliceFrom = loc.start, + toConcat = []; + + function pushSlice(from, to) { + assert.ok(comparePos(from, to) <= 0); + toConcat.push(lines.slice(from, to)); + } + + replacements.sort(function(a, b) { + return comparePos(a.start, b.start); + }).forEach(function(rep) { + if (comparePos(sliceFrom, rep.start) > 0) { + // Ignore nested replacement ranges. + } else { + pushSlice(sliceFrom, rep.start); + toConcat.push(rep.lines); + sliceFrom = rep.end; + } + }); + + pushSlice(sliceFrom, loc.end); + + return linesModule.concat(toConcat); + }; +} +exports.Patcher = Patcher; + +var Pp = Patcher.prototype; + +Pp.tryToReprintComments = function(newNode, oldNode, print) { + var patcher = this; + + if (!newNode.comments && + !oldNode.comments) { + // We were (vacuously) able to reprint all the comments! + return true; + } + + var newPath = FastPath.from(newNode); + var oldPath = FastPath.from(oldNode); + + newPath.stack.push("comments", getSurroundingComments(newNode)); + oldPath.stack.push("comments", getSurroundingComments(oldNode)); + + var reprints = []; + var ableToReprintComments = + findArrayReprints(newPath, oldPath, reprints); + + // No need to pop anything from newPath.stack or oldPath.stack, since + // newPath and oldPath are fresh local variables. + + if (ableToReprintComments && reprints.length > 0) { + reprints.forEach(function(reprint) { + var oldComment = reprint.oldPath.getValue(); + assert.ok(oldComment.leading || oldComment.trailing); + patcher.replace( + oldComment.loc, + // Comments can't have .comments, so it doesn't matter + // whether we print with comments or without. + print(reprint.newPath).indentTail(oldComment.loc.indent) + ); + }); + } + + return ableToReprintComments; +}; + +// Get all comments that are either leading or trailing, ignoring any +// comments that occur inside node.loc. Returns an empty array for nodes +// with no leading or trailing comments. +function getSurroundingComments(node) { + var result = []; + if (node.comments && + node.comments.length > 0) { + node.comments.forEach(function(comment) { + if (comment.leading || comment.trailing) { + result.push(comment); + } + }); + } + return result; +} + +Pp.deleteComments = function(node) { + if (!node.comments) { + return; + } + + var patcher = this; + + node.comments.forEach(function(comment) { + if (comment.leading) { + // Delete leading comments along with any trailing whitespace + // they might have. + patcher.replace({ + start: comment.loc.start, + end: node.loc.lines.skipSpaces( + comment.loc.end, false, false) + }, ""); + + } else if (comment.trailing) { + // Delete trailing comments along with any leading whitespace + // they might have. + patcher.replace({ + start: node.loc.lines.skipSpaces( + comment.loc.start, true, false), + end: comment.loc.end + }, ""); + } + }); +}; + +exports.getReprinter = function(path) { + assert.ok(path instanceof FastPath); + + // Make sure that this path refers specifically to a Node, rather than + // some non-Node subproperty of a Node. + var node = path.getValue(); + if (!Printable.check(node)) + return; + + var orig = node.original; + var origLoc = orig && orig.loc; + var lines = origLoc && origLoc.lines; + var reprints = []; + + if (!lines || !findReprints(path, reprints)) + return; + + return function(print) { + var patcher = new Patcher(lines); + + reprints.forEach(function(reprint) { + var newNode = reprint.newPath.getValue(); + var oldNode = reprint.oldPath.getValue(); + + SourceLocation.assert(oldNode.loc, true); + + var needToPrintNewPathWithComments = + !patcher.tryToReprintComments(newNode, oldNode, print) + + if (needToPrintNewPathWithComments) { + // Since we were not able to preserve all leading/trailing + // comments, we delete oldNode's comments, print newPath + // with comments, and then patch the resulting lines where + // oldNode used to be. + patcher.deleteComments(oldNode); + } + + var pos = util.copyPos(oldNode.loc.start); + var needsLeadingSpace = lines.prevPos(pos) && + riskyAdjoiningCharExp.test(lines.charAt(pos)); + + var newLines = print( + reprint.newPath, + needToPrintNewPathWithComments + ).indentTail(oldNode.loc.indent); + + var needsTrailingSpace = + riskyAdjoiningCharExp.test(lines.charAt(oldNode.loc.end)); + + // If we try to replace the argument of a ReturnStatement like + // return"asdf" with e.g. a literal null expression, we run + // the risk of ending up with returnnull, so we need to add an + // extra leading space in situations where that might + // happen. Likewise for "asdf"in obj. See #170. + if (needsLeadingSpace || needsTrailingSpace) { + var newParts = []; + needsLeadingSpace && newParts.push(" "); + newParts.push(newLines); + needsTrailingSpace && newParts.push(" "); + newLines = linesModule.concat(newParts); + } + + patcher.replace(oldNode.loc, newLines); + }); + + // Recall that origLoc is the .loc of an ancestor node that is + // guaranteed to contain all the reprinted nodes and comments. + return patcher.get(origLoc).indentTail(-orig.loc.indent); + }; +}; + +function findReprints(newPath, reprints) { + var newNode = newPath.getValue(); + Printable.assert(newNode); + + var oldNode = newNode.original; + Printable.assert(oldNode); + + assert.deepEqual(reprints, []); + + if (newNode.type !== oldNode.type) { + return false; + } + + var oldPath = new FastPath(oldNode); + var canReprint = findChildReprints(newPath, oldPath, reprints); + + if (!canReprint) { + // Make absolutely sure the calling code does not attempt to reprint + // any nodes. + reprints.length = 0; + } + + return canReprint; +} + +function findAnyReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + var oldNode = oldPath.getValue(); + + if (newNode === oldNode) + return true; + + if (isArray.check(newNode)) + return findArrayReprints(newPath, oldPath, reprints); + + if (isObject.check(newNode)) + return findObjectReprints(newPath, oldPath, reprints); + + return false; +} + +function findArrayReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + var oldNode = oldPath.getValue(); + isArray.assert(newNode); + var len = newNode.length; + + if (!(isArray.check(oldNode) && + oldNode.length === len)) + return false; + + for (var i = 0; i < len; ++i) { + newPath.stack.push(i, newNode[i]); + oldPath.stack.push(i, oldNode[i]); + var canReprint = findAnyReprints(newPath, oldPath, reprints); + newPath.stack.length -= 2; + oldPath.stack.length -= 2; + if (!canReprint) { + return false; + } + } + + return true; +} + +function findObjectReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + isObject.assert(newNode); + + if (newNode.original === null) { + // If newNode.original node was set to null, reprint the node. + return false; + } + + var oldNode = oldPath.getValue(); + if (!isObject.check(oldNode)) + return false; + + if (Printable.check(newNode)) { + if (!Printable.check(oldNode)) { + return false; + } + + // Here we need to decide whether the reprinted code for newNode + // is appropriate for patching into the location of oldNode. + + if (newNode.type === oldNode.type) { + var childReprints = []; + + if (findChildReprints(newPath, oldPath, childReprints)) { + reprints.push.apply(reprints, childReprints); + } else if (oldNode.loc) { + // If we have no .loc information for oldNode, then we + // won't be able to reprint it. + reprints.push({ + oldPath: oldPath.copy(), + newPath: newPath.copy() + }); + } else { + return false; + } + + return true; + } + + if (Expression.check(newNode) && + Expression.check(oldNode) && + // If we have no .loc information for oldNode, then we won't + // be able to reprint it. + oldNode.loc) { + + // If both nodes are subtypes of Expression, then we should be + // able to fill the location occupied by the old node with + // code printed for the new node with no ill consequences. + reprints.push({ + oldPath: oldPath.copy(), + newPath: newPath.copy() + }); + + return true; + } + + // The nodes have different types, and at least one of the types + // is not a subtype of the Expression type, so we cannot safely + // assume the nodes are syntactically interchangeable. + return false; + } + + return findChildReprints(newPath, oldPath, reprints); +} + +// This object is reused in hasOpeningParen and hasClosingParen to avoid +// having to allocate a temporary object. +var reusablePos = { line: 1, column: 0 }; +var nonSpaceExp = /\S/; + +function hasOpeningParen(oldPath) { + var oldNode = oldPath.getValue(); + var loc = oldNode.loc; + var lines = loc && loc.lines; + + if (lines) { + var pos = reusablePos; + pos.line = loc.start.line; + pos.column = loc.start.column; + + while (lines.prevPos(pos)) { + var ch = lines.charAt(pos); + + if (ch === "(") { + // If we found an opening parenthesis but it occurred before + // the start of the original subtree for this reprinting, then + // we must not return true for hasOpeningParen(oldPath). + return comparePos(oldPath.getRootValue().loc.start, pos) <= 0; + } + + if (nonSpaceExp.test(ch)) { + return false; + } + } + } + + return false; +} + +function hasClosingParen(oldPath) { + var oldNode = oldPath.getValue(); + var loc = oldNode.loc; + var lines = loc && loc.lines; + + if (lines) { + var pos = reusablePos; + pos.line = loc.end.line; + pos.column = loc.end.column; + + do { + var ch = lines.charAt(pos); + + if (ch === ")") { + // If we found a closing parenthesis but it occurred after the + // end of the original subtree for this reprinting, then we + // must not return true for hasClosingParen(oldPath). + return comparePos(pos, oldPath.getRootValue().loc.end) <= 0; + } + + if (nonSpaceExp.test(ch)) { + return false; + } + + } while (lines.nextPos(pos)); + } + + return false; +} + +function hasParens(oldPath) { + // This logic can technically be fooled if the node has parentheses + // but there are comments intervening between the parentheses and the + // node. In such cases the node will be harmlessly wrapped in an + // additional layer of parentheses. + return hasOpeningParen(oldPath) && hasClosingParen(oldPath); +} + +function findChildReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + var oldNode = oldPath.getValue(); + + isObject.assert(newNode); + isObject.assert(oldNode); + + if (newNode.original === null) { + // If newNode.original node was set to null, reprint the node. + return false; + } + + // If this type of node cannot come lexically first in its enclosing + // statement (e.g. a function expression or object literal), and it + // seems to be doing so, then the only way we can ignore this problem + // and save ourselves from falling back to the pretty printer is if an + // opening parenthesis happens to precede the node. For example, + // (function(){ ... }()); does not need to be reprinted, even though + // the FunctionExpression comes lexically first in the enclosing + // ExpressionStatement and fails the hasParens test, because the + // parent CallExpression passes the hasParens test. If we relied on + // the path.needsParens() && !hasParens(oldNode) check below, the + // absence of a closing parenthesis after the FunctionExpression would + // trigger pretty-printing unnecessarily. + if (!newPath.canBeFirstInStatement() && + newPath.firstInStatement() && + !hasOpeningParen(oldPath)) + return false; + + // If this node needs parentheses and will not be wrapped with + // parentheses when reprinted, then return false to skip reprinting + // and let it be printed generically. + if (newPath.needsParens(true) && !hasParens(oldPath)) { + return false; + } + + for (var k in util.getUnionOfKeys(newNode, oldNode)) { + if (k === "loc") + continue; + + newPath.stack.push(k, types.getFieldValue(newNode, k)); + oldPath.stack.push(k, types.getFieldValue(oldNode, k)); + var canReprint = findAnyReprints(newPath, oldPath, reprints); + newPath.stack.length -= 2; + oldPath.stack.length -= 2; + + if (!canReprint) { + return false; + } + } + + return true; +} + +},{"./fast-path":503,"./lines":504,"./types":510,"./util":511,"assert":209}],509:[function(require,module,exports){ +var assert = require("assert"); +var sourceMap = require("source-map"); +var printComments = require("./comments").printComments; +var linesModule = require("./lines"); +var fromString = linesModule.fromString; +var concat = linesModule.concat; +var normalizeOptions = require("./options").normalize; +var getReprinter = require("./patcher").getReprinter; +var types = require("./types"); +var namedTypes = types.namedTypes; +var isString = types.builtInTypes.string; +var isObject = types.builtInTypes.object; +var FastPath = require("./fast-path"); +var util = require("./util"); + +function PrintResult(code, sourceMap) { + assert.ok(this instanceof PrintResult); + + isString.assert(code); + this.code = code; + + if (sourceMap) { + isObject.assert(sourceMap); + this.map = sourceMap; + } +} + +var PRp = PrintResult.prototype; +var warnedAboutToString = false; + +PRp.toString = function() { + if (!warnedAboutToString) { + console.warn( + "Deprecation warning: recast.print now returns an object with " + + "a .code property. You appear to be treating the object as a " + + "string, which might still work but is strongly discouraged." + ); + + warnedAboutToString = true; + } + + return this.code; +}; + +var emptyPrintResult = new PrintResult(""); + +function Printer(originalOptions) { + assert.ok(this instanceof Printer); + + var explicitTabWidth = originalOptions && originalOptions.tabWidth; + var options = normalizeOptions(originalOptions); + assert.notStrictEqual(options, originalOptions); + + // It's common for client code to pass the same options into both + // recast.parse and recast.print, but the Printer doesn't need (and + // can be confused by) options.sourceFileName, so we null it out. + options.sourceFileName = null; + + function printWithComments(path) { + assert.ok(path instanceof FastPath); + return printComments(path, print); + } + + function print(path, includeComments) { + if (includeComments) + return printWithComments(path); + + assert.ok(path instanceof FastPath); + + if (!explicitTabWidth) { + var oldTabWidth = options.tabWidth; + var loc = path.getNode().loc; + if (loc && loc.lines && loc.lines.guessTabWidth) { + options.tabWidth = loc.lines.guessTabWidth(); + var lines = maybeReprint(path); + options.tabWidth = oldTabWidth; + return lines; + } + } + + return maybeReprint(path); + } + + function maybeReprint(path) { + var reprinter = getReprinter(path); + if (reprinter) + return maybeAddParens(path, reprinter(print)); + return printRootGenerically(path); + } + + // Print the root node generically, but then resume reprinting its + // children non-generically. + function printRootGenerically(path) { + return genericPrint(path, options, printWithComments); + } + + // Print the entire AST generically. + function printGenerically(path) { + return genericPrint(path, options, printGenerically); + } + + this.print = function(ast) { + if (!ast) { + return emptyPrintResult; + } + + var lines = print(FastPath.from(ast), true); + + return new PrintResult( + lines.toString(options), + util.composeSourceMaps( + options.inputSourceMap, + lines.getSourceMap( + options.sourceMapName, + options.sourceRoot + ) + ) + ); + }; + + this.printGenerically = function(ast) { + if (!ast) { + return emptyPrintResult; + } + + var path = FastPath.from(ast); + var oldReuseWhitespace = options.reuseWhitespace; + + // Do not reuse whitespace (or anything else, for that matter) + // when printing generically. + options.reuseWhitespace = false; + + // TODO Allow printing of comments? + var pr = new PrintResult(printGenerically(path).toString(options)); + options.reuseWhitespace = oldReuseWhitespace; + return pr; + }; +} + +exports.Printer = Printer; + +function maybeAddParens(path, lines) { + return path.needsParens() ? concat(["(", lines, ")"]) : lines; +} + +function genericPrint(path, options, printPath) { + assert.ok(path instanceof FastPath); + return maybeAddParens(path, genericPrintNoParens(path, options, printPath)); +} + +function genericPrintNoParens(path, options, print) { + var n = path.getValue(); + + if (!n) { + return fromString(""); + } + + if (typeof n === "string") { + return fromString(n, options); + } + + namedTypes.Printable.assert(n); + + switch (n.type) { + case "File": + return path.call(print, "program"); + + case "Program": + return maybeAddSemicolon(path.call(function(bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body")); + + case "EmptyStatement": + return fromString(""); + + case "ExpressionStatement": + return concat([path.call(print, "expression"), ";"]); + + case "BinaryExpression": + case "LogicalExpression": + case "AssignmentExpression": + return fromString(" ").join([ + path.call(print, "left"), + n.operator, + path.call(print, "right") + ]); + + case "AssignmentPattern": + return concat([ + path.call(print, "left"), + "=", + path.call(print, "right") + ]); + + case "MemberExpression": + var parts = [path.call(print, "object")]; + + var property = path.call(print, "property"); + if (n.computed) { + parts.push("[", property, "]"); + } else { + parts.push(".", property); + } + + return concat(parts); + + case "Path": + return fromString(".").join(n.body); + + case "Identifier": + return concat([ + fromString(n.name, options), + path.call(print, "typeAnnotation") + ]); + + case "SpreadElement": + case "SpreadElementPattern": + case "SpreadProperty": + case "SpreadPropertyPattern": + case "RestElement": + return concat(["...", path.call(print, "argument")]); + + case "FunctionDeclaration": + case "FunctionExpression": + var parts = []; + + if (n.async) + parts.push("async "); + + parts.push("function"); + + if (n.generator) + parts.push("*"); + + if (n.id) { + parts.push( + " ", + path.call(print, "id"), + path.call(print, "typeParameters") + ); + } + + parts.push( + "(", + printFunctionParams(path, options, print), + ")", + path.call(print, "returnType"), + " ", + path.call(print, "body") + ); + + return concat(parts); + + case "ArrowFunctionExpression": + var parts = []; + + if (n.async) + parts.push("async "); + + if (n.params.length === 1 && !n.rest) { + parts.push(path.call(print, "params", 0)); + } else { + parts.push( + "(", + printFunctionParams(path, options, print), + ")" + ); + } + + parts.push(" => ", path.call(print, "body")); + + return concat(parts); + + case "MethodDefinition": + var parts = []; + + if (n.static) { + parts.push("static "); + } + + parts.push(printMethod(path, options, print)); + + return concat(parts); + + case "YieldExpression": + var parts = ["yield"]; + + if (n.delegate) + parts.push("*"); + + if (n.argument) + parts.push(" ", path.call(print, "argument")); + + return concat(parts); + + case "AwaitExpression": + var parts = ["await"]; + + if (n.all) + parts.push("*"); + + if (n.argument) + parts.push(" ", path.call(print, "argument")); + + return concat(parts); + + case "ModuleDeclaration": + var parts = ["module", path.call(print, "id")]; + + if (n.source) { + assert.ok(!n.body); + parts.push("from", path.call(print, "source")); + } else { + parts.push(path.call(print, "body")); + } + + return fromString(" ").join(parts); + + case "ImportSpecifier": + case "ExportSpecifier": + var parts = [path.call(print, "id")]; + + if (n.name) + parts.push(" as ", path.call(print, "name")); + + return concat(parts); + + case "ExportBatchSpecifier": + return fromString("*"); + + case "ImportNamespaceSpecifier": + return concat(["* as ", path.call(print, "id")]); + + case "ImportDefaultSpecifier": + return path.call(print, "id"); + + case "ExportDeclaration": + var parts = ["export"]; + + if (n["default"]) { + parts.push(" default"); + + } else if (n.specifiers && + n.specifiers.length > 0) { + + if (n.specifiers.length === 1 && + n.specifiers[0].type === "ExportBatchSpecifier") { + parts.push(" *"); + } else { + parts.push( + " { ", + fromString(", ").join(path.map(print, "specifiers")), + " }" + ); + } + + if (n.source) + parts.push(" from ", path.call(print, "source")); + + parts.push(";"); + + return concat(parts); + } + + if (n.declaration) { + if (!namedTypes.Node.check(n.declaration)) { + console.log(JSON.stringify(n, null, 2)); + } + var decLines = path.call(print, "declaration"); + parts.push(" ", decLines); + if (lastNonSpaceCharacter(decLines) !== ";") { + parts.push(";"); + } + } + + return concat(parts); + + case "ImportDeclaration": + var parts = ["import "]; + + if (n.specifiers && + n.specifiers.length > 0) { + + var foundImportSpecifier = false; + + path.each(function(specifierPath) { + var i = specifierPath.getName(); + if (i > 0) { + parts.push(", "); + } + + var value = specifierPath.getValue(); + + if (namedTypes.ImportDefaultSpecifier.check(value) || + namedTypes.ImportNamespaceSpecifier.check(value)) { + assert.strictEqual(foundImportSpecifier, false); + } else { + namedTypes.ImportSpecifier.assert(value); + if (!foundImportSpecifier) { + foundImportSpecifier = true; + parts.push("{"); + } + } + + parts.push(print(specifierPath)); + }, "specifiers"); + + if (foundImportSpecifier) { + parts.push("}"); + } + + parts.push(" from "); + } + + parts.push(path.call(print, "source"), ";"); + + return concat(parts); + + case "BlockStatement": + var naked = path.call(function(bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body"); + + if (naked.isEmpty()) { + return fromString("{}"); + } + + return concat([ + "{\n", + naked.indent(options.tabWidth), + "\n}" + ]); + + case "ReturnStatement": + var parts = ["return"]; + + if (n.argument) { + var argLines = path.call(print, "argument"); + if (argLines.length > 1 && + (namedTypes.XJSElement && + namedTypes.XJSElement.check(n.argument) || + namedTypes.JSXElement && + namedTypes.JSXElement.check(n.argument))) { + parts.push( + " (\n", + argLines.indent(options.tabWidth), + "\n)" + ); + } else { + parts.push(" ", argLines); + } + } + + parts.push(";"); + + return concat(parts); + + case "CallExpression": + return concat([ + path.call(print, "callee"), + printArgumentsList(path, options, print) + ]); + + case "ObjectExpression": + case "ObjectPattern": + case "ObjectTypeAnnotation": + var allowBreak = false; + var isTypeAnnotation = n.type === "ObjectTypeAnnotation"; + var separator = isTypeAnnotation ? ';' : ','; + var fields = []; + + if (isTypeAnnotation) { + fields.push("indexers", "callProperties"); + } + + fields.push("properties"); + + var len = 0; + fields.forEach(function(field) { + len += n[field].length; + }); + + var oneLine = (isTypeAnnotation && len === 1) || len === 0; + var parts = [oneLine ? "{" : "{\n"]; + + fields.forEach(function(field) { + path.map(function(childPath) { + var i = childPath.getName(); + var lines = print(childPath); + + if (!oneLine) { + lines = lines.indent(options.tabWidth); + } + + var multiLine = !isTypeAnnotation && lines.length > 1; + if (multiLine && allowBreak) { + // Similar to the logic for BlockStatement. + parts.push("\n"); + } + + parts.push(lines); + + if (i < len - 1) { + // Add an extra line break if the previous object property + // had a multi-line value. + parts.push(separator + (multiLine ? "\n\n" : "\n")); + allowBreak = !multiLine; + } else if (len !== 1 && isTypeAnnotation) { + parts.push(separator); + } else if (options.trailingComma) { + parts.push(separator); + } + }, field); + }); + + parts.push(oneLine ? "}" : "\n}"); + + return concat(parts); + + case "PropertyPattern": + return concat([ + path.call(print, "key"), + ": ", + path.call(print, "pattern") + ]); + + case "Property": // Non-standard AST node type. + if (n.method || n.kind === "get" || n.kind === "set") { + return printMethod(path, options, print); + } + + var key = path.call(print, "key"); + if (n.computed) { + key = concat(["[", key, "]"]); + } + + if (n.shorthand) { + return key; + } + + return concat([key, ": ", path.call(print, "value")]); + + case "ArrayExpression": + case "ArrayPattern": + var elems = n.elements, + len = elems.length; + + var printed = path.map(print, "elements"); + var joined = fromString(", ").join(printed); + var oneLine = joined.getLineLength(1) <= options.wrapColumn; + var parts = [oneLine ? "[" : "[\n"]; + + path.each(function(elemPath) { + var i = elemPath.getName(); + var elem = elemPath.getValue(); + if (!elem) { + // If the array expression ends with a hole, that hole + // will be ignored by the interpreter, but if it ends with + // two (or more) holes, we need to write out two (or more) + // commas so that the resulting code is interpreted with + // both (all) of the holes. + parts.push(","); + } else { + var lines = printed[i]; + if (oneLine) { + if (i > 0) + parts.push(" "); + } else { + lines = lines.indent(options.tabWidth); + } + parts.push(lines); + if (i < len - 1 || (!oneLine && options.trailingComma)) + parts.push(","); + if (!oneLine) + parts.push("\n"); + } + }, "elements"); + + parts.push("]"); + + return concat(parts); + + case "SequenceExpression": + return fromString(", ").join(path.map(print, "expressions")); + + case "ThisExpression": + return fromString("this"); + + case "Literal": + if (typeof n.value !== "string") + return fromString(n.value, options); + + // intentionally fall through... + + case "ModuleSpecifier": + return fromString(nodeStr(n.value, options), options); + + case "UnaryExpression": + var parts = [n.operator]; + if (/[a-z]$/.test(n.operator)) + parts.push(" "); + parts.push(path.call(print, "argument")); + return concat(parts); + + case "UpdateExpression": + var parts = [path.call(print, "argument"), n.operator]; + + if (n.prefix) + parts.reverse(); + + return concat(parts); + + case "ConditionalExpression": + return concat([ + "(", path.call(print, "test"), + " ? ", path.call(print, "consequent"), + " : ", path.call(print, "alternate"), ")" + ]); + + case "NewExpression": + var parts = ["new ", path.call(print, "callee")]; + var args = n.arguments; + if (args) { + parts.push(printArgumentsList(path, options, print)); + } + + return concat(parts); + + case "VariableDeclaration": + var parts = [n.kind, " "]; + var maxLen = 0; + var printed = path.map(function(childPath) { + var lines = print(childPath); + maxLen = Math.max(lines.length, maxLen); + return lines; + }, "declarations"); + + if (maxLen === 1) { + parts.push(fromString(", ").join(printed)); + } else if (printed.length > 1 ) { + parts.push( + fromString(",\n").join(printed) + .indentTail(n.kind.length + 1) + ); + } else { + parts.push(printed[0]); + } + + // We generally want to terminate all variable declarations with a + // semicolon, except when they are children of for loops. + var parentNode = path.getParentNode(); + if (!namedTypes.ForStatement.check(parentNode) && + !namedTypes.ForInStatement.check(parentNode) && + !(namedTypes.ForOfStatement && + namedTypes.ForOfStatement.check(parentNode))) { + parts.push(";"); + } + + return concat(parts); + + case "VariableDeclarator": + return n.init ? fromString(" = ").join([ + path.call(print, "id"), + path.call(print, "init") + ]) : path.call(print, "id"); + + case "WithStatement": + return concat([ + "with (", + path.call(print, "object"), + ") ", + path.call(print, "body") + ]); + + case "IfStatement": + var con = adjustClause(path.call(print, "consequent"), options), + parts = ["if (", path.call(print, "test"), ")", con]; + + if (n.alternate) + parts.push( + endsWithBrace(con) ? " else" : "\nelse", + adjustClause(path.call(print, "alternate"), options)); + + return concat(parts); + + case "ForStatement": + // TODO Get the for (;;) case right. + var init = path.call(print, "init"), + sep = init.length > 1 ? ";\n" : "; ", + forParen = "for (", + indented = fromString(sep).join([ + init, + path.call(print, "test"), + path.call(print, "update") + ]).indentTail(forParen.length), + head = concat([forParen, indented, ")"]), + clause = adjustClause(path.call(print, "body"), options), + parts = [head]; + + if (head.length > 1) { + parts.push("\n"); + clause = clause.trimLeft(); + } + + parts.push(clause); + + return concat(parts); + + case "WhileStatement": + return concat([ + "while (", + path.call(print, "test"), + ")", + adjustClause(path.call(print, "body"), options) + ]); + + case "ForInStatement": + // Note: esprima can't actually parse "for each (". + return concat([ + n.each ? "for each (" : "for (", + path.call(print, "left"), + " in ", + path.call(print, "right"), + ")", + adjustClause(path.call(print, "body"), options) + ]); + + case "ForOfStatement": + return concat([ + "for (", + path.call(print, "left"), + " of ", + path.call(print, "right"), + ")", + adjustClause(path.call(print, "body"), options) + ]); + + case "DoWhileStatement": + var doBody = concat([ + "do", + adjustClause(path.call(print, "body"), options) + ]), parts = [doBody]; + + if (endsWithBrace(doBody)) + parts.push(" while"); + else + parts.push("\nwhile"); + + parts.push(" (", path.call(print, "test"), ");"); + + return concat(parts); + + case "BreakStatement": + var parts = ["break"]; + if (n.label) + parts.push(" ", path.call(print, "label")); + parts.push(";"); + return concat(parts); + + case "ContinueStatement": + var parts = ["continue"]; + if (n.label) + parts.push(" ", path.call(print, "label")); + parts.push(";"); + return concat(parts); + + case "LabeledStatement": + return concat([ + path.call(print, "label"), + ":\n", + path.call(print, "body") + ]); + + case "TryStatement": + var parts = [ + "try ", + path.call(print, "block") + ]; + + if (n.handler) { + parts.push(" ", path.call(print, "handler")); + } else if (n.handlers) { + path.each(function(handlerPath) { + parts.push(" ", print(handlerPath)); + }, "handlers"); + } + + if (n.finalizer) { + parts.push(" finally ", path.call(print, "finalizer")); + } + + return concat(parts); + + case "CatchClause": + var parts = ["catch (", path.call(print, "param")]; + + if (n.guard) + // Note: esprima does not recognize conditional catch clauses. + parts.push(" if ", path.call(print, "guard")); + + parts.push(") ", path.call(print, "body")); + + return concat(parts); + + case "ThrowStatement": + return concat(["throw ", path.call(print, "argument"), ";"]); + + case "SwitchStatement": + return concat([ + "switch (", + path.call(print, "discriminant"), + ") {\n", + fromString("\n").join(path.map(print, "cases")), + "\n}" + ]); + + // Note: ignoring n.lexical because it has no printing consequences. + + case "SwitchCase": + var parts = []; + + if (n.test) + parts.push("case ", path.call(print, "test"), ":"); + else + parts.push("default:"); + + if (n.consequent.length > 0) { + parts.push("\n", path.call(function(consequentPath) { + return printStatementSequence(consequentPath, options, print); + }, "consequent").indent(options.tabWidth)); + } + + return concat(parts); + + case "DebuggerStatement": + return fromString("debugger;"); + + // JSX extensions below. + + case "XJSAttribute": + case "JSXAttribute": + var parts = [path.call(print, "name")]; + if (n.value) + parts.push("=", path.call(print, "value")); + return concat(parts); + + case "XJSIdentifier": + case "JSXIdentifier": + return fromString(n.name, options); + + case "XJSNamespacedName": + case "JSXNamespacedName": + return fromString(":").join([ + path.call(print, "namespace"), + path.call(print, "name") + ]); + + case "XJSMemberExpression": + case "JSXMemberExpression": + return fromString(".").join([ + path.call(print, "object"), + path.call(print, "property") + ]); + + case "XJSSpreadAttribute": + case "JSXSpreadAttribute": + return concat(["{...", path.call(print, "argument"), "}"]); + + case "XJSExpressionContainer": + case "JSXExpressionContainer": + return concat(["{", path.call(print, "expression"), "}"]); + + case "XJSElement": + case "JSXElement": + var openingLines = path.call(print, "openingElement"); + + if (n.openingElement.selfClosing) { + assert.ok(!n.closingElement); + return openingLines; + } + + var childLines = concat( + path.map(function(childPath) { + var child = childPath.getValue(); + + if (namedTypes.Literal.check(child) && + typeof child.value === "string") { + if (/\S/.test(child.value)) { + return child.value.replace(/^\s+|\s+$/g, ""); + } else if (/\n/.test(child.value)) { + return "\n"; + } + } + + return print(childPath); + }, "children") + ).indentTail(options.tabWidth); + + var closingLines = path.call(print, "closingElement"); + + return concat([ + openingLines, + childLines, + closingLines + ]); + + case "XJSOpeningElement": + case "JSXOpeningElement": + var parts = ["<", path.call(print, "name")]; + var attrParts = []; + + path.each(function(attrPath) { + attrParts.push(" ", print(attrPath)); + }, "attributes"); + + var attrLines = concat(attrParts); + + var needLineWrap = ( + attrLines.length > 1 || + attrLines.getLineLength(1) > options.wrapColumn + ); + + if (needLineWrap) { + attrParts.forEach(function(part, i) { + if (part === " ") { + assert.strictEqual(i % 2, 0); + attrParts[i] = "\n"; + } + }); + + attrLines = concat(attrParts).indentTail(options.tabWidth); + } + + parts.push(attrLines, n.selfClosing ? " />" : ">"); + + return concat(parts); + + case "XJSClosingElement": + case "JSXClosingElement": + return concat([""]); + + case "XJSText": + case "JSXText": + return fromString(n.value, options); + + case "XJSEmptyExpression": + case "JSXEmptyExpression": + return fromString(""); + + case "TypeAnnotatedIdentifier": + return concat([ + path.call(print, "annotation"), + " ", + path.call(print, "identifier") + ]); + + case "ClassBody": + if (n.body.length === 0) { + return fromString("{}"); + } + + return concat([ + "{\n", + path.call(function(bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body").indent(options.tabWidth), + "\n}" + ]); + + case "ClassPropertyDefinition": + var parts = ["static ", path.call(print, "definition")]; + if (!namedTypes.MethodDefinition.check(n.definition)) + parts.push(";"); + return concat(parts); + + case "ClassProperty": + return concat([ + path.call(print, "key"), + path.call(print, "typeAnnotation"), + ";" + ]); + + case "ClassDeclaration": + case "ClassExpression": + var parts = ["class"]; + + if (n.id) { + parts.push( + " ", + path.call(print, "id"), + path.call(print, "typeParameters") + ); + } + + if (n.superClass) { + parts.push( + " extends ", + path.call(print, "superClass"), + path.call(print, "superTypeParameters") + ); + } + + if (n["implements"]) { + parts.push( + " implements ", + fromString(", ").join(path.map(print, "implements")) + ); + } + + parts.push(" ", path.call(print, "body")); + + return concat(parts); + + // These types are unprintable because they serve as abstract + // supertypes for other (printable) types. + case "Node": + case "Printable": + case "SourceLocation": + case "Position": + case "Statement": + case "Function": + case "Pattern": + case "Expression": + case "Declaration": + case "Specifier": + case "NamedSpecifier": + case "Comment": // Supertype of Block and Line. + case "MemberTypeAnnotation": // Flow + case "TupleTypeAnnotation": // Flow + case "Type": // Flow + throw new Error("unprintable type: " + JSON.stringify(n.type)); + + case "Block": // Block comment. + return concat(["/*", fromString(n.value, options), "*/"]); + + case "Line": // Line comment. + return concat(["//", fromString(n.value, options)]); + + // Type Annotations for Facebook Flow, typically stripped out or + // transformed away before printing. + case "TypeAnnotation": + var parts = []; + + if (n.typeAnnotation) { + if (n.typeAnnotation.type !== "FunctionTypeAnnotation") { + parts.push(": "); + } + parts.push(path.call(print, "typeAnnotation")); + return concat(parts); + } + + return fromString(""); + + case "AnyTypeAnnotation": + return fromString("any", options); + + case "ArrayTypeAnnotation": + return concat([ + path.call(print, "elementType"), + "[]" + ]); + + case "BooleanTypeAnnotation": + return fromString("boolean", options); + + case "DeclareClass": + return concat([ + fromString("declare class ", options), + path.call(print, "id"), + " ", + path.call(print, "body"), + ]); + + case "DeclareFunction": + return concat([ + fromString("declare function ", options), + path.call(print, "id") + ]); + + case "DeclareModule": + return concat([ + fromString("declare module ", options), + path.call(print, "id"), + " ", + path.call(print, "body"), + ]); + + case "DeclareVariable": + return concat([ + fromString("declare var ", options), + path.call(print, "id") + ]); + + case "FunctionTypeAnnotation": + // FunctionTypeAnnotation is ambiguous: + // declare function(a: B): void; OR + // var A: (a: B) => void; + var parts = []; + var parent = path.getParentNode(0); + var isArrowFunctionTypeAnnotation = !( + namedTypes.ObjectTypeCallProperty.check(parent) || + namedTypes.DeclareFunction.check(path.getParentNode(2)) + ); + + var needsColon = + isArrowFunctionTypeAnnotation && + !namedTypes.FunctionTypeParam.check(parent); + + if (needsColon) { + parts.push(": "); + } + + parts.push( + "(", + fromString(", ").join(path.map(print, "params")), + ")" + ); + + // The returnType is not wrapped in a TypeAnnotation, so the colon + // needs to be added separately. + if (n.returnType) { + parts.push( + isArrowFunctionTypeAnnotation ? " => " : ": ", + path.call(print, "returnType") + ); + } + + return concat(parts); + + case "FunctionTypeParam": + return concat([ + path.call(print, "name"), + ": ", + path.call(print, "typeAnnotation"), + ]); + + case "GenericTypeAnnotation": + return concat([ + path.call(print, "id"), + path.call(print, "typeParameters") + ]); + + case "InterfaceDeclaration": + var parts = [ + fromString("interface ", options), + path.call(print, "id"), + path.call(print, "typeParameters"), + " " + ]; + + if (n["extends"]) { + parts.push( + "extends ", + fromString(", ").join(path.map(print, "extends")) + ); + } + + parts.push(path.call(print, "body")); + + return concat(parts); + + case "ClassImplements": + case "InterfaceExtends": + return concat([ + path.call(print, "id"), + path.call(print, "typeParameters") + ]); + + case "IntersectionTypeAnnotation": + return fromString(" & ").join(path.map(print, "types")); + + case "NullableTypeAnnotation": + return concat([ + "?", + path.call(print, "typeAnnotation") + ]); + + case "NumberTypeAnnotation": + return fromString("number", options); + + case "ObjectTypeCallProperty": + return path.call(print, "value"); + + case "ObjectTypeIndexer": + return concat([ + "[", + path.call(print, "id"), + ": ", + path.call(print, "key"), + "]: ", + path.call(print, "value") + ]); + + case "ObjectTypeProperty": + return concat([ + path.call(print, "key"), + ": ", + path.call(print, "value") + ]); + + case "QualifiedTypeIdentifier": + return concat([ + path.call(print, "qualification"), + ".", + path.call(print, "id") + ]); + + case "StringLiteralTypeAnnotation": + return fromString(nodeStr(n.value, options), options); + + case "StringTypeAnnotation": + return fromString("string", options); + + case "TypeAlias": + return concat([ + "type ", + path.call(print, "id"), + " = ", + path.call(print, "right") + ]); + + case "TypeCastExpression": + return concat([ + "(", + path.call(print, "expression"), + path.call(print, "typeAnnotation"), + ")" + ]); + + case "TypeParameterDeclaration": + case "TypeParameterInstantiation": + return concat([ + "<", + fromString(", ").join(path.map(print, "params")), + ">" + ]); + + case "TypeofTypeAnnotation": + return concat([ + fromString("typeof ", options), + path.call(print, "argument") + ]); + + case "UnionTypeAnnotation": + return fromString(" | ").join(path.map(print, "types")); + + case "VoidTypeAnnotation": + return fromString("void", options); + + // Unhandled types below. If encountered, nodes of these types should + // be either left alone or desugared into AST types that are fully + // supported by the pretty-printer. + case "ClassHeritage": // TODO + case "ComprehensionBlock": // TODO + case "ComprehensionExpression": // TODO + case "Glob": // TODO + case "TaggedTemplateExpression": // TODO + case "TemplateElement": // TODO + case "TemplateLiteral": // TODO + case "GeneratorExpression": // TODO + case "LetStatement": // TODO + case "LetExpression": // TODO + case "GraphExpression": // TODO + case "GraphIndexExpression": // TODO + + // XML types that nobody cares about or needs to print. + case "XMLDefaultDeclaration": + case "XMLAnyName": + case "XMLQualifiedIdentifier": + case "XMLFunctionQualifiedIdentifier": + case "XMLAttributeSelector": + case "XMLFilterExpression": + case "XML": + case "XMLElement": + case "XMLList": + case "XMLEscape": + case "XMLText": + case "XMLStartTag": + case "XMLEndTag": + case "XMLPointTag": + case "XMLName": + case "XMLAttribute": + case "XMLCdata": + case "XMLComment": + case "XMLProcessingInstruction": + default: + debugger; + throw new Error("unknown type: " + JSON.stringify(n.type)); + } + + return p; +} + +function printStatementSequence(path, options, print) { + var inClassBody = + namedTypes.ClassBody && + namedTypes.ClassBody.check(path.getParentNode()); + + var filtered = []; + path.each(function(stmtPath) { + var i = stmtPath.getName(); + var stmt = stmtPath.getValue(); + + // Just in case the AST has been modified to contain falsy + // "statements," it's safer simply to skip them. + if (!stmt) { + return; + } + + // Skip printing EmptyStatement nodes to avoid leaving stray + // semicolons lying around. + if (stmt.type === "EmptyStatement") { + return; + } + + if (!inClassBody) { + namedTypes.Statement.assert(stmt); + } + + // We can't hang onto stmtPath outside of this function, because + // it's just a reference to a mutable FastPath object, so we have + // to go ahead and print it here. + filtered.push({ + node: stmt, + printed: print(stmtPath) + }); + }); + + var prevTrailingSpace = null; + var len = filtered.length; + var parts = []; + + filtered.forEach(function(info, i) { + var printed = info.printed; + var stmt = info.node; + var needSemicolon = true; + var multiLine = printed.length > 1; + var notFirst = i > 0; + var notLast = i < len - 1; + var leadingSpace; + var trailingSpace; + + if (inClassBody) { + if (namedTypes.MethodDefinition.check(stmt) || + (namedTypes.ClassPropertyDefinition.check(stmt) && + namedTypes.MethodDefinition.check(stmt.definition))) { + needSemicolon = false; + } + } + + if (needSemicolon) { + // Try to add a semicolon to anything that isn't a method in a + // class body. + printed = maybeAddSemicolon(printed); + } + + var trueLoc = options.reuseWhitespace && util.getTrueLoc(stmt); + var lines = trueLoc && trueLoc.lines; + + if (notFirst) { + if (lines) { + var beforeStart = lines.skipSpaces(trueLoc.start, true); + var beforeStartLine = beforeStart ? beforeStart.line : 1; + var leadingGap = trueLoc.start.line - beforeStartLine; + leadingSpace = Array(leadingGap + 1).join("\n"); + } else { + leadingSpace = multiLine ? "\n\n" : "\n"; + } + } else { + leadingSpace = ""; + } + + if (notLast) { + if (lines) { + var afterEnd = lines.skipSpaces(trueLoc.end); + var afterEndLine = afterEnd ? afterEnd.line : lines.length; + var trailingGap = afterEndLine - trueLoc.end.line; + trailingSpace = Array(trailingGap + 1).join("\n"); + } else { + trailingSpace = multiLine ? "\n\n" : "\n"; + } + } else { + trailingSpace = ""; + } + + parts.push( + maxSpace(prevTrailingSpace, leadingSpace), + printed + ); + + if (notLast) { + prevTrailingSpace = trailingSpace; + } else if (trailingSpace) { + parts.push(trailingSpace); + } + }); + + return concat(parts); +} + +function maxSpace(s1, s2) { + if (!s1 && !s2) { + return fromString(""); + } + + if (!s1) { + return fromString(s2); + } + + if (!s2) { + return fromString(s1); + } + + var spaceLines1 = fromString(s1); + var spaceLines2 = fromString(s2); + + if (spaceLines2.length > spaceLines1.length) { + return spaceLines2; + } + + return spaceLines1; +} + +function printMethod(path, options, print) { + var node = path.getNode(); + var kind = node.kind; + var parts = []; + + namedTypes.FunctionExpression.assert(node.value); + + if (node.value.async) { + parts.push("async "); + } + + if (!kind || kind === "init") { + if (node.value.generator) { + parts.push("*"); + } + } else { + assert.ok(kind === "get" || kind === "set"); + parts.push(kind, " "); + } + + var key = path.call(print, "key"); + if (node.computed) { + key = concat(["[", key, "]"]); + } + + parts.push( + key, + path.call(print, "value", "typeParameters"), + "(", + path.call(function(valuePath) { + return printFunctionParams(valuePath, options, print); + }, "value"), + ")", + path.call(print, "value", "returnType"), + " ", + path.call(print, "value", "body") + ); + + return concat(parts); +} + +function printArgumentsList(path, options, print) { + var printed = path.map(print, "arguments"); + + var joined = fromString(", ").join(printed); + if (joined.getLineLength(1) > options.wrapColumn) { + joined = fromString(",\n").join(printed); + return concat([ + "(\n", + joined.indent(options.tabWidth), + options.trailingComma ? ",\n)" : "\n)" + ]); + } + + return concat(["(", joined, ")"]); +} + +function printFunctionParams(path, options, print) { + var fun = path.getValue(); + namedTypes.Function.assert(fun); + + var printed = path.map(print, "params"); + + if (fun.defaults) { + path.each(function(defExprPath) { + var i = defExprPath.getName(); + var p = printed[i]; + if (p && defExprPath.getValue()) { + printed[i] = concat([p, "=", print(defExprPath)]); + } + }, "defaults"); + } + + if (fun.rest) { + printed.push(concat(["...", path.call(print, "rest")])); + } + + var joined = fromString(", ").join(printed); + if (joined.length > 1 || + joined.getLineLength(1) > options.wrapColumn) { + joined = fromString(",\n").join(printed); + if (options.trailingComma && !fun.rest) { + joined = concat([joined, ",\n"]); + } + return concat(["\n", joined.indent(options.tabWidth)]); + } + + return joined; +} + +function adjustClause(clause, options) { + if (clause.length > 1) + return concat([" ", clause]); + + return concat([ + "\n", + maybeAddSemicolon(clause).indent(options.tabWidth) + ]); +} + +function lastNonSpaceCharacter(lines) { + var pos = lines.lastPos(); + do { + var ch = lines.charAt(pos); + if (/\S/.test(ch)) + return ch; + } while (lines.prevPos(pos)); +} + +function endsWithBrace(lines) { + return lastNonSpaceCharacter(lines) === "}"; +} + +function swapQuotes(str) { + return str.replace(/['"]/g, function(m) { + return m === '"' ? '\'' : '"'; + }); +} + +function nodeStr(str, options) { + isString.assert(str); + switch (options.quote) { + case "auto": + var double = JSON.stringify(str); + var single = swapQuotes(JSON.stringify(swapQuotes(str))); + return double.length > single.length ? single : double; + case "single": + return swapQuotes(JSON.stringify(swapQuotes(str))); + case "double": + default: + return JSON.stringify(str); + } +} + +function maybeAddSemicolon(lines) { + var eoc = lastNonSpaceCharacter(lines); + if (!eoc || "\n};".indexOf(eoc) < 0) + return concat([lines, ";"]); + return lines; +} + +},{"./comments":502,"./fast-path":503,"./lines":504,"./options":506,"./patcher":508,"./types":510,"./util":511,"assert":209,"source-map":526}],510:[function(require,module,exports){ +var types = require("ast-types"); +var def = types.Type.def; + +def("File") + .bases("Node") + .build("program") + .field("program", def("Program")); + +types.finalize(); + +module.exports = types; + +},{"ast-types":191}],511:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var getFieldValue = types.getFieldValue; +var n = types.namedTypes; +var sourceMap = require("source-map"); +var SourceMapConsumer = sourceMap.SourceMapConsumer; +var SourceMapGenerator = sourceMap.SourceMapGenerator; +var hasOwn = Object.prototype.hasOwnProperty; + +function getUnionOfKeys() { + var result = {}; + var argc = arguments.length; + for (var i = 0; i < argc; ++i) { + var keys = Object.keys(arguments[i]); + var keyCount = keys.length; + for (var j = 0; j < keyCount; ++j) { + result[keys[j]] = true; + } + } + return result; +} +exports.getUnionOfKeys = getUnionOfKeys; + +function comparePos(pos1, pos2) { + return (pos1.line - pos2.line) || (pos1.column - pos2.column); +} +exports.comparePos = comparePos; + +function copyPos(pos) { + return { + line: pos.line, + column: pos.column + }; +} +exports.copyPos = copyPos; + +exports.composeSourceMaps = function(formerMap, latterMap) { + if (formerMap) { + if (!latterMap) { + return formerMap; + } + } else { + return latterMap || null; + } + + var smcFormer = new SourceMapConsumer(formerMap); + var smcLatter = new SourceMapConsumer(latterMap); + var smg = new SourceMapGenerator({ + file: latterMap.file, + sourceRoot: latterMap.sourceRoot + }); + + var sourcesToContents = {}; + + smcLatter.eachMapping(function(mapping) { + var origPos = smcFormer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + + var sourceName = origPos.source; + if (sourceName === null) { + return; + } + + smg.addMapping({ + source: sourceName, + original: copyPos(origPos), + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + }, + name: mapping.name + }); + + var sourceContent = smcFormer.sourceContentFor(sourceName); + if (sourceContent && !hasOwn.call(sourcesToContents, sourceName)) { + sourcesToContents[sourceName] = sourceContent; + smg.setSourceContent(sourceName, sourceContent); + } + }); + + return smg.toJSON(); +}; + +exports.getTrueLoc = function(node) { + // It's possible that node is newly-created (not parsed by Esprima), + // in which case it probably won't have a .loc property (or an + // .original property for that matter). That's fine; we'll just + // pretty-print it as usual. + if (!node.loc) { + return null; + } + + if (!node.comments) { + // If the node has no comments, regard node.loc as true. + return node.loc; + } + + var start = node.loc.start; + var end = node.loc.end; + + // If the node has any comments, their locations might contribute to + // the true start/end positions of the node. + node.comments.forEach(function(comment) { + if (comment.loc) { + if (comparePos(comment.loc.start, start) < 0) { + start = comment.loc.start; + } + + if (comparePos(end, comment.loc.end) < 0) { + end = comment.loc.end; + } + } + }); + + return { + lines: node.loc.lines, + start: start, + end: end + }; +}; + +exports.fixFaultyLocations = function(node) { + if ((n.MethodDefinition && n.MethodDefinition.check(node)) || + (n.Property.check(node) && (node.method || node.shorthand))) { + // If the node is a MethodDefinition or a .method or .shorthand + // Property, then the location information stored in + // node.value.loc is very likely untrustworthy (just the {body} + // part of a method, or nothing in the case of shorthand + // properties), so we null out that information to prevent + // accidental reuse of bogus source code during reprinting. + node.value.loc = null; + + if (n.FunctionExpression.check(node.value)) { + // FunctionExpression method values should be anonymous, + // because their .id fields are ignored anyway. + node.value.id = null; + } + } + + var loc = node.loc; + if (loc) { + if (loc.start.line < 1) { + loc.start.line = 1; + } + + if (loc.end.line < 1) { + loc.end.line = 1; + } + } +}; + +},{"./types":510,"assert":209,"source-map":526}],512:[function(require,module,exports){ +(function (process){ +var types = require("./lib/types"); +var parse = require("./lib/parser").parse; +var Printer = require("./lib/printer").Printer; + +function print(node, options) { + return new Printer(options).print(node); +} + +function prettyPrint(node, options) { + return new Printer(options).printGenerically(node); +} + +function run(transformer, options) { + return runFile(process.argv[2], transformer, options); +} + +function runFile(path, transformer, options) { + require("fs").readFile(path, "utf-8", function(err, code) { + if (err) { + console.error(err); + return; + } + + runString(code, transformer, options); + }); +} + +function defaultWriteback(output) { + process.stdout.write(output); +} + +function runString(code, transformer, options) { + var writeback = options && options.writeback || defaultWriteback; + transformer(parse(code, options), function(node) { + writeback(print(node, options).code); + }); +} + +Object.defineProperties(exports, { + /** + * Parse a string of code into an augmented syntax tree suitable for + * arbitrary modification and reprinting. + */ + parse: { + enumerable: true, + value: parse + }, + + /** + * Traverse and potentially modify an abstract syntax tree using a + * convenient visitor syntax: + * + * recast.visit(ast, { + * names: [], + * visitIdentifier: function(path) { + * var node = path.value; + * this.visitor.names.push(node.name); + * this.traverse(path); + * } + * }); + */ + visit: { + enumerable: true, + value: types.visit + }, + + /** + * Reprint a modified syntax tree using as much of the original source + * code as possible. + */ + print: { + enumerable: true, + value: print + }, + + /** + * Print without attempting to reuse any original source code. + */ + prettyPrint: { + enumerable: false, + value: prettyPrint + }, + + /** + * Customized version of require("ast-types"). + */ + types: { + enumerable: false, + value: types + }, + + /** + * Convenient command-line interface (see e.g. example/add-braces). + */ + run: { + enumerable: false, + value: run + } +}); + +}).call(this,require('_process')) +},{"./lib/parser":507,"./lib/printer":509,"./lib/types":510,"_process":219,"fs":208}],513:[function(require,module,exports){ +(function (process){ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end, opts) { + write = write || function (data) { this.queue(data) } + end = end || function () { this.queue(null) } + + var ended = false, destroyed = false, buffer = [], _ended = false + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false + +// stream.autoPause = !(opts && opts.autoPause === false) + stream.autoDestroy = !(opts && opts.autoDestroy === false) + + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = stream.push = function (data) { +// console.error(ended) + if(_ended) return stream + if(data === null) _ended = true + buffer.push(data) + drain() + return stream + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable && stream.autoDestroy) + process.nextTick(function () { + stream.destroy() + }) + }) + + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable && stream.autoDestroy) + stream.destroy() + } + + stream.end = function (data) { + if(ended) return + ended = true + if(arguments.length) stream.write(data) + _end() // will emit or queue + return stream + } + + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + return stream + } + + stream.pause = function () { + if(stream.paused) return + stream.paused = true + return stream + } + + stream.resume = function () { + if(stream.paused) { + stream.paused = false + stream.emit('resume') + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + return stream + } + return stream +} + + +}).call(this,require('_process')) +},{"_process":219,"stream":231}],514:[function(require,module,exports){ +(function (process,global){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +!(function(global) { + "use strict"; + + var hasOwn = Object.prototype.hasOwnProperty; + var undefined; // More compressible than void 0. + var iteratorSymbol = + typeof Symbol === "function" && Symbol.iterator || "@@iterator"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided, then outerFn.prototype instanceof Generator. + var generator = Object.create((outerFn || Generator).prototype); + + generator._invoke = makeInvokeMethod( + innerFn, self || null, + new Context(tryLocsList || []) + ); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + genFun.__proto__ = GeneratorFunctionPrototype; + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `value instanceof AwaitArgument` to determine if the yielded value is + // meant to be awaited. Some may consider the name of this method too + // cutesy, but they are curmudgeons. + runtime.awrap = function(arg) { + return new AwaitArgument(arg); + }; + + function AwaitArgument(arg) { + this.arg = arg; + } + + function AsyncIterator(generator) { + // This invoke function is written in a style that assumes some + // calling function (or Promise) will handle exceptions. + function invoke(method, arg) { + var result = generator[method](arg); + var value = result.value; + return value instanceof AwaitArgument + ? Promise.resolve(value.arg).then(invokeNext, invokeThrow) + : Promise.resolve(value).then(function(unwrapped) { + result.value = unwrapped; + return result; + }, invokeThrow); + } + + if (typeof process === "object" && process.domain) { + invoke = process.domain.bind(invoke); + } + + var invokeNext = invoke.bind(generator, "next"); + var invokeThrow = invoke.bind(generator, "throw"); + var invokeReturn = invoke.bind(generator, "return"); + var previousPromise; + + function enqueue(method, arg) { + var enqueueResult = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then(function() { + return invoke(method, arg); + }) : new Promise(function(resolve) { + resolve(invoke(method, arg)); + }); + + // Avoid propagating enqueueResult failures to Promises returned by + // later invocations of the iterator, and call generator.return() to + // allow the generator a chance to clean up. + previousPromise = enqueueResult["catch"](invokeReturn); + + return enqueueResult; + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + while (true) { + var delegate = context.delegate; + if (delegate) { + if (method === "return" || + (method === "throw" && delegate.iterator[method] === undefined)) { + // A return or throw (when the delegate iterator has no throw + // method) always terminates the yield* loop. + context.delegate = null; + + // If the delegate iterator has a return method, give it a + // chance to clean up. + var returnMethod = delegate.iterator["return"]; + if (returnMethod) { + var record = tryCatch(returnMethod, delegate.iterator, arg); + if (record.type === "throw") { + // If the return method threw an exception, let that + // exception prevail over the original return or throw. + method = "throw"; + arg = record.arg; + continue; + } + } + + if (method === "return") { + // Continue with the outer return, now that the delegate + // iterator has been terminated. + continue; + } + } + + var record = tryCatch( + delegate.iterator[method], + delegate.iterator, + arg + ); + + if (record.type === "throw") { + context.delegate = null; + + // Like returning generator.throw(uncaught), but without the + // overhead of an extra function call. + method = "throw"; + arg = record.arg; + continue; + } + + // Delegate generator ran and handled its own exceptions so + // regardless of what the method was, we continue as if it is + // "next" with an undefined arg. + method = "next"; + arg = undefined; + + var info = record.arg; + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + } else { + state = GenStateSuspendedYield; + return info; + } + + context.delegate = null; + } + + if (method === "next") { + if (state === GenStateSuspendedYield) { + context.sent = arg; + } else { + delete context.sent; + } + + } else if (method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw arg; + } + + if (context.dispatchException(arg)) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + method = "next"; + arg = undefined; + } + + } else if (method === "return") { + context.abrupt("return", arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + var info = { + value: record.arg, + done: context.done + }; + + if (record.arg === ContinueSentinel) { + if (context.delegate && method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + arg = undefined; + } + } else { + return info; + } + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(arg) call above. + method = "throw"; + arg = record.arg; + } + } + }; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function() { + this.prev = 0; + this.next = 0; + this.sent = undefined; + this.done = false; + this.delegate = null; + + this.tryEntries.forEach(resetTryEntry); + + // Pre-initialize at least 20 temporary variables to enable hidden + // class optimizations for simple generators. + for (var tempIndex = 0, tempName; + hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20; + ++tempIndex) { + this[tempName] = null; + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.next = finallyEntry.finallyLoc; + } else { + this.complete(record); + } + + return ContinueSentinel; + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = record.arg; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + return ContinueSentinel; + } + }; +})( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this +); + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"_process":219}],515:[function(require,module,exports){ +// Generated by `/scripts/character-class-escape-sets.js`. Do not edit. +var regenerate = require('regenerate'); + +exports.REGULAR = { + 'd': regenerate() + .addRange(0x30, 0x39), + 'D': regenerate() + .addRange(0x0, 0x2F) + .addRange(0x3A, 0xFFFF), + 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) + .addRange(0x9, 0xD) + .addRange(0x2000, 0x200A) + .addRange(0x2028, 0x2029), + 'S': regenerate() + .addRange(0x0, 0x8) + .addRange(0xE, 0x1F) + .addRange(0x21, 0x9F) + .addRange(0xA1, 0x167F) + .addRange(0x1681, 0x180D) + .addRange(0x180F, 0x1FFF) + .addRange(0x200B, 0x2027) + .addRange(0x202A, 0x202E) + .addRange(0x2030, 0x205E) + .addRange(0x2060, 0x2FFF) + .addRange(0x3001, 0xFEFE) + .addRange(0xFF00, 0xFFFF), + 'w': regenerate(0x5F) + .addRange(0x30, 0x39) + .addRange(0x41, 0x5A) + .addRange(0x61, 0x7A), + 'W': regenerate(0x60) + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x40) + .addRange(0x5B, 0x5E) + .addRange(0x7B, 0xFFFF) +}; + +exports.UNICODE = { + 'd': regenerate() + .addRange(0x30, 0x39), + 'D': regenerate() + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x10FFFF), + 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) + .addRange(0x9, 0xD) + .addRange(0x2000, 0x200A) + .addRange(0x2028, 0x2029), + 'S': regenerate() + .addRange(0x0, 0x8) + .addRange(0xE, 0x1F) + .addRange(0x21, 0x9F) + .addRange(0xA1, 0x167F) + .addRange(0x1681, 0x180D) + .addRange(0x180F, 0x1FFF) + .addRange(0x200B, 0x2027) + .addRange(0x202A, 0x202E) + .addRange(0x2030, 0x205E) + .addRange(0x2060, 0x2FFF) + .addRange(0x3001, 0xFEFE) + .addRange(0xFF00, 0x10FFFF), + 'w': regenerate(0x5F) + .addRange(0x30, 0x39) + .addRange(0x41, 0x5A) + .addRange(0x61, 0x7A), + 'W': regenerate(0x60) + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x40) + .addRange(0x5B, 0x5E) + .addRange(0x7B, 0x10FFFF) +}; + +exports.UNICODE_IGNORE_CASE = { + 'd': regenerate() + .addRange(0x30, 0x39), + 'D': regenerate() + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x10FFFF), + 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF) + .addRange(0x9, 0xD) + .addRange(0x2000, 0x200A) + .addRange(0x2028, 0x2029), + 'S': regenerate() + .addRange(0x0, 0x8) + .addRange(0xE, 0x1F) + .addRange(0x21, 0x9F) + .addRange(0xA1, 0x167F) + .addRange(0x1681, 0x180D) + .addRange(0x180F, 0x1FFF) + .addRange(0x200B, 0x2027) + .addRange(0x202A, 0x202E) + .addRange(0x2030, 0x205E) + .addRange(0x2060, 0x2FFF) + .addRange(0x3001, 0xFEFE) + .addRange(0xFF00, 0x10FFFF), + 'w': regenerate(0x5F, 0x17F, 0x212A) + .addRange(0x30, 0x39) + .addRange(0x41, 0x5A) + .addRange(0x61, 0x7A), + 'W': regenerate(0x4B, 0x53, 0x60) + .addRange(0x0, 0x2F) + .addRange(0x3A, 0x40) + .addRange(0x5B, 0x5E) + .addRange(0x7B, 0x10FFFF) +}; + +},{"regenerate":517}],516:[function(require,module,exports){ +module.exports={ + "75": 8490, + "83": 383, + "107": 8490, + "115": 383, + "181": 924, + "197": 8491, + "383": 83, + "452": 453, + "453": 452, + "455": 456, + "456": 455, + "458": 459, + "459": 458, + "497": 498, + "498": 497, + "837": 8126, + "914": 976, + "917": 1013, + "920": 1012, + "921": 8126, + "922": 1008, + "924": 181, + "928": 982, + "929": 1009, + "931": 962, + "934": 981, + "937": 8486, + "962": 931, + "976": 914, + "977": 1012, + "981": 934, + "982": 928, + "1008": 922, + "1009": 929, + "1012": [ + 920, + 977 + ], + "1013": 917, + "7776": 7835, + "7835": 7776, + "8126": [ + 837, + 921 + ], + "8486": 937, + "8490": 75, + "8491": 197, + "66560": 66600, + "66561": 66601, + "66562": 66602, + "66563": 66603, + "66564": 66604, + "66565": 66605, + "66566": 66606, + "66567": 66607, + "66568": 66608, + "66569": 66609, + "66570": 66610, + "66571": 66611, + "66572": 66612, + "66573": 66613, + "66574": 66614, + "66575": 66615, + "66576": 66616, + "66577": 66617, + "66578": 66618, + "66579": 66619, + "66580": 66620, + "66581": 66621, + "66582": 66622, + "66583": 66623, + "66584": 66624, + "66585": 66625, + "66586": 66626, + "66587": 66627, + "66588": 66628, + "66589": 66629, + "66590": 66630, + "66591": 66631, + "66592": 66632, + "66593": 66633, + "66594": 66634, + "66595": 66635, + "66596": 66636, + "66597": 66637, + "66598": 66638, + "66599": 66639, + "66600": 66560, + "66601": 66561, + "66602": 66562, + "66603": 66563, + "66604": 66564, + "66605": 66565, + "66606": 66566, + "66607": 66567, + "66608": 66568, + "66609": 66569, + "66610": 66570, + "66611": 66571, + "66612": 66572, + "66613": 66573, + "66614": 66574, + "66615": 66575, + "66616": 66576, + "66617": 66577, + "66618": 66578, + "66619": 66579, + "66620": 66580, + "66621": 66581, + "66622": 66582, + "66623": 66583, + "66624": 66584, + "66625": 66585, + "66626": 66586, + "66627": 66587, + "66628": 66588, + "66629": 66589, + "66630": 66590, + "66631": 66591, + "66632": 66592, + "66633": 66593, + "66634": 66594, + "66635": 66595, + "66636": 66596, + "66637": 66597, + "66638": 66598, + "66639": 66599, + "68736": 68800, + "68737": 68801, + "68738": 68802, + "68739": 68803, + "68740": 68804, + "68741": 68805, + "68742": 68806, + "68743": 68807, + "68744": 68808, + "68745": 68809, + "68746": 68810, + "68747": 68811, + "68748": 68812, + "68749": 68813, + "68750": 68814, + "68751": 68815, + "68752": 68816, + "68753": 68817, + "68754": 68818, + "68755": 68819, + "68756": 68820, + "68757": 68821, + "68758": 68822, + "68759": 68823, + "68760": 68824, + "68761": 68825, + "68762": 68826, + "68763": 68827, + "68764": 68828, + "68765": 68829, + "68766": 68830, + "68767": 68831, + "68768": 68832, + "68769": 68833, + "68770": 68834, + "68771": 68835, + "68772": 68836, + "68773": 68837, + "68774": 68838, + "68775": 68839, + "68776": 68840, + "68777": 68841, + "68778": 68842, + "68779": 68843, + "68780": 68844, + "68781": 68845, + "68782": 68846, + "68783": 68847, + "68784": 68848, + "68785": 68849, + "68786": 68850, + "68800": 68736, + "68801": 68737, + "68802": 68738, + "68803": 68739, + "68804": 68740, + "68805": 68741, + "68806": 68742, + "68807": 68743, + "68808": 68744, + "68809": 68745, + "68810": 68746, + "68811": 68747, + "68812": 68748, + "68813": 68749, + "68814": 68750, + "68815": 68751, + "68816": 68752, + "68817": 68753, + "68818": 68754, + "68819": 68755, + "68820": 68756, + "68821": 68757, + "68822": 68758, + "68823": 68759, + "68824": 68760, + "68825": 68761, + "68826": 68762, + "68827": 68763, + "68828": 68764, + "68829": 68765, + "68830": 68766, + "68831": 68767, + "68832": 68768, + "68833": 68769, + "68834": 68770, + "68835": 68771, + "68836": 68772, + "68837": 68773, + "68838": 68774, + "68839": 68775, + "68840": 68776, + "68841": 68777, + "68842": 68778, + "68843": 68779, + "68844": 68780, + "68845": 68781, + "68846": 68782, + "68847": 68783, + "68848": 68784, + "68849": 68785, + "68850": 68786, + "71840": 71872, + "71841": 71873, + "71842": 71874, + "71843": 71875, + "71844": 71876, + "71845": 71877, + "71846": 71878, + "71847": 71879, + "71848": 71880, + "71849": 71881, + "71850": 71882, + "71851": 71883, + "71852": 71884, + "71853": 71885, + "71854": 71886, + "71855": 71887, + "71856": 71888, + "71857": 71889, + "71858": 71890, + "71859": 71891, + "71860": 71892, + "71861": 71893, + "71862": 71894, + "71863": 71895, + "71864": 71896, + "71865": 71897, + "71866": 71898, + "71867": 71899, + "71868": 71900, + "71869": 71901, + "71870": 71902, + "71871": 71903, + "71872": 71840, + "71873": 71841, + "71874": 71842, + "71875": 71843, + "71876": 71844, + "71877": 71845, + "71878": 71846, + "71879": 71847, + "71880": 71848, + "71881": 71849, + "71882": 71850, + "71883": 71851, + "71884": 71852, + "71885": 71853, + "71886": 71854, + "71887": 71855, + "71888": 71856, + "71889": 71857, + "71890": 71858, + "71891": 71859, + "71892": 71860, + "71893": 71861, + "71894": 71862, + "71895": 71863, + "71896": 71864, + "71897": 71865, + "71898": 71866, + "71899": 71867, + "71900": 71868, + "71901": 71869, + "71902": 71870, + "71903": 71871 +} + +},{}],517:[function(require,module,exports){ +(function (global){ +/*! https://mths.be/regenerate v1.2.0 by @mathias | MIT license */ +;(function(root) { + + // Detect free variables `exports`. + var freeExports = typeof exports == 'object' && exports; + + // Detect free variable `module`. + var freeModule = typeof module == 'object' && module && + module.exports == freeExports && module; + + // Detect free variable `global`, from Node.js or Browserified code, + // and use it as `root`. + var freeGlobal = typeof global == 'object' && global; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + var ERRORS = { + 'rangeOrder': 'A range\u2019s `stop` value must be greater than or equal ' + + 'to the `start` value.', + 'codePointRange': 'Invalid code point value. Code points range from ' + + 'U+000000 to U+10FFFF.' + }; + + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs + var HIGH_SURROGATE_MIN = 0xD800; + var HIGH_SURROGATE_MAX = 0xDBFF; + var LOW_SURROGATE_MIN = 0xDC00; + var LOW_SURROGATE_MAX = 0xDFFF; + + // In Regenerate output, `\0` will never be preceded by `\` because we sort + // by code point value, so let’s keep this regular expression simple. + var regexNull = /\\x00([^0123456789]|$)/g; + + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + var extend = function(destination, source) { + var key; + for (key in source) { + if (hasOwnProperty.call(source, key)) { + destination[key] = source[key]; + } + } + return destination; + }; + + var forEach = function(array, callback) { + var index = -1; + var length = array.length; + while (++index < length) { + callback(array[index], index); + } + }; + + var toString = object.toString; + var isArray = function(value) { + return toString.call(value) == '[object Array]'; + }; + var isNumber = function(value) { + return typeof value == 'number' || + toString.call(value) == '[object Number]'; + }; + + // This assumes that `number` is a positive integer that `toString()`s nicely + // (which is the case for all code point values). + var zeroes = '0000'; + var pad = function(number, totalCharacters) { + var string = String(number); + return string.length < totalCharacters + ? (zeroes + string).slice(-totalCharacters) + : string; + }; + + var hex = function(number) { + return Number(number).toString(16).toUpperCase(); + }; + + var slice = [].slice; + + /*--------------------------------------------------------------------------*/ + + var dataFromCodePoints = function(codePoints) { + var index = -1; + var length = codePoints.length; + var max = length - 1; + var result = []; + var isStart = true; + var tmp; + var previous = 0; + while (++index < length) { + tmp = codePoints[index]; + if (isStart) { + result.push(tmp); + previous = tmp; + isStart = false; + } else { + if (tmp == previous + 1) { + if (index != max) { + previous = tmp; + continue; + } else { + isStart = true; + result.push(tmp + 1); + } + } else { + // End the previous range and start a new one. + result.push(previous + 1, tmp); + previous = tmp; + } + } + } + if (!isStart) { + result.push(tmp + 1); + } + return result; + }; + + var dataRemove = function(data, codePoint) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1]; + if (codePoint >= start && codePoint < end) { + // Modify this pair. + if (codePoint == start) { + if (end == start + 1) { + // Just remove `start` and `end`. + data.splice(index, 2); + return data; + } else { + // Just replace `start` with a new value. + data[index] = codePoint + 1; + return data; + } + } else if (codePoint == end - 1) { + // Just replace `end` with a new value. + data[index + 1] = codePoint; + return data; + } else { + // Replace `[start, end]` with `[startA, endA, startB, endB]`. + data.splice(index, 2, start, codePoint, codePoint + 1, end); + return data; + } + } + index += 2; + } + return data; + }; + + var dataRemoveRange = function(data, rangeStart, rangeEnd) { + if (rangeEnd < rangeStart) { + throw Error(ERRORS.rangeOrder); + } + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + while (index < data.length) { + start = data[index]; + end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. + + // Exit as soon as no more matching pairs can be found. + if (start > rangeEnd) { + return data; + } + + // Check if this range pair is equal to, or forms a subset of, the range + // to be removed. + // E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`. + // E.g. we have `[40, 51]` and want to remove 0-100 → `[]`. + if (rangeStart <= start && rangeEnd >= end) { + // Remove this pair. + data.splice(index, 2); + continue; + } + + // Check if both `rangeStart` and `rangeEnd` are within the bounds of + // this pair. + // E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`. + if (rangeStart >= start && rangeEnd < end) { + if (rangeStart == start) { + // Replace `[start, end]` with `[startB, endB]`. + data[index] = rangeEnd + 1; + data[index + 1] = end + 1; + return data; + } + // Replace `[start, end]` with `[startA, endA, startB, endB]`. + data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1); + return data; + } + + // Check if only `rangeStart` is within the bounds of this pair. + // E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`. + if (rangeStart >= start && rangeStart <= end) { + // Replace `end` with `rangeStart`. + data[index + 1] = rangeStart; + // Note: we cannot `return` just yet, in case any following pairs still + // contain matching code points. + // E.g. we have `[0, 11, 14, 31]` and want to remove 4-20 + // → `[0, 4, 21, 31]`. + } + + // Check if only `rangeEnd` is within the bounds of this pair. + // E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`. + else if (rangeEnd >= start && rangeEnd <= end) { + // Just replace `start`. + data[index] = rangeEnd + 1; + return data; + } + + index += 2; + } + return data; + }; + + var dataAdd = function(data, codePoint) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var lastIndex = null; + var length = data.length; + if (codePoint < 0x0 || codePoint > 0x10FFFF) { + throw RangeError(ERRORS.codePointRange); + } + while (index < length) { + start = data[index]; + end = data[index + 1]; + + // Check if the code point is already in the set. + if (codePoint >= start && codePoint < end) { + return data; + } + + if (codePoint == start - 1) { + // Just replace `start` with a new value. + data[index] = codePoint; + return data; + } + + // At this point, if `start` is `greater` than `codePoint`, insert a new + // `[start, end]` pair before the current pair, or after the current pair + // if there is a known `lastIndex`. + if (start > codePoint) { + data.splice( + lastIndex != null ? lastIndex + 2 : 0, + 0, + codePoint, + codePoint + 1 + ); + return data; + } + + if (codePoint == end) { + // Check if adding this code point causes two separate ranges to become + // a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`. + if (codePoint + 1 == data[index + 2]) { + data.splice(index, 4, start, data[index + 3]); + return data; + } + // Else, just replace `end` with a new value. + data[index + 1] = codePoint + 1; + return data; + } + lastIndex = index; + index += 2; + } + // The loop has finished; add the new pair to the end of the data set. + data.push(codePoint, codePoint + 1); + return data; + }; + + var dataAddData = function(dataA, dataB) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var data = dataA.slice(); + var length = dataB.length; + while (index < length) { + start = dataB[index]; + end = dataB[index + 1] - 1; + if (start == end) { + data = dataAdd(data, start); + } else { + data = dataAddRange(data, start, end); + } + index += 2; + } + return data; + }; + + var dataRemoveData = function(dataA, dataB) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var data = dataA.slice(); + var length = dataB.length; + while (index < length) { + start = dataB[index]; + end = dataB[index + 1] - 1; + if (start == end) { + data = dataRemove(data, start); + } else { + data = dataRemoveRange(data, start, end); + } + index += 2; + } + return data; + }; + + var dataAddRange = function(data, rangeStart, rangeEnd) { + if (rangeEnd < rangeStart) { + throw Error(ERRORS.rangeOrder); + } + if ( + rangeStart < 0x0 || rangeStart > 0x10FFFF || + rangeEnd < 0x0 || rangeEnd > 0x10FFFF + ) { + throw RangeError(ERRORS.codePointRange); + } + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var added = false; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1]; + + if (added) { + // The range has already been added to the set; at this point, we just + // need to get rid of the following ranges in case they overlap. + + // Check if this range can be combined with the previous range. + if (start == rangeEnd + 1) { + data.splice(index - 1, 2); + return data; + } + + // Exit as soon as no more possibly overlapping pairs can be found. + if (start > rangeEnd) { + return data; + } + + // E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have + // `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the + // `0,16` range that was previously added. + if (start >= rangeStart && start <= rangeEnd) { + // `start` lies within the range that was previously added. + + if (end > rangeStart && end - 1 <= rangeEnd) { + // `end` lies within the range that was previously added as well, + // so remove this pair. + data.splice(index, 2); + index -= 2; + // Note: we cannot `return` just yet, as there may still be other + // overlapping pairs. + } else { + // `start` lies within the range that was previously added, but + // `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so + // now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`. + // Remove the previously added `end` and the current `start`. + data.splice(index - 1, 2); + index -= 2; + } + + // Note: we cannot return yet. + } + + } + + else if (start == rangeEnd + 1) { + data[index] = rangeStart; + return data; + } + + // Check if a new pair must be inserted *before* the current one. + else if (start > rangeEnd) { + data.splice(index, 0, rangeStart, rangeEnd + 1); + return data; + } + + else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) { + // The new range lies entirely within an existing range pair. No action + // needed. + return data; + } + + else if ( + // E.g. `[0, 11]` and you add 5-15 → `[0, 16]`. + (rangeStart >= start && rangeStart < end) || + // E.g. `[0, 3]` and you add 3-6 → `[0, 7]`. + end == rangeStart + ) { + // Replace `end` with the new value. + data[index + 1] = rangeEnd + 1; + // Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]` + // and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part. + added = true; + // Note: we cannot `return` just yet. + } + + else if (rangeStart <= start && rangeEnd + 1 >= end) { + // The new range is a superset of the old range. + data[index] = rangeStart; + data[index + 1] = rangeEnd + 1; + added = true; + } + + index += 2; + } + // The loop has finished without doing anything; add the new pair to the end + // of the data set. + if (!added) { + data.push(rangeStart, rangeEnd + 1); + } + return data; + }; + + var dataContains = function(data, codePoint) { + var index = 0; + var length = data.length; + // Exit early if `codePoint` is not within `data`’s overall range. + var start = data[index]; + var end = data[length - 1]; + if (length >= 2) { + if (codePoint < start || codePoint > end) { + return false; + } + } + // Iterate over the data per `(start, end)` pair. + while (index < length) { + start = data[index]; + end = data[index + 1]; + if (codePoint >= start && codePoint < end) { + return true; + } + index += 2; + } + return false; + }; + + var dataIntersection = function(data, codePoints) { + var index = 0; + var length = codePoints.length; + var codePoint; + var result = []; + while (index < length) { + codePoint = codePoints[index]; + if (dataContains(data, codePoint)) { + result.push(codePoint); + } + ++index; + } + return dataFromCodePoints(result); + }; + + var dataIsEmpty = function(data) { + return !data.length; + }; + + var dataIsSingleton = function(data) { + // Check if the set only represents a single code point. + return data.length == 2 && data[0] + 1 == data[1]; + }; + + var dataToArray = function(data) { + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var result = []; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1]; + while (start < end) { + result.push(start); + ++start; + } + index += 2; + } + return result; + }; + + /*--------------------------------------------------------------------------*/ + + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + var floor = Math.floor; + var highSurrogate = function(codePoint) { + return parseInt( + floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, + 10 + ); + }; + + var lowSurrogate = function(codePoint) { + return parseInt( + (codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, + 10 + ); + }; + + var stringFromCharCode = String.fromCharCode; + var codePointToString = function(codePoint) { + var string; + // https://mathiasbynens.be/notes/javascript-escapes#single + // Note: the `\b` escape sequence for U+0008 BACKSPACE in strings has a + // different meaning in regular expressions (word boundary), so it cannot + // be used here. + if (codePoint == 0x09) { + string = '\\t'; + } + // Note: IE < 9 treats `'\v'` as `'v'`, so avoid using it. + // else if (codePoint == 0x0B) { + // string = '\\v'; + // } + else if (codePoint == 0x0A) { + string = '\\n'; + } + else if (codePoint == 0x0C) { + string = '\\f'; + } + else if (codePoint == 0x0D) { + string = '\\r'; + } + else if (codePoint == 0x5C) { + string = '\\\\'; + } + else if ( + codePoint == 0x24 || + (codePoint >= 0x28 && codePoint <= 0x2B) || + codePoint == 0x2D || codePoint == 0x2E || codePoint == 0x3F || + (codePoint >= 0x5B && codePoint <= 0x5E) || + (codePoint >= 0x7B && codePoint <= 0x7D) + ) { + // The code point maps to an unsafe printable ASCII character; + // backslash-escape it. Here’s the list of those symbols: + // + // $()*+-.?[\]^{|} + // + // See #7 for more info. + string = '\\' + stringFromCharCode(codePoint); + } + else if (codePoint >= 0x20 && codePoint <= 0x7E) { + // The code point maps to one of these printable ASCII symbols + // (including the space character): + // + // !"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO + // PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~ + // + // These can safely be used directly. + string = stringFromCharCode(codePoint); + } + else if (codePoint <= 0xFF) { + // https://mathiasbynens.be/notes/javascript-escapes#hexadecimal + string = '\\x' + pad(hex(codePoint), 2); + } + else { // `codePoint <= 0xFFFF` holds true. + // https://mathiasbynens.be/notes/javascript-escapes#unicode + string = '\\u' + pad(hex(codePoint), 4); + } + + // There’s no need to account for astral symbols / surrogate pairs here, + // since `codePointToString` is private and only used for BMP code points. + // But if that’s what you need, just add an `else` block with this code: + // + // string = '\\u' + pad(hex(highSurrogate(codePoint)), 4) + // + '\\u' + pad(hex(lowSurrogate(codePoint)), 4); + + return string; + }; + + var symbolToCodePoint = function(symbol) { + var length = symbol.length; + var first = symbol.charCodeAt(0); + var second; + if ( + first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && + length > 1 // There is a next code unit. + ) { + // `first` is a high surrogate, and there is a next character. Assume + // it’s a low surrogate (else it’s invalid usage of Regenerate anyway). + second = symbol.charCodeAt(1); + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - HIGH_SURROGATE_MIN) * 0x400 + + second - LOW_SURROGATE_MIN + 0x10000; + } + return first; + }; + + var createBMPCharacterClasses = function(data) { + // Iterate over the data per `(start, end)` pair. + var result = ''; + var index = 0; + var start; + var end; + var length = data.length; + if (dataIsSingleton(data)) { + return codePointToString(data[0]); + } + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. + if (start == end) { + result += codePointToString(start); + } else if (start + 1 == end) { + result += codePointToString(start) + codePointToString(end); + } else { + result += codePointToString(start) + '-' + codePointToString(end); + } + index += 2; + } + return '[' + result + ']'; + }; + + var splitAtBMP = function(data) { + // Iterate over the data per `(start, end)` pair. + var loneHighSurrogates = []; + var loneLowSurrogates = []; + var bmp = []; + var astral = []; + var index = 0; + var start; + var end; + var length = data.length; + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive. + + if (start < HIGH_SURROGATE_MIN) { + + // The range starts and ends before the high surrogate range. + // E.g. (0, 0x10). + if (end < HIGH_SURROGATE_MIN) { + bmp.push(start, end + 1); + } + + // The range starts before the high surrogate range and ends within it. + // E.g. (0, 0xD855). + if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1); + } + + // The range starts before the high surrogate range and ends in the low + // surrogate range. E.g. (0, 0xDCFF). + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); + } + + // The range starts before the high surrogate range and ends after the + // low surrogate range. E.g. (0, 0x10FFFF). + if (end > LOW_SURROGATE_MAX) { + bmp.push(start, HIGH_SURROGATE_MIN); + loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } + + } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) { + + // The range starts and ends in the high surrogate range. + // E.g. (0xD855, 0xD866). + if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) { + loneHighSurrogates.push(start, end + 1); + } + + // The range starts in the high surrogate range and ends in the low + // surrogate range. E.g. (0xD855, 0xDCFF). + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1); + } + + // The range starts in the high surrogate range and ends after the low + // surrogate range. E.g. (0xD855, 0x10FFFF). + if (end > LOW_SURROGATE_MAX) { + loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1); + loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1); + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } + + } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) { + + // The range starts and ends in the low surrogate range. + // E.g. (0xDCFF, 0xDDFF). + if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) { + loneLowSurrogates.push(start, end + 1); + } + + // The range starts in the low surrogate range and ends after the low + // surrogate range. E.g. (0xDCFF, 0x10FFFF). + if (end > LOW_SURROGATE_MAX) { + loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1); + if (end <= 0xFFFF) { + bmp.push(LOW_SURROGATE_MAX + 1, end + 1); + } else { + bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + } + + } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) { + + // The range starts and ends after the low surrogate range. + // E.g. (0xFFAA, 0x10FFFF). + if (end <= 0xFFFF) { + bmp.push(start, end + 1); + } else { + bmp.push(start, 0xFFFF + 1); + astral.push(0xFFFF + 1, end + 1); + } + + } else { + + // The range starts and ends in the astral range. + astral.push(start, end + 1); + + } + + index += 2; + } + return { + 'loneHighSurrogates': loneHighSurrogates, + 'loneLowSurrogates': loneLowSurrogates, + 'bmp': bmp, + 'astral': astral + }; + }; + + var optimizeSurrogateMappings = function(surrogateMappings) { + var result = []; + var tmpLow = []; + var addLow = false; + var mapping; + var nextMapping; + var highSurrogates; + var lowSurrogates; + var nextHighSurrogates; + var nextLowSurrogates; + var index = -1; + var length = surrogateMappings.length; + while (++index < length) { + mapping = surrogateMappings[index]; + nextMapping = surrogateMappings[index + 1]; + if (!nextMapping) { + result.push(mapping); + continue; + } + highSurrogates = mapping[0]; + lowSurrogates = mapping[1]; + nextHighSurrogates = nextMapping[0]; + nextLowSurrogates = nextMapping[1]; + + // Check for identical high surrogate ranges. + tmpLow = lowSurrogates; + while ( + nextHighSurrogates && + highSurrogates[0] == nextHighSurrogates[0] && + highSurrogates[1] == nextHighSurrogates[1] + ) { + // Merge with the next item. + if (dataIsSingleton(nextLowSurrogates)) { + tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]); + } else { + tmpLow = dataAddRange( + tmpLow, + nextLowSurrogates[0], + nextLowSurrogates[1] - 1 + ); + } + ++index; + mapping = surrogateMappings[index]; + highSurrogates = mapping[0]; + lowSurrogates = mapping[1]; + nextMapping = surrogateMappings[index + 1]; + nextHighSurrogates = nextMapping && nextMapping[0]; + nextLowSurrogates = nextMapping && nextMapping[1]; + addLow = true; + } + result.push([ + highSurrogates, + addLow ? tmpLow : lowSurrogates + ]); + addLow = false; + } + return optimizeByLowSurrogates(result); + }; + + var optimizeByLowSurrogates = function(surrogateMappings) { + if (surrogateMappings.length == 1) { + return surrogateMappings; + } + var index = -1; + var innerIndex = -1; + while (++index < surrogateMappings.length) { + var mapping = surrogateMappings[index]; + var lowSurrogates = mapping[1]; + var lowSurrogateStart = lowSurrogates[0]; + var lowSurrogateEnd = lowSurrogates[1]; + innerIndex = index; // Note: the loop starts at the next index. + while (++innerIndex < surrogateMappings.length) { + var otherMapping = surrogateMappings[innerIndex]; + var otherLowSurrogates = otherMapping[1]; + var otherLowSurrogateStart = otherLowSurrogates[0]; + var otherLowSurrogateEnd = otherLowSurrogates[1]; + if ( + lowSurrogateStart == otherLowSurrogateStart && + lowSurrogateEnd == otherLowSurrogateEnd + ) { + // Add the code points in the other item to this one. + if (dataIsSingleton(otherMapping[0])) { + mapping[0] = dataAdd(mapping[0], otherMapping[0][0]); + } else { + mapping[0] = dataAddRange( + mapping[0], + otherMapping[0][0], + otherMapping[0][1] - 1 + ); + } + // Remove the other, now redundant, item. + surrogateMappings.splice(innerIndex, 1); + --innerIndex; + } + } + } + return surrogateMappings; + }; + + var surrogateSet = function(data) { + // Exit early if `data` is an empty set. + if (!data.length) { + return []; + } + + // Iterate over the data per `(start, end)` pair. + var index = 0; + var start; + var end; + var startHigh; + var startLow; + var prevStartHigh = 0; + var prevEndHigh = 0; + var tmpLow = []; + var endHigh; + var endLow; + var surrogateMappings = []; + var length = data.length; + var dataHigh = []; + while (index < length) { + start = data[index]; + end = data[index + 1] - 1; + + startHigh = highSurrogate(start); + startLow = lowSurrogate(start); + endHigh = highSurrogate(end); + endLow = lowSurrogate(end); + + var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN; + var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX; + var complete = false; + + // Append the previous high-surrogate-to-low-surrogate mappings. + // Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`. + if ( + startHigh == endHigh || + startsWithLowestLowSurrogate && endsWithHighestLowSurrogate + ) { + surrogateMappings.push([ + [startHigh, endHigh + 1], + [startLow, endLow + 1] + ]); + complete = true; + } else { + surrogateMappings.push([ + [startHigh, startHigh + 1], + [startLow, LOW_SURROGATE_MAX + 1] + ]); + } + + // Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to + // `(endHigh - 1, LOW_SURROGATE_MAX)`. + if (!complete && startHigh + 1 < endHigh) { + if (endsWithHighestLowSurrogate) { + // Combine step 2 and step 3. + surrogateMappings.push([ + [startHigh + 1, endHigh + 1], + [LOW_SURROGATE_MIN, endLow + 1] + ]); + complete = true; + } else { + surrogateMappings.push([ + [startHigh + 1, endHigh], + [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1] + ]); + } + } + + // Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`. + if (!complete) { + surrogateMappings.push([ + [endHigh, endHigh + 1], + [LOW_SURROGATE_MIN, endLow + 1] + ]); + } + + prevStartHigh = startHigh; + prevEndHigh = endHigh; + + index += 2; + } + + // The format of `surrogateMappings` is as follows: + // + // [ surrogateMapping1, surrogateMapping2 ] + // + // i.e.: + // + // [ + // [ highSurrogates1, lowSurrogates1 ], + // [ highSurrogates2, lowSurrogates2 ] + // ] + return optimizeSurrogateMappings(surrogateMappings); + }; + + var createSurrogateCharacterClasses = function(surrogateMappings) { + var result = []; + forEach(surrogateMappings, function(surrogateMapping) { + var highSurrogates = surrogateMapping[0]; + var lowSurrogates = surrogateMapping[1]; + result.push( + createBMPCharacterClasses(highSurrogates) + + createBMPCharacterClasses(lowSurrogates) + ); + }); + return result.join('|'); + }; + + var createCharacterClassesFromData = function(data, bmpOnly) { + var result = []; + + var parts = splitAtBMP(data); + var loneHighSurrogates = parts.loneHighSurrogates; + var loneLowSurrogates = parts.loneLowSurrogates; + var bmp = parts.bmp; + var astral = parts.astral; + var hasAstral = !dataIsEmpty(parts.astral); + var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates); + var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates); + + var surrogateMappings = surrogateSet(astral); + + if (bmpOnly) { + bmp = dataAddData(bmp, loneHighSurrogates); + hasLoneHighSurrogates = false; + bmp = dataAddData(bmp, loneLowSurrogates); + hasLoneLowSurrogates = false; + } + + if (!dataIsEmpty(bmp)) { + // The data set contains BMP code points that are not high surrogates + // needed for astral code points in the set. + result.push(createBMPCharacterClasses(bmp)); + } + if (surrogateMappings.length) { + // The data set contains astral code points; append character classes + // based on their surrogate pairs. + result.push(createSurrogateCharacterClasses(surrogateMappings)); + } + // https://gist.github.com/mathiasbynens/bbe7f870208abcfec860 + if (hasLoneHighSurrogates) { + result.push( + createBMPCharacterClasses(loneHighSurrogates) + + // Make sure the high surrogates aren’t part of a surrogate pair. + '(?![\\uDC00-\\uDFFF])' + ); + } + if (hasLoneLowSurrogates) { + result.push( + // Make sure the low surrogates aren’t part of a surrogate pair. + '(?:[^\\uD800-\\uDBFF]|^)' + + createBMPCharacterClasses(loneLowSurrogates) + ); + } + return result.join('|'); + }; + + /*--------------------------------------------------------------------------*/ + + // `regenerate` can be used as a constructor (and new methods can be added to + // its prototype) but also as a regular function, the latter of which is the + // documented and most common usage. For that reason, it’s not capitalized. + var regenerate = function(value) { + if (arguments.length > 1) { + value = slice.call(arguments); + } + if (this instanceof regenerate) { + this.data = []; + return value ? this.add(value) : this; + } + return (new regenerate).add(value); + }; + + regenerate.version = '1.2.0'; + + var proto = regenerate.prototype; + extend(proto, { + 'add': function(value) { + var $this = this; + if (value == null) { + return $this; + } + if (value instanceof regenerate) { + // Allow passing other Regenerate instances. + $this.data = dataAddData($this.data, value.data); + return $this; + } + if (arguments.length > 1) { + value = slice.call(arguments); + } + if (isArray(value)) { + forEach(value, function(item) { + $this.add(item); + }); + return $this; + } + $this.data = dataAdd( + $this.data, + isNumber(value) ? value : symbolToCodePoint(value) + ); + return $this; + }, + 'remove': function(value) { + var $this = this; + if (value == null) { + return $this; + } + if (value instanceof regenerate) { + // Allow passing other Regenerate instances. + $this.data = dataRemoveData($this.data, value.data); + return $this; + } + if (arguments.length > 1) { + value = slice.call(arguments); + } + if (isArray(value)) { + forEach(value, function(item) { + $this.remove(item); + }); + return $this; + } + $this.data = dataRemove( + $this.data, + isNumber(value) ? value : symbolToCodePoint(value) + ); + return $this; + }, + 'addRange': function(start, end) { + var $this = this; + $this.data = dataAddRange($this.data, + isNumber(start) ? start : symbolToCodePoint(start), + isNumber(end) ? end : symbolToCodePoint(end) + ); + return $this; + }, + 'removeRange': function(start, end) { + var $this = this; + var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start); + var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end); + $this.data = dataRemoveRange( + $this.data, + startCodePoint, + endCodePoint + ); + return $this; + }, + 'intersection': function(argument) { + var $this = this; + // Allow passing other Regenerate instances. + // TODO: Optimize this by writing and using `dataIntersectionData()`. + var array = argument instanceof regenerate ? + dataToArray(argument.data) : + argument; + $this.data = dataIntersection($this.data, array); + return $this; + }, + 'contains': function(codePoint) { + return dataContains( + this.data, + isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint) + ); + }, + 'clone': function() { + var set = new regenerate; + set.data = this.data.slice(0); + return set; + }, + 'toString': function(options) { + var result = createCharacterClassesFromData( + this.data, + options ? options.bmpOnly : false + ); + // Use `\0` instead of `\x00` where possible. + return result.replace(regexNull, '\\0$1'); + }, + 'toRegExp': function(flags) { + return RegExp(this.toString(), flags || ''); + }, + 'valueOf': function() { // Note: `valueOf` is aliased as `toArray`. + return dataToArray(this.data); + } + }); + + proto.toArray = proto.valueOf; + + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define(function() { + return regenerate; + }); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = regenerate; + } else { // in Narwhal or RingoJS v0.7.0- + freeExports.regenerate = regenerate; + } + } else { // in Rhino or a web browser + root.regenerate = regenerate; + } + +}(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],518:[function(require,module,exports){ +(function (global){ +/*! + * RegJSGen + * Copyright 2014 Benjamin Tan + * Available under MIT license + */ +;(function() { + 'use strict'; + + /** Used to determine if values are of the language type `Object` */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Used as a reference to the global object */ + var root = (objectTypes[typeof window] && window) || this; + + /** Backup possible global object */ + var oldRoot = root; + + /** Detect free variable `exports` */ + var freeExports = objectTypes[typeof exports] && exports; + + /** Detect free variable `module` */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ + var freeGlobal = freeExports && freeModule && typeof global == 'object' && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + /*! Based on https://mths.be/fromcodepoint v0.2.0 by @mathias */ + + var stringFromCharCode = String.fromCharCode; + var floor = Math.floor; + function fromCodePoint() { + var MAX_SIZE = 0x4000; + var codeUnits = []; + var highSurrogate; + var lowSurrogate; + var index = -1; + var length = arguments.length; + if (!length) { + return ''; + } + var result = ''; + while (++index < length) { + var codePoint = Number(arguments[index]); + if ( + !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity` + codePoint < 0 || // not a valid Unicode code point + codePoint > 0x10FFFF || // not a valid Unicode code point + floor(codePoint) != codePoint // not an integer + ) { + throw RangeError('Invalid code point: ' + codePoint); + } + if (codePoint <= 0xFFFF) { + // BMP code point + codeUnits.push(codePoint); + } else { + // Astral code point; split in surrogate halves + // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + codePoint -= 0x10000; + highSurrogate = (codePoint >> 10) + 0xD800; + lowSurrogate = (codePoint % 0x400) + 0xDC00; + codeUnits.push(highSurrogate, lowSurrogate); + } + if (index + 1 == length || codeUnits.length > MAX_SIZE) { + result += stringFromCharCode.apply(null, codeUnits); + codeUnits.length = 0; + } + } + return result; + } + + function assertType(type, expected) { + if (expected.indexOf('|') == -1) { + if (type == expected) { + return; + } + + throw Error('Invalid node type: ' + type); + } + + expected = assertType.hasOwnProperty(expected) + ? assertType[expected] + : (assertType[expected] = RegExp('^(?:' + expected + ')$')); + + if (expected.test(type)) { + return; + } + + throw Error('Invalid node type: ' + type); + } + + /*--------------------------------------------------------------------------*/ + + function generate(node) { + var type = node.type; + + if (generate.hasOwnProperty(type) && typeof generate[type] == 'function') { + return generate[type](node); + } + + throw Error('Invalid node type: ' + type); + } + + /*--------------------------------------------------------------------------*/ + + function generateAlternative(node) { + assertType(node.type, 'alternative'); + + var terms = node.body, + length = terms ? terms.length : 0; + + if (length == 1) { + return generateTerm(terms[0]); + } else { + var i = -1, + result = ''; + + while (++i < length) { + result += generateTerm(terms[i]); + } + + return result; + } + } + + function generateAnchor(node) { + assertType(node.type, 'anchor'); + + switch (node.kind) { + case 'start': + return '^'; + case 'end': + return '$'; + case 'boundary': + return '\\b'; + case 'not-boundary': + return '\\B'; + default: + throw Error('Invalid assertion'); + } + } + + function generateAtom(node) { + assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value'); + + return generate(node); + } + + function generateCharacterClass(node) { + assertType(node.type, 'characterClass'); + + var classRanges = node.body, + length = classRanges ? classRanges.length : 0; + + var i = -1, + result = '['; + + if (node.negative) { + result += '^'; + } + + while (++i < length) { + result += generateClassAtom(classRanges[i]); + } + + result += ']'; + + return result; + } + + function generateCharacterClassEscape(node) { + assertType(node.type, 'characterClassEscape'); + + return '\\' + node.value; + } + + function generateCharacterClassRange(node) { + assertType(node.type, 'characterClassRange'); + + var min = node.min, + max = node.max; + + if (min.type == 'characterClassRange' || max.type == 'characterClassRange') { + throw Error('Invalid character class range'); + } + + return generateClassAtom(min) + '-' + generateClassAtom(max); + } + + function generateClassAtom(node) { + assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value'); + + return generate(node); + } + + function generateDisjunction(node) { + assertType(node.type, 'disjunction'); + + var body = node.body, + length = body ? body.length : 0; + + if (length == 0) { + throw Error('No body'); + } else if (length == 1) { + return generate(body[0]); + } else { + var i = -1, + result = ''; + + while (++i < length) { + if (i != 0) { + result += '|'; + } + result += generate(body[i]); + } + + return result; + } + } + + function generateDot(node) { + assertType(node.type, 'dot'); + + return '.'; + } + + function generateGroup(node) { + assertType(node.type, 'group'); + + var result = '('; + + switch (node.behavior) { + case 'normal': + break; + case 'ignore': + result += '?:'; + break; + case 'lookahead': + result += '?='; + break; + case 'negativeLookahead': + result += '?!'; + break; + default: + throw Error('Invalid behaviour: ' + node.behaviour); + } + + var body = node.body, + length = body ? body.length : 0; + + if (length == 1) { + result += generate(body[0]); + } else { + var i = -1; + + while (++i < length) { + result += generate(body[i]); + } + } + + result += ')'; + + return result; + } + + function generateQuantifier(node) { + assertType(node.type, 'quantifier'); + + var quantifier = '', + min = node.min, + max = node.max; + + switch (max) { + case undefined: + case null: + switch (min) { + case 0: + quantifier = '*' + break; + case 1: + quantifier = '+'; + break; + default: + quantifier = '{' + min + ',}'; + break; + } + break; + default: + if (min == max) { + quantifier = '{' + min + '}'; + } + else if (min == 0 && max == 1) { + quantifier = '?'; + } else { + quantifier = '{' + min + ',' + max + '}'; + } + break; + } + + if (!node.greedy) { + quantifier += '?'; + } + + return generateAtom(node.body[0]) + quantifier; + } + + function generateReference(node) { + assertType(node.type, 'reference'); + + return '\\' + node.matchIndex; + } + + function generateTerm(node) { + assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value'); + + return generate(node); + } + + function generateValue(node) { + assertType(node.type, 'value'); + + var kind = node.kind, + codePoint = node.codePoint; + + switch (kind) { + case 'controlLetter': + return '\\c' + fromCodePoint(codePoint + 64); + case 'hexadecimalEscape': + return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2); + case 'identifier': + return '\\' + fromCodePoint(codePoint); + case 'null': + return '\\' + codePoint; + case 'octal': + return '\\' + codePoint.toString(8); + case 'singleEscape': + switch (codePoint) { + case 0x0008: + return '\\b'; + case 0x009: + return '\\t'; + case 0x00A: + return '\\n'; + case 0x00B: + return '\\v'; + case 0x00C: + return '\\f'; + case 0x00D: + return '\\r'; + default: + throw Error('Invalid codepoint: ' + codePoint); + } + case 'symbol': + return fromCodePoint(codePoint); + case 'unicodeEscape': + return '\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4); + case 'unicodeCodePointEscape': + return '\\u{' + codePoint.toString(16).toUpperCase() + '}'; + default: + throw Error('Unsupported node kind: ' + kind); + } + } + + /*--------------------------------------------------------------------------*/ + + generate.alternative = generateAlternative; + generate.anchor = generateAnchor; + generate.characterClass = generateCharacterClass; + generate.characterClassEscape = generateCharacterClassEscape; + generate.characterClassRange = generateCharacterClassRange; + generate.disjunction = generateDisjunction; + generate.dot = generateDot; + generate.group = generateGroup; + generate.quantifier = generateQuantifier; + generate.reference = generateReference; + generate.value = generateValue; + + /*--------------------------------------------------------------------------*/ + + // export regjsgen + // some AMD build optimizers, like r.js, check for condition patterns like the following: + if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // define as an anonymous module so, through path mapping, it can be aliased + define(function() { + return { + 'generate': generate + }; + }); + } + // check for `exports` after `define` in case a build optimizer adds an `exports` object + else if (freeExports && freeModule) { + // in Narwhal, Node.js, Rhino -require, or RingoJS + freeExports.generate = generate; + } + // in a browser or Rhino + else { + root.regjsgen = { + 'generate': generate + }; + } +}.call(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],519:[function(require,module,exports){ +// regjsparser +// +// ================================================================== +// +// See ECMA-262 Standard: 15.10.1 +// +// NOTE: The ECMA-262 standard uses the term "Assertion" for /^/. Here the +// term "Anchor" is used. +// +// Pattern :: +// Disjunction +// +// Disjunction :: +// Alternative +// Alternative | Disjunction +// +// Alternative :: +// [empty] +// Alternative Term +// +// Term :: +// Anchor +// Atom +// Atom Quantifier +// +// Anchor :: +// ^ +// $ +// \ b +// \ B +// ( ? = Disjunction ) +// ( ? ! Disjunction ) +// +// Quantifier :: +// QuantifierPrefix +// QuantifierPrefix ? +// +// QuantifierPrefix :: +// * +// + +// ? +// { DecimalDigits } +// { DecimalDigits , } +// { DecimalDigits , DecimalDigits } +// +// Atom :: +// PatternCharacter +// . +// \ AtomEscape +// CharacterClass +// ( Disjunction ) +// ( ? : Disjunction ) +// +// PatternCharacter :: +// SourceCharacter but not any of: ^ $ \ . * + ? ( ) [ ] { } | +// +// AtomEscape :: +// DecimalEscape +// CharacterEscape +// CharacterClassEscape +// +// CharacterEscape[U] :: +// ControlEscape +// c ControlLetter +// HexEscapeSequence +// RegExpUnicodeEscapeSequence[?U] (ES6) +// IdentityEscape[?U] +// +// ControlEscape :: +// one of f n r t v +// ControlLetter :: +// one of +// a b c d e f g h i j k l m n o p q r s t u v w x y z +// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z +// +// IdentityEscape :: +// SourceCharacter but not IdentifierPart +// +// +// +// DecimalEscape :: +// DecimalIntegerLiteral [lookahead ∉ DecimalDigit] +// +// CharacterClassEscape :: +// one of d D s S w W +// +// CharacterClass :: +// [ [lookahead ∉ {^}] ClassRanges ] +// [ ^ ClassRanges ] +// +// ClassRanges :: +// [empty] +// NonemptyClassRanges +// +// NonemptyClassRanges :: +// ClassAtom +// ClassAtom NonemptyClassRangesNoDash +// ClassAtom - ClassAtom ClassRanges +// +// NonemptyClassRangesNoDash :: +// ClassAtom +// ClassAtomNoDash NonemptyClassRangesNoDash +// ClassAtomNoDash - ClassAtom ClassRanges +// +// ClassAtom :: +// - +// ClassAtomNoDash +// +// ClassAtomNoDash :: +// SourceCharacter but not one of \ or ] or - +// \ ClassEscape +// +// ClassEscape :: +// DecimalEscape +// b +// CharacterEscape +// CharacterClassEscape + +(function() { + + function parse(str, flags) { + function addRaw(node) { + node.raw = str.substring(node.range[0], node.range[1]); + return node; + } + + function updateRawStart(node, start) { + node.range[0] = start; + return addRaw(node); + } + + function createAnchor(kind, rawLength) { + return addRaw({ + type: 'anchor', + kind: kind, + range: [ + pos - rawLength, + pos + ] + }); + } + + function createValue(kind, codePoint, from, to) { + return addRaw({ + type: 'value', + kind: kind, + codePoint: codePoint, + range: [from, to] + }); + } + + function createEscaped(kind, codePoint, value, fromOffset) { + fromOffset = fromOffset || 0; + return createValue(kind, codePoint, pos - (value.length + fromOffset), pos); + } + + function createCharacter(matches) { + var _char = matches[0]; + var first = _char.charCodeAt(0); + if (hasUnicodeFlag) { + var second; + if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) { + second = lookahead().charCodeAt(0); + if (second >= 0xDC00 && second <= 0xDFFF) { + // Unicode surrogate pair + pos++; + return createValue( + 'symbol', + (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000, + pos - 2, pos); + } + } + } + return createValue('symbol', first, pos - 1, pos); + } + + function createDisjunction(alternatives, from, to) { + return addRaw({ + type: 'disjunction', + body: alternatives, + range: [ + from, + to + ] + }); + } + + function createDot() { + return addRaw({ + type: 'dot', + range: [ + pos - 1, + pos + ] + }); + } + + function createCharacterClassEscape(value) { + return addRaw({ + type: 'characterClassEscape', + value: value, + range: [ + pos - 2, + pos + ] + }); + } + + function createReference(matchIndex) { + return addRaw({ + type: 'reference', + matchIndex: parseInt(matchIndex, 10), + range: [ + pos - 1 - matchIndex.length, + pos + ] + }); + } + + function createGroup(behavior, disjunction, from, to) { + return addRaw({ + type: 'group', + behavior: behavior, + body: disjunction, + range: [ + from, + to + ] + }); + } + + function createQuantifier(min, max, from, to) { + if (to == null) { + from = pos - 1; + to = pos; + } + + return addRaw({ + type: 'quantifier', + min: min, + max: max, + greedy: true, + body: null, // set later on, + range: [ + from, + to + ] + }); + } + + function createAlternative(terms, from, to) { + return addRaw({ + type: 'alternative', + body: terms, + range: [ + from, + to + ] + }); + } + + function createCharacterClass(classRanges, negative, from, to) { + return addRaw({ + type: 'characterClass', + body: classRanges, + negative: negative, + range: [ + from, + to + ] + }); + } + + function createClassRange(min, max, from, to) { + // See 15.10.2.15: + if (min.codePoint > max.codePoint) { + throw SyntaxError('invalid range in character class'); + } + + return addRaw({ + type: 'characterClassRange', + min: min, + max: max, + range: [ + from, + to + ] + }); + } + + function flattenBody(body) { + if (body.type === 'alternative') { + return body.body; + } else { + return [body]; + } + } + + function isEmpty(obj) { + return obj.type === 'empty'; + } + + function incr(amount) { + amount = (amount || 1); + var res = str.substring(pos, pos + amount); + pos += (amount || 1); + return res; + } + + function skip(value) { + if (!match(value)) { + throw SyntaxError('character: ' + value); + } + } + + function match(value) { + if (str.indexOf(value, pos) === pos) { + return incr(value.length); + } + } + + function lookahead() { + return str[pos]; + } + + function current(value) { + return str.indexOf(value, pos) === pos; + } + + function next(value) { + return str[pos + 1] === value; + } + + function matchReg(regExp) { + var subStr = str.substring(pos); + var res = subStr.match(regExp); + if (res) { + res.range = []; + res.range[0] = pos; + incr(res[0].length); + res.range[1] = pos; + } + return res; + } + + function parseDisjunction() { + // Disjunction :: + // Alternative + // Alternative | Disjunction + var res = [], from = pos; + res.push(parseAlternative()); + + while (match('|')) { + res.push(parseAlternative()); + } + + if (res.length === 1) { + return res[0]; + } + + return createDisjunction(res, from, pos); + } + + function parseAlternative() { + var res = [], from = pos; + var term; + + // Alternative :: + // [empty] + // Alternative Term + while (term = parseTerm()) { + res.push(term); + } + + if (res.length === 1) { + return res[0]; + } + + return createAlternative(res, from, pos); + } + + function parseTerm() { + // Term :: + // Anchor + // Atom + // Atom Quantifier + + if (pos >= str.length || current('|') || current(')')) { + return null; /* Means: The term is empty */ + } + + var anchor = parseAnchor(); + + if (anchor) { + return anchor; + } + + var atom = parseAtom(); + if (!atom) { + throw SyntaxError('Expected atom') + } + var quantifier = parseQuantifier() || false; + if (quantifier) { + quantifier.body = flattenBody(atom); + // The quantifier contains the atom. Therefore, the beginning of the + // quantifier range is given by the beginning of the atom. + updateRawStart(quantifier, atom.range[0]); + return quantifier; + } + return atom; + } + + function parseGroup(matchA, typeA, matchB, typeB) { + var type = null, from = pos; + + if (match(matchA)) { + type = typeA; + } else if (match(matchB)) { + type = typeB; + } else { + return false; + } + + var body = parseDisjunction(); + if (!body) { + throw SyntaxError('Expected disjunction'); + } + skip(')'); + var group = createGroup(type, flattenBody(body), from, pos); + + if (type == 'normal') { + // Keep track of the number of closed groups. This is required for + // parseDecimalEscape(). In case the string is parsed a second time the + // value already holds the total count and no incrementation is required. + if (firstIteration) { + closedCaptureCounter++; + } + } + return group; + } + + function parseAnchor() { + // Anchor :: + // ^ + // $ + // \ b + // \ B + // ( ? = Disjunction ) + // ( ? ! Disjunction ) + var res, from = pos; + + if (match('^')) { + return createAnchor('start', 1 /* rawLength */); + } else if (match('$')) { + return createAnchor('end', 1 /* rawLength */); + } else if (match('\\b')) { + return createAnchor('boundary', 2 /* rawLength */); + } else if (match('\\B')) { + return createAnchor('not-boundary', 2 /* rawLength */); + } else { + return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead'); + } + } + + function parseQuantifier() { + // Quantifier :: + // QuantifierPrefix + // QuantifierPrefix ? + // + // QuantifierPrefix :: + // * + // + + // ? + // { DecimalDigits } + // { DecimalDigits , } + // { DecimalDigits , DecimalDigits } + + var res; + var quantifier; + var min, max; + + if (match('*')) { + quantifier = createQuantifier(0); + } + else if (match('+')) { + quantifier = createQuantifier(1); + } + else if (match('?')) { + quantifier = createQuantifier(0, 1); + } + else if (res = matchReg(/^\{([0-9]+)\}/)) { + min = parseInt(res[1], 10); + quantifier = createQuantifier(min, min, res.range[0], res.range[1]); + } + else if (res = matchReg(/^\{([0-9]+),\}/)) { + min = parseInt(res[1], 10); + quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]); + } + else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) { + min = parseInt(res[1], 10); + max = parseInt(res[2], 10); + if (min > max) { + throw SyntaxError('numbers out of order in {} quantifier'); + } + quantifier = createQuantifier(min, max, res.range[0], res.range[1]); + } + + if (quantifier) { + if (match('?')) { + quantifier.greedy = false; + quantifier.range[1] += 1; + } + } + + return quantifier; + } + + function parseAtom() { + // Atom :: + // PatternCharacter + // . + // \ AtomEscape + // CharacterClass + // ( Disjunction ) + // ( ? : Disjunction ) + + var res; + + // jviereck: allow ']', '}' here as well to be compatible with browser's + // implementations: ']'.match(/]/); + // if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) { + if (res = matchReg(/^[^^$\\.*+?(){[|]/)) { + // PatternCharacter + return createCharacter(res); + } + else if (match('.')) { + // . + return createDot(); + } + else if (match('\\')) { + // \ AtomEscape + res = parseAtomEscape(); + if (!res) { + throw SyntaxError('atomEscape'); + } + return res; + } + else if (res = parseCharacterClass()) { + return res; + } + else { + // ( Disjunction ) + // ( ? : Disjunction ) + return parseGroup('(?:', 'ignore', '(', 'normal'); + } + } + + function parseUnicodeSurrogatePairEscape(firstEscape) { + if (hasUnicodeFlag) { + var first, second; + if (firstEscape.kind == 'unicodeEscape' && + (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF && + current('\\') && next('u') ) { + var prevPos = pos; + pos++; + var secondEscape = parseClassEscape(); + if (secondEscape.kind == 'unicodeEscape' && + (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) { + // Unicode surrogate pair + firstEscape.range[1] = secondEscape.range[1]; + firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + firstEscape.type = 'value'; + firstEscape.kind = 'unicodeCodePointEscape'; + addRaw(firstEscape); + } + else { + pos = prevPos; + } + } + } + return firstEscape; + } + + function parseClassEscape() { + return parseAtomEscape(true); + } + + function parseAtomEscape(insideCharacterClass) { + // AtomEscape :: + // DecimalEscape + // CharacterEscape + // CharacterClassEscape + + var res; + + res = parseDecimalEscape(); + if (res) { + return res; + } + + // For ClassEscape + if (insideCharacterClass) { + if (match('b')) { + // 15.10.2.19 + // The production ClassEscape :: b evaluates by returning the + // CharSet containing the one character (Unicode value 0008). + return createEscaped('singleEscape', 0x0008, '\\b'); + } else if (match('B')) { + throw SyntaxError('\\B not possible inside of CharacterClass'); + } + } + + res = parseCharacterEscape(); + + return res; + } + + + function parseDecimalEscape() { + // DecimalEscape :: + // DecimalIntegerLiteral [lookahead ∉ DecimalDigit] + // CharacterClassEscape :: one of d D s S w W + + var res, match; + + if (res = matchReg(/^(?!0)\d+/)) { + match = res[0]; + var refIdx = parseInt(res[0], 10); + if (refIdx <= closedCaptureCounter) { + // If the number is smaller than the normal-groups found so + // far, then it is a reference... + return createReference(res[0]); + } else { + // ... otherwise it needs to be interpreted as a octal (if the + // number is in an octal format). If it is NOT octal format, + // then the slash is ignored and the number is matched later + // as normal characters. + + // Recall the negative decision to decide if the input must be parsed + // a second time with the total normal-groups. + backrefDenied.push(refIdx); + + // Reset the position again, as maybe only parts of the previous + // matched numbers are actual octal numbers. E.g. in '019' only + // the '01' should be matched. + incr(-res[0].length); + if (res = matchReg(/^[0-7]{1,3}/)) { + return createEscaped('octal', parseInt(res[0], 8), res[0], 1); + } else { + // If we end up here, we have a case like /\91/. Then the + // first slash is to be ignored and the 9 & 1 to be treated + // like ordinary characters. Create a character for the + // first number only here - other number-characters + // (if available) will be matched later. + res = createCharacter(matchReg(/^[89]/)); + return updateRawStart(res, res.range[0] - 1); + } + } + } + // Only allow octal numbers in the following. All matched numbers start + // with a zero (if the do not, the previous if-branch is executed). + // If the number is not octal format and starts with zero (e.g. `091`) + // then only the zeros `0` is treated here and the `91` are ordinary + // characters. + // Example: + // /\091/.exec('\091')[0].length === 3 + else if (res = matchReg(/^[0-7]{1,3}/)) { + match = res[0]; + if (/^0{1,3}$/.test(match)) { + // If they are all zeros, then only take the first one. + return createEscaped('null', 0x0000, '0', match.length + 1); + } else { + return createEscaped('octal', parseInt(match, 8), match, 1); + } + } else if (res = matchReg(/^[dDsSwW]/)) { + return createCharacterClassEscape(res[0]); + } + return false; + } + + function parseCharacterEscape() { + // CharacterEscape :: + // ControlEscape + // c ControlLetter + // HexEscapeSequence + // UnicodeEscapeSequence + // IdentityEscape + + var res; + if (res = matchReg(/^[fnrtv]/)) { + // ControlEscape + var codePoint = 0; + switch (res[0]) { + case 't': codePoint = 0x009; break; + case 'n': codePoint = 0x00A; break; + case 'v': codePoint = 0x00B; break; + case 'f': codePoint = 0x00C; break; + case 'r': codePoint = 0x00D; break; + } + return createEscaped('singleEscape', codePoint, '\\' + res[0]); + } else if (res = matchReg(/^c([a-zA-Z])/)) { + // c ControlLetter + return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2); + } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) { + // HexEscapeSequence + return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2); + } else if (res = matchReg(/^u([0-9a-fA-F]{4})/)) { + // UnicodeEscapeSequence + return parseUnicodeSurrogatePairEscape( + createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2) + ); + } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) { + // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape) + return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4); + } else { + // IdentityEscape + return parseIdentityEscape(); + } + } + + // Taken from the Esprima parser. + function isIdentifierPart(ch) { + // Generated by `tools/generate-identifier-regex.js`. + var NonAsciiIdentifierPart = new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]'); + + return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) + (ch >= 65 && ch <= 90) || // A..Z + (ch >= 97 && ch <= 122) || // a..z + (ch >= 48 && ch <= 57) || // 0..9 + (ch === 92) || // \ (backslash) + ((ch >= 0x80) && NonAsciiIdentifierPart.test(String.fromCharCode(ch))); + } + + function parseIdentityEscape() { + // IdentityEscape :: + // SourceCharacter but not IdentifierPart + // + // + + var ZWJ = '\u200C'; + var ZWNJ = '\u200D'; + + var res; + var tmp; + + if (!isIdentifierPart(lookahead())) { + tmp = incr(); + return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1); + } + + if (match(ZWJ)) { + // + return createEscaped('identifier', 0x200C, ZWJ); + } else if (match(ZWNJ)) { + // + return createEscaped('identifier', 0x200D, ZWNJ); + } + + return null; + } + + function parseCharacterClass() { + // CharacterClass :: + // [ [lookahead ∉ {^}] ClassRanges ] + // [ ^ ClassRanges ] + + var res, from = pos; + if (res = matchReg(/^\[\^/)) { + res = parseClassRanges(); + skip(']'); + return createCharacterClass(res, true, from, pos); + } else if (match('[')) { + res = parseClassRanges(); + skip(']'); + return createCharacterClass(res, false, from, pos); + } + + return null; + } + + function parseClassRanges() { + // ClassRanges :: + // [empty] + // NonemptyClassRanges + + var res; + if (current(']')) { + // Empty array means nothing insinde of the ClassRange. + return []; + } else { + res = parseNonemptyClassRanges(); + if (!res) { + throw SyntaxError('nonEmptyClassRanges'); + } + return res; + } + } + + function parseHelperClassRanges(atom) { + var from, to, res; + if (current('-') && !next(']')) { + // ClassAtom - ClassAtom ClassRanges + skip('-'); + + res = parseClassAtom(); + if (!res) { + throw SyntaxError('classAtom'); + } + to = pos; + var classRanges = parseClassRanges(); + if (!classRanges) { + throw SyntaxError('classRanges'); + } + from = atom.range[0]; + if (classRanges.type === 'empty') { + return [createClassRange(atom, res, from, to)]; + } + return [createClassRange(atom, res, from, to)].concat(classRanges); + } + + res = parseNonemptyClassRangesNoDash(); + if (!res) { + throw SyntaxError('nonEmptyClassRangesNoDash'); + } + + return [atom].concat(res); + } + + function parseNonemptyClassRanges() { + // NonemptyClassRanges :: + // ClassAtom + // ClassAtom NonemptyClassRangesNoDash + // ClassAtom - ClassAtom ClassRanges + + var atom = parseClassAtom(); + if (!atom) { + throw SyntaxError('classAtom'); + } + + if (current(']')) { + // ClassAtom + return [atom]; + } + + // ClassAtom NonemptyClassRangesNoDash + // ClassAtom - ClassAtom ClassRanges + return parseHelperClassRanges(atom); + } + + function parseNonemptyClassRangesNoDash() { + // NonemptyClassRangesNoDash :: + // ClassAtom + // ClassAtomNoDash NonemptyClassRangesNoDash + // ClassAtomNoDash - ClassAtom ClassRanges + + var res = parseClassAtom(); + if (!res) { + throw SyntaxError('classAtom'); + } + if (current(']')) { + // ClassAtom + return res; + } + + // ClassAtomNoDash NonemptyClassRangesNoDash + // ClassAtomNoDash - ClassAtom ClassRanges + return parseHelperClassRanges(res); + } + + function parseClassAtom() { + // ClassAtom :: + // - + // ClassAtomNoDash + if (match('-')) { + return createCharacter('-'); + } else { + return parseClassAtomNoDash(); + } + } + + function parseClassAtomNoDash() { + // ClassAtomNoDash :: + // SourceCharacter but not one of \ or ] or - + // \ ClassEscape + + var res; + if (res = matchReg(/^[^\\\]-]/)) { + return createCharacter(res[0]); + } else if (match('\\')) { + res = parseClassEscape(); + if (!res) { + throw SyntaxError('classEscape'); + } + + return parseUnicodeSurrogatePairEscape(res); + } + } + + var backrefDenied = []; + var closedCaptureCounter = 0; + var firstIteration = true; + var hasUnicodeFlag = (flags || "").indexOf("u") !== -1; + var pos = 0; + + // Convert the input to a string and treat the empty string special. + str = String(str); + if (str === '') { + str = '(?:)'; + } + + var result = parseDisjunction(); + + if (result.range[1] !== str.length) { + throw SyntaxError('Could not parse entire input - got stuck: ' + str); + } + + // The spec requires to interpret the `\2` in `/\2()()/` as backreference. + // As the parser collects the number of capture groups as the string is + // parsed it is impossible to make these decisions at the point the `\2` is + // handled. In case the local decision turns out to be wrongq after the + // parsing has finished, the input string is parsed a second time with the + // total count of capture groups set. + // + // SEE: https://github.com/jviereck/regjsparser/issues/70 + for (var i = 0; i < backrefDenied.length; i++) { + if (backrefDenied[i] <= closedCaptureCounter) { + // Parse the input a second time. + pos = 0; + firstIteration = false; + return parseDisjunction(); + } + } + + return result; + }; + + var regjsparser = { + parse: parse + }; + + if (typeof module !== 'undefined' && module.exports) { + module.exports = regjsparser; + } else { + window.regjsparser = regjsparser; + } + +}()); + +},{}],520:[function(require,module,exports){ +var generate = require('regjsgen').generate; +var parse = require('regjsparser').parse; +var regenerate = require('regenerate'); +var iuMappings = require('./data/iu-mappings.json'); +var ESCAPE_SETS = require('./data/character-class-escape-sets.js'); + +function getCharacterClassEscapeSet(character) { + if (unicode) { + if (ignoreCase) { + return ESCAPE_SETS.UNICODE_IGNORE_CASE[character]; + } + return ESCAPE_SETS.UNICODE[character]; + } + return ESCAPE_SETS.REGULAR[character]; +} + +var object = {}; +var hasOwnProperty = object.hasOwnProperty; +function has(object, property) { + return hasOwnProperty.call(object, property); +} + +// Prepare a Regenerate set containing all code points, used for negative +// character classes (if any). +var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF); +// Without the `u` flag, the range stops at 0xFFFF. +// https://mths.be/es6#sec-pattern-semantics +var BMP_SET = regenerate().addRange(0x0, 0xFFFF); + +// Prepare a Regenerate set containing all code points that are supposed to be +// matched by `/./u`. https://mths.be/es6#sec-atom +var DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points + .remove( + // minus `LineTerminator`s (https://mths.be/es6#sec-line-terminators): + 0x000A, // Line Feed + 0x000D, // Carriage Return + 0x2028, // Line Separator + 0x2029 // Paragraph Separator + ); +// Prepare a Regenerate set containing all code points that are supposed to be +// matched by `/./` (only BMP code points). +var DOT_SET = DOT_SET_UNICODE.clone() + .intersection(BMP_SET); + +// Add a range of code points + any case-folded code points in that range to a +// set. +regenerate.prototype.iuAddRange = function(min, max) { + var $this = this; + do { + var folded = caseFold(min); + if (folded) { + $this.add(folded); + } + } while (++min <= max); + return $this; +}; + +function assign(target, source) { + for (var key in source) { + // Note: `hasOwnProperty` is not needed here. + target[key] = source[key]; + } +} + +function update(item, pattern) { + // TODO: Test if memoizing `pattern` here is worth the effort. + if (!pattern) { + return; + } + var tree = parse(pattern, ''); + switch (tree.type) { + case 'characterClass': + case 'group': + case 'value': + // No wrapping needed. + break; + default: + // Wrap the pattern in a non-capturing group. + tree = wrap(tree, pattern); + } + assign(item, tree); +} + +function wrap(tree, pattern) { + // Wrap the pattern in a non-capturing group. + return { + 'type': 'group', + 'behavior': 'ignore', + 'body': [tree], + 'raw': '(?:' + pattern + ')' + }; +} + +function caseFold(codePoint) { + return has(iuMappings, codePoint) ? iuMappings[codePoint] : false; +} + +var ignoreCase = false; +var unicode = false; +function processCharacterClass(characterClassItem) { + var set = regenerate(); + var body = characterClassItem.body.forEach(function(item) { + switch (item.type) { + case 'value': + set.add(item.codePoint); + if (ignoreCase && unicode) { + var folded = caseFold(item.codePoint); + if (folded) { + set.add(folded); + } + } + break; + case 'characterClassRange': + var min = item.min.codePoint; + var max = item.max.codePoint; + set.addRange(min, max); + if (ignoreCase && unicode) { + set.iuAddRange(min, max); + } + break; + case 'characterClassEscape': + set.add(getCharacterClassEscapeSet(item.value)); + break; + // The `default` clause is only here as a safeguard; it should never be + // reached. Code coverage tools should ignore it. + /* istanbul ignore next */ + default: + throw Error('Unknown term type: ' + item.type); + } + }); + if (characterClassItem.negative) { + set = (unicode ? UNICODE_SET : BMP_SET).clone().remove(set); + } + update(characterClassItem, set.toString()); + return characterClassItem; +} + +function processTerm(item) { + switch (item.type) { + case 'dot': + update( + item, + (unicode ? DOT_SET_UNICODE : DOT_SET).toString() + ); + break; + case 'characterClass': + item = processCharacterClass(item); + break; + case 'characterClassEscape': + update( + item, + getCharacterClassEscapeSet(item.value).toString() + ); + break; + case 'alternative': + case 'disjunction': + case 'group': + case 'quantifier': + item.body = item.body.map(processTerm); + break; + case 'value': + var codePoint = item.codePoint; + var set = regenerate(codePoint); + if (ignoreCase && unicode) { + var folded = caseFold(codePoint); + if (folded) { + set.add(folded); + } + } + update(item, set.toString()); + break; + case 'anchor': + case 'empty': + case 'group': + case 'reference': + // Nothing to do here. + break; + // The `default` clause is only here as a safeguard; it should never be + // reached. Code coverage tools should ignore it. + /* istanbul ignore next */ + default: + throw Error('Unknown term type: ' + item.type); + } + return item; +}; + +module.exports = function(pattern, flags) { + var tree = parse(pattern, flags); + ignoreCase = flags ? flags.indexOf('i') > -1 : false; + unicode = flags ? flags.indexOf('u') > -1 : false; + assign(tree, processTerm(tree)); + return generate(tree); +}; + +},{"./data/character-class-escape-sets.js":515,"./data/iu-mappings.json":516,"regenerate":517,"regjsgen":518,"regjsparser":519}],521:[function(require,module,exports){ +'use strict'; +var isFinite = require('is-finite'); + +module.exports = function (str, n) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string as the first argument'); + } + + if (n < 0 || !isFinite(n)) { + throw new TypeError('Expected a finite positive number'); + } + + var ret = ''; + + do { + if (n & 1) { + ret += str; + } + + str += str; + } while (n = n >> 1); + + return ret; +}; + +},{"is-finite":522}],522:[function(require,module,exports){ +arguments[4][347][0].apply(exports,arguments) +},{"dup":347,"number-is-nan":523}],523:[function(require,module,exports){ +arguments[4][348][0].apply(exports,arguments) +},{"dup":348}],524:[function(require,module,exports){ +'use strict'; +module.exports = /^#!.*/; + +},{}],525:[function(require,module,exports){ +'use strict'; +module.exports = function (str) { + var isExtendedLengthPath = /^\\\\\?\\/.test(str); + var hasNonAscii = /[^\x00-\x80]+/.test(str); + + if (isExtendedLengthPath || hasNonAscii) { + return str; + } + + return str.replace(/\\/g, '/'); +}; + +},{}],526:[function(require,module,exports){ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./source-map/source-node').SourceNode; + +},{"./source-map/source-map-consumer":532,"./source-map/source-map-generator":533,"./source-map/source-node":534}],527:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = {}; + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var isDuplicate = this.has(aStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[util.toSetString(aStr)] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + return Object.prototype.hasOwnProperty.call(this._set, + util.toSetString(aStr)); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (this.has(aStr)) { + return this._set[util.toSetString(aStr)]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + +}); + +},{"./util":535,"amdefine":536}],528:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. 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. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 THE COPYRIGHT + * OWNER OR CONTRIBUTORS 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. + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64 = require('./base64'); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charAt(aIndex++)); + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + +}); + +},{"./base64":529,"amdefine":536}],529:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var charToIntMap = {}; + var intToCharMap = {}; + + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + .split('') + .forEach(function (ch, index) { + charToIntMap[ch] = index; + intToCharMap[index] = ch; + }); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function base64_encode(aNumber) { + if (aNumber in intToCharMap) { + return intToCharMap[aNumber]; + } + throw new TypeError("Must be between 0 and 63: " + aNumber); + }; + + /** + * Decode a single base 64 digit to an integer. + */ + exports.decode = function base64_decode(aChar) { + if (aChar in charToIntMap) { + return charToIntMap[aChar]; + } + throw new TypeError("Not a valid base 64 digit: " + aChar); + }; + +}); + +},{"amdefine":536}],530:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + +}); + +},{"amdefine":536}],531:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositions(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + var mapping; + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositions); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + +}); + +},{"./util":535,"amdefine":536}],532:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + var binarySearch = require('./binary-search'); + var ArraySet = require('./array-set').ArraySet; + var base64VLQ = require('./base64-vlq'); + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._nextCharIsMappingSeparator = + function SourceMapConsumer_nextCharIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source; + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name + }; + }).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a single line. Otherwise, returns all mappings + * corresponding to a single line and column. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + var originalLine = mapping.originalLine; + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line. Since mappings are sorted, this is + // guaranteed to find all mappings for the line we are searching for. + while (mapping && mapping.originalLine === originalLine && + (aArgs.column === undefined || + mapping.originalColumn === originalColumn)) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + sources = sources.map(util.normalize); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names, true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + smc.__generatedMappings = aSourceMap._mappings.toArray().slice(); + smc.__originalMappings = aSourceMap._mappings.toArray().slice() + .sort(util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedValues = {}; + var temp = {}; + var mapping, str, values, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + ++index; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + ++index; + } + else { + mapping = {}; + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; ++end) { + if (this._nextCharIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + values = cachedValues[str]; + if (values) { + index += str.length; + } else { + values = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + values.push(value); + } + cachedValues[str] = values; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + values[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (values.length > 1) { + // Original source. + mapping.source = this._sources.at(previousSource + values[1]); + previousSource += values[1]; + if (values.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + // Original line. + mapping.originalLine = previousOriginalLine + values[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + if (values.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + // Original column. + mapping.originalColumn = previousOriginalColumn + values[3]; + previousOriginalColumn = mapping.originalColumn; + + if (values.length > 4) { + // Original name. + mapping.name = this._names.at(previousName + values[4]); + previousName += values[4]; + } + } + + this.__generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + this.__originalMappings.push(mapping); + } + } + } + + this.__generatedMappings.sort(util.compareByGeneratedPositions); + this.__originalMappings.sort(util.compareByOriginalPositions); + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source != null && this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: util.getArg(mapping, 'name', null) + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * availible. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + }; + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[i]; + + var source = mapping.source; + var sourceRoot = section.consumer.sourceRoot; + + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.column + + (section.generatedOffset.generatedLine === mapping.generatedLine) + ? section.generatedOffset.generatedColumn - 1 + : 0, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + }; + }; + + this.__generatedMappings.sort(util.compareByGeneratedPositions); + this.__originalMappings.sort(util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + +}); + +},{"./array-set":527,"./base64-vlq":528,"./binary-search":530,"./util":535,"amdefine":536}],533:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64VLQ = require('./base64-vlq'); + var util = require('./util'); + var ArraySet = require('./array-set').ArraySet; + var MappingList = require('./mapping-list').MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null && !this._sources.has(source)) { + this._sources.add(source); + } + + if (name != null && !this._names.has(name)) { + this._names.add(name); + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = {}; + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var mapping; + + var mappings = this._mappings.toArray(); + + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + result += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositions(mapping, mappings[i - 1])) { + continue; + } + result += ','; + } + } + + result += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + result += base64VLQ.encode(this._sources.indexOf(mapping.source) + - previousSource); + previousSource = this._sources.indexOf(mapping.source); + + // lines are stored 0-based in SourceMap spec version 3 + result += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + result += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + result += base64VLQ.encode(this._names.indexOf(mapping.name) + - previousName); + previousName = this._names.indexOf(mapping.name); + } + } + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, + key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + +}); + +},{"./array-set":527,"./base64-vlq":528,"./mapping-list":531,"./util":535,"amdefine":536}],534:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; + var util = require('./util'); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + var code = ""; + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + +}); + +},{"./source-map-generator":533,"./util":535,"amdefine":536}],535:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consequtive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = (path.charAt(0) === '/'); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // XXX: It is possible to remove this block, and the tests still pass! + var url = urlParse(aRoot); + if (aPath.charAt(0) == "/" && url && url.path == "/") { + return aPath.slice(1); + } + + return aPath.indexOf(aRoot + '/') === 0 + ? aPath.substr(aRoot.length + 1) + : aPath; + } + exports.relative = relative; + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + return '$' + aStr; + } + exports.toSetString = toSetString; + + function fromSetString(aStr) { + return aStr.substr(1); + } + exports.fromSetString = fromSetString; + + function strcmp(aStr1, aStr2) { + var s1 = aStr1 || ""; + var s2 = aStr2 || ""; + return (s1 > s2) - (s1 < s2); + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp; + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + }; + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings where the generated positions are + * compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { + var cmp; + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + }; + exports.compareByGeneratedPositions = compareByGeneratedPositions; + +}); + +},{"amdefine":536}],536:[function(require,module,exports){ +(function (process,__filename){ +/** vim: et:ts=4:sw=4:sts=4 + * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/amdefine for details + */ + +/*jslint node: true */ +/*global module, process */ +'use strict'; + +/** + * Creates a define for node. + * @param {Object} module the "module" object that is defined by Node for the + * current module. + * @param {Function} [requireFn]. Node's require function for the current module. + * It only needs to be passed in Node versions before 0.5, when module.require + * did not exist. + * @returns {Function} a define function that is usable for the current node + * module. + */ +function amdefine(module, requireFn) { + 'use strict'; + var defineCache = {}, + loaderCache = {}, + alreadyCalled = false, + path = require('path'), + makeRequire, stringRequire; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part; + for (i = 0; ary[i]; i+= 1) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { + //End of the line. Keep at least one non-dot + //path segment at the front so it can be mapped + //correctly to disk. Otherwise, there is likely + //no path mapping for a path starting with '..'. + //This can still fail, but catches the most reasonable + //uses of .. + break; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + function normalize(name, baseName) { + var baseParts; + + //Adjust any relative paths. + if (name && name.charAt(0) === '.') { + //If have a base name, try to normalize against it, + //otherwise, assume it is a top-level require that will + //be relative to baseUrl in the end. + if (baseName) { + baseParts = baseName.split('/'); + baseParts = baseParts.slice(0, baseParts.length - 1); + baseParts = baseParts.concat(name.split('/')); + trimDots(baseParts); + name = baseParts.join('/'); + } + } + + return name; + } + + /** + * Create the normalize() function passed to a loader plugin's + * normalize method. + */ + function makeNormalize(relName) { + return function (name) { + return normalize(name, relName); + }; + } + + function makeLoad(id) { + function load(value) { + loaderCache[id] = value; + } + + load.fromText = function (id, text) { + //This one is difficult because the text can/probably uses + //define, and any relative paths and requires should be relative + //to that id was it would be found on disk. But this would require + //bootstrapping a module/require fairly deeply from node core. + //Not sure how best to go about that yet. + throw new Error('amdefine does not implement load.fromText'); + }; + + return load; + } + + makeRequire = function (systemRequire, exports, module, relId) { + function amdRequire(deps, callback) { + if (typeof deps === 'string') { + //Synchronous, single module require('') + return stringRequire(systemRequire, exports, module, deps, relId); + } else { + //Array of dependencies with a callback. + + //Convert the dependencies to modules. + deps = deps.map(function (depName) { + return stringRequire(systemRequire, exports, module, depName, relId); + }); + + //Wait for next tick to call back the require call. + if (callback) { + process.nextTick(function () { + callback.apply(null, deps); + }); + } + } + } + + amdRequire.toUrl = function (filePath) { + if (filePath.indexOf('.') === 0) { + return normalize(filePath, path.dirname(module.filename)); + } else { + return filePath; + } + }; + + return amdRequire; + }; + + //Favor explicit value, passed in if the module wants to support Node 0.4. + requireFn = requireFn || function req() { + return module.require.apply(module, arguments); + }; + + function runFactory(id, deps, factory) { + var r, e, m, result; + + if (id) { + e = loaderCache[id] = {}; + m = { + id: id, + uri: __filename, + exports: e + }; + r = makeRequire(requireFn, e, m, id); + } else { + //Only support one define call per file + if (alreadyCalled) { + throw new Error('amdefine with no module ID cannot be called more than once per file.'); + } + alreadyCalled = true; + + //Use the real variables from node + //Use module.exports for exports, since + //the exports in here is amdefine exports. + e = module.exports; + m = module; + r = makeRequire(requireFn, e, m, module.id); + } + + //If there are dependencies, they are strings, so need + //to convert them to dependency values. + if (deps) { + deps = deps.map(function (depName) { + return r(depName); + }); + } + + //Call the factory with the right dependencies. + if (typeof factory === 'function') { + result = factory.apply(m.exports, deps); + } else { + result = factory; + } + + if (result !== undefined) { + m.exports = result; + if (id) { + loaderCache[id] = m.exports; + } + } + } + + stringRequire = function (systemRequire, exports, module, id, relId) { + //Split the ID by a ! so that + var index = id.indexOf('!'), + originalId = id, + prefix, plugin; + + if (index === -1) { + id = normalize(id, relId); + + //Straight module lookup. If it is one of the special dependencies, + //deal with it, otherwise, delegate to node. + if (id === 'require') { + return makeRequire(systemRequire, exports, module, relId); + } else if (id === 'exports') { + return exports; + } else if (id === 'module') { + return module; + } else if (loaderCache.hasOwnProperty(id)) { + return loaderCache[id]; + } else if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } else { + if(systemRequire) { + return systemRequire(originalId); + } else { + throw new Error('No module with ID: ' + id); + } + } + } else { + //There is a plugin in play. + prefix = id.substring(0, index); + id = id.substring(index + 1, id.length); + + plugin = stringRequire(systemRequire, exports, module, prefix, relId); + + if (plugin.normalize) { + id = plugin.normalize(id, makeNormalize(relId)); + } else { + //Normalize the ID normally. + id = normalize(id, relId); + } + + if (loaderCache[id]) { + return loaderCache[id]; + } else { + plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); + + return loaderCache[id]; + } + } + }; + + //Create a define function specific to the module asking for amdefine. + function define(id, deps, factory) { + if (Array.isArray(id)) { + factory = deps; + deps = id; + id = undefined; + } else if (typeof id !== 'string') { + factory = id; + id = deps = undefined; + } + + if (deps && !Array.isArray(deps)) { + factory = deps; + deps = undefined; + } + + if (!deps) { + deps = ['require', 'exports', 'module']; + } + + //Set up properties for this module. If an ID, then use + //internal cache. If no ID, then use the external variables + //for this node module. + if (id) { + //Put the module in deep freeze until there is a + //require call for it. + defineCache[id] = [id, deps, factory]; + } else { + runFactory(id, deps, factory); + } + } + + //define.require, which has access to all the values in the + //cache. Useful for AMD modules that all have IDs in the file, + //but need to finally export a value to node based on one of those + //IDs. + define.require = function (id) { + if (loaderCache[id]) { + return loaderCache[id]; + } + + if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } + }; + + define.amd = {}; + + return define; +} + +module.exports = amdefine; + +}).call(this,require('_process'),"/node_modules/source-map/node_modules/amdefine/amdefine.js") +},{"_process":219,"path":218}],537:[function(require,module,exports){ +/*! + strip-json-comments + Strip comments from JSON. Lets you use comments in your JSON files! + https://github.com/sindresorhus/strip-json-comments + by Sindre Sorhus + MIT License +*/ +(function () { + 'use strict'; + + function stripJsonComments(str) { + var currentChar; + var nextChar; + var insideString = false; + var insideComment = false; + var ret = ''; + + for (var i = 0; i < str.length; i++) { + currentChar = str[i]; + nextChar = str[i + 1]; + + if (!insideComment && str[i - 1] !== '\\' && currentChar === '"') { + insideString = !insideString; + } + + if (insideString) { + ret += currentChar; + continue; + } + + if (!insideComment && currentChar + nextChar === '//') { + insideComment = 'single'; + i++; + } else if (insideComment === 'single' && currentChar + nextChar === '\r\n') { + insideComment = false; + i++; + ret += currentChar; + ret += nextChar; + continue; + } else if (insideComment === 'single' && currentChar === '\n') { + insideComment = false; + } else if (!insideComment && currentChar + nextChar === '/*') { + insideComment = 'multi'; + i++; + continue; + } else if (insideComment === 'multi' && currentChar + nextChar === '*/') { + insideComment = false; + i++; + continue; + } + + if (insideComment) { + continue; + } + + ret += currentChar; + } + + return ret; + } + + if (typeof module !== 'undefined' && module.exports) { + module.exports = stripJsonComments; + } else { + window.stripJsonComments = stripJsonComments; + } +})(); + +},{}],538:[function(require,module,exports){ +'use strict'; +module.exports = function toFastProperties(obj) { + /*jshint -W027*/ + function f() {} + f.prototype = obj; + new f(); + return; + eval(obj); +}; + +},{}],539:[function(require,module,exports){ +'use strict'; +module.exports = function (str) { + return str.replace(/[\s\uFEFF\xA0]+$/g, ''); +}; + +},{}],540:[function(require,module,exports){ +module.exports={ + "name": "babel-core", + "description": "A compiler for writing next generation JavaScript", + "version": "5.6.7", + "author": "Sebastian McKenzie ", + "homepage": "https://babeljs.io/", + "license": "MIT", + "repository": "babel/babel", + "main": "lib/babel/api/node.js", + "browser": { + "./lib/babel/api/register/node.js": "./lib/babel/api/register/browser.js" + }, + "keywords": [ + "harmony", + "classes", + "modules", + "let", + "const", + "var", + "es6", + "transpile", + "transpiler", + "6to5", + "babel" + ], + "scripts": { + "bench": "make bench", + "test": "make test" + }, + "dependencies": { + "acorn-jsx": "^1.0.0", + "ast-types": "~0.7.0", + "babel-plugin-constant-folding": "^1.0.1", + "babel-plugin-dead-code-elimination": "^1.0.2", + "babel-plugin-eval": "^1.0.1", + "babel-plugin-inline-environment-variables": "^1.0.1", + "babel-plugin-jscript": "^1.0.1", + "babel-plugin-member-expression-literals": "^1.0.1", + "babel-plugin-property-literals": "^1.0.1", + "babel-plugin-proto-to-assign": "^1.0.3", + "babel-plugin-react-constant-elements": "^1.0.3", + "babel-plugin-react-display-name": "^1.0.3", + "babel-plugin-remove-console": "^1.0.1", + "babel-plugin-remove-debugger": "^1.0.1", + "babel-plugin-runtime": "^1.0.7", + "babel-plugin-undeclared-variables-check": "^1.0.2", + "babel-plugin-undefined-to-void": "^1.1.6", + "chalk": "^1.0.0", + "convert-source-map": "^1.1.0", + "core-js": "^0.9.0", + "debug": "^2.1.1", + "detect-indent": "^3.0.0", + "estraverse": "^4.0.0", + "esutils": "^2.0.0", + "fs-readdir-recursive": "^0.1.0", + "globals": "^6.4.0", + "home-or-tmp": "^1.0.0", + "is-integer": "^1.0.4", + "js-tokens": "1.0.1", + "leven": "^1.0.1", + "line-numbers": "0.2.0", + "lodash": "^3.6.0", + "minimatch": "^2.0.3", + "output-file-sync": "^1.1.0", + "path-is-absolute": "^1.0.0", + "private": "^0.1.6", + "regenerator": "0.8.31", + "regexpu": "^1.1.2", + "repeating": "^1.1.2", + "resolve": "^1.1.6", + "shebang-regex": "^1.0.0", + "slash": "^1.0.0", + "source-map": "^0.4.0", + "source-map-support": "^0.2.10", + "strip-json-comments": "^1.0.2", + "to-fast-properties": "^1.0.0", + "trim-right": "^1.0.0" + }, + "devDependencies": { + "babel": "5.5.7", + "browserify": "^9.0.8", + "chai": "^2.2.0", + "eslint": "^0.21.2", + "babel-eslint": "^3.1.9", + "esvalid": "^1.1.0", + "istanbul": "^0.3.5", + "matcha": "^0.6.0", + "mocha": "2.2.0", + "rimraf": "^2.3.2", + "uglify-js": "^2.4.16" + } +} + +},{}],541:[function(require,module,exports){ +module.exports={"abstract-expression-call":{"body":[{"expression":{"callee":{"object":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceGet","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"abstract-expression-delete":{"body":[{"expression":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceDelete","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"abstract-expression-get":{"body":[{"expression":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceGet","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"abstract-expression-set":{"body":[{"expression":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceSet","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"},{"name":"VALUE","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"array-comprehension-container":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"declarations":[{"id":{"name":"KEY","type":"Identifier"},"init":{"elements":[],"type":"ArrayExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"argument":{"name":"KEY","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"array-from":{"body":[{"expression":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"from","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"VALUE","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"array-push":{"body":[{"expression":{"callee":{"object":{"name":"KEY","type":"Identifier"},"property":{"name":"push","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"STATEMENT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"call":{"body":[{"expression":{"callee":{"object":{"name":"OBJECT","type":"Identifier"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"CONTEXT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"class-decorator":{"body":[{"expression":{"operator":"=","left":{"name":"CLASS_REF","type":"Identifier"},"right":{"left":{"callee":{"name":"DECORATOR","type":"Identifier"},"arguments":[{"name":"CLASS_REF","type":"Identifier"}],"type":"CallExpression"},"operator":"||","right":{"name":"CLASS_REF","type":"Identifier"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"class-derived-default-constructor":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"expression":{"callee":{"type":"Super"},"arguments":[{"argument":{"name":"arguments","type":"Identifier"},"type":"SpreadElement"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"default-parameter-assign":{"body":[{"test":{"left":{"name":"VARIABLE_NAME","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"expression":{"operator":"=","left":{"name":"VARIABLE_NAME","type":"Identifier"},"right":{"name":"DEFAULT_VALUE","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"Program"},"default-parameter":{"body":[{"declarations":[{"id":{"name":"VARIABLE_NAME","type":"Identifier"},"init":{"test":{"left":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"ARGUMENT_KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"name":"DEFAULT_VALUE","type":"Identifier"},"alternate":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"ARGUMENT_KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"ConditionalExpression"},"type":"VariableDeclarator"}],"kind":"let","type":"VariableDeclaration"}],"type":"Program"},"exports-assign":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"name":"KEY","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"VALUE","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-default-assign":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"module","type":"Identifier"},"property":{"name":"exports","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"VALUE","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-from-assign":{"body":[{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"exports","type":"Identifier"},{"name":"ID","type":"Identifier"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"enumerable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"get","type":"Identifier"},"value":{"id":{"name":"get","type":"Identifier"},"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"name":"INIT","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-module-declaration-loose":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-module-declaration":{"body":[{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"exports","type":"Identifier"},{"value":"__esModule","type":"Literal"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"for-of-array":{"body":[{"init":{"declarations":[{"id":{"name":"KEY","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"KEY","type":"Identifier"},"operator":"<","right":{"object":{"name":"ARR","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"KEY","type":"Identifier"},"type":"UpdateExpression"},"body":{"expression":{"name":"BODY","type":"Identifier"},"type":"ExpressionStatement"},"type":"ForStatement"}],"type":"Program"},"for-of-loose":{"body":[{"init":{"declarations":[{"id":{"name":"LOOP_OBJECT","type":"Identifier"},"init":{"name":"OBJECT","type":"Identifier"},"type":"VariableDeclarator"},{"id":{"name":"IS_ARRAY","type":"Identifier"},"init":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"LOOP_OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"INDEX","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"},{"id":{"name":"LOOP_OBJECT","type":"Identifier"},"init":{"test":{"name":"IS_ARRAY","type":"Identifier"},"consequent":{"name":"LOOP_OBJECT","type":"Identifier"},"alternate":{"callee":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ConditionalExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":null,"update":null,"body":{"body":[{"declarations":[{"id":{"name":"ID","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"name":"IS_ARRAY","type":"Identifier"},"consequent":{"body":[{"test":{"left":{"name":"INDEX","type":"Identifier"},"operator":">=","right":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"name":"ID","type":"Identifier"},"right":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"operator":"++","prefix":false,"argument":{"name":"INDEX","type":"Identifier"},"type":"UpdateExpression"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"expression":{"operator":"=","left":{"name":"INDEX","type":"Identifier"},"right":{"callee":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"object":{"name":"INDEX","type":"Identifier"},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"name":"ID","type":"Identifier"},"right":{"object":{"name":"INDEX","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"Program"},"for-of":{"body":[{"declarations":[{"id":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"init":{"value":true,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier"},"init":{"value":false,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"ITERATOR_ERROR_KEY","type":"Identifier"},"init":{"name":"undefined","type":"Identifier"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"block":{"body":[{"init":{"declarations":[{"id":{"name":"ITERATOR_KEY","type":"Identifier"},"init":{"callee":{"object":{"name":"OBJECT","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"STEP_KEY","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"operator":"!","prefix":true,"argument":{"operator":"=","left":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"right":{"object":{"operator":"=","left":{"name":"STEP_KEY","type":"Identifier"},"right":{"callee":{"object":{"name":"ITERATOR_KEY","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"type":"UnaryExpression"},"update":{"operator":"=","left":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"body":{"body":[],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"handler":{"param":{"name":"err","type":"Identifier"},"guard":null,"body":{"body":[{"expression":{"operator":"=","left":{"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"name":"ITERATOR_ERROR_KEY","type":"Identifier"},"right":{"name":"err","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"CatchClause"},"guardedHandlers":[],"finalizer":{"body":[{"block":{"body":[{"test":{"left":{"operator":"!","prefix":true,"argument":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"type":"UnaryExpression"},"operator":"&&","right":{"object":{"name":"ITERATOR_KEY","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"object":{"name":"ITERATOR_KEY","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"handler":null,"guardedHandlers":[],"finalizer":{"body":[{"test":{"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier"},"consequent":{"body":[{"argument":{"name":"ITERATOR_ERROR_KEY","type":"Identifier"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"TryStatement"}],"type":"BlockStatement"},"type":"TryStatement"}],"type":"Program"},"helper-async-to-generator":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"fn","type":"Identifier"}],"body":{"body":[{"argument":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"declarations":[{"id":{"name":"gen","type":"Identifier"},"init":{"callee":{"object":{"name":"fn","type":"Identifier"},"property":{"name":"apply","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"type":"ThisExpression"},{"name":"arguments","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"argument":{"callee":{"name":"Promise","type":"Identifier"},"arguments":[{"id":null,"generator":false,"expression":false,"params":[{"name":"resolve","type":"Identifier"},{"name":"reject","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"callNext","type":"Identifier"},"init":{"callee":{"object":{"name":"step","type":"Identifier"},"property":{"name":"bind","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"value":null,"type":"Literal"},{"value":"next","type":"Literal"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"callThrow","type":"Identifier"},"init":{"callee":{"object":{"name":"step","type":"Identifier"},"property":{"name":"bind","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"value":null,"type":"Literal"},{"value":"throw","type":"Literal"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"id":{"name":"step","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"key","type":"Identifier"},{"name":"arg","type":"Identifier"}],"body":{"body":[{"block":{"body":[{"declarations":[{"id":{"name":"info","type":"Identifier"},"init":{"callee":{"object":{"name":"gen","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"arg","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"value","type":"Identifier"},"init":{"object":{"name":"info","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"}],"type":"BlockStatement"},"handler":{"param":{"name":"error","type":"Identifier"},"guard":null,"body":{"body":[{"expression":{"callee":{"name":"reject","type":"Identifier"},"arguments":[{"name":"error","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"argument":null,"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"CatchClause"},"guardedHandlers":[],"finalizer":null,"type":"TryStatement"},{"test":{"object":{"name":"info","type":"Identifier"},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"resolve","type":"Identifier"},"arguments":[{"name":"value","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"expression":{"callee":{"object":{"callee":{"object":{"name":"Promise","type":"Identifier"},"property":{"name":"resolve","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"value","type":"Identifier"}],"type":"CallExpression"},"property":{"name":"then","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"callNext","type":"Identifier"},{"name":"callThrow","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"expression":{"callee":{"name":"callNext","type":"Identifier"},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"}],"type":"NewExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-bind":{"body":[{"expression":{"object":{"object":{"name":"Function","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"bind","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-class-call-check":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"instance","type":"Identifier"},{"name":"Constructor","type":"Identifier"}],"body":{"body":[{"test":{"operator":"!","prefix":true,"argument":{"left":{"name":"instance","type":"Identifier"},"operator":"instanceof","right":{"name":"Constructor","type":"Identifier"},"type":"BinaryExpression","parenthesizedExpression":true},"type":"UnaryExpression"},"consequent":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Cannot call a class as a function","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-create-class":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"id":{"name":"defineProperties","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"},{"name":"props","type":"Identifier"}],"body":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"props","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"object":{"name":"props","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"||","right":{"value":false,"type":"Literal"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"descriptor","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"argument":{"id":null,"generator":false,"expression":false,"params":[{"name":"Constructor","type":"Identifier"},{"name":"protoProps","type":"Identifier"},{"name":"staticProps","type":"Identifier"}],"body":{"body":[{"test":{"name":"protoProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"object":{"name":"Constructor","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"protoProps","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"test":{"name":"staticProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"name":"Constructor","type":"Identifier"},{"name":"staticProps","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"name":"Constructor","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-create-decorated-class":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"id":{"name":"defineProperties","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"},{"name":"descriptors","type":"Identifier"},{"name":"initializers","type":"Identifier"}],"body":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"decorators","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"||","right":{"value":false,"type":"Literal"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"left":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"descriptor","type":"Identifier"},"type":"BinaryExpression"},"operator":"||","right":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"test":{"name":"decorators","type":"Identifier"},"consequent":{"body":[{"init":{"declarations":[{"id":{"name":"f","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"f","type":"Identifier"},"operator":"<","right":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"f","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"decorator","type":"Identifier"},"init":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"f","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"name":"descriptor","type":"Identifier"},"right":{"left":{"callee":{"name":"decorator","type":"Identifier"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"operator":"||","right":{"name":"descriptor","type":"Identifier"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"left":{"left":{"left":{"value":"The decorator for method ","type":"Literal"},"operator":"+","right":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"operator":"+","right":{"value":" is of the invalid type ","type":"Literal"},"type":"BinaryExpression"},"operator":"+","right":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"test":{"left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"!==","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"initializers","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"name":"descriptor","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"label":null,"type":"ContinueStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"argument":{"id":null,"generator":false,"expression":false,"params":[{"name":"Constructor","type":"Identifier"},{"name":"protoProps","type":"Identifier"},{"name":"staticProps","type":"Identifier"},{"name":"protoInitializers","type":"Identifier"},{"name":"staticInitializers","type":"Identifier"}],"body":{"body":[{"test":{"name":"protoProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"object":{"name":"Constructor","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"protoProps","type":"Identifier"},{"name":"protoInitializers","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"test":{"name":"staticProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"name":"Constructor","type":"Identifier"},{"name":"staticProps","type":"Identifier"},{"name":"staticInitializers","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"name":"Constructor","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-create-decorated-object":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"descriptors","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"target","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"decorators","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"name":"decorators","type":"Identifier"},"consequent":{"body":[{"init":{"declarations":[{"id":{"name":"f","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"f","type":"Identifier"},"operator":"<","right":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"f","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"decorator","type":"Identifier"},"init":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"f","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"name":"descriptor","type":"Identifier"},"right":{"left":{"callee":{"name":"decorator","type":"Identifier"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"operator":"||","right":{"name":"descriptor","type":"Identifier"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"left":{"left":{"left":{"value":"The decorator for method ","type":"Literal"},"operator":"+","right":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"operator":"+","right":{"value":" is of the invalid type ","type":"Literal"},"type":"BinaryExpression"},"operator":"+","right":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"test":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"callee":{"object":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"}],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"target","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-default-props":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"defaultProps","type":"Identifier"},{"name":"props","type":"Identifier"}],"body":{"body":[{"test":{"name":"defaultProps","type":"Identifier"},"consequent":{"body":[{"left":{"declarations":[{"id":{"name":"propName","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"defaultProps","type":"Identifier"},"body":{"body":[{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"object":{"name":"props","type":"Identifier"},"property":{"name":"propName","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"UnaryExpression"},"operator":"===","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"props","type":"Identifier"},"property":{"name":"propName","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"defaultProps","type":"Identifier"},"property":{"name":"propName","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForInStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"name":"props","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-defaults":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"},{"name":"defaults","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"keys","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyNames","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"defaults","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"keys","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":{"object":{"name":"keys","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"value","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyDescriptor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"defaults","type":"Identifier"},{"name":"key","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"left":{"name":"value","type":"Identifier"},"operator":"&&","right":{"object":{"name":"value","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"operator":"&&","right":{"left":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"value","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"obj","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-define-decorated-property-descriptor":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptors","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"_descriptor","type":"Identifier"},"init":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"operator":"!","prefix":true,"argument":{"name":"_descriptor","type":"Identifier"},"type":"UnaryExpression"},"consequent":{"argument":null,"type":"ReturnStatement"},"alternate":null,"type":"IfStatement"},{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"left":{"declarations":[{"id":{"name":"_key","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"_descriptor","type":"Identifier"},"body":{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"_key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"_descriptor","type":"Identifier"},"property":{"name":"_key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"type":"ForInStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"callee":{"object":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"}],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-define-property":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"value","type":"Identifier"}],"body":{"body":[{"argument":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"name":"value","type":"Identifier"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"enumerable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"configurable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"writable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-extends":{"body":[{"expression":{"left":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"assign","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"||","right":{"id":null,"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"}],"body":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":1,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"arguments","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"source","type":"Identifier"},"init":{"object":{"name":"arguments","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"left":{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"source","type":"Identifier"},"body":{"body":[{"test":{"callee":{"object":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"source","type":"Identifier"},{"name":"key","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"target","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"source","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForInStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"target","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"LogicalExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-get":{"body":[{"expression":{"id":{"name":"get","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"object","type":"Identifier"},"operator":"===","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"expression":{"operator":"=","left":{"name":"object","type":"Identifier"},"right":{"object":{"name":"Function","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"declarations":[{"id":{"name":"desc","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyDescriptor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"desc","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"declarations":[{"id":{"name":"parent","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getPrototypeOf","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"parent","type":"Identifier"},"operator":"===","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"name":"undefined","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"get","type":"Identifier"},"arguments":[{"name":"parent","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"desc","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"getter","type":"Identifier"},"init":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"get","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"getter","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"name":"undefined","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"callee":{"object":{"name":"getter","type":"Identifier"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"receiver","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-has-own":{"body":[{"expression":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-inherits":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"subClass","type":"Identifier"},{"name":"superClass","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"superClass","type":"Identifier"},"type":"UnaryExpression"},"operator":"!==","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"left":{"name":"superClass","type":"Identifier"},"operator":"!==","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"left":{"value":"Super expression must either be null or a function, not ","type":"Literal"},"operator":"+","right":{"operator":"typeof","prefix":true,"argument":{"name":"superClass","type":"Identifier"},"type":"UnaryExpression"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"object":{"name":"subClass","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"create","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"left":{"name":"superClass","type":"Identifier"},"operator":"&&","right":{"object":{"name":"superClass","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"constructor","type":"Identifier"},"value":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"name":"subClass","type":"Identifier"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"enumerable","type":"Identifier"},"value":{"value":false,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"writable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"configurable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"name":"superClass","type":"Identifier"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"subClass","type":"Identifier"},"property":{"name":"__proto__","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"superClass","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-instanceof":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"left","type":"Identifier"},{"name":"right","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"name":"right","type":"Identifier"},"operator":"!=","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"right","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"hasInstance","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"argument":{"callee":{"object":{"name":"right","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"hasInstance","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"left","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"left":{"name":"left","type":"Identifier"},"operator":"instanceof","right":{"name":"right","type":"Identifier"},"type":"BinaryExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-interop-require-default":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"name":"obj","type":"Identifier"},"alternate":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"value":"default","type":"Literal"},"value":{"name":"obj","type":"Identifier"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-interop-require-wildcard":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"argument":{"name":"obj","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"newObj","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"!=","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"left":{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"obj","type":"Identifier"},"body":{"body":[{"test":{"callee":{"object":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"}],"type":"CallExpression"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"newObj","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForInStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"object":{"name":"newObj","type":"Identifier"},"property":{"value":"default","type":"Literal"},"computed":true,"type":"MemberExpression"},"right":{"name":"obj","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"newObj","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-interop-require":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"object":{"name":"obj","type":"Identifier"},"property":{"value":"default","type":"Literal"},"computed":true,"type":"MemberExpression"},"alternate":{"name":"obj","type":"Identifier"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-object-destructuring-empty":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"==","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Cannot destructure undefined","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-object-without-properties":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"},{"name":"keys","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"target","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"left":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"obj","type":"Identifier"},"body":{"body":[{"test":{"left":{"callee":{"object":{"name":"keys","type":"Identifier"},"property":{"name":"indexOf","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"i","type":"Identifier"}],"type":"CallExpression"},"operator":">=","right":{"value":0,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"label":null,"type":"ContinueStatement"},"alternate":null,"type":"IfStatement"},{"test":{"operator":"!","prefix":true,"argument":{"callee":{"object":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"i","type":"Identifier"}],"type":"CallExpression"},"type":"UnaryExpression"},"consequent":{"label":null,"type":"ContinueStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"object":{"name":"target","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForInStatement"},{"argument":{"name":"target","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-self-global":{"body":[{"expression":{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"global","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"consequent":{"name":"self","type":"Identifier"},"alternate":{"name":"global","type":"Identifier"},"type":"ConditionalExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-set":{"body":[{"expression":{"id":{"name":"set","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"value","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"desc","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyDescriptor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"desc","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"declarations":[{"id":{"name":"parent","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getPrototypeOf","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"parent","type":"Identifier"},"operator":"!==","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"set","type":"Identifier"},"arguments":[{"name":"parent","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"value","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"desc","type":"Identifier"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"value","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"setter","type":"Identifier"},"init":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"set","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"setter","type":"Identifier"},"operator":"!==","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"callee":{"object":{"name":"setter","type":"Identifier"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"receiver","type":"Identifier"},{"name":"value","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"},{"argument":{"name":"value","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-slice":{"body":[{"expression":{"object":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"slice","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-sliced-to-array-loose":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"},{"name":"i","type":"Identifier"}],"body":{"body":[{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"argument":{"name":"arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"in","right":{"callee":{"name":"Object","type":"Identifier"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"BinaryExpression"},"consequent":{"body":[{"declarations":[{"id":{"name":"_arr","type":"Identifier"},"init":{"elements":[],"type":"ArrayExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"init":{"declarations":[{"id":{"name":"_iterator","type":"Identifier"},"init":{"callee":{"object":{"name":"arr","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"_step","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"operator":"!","prefix":true,"argument":{"object":{"operator":"=","left":{"name":"_step","type":"Identifier"},"right":{"callee":{"object":{"name":"_iterator","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"update":null,"body":{"body":[{"expression":{"callee":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"push","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"object":{"name":"_step","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"test":{"left":{"name":"i","type":"Identifier"},"operator":"&&","right":{"left":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"===","right":{"name":"i","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"_arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Invalid attempt to destructure non-iterable instance","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-sliced-to-array":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"},{"name":"i","type":"Identifier"}],"body":{"body":[{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"argument":{"name":"arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"in","right":{"callee":{"name":"Object","type":"Identifier"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"BinaryExpression"},"consequent":{"body":[{"declarations":[{"id":{"name":"_arr","type":"Identifier"},"init":{"elements":[],"type":"ArrayExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"_n","type":"Identifier"},"init":{"value":true,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"_d","type":"Identifier"},"init":{"value":false,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"_e","type":"Identifier"},"init":{"name":"undefined","type":"Identifier"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"block":{"body":[{"init":{"declarations":[{"id":{"name":"_i","type":"Identifier"},"init":{"callee":{"object":{"name":"arr","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"_s","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"operator":"!","prefix":true,"argument":{"operator":"=","left":{"name":"_n","type":"Identifier"},"right":{"object":{"operator":"=","left":{"name":"_s","type":"Identifier"},"right":{"callee":{"object":{"name":"_i","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"type":"UnaryExpression"},"update":{"operator":"=","left":{"name":"_n","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"body":{"body":[{"expression":{"callee":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"push","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"object":{"name":"_s","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"test":{"left":{"name":"i","type":"Identifier"},"operator":"&&","right":{"left":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"===","right":{"name":"i","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"handler":{"param":{"name":"err","type":"Identifier"},"guard":null,"body":{"body":[{"expression":{"operator":"=","left":{"name":"_d","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"name":"_e","type":"Identifier"},"right":{"name":"err","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"CatchClause"},"guardedHandlers":[],"finalizer":{"body":[{"block":{"body":[{"test":{"left":{"operator":"!","prefix":true,"argument":{"name":"_n","type":"Identifier"},"type":"UnaryExpression"},"operator":"&&","right":{"object":{"name":"_i","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"expression":{"callee":{"object":{"name":"_i","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"handler":null,"guardedHandlers":[],"finalizer":{"body":[{"test":{"name":"_d","type":"Identifier"},"consequent":{"argument":{"name":"_e","type":"Identifier"},"type":"ThrowStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"TryStatement"}],"type":"BlockStatement"},"type":"TryStatement"},{"argument":{"name":"_arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Invalid attempt to destructure non-iterable instance","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-tagged-template-literal-loose":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"strings","type":"Identifier"},{"name":"raw","type":"Identifier"}],"body":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"strings","type":"Identifier"},"property":{"name":"raw","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"raw","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"strings","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-tagged-template-literal":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"strings","type":"Identifier"},{"name":"raw","type":"Identifier"}],"body":{"body":[{"argument":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"freeze","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperties","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"strings","type":"Identifier"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"raw","type":"Identifier"},"value":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"freeze","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"raw","type":"Identifier"}],"type":"CallExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-temporal-assert-defined":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"val","type":"Identifier"},{"name":"name","type":"Identifier"},{"name":"undef","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"val","type":"Identifier"},"operator":"===","right":{"name":"undef","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"callee":{"name":"ReferenceError","type":"Identifier"},"arguments":[{"left":{"name":"name","type":"Identifier"},"operator":"+","right":{"value":" is not defined - temporal dead zone","type":"Literal"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"value":true,"type":"Literal"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-temporal-undefined":{"body":[{"expression":{"properties":[],"type":"ObjectExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-to-array":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"name":"arr","type":"Identifier"},"alternate":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"from","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-to-consumable-array":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"}],"body":{"body":[{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"},{"id":{"name":"arr2","type":"Identifier"},"init":{"callee":{"name":"Array","type":"Identifier"},"arguments":[{"object":{"name":"arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"expression":{"operator":"=","left":{"object":{"name":"arr2","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"arr","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"type":"ForStatement"},{"argument":{"name":"arr2","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"from","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-typeof":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"left":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"constructor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"===","right":{"name":"Symbol","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"value":"symbol","type":"Literal"},"alternate":{"operator":"typeof","prefix":true,"argument":{"name":"obj","type":"Identifier"},"type":"UnaryExpression"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"let-scoping-return":{"body":[{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"RETURN","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"object","type":"Literal"},"type":"BinaryExpression"},"consequent":{"argument":{"object":{"name":"RETURN","type":"Identifier"},"property":{"name":"v","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ReturnStatement"},"alternate":null,"type":"IfStatement"}],"type":"Program"},"named-function":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"id":{"name":"GET_OUTER_ID","type":"Identifier"},"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"name":"FUNCTION_ID","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"argument":{"name":"FUNCTION","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"property-method-assignment-wrapper-generator":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[{"name":"FUNCTION_KEY","type":"Identifier"}],"body":{"body":[{"id":{"name":"FUNCTION_ID","type":"Identifier"},"generator":true,"expression":false,"params":[],"body":{"body":[{"argument":{"delegate":true,"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"apply","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"type":"ThisExpression"},{"name":"arguments","type":"Identifier"}],"type":"CallExpression"},"type":"YieldExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"expression":{"operator":"=","left":{"object":{"name":"FUNCTION_ID","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"FUNCTION_ID","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[{"name":"FUNCTION","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"property-method-assignment-wrapper":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[{"name":"FUNCTION_KEY","type":"Identifier"}],"body":{"body":[{"id":{"name":"FUNCTION_ID","type":"Identifier"},"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"apply","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"type":"ThisExpression"},{"name":"arguments","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"expression":{"operator":"=","left":{"object":{"name":"FUNCTION_ID","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"FUNCTION_ID","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[{"name":"FUNCTION","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"prototype-identifier":{"body":[{"expression":{"object":{"name":"CLASS_NAME","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"require-assign-key":{"body":[{"declarations":[{"id":{"name":"VARIABLE_NAME","type":"Identifier"},"init":{"object":{"callee":{"name":"require","type":"Identifier"},"arguments":[{"name":"MODULE_NAME","type":"Identifier"}],"type":"CallExpression"},"property":{"name":"KEY","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"}],"type":"Program"},"require":{"body":[{"expression":{"callee":{"name":"require","type":"Identifier"},"arguments":[{"name":"MODULE_NAME","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"rest":{"body":[{"init":{"declarations":[{"id":{"name":"LEN","type":"Identifier"},"init":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"},{"id":{"name":"ARRAY","type":"Identifier"},"init":{"callee":{"name":"Array","type":"Identifier"},"arguments":[{"name":"ARRAY_LEN","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"KEY","type":"Identifier"},"init":{"name":"START","type":"Identifier"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"KEY","type":"Identifier"},"operator":"<","right":{"name":"LEN","type":"Identifier"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"KEY","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"ARRAY","type":"Identifier"},"property":{"name":"ARRAY_KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"Program"},"self-contained-helpers-head":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"value":"default","type":"Literal"},"computed":true,"type":"MemberExpression"},"right":{"name":"HELPER","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"system":{"body":[{"expression":{"callee":{"object":{"name":"System","type":"Identifier"},"property":{"name":"register","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"MODULE_NAME","type":"Identifier"},{"name":"MODULE_DEPENDENCIES","type":"Identifier"},{"id":null,"generator":false,"expression":false,"params":[{"name":"EXPORT_IDENTIFIER","type":"Identifier"}],"body":{"body":[{"argument":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"setters","type":"Identifier"},"value":{"name":"SETTERS","type":"Identifier"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"execute","type":"Identifier"},"value":{"name":"EXECUTE","type":"Identifier"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"tail-call-body":{"body":[{"body":[{"declarations":[{"id":{"name":"AGAIN_ID","type":"Identifier"},"init":{"value":true,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"body":{"test":{"name":"AGAIN_ID","type":"Identifier"},"body":{"expression":{"name":"BLOCK","type":"Identifier"},"type":"ExpressionStatement"},"type":"WhileStatement"},"label":{"name":"FUNCTION_ID","type":"Identifier"},"type":"LabeledStatement"}],"type":"BlockStatement"}],"type":"Program"},"test-exports":{"body":[{"expression":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"exports","type":"Identifier"},"type":"UnaryExpression"},"operator":"!==","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"type":"ExpressionStatement"}],"type":"Program"},"test-module":{"body":[{"expression":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"module","type":"Identifier"},"type":"UnaryExpression"},"operator":"!==","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"type":"ExpressionStatement"}],"type":"Program"},"umd-commonjs-strict":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[{"name":"root","type":"Identifier"},{"name":"factory","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"define","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"define","type":"Identifier"},"property":{"name":"amd","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"define","type":"Identifier"},"arguments":[{"name":"AMD_ARGUMENTS","type":"Identifier"},{"name":"factory","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"exports","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"object","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"name":"COMMON_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"name":"BROWSER_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[{"name":"UMD_ROOT","type":"Identifier"},{"id":null,"generator":false,"expression":false,"params":[{"name":"FACTORY_PARAMETERS","type":"Identifier"}],"body":{"body":[{"expression":{"name":"FACTORY_BODY","type":"Identifier"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"umd-runner-body":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"global","type":"Identifier"},{"name":"factory","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"define","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"define","type":"Identifier"},"property":{"name":"amd","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"define","type":"Identifier"},"arguments":[{"name":"AMD_ARGUMENTS","type":"Identifier"},{"name":"factory","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"test":{"name":"COMMON_TEST","type":"Identifier"},"consequent":{"body":[{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"name":"COMMON_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"mod","type":"Identifier"},"init":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"exports","type":"Identifier"},"value":{"properties":[],"type":"ObjectExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"object":{"name":"mod","type":"Identifier"},"property":{"name":"exports","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"BROWSER_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"global","type":"Identifier"},"property":{"name":"GLOBAL_ARG","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"object":{"name":"mod","type":"Identifier"},"property":{"name":"exports","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"}} +},{}]},{},[19]); diff --git a/package.json b/package.json index a5a093f..5699e3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "requirejs-babel", - "version": "0.1.1", + "version": "0.2.0", "description": "An AMD loader plugin for Babel", "repository": { "type": "git", diff --git a/polyfill.js b/polyfill.js index 1b1e166..b0ffe3f 100644 --- a/polyfill.js +++ b/polyfill.js @@ -2,2471 +2,3043 @@ (function (global){ "use strict"; +require("core-js/shim"); + +require("regenerator/runtime"); + if (global._babelPolyfill) { throw new Error("only one instance of babel/polyfill is allowed"); } global._babelPolyfill = true; +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"core-js/shim":91,"regenerator/runtime":92}],2:[function(require,module,exports){ +// shim for using process in browser -require("core-js/shim"); +var process = module.exports = {}; +var queue = []; +var draining = false; -require("regenerator-babel/runtime"); -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"core-js/shim":70,"regenerator-babel/runtime":71}],2:[function(require,module,exports){ -'use strict'; -// false -> Array#indexOf -// true -> Array#includes -var $ = require('./$'); -module.exports = function(IS_INCLUDES){ - return function(el /*, fromIndex = 0 */){ - var O = $.toObject(this) - , length = $.toLength(O.length) - , index = $.toIndex(arguments[1], length) - , value; - if(IS_INCLUDES && el != el)while(length > index){ - value = O[index++]; - if(value != value)return true; - } else for(;length > index; index++)if(IS_INCLUDES || index in O){ - if(O[index] === el)return IS_INCLUDES || index; - } return !IS_INCLUDES && -1; - }; +function drainQueue() { + if (draining) { + return; + } + draining = true; + var currentQueue; + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + var i = -1; + while (++i < len) { + currentQueue[i](); + } + len = queue.length; + } + draining = false; +} +process.nextTick = function (fun) { + queue.push(fun); + if (!draining) { + setTimeout(drainQueue, 0); + } }; -},{"./$":15}],3:[function(require,module,exports){ -'use strict'; -// 0 -> Array#forEach -// 1 -> Array#map -// 2 -> Array#filter -// 3 -> Array#some -// 4 -> Array#every -// 5 -> Array#find -// 6 -> Array#findIndex -var $ = require('./$') - , ctx = require('./$.ctx'); -module.exports = function(TYPE){ - var IS_MAP = TYPE == 1 - , IS_FILTER = TYPE == 2 - , IS_SOME = TYPE == 3 - , IS_EVERY = TYPE == 4 - , IS_FIND_INDEX = TYPE == 6 - , NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - return function(callbackfn/*, that = undefined */){ - var O = Object($.assertDefined(this)) - , self = $.ES5Object(O) - , f = ctx(callbackfn, arguments[1], 3) - , length = $.toLength(self.length) - , index = 0 - , result = IS_MAP ? Array(length) : IS_FILTER ? [] : undefined - , val, res; - for(;length > index; index++)if(NO_HOLES || index in self){ - val = self[index]; - res = f(val, index, O); - if(TYPE){ - if(IS_MAP)result[index] = res; // map - else if(res)switch(TYPE){ - case 3: return true; // some - case 5: return val; // find - case 6: return index; // findIndex - case 2: result.push(val); // filter - } else if(IS_EVERY)return false; // every - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; + +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'); +}; + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],3:[function(require,module,exports){ +// false -> Array#indexOf +// true -> Array#includes +var $ = require('./$'); +module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = $.toObject($this) + , length = $.toLength(O.length) + , index = $.toIndex(fromIndex, length) + , value; + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index; + } return !IS_INCLUDES && -1; + }; +}; +},{"./$":24}],4:[function(require,module,exports){ +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var $ = require('./$') + , ctx = require('./$.ctx'); +module.exports = function(TYPE){ + var IS_MAP = TYPE == 1 + , IS_FILTER = TYPE == 2 + , IS_SOME = TYPE == 3 + , IS_EVERY = TYPE == 4 + , IS_FIND_INDEX = TYPE == 6 + , NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + return function($this, callbackfn, that){ + var O = Object($.assertDefined($this)) + , self = $.ES5Object(O) + , f = ctx(callbackfn, that, 3) + , length = $.toLength(self.length) + , index = 0 + , result = IS_MAP ? Array(length) : IS_FILTER ? [] : undefined + , val, res; + for(;length > index; index++)if(NO_HOLES || index in self){ + val = self[index]; + res = f(val, index, O); + if(TYPE){ + if(IS_MAP)result[index] = res; // map + else if(res)switch(TYPE){ + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if(IS_EVERY)return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; +},{"./$":24,"./$.ctx":12}],5:[function(require,module,exports){ +var $ = require('./$'); +function assert(condition, msg1, msg2){ + if(!condition)throw TypeError(msg2 ? msg1 + msg2 : msg1); +} +assert.def = $.assertDefined; +assert.fn = function(it){ + if(!$.isFunction(it))throw TypeError(it + ' is not a function!'); + return it; +}; +assert.obj = function(it){ + if(!$.isObject(it))throw TypeError(it + ' is not an object!'); + return it; +}; +assert.inst = function(it, Constructor, name){ + if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!"); + return it; }; -},{"./$":15,"./$.ctx":10}],4:[function(require,module,exports){ -var $ = require('./$'); -function assert(condition, msg1, msg2){ - if(!condition)throw TypeError(msg2 ? msg1 + msg2 : msg1); -} -assert.def = $.assertDefined; -assert.fn = function(it){ - if(!$.isFunction(it))throw TypeError(it + ' is not a function!'); - return it; -}; -assert.obj = function(it){ - if(!$.isObject(it))throw TypeError(it + ' is not an object!'); - return it; -}; -assert.inst = function(it, Constructor, name){ - if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!"); - return it; -}; module.exports = assert; -},{"./$":15}],5:[function(require,module,exports){ -var $ = require('./$'); -// 19.1.2.1 Object.assign(target, source, ...) -module.exports = Object.assign || function(target, source){ // eslint-disable-line no-unused-vars - var T = Object($.assertDefined(target)) - , l = arguments.length - , i = 1; - while(l > i){ - var S = $.ES5Object(arguments[i++]) - , keys = $.getKeys(S) - , length = keys.length - , j = 0 - , key; - while(length > j)T[key = keys[j++]] = S[key]; - } - return T; +},{"./$":24}],6:[function(require,module,exports){ +var $ = require('./$') + , enumKeys = require('./$.enum-keys'); +// 19.1.2.1 Object.assign(target, source, ...) +/* eslint-disable no-unused-vars */ +module.exports = Object.assign || function assign(target, source){ +/* eslint-enable no-unused-vars */ + var T = Object($.assertDefined(target)) + , l = arguments.length + , i = 1; + while(l > i){ + var S = $.ES5Object(arguments[i++]) + , keys = enumKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)T[key = keys[j++]] = S[key]; + } + return T; +}; +},{"./$":24,"./$.enum-keys":15}],7:[function(require,module,exports){ +var $ = require('./$') + , TAG = require('./$.wks')('toStringTag') + , toString = {}.toString; +function cof(it){ + return toString.call(it).slice(8, -1); +} +cof.classof = function(it){ + var O, T; + return it == undefined ? it === undefined ? 'Undefined' : 'Null' + : typeof (T = (O = Object(it))[TAG]) == 'string' ? T : cof(O); +}; +cof.set = function(it, tag, stat){ + if(it && !$.has(it = stat ? it : it.prototype, TAG))$.hide(it, TAG, tag); }; -},{"./$":15}],6:[function(require,module,exports){ -var $ = require('./$') - , TAG = require('./$.wks')('toStringTag') - , toString = {}.toString; -function cof(it){ - return toString.call(it).slice(8, -1); -} -cof.classof = function(it){ - var O, T; - return it == undefined ? it === undefined ? 'Undefined' : 'Null' - : typeof (T = (O = Object(it))[TAG]) == 'string' ? T : cof(O); -}; -cof.set = function(it, tag, stat){ - if(it && !$.has(it = stat ? it : it.prototype, TAG))$.hide(it, TAG, tag); -}; module.exports = cof; -},{"./$":15,"./$.wks":26}],7:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , ctx = require('./$.ctx') - , safe = require('./$.uid').safe - , assert = require('./$.assert') - , $iter = require('./$.iter') - , has = $.has - , set = $.set - , isObject = $.isObject - , hide = $.hide - , step = $iter.step - , isFrozen = Object.isFrozen || $.core.Object.isFrozen - , ID = safe('id') - , O1 = safe('O1') - , LAST = safe('last') - , FIRST = safe('first') - , ITER = safe('iter') - , SIZE = $.DESC ? safe('size') : 'size' - , id = 0; - -function fastKey(it, create){ - // return primitive with prefix - if(!isObject(it))return (typeof it == 'string' ? 'S' : 'P') + it; - // can't set id to frozen object - if(isFrozen(it))return 'F'; - if(!has(it, ID)){ - // not necessary to add id - if(!create)return 'E'; - // add missing object id - hide(it, ID, ++id); - // return object id with prefix - } return 'O' + it[ID]; -} - -function getEntry(that, key){ - // fast case - var index = fastKey(key), entry; - if(index != 'F')return that[O1][index]; - // frozen object case - for(entry = that[FIRST]; entry; entry = entry.n){ - if(entry.k == key)return entry; - } -} - -module.exports = { - getConstructor: function(NAME, IS_MAP, ADDER){ - function C(iterable){ - var that = assert.inst(this, C, NAME); - set(that, O1, $.create(null)); - set(that, SIZE, 0); - set(that, LAST, undefined); - set(that, FIRST, undefined); - if(iterable != undefined)$iter.forOf(iterable, IS_MAP, that[ADDER], that); - } - $.mix(C.prototype, { - // 23.1.3.1 Map.prototype.clear() - // 23.2.3.2 Set.prototype.clear() - clear: function(){ - for(var that = this, data = that[O1], entry = that[FIRST]; entry; entry = entry.n){ - entry.r = true; - if(entry.p)entry.p = entry.p.n = undefined; - delete data[entry.i]; - } - that[FIRST] = that[LAST] = undefined; - that[SIZE] = 0; - }, - // 23.1.3.3 Map.prototype.delete(key) - // 23.2.3.4 Set.prototype.delete(value) - 'delete': function(key){ - var that = this - , entry = getEntry(that, key); - if(entry){ - var next = entry.n - , prev = entry.p; - delete that[O1][entry.i]; - entry.r = true; - if(prev)prev.n = next; - if(next)next.p = prev; - if(that[FIRST] == entry)that[FIRST] = next; - if(that[LAST] == entry)that[LAST] = prev; - that[SIZE]--; - } return !!entry; - }, - // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) - // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) - forEach: function(callbackfn /*, that = undefined */){ - var f = ctx(callbackfn, arguments[1], 3) - , entry; - while(entry = entry ? entry.n : this[FIRST]){ - f(entry.v, entry.k, this); - // revert to the last existing entry - while(entry && entry.r)entry = entry.p; - } - }, - // 23.1.3.7 Map.prototype.has(key) - // 23.2.3.7 Set.prototype.has(value) - has: function(key){ - return !!getEntry(this, key); - } - }); - if($.DESC)$.setDesc(C.prototype, 'size', { - get: function(){ - return assert.def(this[SIZE]); - } - }); - return C; - }, - def: function(that, key, value){ - var entry = getEntry(that, key) - , prev, index; - // change existing entry - if(entry){ - entry.v = value; - // create new entry - } else { - that[LAST] = entry = { - i: index = fastKey(key, true), // <- index - k: key, // <- key - v: value, // <- value - p: prev = that[LAST], // <- previous entry - n: undefined, // <- next entry - r: false // <- removed - }; - if(!that[FIRST])that[FIRST] = entry; - if(prev)prev.n = entry; - that[SIZE]++; - // add to index - if(index != 'F')that[O1][index] = entry; - } return that; - }, - getEntry: getEntry, - getIterConstructor: function(){ - return function(iterated, kind){ - set(this, ITER, {o: iterated, k: kind}); - }; - }, - next: function(){ - var iter = this[ITER] - , kind = iter.k - , entry = iter.l; - // revert to the last existing entry - while(entry && entry.r)entry = entry.p; - // get next entry - if(!iter.o || !(iter.l = entry = entry ? entry.n : iter.o[FIRST])){ - // or finish the iteration - iter.o = undefined; - return step(1); - } - // return step by kind - if(kind == 'key' )return step(0, entry.k); - if(kind == 'value')return step(0, entry.v); - return step(0, [entry.k, entry.v]); - } +},{"./$":24,"./$.wks":42}],8:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , ctx = require('./$.ctx') + , safe = require('./$.uid').safe + , assert = require('./$.assert') + , forOf = require('./$.for-of') + , step = require('./$.iter').step + , $has = $.has + , set = $.set + , isObject = $.isObject + , hide = $.hide + , isExtensible = Object.isExtensible || isObject + , ID = safe('id') + , O1 = safe('O1') + , LAST = safe('last') + , FIRST = safe('first') + , ITER = safe('iter') + , SIZE = $.DESC ? safe('size') : 'size' + , id = 0; + +function fastKey(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!$has(it, ID)){ + // can't set id to frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add id + if(!create)return 'E'; + // add missing object id + hide(it, ID, ++id); + // return object id with prefix + } return 'O' + it[ID]; +} + +function getEntry(that, key){ + // fast case + var index = fastKey(key), entry; + if(index !== 'F')return that[O1][index]; + // frozen object case + for(entry = that[FIRST]; entry; entry = entry.n){ + if(entry.k == key)return entry; + } +} + +module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + assert.inst(that, C, NAME); + set(that, O1, $.create(null)); + set(that, SIZE, 0); + set(that, LAST, undefined); + set(that, FIRST, undefined); + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + require('./$.mix')(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear(){ + for(var that = this, data = that[O1], entry = that[FIRST]; entry; entry = entry.n){ + entry.r = true; + if(entry.p)entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that[FIRST] = that[LAST] = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function(key){ + var that = this + , entry = getEntry(that, key); + if(entry){ + var next = entry.n + , prev = entry.p; + delete that[O1][entry.i]; + entry.r = true; + if(prev)prev.n = next; + if(next)next.p = prev; + if(that[FIRST] == entry)that[FIRST] = next; + if(that[LAST] == entry)that[LAST] = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */){ + var f = ctx(callbackfn, arguments[1], 3) + , entry; + while(entry = entry ? entry.n : this[FIRST]){ + f(entry.v, entry.k, this); + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key){ + return !!getEntry(this, key); + } + }); + if($.DESC)$.setDesc(C.prototype, 'size', { + get: function(){ + return assert.def(this[SIZE]); + } + }); + return C; + }, + def: function(that, key, value){ + var entry = getEntry(that, key) + , prev, index; + // change existing entry + if(entry){ + entry.v = value; + // create new entry + } else { + that[LAST] = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that[LAST], // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if(!that[FIRST])that[FIRST] = entry; + if(prev)prev.n = entry; + that[SIZE]++; + // add to index + if(index !== 'F')that[O1][index] = entry; + } return that; + }, + getEntry: getEntry, + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + setIter: function(C, NAME, IS_MAP){ + require('./$.iter-define')(C, NAME, function(iterated, kind){ + set(this, ITER, {o: iterated, k: kind}); + }, function(){ + var iter = this[ITER] + , kind = iter.k + , entry = iter.l; + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + // get next entry + if(!iter.o || !(iter.l = entry = entry ? entry.n : iter.o[FIRST])){ + // or finish the iteration + iter.o = undefined; + return step(1); + } + // return step by kind + if(kind == 'keys' )return step(0, entry.k); + if(kind == 'values')return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); + } }; -},{"./$":15,"./$.assert":4,"./$.ctx":10,"./$.iter":14,"./$.uid":24}],8:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , safe = require('./$.uid').safe - , assert = require('./$.assert') - , forOf = require('./$.iter').forOf - , has = $.has - , isObject = $.isObject - , hide = $.hide - , isFrozen = Object.isFrozen || $.core.Object.isFrozen - , id = 0 - , ID = safe('id') - , WEAK = safe('weak') - , LEAK = safe('leak') - , method = require('./$.array-methods') - , find = method(5) - , findIndex = method(6); -function findFrozen(store, key){ - return find.call(store.array, function(it){ - return it[0] === key; - }); -} -// fallback for frozen keys -function leakStore(that){ - return that[LEAK] || hide(that, LEAK, { - array: [], - get: function(key){ - var entry = findFrozen(this, key); - if(entry)return entry[1]; - }, - has: function(key){ - return !!findFrozen(this, key); - }, - set: function(key, value){ - var entry = findFrozen(this, key); - if(entry)entry[1] = value; - else this.array.push([key, value]); - }, - 'delete': function(key){ - var index = findIndex.call(this.array, function(it){ - return it[0] === key; - }); - if(~index)this.array.splice(index, 1); - return !!~index; - } - })[LEAK]; -} - -module.exports = { - getConstructor: function(NAME, IS_MAP, ADDER){ - function C(iterable){ - $.set(assert.inst(this, C, NAME), ID, id++); - if(iterable != undefined)forOf(iterable, IS_MAP, this[ADDER], this); - } - $.mix(C.prototype, { - // 23.3.3.2 WeakMap.prototype.delete(key) - // 23.4.3.3 WeakSet.prototype.delete(value) - 'delete': function(key){ - if(!isObject(key))return false; - if(isFrozen(key))return leakStore(this)['delete'](key); - return has(key, WEAK) && has(key[WEAK], this[ID]) && delete key[WEAK][this[ID]]; - }, - // 23.3.3.4 WeakMap.prototype.has(key) - // 23.4.3.4 WeakSet.prototype.has(value) - has: function(key){ - if(!isObject(key))return false; - if(isFrozen(key))return leakStore(this).has(key); - return has(key, WEAK) && has(key[WEAK], this[ID]); - } - }); - return C; - }, - def: function(that, key, value){ - if(isFrozen(assert.obj(key))){ - leakStore(that).set(key, value); - } else { - has(key, WEAK) || hide(key, WEAK, {}); - key[WEAK][that[ID]] = value; - } return that; - }, - leakStore: leakStore, - WEAK: WEAK, - ID: ID +},{"./$":24,"./$.assert":5,"./$.ctx":12,"./$.for-of":16,"./$.iter":23,"./$.iter-define":21,"./$.mix":26,"./$.uid":40}],9:[function(require,module,exports){ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $def = require('./$.def') + , forOf = require('./$.for-of'); +module.exports = function(NAME){ + $def($def.P, NAME, { + toJSON: function toJSON(){ + var arr = []; + forOf(this, false, arr.push, arr); + return arr; + } + }); }; -},{"./$":15,"./$.array-methods":3,"./$.assert":4,"./$.iter":14,"./$.uid":24}],9:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , $def = require('./$.def') - , $iter = require('./$.iter') - , assertInstance = require('./$.assert').inst; - -module.exports = function(NAME, methods, common, IS_MAP, isWeak){ - var Base = $.g[NAME] - , C = Base - , ADDER = IS_MAP ? 'set' : 'add' - , proto = C && C.prototype - , O = {}; - function fixMethod(KEY, CHAIN){ - var method = proto[KEY]; - if($.FW)proto[KEY] = function(a, b){ - var result = method.call(this, a === 0 ? 0 : a, b); - return CHAIN ? this : result; - }; - } - if(!$.isFunction(C) || !(isWeak || !$iter.BUGGY && proto.forEach && proto.entries)){ - // create collection constructor - C = common.getConstructor(NAME, IS_MAP, ADDER); - $.mix(C.prototype, methods); - } else { - var inst = new C - , chain = inst[ADDER](isWeak ? {} : -0, 1) - , buggyZero; - // wrap for init collections from iterable - if($iter.fail(function(iter){ - new C(iter); // eslint-disable-line no-new - }) || $iter.DANGER_CLOSING){ - C = function(iterable){ - assertInstance(this, C, NAME); - var that = new Base; - if(iterable != undefined)$iter.forOf(iterable, IS_MAP, that[ADDER], that); - return that; - }; - C.prototype = proto; - if($.FW)proto.constructor = C; - } - isWeak || inst.forEach(function(val, key){ - buggyZero = 1 / key === -Infinity; - }); - // fix converting -0 key to +0 - if(buggyZero){ - fixMethod('delete'); - fixMethod('has'); - IS_MAP && fixMethod('get'); - } - // + fix .add & .set for chaining - if(buggyZero || chain !== inst)fixMethod(ADDER, true); - } - - require('./$.cof').set(C, NAME); - require('./$.species')(C); - - O[NAME] = C; - $def($def.G + $def.W + $def.F * (C != Base), O); - - // add .keys, .values, .entries, [@@iterator] - // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 - if(!isWeak)$iter.std( - C, NAME, - common.getIterConstructor(), common.next, - IS_MAP ? 'key+value' : 'value' , !IS_MAP, true - ); - - return C; +},{"./$.def":13,"./$.for-of":16}],10:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , safe = require('./$.uid').safe + , assert = require('./$.assert') + , forOf = require('./$.for-of') + , $has = $.has + , isObject = $.isObject + , hide = $.hide + , isExtensible = Object.isExtensible || isObject + , id = 0 + , ID = safe('id') + , WEAK = safe('weak') + , LEAK = safe('leak') + , method = require('./$.array-methods') + , find = method(5) + , findIndex = method(6); +function findFrozen(store, key){ + return find(store.array, function(it){ + return it[0] === key; + }); +} +// fallback for frozen keys +function leakStore(that){ + return that[LEAK] || hide(that, LEAK, { + array: [], + get: function(key){ + var entry = findFrozen(this, key); + if(entry)return entry[1]; + }, + has: function(key){ + return !!findFrozen(this, key); + }, + set: function(key, value){ + var entry = findFrozen(this, key); + if(entry)entry[1] = value; + else this.array.push([key, value]); + }, + 'delete': function(key){ + var index = findIndex(this.array, function(it){ + return it[0] === key; + }); + if(~index)this.array.splice(index, 1); + return !!~index; + } + })[LEAK]; +} + +module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + $.set(assert.inst(that, C, NAME), ID, id++); + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + require('./$.mix')(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function(key){ + if(!isObject(key))return false; + if(!isExtensible(key))return leakStore(this)['delete'](key); + return $has(key, WEAK) && $has(key[WEAK], this[ID]) && delete key[WEAK][this[ID]]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key){ + if(!isObject(key))return false; + if(!isExtensible(key))return leakStore(this).has(key); + return $has(key, WEAK) && $has(key[WEAK], this[ID]); + } + }); + return C; + }, + def: function(that, key, value){ + if(!isExtensible(assert.obj(key))){ + leakStore(that).set(key, value); + } else { + $has(key, WEAK) || hide(key, WEAK, {}); + key[WEAK][that[ID]] = value; + } return that; + }, + leakStore: leakStore, + WEAK: WEAK, + ID: ID +}; +},{"./$":24,"./$.array-methods":4,"./$.assert":5,"./$.for-of":16,"./$.mix":26,"./$.uid":40}],11:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , $def = require('./$.def') + , BUGGY = require('./$.iter').BUGGY + , forOf = require('./$.for-of') + , species = require('./$.species') + , assertInstance = require('./$.assert').inst; + +module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ + var Base = $.g[NAME] + , C = Base + , ADDER = IS_MAP ? 'set' : 'add' + , proto = C && C.prototype + , O = {}; + function fixMethod(KEY){ + var fn = proto[KEY]; + require('./$.redef')(proto, KEY, + KEY == 'delete' ? function(a){ return fn.call(this, a === 0 ? 0 : a); } + : KEY == 'has' ? function has(a){ return fn.call(this, a === 0 ? 0 : a); } + : KEY == 'get' ? function get(a){ return fn.call(this, a === 0 ? 0 : a); } + : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + } + if(!$.isFunction(C) || !(IS_WEAK || !BUGGY && proto.forEach && proto.entries)){ + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + require('./$.mix')(C.prototype, methods); + } else { + var inst = new C + , chain = inst[ADDER](IS_WEAK ? {} : -0, 1) + , buggyZero; + // wrap for init collections from iterable + if(!require('./$.iter-detect')(function(iter){ new C(iter); })){ // eslint-disable-line no-new + C = wrapper(function(target, iterable){ + assertInstance(target, C, NAME); + var that = new Base; + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + IS_WEAK || inst.forEach(function(val, key){ + buggyZero = 1 / key === -Infinity; + }); + // fix converting -0 key to +0 + if(buggyZero){ + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + // + fix .add & .set for chaining + if(buggyZero || chain !== inst)fixMethod(ADDER); + } + + require('./$.cof').set(C, NAME); + + O[NAME] = C; + $def($def.G + $def.W + $def.F * (C != Base), O); + species(C); + species($.core[NAME]); // for wrapper + + if(!IS_WEAK)common.setIter(C, NAME, IS_MAP); + + return C; }; -},{"./$":15,"./$.assert":4,"./$.cof":6,"./$.def":11,"./$.iter":14,"./$.species":21}],10:[function(require,module,exports){ -// Optional / simple context binding -var assertFunction = require('./$.assert').fn; -module.exports = function(fn, that, length){ - assertFunction(fn); - if(~length && that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } return function(/* ...args */){ - return fn.apply(that, arguments); - }; +},{"./$":24,"./$.assert":5,"./$.cof":7,"./$.def":13,"./$.for-of":16,"./$.iter":23,"./$.iter-detect":22,"./$.mix":26,"./$.redef":29,"./$.species":34}],12:[function(require,module,exports){ +// Optional / simple context binding +var assertFunction = require('./$.assert').fn; +module.exports = function(fn, that, length){ + assertFunction(fn); + if(~length && that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } return function(/* ...args */){ + return fn.apply(that, arguments); + }; }; -},{"./$.assert":4}],11:[function(require,module,exports){ -var $ = require('./$') - , global = $.g - , core = $.core - , isFunction = $.isFunction; -function ctx(fn, that){ - return function(){ - return fn.apply(that, arguments); - }; -} -global.core = core; -// type bitmap -$def.F = 1; // forced -$def.G = 2; // global -$def.S = 4; // static -$def.P = 8; // proto -$def.B = 16; // bind -$def.W = 32; // wrap -function $def(type, name, source){ - var key, own, out, exp - , isGlobal = type & $def.G - , target = isGlobal ? global : type & $def.S - ? global[name] : (global[name] || {}).prototype - , exports = isGlobal ? core : core[name] || (core[name] = {}); - if(isGlobal)source = name; - for(key in source){ - // contains in native - own = !(type & $def.F) && target && key in target; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - if(type & $def.B && own)exp = ctx(out, global); - else exp = type & $def.P && isFunction(out) ? ctx(Function.call, out) : out; - // extend global - if(target && !own){ - if(isGlobal)target[key] = out; - else delete target[key] && $.hide(target, key, out); - } - // export - if(exports[key] != out)$.hide(exports, key, exp); - } -} +},{"./$.assert":5}],13:[function(require,module,exports){ +var $ = require('./$') + , global = $.g + , core = $.core + , isFunction = $.isFunction + , $redef = require('./$.redef'); +function ctx(fn, that){ + return function(){ + return fn.apply(that, arguments); + }; +} +global.core = core; +// type bitmap +$def.F = 1; // forced +$def.G = 2; // global +$def.S = 4; // static +$def.P = 8; // proto +$def.B = 16; // bind +$def.W = 32; // wrap +function $def(type, name, source){ + var key, own, out, exp + , isGlobal = type & $def.G + , isProto = type & $def.P + , target = isGlobal ? global : type & $def.S + ? global[name] : (global[name] || {}).prototype + , exports = isGlobal ? core : core[name] || (core[name] = {}); + if(isGlobal)source = name; + for(key in source){ + // contains in native + own = !(type & $def.F) && target && key in target; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + if(type & $def.B && own)exp = ctx(out, global); + else exp = isProto && isFunction(out) ? ctx(Function.call, out) : out; + // extend global + if(target && !own)$redef(target, key, out); + // export + if(exports[key] != out)$.hide(exports, key, exp); + if(isProto)(exports.prototype || (exports.prototype = {}))[key] = out; + } +} module.exports = $def; -},{"./$":15}],12:[function(require,module,exports){ -module.exports = function($){ - $.FW = true; - $.path = $.g; - return $; +},{"./$":24,"./$.redef":29}],14:[function(require,module,exports){ +var $ = require('./$') + , document = $.g.document + , isObject = $.isObject + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); +module.exports = function(it){ + return is ? document.createElement(it) : {}; }; -},{}],13:[function(require,module,exports){ -// Fast apply -// http://jsperf.lnkit.com/fast-apply/5 -module.exports = function(fn, args, that){ - var un = that === undefined; - switch(args.length){ - case 0: return un ? fn() - : fn.call(that); - case 1: return un ? fn(args[0]) - : fn.call(that, args[0]); - case 2: return un ? fn(args[0], args[1]) - : fn.call(that, args[0], args[1]); - case 3: return un ? fn(args[0], args[1], args[2]) - : fn.call(that, args[0], args[1], args[2]); - case 4: return un ? fn(args[0], args[1], args[2], args[3]) - : fn.call(that, args[0], args[1], args[2], args[3]); - case 5: return un ? fn(args[0], args[1], args[2], args[3], args[4]) - : fn.call(that, args[0], args[1], args[2], args[3], args[4]); - } return fn.apply(that, args); +},{"./$":24}],15:[function(require,module,exports){ +var $ = require('./$'); +module.exports = function(it){ + var keys = $.getKeys(it) + , getDesc = $.getDesc + , getSymbols = $.getSymbols; + if(getSymbols)$.each.call(getSymbols(it), function(key){ + if(getDesc(it, key).enumerable)keys.push(key); + }); + return keys; }; -},{}],14:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , ctx = require('./$.ctx') - , cof = require('./$.cof') - , $def = require('./$.def') - , assertObject = require('./$.assert').obj - , SYMBOL_ITERATOR = require('./$.wks')('iterator') - , FF_ITERATOR = '@@iterator' - , Iterators = {} - , IteratorPrototype = {}; -// Safari has byggy iterators w/o `next` -var BUGGY = 'keys' in [] && !('next' in [].keys()); -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -setIterator(IteratorPrototype, $.that); -function setIterator(O, value){ - $.hide(O, SYMBOL_ITERATOR, value); - // Add iterator for FF iterator protocol - if(FF_ITERATOR in [])$.hide(O, FF_ITERATOR, value); -} -function defineIterator(Constructor, NAME, value, DEFAULT){ - var proto = Constructor.prototype - , iter = proto[SYMBOL_ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] || value; - // Define iterator - if($.FW)setIterator(proto, iter); - if(iter !== value){ - var iterProto = $.getProto(iter.call(new Constructor)); - // Set @@toStringTag to native iterators - cof.set(iterProto, NAME + ' Iterator', true); - // FF fix - if($.FW)$.has(proto, FF_ITERATOR) && setIterator(iterProto, $.that); - } - // Plug for library - Iterators[NAME] = iter; - // FF & v8 fix - Iterators[NAME + ' Iterator'] = $.that; - return iter; -} -function getIterator(it){ - var Symbol = $.g.Symbol - , ext = it[Symbol && Symbol.iterator || FF_ITERATOR] - , getIter = ext || it[SYMBOL_ITERATOR] || Iterators[cof.classof(it)]; - return assertObject(getIter.call(it)); -} -function closeIterator(iterator){ - var ret = iterator['return']; - if(ret !== undefined)assertObject(ret.call(iterator)); -} -function stepCall(iterator, fn, value, entries){ +},{"./$":24}],16:[function(require,module,exports){ +var ctx = require('./$.ctx') + , get = require('./$.iter').get + , call = require('./$.iter-call'); +module.exports = function(iterable, entries, fn, that){ + var iterator = get(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , step; + while(!(step = iterator.next()).done){ + if(call(iterator, f, step.value, entries) === false){ + return call.close(iterator); + } + } +}; +},{"./$.ctx":12,"./$.iter":23,"./$.iter-call":20}],17:[function(require,module,exports){ +module.exports = function($){ + $.FW = true; + $.path = $.g; + return $; +}; +},{}],18:[function(require,module,exports){ +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var $ = require('./$') + , toString = {}.toString + , getNames = $.getNames; + +var windowNames = typeof window == 'object' && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +function getWindowNames(it){ try { - return entries ? fn(assertObject(value)[0], value[1]) : fn(value); + return getNames(it); } catch(e){ - closeIterator(iterator); - throw e; - } -} -var DANGER_CLOSING = true; -!function(){ - try { - var iter = [1].keys(); - iter['return'] = function(){ DANGER_CLOSING = false; }; - Array.from(iter, function(){ throw 2; }); - } catch(e){ /* empty */ } -}(); -var $iter = module.exports = { - BUGGY: BUGGY, - DANGER_CLOSING: DANGER_CLOSING, - fail: function(exec){ - var fail = true; - try { - var arr = [[{}, 1]] - , iter = arr[SYMBOL_ITERATOR]() - , next = iter.next; - iter.next = function(){ - fail = false; - return next.call(this); - }; - arr[SYMBOL_ITERATOR] = function(){ - return iter; - }; - exec(arr); - } catch(e){ /* empty */ } - return fail; - }, - Iterators: Iterators, - prototype: IteratorPrototype, - step: function(done, value){ - return {value: value, done: !!done}; - }, - stepCall: stepCall, - close: closeIterator, - is: function(it){ - var O = Object(it) - , Symbol = $.g.Symbol - , SYM = Symbol && Symbol.iterator || FF_ITERATOR; - return SYM in O || SYMBOL_ITERATOR in O || $.has(Iterators, cof.classof(O)); - }, - get: getIterator, - set: setIterator, - create: function(Constructor, NAME, next, proto){ - Constructor.prototype = $.create(proto || $iter.prototype, {next: $.desc(1, next)}); - cof.set(Constructor, NAME + ' Iterator'); - }, - define: defineIterator, - std: function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){ - function createIter(kind){ - return function(){ - return new Constructor(this, kind); - }; - } - $iter.create(Constructor, NAME, next); - var entries = createIter('key+value') - , values = createIter('value') - , proto = Base.prototype - , methods, key; - if(DEFAULT == 'value')values = defineIterator(Base, NAME, values, 'values'); - else entries = defineIterator(Base, NAME, entries, 'entries'); - if(DEFAULT){ - methods = { - entries: entries, - keys: IS_SET ? values : createIter('key'), - values: values - }; - $def($def.P + $def.F * BUGGY, NAME, methods); - if(FORCE)for(key in methods){ - if(!(key in proto))$.hide(proto, key, methods[key]); - } - } - }, - forOf: function(iterable, entries, fn, that){ - var iterator = getIterator(iterable) - , f = ctx(fn, that, entries ? 2 : 1) - , step; - while(!(step = iterator.next()).done){ - if(stepCall(iterator, f, step.value, entries) === false){ - return closeIterator(iterator); - } - } + return windowNames.slice(); } -}; -},{"./$":15,"./$.assert":4,"./$.cof":6,"./$.ctx":10,"./$.def":11,"./$.wks":26}],15:[function(require,module,exports){ -'use strict'; -var global = typeof self != 'undefined' ? self : Function('return this')() - , core = {} - , defineProperty = Object.defineProperty - , hasOwnProperty = {}.hasOwnProperty - , ceil = Math.ceil - , floor = Math.floor - , max = Math.max - , min = Math.min; -// The engine works fine with descriptors? Thank's IE8 for his funny defineProperty. -var DESC = !!function(){ - try { - return defineProperty({}, 'a', {get: function(){ return 2; }}).a == 2; - } catch(e){ /* empty */ } -}(); -var hide = createDefiner(1); -// 7.1.4 ToInteger -function toInteger(it){ - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -} -function desc(bitmap, value){ - return { - enumerable : !(bitmap & 1), - configurable: !(bitmap & 2), - writable : !(bitmap & 4), - value : value - }; -} -function simpleSet(object, key, value){ - object[key] = value; - return object; -} -function createDefiner(bitmap){ - return DESC ? function(object, key, value){ - return $.setDesc(object, key, desc(bitmap, value)); // eslint-disable-line no-use-before-define - } : simpleSet; -} - -function isObject(it){ - return it !== null && (typeof it == 'object' || typeof it == 'function'); -} -function isFunction(it){ - return typeof it == 'function'; -} -function assertDefined(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); - return it; } -var $ = module.exports = require('./$.fw')({ - g: global, - core: core, - html: global.document && document.documentElement, - // http://jsperf.com/core-js-isobject - isObject: isObject, - isFunction: isFunction, - it: function(it){ - return it; - }, - that: function(){ - return this; - }, - // 7.1.4 ToInteger - toInteger: toInteger, - // 7.1.15 ToLength - toLength: function(it){ - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 - }, - toIndex: function(index, length){ - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); - }, - has: function(it, key){ - return hasOwnProperty.call(it, key); - }, - create: Object.create, - getProto: Object.getPrototypeOf, - DESC: DESC, - desc: desc, - getDesc: Object.getOwnPropertyDescriptor, - setDesc: defineProperty, - getKeys: Object.keys, - getNames: Object.getOwnPropertyNames, - getSymbols: Object.getOwnPropertySymbols, - // Dummy, fix for not array-like ES3 string in es5 module - assertDefined: assertDefined, - ES5Object: Object, - toObject: function(it){ - return $.ES5Object(assertDefined(it)); - }, - hide: hide, - def: createDefiner(0), - set: global.Symbol ? simpleSet : hide, - mix: function(target, src){ - for(var key in src)hide(target, key, src[key]); - return target; - }, - each: [].forEach -}); -if(typeof __e != 'undefined')__e = core; -if(typeof __g != 'undefined')__g = global; -},{"./$.fw":12}],16:[function(require,module,exports){ -var $ = require('./$'); -module.exports = function(object, el){ - var O = $.toObject(object) - , keys = $.getKeys(O) - , length = keys.length - , index = 0 - , key; - while(length > index)if(O[key = keys[index++]] === el)return key; +module.exports.get = function getOwnPropertyNames(it){ + if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it); + return getNames($.toObject(it)); }; -},{"./$":15}],17:[function(require,module,exports){ -var $ = require('./$') - , assertObject = require('./$.assert').obj; -module.exports = function(it){ - assertObject(it); - return $.getSymbols ? $.getNames(it).concat($.getSymbols(it)) : $.getNames(it); +},{"./$":24}],19:[function(require,module,exports){ +// Fast apply +// http://jsperf.lnkit.com/fast-apply/5 +module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + case 5: return un ? fn(args[0], args[1], args[2], args[3], args[4]) + : fn.call(that, args[0], args[1], args[2], args[3], args[4]); + } return fn.apply(that, args); }; -},{"./$":15,"./$.assert":4}],18:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , invoke = require('./$.invoke') - , assertFunction = require('./$.assert').fn; -module.exports = function(/* ...pargs */){ - var fn = assertFunction(this) - , length = arguments.length - , pargs = Array(length) - , i = 0 - , _ = $.path._ - , holder = false; - while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; - return function(/* ...args */){ - var that = this - , _length = arguments.length - , j = 0, k = 0, args; - if(!holder && !_length)return invoke(fn, pargs, that); - args = pargs.slice(); - if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; - while(_length > k)args.push(arguments[k++]); - return invoke(fn, args, that); - }; +},{}],20:[function(require,module,exports){ +var assertObject = require('./$.assert').obj; +function close(iterator){ + var ret = iterator['return']; + if(ret !== undefined)assertObject(ret.call(iterator)); +} +function call(iterator, fn, value, entries){ + try { + return entries ? fn(assertObject(value)[0], value[1]) : fn(value); + } catch(e){ + close(iterator); + throw e; + } +} +call.close = close; +module.exports = call; +},{"./$.assert":5}],21:[function(require,module,exports){ +var $def = require('./$.def') + , $redef = require('./$.redef') + , $ = require('./$') + , cof = require('./$.cof') + , $iter = require('./$.iter') + , SYMBOL_ITERATOR = require('./$.wks')('iterator') + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values' + , Iterators = $iter.Iterators; +module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){ + $iter.create(Constructor, NAME, next); + function createMethod(kind){ + function $$(that){ + return new Constructor(that, kind); + } + switch(kind){ + case KEYS: return function keys(){ return $$(this); }; + case VALUES: return function values(){ return $$(this); }; + } return function entries(){ return $$(this); }; + } + var TAG = NAME + ' Iterator' + , proto = Base.prototype + , _native = proto[SYMBOL_ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , _default = _native || createMethod(DEFAULT) + , methods, key; + // Fix native + if(_native){ + var IteratorPrototype = $.getProto(_default.call(new Base)); + // Set @@toStringTag to native iterators + cof.set(IteratorPrototype, TAG, true); + // FF fix + if($.FW && $.has(proto, FF_ITERATOR))$iter.set(IteratorPrototype, $.that); + } + // Define iterator + if($.FW || FORCE)$iter.set(proto, _default); + // Plug for library + Iterators[NAME] = _default; + Iterators[TAG] = $.that; + if(DEFAULT){ + methods = { + keys: IS_SET ? _default : createMethod(KEYS), + values: DEFAULT == VALUES ? _default : createMethod(VALUES), + entries: DEFAULT != VALUES ? _default : createMethod('entries') + }; + if(FORCE)for(key in methods){ + if(!(key in proto))$redef(proto, key, methods[key]); + } else $def($def.P + $def.F * $iter.BUGGY, NAME, methods); + } }; -},{"./$":15,"./$.assert":4,"./$.invoke":13}],19:[function(require,module,exports){ -'use strict'; -module.exports = function(regExp, replace, isStatic){ - var replacer = replace === Object(replace) ? function(part){ - return replace[part]; - } : replace; - return function(it){ - return String(isStatic ? it : this).replace(regExp, replacer); - }; +},{"./$":24,"./$.cof":7,"./$.def":13,"./$.iter":23,"./$.redef":29,"./$.wks":42}],22:[function(require,module,exports){ +var SYMBOL_ITERATOR = require('./$.wks')('iterator') + , SAFE_CLOSING = false; +try { + var riter = [7][SYMBOL_ITERATOR](); + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); +} catch(e){ /* empty */ } +module.exports = function(exec){ + if(!SAFE_CLOSING)return false; + var safe = false; + try { + var arr = [7] + , iter = arr[SYMBOL_ITERATOR](); + iter.next = function(){ safe = true; }; + arr[SYMBOL_ITERATOR] = function(){ return iter; }; + exec(arr); + } catch(e){ /* empty */ } + return safe; }; -},{}],20:[function(require,module,exports){ -// Works with __proto__ only. Old v8 can't works with null proto objects. -/*eslint-disable no-proto */ -var $ = require('./$') - , assert = require('./$.assert'); -module.exports = Object.setPrototypeOf || ('__proto__' in {} // eslint-disable-line - ? function(buggy, set){ - try { - set = require('./$.ctx')(Function.call, $.getDesc(Object.prototype, '__proto__').set, 2); - set({}, []); - } catch(e){ buggy = true; } - return function(O, proto){ - assert.obj(O); - assert(proto === null || $.isObject(proto), proto, ": can't set as prototype!"); - if(buggy)O.__proto__ = proto; - else set(O, proto); - return O; - }; - }() - : undefined); -},{"./$":15,"./$.assert":4,"./$.ctx":10}],21:[function(require,module,exports){ -var $ = require('./$'); -module.exports = function(C){ - if($.DESC && $.FW)$.setDesc(C, require('./$.wks')('species'), { - configurable: true, - get: $.that - }); +},{"./$.wks":42}],23:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , cof = require('./$.cof') + , classof = cof.classof + , assert = require('./$.assert') + , assertObject = assert.obj + , SYMBOL_ITERATOR = require('./$.wks')('iterator') + , FF_ITERATOR = '@@iterator' + , Iterators = require('./$.shared')('iterators') + , IteratorPrototype = {}; +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +setIterator(IteratorPrototype, $.that); +function setIterator(O, value){ + $.hide(O, SYMBOL_ITERATOR, value); + // Add iterator for FF iterator protocol + if(FF_ITERATOR in [])$.hide(O, FF_ITERATOR, value); +} + +module.exports = { + // Safari has buggy iterators w/o `next` + BUGGY: 'keys' in [] && !('next' in [].keys()), + Iterators: Iterators, + step: function(done, value){ + return {value: value, done: !!done}; + }, + is: function(it){ + var O = Object(it) + , Symbol = $.g.Symbol; + return (Symbol && Symbol.iterator || FF_ITERATOR) in O + || SYMBOL_ITERATOR in O + || $.has(Iterators, classof(O)); + }, + get: function(it){ + var Symbol = $.g.Symbol + , getIter; + if(it != undefined){ + getIter = it[Symbol && Symbol.iterator || FF_ITERATOR] + || it[SYMBOL_ITERATOR] + || Iterators[classof(it)]; + } + assert($.isFunction(getIter), it, ' is not iterable!'); + return assertObject(getIter.call(it)); + }, + set: setIterator, + create: function(Constructor, NAME, next, proto){ + Constructor.prototype = $.create(proto || IteratorPrototype, {next: $.desc(1, next)}); + cof.set(Constructor, NAME + ' Iterator'); + } }; -},{"./$":15,"./$.wks":26}],22:[function(require,module,exports){ -'use strict'; -// true -> String#at -// false -> String#codePointAt -var $ = require('./$'); -module.exports = function(TO_STRING){ - return function(pos){ - var s = String($.assertDefined(this)) - , i = $.toInteger(pos) - , l = s.length - , a, b; - if(i < 0 || i >= l)return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l - || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; +},{"./$":24,"./$.assert":5,"./$.cof":7,"./$.shared":33,"./$.wks":42}],24:[function(require,module,exports){ +'use strict'; +var global = typeof self != 'undefined' ? self : Function('return this')() + , core = {} + , defineProperty = Object.defineProperty + , hasOwnProperty = {}.hasOwnProperty + , ceil = Math.ceil + , floor = Math.floor + , max = Math.max + , min = Math.min; +// The engine works fine with descriptors? Thank's IE8 for his funny defineProperty. +var DESC = !!function(){ + try { + return defineProperty({}, 'a', {get: function(){ return 2; }}).a == 2; + } catch(e){ /* empty */ } +}(); +var hide = createDefiner(1); +// 7.1.4 ToInteger +function toInteger(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +} +function desc(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; +} +function simpleSet(object, key, value){ + object[key] = value; + return object; +} +function createDefiner(bitmap){ + return DESC ? function(object, key, value){ + return $.setDesc(object, key, desc(bitmap, value)); + } : simpleSet; +} + +function isObject(it){ + return it !== null && (typeof it == 'object' || typeof it == 'function'); +} +function isFunction(it){ + return typeof it == 'function'; +} +function assertDefined(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; +} + +var $ = module.exports = require('./$.fw')({ + g: global, + core: core, + html: global.document && document.documentElement, + // http://jsperf.com/core-js-isobject + isObject: isObject, + isFunction: isFunction, + that: function(){ + return this; + }, + // 7.1.4 ToInteger + toInteger: toInteger, + // 7.1.15 ToLength + toLength: function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }, + toIndex: function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }, + has: function(it, key){ + return hasOwnProperty.call(it, key); + }, + create: Object.create, + getProto: Object.getPrototypeOf, + DESC: DESC, + desc: desc, + getDesc: Object.getOwnPropertyDescriptor, + setDesc: defineProperty, + setDescs: Object.defineProperties, + getKeys: Object.keys, + getNames: Object.getOwnPropertyNames, + getSymbols: Object.getOwnPropertySymbols, + assertDefined: assertDefined, + // Dummy, fix for not array-like ES3 string in es5 module + ES5Object: Object, + toObject: function(it){ + return $.ES5Object(assertDefined(it)); + }, + hide: hide, + def: createDefiner(0), + set: global.Symbol ? simpleSet : hide, + each: [].forEach +}); +/* eslint-disable no-undef */ +if(typeof __e != 'undefined')__e = core; +if(typeof __g != 'undefined')__g = global; +},{"./$.fw":17}],25:[function(require,module,exports){ +var $ = require('./$'); +module.exports = function(object, el){ + var O = $.toObject(object) + , keys = $.getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; }; -},{"./$":15}],23:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , ctx = require('./$.ctx') - , cof = require('./$.cof') - , invoke = require('./$.invoke') - , global = $.g - , isFunction = $.isFunction - , setTask = global.setImmediate - , clearTask = global.clearImmediate - , postMessage = global.postMessage - , addEventListener = global.addEventListener - , MessageChannel = global.MessageChannel - , counter = 0 - , queue = {} - , ONREADYSTATECHANGE = 'onreadystatechange' - , defer, channel, port; -function run(){ - var id = +this; - if($.has(queue, id)){ - var fn = queue[id]; - delete queue[id]; - fn(); - } -} -function listner(event){ - run.call(event.data); -} -// Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if(!isFunction(setTask) || !isFunction(clearTask)){ - setTask = function(fn){ - var args = [], i = 1; - while(arguments.length > i)args.push(arguments[i++]); - queue[++counter] = function(){ - invoke(isFunction(fn) ? fn : Function(fn), args); - }; - defer(counter); - return counter; - }; - clearTask = function(id){ - delete queue[id]; - }; - // Node.js 0.8- - if(cof(global.process) == 'process'){ - defer = function(id){ - global.process.nextTick(ctx(run, id, 1)); - }; - // Modern browsers, skip implementation for WebWorkers - // IE8 has postMessage, but it's sync & typeof its postMessage is object - } else if(addEventListener && isFunction(postMessage) && !$.g.importScripts){ - defer = function(id){ - postMessage(id, '*'); - }; - addEventListener('message', listner, false); - // WebWorkers - } else if(isFunction(MessageChannel)){ - channel = new MessageChannel; - port = channel.port2; - channel.port1.onmessage = listner; - defer = ctx(port.postMessage, port, 1); - // IE8- - } else if($.g.document && ONREADYSTATECHANGE in document.createElement('script')){ - defer = function(id){ - $.html.appendChild(document.createElement('script'))[ONREADYSTATECHANGE] = function(){ - $.html.removeChild(this); - run.call(id); - }; - }; - // Rest old browsers - } else { - defer = function(id){ - setTimeout(ctx(run, id, 1), 0); - }; - } -} -module.exports = { - set: setTask, - clear: clearTask +},{"./$":24}],26:[function(require,module,exports){ +var $redef = require('./$.redef'); +module.exports = function(target, src){ + for(var key in src)$redef(target, key, src[key]); + return target; }; -},{"./$":15,"./$.cof":6,"./$.ctx":10,"./$.invoke":13}],24:[function(require,module,exports){ -var sid = 0; -function uid(key){ - return 'Symbol(' + key + ')_' + (++sid + Math.random()).toString(36); -} -uid.safe = require('./$').g.Symbol || uid; -module.exports = uid; -},{"./$":15}],25:[function(require,module,exports){ -// 22.1.3.31 Array.prototype[@@unscopables] -var $ = require('./$') - , UNSCOPABLES = require('./$.wks')('unscopables'); -if($.FW && !(UNSCOPABLES in []))$.hide(Array.prototype, UNSCOPABLES, {}); -module.exports = function(key){ - if($.FW)[][UNSCOPABLES][key] = true; +},{"./$.redef":29}],27:[function(require,module,exports){ +var $ = require('./$') + , assertObject = require('./$.assert').obj; +module.exports = function ownKeys(it){ + assertObject(it); + var keys = $.getNames(it) + , getSymbols = $.getSymbols; + return getSymbols ? keys.concat(getSymbols(it)) : keys; }; -},{"./$":15,"./$.wks":26}],26:[function(require,module,exports){ -var global = require('./$').g - , store = {}; -module.exports = function(name){ - return store[name] || (store[name] = - global.Symbol && global.Symbol[name] || require('./$.uid').safe('Symbol.' + name)); +},{"./$":24,"./$.assert":5}],28:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , invoke = require('./$.invoke') + , assertFunction = require('./$.assert').fn; +module.exports = function(/* ...pargs */){ + var fn = assertFunction(this) + , length = arguments.length + , pargs = Array(length) + , i = 0 + , _ = $.path._ + , holder = false; + while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; + return function(/* ...args */){ + var that = this + , _length = arguments.length + , j = 0, k = 0, args; + if(!holder && !_length)return invoke(fn, pargs, that); + args = pargs.slice(); + if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; + while(_length > k)args.push(arguments[k++]); + return invoke(fn, args, that); + }; }; -},{"./$":15,"./$.uid":24}],27:[function(require,module,exports){ -var $ = require('./$') - , cof = require('./$.cof') - , $def = require('./$.def') - , invoke = require('./$.invoke') - , arrayMethod = require('./$.array-methods') - , IE_PROTO = require('./$.uid').safe('__proto__') - , assert = require('./$.assert') - , assertObject = assert.obj - , ObjectProto = Object.prototype - , A = [] - , slice = A.slice - , indexOf = A.indexOf - , classof = cof.classof - , defineProperties = Object.defineProperties - , has = $.has - , defineProperty = $.setDesc - , getOwnDescriptor = $.getDesc - , isFunction = $.isFunction - , toObject = $.toObject - , toLength = $.toLength - , IE8_DOM_DEFINE = false; - -if(!$.DESC){ - try { - IE8_DOM_DEFINE = defineProperty(document.createElement('div'), 'x', - {get: function(){ return 8; }} - ).x == 8; - } catch(e){ /* empty */ } - $.setDesc = function(O, P, Attributes){ - if(IE8_DOM_DEFINE)try { - return defineProperty(O, P, Attributes); - } catch(e){ /* empty */ } - if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); - if('value' in Attributes)assertObject(O)[P] = Attributes.value; - return O; - }; - $.getDesc = function(O, P){ - if(IE8_DOM_DEFINE)try { - return getOwnDescriptor(O, P); - } catch(e){ /* empty */ } - if(has(O, P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]); - }; - defineProperties = function(O, Properties){ - assertObject(O); - var keys = $.getKeys(Properties) - , length = keys.length - , i = 0 - , P; - while(length > i)$.setDesc(O, P = keys[i++], Properties[P]); - return O; - }; -} -$def($def.S + $def.F * !$.DESC, 'Object', { - // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P) - getOwnPropertyDescriptor: $.getDesc, - // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) - defineProperty: $.setDesc, - // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) - defineProperties: defineProperties -}); - - // IE 8- don't enum bug keys -var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' + - 'toLocaleString,toString,valueOf').split(',') - // Additional keys for getOwnPropertyNames - , keys2 = keys1.concat('length', 'prototype') - , keysLen1 = keys1.length; - -// Create object with `null` prototype: use iframe Object with cleared prototype -var createDict = function(){ - // Thrash, waste and sodomy: IE GC bug - var iframe = document.createElement('iframe') - , i = keysLen1 - , iframeDocument; - iframe.style.display = 'none'; - $.html.appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(''); - iframeDocument.close(); - createDict = iframeDocument.F; - while(i--)delete createDict.prototype[keys1[i]]; - return createDict(); -}; -function createGetKeys(names, length){ - return function(object){ - var O = toObject(object) - , i = 0 - , result = [] - , key; - for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while(length > i)if(has(O, key = names[i++])){ - ~indexOf.call(result, key) || result.push(key); - } - return result; - }; -} -function isPrimitive(it){ return !$.isObject(it); } -function Empty(){} -$def($def.S, 'Object', { - // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) - getPrototypeOf: $.getProto = $.getProto || function(O){ - O = Object(assert.def(O)); - if(has(O, IE_PROTO))return O[IE_PROTO]; - if(isFunction(O.constructor) && O instanceof O.constructor){ - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; - }, - // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) - getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true), - // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) - create: $.create = $.create || function(O, /*?*/Properties){ - var result; - if(O !== null){ - Empty.prototype = assertObject(O); - result = new Empty(); - Empty.prototype = null; - // add "__proto__" for Object.getPrototypeOf shim - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : defineProperties(result, Properties); - }, - // 19.1.2.14 / 15.2.3.14 Object.keys(O) - keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false), - // 19.1.2.17 / 15.2.3.8 Object.seal(O) - seal: $.it, // <- cap - // 19.1.2.5 / 15.2.3.9 Object.freeze(O) - freeze: $.it, // <- cap - // 19.1.2.15 / 15.2.3.10 Object.preventExtensions(O) - preventExtensions: $.it, // <- cap - // 19.1.2.13 / 15.2.3.11 Object.isSealed(O) - isSealed: isPrimitive, // <- cap - // 19.1.2.12 / 15.2.3.12 Object.isFrozen(O) - isFrozen: isPrimitive, // <- cap - // 19.1.2.11 / 15.2.3.13 Object.isExtensible(O) - isExtensible: $.isObject // <- cap -}); +},{"./$":24,"./$.assert":5,"./$.invoke":19}],29:[function(require,module,exports){ +var $ = require('./$') + , tpl = String({}.hasOwnProperty) + , SRC = require('./$.uid').safe('src') + , _toString = Function.toString; -// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) -$def($def.P, 'Function', { - bind: function(that /*, args... */){ - var fn = assert.fn(this) - , partArgs = slice.call(arguments, 1); - function bound(/* args... */){ - var args = partArgs.concat(slice.call(arguments)); - return invoke(fn, args, this instanceof bound ? $.create(fn.prototype) : that); - } - if(fn.prototype)bound.prototype = fn.prototype; - return bound; +function $redef(O, key, val, safe){ + if($.isFunction(val)){ + var base = O[key]; + $.hide(val, SRC, base ? String(base) : tpl.replace(/hasOwnProperty/, String(key))); + if(!('name' in val))val.name = key; } -}); - -// Fix for not array-like ES3 string -function arrayMethodFix(fn){ - return function(){ - return fn.apply($.ES5Object(this), arguments); - }; -} -if(!(0 in Object('z') && 'z'[0] == 'z')){ - $.ES5Object = function(it){ - return cof(it) == 'String' ? it.split('') : Object(it); - }; -} -$def($def.P + $def.F * ($.ES5Object != Object), 'Array', { - slice: arrayMethodFix(slice), - join: arrayMethodFix(A.join) -}); - -// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) -$def($def.S, 'Array', { - isArray: function(arg){ - return cof(arg) == 'Array'; + if(O === $.g){ + O[key] = val; + } else { + if(!safe)delete O[key]; + $.hide(O, key, val); } -}); -function createArrayReduce(isRight){ - return function(callbackfn, memo){ - assert.fn(callbackfn); - var O = toObject(this) - , length = toLength(O.length) - , index = isRight ? length - 1 : 0 - , i = isRight ? -1 : 1; - if(arguments.length < 2)for(;;){ - if(index in O){ - memo = O[index]; - index += i; - break; - } - index += i; - assert(isRight ? index >= 0 : length > index, 'Reduce of empty array with no initial value'); - } - for(;isRight ? index >= 0 : length > index; index += i)if(index in O){ - memo = callbackfn(memo, O[index], index, this); - } - return memo; - }; } -$def($def.P, 'Array', { - // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) - forEach: $.each = $.each || arrayMethod(0), - // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) - map: arrayMethod(1), - // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) - filter: arrayMethod(2), - // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) - some: arrayMethod(3), - // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) - every: arrayMethod(4), - // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) - reduce: createArrayReduce(false), - // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) - reduceRight: createArrayReduce(true), - // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) - indexOf: indexOf = indexOf || require('./$.array-includes')(false), - // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) - lastIndexOf: function(el, fromIndex /* = @[*-1] */){ - var O = toObject(this) - , length = toLength(O.length) - , index = length - 1; - if(arguments.length > 1)index = Math.min(index, $.toInteger(fromIndex)); - if(index < 0)index = toLength(length + index); - for(;index >= 0; index--)if(index in O)if(O[index] === el)return index; - return -1; - } -}); -// 21.1.3.25 / 15.5.4.20 String.prototype.trim() -$def($def.P, 'String', {trim: require('./$.replacer')(/^\s*([\s\S]*\S)?\s*$/, '$1')}); - -// 20.3.3.1 / 15.9.4.4 Date.now() -$def($def.S, 'Date', {now: function(){ - return +new Date; -}}); +// add fake Function#toString for correct work wrapped methods / constructors +// with methods similar to LoDash isNative +$redef(Function.prototype, 'toString', function toString(){ + return $.has(this, SRC) ? this[SRC] : _toString.call(this); +}); -function lz(num){ - return num > 9 ? num : '0' + num; -} -// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() -$def($def.P, 'Date', {toISOString: function(){ - if(!isFinite(this))throw RangeError('Invalid time value'); - var d = this - , y = d.getUTCFullYear() - , m = d.getUTCMilliseconds() - , s = y < 0 ? '-' : y > 9999 ? '+' : ''; - return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + - '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + - 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + - ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; -}}); +$.core.inspectSource = function(it){ + return _toString.call(it); +}; -if(classof(function(){ return arguments; }()) == 'Object')cof.classof = function(it){ - var tag = classof(it); - return tag == 'Object' && isFunction(it.callee) ? 'Arguments' : tag; +module.exports = $redef; +},{"./$":24,"./$.uid":40}],30:[function(require,module,exports){ +'use strict'; +module.exports = function(regExp, replace, isStatic){ + var replacer = replace === Object(replace) ? function(part){ + return replace[part]; + } : replace; + return function(it){ + return String(isStatic ? it : this).replace(regExp, replacer); + }; }; -},{"./$":15,"./$.array-includes":2,"./$.array-methods":3,"./$.assert":4,"./$.cof":6,"./$.def":11,"./$.invoke":13,"./$.replacer":19,"./$.uid":24}],28:[function(require,module,exports){ -'use strict'; -var $ = require('./$') - , $def = require('./$.def') - , toIndex = $.toIndex; -$def($def.P, 'Array', { - // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) - copyWithin: function(target/* = 0 */, start /* = 0, end = @length */){ - var O = Object($.assertDefined(this)) - , len = $.toLength(O.length) - , to = toIndex(target, len) - , from = toIndex(start, len) - , end = arguments[2] - , fin = end === undefined ? len : toIndex(end, len) - , count = Math.min(fin - from, len - to) - , inc = 1; - if(from < to && to < from + count){ - inc = -1; - from = from + count - 1; - to = to + count - 1; - } - while(count-- > 0){ - if(from in O)O[to] = O[from]; - else delete O[to]; - to += inc; - from += inc; - } return O; - } -}); +},{}],31:[function(require,module,exports){ +module.exports = Object.is || function is(x, y){ + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; +},{}],32:[function(require,module,exports){ +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var $ = require('./$') + , assert = require('./$.assert'); +function check(O, proto){ + assert.obj(O); + assert(proto === null || $.isObject(proto), proto, ": can't set as prototype!"); +} +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} // eslint-disable-line + ? function(buggy, set){ + try { + set = require('./$.ctx')(Function.call, $.getDesc(Object.prototype, '__proto__').set, 2); + set({}, []); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }() + : undefined), + check: check +}; +},{"./$":24,"./$.assert":5,"./$.ctx":12}],33:[function(require,module,exports){ +var $ = require('./$') + , SHARED = '__core-js_shared__' + , store = $.g[SHARED] || ($.g[SHARED] = {}); +module.exports = function(key){ + return store[key] || (store[key] = {}); +}; +},{"./$":24}],34:[function(require,module,exports){ +var $ = require('./$') + , SPECIES = require('./$.wks')('species'); +module.exports = function(C){ + if($.DESC && !(SPECIES in C))$.setDesc(C, SPECIES, { + configurable: true, + get: $.that + }); +}; +},{"./$":24,"./$.wks":42}],35:[function(require,module,exports){ +// true -> String#at +// false -> String#codePointAt +var $ = require('./$'); +module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String($.assertDefined(that)) + , i = $.toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l + || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; +},{"./$":24}],36:[function(require,module,exports){ +// http://wiki.ecmascript.org/doku.php?id=strawman:string_padding +var $ = require('./$') + , repeat = require('./$.string-repeat'); + +module.exports = function(that, minLength, fillChar, left){ + // 1. Let O be CheckObjectCoercible(this value). + // 2. Let S be ToString(O). + var S = String($.assertDefined(that)); + // 4. If intMinLength is undefined, return S. + if(minLength === undefined)return S; + // 4. Let intMinLength be ToInteger(minLength). + var intMinLength = $.toInteger(minLength); + // 5. Let fillLen be the number of characters in S minus intMinLength. + var fillLen = intMinLength - S.length; + // 6. If fillLen < 0, then throw a RangeError exception. + // 7. If fillLen is +∞, then throw a RangeError exception. + if(fillLen < 0 || fillLen === Infinity){ + throw new RangeError('Cannot satisfy string length ' + minLength + ' for string: ' + S); + } + // 8. Let sFillStr be the string represented by fillStr. + // 9. If sFillStr is undefined, let sFillStr be a space character. + var sFillStr = fillChar === undefined ? ' ' : String(fillChar); + // 10. Let sFillVal be a String made of sFillStr, repeated until fillLen is met. + var sFillVal = repeat.call(sFillStr, Math.ceil(fillLen / sFillStr.length)); + // truncate if we overflowed + if(sFillVal.length > fillLen)sFillVal = left + ? sFillVal.slice(sFillVal.length - fillLen) + : sFillVal.slice(0, fillLen); + // 11. Return a string made from sFillVal, followed by S. + // 11. Return a String made from S, followed by sFillVal. + return left ? sFillVal.concat(S) : S.concat(sFillVal); +}; +},{"./$":24,"./$.string-repeat":37}],37:[function(require,module,exports){ +'use strict'; +var $ = require('./$'); + +module.exports = function repeat(count){ + var str = String($.assertDefined(this)) + , res = '' + , n = $.toInteger(count); + if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); + for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; + return res; +}; +},{"./$":24}],38:[function(require,module,exports){ +'use strict'; +var $ = require('./$') + , ctx = require('./$.ctx') + , cof = require('./$.cof') + , invoke = require('./$.invoke') + , cel = require('./$.dom-create') + , global = $.g + , isFunction = $.isFunction + , html = $.html + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; +function run(){ + var id = +this; + if($.has(queue, id)){ + var fn = queue[id]; + delete queue[id]; + fn(); + } +} +function listner(event){ + run.call(event.data); +} +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if(!isFunction(setTask) || !isFunction(clearTask)){ + setTask = function(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ + invoke(isFunction(fn) ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function(id){ + delete queue[id]; + }; + // Node.js 0.8- + if(cof(process) == 'process'){ + defer = function(id){ + process.nextTick(ctx(run, id, 1)); + }; + // Modern browsers, skip implementation for WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is object + } else if(global.addEventListener && isFunction(global.postMessage) && !global.importScripts){ + defer = function(id){ + global.postMessage(id, '*'); + }; + global.addEventListener('message', listner, false); + // WebWorkers + } else if(isFunction(MessageChannel)){ + channel = new MessageChannel; + port = channel.port2; + channel.port1.onmessage = listner; + defer = ctx(port.postMessage, port, 1); + // IE8- + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function(id){ + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; +},{"./$":24,"./$.cof":7,"./$.ctx":12,"./$.dom-create":14,"./$.invoke":19}],39:[function(require,module,exports){ +module.exports = function(exec){ + try { + exec(); + return false; + } catch(e){ + return true; + } +}; +},{}],40:[function(require,module,exports){ +var sid = 0; +function uid(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++sid + Math.random()).toString(36)); +} +uid.safe = require('./$').g.Symbol || uid; +module.exports = uid; +},{"./$":24}],41:[function(require,module,exports){ +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = require('./$.wks')('unscopables'); +if(!(UNSCOPABLES in []))require('./$').hide(Array.prototype, UNSCOPABLES, {}); +module.exports = function(key){ + [][UNSCOPABLES][key] = true; +}; +},{"./$":24,"./$.wks":42}],42:[function(require,module,exports){ +var global = require('./$').g + , store = require('./$.shared')('wks'); +module.exports = function(name){ + return store[name] || (store[name] = + global.Symbol && global.Symbol[name] || require('./$.uid').safe('Symbol.' + name)); +}; +},{"./$":24,"./$.shared":33,"./$.uid":40}],43:[function(require,module,exports){ +var $ = require('./$') + , cel = require('./$.dom-create') + , cof = require('./$.cof') + , $def = require('./$.def') + , invoke = require('./$.invoke') + , arrayMethod = require('./$.array-methods') + , IE_PROTO = require('./$.uid').safe('__proto__') + , assert = require('./$.assert') + , assertObject = assert.obj + , ObjectProto = Object.prototype + , html = $.html + , A = [] + , _slice = A.slice + , _join = A.join + , classof = cof.classof + , has = $.has + , defineProperty = $.setDesc + , getOwnDescriptor = $.getDesc + , defineProperties = $.setDescs + , isFunction = $.isFunction + , isObject = $.isObject + , toObject = $.toObject + , toLength = $.toLength + , toIndex = $.toIndex + , IE8_DOM_DEFINE = false + , $indexOf = require('./$.array-includes')(false) + , $forEach = arrayMethod(0) + , $map = arrayMethod(1) + , $filter = arrayMethod(2) + , $some = arrayMethod(3) + , $every = arrayMethod(4); + +if(!$.DESC){ + try { + IE8_DOM_DEFINE = defineProperty(cel('div'), 'x', + {get: function(){ return 8; }} + ).x == 8; + } catch(e){ /* empty */ } + $.setDesc = function(O, P, Attributes){ + if(IE8_DOM_DEFINE)try { + return defineProperty(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)assertObject(O)[P] = Attributes.value; + return O; + }; + $.getDesc = function(O, P){ + if(IE8_DOM_DEFINE)try { + return getOwnDescriptor(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]); + }; + $.setDescs = defineProperties = function(O, Properties){ + assertObject(O); + var keys = $.getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)$.setDesc(O, P = keys[i++], Properties[P]); + return O; + }; +} +$def($def.S + $def.F * !$.DESC, 'Object', { + // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $.getDesc, + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + defineProperty: $.setDesc, + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + defineProperties: defineProperties +}); + + // IE 8- don't enum bug keys +var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' + + 'toLocaleString,toString,valueOf').split(',') + // Additional keys for getOwnPropertyNames + , keys2 = keys1.concat('length', 'prototype') + , keysLen1 = keys1.length; + +// Create object with `null` prototype: use iframe Object with cleared prototype +var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = cel('iframe') + , i = keysLen1 + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write('");iframeDocument.close();createDict=iframeDocument.F;while(i--)delete createDict.prototype[keys1[i]];return createDict()};function createGetKeys(names,length){return function(object){var O=toObject(object),i=0,result=[],key;for(key in O)if(key!=IE_PROTO)has(O,key)&&result.push(key);while(length>i)if(has(O,key=names[i++])){~indexOf.call(result,key)||result.push(key)}return result}}function isPrimitive(it){return!$.isObject(it)}function Empty(){}$def($def.S,"Object",{getPrototypeOf:$.getProto=$.getProto||function(O){O=Object(assert.def(O));if(has(O,IE_PROTO))return O[IE_PROTO];if(isFunction(O.constructor)&&O instanceof O.constructor){return O.constructor.prototype}return O instanceof Object?ObjectProto:null},getOwnPropertyNames:$.getNames=$.getNames||createGetKeys(keys2,keys2.length,true),create:$.create=$.create||function(O,Properties){var result;if(O!==null){Empty.prototype=assertObject(O);result=new Empty;Empty.prototype=null;result[IE_PROTO]=O}else result=createDict();return Properties===undefined?result:defineProperties(result,Properties)},keys:$.getKeys=$.getKeys||createGetKeys(keys1,keysLen1,false),seal:$.it,freeze:$.it,preventExtensions:$.it,isSealed:isPrimitive,isFrozen:isPrimitive,isExtensible:$.isObject});$def($def.P,"Function",{bind:function(that){var fn=assert.fn(this),partArgs=slice.call(arguments,1);function bound(){var args=partArgs.concat(slice.call(arguments));return invoke(fn,args,this instanceof bound?$.create(fn.prototype):that)}if(fn.prototype)bound.prototype=fn.prototype;return bound}});function arrayMethodFix(fn){return function(){return fn.apply($.ES5Object(this),arguments)}}if(!(0 in Object("z")&&"z"[0]=="z")){$.ES5Object=function(it){return cof(it)=="String"?it.split(""):Object(it)}}$def($def.P+$def.F*($.ES5Object!=Object),"Array",{slice:arrayMethodFix(slice),join:arrayMethodFix(A.join)});$def($def.S,"Array",{isArray:function(arg){return cof(arg)=="Array"}});function createArrayReduce(isRight){return function(callbackfn,memo){assert.fn(callbackfn);var O=toObject(this),length=toLength(O.length),index=isRight?length-1:0,i=isRight?-1:1;if(arguments.length<2)for(;;){if(index in O){memo=O[index];index+=i;break}index+=i;assert(isRight?index>=0:length>index,"Reduce of empty array with no initial value")}for(;isRight?index>=0:length>index;index+=i)if(index in O){memo=callbackfn(memo,O[index],index,this)}return memo}}$def($def.P,"Array",{forEach:$.each=$.each||arrayMethod(0),map:arrayMethod(1),filter:arrayMethod(2),some:arrayMethod(3),every:arrayMethod(4),reduce:createArrayReduce(false),reduceRight:createArrayReduce(true),indexOf:indexOf=indexOf||require("./$.array-includes")(false),lastIndexOf:function(el,fromIndex){var O=toObject(this),length=toLength(O.length),index=length-1;if(arguments.length>1)index=Math.min(index,$.toInteger(fromIndex));if(index<0)index=toLength(length+index);for(;index>=0;index--)if(index in O)if(O[index]===el)return index;return-1}});$def($def.P,"String",{trim:require("./$.replacer")(/^\s*([\s\S]*\S)?\s*$/,"$1")});$def($def.S,"Date",{now:function(){return+new Date}});function lz(num){return num>9?num:"0"+num}$def($def.P,"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var d=this,y=d.getUTCFullYear(),m=d.getUTCMilliseconds(),s=y<0?"-":y>9999?"+":"";return s+("00000"+Math.abs(y)).slice(s?-6:-4)+"-"+lz(d.getUTCMonth()+1)+"-"+lz(d.getUTCDate())+"T"+lz(d.getUTCHours())+":"+lz(d.getUTCMinutes())+":"+lz(d.getUTCSeconds())+"."+(m>99?m:"0"+lz(m))+"Z"}});if(classof(function(){return arguments}())=="Object")cof.classof=function(it){var tag=classof(it);return tag=="Object"&&isFunction(it.callee)?"Arguments":tag}},{"./$":15,"./$.array-includes":2,"./$.array-methods":3,"./$.assert":4,"./$.cof":6,"./$.def":11,"./$.invoke":13,"./$.replacer":19,"./$.uid":24}],28:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{copyWithin:function(target,start){var O=Object($.assertDefined(this)),len=$.toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],fin=end===undefined?len:toIndex(end,len),count=Math.min(fin-from,len-to),inc=1;if(from0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O}});require("./$.unscope")("copyWithin")},{"./$":15,"./$.def":11,"./$.unscope":25}],29:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{fill:function(value){var O=Object($.assertDefined(this)),length=$.toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O}});require("./$.unscope")("fill")},{"./$":15,"./$.def":11,"./$.unscope":25}],30:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{findIndex:require("./$.array-methods")(6)});require("./$.unscope")("findIndex")},{"./$.array-methods":3,"./$.def":11,"./$.unscope":25}],31:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{find:require("./$.array-methods")(5)});require("./$.unscope")("find")},{"./$.array-methods":3,"./$.def":11,"./$.unscope":25}],32:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),$iter=require("./$.iter"),stepCall=$iter.stepCall;$def($def.S+$def.F*$iter.DANGER_CLOSING,"Array",{from:function(arrayLike){var O=Object($.assertDefined(arrayLike)),mapfn=arguments[1],mapping=mapfn!==undefined,f=mapping?ctx(mapfn,arguments[2],2):undefined,index=0,length,result,step,iterator;if($iter.is(O)){iterator=$iter.get(O);result=new(typeof this=="function"?this:Array);for(;!(step=iterator.next()).done;index++){result[index]=mapping?stepCall(iterator,f,[step.value,index],true):step.value}}else{result=new(typeof this=="function"?this:Array)(length=$.toLength(O.length));for(;length>index;index++){result[index]=mapping?f(O[index],index):O[index]}}result.length=index;return result}})},{"./$":15,"./$.ctx":10,"./$.def":11,"./$.iter":14}],33:[function(require,module,exports){var $=require("./$"),setUnscope=require("./$.unscope"),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step,Iterators=$iter.Iterators;$iter.std(Array,"Array",function(iterated,kind){$.set(this,ITER,{o:$.toObject(iterated),i:0,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,index=iter.i++;if(!O||index>=O.length){iter.o=undefined;return step(1)}if(kind=="key")return step(0,index);if(kind=="value")return step(0,O[index]);return step(0,[index,O[index]])},"value");Iterators.Arguments=Iterators.Array;setUnscope("keys");setUnscope("values");setUnscope("entries")},{"./$":15,"./$.iter":14,"./$.uid":24,"./$.unscope":25}],34:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Array",{of:function(){var index=0,length=arguments.length,result=new(typeof this=="function"?this:Array)(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}})},{"./$.def":11}],35:[function(require,module,exports){require("./$.species")(Array)},{"./$.species":21}],36:[function(require,module,exports){"use strict";var $=require("./$"),NAME="name",setDesc=$.setDesc,FunctionProto=Function.prototype;NAME in FunctionProto||$.FW&&$.DESC&&setDesc(FunctionProto,NAME,{configurable:true,get:function(){var match=String(this).match(/^\s*function ([^ (]*)/),name=match?match[1]:"";$.has(this,NAME)||setDesc(this,NAME,$.desc(5,name));return name},set:function(value){$.has(this,NAME)||setDesc(this,NAME,$.desc(0,value))}})},{"./$":15}],37:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Map",{get:function(key){var entry=strong.getEntry(this,key);return entry&&entry.v},set:function(key,value){return strong.def(this,key===0?0:key,value)}},strong,true)},{"./$.collection":9,"./$.collection-strong":7}],38:[function(require,module,exports){var Infinity=1/0,$def=require("./$.def"),E=Math.E,pow=Math.pow,abs=Math.abs,exp=Math.exp,log=Math.log,sqrt=Math.sqrt,ceil=Math.ceil,floor=Math.floor,sign=Math.sign||function(x){return(x=+x)==0||x!=x?x:x<0?-1:1};function asinh(x){return!isFinite(x=+x)||x==0?x:x<0?-asinh(-x):log(x+sqrt(x*x+1))}function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:exp(x)-1}$def($def.S,"Math",{acosh:function(x){return(x=+x)<1?NaN:isFinite(x)?log(x/E+sqrt(x+1)*sqrt(x-1)/E)+1:x},asinh:asinh,atanh:function(x){return(x=+x)==0?x:log((1+x)/(1-x))/2},cbrt:function(x){return sign(x=+x)*pow(abs(x),1/3)},clz32:function(x){return(x>>>=0)?32-x.toString(2).length:32},cosh:function(x){ -return(exp(x=+x)+exp(-x))/2},expm1:expm1,fround:function(x){return new Float32Array([x])[0]},hypot:function(value1,value2){var sum=0,len1=arguments.length,len2=len1,args=Array(len1),larg=-Infinity,arg;while(len1--){arg=args[len1]=+arguments[len1];if(arg==Infinity||arg==-Infinity)return Infinity;if(arg>larg)larg=arg}larg=arg||1;while(len2--)sum+=pow(args[len2]/larg,2);return larg*sqrt(sum)},imul:function(x,y){var UInt16=65535,xn=+x,yn=+y,xl=UInt16&xn,yl=UInt16&yn;return 0|xl*yl+((UInt16&xn>>>16)*yl+xl*(UInt16&yn>>>16)<<16>>>0)},log1p:function(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:log(1+x)},log10:function(x){return log(x)/Math.LN10},log2:function(x){return log(x)/Math.LN2},sign:sign,sinh:function(x){return abs(x=+x)<1?(expm1(x)-expm1(-x))/2:(exp(x-1)-exp(-x-1))*(E/2)},tanh:function(x){var a=expm1(x=+x),b=expm1(-x);return a==Infinity?1:b==Infinity?-1:(a-b)/(exp(x)+exp(-x))},trunc:function(it){return(it>0?floor:ceil)(it)}})},{"./$.def":11}],39:[function(require,module,exports){"use strict";var $=require("./$"),isObject=$.isObject,isFunction=$.isFunction,NUMBER="Number",Number=$.g[NUMBER],Base=Number,proto=Number.prototype;function toPrimitive(it){var fn,val;if(isFunction(fn=it.valueOf)&&!isObject(val=fn.call(it)))return val;if(isFunction(fn=it.toString)&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to number")}function toNumber(it){if(isObject(it))it=toPrimitive(it);if(typeof it=="string"&&it.length>2&&it.charCodeAt(0)==48){var binary=false;switch(it.charCodeAt(1)){case 66:case 98:binary=true;case 79:case 111:return parseInt(it.slice(2),binary?2:8)}}return+it}if($.FW&&!(Number("0o1")&&Number("0b1"))){Number=function Number(it){return this instanceof Number?new Base(toNumber(it)):toNumber(it)};$.each.call($.DESC?$.getNames(Base):("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,"+"EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,"+"MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger").split(","),function(key){if($.has(Base,key)&&!$.has(Number,key)){$.setDesc(Number,key,$.getDesc(Base,key))}});Number.prototype=proto;proto.constructor=Number;$.hide($.g,NUMBER,Number)}},{"./$":15}],40:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),abs=Math.abs,floor=Math.floor,MAX_SAFE_INTEGER=9007199254740991;function isInteger(it){return!$.isObject(it)&&isFinite(it)&&floor(it)===it}$def($def.S,"Number",{EPSILON:Math.pow(2,-52),isFinite:function(it){return typeof it=="number"&&isFinite(it)},isInteger:isInteger,isNaN:function(number){return number!=number},isSafeInteger:function(number){return isInteger(number)&&abs(number)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MIN_SAFE_INTEGER:-MAX_SAFE_INTEGER,parseFloat:parseFloat,parseInt:parseInt})},{"./$":15,"./$.def":11}],41:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{assign:require("./$.assign")})},{"./$.assign":5,"./$.def":11}],42:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{is:function(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}})},{"./$.def":11}],43:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{setPrototypeOf:require("./$.set-proto")})},{"./$.def":11,"./$.set-proto":20}],44:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),isObject=$.isObject,toObject=$.toObject;function wrapObjectMethod(METHOD,MODE){var fn=($.core.Object||{})[METHOD]||Object[METHOD],f=0,o={};o[METHOD]=MODE==1?function(it){return isObject(it)?fn(it):it}:MODE==2?function(it){return isObject(it)?fn(it):true}:MODE==3?function(it){return isObject(it)?fn(it):false}:MODE==4?function(it,key){return fn(toObject(it),key)}:MODE==5?function(it){return fn(Object($.assertDefined(it)))}:function(it){return fn(toObject(it))};try{fn("z")}catch(e){f=1}$def($def.S+$def.F*f,"Object",o)}wrapObjectMethod("freeze",1);wrapObjectMethod("seal",1);wrapObjectMethod("preventExtensions",1);wrapObjectMethod("isFrozen",2);wrapObjectMethod("isSealed",2);wrapObjectMethod("isExtensible",3);wrapObjectMethod("getOwnPropertyDescriptor",4);wrapObjectMethod("getPrototypeOf",5);wrapObjectMethod("keys");wrapObjectMethod("getOwnPropertyNames")},{"./$":15,"./$.def":11}],45:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),tmp={};tmp[require("./$.wks")("toStringTag")]="z";if($.FW&&cof(tmp)!="z")$.hide(Object.prototype,"toString",function(){return"[object "+cof.classof(this)+"]"})},{"./$":15,"./$.cof":6,"./$.wks":26}],46:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),$def=require("./$.def"),assert=require("./$.assert"),$iter=require("./$.iter"),SPECIES=require("./$.wks")("species"),RECORD=require("./$.uid").safe("record"),forOf=$iter.forOf,PROMISE="Promise",global=$.g,process=global.process,asap=process&&process.nextTick||require("./$.task").set,Promise=global[PROMISE],Base=Promise,isFunction=$.isFunction,isObject=$.isObject,assertFunction=assert.fn,assertObject=assert.obj,test;function getConstructor(C){var S=assertObject(C)[SPECIES];return S!=undefined?S:C}isFunction(Promise)&&isFunction(Promise.resolve)&&Promise.resolve(test=new Promise(function(){}))==test||function(){function isThenable(it){var then;if(isObject(it))then=it.then;return isFunction(then)?then:false}function handledRejectionOrHasOnRejected(promise){var record=promise[RECORD],chain=record.c,i=0,react;if(record.h)return true;while(chain.length>i){react=chain[i++];if(react.fail||handledRejectionOrHasOnRejected(react.P))return true}}function notify(record,isReject){var chain=record.c;if(isReject||chain.length)asap(function(){var promise=record.p,value=record.v,ok=record.s==1,i=0;if(isReject&&!handledRejectionOrHasOnRejected(promise)){setTimeout(function(){if(!handledRejectionOrHasOnRejected(promise)){if(cof(process)=="process"){process.emit("unhandledRejection",value,promise)}else if(global.console&&isFunction(console.error)){console.error("Unhandled promise rejection",value)}}},1e3)}else while(chain.length>i)!function(react){var cb=ok?react.ok:react.fail,ret,then;try{if(cb){if(!ok)record.h=true;ret=cb===true?value:cb(value);if(ret===react.P){react.rej(TypeError(PROMISE+"-chain cycle"))}else if(then=isThenable(ret)){then.call(ret,react.res,react.rej)}else react.res(ret)}else react.rej(value)}catch(err){react.rej(err)}}(chain[i++]);chain.length=0})}function reject(value){var record=this;if(record.d)return;record.d=true;record=record.r||record;record.v=value;record.s=2;notify(record,true)}function resolve(value){var record=this,then,wrapper;if(record.d)return;record.d=true;record=record.r||record;try{if(then=isThenable(value)){wrapper={r:record,d:false};then.call(value,ctx(resolve,wrapper,1),ctx(reject,wrapper,1))}else{record.v=value;record.s=1;notify(record)}}catch(err){reject.call(wrapper||{r:record,d:false},err)}}Promise=function(executor){assertFunction(executor);var record={p:assert.inst(this,Promise,PROMISE),c:[],s:0,d:false,v:undefined,h:false};$.hide(this,RECORD,record);try{executor(ctx(resolve,record,1),ctx(reject,record,1))}catch(err){reject.call(record,err)}};$.mix(Promise.prototype,{then:function(onFulfilled,onRejected){var S=assertObject(assertObject(this).constructor)[SPECIES];var react={ok:isFunction(onFulfilled)?onFulfilled:true,fail:isFunction(onRejected)?onRejected:false};var P=react.P=new(S!=undefined?S:Promise)(function(res,rej){react.res=assertFunction(res);react.rej=assertFunction(rej)});var record=this[RECORD];record.c.push(react);record.s&¬ify(record);return P},"catch":function(onRejected){return this.then(undefined,onRejected)}})}();$def($def.G+$def.W+$def.F*(Promise!=Base),{Promise:Promise});$def($def.S,PROMISE,{reject:function(r){return new(getConstructor(this))(function(res,rej){rej(r)})},resolve:function(x){return isObject(x)&&RECORD in x&&$.getProto(x)===this.prototype?x:new(getConstructor(this))(function(res){res(x)})}});$def($def.S+$def.F*($iter.fail(function(iter){Promise.all(iter)["catch"](function(){})})||$iter.DANGER_CLOSING),PROMISE,{all:function(iterable){var C=getConstructor(this),values=[];return new C(function(resolve,reject){forOf(iterable,false,values.push,values);var remaining=values.length,results=Array(remaining);if(remaining)$.each.call(values,function(promise,index){C.resolve(promise).then(function(value){results[index]=value;--remaining||resolve(results)},reject)});else resolve(results)})},race:function(iterable){var C=getConstructor(this);return new C(function(resolve,reject){forOf(iterable,false,function(promise){C.resolve(promise).then(resolve,reject)})})}});cof.set(Promise,PROMISE);require("./$.species")(Promise)},{"./$":15,"./$.assert":4,"./$.cof":6,"./$.ctx":10,"./$.def":11,"./$.iter":14,"./$.species":21,"./$.task":23,"./$.uid":24,"./$.wks":26}],47:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),setProto=require("./$.set-proto"),$iter=require("./$.iter"),ITER=require("./$.uid").safe("iter"),step=$iter.step,assert=require("./$.assert"),isObject=$.isObject,getDesc=$.getDesc,setDesc=$.setDesc,getProto=$.getProto,apply=Function.apply,assertObject=assert.obj,isExtensible=Object.isExtensible||$.it;function Enumerate(iterated){var keys=[],key;for(key in iterated)keys.push(key);$.set(this,ITER,{o:iterated,a:keys,i:0})}$iter.create(Enumerate,"Object",function(){var iter=this[ITER],keys=iter.a,key;do{if(iter.i>=keys.length)return step(1)}while(!((key=keys[iter.i++])in iter.o));return step(0,key)});function wrap(fn){return function(it){assertObject(it);try{fn.apply(undefined,arguments);return true}catch(e){return false}}}function reflectGet(target,propertyKey){var receiver=arguments.length<3?target:arguments[2],desc=getDesc(assertObject(target),propertyKey),proto;if(desc)return $.has(desc,"value")?desc.value:desc.get===undefined?undefined:desc.get.call(receiver);return isObject(proto=getProto(target))?reflectGet(proto,propertyKey,receiver):undefined}function reflectSet(target,propertyKey,V){var receiver=arguments.length<4?target:arguments[3],ownDesc=getDesc(assertObject(target),propertyKey),existingDescriptor,proto;if(!ownDesc){if(isObject(proto=getProto(target))){return reflectSet(proto,propertyKey,V,receiver)}ownDesc=$.desc(0)}if($.has(ownDesc,"value")){if(ownDesc.writable===false||!isObject(receiver))return false;existingDescriptor=getDesc(receiver,propertyKey)||$.desc(0);existingDescriptor.value=V;setDesc(receiver,propertyKey,existingDescriptor);return true}return ownDesc.set===undefined?false:(ownDesc.set.call(receiver,V),true)}var reflect={apply:require("./$.ctx")(Function.call,apply,3),construct:function(target,argumentsList){var proto=assert.fn(arguments.length<3?target:arguments[2]).prototype,instance=$.create(isObject(proto)?proto:Object.prototype),result=apply.call(target,instance,argumentsList);return isObject(result)?result:instance},defineProperty:wrap(setDesc),deleteProperty:function(target,propertyKey){var desc=getDesc(assertObject(target),propertyKey);return desc&&!desc.configurable?false:delete target[propertyKey]},enumerate:function(target){return new Enumerate(assertObject(target))},get:reflectGet,getOwnPropertyDescriptor:function(target,propertyKey){return getDesc(assertObject(target),propertyKey)},getPrototypeOf:function(target){return getProto(assertObject(target))},has:function(target,propertyKey){return propertyKey in target},isExtensible:function(target){return!!isExtensible(assertObject(target))},ownKeys:require("./$.own-keys"),preventExtensions:wrap(Object.preventExtensions||$.it),set:reflectSet};if(setProto)reflect.setPrototypeOf=function(target,proto){setProto(assertObject(target),proto);return true};$def($def.G,{Reflect:{}});$def($def.S,"Reflect",reflect)},{"./$":15,"./$.assert":4,"./$.ctx":10,"./$.def":11,"./$.iter":14,"./$.own-keys":17,"./$.set-proto":20,"./$.uid":24}],48:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),RegExp=$.g.RegExp,Base=RegExp,proto=RegExp.prototype;if($.FW&&$.DESC){if(!function(){try{return RegExp(/a/g,"i")=="/a/i"}catch(e){}}()){RegExp=function RegExp(pattern,flags){return new Base(cof(pattern)=="RegExp"&&flags!==undefined?pattern.source:pattern,flags)};$.each.call($.getNames(Base),function(key){key in RegExp||$.setDesc(RegExp,key,{configurable:true,get:function(){return Base[key]},set:function(it){Base[key]=it}})});proto.constructor=RegExp;RegExp.prototype=proto;$.hide($.g,"RegExp",RegExp)}if(/./g.flags!="g")$.setDesc(proto,"flags",{configurable:true,get:require("./$.replacer")(/^.*\/(\w*)$/,"$1")})}require("./$.species")(RegExp)},{"./$":15,"./$.cof":6,"./$.replacer":19,"./$.species":21}],49:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Set",{add:function(value){return strong.def(this,value=value===0?0:value,value)}},strong)},{"./$.collection":9,"./$.collection-strong":7}],50:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{codePointAt:require("./$.string-at")(false)})},{"./$.def":11,"./$.string-at":22}],51:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),toLength=$.toLength;$def($def.P,"String",{endsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),endPosition=arguments[1],len=toLength(that.length),end=endPosition===undefined?len:Math.min(toLength(endPosition),len);searchString+="";return that.slice(end-searchString.length,end)===searchString}})},{"./$":15,"./$.cof":6,"./$.def":11}],52:[function(require,module,exports){var $def=require("./$.def"),toIndex=require("./$").toIndex,fromCharCode=String.fromCharCode;$def($def.S,"String",{fromCodePoint:function(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")}})},{"./$":15,"./$.def":11}],53:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{includes:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();return!!~String($.assertDefined(this)).indexOf(searchString,arguments[1])}})},{"./$":15,"./$.cof":6,"./$.def":11}],54:[function(require,module,exports){var set=require("./$").set,at=require("./$.string-at")(true),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step;$iter.std(String,"String",function(iterated){set(this,ITER,{o:String(iterated),i:0})},function(){var iter=this[ITER],O=iter.o,index=iter.i,point;if(index>=O.length)return step(1);point=at.call(O,index);iter.i+=point.length;return step(0,point)})},{"./$":15,"./$.iter":14,"./$.string-at":22,"./$.uid":24}],55:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");$def($def.S,"String",{raw:function(callSite){var raw=$.toObject(callSite.raw),len=$.toLength(raw.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(raw[i++]));if(i0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}})},{"./$":15,"./$.def":11}],57:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{startsWith:function(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),index=$.toLength(Math.min(arguments[1],that.length));searchString+="";return that.slice(index,index+searchString.length)===searchString}})},{"./$":15,"./$.cof":6,"./$.def":11}],58:[function(require,module,exports){"use strict";var $=require("./$"),setTag=require("./$.cof").set,uid=require("./$.uid"),$def=require("./$.def"),keyOf=require("./$.keyof"),has=$.has,hide=$.hide,getNames=$.getNames,toObject=$.toObject,Symbol=$.g.Symbol,Base=Symbol,setter=false,TAG=uid.safe("tag"),SymbolRegistry={},AllSymbols={};function wrap(tag){var sym=AllSymbols[tag]=$.set($.create(Symbol.prototype),TAG,tag);$.DESC&&setter&&$.setDesc(Object.prototype,tag,{configurable:true,set:function(value){hide(this,tag,value)}});return sym}if(!$.isFunction(Symbol)){Symbol=function(description){if(this instanceof Symbol)throw TypeError("Symbol is not a constructor");return wrap(uid(description))};hide(Symbol.prototype,"toString",function(){return this[TAG]})}$def($def.G+$def.W,{Symbol:Symbol});var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=Symbol(key)},keyFor:function(key){return keyOf(SymbolRegistry,key)},pure:uid.safe,set:$.set,useSetter:function(){setter=true},useSimple:function(){setter=false}};$.each.call(("hasInstance,isConcatSpreadable,iterator,match,replace,search,"+"species,split,toPrimitive,toStringTag,unscopables").split(","),function(it){var sym=require("./$.wks")(it);symbolStatics[it]=Symbol===Base?sym:wrap(sym)});setter=true;$def($def.S,"Symbol",symbolStatics);$def($def.S+$def.F*(Symbol!=Base),"Object",{getOwnPropertyNames:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])||result.push(key);return result},getOwnPropertySymbols:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])&&result.push(AllSymbols[key]);return result}});setTag(Symbol,"Symbol");setTag(Math,"Math",true);setTag($.g.JSON,"JSON",true)},{"./$":15,"./$.cof":6,"./$.def":11,"./$.keyof":16,"./$.uid":24,"./$.wks":26}],59:[function(require,module,exports){"use strict";var $=require("./$"),weak=require("./$.collection-weak"),leakStore=weak.leakStore,ID=weak.ID,WEAK=weak.WEAK,has=$.has,isObject=$.isObject,isFrozen=Object.isFrozen||$.core.Object.isFrozen,tmp={};var WeakMap=require("./$.collection")("WeakMap",{get:function(key){if(isObject(key)){if(isFrozen(key))return leakStore(this).get(key);if(has(key,WEAK))return key[WEAK][this[ID]]}},set:function(key,value){return weak.def(this,key,value)}},weak,true,true);if($.FW&&(new WeakMap).set((Object.freeze||Object)(tmp),7).get(tmp)!=7){$.each.call(["delete","has","get","set"],function(key){var method=WeakMap.prototype[key];WeakMap.prototype[key]=function(a,b){if(isObject(a)&&isFrozen(a)){var result=leakStore(this)[key](a,b);return key=="set"?this:result}return method.call(this,a,b)}})}},{"./$":15,"./$.collection":9,"./$.collection-weak":8}],60:[function(require,module,exports){"use strict";var weak=require("./$.collection-weak");require("./$.collection")("WeakSet",{add:function(value){return weak.def(this,value,true)}},weak,false,true)},{"./$.collection":9,"./$.collection-weak":8}],61:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{includes:require("./$.array-includes")(true)});require("./$.unscope")("includes")},{"./$.array-includes":2,"./$.def":11,"./$.unscope":25}],62:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),ownKeys=require("./$.own-keys");$def($def.S,"Object",{getOwnPropertyDescriptors:function(object){var O=$.toObject(object),result={};$.each.call(ownKeys(O),function(key){$.setDesc(result,key,$.desc(0,$.getDesc(O,key)))});return result}})},{"./$":15,"./$.def":11,"./$.own-keys":17}],63:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");function createObjectToArray(isEntries){return function(object){var O=$.toObject(object),keys=$.getKeys(object),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}$def($def.S,"Object",{values:createObjectToArray(false),entries:createObjectToArray(true)})},{"./$":15,"./$.def":11}],64:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"RegExp",{escape:require("./$.replacer")(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",true)})},{"./$.def":11,"./$.replacer":19}],65:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{at:require("./$.string-at")(true)})},{"./$.def":11,"./$.string-at":22}],66:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),core=$.core,statics={};function setStatics(keys,length){$.each.call(keys.split(","),function(key){if(length==undefined&&key in core.Array)statics[key]=core.Array[key];else if(key in[])statics[key]=require("./$.ctx")(Function.call,[][key],length)})}setStatics("pop,reverse,shift,keys,values,entries",1);setStatics("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);setStatics("join,slice,concat,push,splice,unshift,sort,lastIndexOf,"+"reduce,reduceRight,copyWithin,fill,turn");$def($def.S,"Array",statics)},{"./$":15,"./$.ctx":10,"./$.def":11}],67:[function(require,module,exports){require("./es6.array.iterator");var $=require("./$"),Iterators=require("./$.iter").Iterators,ITERATOR=require("./$.wks")("iterator"),NodeList=$.g.NodeList;if($.FW&&NodeList&&!(ITERATOR in NodeList.prototype)){$.hide(NodeList.prototype,ITERATOR,Iterators.Array)}Iterators.NodeList=Iterators.Array},{"./$":15,"./$.iter":14,"./$.wks":26,"./es6.array.iterator":33}],68:[function(require,module,exports){var $def=require("./$.def"),$task=require("./$.task");$def($def.G+$def.B,{setImmediate:$task.set,clearImmediate:$task.clear})},{"./$.def":11,"./$.task":23}],69:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),invoke=require("./$.invoke"),partial=require("./$.partial"),MSIE=!!$.g.navigator&&/MSIE .\./.test(navigator.userAgent);function wrap(set){return MSIE?function(fn,time){return set(invoke(partial,[].slice.call(arguments,2),$.isFunction(fn)?fn:Function(fn)),time)}:set}$def($def.G+$def.B+$def.F*MSIE,{setTimeout:wrap($.g.setTimeout),setInterval:wrap($.g.setInterval)})},{"./$":15,"./$.def":11,"./$.invoke":13,"./$.partial":18}],70:[function(require,module,exports){require("./modules/es5");require("./modules/es6.symbol");require("./modules/es6.object.assign");require("./modules/es6.object.is");require("./modules/es6.object.set-prototype-of");require("./modules/es6.object.to-string");require("./modules/es6.object.statics-accept-primitives");require("./modules/es6.function.name");require("./modules/es6.number.constructor");require("./modules/es6.number.statics");require("./modules/es6.math");require("./modules/es6.string.from-code-point");require("./modules/es6.string.raw");require("./modules/es6.string.iterator");require("./modules/es6.string.code-point-at");require("./modules/es6.string.ends-with");require("./modules/es6.string.includes");require("./modules/es6.string.repeat");require("./modules/es6.string.starts-with");require("./modules/es6.array.from");require("./modules/es6.array.of");require("./modules/es6.array.iterator");require("./modules/es6.array.species");require("./modules/es6.array.copy-within");require("./modules/es6.array.fill");require("./modules/es6.array.find");require("./modules/es6.array.find-index");require("./modules/es6.regexp");require("./modules/es6.promise");require("./modules/es6.map");require("./modules/es6.set");require("./modules/es6.weak-map");require("./modules/es6.weak-set");require("./modules/es6.reflect");require("./modules/es7.array.includes");require("./modules/es7.string.at");require("./modules/es7.regexp.escape");require("./modules/es7.object.get-own-property-descriptors");require("./modules/es7.object.to-array");require("./modules/js.array.statics");require("./modules/web.timers");require("./modules/web.immediate");require("./modules/web.dom.iterable");module.exports=require("./modules/$").core},{"./modules/$":15,"./modules/es5":27,"./modules/es6.array.copy-within":28,"./modules/es6.array.fill":29,"./modules/es6.array.find":31,"./modules/es6.array.find-index":30,"./modules/es6.array.from":32,"./modules/es6.array.iterator":33,"./modules/es6.array.of":34,"./modules/es6.array.species":35,"./modules/es6.function.name":36,"./modules/es6.map":37,"./modules/es6.math":38,"./modules/es6.number.constructor":39,"./modules/es6.number.statics":40,"./modules/es6.object.assign":41,"./modules/es6.object.is":42,"./modules/es6.object.set-prototype-of":43,"./modules/es6.object.statics-accept-primitives":44,"./modules/es6.object.to-string":45,"./modules/es6.promise":46,"./modules/es6.reflect":47,"./modules/es6.regexp":48,"./modules/es6.set":49,"./modules/es6.string.code-point-at":50,"./modules/es6.string.ends-with":51,"./modules/es6.string.from-code-point":52,"./modules/es6.string.includes":53,"./modules/es6.string.iterator":54,"./modules/es6.string.raw":55,"./modules/es6.string.repeat":56,"./modules/es6.string.starts-with":57,"./modules/es6.symbol":58,"./modules/es6.weak-map":59,"./modules/es6.weak-set":60,"./modules/es7.array.includes":61,"./modules/es7.object.get-own-property-descriptors":62,"./modules/es7.object.to-array":63,"./modules/es7.regexp.escape":64,"./modules/es7.string.at":65,"./modules/js.array.statics":66,"./modules/web.dom.iterable":67,"./modules/web.immediate":68,"./modules/web.timers":69}],71:[function(require,module,exports){(function(global){!function(global){"use strict";var hasOwn=Object.prototype.hasOwnProperty;var undefined;var iteratorSymbol=typeof Symbol==="function"&&Symbol.iterator||"@@iterator";var inModule=typeof module==="object";var runtime=global.regeneratorRuntime;if(runtime){if(inModule){module.exports=runtime}return}runtime=global.regeneratorRuntime=inModule?module.exports:{};function wrap(innerFn,outerFn,self,tryLocsList){return new Generator(innerFn,outerFn,self||null,tryLocsList||[])}runtime.wrap=wrap;function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}var GenStateSuspendedStart="suspendedStart";var GenStateSuspendedYield="suspendedYield";var GenStateExecuting="executing";var GenStateCompleted="completed";var ContinueSentinel={};function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype;GeneratorFunction.prototype=Gp.constructor=GeneratorFunctionPrototype;GeneratorFunctionPrototype.constructor=GeneratorFunction;GeneratorFunction.displayName="GeneratorFunction";runtime.isGeneratorFunction=function(genFun){var ctor=typeof genFun==="function"&&genFun.constructor;return ctor?ctor===GeneratorFunction||(ctor.displayName||ctor.name)==="GeneratorFunction":false};runtime.mark=function(genFun){genFun.__proto__=GeneratorFunctionPrototype;genFun.prototype=Object.create(Gp);return genFun};runtime.async=function(innerFn,outerFn,self,tryLocsList){return new Promise(function(resolve,reject){var generator=wrap(innerFn,outerFn,self,tryLocsList);var callNext=step.bind(generator.next);var callThrow=step.bind(generator["throw"]);function step(arg){var record=tryCatch(this,null,arg);if(record.type==="throw"){reject(record.arg);return}var info=record.arg;if(info.done){resolve(info.value)}else{Promise.resolve(info.value).then(callNext,callThrow)}}callNext()})};function Generator(innerFn,outerFn,self,tryLocsList){var generator=outerFn?Object.create(outerFn.prototype):this;var context=new Context(tryLocsList);var state=GenStateSuspendedStart;function invoke(method,arg){if(state===GenStateExecuting){throw new Error("Generator is already running")}if(state===GenStateCompleted){return doneResult()}while(true){var delegate=context.delegate;if(delegate){var record=tryCatch(delegate.iterator[method],delegate.iterator,arg);if(record.type==="throw"){context.delegate=null;method="throw";arg=record.arg;continue}method="next";arg=undefined;var info=record.arg;if(info.done){context[delegate.resultName]=info.value;context.next=delegate.nextLoc}else{state=GenStateSuspendedYield;return info}context.delegate=null}if(method==="next"){if(state===GenStateSuspendedStart&&typeof arg!=="undefined"){throw new TypeError("attempt to send "+JSON.stringify(arg)+" to newborn generator")}if(state===GenStateSuspendedYield){context.sent=arg}else{delete context.sent}}else if(method==="throw"){if(state===GenStateSuspendedStart){state=GenStateCompleted;throw arg}if(context.dispatchException(arg)){method="next";arg=undefined}}else if(method==="return"){context.abrupt("return",arg)}state=GenStateExecuting;var record=tryCatch(innerFn,self,context);if(record.type==="normal"){state=context.done?GenStateCompleted:GenStateSuspendedYield;var info={value:record.arg,done:context.done};if(record.arg===ContinueSentinel){if(context.delegate&&method==="next"){arg=undefined}}else{return info}}else if(record.type==="throw"){state=GenStateCompleted;if(method==="next"){context.dispatchException(record.arg)}else{arg=record.arg}}}}generator.next=invoke.bind(generator,"next");generator["throw"]=invoke.bind(generator,"throw");generator["return"]=invoke.bind(generator,"return");return generator}Gp[iteratorSymbol]=function(){return this};Gp.toString=function(){return"[object Generator]"};function pushTryEntry(locs){var entry={tryLoc:locs[0]};if(1 in locs){entry.catchLoc=locs[1]}if(2 in locs){entry.finallyLoc=locs[2];entry.afterLoc=locs[3]}this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal";delete record.arg;entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}];tryLocsList.forEach(pushTryEntry,this);this.reset()}runtime.keys=function(object){var keys=[];for(var key in object){keys.push(key)}keys.reverse();return function next(){while(keys.length){var key=keys.pop();if(key in object){next.value=key;next.done=false;return next}}next.done=true;return next}};function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod){return iteratorMethod.call(iterable)}if(typeof iterable.next==="function"){return iterable}if(!isNaN(iterable.length)){var i=-1,next=function next(){while(++i=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc){return this.complete(entry.completion,entry.afterLoc)}}},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}(typeof global==="object"?global:typeof window==="object"?window:this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}]},{},[1]); \ No newline at end of file +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oindex){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$":24}],4:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function($this,callbackfn,that){var O=Object($.assertDefined($this)),self=$.ES5Object(O),f=ctx(callbackfn,that,3),length=$.toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$":24,"./$.ctx":12}],5:[function(require,module,exports){var $=require("./$");function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}assert.def=$.assertDefined;assert.fn=function(it){if(!$.isFunction(it))throw TypeError(it+" is not a function!");return it};assert.obj=function(it){if(!$.isObject(it))throw TypeError(it+" is not an object!");return it};assert.inst=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it};module.exports=assert},{"./$":24}],6:[function(require,module,exports){var $=require("./$"),enumKeys=require("./$.enum-keys");module.exports=Object.assign||function assign(target,source){var T=Object($.assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=$.ES5Object(arguments[i++]),keys=enumKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$":24,"./$.enum-keys":15}],7:[function(require,module,exports){var $=require("./$"),TAG=require("./$.wks")("toStringTag"),toString={}.toString;function cof(it){return toString.call(it).slice(8,-1)}cof.classof=function(it){var O,T;return it==undefined?it===undefined?"Undefined":"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:cof(O)};cof.set=function(it,tag,stat){if(it&&!$.has(it=stat?it:it.prototype,TAG))$.hide(it,TAG,tag)};module.exports=cof},{"./$":24,"./$.wks":42}],8:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),step=require("./$.iter").step,$has=$.has,set=$.set,isObject=$.isObject,hide=$.hide,isExtensible=Object.isExtensible||isObject,ID=safe("id"),O1=safe("O1"),LAST=safe("last"),FIRST=safe("first"),ITER=safe("iter"),SIZE=$.DESC?safe("size"):"size",id=0;function fastKey(it,create){if(!isObject(it))return typeof it=="symbol"?it:(typeof it=="string"?"S":"P")+it;if(!$has(it,ID)){if(!isExtensible(it))return"F";if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!=="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){assert.inst(that,C,NAME);set(that,O1,$.create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});require("./$.mix")(C.prototype,{clear:function clear(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function forEach(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function has(key){return!!getEntry(this,key)}});if($.DESC)$.setDesc(C.prototype,"size",{get:function(){return assert.def(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!=="F")that[O1][index]=entry}return that},getEntry:getEntry,setIter:function(C,NAME,IS_MAP){require("./$.iter-define")(C,NAME,function(iterated,kind){set(this,ITER,{o:iterated,k:kind})},function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){iter.o=undefined;return step(1)}if(kind=="keys")return step(0,entry.k);if(kind=="values")return step(0,entry.v);return step(0,[entry.k,entry.v])},IS_MAP?"entries":"values",!IS_MAP,true)}}},{"./$":24,"./$.assert":5,"./$.ctx":12,"./$.for-of":16,"./$.iter":23,"./$.iter-define":21,"./$.mix":26,"./$.uid":40}],9:[function(require,module,exports){var $def=require("./$.def"),forOf=require("./$.for-of");module.exports=function(NAME){$def($def.P,NAME,{toJSON:function toJSON(){var arr=[];forOf(this,false,arr.push,arr);return arr}})}},{"./$.def":13,"./$.for-of":16}],10:[function(require,module,exports){"use strict";var $=require("./$"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),$has=$.has,isObject=$.isObject,hide=$.hide,isExtensible=Object.isExtensible||isObject,id=0,ID=safe("id"),WEAK=safe("weak"),LEAK=safe("leak"),method=require("./$.array-methods"),find=method(5),findIndex=method(6);function findFrozen(store,key){return find(store.array,function(it){return it[0]===key})}function leakStore(that){return that[LEAK]||hide(that,LEAK,{array:[],get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.array.push([key,value])},"delete":function(key){var index=findIndex(this.array,function(it){return it[0]===key});if(~index)this.array.splice(index,1);return!!~index}})[LEAK]}module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){$.set(assert.inst(that,C,NAME),ID,id++);if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});require("./$.mix")(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(!isExtensible(key))return leakStore(this)["delete"](key);return $has(key,WEAK)&&$has(key[WEAK],this[ID])&&delete key[WEAK][this[ID]]},has:function has(key){if(!isObject(key))return false;if(!isExtensible(key))return leakStore(this).has(key);return $has(key,WEAK)&&$has(key[WEAK],this[ID])}});return C},def:function(that,key,value){if(!isExtensible(assert.obj(key))){leakStore(that).set(key,value)}else{$has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that[ID]]=value}return that},leakStore:leakStore,WEAK:WEAK,ID:ID}},{"./$":24,"./$.array-methods":4,"./$.assert":5,"./$.for-of":16,"./$.mix":26,"./$.uid":40}],11:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),BUGGY=require("./$.iter").BUGGY,forOf=require("./$.for-of"),species=require("./$.species"),assertInstance=require("./$.assert").inst;module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=$.g[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};function fixMethod(KEY){var fn=proto[KEY];require("./$.redef")(proto,KEY,KEY=="delete"?function(a){return fn.call(this,a===0?0:a)}:KEY=="has"?function has(a){return fn.call(this,a===0?0:a)}:KEY=="get"?function get(a){return fn.call(this,a===0?0:a)}:KEY=="add"?function add(a){fn.call(this,a===0?0:a);return this}:function set(a,b){fn.call(this,a===0?0:a,b);return this})}if(!$.isFunction(C)||!(IS_WEAK||!BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER);require("./$.mix")(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](IS_WEAK?{}:-0,1),buggyZero;if(!require("./$.iter-detect")(function(iter){new C(iter)})){C=wrapper(function(target,iterable){assertInstance(target,C,NAME);var that=new Base;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that);return that});C.prototype=proto;proto.constructor=C}IS_WEAK||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER)}require("./$.cof").set(C,NAME);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);species(C);species($.core[NAME]);if(!IS_WEAK)common.setIter(C,NAME,IS_MAP);return C}},{"./$":24,"./$.assert":5,"./$.cof":7,"./$.def":13,"./$.for-of":16,"./$.iter":23,"./$.iter-detect":22,"./$.mix":26,"./$.redef":29,"./$.species":34}],12:[function(require,module,exports){var assertFunction=require("./$.assert").fn;module.exports=function(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.assert":5}],13:[function(require,module,exports){var $=require("./$"),global=$.g,core=$.core,isFunction=$.isFunction,$redef=require("./$.redef");function ctx(fn,that){return function(){return fn.apply(that,arguments)}}global.core=core;$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;function $def(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,isProto=type&$def.P,target=isGlobal?global:type&$def.S?global[name]:(global[name]||{}).prototype,exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;out=(own?target:source)[key];if(type&$def.B&&own)exp=ctx(out,global);else exp=isProto&&isFunction(out)?ctx(Function.call,out):out;if(target&&!own)$redef(target,key,out);if(exports[key]!=out)$.hide(exports,key,exp);if(isProto)(exports.prototype||(exports.prototype={}))[key]=out}}module.exports=$def},{"./$":24,"./$.redef":29}],14:[function(require,module,exports){var $=require("./$"),document=$.g.document,isObject=$.isObject,is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{}}},{"./$":24}],15:[function(require,module,exports){var $=require("./$");module.exports=function(it){var keys=$.getKeys(it),getDesc=$.getDesc,getSymbols=$.getSymbols;if(getSymbols)$.each.call(getSymbols(it),function(key){if(getDesc(it,key).enumerable)keys.push(key)});return keys}},{"./$":24}],16:[function(require,module,exports){var ctx=require("./$.ctx"),get=require("./$.iter").get,call=require("./$.iter-call");module.exports=function(iterable,entries,fn,that){var iterator=get(iterable),f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done){if(call(iterator,f,step.value,entries)===false){return call.close(iterator)}}}},{"./$.ctx":12,"./$.iter":23,"./$.iter-call":20}],17:[function(require,module,exports){module.exports=function($){$.FW=true;$.path=$.g;return $}},{}],18:[function(require,module,exports){var $=require("./$"),toString={}.toString,getNames=$.getNames;var windowNames=typeof window=="object"&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];function getWindowNames(it){try{return getNames(it)}catch(e){return windowNames.slice()}}module.exports.get=function getOwnPropertyNames(it){if(windowNames&&toString.call(it)=="[object Window]")return getWindowNames(it);return getNames($.toObject(it))}},{"./$":24}],19:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}},{}],20:[function(require,module,exports){var assertObject=require("./$.assert").obj;function close(iterator){var ret=iterator["return"];if(ret!==undefined)assertObject(ret.call(iterator))}function call(iterator,fn,value,entries){try{return entries?fn(assertObject(value)[0],value[1]):fn(value)}catch(e){close(iterator);throw e}}call.close=close;module.exports=call},{"./$.assert":5}],21:[function(require,module,exports){var $def=require("./$.def"),$redef=require("./$.redef"),$=require("./$"),cof=require("./$.cof"),$iter=require("./$.iter"),SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values",Iterators=$iter.Iterators;module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){$iter.create(Constructor,NAME,next);function createMethod(kind){function $$(that){return new Constructor(that,kind)}switch(kind){case KEYS:return function keys(){return $$(this)};case VALUES:return function values(){return $$(this)}}return function entries(){return $$(this)}}var TAG=NAME+" Iterator",proto=Base.prototype,_native=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],_default=_native||createMethod(DEFAULT),methods,key;if(_native){var IteratorPrototype=$.getProto(_default.call(new Base));cof.set(IteratorPrototype,TAG,true);if($.FW&&$.has(proto,FF_ITERATOR))$iter.set(IteratorPrototype,$.that)}if($.FW||FORCE)$iter.set(proto,_default);Iterators[NAME]=_default;Iterators[TAG]=$.that;if(DEFAULT){methods={keys:IS_SET?_default:createMethod(KEYS),values:DEFAULT==VALUES?_default:createMethod(VALUES),entries:DEFAULT!=VALUES?_default:createMethod("entries")};if(FORCE)for(key in methods){if(!(key in proto))$redef(proto,key,methods[key])}else $def($def.P+$def.F*$iter.BUGGY,NAME,methods)}}},{"./$":24,"./$.cof":7,"./$.def":13,"./$.iter":23,"./$.redef":29,"./$.wks":42}],22:[function(require,module,exports){var SYMBOL_ITERATOR=require("./$.wks")("iterator"),SAFE_CLOSING=false;try{var riter=[7][SYMBOL_ITERATOR]();riter["return"]=function(){SAFE_CLOSING=true};Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec){if(!SAFE_CLOSING)return false;var safe=false;try{var arr=[7],iter=arr[SYMBOL_ITERATOR]();iter.next=function(){safe=true};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return safe}},{"./$.wks":42}],23:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),classof=cof.classof,assert=require("./$.assert"),assertObject=assert.obj,SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",Iterators=require("./$.shared")("iterators"),IteratorPrototype={};setIterator(IteratorPrototype,$.that);function setIterator(O,value){$.hide(O,SYMBOL_ITERATOR,value);if(FF_ITERATOR in[])$.hide(O,FF_ITERATOR,value)}module.exports={BUGGY:"keys"in[]&&!("next"in[].keys()),Iterators:Iterators,step:function(done,value){return{value:value,done:!!done}},is:function(it){var O=Object(it),Symbol=$.g.Symbol;return(Symbol&&Symbol.iterator||FF_ITERATOR)in O||SYMBOL_ITERATOR in O||$.has(Iterators,classof(O))},get:function(it){var Symbol=$.g.Symbol,getIter;if(it!=undefined){getIter=it[Symbol&&Symbol.iterator||FF_ITERATOR]||it[SYMBOL_ITERATOR]||Iterators[classof(it)]}assert($.isFunction(getIter),it," is not iterable!");return assertObject(getIter.call(it))},set:setIterator,create:function(Constructor,NAME,next,proto){Constructor.prototype=$.create(proto||IteratorPrototype,{next:$.desc(1,next)});cof.set(Constructor,NAME+" Iterator")}}},{"./$":24,"./$.assert":5,"./$.cof":7,"./$.shared":33,"./$.wks":42}],24:[function(require,module,exports){"use strict";var global=typeof self!="undefined"?self:Function("return this")(),core={},defineProperty=Object.defineProperty,hasOwnProperty={}.hasOwnProperty,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min;var DESC=!!function(){try{return defineProperty({},"a",{get:function(){return 2}}).a==2}catch(e){}}();var hide=createDefiner(1);function toInteger(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}function desc(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return $.setDesc(object,key,desc(bitmap,value))}:simpleSet}function isObject(it){return it!==null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}function assertDefined(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}var $=module.exports=require("./$.fw")({g:global,core:core,html:global.document&&document.documentElement,isObject:isObject,isFunction:isFunction,that:function(){return this},toInteger:toInteger,toLength:function(it){return it>0?min(toInteger(it),9007199254740991):0},toIndex:function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)},has:function(it,key){return hasOwnProperty.call(it,key)},create:Object.create,getProto:Object.getPrototypeOf,DESC:DESC,desc:desc,getDesc:Object.getOwnPropertyDescriptor,setDesc:defineProperty,setDescs:Object.defineProperties,getKeys:Object.keys,getNames:Object.getOwnPropertyNames,getSymbols:Object.getOwnPropertySymbols,assertDefined:assertDefined,ES5Object:Object,toObject:function(it){return $.ES5Object(assertDefined(it))},hide:hide,def:createDefiner(0),set:global.Symbol?simpleSet:hide,each:[].forEach});if(typeof __e!="undefined")__e=core;if(typeof __g!="undefined")__g=global},{"./$.fw":17}],25:[function(require,module,exports){var $=require("./$");module.exports=function(object,el){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":24}],26:[function(require,module,exports){var $redef=require("./$.redef");module.exports=function(target,src){for(var key in src)$redef(target,key,src[key]);return target}},{"./$.redef":29}],27:[function(require,module,exports){var $=require("./$"),assertObject=require("./$.assert").obj;module.exports=function ownKeys(it){assertObject(it);var keys=$.getNames(it),getSymbols=$.getSymbols;return getSymbols?keys.concat(getSymbols(it)):keys}},{"./$":24,"./$.assert":5}],28:[function(require,module,exports){"use strict";var $=require("./$"),invoke=require("./$.invoke"),assertFunction=require("./$.assert").fn;module.exports=function(){var fn=assertFunction(this),length=arguments.length,pargs=Array(length),i=0,_=$.path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$":24,"./$.assert":5,"./$.invoke":19}],29:[function(require,module,exports){var $=require("./$"),tpl=String({}.hasOwnProperty),SRC=require("./$.uid").safe("src"),_toString=Function.toString;function $redef(O,key,val,safe){if($.isFunction(val)){var base=O[key];$.hide(val,SRC,base?String(base):tpl.replace(/hasOwnProperty/,String(key)));if(!("name"in val))val.name=key}if(O===$.g){O[key]=val}else{if(!safe)delete O[key];$.hide(O,key,val)}}$redef(Function.prototype,"toString",function toString(){return $.has(this,SRC)?this[SRC]:_toString.call(this)});$.core.inspectSource=function(it){return _toString.call(it)};module.exports=$redef},{"./$":24,"./$.uid":40}],30:[function(require,module,exports){"use strict";module.exports=function(regExp,replace,isStatic){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}},{}],31:[function(require,module,exports){module.exports=Object.is||function is(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}},{}],32:[function(require,module,exports){var $=require("./$"),assert=require("./$.assert");function check(O,proto){assert.obj(O);assert(proto===null||$.isObject(proto),proto,": can't set as prototype!")}module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,$.getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined),check:check}},{"./$":24,"./$.assert":5,"./$.ctx":12}],33:[function(require,module,exports){var $=require("./$"),SHARED="__core-js_shared__",store=$.g[SHARED]||($.g[SHARED]={});module.exports=function(key){return store[key]||(store[key]={})}},{"./$":24}],34:[function(require,module,exports){var $=require("./$"),SPECIES=require("./$.wks")("species");module.exports=function(C){if($.DESC&&!(SPECIES in C))$.setDesc(C,SPECIES,{configurable:true,get:$.that})}},{"./$":24,"./$.wks":42}],35:[function(require,module,exports){var $=require("./$");module.exports=function(TO_STRING){return function(that,pos){var s=String($.assertDefined(that)),i=$.toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$":24}],36:[function(require,module,exports){var $=require("./$"),repeat=require("./$.string-repeat");module.exports=function(that,minLength,fillChar,left){var S=String($.assertDefined(that));if(minLength===undefined)return S;var intMinLength=$.toInteger(minLength);var fillLen=intMinLength-S.length;if(fillLen<0||fillLen===Infinity){throw new RangeError("Cannot satisfy string length "+minLength+" for string: "+S)}var sFillStr=fillChar===undefined?" ":String(fillChar);var sFillVal=repeat.call(sFillStr,Math.ceil(fillLen/sFillStr.length));if(sFillVal.length>fillLen)sFillVal=left?sFillVal.slice(sFillVal.length-fillLen):sFillVal.slice(0,fillLen);return left?sFillVal.concat(S):S.concat(sFillVal)}},{"./$":24,"./$.string-repeat":37}],37:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function repeat(count){var str=String($.assertDefined(this)),res="",n=$.toInteger(count);if(n<0||n==Infinity)throw RangeError("Count can't be negative");for(;n>0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}},{"./$":24}],38:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),invoke=require("./$.invoke"),cel=require("./$.dom-create"),global=$.g,isFunction=$.isFunction,html=$.html,process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;function run(){var id=+this;if($.has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run.call(event.data)}if(!isFunction(setTask)||!isFunction(clearTask)){setTask=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearTask=function(id){delete queue[id]};if(cof(process)=="process"){defer=function(id){process.nextTick(ctx(run,id,1))}}else if(global.addEventListener&&isFunction(global.postMessage)&&!global.importScripts){defer=function(id){global.postMessage(id,"*")};global.addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if(ONREADYSTATECHANGE in cel("script")){defer=function(id){html.appendChild(cel("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$":24,"./$.cof":7,"./$.ctx":12,"./$.dom-create":14,"./$.invoke":19}],39:[function(require,module,exports){module.exports=function(exec){try{exec();return false}catch(e){return true}}},{}],40:[function(require,module,exports){var sid=0;function uid(key){return"Symbol(".concat(key===undefined?"":key,")_",(++sid+Math.random()).toString(36))}uid.safe=require("./$").g.Symbol||uid;module.exports=uid},{"./$":24}],41:[function(require,module,exports){var UNSCOPABLES=require("./$.wks")("unscopables");if(!(UNSCOPABLES in[]))require("./$").hide(Array.prototype,UNSCOPABLES,{});module.exports=function(key){[][UNSCOPABLES][key]=true}},{"./$":24,"./$.wks":42}],42:[function(require,module,exports){var global=require("./$").g,store=require("./$.shared")("wks");module.exports=function(name){return store[name]||(store[name]=global.Symbol&&global.Symbol[name]||require("./$.uid").safe("Symbol."+name))}},{"./$":24,"./$.shared":33,"./$.uid":40}],43:[function(require,module,exports){var $=require("./$"),cel=require("./$.dom-create"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid").safe("__proto__"),assert=require("./$.assert"),assertObject=assert.obj,ObjectProto=Object.prototype,html=$.html,A=[],_slice=A.slice,_join=A.join,classof=cof.classof,has=$.has,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,defineProperties=$.setDescs,isFunction=$.isFunction,isObject=$.isObject,toObject=$.toObject,toLength=$.toLength,toIndex=$.toIndex,IE8_DOM_DEFINE=false,$indexOf=require("./$.array-includes")(false),$forEach=arrayMethod(0),$map=arrayMethod(1),$filter=arrayMethod(2),$some=arrayMethod(3),$every=arrayMethod(4);if(!$.DESC){try{IE8_DOM_DEFINE=defineProperty(cel("div"),"x",{get:function(){return 8}}).x==8}catch(e){}$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)assertObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};$.setDescs=defineProperties=function(O,Properties){assertObject(O);var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!$.DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=cel("iframe"),i=keysLen1,gt=">",iframeDocument;iframe.style.display="none";html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write(" + +``` From 508a3658660d4c7af2e690e26f4a9d5fb871c12a Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Mon, 29 Jun 2015 00:33:33 +0100 Subject: [PATCH 12/19] updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f3726a..7cbb996 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Add the paths and shim to configuration: ```javascript paths: { - babel: 'vendor/requirejs-babel/babel', + babel: 'vendor/requirejs-babel/browser', babel_polyfill: 'vendor/requirejs-babel/polyfill.min', es6: 'vendor/requirejs-babel/es6' }, From 7d41c020fd254749c1f3587f2735b87006ee5336 Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Sat, 11 Jul 2015 03:48:08 +0100 Subject: [PATCH 13/19] Update README.md --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7cbb996..69b1235 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -Babel Plugin -=== +# Babel Plugin for RequireJS + A [Babel](https://babeljs.io/) loader plugin for [RequireJS](http://requirejs.org). @@ -10,8 +10,8 @@ Installation npm install hipertracker/requirejs-babel ``` -Usage ---- +## Usage + Add the paths and shim to configuration: @@ -46,3 +46,7 @@ or plain old AMD syntax: ``` + +## Example of React & RequireJS & Babel with ES6+ + +* [https://github.com/hipertracker/react-requirejs-boilerplate](https://github.com/hipertracker/react-requirejs-boilerplate) From 8e65ea94a93ab592194ed7df08f9f72968fc4334 Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Sat, 11 Jul 2015 12:07:22 +0100 Subject: [PATCH 14/19] Update es6.js --- es6.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es6.js b/es6.js index 6407fda..30c4588 100644 --- a/es6.js +++ b/es6.js @@ -44,7 +44,7 @@ define([ modules: 'amd', sourceMap: config.isBuild ? false :'inline', sourceFileName: name, - stage: 1 + stage: 0 }; for(var key in options) { if(options.hasOwnProperty(key)) { From 6e8dc59a73a96d83ab71521696fc8c6a28b22d9a Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Sat, 11 Jul 2015 12:07:54 +0100 Subject: [PATCH 15/19] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 432ce92..80b18ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "requirejs-babel", - "version": "0.2.1", + "version": "0.2.2", "description": "An AMD loader plugin for Babel", "repository": { "type": "git", From 73ec734025c255ce056fc41f2f93635eb9565b5b Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Thu, 23 Jul 2015 16:02:11 +0100 Subject: [PATCH 16/19] added license --- LICENSE | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d9e09be --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2011-2015 James Hollingworth + +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. From 92eeac2344a2cb7f1578d3c05237c488b0531675 Mon Sep 17 00:00:00 2001 From: Jaroslaw Zabiello Date: Wed, 29 Jul 2015 01:00:58 +0100 Subject: [PATCH 17/19] Updated to Babel 5.6.10, RequireJS 2.1.20, added credits --- README.md | 3 + browser.js | 95357 +++++++++++++++++++------------------ browser.min.js | 83 +- external-helpers.js | 4 +- external-helpers.min.js | 2 +- node.js | 95934 ++++++++++++++++++++------------------ package.json | 4 +- polyfill.js | 513 +- polyfill.min.js | 6 +- 9 files changed, 100299 insertions(+), 91607 deletions(-) diff --git a/README.md b/README.md index 69b1235..18d4677 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,9 @@ or plain old AMD syntax: ``` +## Credits + +* [https://github.com/mikach/requirejs-babel](https://github.com/mikach/requirejs-babel) ## Example of React & RequireJS & Babel with ES6+ diff --git a/browser.js b/browser.js index 2ea1a2b..34c4cc1 100644 --- a/browser.js +++ b/browser.js @@ -1,18781 +1,18877 @@ (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.babel = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o +// +// 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 _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); +var pSlice = Array.prototype.slice; +var hasOwn = Object.prototype.hasOwnProperty; -exports.__esModule = true; +// 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. -function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } +var assert = module.exports = ok; -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } } +// 2. The AssertionError is defined in assert. +// new assert.AssertionError({ message: message, +// actual: actual, +// expected: expected }) -require("./plugins/flow"); +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; -var _acornJsxInject = require("acorn-jsx/inject"); + 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; -var _acornJsxInject2 = _interopRequireDefault(_acornJsxInject); + // 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); + } -var _srcIndex = require("./src/index"); + this.stack = out; + } + } +}; -var acorn = _interopRequireWildcard(_srcIndex); +// assert.AssertionError instanceof Error +util.inherits(assert.AssertionError, Error); -_babelToolsProtectJs3["default"](module); +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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +function truncate(s, n) { + if (util.isString(s)) { + return s.length < n ? s : s.slice(0, n); + } else { + return s; + } +} -_defaults(exports, _interopRequireWildcard(_srcIndex)); +function getMessage(self) { + return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + + self.operator + ' ' + + truncate(JSON.stringify(self.expected, replacer), 128); +} -_acornJsxInject2["default"](acorn); -},{"./../babel/tools/protect.js":52,"./plugins/flow":2,"./src/index":5,"acorn-jsx/inject":179}],2:[function(require,module,exports){ -"use strict"; +// 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. -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); +// 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. -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); +function fail(actual, expected, message, operator, stackStartFunction) { + throw new assert.AssertionError({ + message: message, + actual: actual, + expected: expected, + operator: operator, + stackStartFunction: stackStartFunction + }); +} -_babelToolsProtectJs3["default"](module); +// EXTENSION! allows for well behaved errors defined elsewhere. +assert.fail = fail; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +// 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);. -Error.stackTraceLimit = Infinity; -var acorn = require("../src/index"); +function ok(value, message) { + if (!value) fail(value, true, message, '==', assert.ok); +} +assert.ok = ok; -var pp = acorn.Parser.prototype; -var tt = acorn.tokTypes; +// 5. The equality assertion tests shallow, coercive equality with +// ==. +// assert.equal(actual, expected, message_opt); -pp.isRelational = function (op) { - return this.type === tt.relational && this.value === op; +assert.equal = function equal(actual, expected, message) { + if (actual != expected) fail(actual, expected, message, '==', assert.equal); }; -pp.expectRelational = function (op) { - if (this.isRelational(op)) { - this.next(); - } else { - this.unexpected(); +// 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); } }; -pp.flow_parseTypeInitialiser = function (tok) { - var oldInType = this.inType; - this.inType = true; - this.expect(tok || tt.colon); - var type = this.flow_parseType(); - this.inType = oldInType; - return type; -}; +// 7. The equivalence assertion tests a deep equality relation. +// assert.deepEqual(actual, expected, message_opt); -pp.flow_parseDeclareClass = function (node) { - this.next(); - this.flow_parseInterfaceish(node, true); - return this.finishNode(node, "DeclareClass"); +assert.deepEqual = function deepEqual(actual, expected, message) { + if (!_deepEqual(actual, expected)) { + fail(actual, expected, message, 'deepEqual', assert.deepEqual); + } }; -pp.flow_parseDeclareFunction = function (node) { - this.next(); +function _deepEqual(actual, expected) { + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; - var id = node.id = this.parseIdent(); + } else if (util.isBuffer(actual) && util.isBuffer(expected)) { + if (actual.length != expected.length) return false; - var typeNode = this.startNode(); - var typeContainer = this.startNode(); + for (var i = 0; i < actual.length; i++) { + if (actual[i] !== expected[i]) return false; + } - if (this.isRelational("<")) { - typeNode.typeParameters = this.flow_parseTypeParameterDeclaration(); - } else { - typeNode.typeParameters = null; - } + return true; - this.expect(tt.parenL); - var tmp = this.flow_parseFunctionTypeParams(); - typeNode.params = tmp.params; - typeNode.rest = tmp.rest; - this.expect(tt.parenR); - typeNode.returnType = this.flow_parseTypeInitialiser(); + // 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(); - typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); - id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); + // 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; - this.finishNode(id, id.type); + // 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; - this.semicolon(); + // 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); + } +} - return this.finishNode(node, "DeclareFunction"); -}; +function isArguments(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +} -pp.flow_parseDeclare = function (node) { - if (this.type === tt._class) { - return this.flow_parseDeclareClass(node); - } else if (this.type === tt._function) { - return this.flow_parseDeclareFunction(node); - } else if (this.type === tt._var) { - return this.flow_parseDeclareVariable(node); - } else if (this.isContextual("module")) { - return this.flow_parseDeclareModule(node); - } else { - this.unexpected(); +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; +} -pp.flow_parseDeclareVariable = function (node) { - this.next(); - node.id = this.flow_parseTypeAnnotatableIdentifier(); - this.semicolon(); - return this.finishNode(node, "DeclareVariable"); +// 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); + } }; -pp.flow_parseDeclareModule = function (node) { - this.next(); +// 9. The strict equality assertion tests strict equality, as determined by ===. +// assert.strictEqual(actual, expected, message_opt); - if (this.type === tt.string) { - node.id = this.parseExprAtom(); - } else { - node.id = this.parseIdent(); +assert.strictEqual = function strictEqual(actual, expected, message) { + if (actual !== expected) { + fail(actual, expected, message, '===', assert.strictEqual); } +}; - var bodyNode = node.body = this.startNode(); - var body = bodyNode.body = []; - this.expect(tt.braceL); - while (this.type !== tt.braceR) { - var node2 = this.startNode(); +// 10. The strict non-equality assertion tests for strict inequality, as +// determined by !==. assert.notStrictEqual(actual, expected, message_opt); - // todo: declare check - this.next(); +assert.notStrictEqual = function notStrictEqual(actual, expected, message) { + if (actual === expected) { + fail(actual, expected, message, '!==', assert.notStrictEqual); + } +}; - body.push(this.flow_parseDeclare(node2)); +function expectedException(actual, expected) { + if (!actual || !expected) { + return false; } - this.expect(tt.braceR); - this.finishNode(bodyNode, "BlockStatement"); - return this.finishNode(node, "DeclareModule"); -}; + 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; + } -// Interfaces + return false; +} -pp.flow_parseInterfaceish = function (node, allowStatic) { - node.id = this.parseIdent(); +function _throws(shouldThrow, block, expected, message) { + var actual; - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - } else { - node.typeParameters = null; + if (util.isString(expected)) { + message = expected; + expected = null; } - node["extends"] = []; - - if (this.eat(tt._extends)) { - do { - node["extends"].push(this.flow_parseInterfaceExtends()); - } while (this.eat(tt.comma)); + try { + block(); + } catch (e) { + actual = e; } - node.body = this.flow_parseObjectType(allowStatic); -}; + message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + + (message ? ' ' + message : '.'); -pp.flow_parseInterfaceExtends = function () { - var node = this.startNode(); + if (shouldThrow && !actual) { + fail(actual, expected, 'Missing expected exception' + message); + } - node.id = this.parseIdent(); - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterInstantiation(); - } else { - node.typeParameters = null; + if (!shouldThrow && expectedException(actual, expected)) { + fail(actual, expected, 'Got unwanted exception' + message); } - return this.finishNode(node, "InterfaceExtends"); -}; + if ((shouldThrow && actual && expected && + !expectedException(actual, expected)) || (!shouldThrow && actual)) { + throw actual; + } +} -pp.flow_parseInterface = function (node) { - this.flow_parseInterfaceish(node, false); - return this.finishNode(node, "InterfaceDeclaration"); +// 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))); }; -// Type aliases +// EXTENSION! This is annoying to write outside this module. +assert.doesNotThrow = function(block, /*optional*/message) { + _throws.apply(this, [false].concat(pSlice.call(arguments))); +}; -pp.flow_parseTypeAlias = function (node) { - node.id = this.parseIdent(); +assert.ifError = function(err) { if (err) {throw err;}}; - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - } else { - node.typeParameters = null; +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + if (hasOwn.call(obj, key)) keys.push(key); } + return keys; +}; - node.right = this.flow_parseTypeInitialiser(tt.eq); - this.semicolon(); +},{"util/":28}],3:[function(require,module,exports){ +arguments[4][1][0].apply(exports,arguments) +},{"dup":1}],4:[function(require,module,exports){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ - return this.finishNode(node, "TypeAlias"); -}; +var base64 = require('base64-js') +var ieee754 = require('ieee754') +var isArray = require('is-array') -// Type annotations +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 // not used by this implementation -pp.flow_parseTypeParameterDeclaration = function () { - var node = this.startNode(); - node.params = []; +var rootParent = {} - this.expectRelational("<"); - while (!this.isRelational(">")) { - node.params.push(this.flow_parseTypeAnnotatableIdentifier()); - if (!this.isRelational(">")) { - this.expect(tt.comma); - } +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Note: + * + * - Implementation must support adding new properties to `Uint8Array` instances. + * Firefox 4-29 lacked support, fixed in Firefox 30+. + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + * + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will + * get the Object implementation, which is slower but will work correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = (function () { + function Foo () {} + try { + var buf = new ArrayBuffer(0) + var arr = new Uint8Array(buf) + arr.foo = function () { return 42 } + arr.constructor = Foo + return arr.foo() === 42 && // typed array instances can be augmented + arr.constructor === Foo && // constructor can be set + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false } - this.expectRelational(">"); +})() - return this.finishNode(node, "TypeParameterDeclaration"); -}; +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} -pp.flow_parseTypeParameterInstantiation = function () { - var node = this.startNode(), - oldInType = this.inType; - node.params = []; +/** + * Class: Buffer + * ============= + * + * The Buffer constructor returns instances of `Uint8Array` that are augmented + * with function properties for all the node `Buffer` API functions. We use + * `Uint8Array` so that square bracket notation works as expected -- it returns + * a single octet. + * + * By augmenting the instances, we can avoid modifying the `Uint8Array` + * prototype. + */ +function Buffer (arg) { + if (!(this instanceof Buffer)) { + // Avoid going through an ArgumentsAdaptorTrampoline in the common case. + if (arguments.length > 1) return new Buffer(arg, arguments[1]) + return new Buffer(arg) + } - this.inType = true; + this.length = 0 + this.parent = undefined - this.expectRelational("<"); - while (!this.isRelational(">")) { - node.params.push(this.flow_parseType()); - if (!this.isRelational(">")) { - this.expect(tt.comma); - } + // Common case. + if (typeof arg === 'number') { + return fromNumber(this, arg) } - this.expectRelational(">"); - this.inType = oldInType; + // Slightly less common case. + if (typeof arg === 'string') { + return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') + } - return this.finishNode(node, "TypeParameterInstantiation"); -}; + // Unusual. + return fromObject(this, arg) +} -pp.flow_parseObjectPropertyKey = function () { - return this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); -}; +function fromNumber (that, length) { + that = allocate(that, length < 0 ? 0 : checked(length) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < length; i++) { + that[i] = 0 + } + } + return that +} -pp.flow_parseObjectTypeIndexer = function (node, isStatic) { - node["static"] = isStatic; +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' - this.expect(tt.bracketL); - node.id = this.flow_parseObjectPropertyKey(); - node.key = this.flow_parseTypeInitialiser(); - this.expect(tt.bracketR); - node.value = this.flow_parseTypeInitialiser(); + // Assumption: byteLength() return value is always < kMaxLength. + var length = byteLength(string, encoding) | 0 + that = allocate(that, length) - this.flow_objectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeIndexer"); -}; + that.write(string, encoding) + return that +} -pp.flow_parseObjectTypeMethodish = function (node) { - node.params = []; - node.rest = null; - node.typeParameters = null; +function fromObject (that, object) { + if (Buffer.isBuffer(object)) return fromBuffer(that, object) - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - } + if (isArray(object)) return fromArray(that, object) - this.expect(tt.parenL); - while (this.type === tt.name) { - node.params.push(this.flow_parseFunctionTypeParam()); - if (this.type !== tt.parenR) { - this.expect(tt.comma); - } + if (object == null) { + throw new TypeError('must start with number, buffer, array or string') } - if (this.eat(tt.ellipsis)) { - node.rest = this.flow_parseFunctionTypeParam(); + if (typeof ArrayBuffer !== 'undefined' && object.buffer instanceof ArrayBuffer) { + return fromTypedArray(that, object) } - this.expect(tt.parenR); - node.returnType = this.flow_parseTypeInitialiser(); - return this.finishNode(node, "FunctionTypeAnnotation"); -}; + if (object.length) return fromArrayLike(that, object) -pp.flow_parseObjectTypeMethod = function (start, isStatic, key) { - var node = this.startNodeAt(start); - node.value = this.flow_parseObjectTypeMethodish(this.startNodeAt(start)); - node["static"] = isStatic; - node.key = key; - node.optional = false; - this.flow_objectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeProperty"); -}; + return fromJsonObject(that, object) +} -pp.flow_parseObjectTypeCallProperty = function (node, isStatic) { - var valueNode = this.startNode(); - node["static"] = isStatic; - node.value = this.flow_parseObjectTypeMethodish(valueNode); - this.flow_objectTypeSemicolon(); - return this.finishNode(node, "ObjectTypeCallProperty"); -}; +function fromBuffer (that, buffer) { + var length = checked(buffer.length) | 0 + that = allocate(that, length) + buffer.copy(that, 0, 0, length) + return that +} -pp.flow_parseObjectType = function (allowStatic) { - var nodeStart = this.startNode(); - var node; - var optional = false; - var property; - var propertyKey; - var propertyTypeAnnotation; - var token; - var isStatic; +function fromArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} - nodeStart.callProperties = []; - nodeStart.properties = []; - nodeStart.indexers = []; +// Duplicate of fromArray() to keep fromArray() monomorphic. +function fromTypedArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + // Truncating the elements is probably not what people expect from typed + // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior + // of the old Buffer constructor. + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} - this.expect(tt.braceL); +function fromArrayLike (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} - while (this.type !== tt.braceR) { - var start = this.markPosition(); - node = this.startNode(); - if (allowStatic && this.isContextual("static")) { - this.next(); - isStatic = true; - } +// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. +// Returns a zero-length buffer for inputs that don't conform to the spec. +function fromJsonObject (that, object) { + var array + var length = 0 - if (this.type === tt.bracketL) { - nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node, isStatic)); - } else if (this.type === tt.parenL || this.isRelational("<")) { - nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node, allowStatic)); - } else { - if (isStatic && this.type === tt.colon) { - propertyKey = this.parseIdent(); - } else { - propertyKey = this.flow_parseObjectPropertyKey(); - } - if (this.isRelational("<") || this.type === tt.parenL) { - // This is a method property - nodeStart.properties.push(this.flow_parseObjectTypeMethod(start, isStatic, propertyKey)); - } else { - if (this.eat(tt.question)) { - optional = true; - } - node.key = propertyKey; - node.value = this.flow_parseTypeInitialiser(); - node.optional = optional; - node["static"] = isStatic; - this.flow_objectTypeSemicolon(); - nodeStart.properties.push(this.finishNode(node, "ObjectTypeProperty")); - } - } + if (object.type === 'Buffer' && isArray(object.data)) { + array = object.data + length = checked(array.length) | 0 } + that = allocate(that, length) - this.expect(tt.braceR); - - return this.finishNode(nodeStart, "ObjectTypeAnnotation"); -}; + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} -pp.flow_objectTypeSemicolon = function () { - if (!this.eat(tt.semi) && !this.eat(tt.comma) && this.type !== tt.braceR) { - this.unexpected(); +function allocate (that, length) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = Buffer._augment(new Uint8Array(length)) + } else { + // Fallback: Return an object instance of the Buffer class + that.length = length + that._isBuffer = true } -}; -pp.flow_parseGenericType = function (start, id) { - var node = this.startNodeAt(start); + var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 + if (fromPool) that.parent = rootParent - node.typeParameters = null; - node.id = id; + return that +} - while (this.eat(tt.dot)) { - var node2 = this.startNodeAt(start); - node2.qualification = node.id; - node2.id = this.parseIdent(); - node.id = this.finishNode(node2, "QualifiedTypeIdentifier"); +function checked (length) { + // Note: cannot use `length < kMaxLength` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') } + return length | 0 +} - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterInstantiation(); - } +function SlowBuffer (subject, encoding) { + if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) - return this.finishNode(node, "GenericTypeAnnotation"); -}; + var buf = new Buffer(subject, encoding) + delete buf.parent + return buf +} -pp.flow_parseTypeofType = function () { - var node = this.startNode(); - this.expect(tt._typeof); - node.argument = this.flow_parsePrimaryType(); - return this.finishNode(node, "TypeofTypeAnnotation"); -}; +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} -pp.flow_parseTupleType = function () { - var node = this.startNode(); - node.types = []; - this.expect(tt.bracketL); - // We allow trailing commas - while (this.pos < this.input.length && this.type !== tt.bracketR) { - node.types.push(this.flow_parseType()); - if (this.type === tt.bracketR) break; - this.expect(tt.comma); +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') } - this.expect(tt.bracketR); - return this.finishNode(node, "TupleTypeAnnotation"); -}; -pp.flow_parseFunctionTypeParam = function () { - var optional = false; - var node = this.startNode(); - node.name = this.parseIdent(); - if (this.eat(tt.question)) { - optional = true; + if (a === b) return 0 + + var x = a.length + var y = b.length + + var i = 0 + var len = Math.min(x, y) + while (i < len) { + if (a[i] !== b[i]) break + + ++i } - node.optional = optional; - node.typeAnnotation = this.flow_parseTypeInitialiser(); - return this.finishNode(node, "FunctionTypeParam"); -}; -pp.flow_parseFunctionTypeParams = function () { - var ret = { params: [], rest: null }; - while (this.type === tt.name) { - ret.params.push(this.flow_parseFunctionTypeParam()); - if (this.type !== tt.parenR) { - this.expect(tt.comma); - } + if (i !== len) { + x = a[i] + y = b[i] } - if (this.eat(tt.ellipsis)) { - ret.rest = this.flow_parseFunctionTypeParam(); + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'raw': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false } - return ret; -}; +} -pp.flow_identToTypeAnnotation = function (start, node, id) { - switch (id.name) { - case "any": - return this.finishNode(node, "AnyTypeAnnotation"); +Buffer.concat = function concat (list, length) { + if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') - case "void": - return this.finishNode(node, "VoidTypeAnnotation"); + if (list.length === 0) { + return new Buffer(0) + } else if (list.length === 1) { + return list[0] + } - case "bool": - case "boolean": - return this.finishNode(node, "BooleanTypeAnnotation"); + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; i++) { + length += list[i].length + } + } - case "mixed": - return this.finishNode(node, "MixedTypeAnnotation"); + var buf = new Buffer(length) + var pos = 0 + for (i = 0; i < list.length; i++) { + var item = list[i] + item.copy(buf, pos) + pos += item.length + } + return buf +} - case "number": - return this.finishNode(node, "NumberTypeAnnotation"); +function byteLength (string, encoding) { + if (typeof string !== 'string') string = '' + string - case "string": - return this.finishNode(node, "StringTypeAnnotation"); + var len = string.length + if (len === 0) return 0 - default: - return this.flow_parseGenericType(start, id); + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'binary': + // Deprecated + case 'raw': + case 'raws': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } } -}; +} +Buffer.byteLength = byteLength -// The parsing of types roughly parallels the parsing of expressions, and -// primary types are kind of like primary expressions...they're the -// primitives with which other types are constructed. -pp.flow_parsePrimaryType = function () { - var typeIdentifier = null; - var params = null; - var returnType = null; - var start = this.markPosition(); - var node = this.startNode(); - var rest = null; - var tmp; - var typeParameters; - var token; - var type; - var isGroupedType = false; +// pre-set for values that may exist in the future +Buffer.prototype.length = undefined +Buffer.prototype.parent = undefined - switch (this.type) { - case tt.name: - return this.flow_identToTypeAnnotation(start, node, this.parseIdent()); +function slowToString (encoding, start, end) { + var loweredCase = false - case tt.braceL: - return this.flow_parseObjectType(); + start = start | 0 + end = end === undefined || end === Infinity ? this.length : end | 0 - case tt.bracketL: - return this.flow_parseTupleType(); + if (!encoding) encoding = 'utf8' + if (start < 0) start = 0 + if (end > this.length) end = this.length + if (end <= start) return '' - case tt.relational: - if (this.value === "<") { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - this.expect(tt.parenL); - tmp = this.flow_parseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(tt.parenR); + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) - this.expect(tt.arrow); + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) - node.returnType = this.flow_parseType(); + case 'ascii': + return asciiSlice(this, start, end) - return this.finishNode(node, "FunctionTypeAnnotation"); - } + case 'binary': + return binarySlice(this, start, end) - case tt.parenL: - this.next(); + case 'base64': + return base64Slice(this, start, end) - // Check to see if this is actually a grouped type - if (this.type !== tt.parenR && this.type !== tt.ellipsis) { - if (this.type === tt.name) { - var token = this.lookahead().type; - isGroupedType = token !== tt.question && token !== tt.colon; - } else { - isGroupedType = true; - } - } + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) - if (isGroupedType) { - type = this.flow_parseType(); - this.expect(tt.parenR); + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} - // If we see a => next then someone was probably confused about - // function types, so we can provide a better error message - if (this.eat(tt.arrow)) { - this.raise(node, "Unexpected token =>. It looks like " + "you are trying to write a function type, but you ended up " + "writing a grouped type followed by an =>, which is a syntax " + "error. Remember, function type parameters are named so function " + "types look like (name1: type1, name2: type2) => returnType. You " + "probably wrote (type1) => returnType"); - } +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} - return type; - } +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} - tmp = this.flow_parseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} - this.expect(tt.parenR); +Buffer.prototype.compare = function compare (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return 0 + return Buffer.compare(this, b) +} - this.expect(tt.arrow); +Buffer.prototype.indexOf = function indexOf (val, byteOffset) { + if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff + else if (byteOffset < -0x80000000) byteOffset = -0x80000000 + byteOffset >>= 0 - node.returnType = this.flow_parseType(); - node.typeParameters = null; + if (this.length === 0) return -1 + if (byteOffset >= this.length) return -1 - return this.finishNode(node, "FunctionTypeAnnotation"); + // Negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) - case tt.string: - node.value = this.value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "StringLiteralTypeAnnotation"); + if (typeof val === 'string') { + if (val.length === 0) return -1 // special case: looking for empty string always fails + return String.prototype.indexOf.call(this, val, byteOffset) + } + if (Buffer.isBuffer(val)) { + return arrayIndexOf(this, val, byteOffset) + } + if (typeof val === 'number') { + if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { + return Uint8Array.prototype.indexOf.call(this, val, byteOffset) + } + return arrayIndexOf(this, [ val ], byteOffset) + } - default: - if (this.type.keyword === "typeof") { - return this.flow_parseTypeofType(); + function arrayIndexOf (arr, val, byteOffset) { + var foundIndex = -1 + for (var i = 0; byteOffset + i < arr.length; i++) { + if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex + } else { + foundIndex = -1 } + } + return -1 } - this.unexpected(); -}; + throw new TypeError('val must be string, number or Buffer') +} -pp.flow_parsePostfixType = function () { - var node = this.startNode(); - var type = node.elementType = this.flow_parsePrimaryType(); - if (this.type === tt.bracketL) { - this.expect(tt.bracketL); - this.expect(tt.bracketR); - return this.finishNode(node, "ArrayTypeAnnotation"); - } - return type; -}; +// `get` will be removed in Node 0.13+ +Buffer.prototype.get = function get (offset) { + console.log('.get() is deprecated. Access using array indexes instead.') + return this.readUInt8(offset) +} -pp.flow_parsePrefixType = function () { - var node = this.startNode(); - if (this.eat(tt.question)) { - node.typeAnnotation = this.flow_parsePrefixType(); - return this.finishNode(node, "NullableTypeAnnotation"); - } - return this.flow_parsePostfixType(); -}; +// `set` will be removed in Node 0.13+ +Buffer.prototype.set = function set (v, offset) { + console.log('.set() is deprecated. Access using array indexes instead.') + return this.writeUInt8(v, offset) +} -pp.flow_parseIntersectionType = function () { - var node = this.startNode(); - var type = this.flow_parsePrefixType(); - node.types = [type]; - while (this.eat(tt.bitwiseAND)) { - node.types.push(this.flow_parsePrefixType()); +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } } - return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); -}; -pp.flow_parseUnionType = function () { - var node = this.startNode(); - var type = this.flow_parseIntersectionType(); - node.types = [type]; - while (this.eat(tt.bitwiseOR)) { - node.types.push(this.flow_parseIntersectionType()); + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new Error('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 } - return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); -}; + for (var i = 0; i < length; i++) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) throw new Error('Invalid hex string') + buf[offset + i] = parsed + } + return i +} -pp.flow_parseType = function () { - var oldInType = this.inType; - this.inType = true; - var type = this.flow_parseUnionType(); - this.inType = oldInType; - return type; -}; +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} -pp.flow_parseTypeAnnotation = function () { - var node = this.startNode(); - node.typeAnnotation = this.flow_parseTypeInitialiser(); - return this.finishNode(node, "TypeAnnotation"); -}; +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} -pp.flow_parseTypeAnnotatableIdentifier = function (requireTypeAnnotation, canBeOptionalParam) { - var node = this.startNode(); - var ident = this.parseIdent(); - var isOptionalParam = false; +function binaryWrite (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} - if (canBeOptionalParam && this.eat(tt.question)) { - this.expect(tt.question); - isOptionalParam = true; - } +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} - if (requireTypeAnnotation || this.type === tt.colon) { - ident.typeAnnotation = this.flow_parseTypeAnnotation(); - this.finishNode(ident, ident.type); - } +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} - if (isOptionalParam) { - ident.optional = true; - this.finishNode(ident, ident.type); +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + var swap = encoding + encoding = offset + offset = length | 0 + length = swap } - return ident; -}; + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining -acorn.plugins.flow = function (instance) { - // function name(): string {} - instance.extend("parseFunctionBody", function (inner) { - return function (node, allowExpression) { - if (this.type === tt.colon) { - node.returnType = this.flow_parseTypeAnnotation(); - } + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('attempt to write outside buffer bounds') + } - return inner.call(this, node, allowExpression); - }; - }); + if (!encoding) encoding = 'utf8' - instance.extend("parseStatement", function (inner) { - return function (declaration, topLevel) { - // strict mode handling of `interface` since it's a reserved word - if (this.strict && this.type === tt.name && this.value === "interface") { - var node = this.startNode(); - this.next(); - return this.flow_parseInterface(node); - } else { - return inner.call(this, declaration, topLevel); - } - }; - }); + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) - instance.extend("parseExpressionStatement", function (inner) { - return function (node, expr) { - if (expr.type === "Identifier") { - if (expr.name === "declare") { - if (this.type === tt._class || this.type === tt.name || this.type === tt._function || this.type === tt._var) { - return this.flow_parseDeclare(node); - } - } else if (this.type === tt.name) { - if (expr.name === "interface") { - return this.flow_parseInterface(node); - } else if (expr.name === "type") { - return this.flow_parseTypeAlias(node); - } - } - } + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) - return inner.call(this, node, expr); - }; - }); + case 'ascii': + return asciiWrite(this, string, offset, length) - instance.extend("shouldParseExportDeclaration", function (inner) { - return function () { - return this.isContextual("type") || inner.call(this); - }; - }); + case 'binary': + return binaryWrite(this, string, offset, length) - instance.extend("parseParenItem", function (inner) { - return function (node, start) { - if (this.type === tt.colon) { - var typeCastNode = this.startNodeAt(start); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.flow_parseTypeAnnotation(); - return this.finishNode(typeCastNode, "TypeCastExpression"); - } else { - return node; - } - }; - }); + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) - instance.extend("parseClassId", function (inner) { - return function (node, isStatement) { - inner.call(this, node, isStatement); - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - } - }; - }); + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) - // don't consider `void` to be a keyword as then it'll use the void token type - // and set startExpr - instance.extend("isKeyword", function (inner) { - return function (name) { - if (this.inType && name === "void") { - return false; - } else { - return inner.call(this, name); - } - }; - }); + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} - instance.extend("readToken", function (inner) { - return function (code) { - if (this.inType && (code === 62 || code === 60)) { - return this.finishOp(tt.relational, 1); - } else { - return inner.call(this, code); - } - }; - }); +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} - instance.extend("jsx_readToken", function (inner) { - return function () { - if (!this.inType) return inner.call(this); - }; - }); +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} - instance.extend("parseParenArrowList", function (inner) { - return function (start, exprList, isAsync) { - for (var i = 0; i < exprList.length; i++) { - var listItem = exprList[i]; - if (listItem.type === "TypeCastExpression") { - var expr = listItem.expression; - expr.typeAnnotation = listItem.typeAnnotation; - exprList[i] = expr; - } - } - return inner.call(this, start, exprList, isAsync); - }; - }); +function utf8Slice (buf, start, end) { + var res = '' + var tmp = '' + end = Math.min(buf.length, end) - instance.extend("parseClassProperty", function (inner) { - return function (node) { - if (this.type === tt.colon) { - node.typeAnnotation = this.flow_parseTypeAnnotation(); - } - return inner.call(this, node); - }; - }); - instance.extend("isClassProperty", function (inner) { - return function () { - return this.type === tt.colon || inner.call(this); - }; - }); + for (var i = start; i < end; i++) { + if (buf[i] <= 0x7F) { + res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) + tmp = '' + } else { + tmp += '%' + buf[i].toString(16) + } + } - instance.extend("parseClassMethod", function (inner) { - return function (classBody, method, isGenerator, isAsync) { - var typeParameters; - if (this.isRelational("<")) { - typeParameters = this.flow_parseTypeParameterDeclaration(); - } - method.value = this.parseMethod(isGenerator, isAsync); - method.value.typeParameters = typeParameters; - classBody.body.push(this.finishNode(method, "MethodDefinition")); - }; - }); + return res + decodeUtf8Char(tmp) +} - instance.extend("parseClassSuper", function (inner) { - return function (node, isStatement) { - inner.call(this, node, isStatement); - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.flow_parseTypeParameterInstantiation(); - } - if (this.isContextual("implements")) { - this.next(); - var implemented = node["implements"] = []; - do { - var node = this.startNode(); - node.id = this.parseIdent(); - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - implemented.push(this.finishNode(node, "ClassImplements")); - } while (this.eat(tt.comma)); - } - }; - }); +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) - instance.extend("parseObjPropValue", function (inner) { - return function (prop) { - var typeParameters; - if (this.isRelational("<")) { - typeParameters = this.flow_parseTypeParameterDeclaration(); - if (this.type !== tt.parenL) this.unexpected(); - } - inner.apply(this, arguments); - prop.value.typeParameters = typeParameters; - }; - }); + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} - instance.extend("parseAssignableListItemTypes", function (inner) { - return function (param) { - if (this.eat(tt.question)) { - param.optional = true; - } - if (this.type === tt.colon) { - param.typeAnnotation = this.flow_parseTypeAnnotation(); - } - this.finishNode(param, param.type); - return param; - }; - }); +function binarySlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) - instance.extend("parseImportSpecifiers", function (inner) { - return function (node) { - node.isType = false; - if (this.isContextual("type")) { - var start = this.markPosition(); - var typeId = this.parseIdent(); - if (this.type === tt.name && this.value !== "from" || this.type === tt.braceL || this.type === tt.star) { - node.isType = true; - } else { - node.specifiers.push(this.parseImportSpecifierDefault(typeId, start)); - if (this.isContextual("from")) return; - this.eat(tt.comma); - } - } - inner.call(this, node); - }; - }); + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i]) + } + return ret +} - // function foo() {} - instance.extend("parseFunctionParams", function (inner) { - return function (node) { - if (this.isRelational("<")) { - node.typeParameters = this.flow_parseTypeParameterDeclaration(); - } - inner.call(this, node); - }; - }); +function hexSlice (buf, start, end) { + var len = buf.length - // var foo: string = bar - instance.extend("parseVarHead", function (inner) { - return function (decl) { - inner.call(this, decl); - if (this.type === tt.colon) { - decl.id.typeAnnotation = this.flow_parseTypeAnnotation(); - this.finishNode(decl.id, decl.id.type); - } - }; - }); -}; -},{"../src/index":5,"./../../babel/tools/protect.js":52}],3:[function(require,module,exports){ -"use strict"; + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); + var out = '' + for (var i = start; i < end; i++) { + out += toHex(buf[i]) + } + return out +} -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} -// A recursive descent parser operates by defining functions for all -// syntactic elements, and recursively calling those, each function -// advancing the input stream and returning an AST node. Precedence -// of constructs (for example, the fact that `!x[1]` means `!(x[1])` -// instead of `(!x)[1]` is handled by the fact that the parser -// function that parses unary prefix operators is called first, and -// in turn calls the function that parses `[]` subscripts — that -// way, it'll receive the node for `x[1]` already parsed, and wraps -// *that* in the unary operator node. -// -// Acorn uses an [operator precedence parser][opp] to handle binary -// operator precedence, because it is much more compact than using -// the technique outlined above, which uses different, nesting -// functions to specify precedence, for all of the ten binary -// precedence levels that JavaScript defines. -// -// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end -var _tokentype = require("./tokentype"); + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } -var _state = require("./state"); + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } -var _identifier = require("./identifier"); + if (end < start) end = start -var _util = require("./util"); + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = Buffer._augment(this.subarray(start, end)) + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; i++) { + newBuf[i] = this[i + start] + } + } -_babelToolsProtectJs3["default"](module); + if (newBuf.length) newBuf.parent = this.parent || this -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + return newBuf +} -var pp = _state.Parser.prototype; +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} -// 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. +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) -pp.checkPropClash = function (prop, propHash) { - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) return; - var key = prop.key, - name = undefined; - switch (key.type) { - case "Identifier": - name = key.name;break; - case "Literal": - name = String(key.value);break; - default: - return; + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property"); - propHash.proto = true; - } - return; + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) } - var other = undefined; - if (_util.has(propHash, name)) { - other = propHash[name]; - var isGetSet = kind !== "init"; - if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property"); - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul } - other[kind] = true; -}; -// ### Expression parsing + return val +} -// 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. +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} -// 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). +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} -pp.parseExpression = function (noIn, refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - if (this.type === _tokentype.types.comma) { - var node = this.startNodeAt(start); - node.expressions = [expr]; - while (this.eat(_tokentype.types.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - return this.finishNode(node, "SequenceExpression"); - } - return expr; -}; +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} -// Parse an assignment expression. This includes applications of -// operators like `+=`. +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) -pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { - if (this.type == _tokentype.types._yield && this.inGenerator) return this.parseYield(); + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} - var failOnShorthandAssign = undefined; - if (!refShorthandDefaultPos) { - refShorthandDefaultPos = { start: 0 }; - failOnShorthandAssign = true; - } else { - failOnShorthandAssign = false; - } - var start = this.markPosition(); - if (this.type == _tokentype.types.parenL || this.type == _tokentype.types.name) this.potentialArrowAt = this.start; - var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); - if (afterLeftParse) left = afterLeftParse.call(this, left, start); - if (this.type.isAssign) { - var node = this.startNodeAt(start); - node.operator = this.value; - node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left; - refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly - this.checkLVal(left); - if (left.parenthesizedExpression) { - var errorMsg = undefined; - if (left.type === "ObjectPattern") { - errorMsg = "`({a}) = 0` use `({a} = 0)`"; - } else if (left.type === "ArrayPattern") { - errorMsg = "`([a]) = 0` use `([a] = 0)`"; - } - if (errorMsg) { - this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg); - } - } - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - return left; -}; +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) -// Parse a ternary conditional (`?:`) operator. + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} -pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseExprOps(noIn, refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - if (this.eat(_tokentype.types.question)) { - var node = this.startNodeAt(start); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(_tokentype.types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression"); +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul } - return expr; -}; + mul *= 0x80 -// Start the precedence parser. + if (val >= mul) val -= Math.pow(2, 8 * byteLength) -pp.parseExprOps = function (noIn, refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseMaybeUnary(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseExprOp(expr, start, -1, noIn); -}; + return val +} -// 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. +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) -pp.parseExprOp = function (left, leftStart, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== _tokentype.types._in)) { - if (prec > minPrec) { - var node = this.startNodeAt(leftStart); - node.left = left; - node.operator = this.value; - var op = this.type; - this.next(); - var start = this.markPosition(); - node.right = this.parseExprOp(this.parseMaybeUnary(), start, op.rightAssociative ? prec - 1 : prec, noIn); - this.finishNode(node, op === _tokentype.types.logicalOR || op === _tokentype.types.logicalAND ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(node, leftStart, minPrec, noIn); - } + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul } - return left; -}; + mul *= 0x80 -// Parse unary operators, both prefix and postfix. + if (val >= mul) val -= Math.pow(2, 8 * byteLength) -pp.parseMaybeUnary = function (refShorthandDefaultPos) { - 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(); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); - if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); - return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } - var start = this.markPosition(); - var expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - while (this.type.postfix && !this.canInsertSemicolon()) { - var node = this.startNodeAt(start); - node.operator = this.value; - node.prefix = false; - node.argument = expr; - this.checkLVal(expr); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); - } - return expr; -}; + return val +} -// Parse call, dot, and `[]`-subscript expressions. +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} -pp.parseExprSubscripts = function (refShorthandDefaultPos) { - var start = this.markPosition(); - var expr = this.parseExprAtom(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseSubscripts(expr, start); -}; - -pp.parseSubscripts = function (base, start, noCalls) { - if (!noCalls && this.eat(_tokentype.types.doubleColon)) { - var node = this.startNodeAt(start); - node.object = base; - node.callee = this.parseNoCallExpr(); - return this.parseSubscripts(this.finishNode(node, "BindExpression"), start, noCalls); - } else if (this.eat(_tokentype.types.dot)) { - var node = this.startNodeAt(start); - node.object = base; - node.property = this.parseIdent(true); - node.computed = false; - return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); - } else if (this.eat(_tokentype.types.bracketL)) { - var node = this.startNodeAt(start); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.expect(_tokentype.types.bracketR); - return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls); - } else if (!noCalls && this.eat(_tokentype.types.parenL)) { - var node = this.startNodeAt(start); - node.callee = base; - node.arguments = this.parseExprList(_tokentype.types.parenR, this.options.features["es7.trailingFunctionCommas"]); - return this.parseSubscripts(this.finishNode(node, "CallExpression"), start, noCalls); - } else if (this.type === _tokentype.types.backQuote) { - var node = this.startNodeAt(start); - node.tag = base; - node.quasi = this.parseTemplate(); - return this.parseSubscripts(this.finishNode(node, "TaggedTemplateExpression"), start, noCalls); - }return base; -}; +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} -// Parse a no-call expression (like argument of `new` or `::` operators). +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} -pp.parseNoCallExpr = function () { - var start = this.markPosition(); - return this.parseSubscripts(this.parseExprAtom(), start, true); -}; +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) -// 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 `{}`. + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} -pp.parseExprAtom = function (refShorthandDefaultPos) { - 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); +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) - case _tokentype.types._yield: - if (this.inGenerator) this.unexpected(); + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} - case _tokentype.types._do: - if (this.options.features["es7.doExpressions"]) { - var _node = this.startNode(); - this.next(); - var oldInFunction = this.inFunction; - var oldLabels = this.labels; - this.labels = []; - this.inFunction = false; - _node.body = this.parseBlock(); - this.inFunction = oldInFunction; - this.labels = oldLabels; - return this.finishNode(_node, "DoExpression"); - } +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} - case _tokentype.types.name: - var start = this.markPosition(); - node = this.startNode(); - var id = this.parseIdent(this.type !== _tokentype.types.name); +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} - // - if (this.options.features["es7.asyncFunctions"]) { - // async functions! - if (id.name === "async" && !this.canInsertSemicolon()) { - // arrow functions - if (this.type === _tokentype.types.parenL) { - var expr = this.parseParenAndDistinguishExpression(start, true, true); - if (expr && expr.type === "ArrowFunctionExpression") { - return expr; - } else { - node.callee = id; - if (!expr) { - node.arguments = []; - } else if (expr.type === "SequenceExpression") { - node.arguments = expr.expressions; - } else { - node.arguments = [expr]; - } - return this.parseSubscripts(this.finishNode(node, "CallExpression"), start); - } - } else if (this.type === _tokentype.types.name) { - id = this.parseIdent(); - this.expect(_tokentype.types.arrow); - return this.parseArrowExpression(node, [id], true); - } +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} - // normal functions - if (this.type === _tokentype.types._function && !this.canInsertSemicolon()) { - this.next(); - return this.parseFunction(node, false, false, true); - } - } else if (id.name === "await") { - if (this.inAsync) return this.parseAwait(node); - } - } - // +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) return this.parseArrowExpression(this.startNodeAt(start), [id]); - return id; +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') +} - case _tokentype.types.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = { pattern: value.pattern, flags: value.flags }; - return node; +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - case _tokentype.types.num:case _tokentype.types.string: - return this.parseLiteral(this.value); + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } - 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"); + return offset + byteLength +} - case _tokentype.types.parenL: - return this.parseParenAndDistinguishExpression(null, null, canBeArrow); +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - case _tokentype.types.bracketL: - node = this.startNode(); - this.next(); - // check whether this is array comprehension or regular array - if ((this.options.ecmaVersion >= 7 || this.options.features["es7.comprehensions"]) && this.type === _tokentype.types._for) { - return this.parseComprehension(node, false); - } - node.elements = this.parseExprList(_tokentype.types.bracketR, true, true, refShorthandDefaultPos); - return this.finishNode(node, "ArrayExpression"); + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } - case _tokentype.types.braceL: - return this.parseObj(false, refShorthandDefaultPos); + return offset + byteLength +} - case _tokentype.types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, false); +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = value + return offset + 1 +} - case _tokentype.types.at: - this.parseDecorators(); +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} - case _tokentype.types._class: - node = this.startNode(); - this.takeDecorators(node); - return this.parseClass(node, false); +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} - case _tokentype.types._new: - return this.parseNew(); +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = value + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} - case _tokentype.types.backQuote: - return this.parseTemplate(); +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} - case _tokentype.types.doubleColon: - node = this.startNode(); - this.next(); - node.object = null; - var callee = node.callee = this.parseNoCallExpr(); - if (callee.type !== "MemberExpression") this.raise(callee.start, "Binding should be performed on object property."); - return this.finishNode(node, "BindExpression"); +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = value + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} - default: - this.unexpected(); +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = value + } else { + objectWriteUInt32(this, value, offset, false) } -}; + return offset + 4 +} -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"); -}; +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) -pp.parseParenExpression = function () { - this.expect(_tokentype.types.parenL); - var val = this.parseExpression(); - this.expect(_tokentype.types.parenR); - return val; -}; + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } -pp.parseParenAndDistinguishExpression = function (start, isAsync, canBeArrow) { - start = start || this.markPosition(); - var val = undefined; - if (this.options.ecmaVersion >= 6) { - this.next(); + var i = 0 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } - if ((this.options.features["es7.comprehensions"] || this.options.ecmaVersion >= 7) && this.type === _tokentype.types._for) { - return this.parseComprehension(this.startNodeAt(start), true); - } + return offset + byteLength +} - var innerStart = this.markPosition(), - exprList = [], - first = true; - var refShorthandDefaultPos = { start: 0 }, - spreadStart = undefined, - innerParenStart = undefined, - optionalCommaStart = undefined; - while (this.type !== _tokentype.types.parenR) { - if (first) { - first = false; - } else { - this.expect(_tokentype.types.comma); - if (this.type === _tokentype.types.parenR && this.options.features["es7.trailingFunctionCommas"]) { - optionalCommaStart = this.start; - break; - } - } +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) - if (this.type === _tokentype.types.ellipsis) { - var spreadNodeStart = this.markPosition(); - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStart)); - break; - } else { - if (this.type === _tokentype.types.parenL && !innerParenStart) { - innerParenStart = this.start; - } - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); - } - } - var innerEnd = this.markPosition(); - this.expect(_tokentype.types.parenR); + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } - if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) { - if (innerParenStart) this.unexpected(innerParenStart); - return this.parseParenArrowList(start, exprList, isAsync); - } + var i = byteLength - 1 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } - if (!exprList.length) { - if (isAsync) { - return; - } else { - this.unexpected(this.lastTokStart); - } - } - if (optionalCommaStart) this.unexpected(optionalCommaStart); - if (spreadStart) this.unexpected(spreadStart); - if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); + return offset + byteLength +} - if (exprList.length > 1) { - val = this.startNodeAt(innerStart); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEnd); - } else { - val = exprList[0]; - } +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = value + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) } else { - val = this.parseParenExpression(); + objectWriteUInt16(this, value, offset, true) } + return offset + 2 +} - if (this.options.preserveParens) { - var par = this.startNodeAt(start); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression"); +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = value } else { - val.parenthesizedExpression = true; - return val; + objectWriteUInt16(this, value, offset, false) } -}; - -pp.parseParenArrowList = function (start, exprList, isAsync) { - return this.parseArrowExpression(this.startNodeAt(start), exprList, isAsync); -}; + return offset + 2 +} -pp.parseParenItem = function (node, start) { - return node; -}; +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} -// 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 +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = value + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} -var empty = []; +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') + if (offset < 0) throw new RangeError('index out of range') +} -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.raise(node.property.start, "The only valid meta property for new is new.target"); - return this.finishNode(node, "MetaProperty"); +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) } - node.callee = this.parseNoCallExpr(); - if (this.eat(_tokentype.types.parenL)) node.arguments = this.parseExprList(_tokentype.types.parenR, this.options.features["es7.trailingFunctionCommas"]);else node.arguments = empty; - return this.finishNode(node, "NewExpression"); -}; + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} -// Parse template expression. +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} -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"); -}; +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} -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()); +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) } - this.next(); - return this.finishNode(node, "TemplateLiteral"); -}; - -// Parse an object literal or binding pattern. + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} -pp.parseObj = function (isPattern, refShorthandDefaultPos) { - var node = this.startNode(), - first = true, - propHash = {}; - node.properties = []; - var decorators = []; - 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; - while (this.type === _tokentype.types.at) { - decorators.push(this.parseDecorator()); - } - var prop = this.startNode(), - isGenerator = false, - isAsync = false, - start = undefined; - if (decorators.length) { - prop.decorators = decorators; - decorators = []; - } - if (this.options.features["es7.objectRestSpread"] && this.type === _tokentype.types.ellipsis) { - prop = this.parseSpread(); - prop.type = "SpreadProperty"; - node.properties.push(prop); - continue; - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refShorthandDefaultPos) start = this.markPosition(); - if (!isPattern) isGenerator = this.eat(_tokentype.types.star); - } - if (this.options.features["es7.asyncFunctions"] && this.isContextual("async")) { - if (isGenerator || isPattern) this.unexpected(); - var asyncId = this.parseIdent(); - if (this.type === _tokentype.types.colon || this.type === _tokentype.types.parenL) { - prop.key = asyncId; - } else { - isAsync = true; - this.parsePropertyName(prop); - } - } else { - this.parsePropertyName(prop); - } - this.parseObjPropValue(prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos); - this.checkPropClash(prop, propHash); - node.properties.push(this.finishNode(prop, "Property")); - } - if (decorators.length) { - this.raise(this.start, "You have trailing decorators with no property"); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); -}; +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} -pp.parseObjPropValue = function (prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos) { - if (this.eat(_tokentype.types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault() : this.parseMaybeAssign(false, refShorthandDefaultPos); - 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, isAsync); - } 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 || isAsync || 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.raise(_start, "getter should have no params");else this.raise(_start, "setter should have exactly one param"); - } - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - prop.kind = "init"; - if (isPattern) { - if (this.isKeyword(prop.key.name) || this.strict && (_identifier.reservedWords.strictBind(prop.key.name) || _identifier.reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); - prop.value = this.parseMaybeDefault(start, prop.key); - } else if (this.type === _tokentype.types.eq && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start; - prop.value = this.parseMaybeDefault(start, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else this.unexpected(); -}; +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} -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); -}; +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start -// Initialize empty function node. + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 -pp.initFunction = function (node, isAsync) { - node.id = null; - if (this.options.ecmaVersion >= 6) { - node.generator = false; - node.expression = false; + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') } - if (this.options.features["es7.asyncFunctions"]) { - node.async = !!isAsync; + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start } -}; -// Parse object or class method. + var len = end - start -pp.parseMethod = function (isGenerator, isAsync) { - var node = this.startNode(); - this.initFunction(node, isAsync); - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, this.options.features["es7.trailingFunctionCommas"]); - if (this.options.ecmaVersion >= 6) { - node.generator = isGenerator; + if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < len; i++) { + target[i + targetStart] = this[i + start] + } + } else { + target._set(this.subarray(start, start + len), targetStart) } - this.parseFunctionBody(node); - return this.finishNode(node, "FunctionExpression"); -}; -// Parse arrow function expression with given parameters. + return len +} -pp.parseArrowExpression = function (node, params, isAsync) { - this.initFunction(node, isAsync); - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true); - return this.finishNode(node, "ArrowFunctionExpression"); -}; +// fill(value, start=0, end=buffer.length) +Buffer.prototype.fill = function fill (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length -// Parse function body and check parameters. + if (end < start) throw new RangeError('end < start') -pp.parseFunctionBody = function (node, allowExpression) { - var isExpression = allowExpression && this.type !== _tokentype.types.braceL; + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return - var oldInAsync = this.inAsync; - this.inAsync = node.async; - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - } else { - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldInFunc = this.inFunction, - oldInGen = this.inGenerator, - oldLabels = this.labels; - this.inFunction = true;this.inGenerator = node.generator;this.labels = []; - node.body = this.parseBlock(true); - node.expression = false; - this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; - } - this.inAsync = oldInAsync; + if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') + if (end < 0 || end > this.length) throw new RangeError('end out of bounds') - // 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 nameHash = {}, - oldStrict = this.strict; - this.strict = true; - if (node.id) this.checkLVal(node.id, true); - for (var i = 0; i < node.params.length; i++) { - this.checkLVal(node.params[i], true, nameHash); - }this.strict = oldStrict; + var i + if (typeof value === 'number') { + for (i = start; i < end; i++) { + this[i] = value + } + } else { + var bytes = utf8ToBytes(value.toString()) + var len = bytes.length + for (i = start; i < end; i++) { + this[i] = bytes[i % len] + } } -}; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). -pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) { - var elts = [], - first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(_tokentype.types.comma); - if (allowTrailingComma && this.afterTrailingComma(close)) break; - } else first = false; + return this +} - if (allowEmpty && this.type === _tokentype.types.comma) { - elts.push(null); - } else { - if (this.type === _tokentype.types.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos)); +/** + * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. + * Added in Node 0.12. Only available in browsers that support ArrayBuffer. + */ +Buffer.prototype.toArrayBuffer = function toArrayBuffer () { + if (typeof Uint8Array !== 'undefined') { + if (Buffer.TYPED_ARRAY_SUPPORT) { + return (new Buffer(this)).buffer + } else { + var buf = new Uint8Array(this.length) + for (var i = 0, len = buf.length; i < len; i += 1) { + buf[i] = this[i] + } + return buf.buffer } - } - 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.options.allowReserved && this.isReservedWord(this.value) || this.strict && _identifier.reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); - 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 await expression inside async function. - -pp.parseAwait = function (node) { - if (this.eat(_tokentype.types.semi) || this.canInsertSemicolon()) { - this.unexpected(); - } - node.all = this.eat(_tokentype.types.star); - node.argument = this.parseMaybeUnary(); - return this.finishNode(node, "AwaitExpression"); -}; - -// Parses yield expression inside generator. - -pp.parseYield = function () { - var node = this.startNode(); - this.next(); - if (this.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"); -}; - -// Parses array and generator comprehensions. - -pp.parseComprehension = function (node, isGenerator) { - node.blocks = []; - while (this.type === _tokentype.types._for) { - var block = this.startNode(); - this.next(); - this.expect(_tokentype.types.parenL); - block.left = this.parseBindingAtom(); - this.checkLVal(block.left, true); - this.expectContextual("of"); - block.right = this.parseExpression(); - this.expect(_tokentype.types.parenR); - node.blocks.push(this.finishNode(block, "ComprehensionBlock")); + throw new TypeError('Buffer.toArrayBuffer not supported in this browser') } - node.filter = this.eat(_tokentype.types._if) ? this.parseParenExpression() : null; - node.body = this.parseExpression(); - this.expect(isGenerator ? _tokentype.types.parenR : _tokentype.types.bracketR); - node.generator = isGenerator; - return this.finishNode(node, "ComprehensionExpression"); -}; -},{"./../../babel/tools/protect.js":52,"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){ -"use strict"; +} -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); +// HELPER FUNCTIONS +// ================ -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); +var BP = Buffer.prototype -exports.__esModule = true; -exports.isIdentifierStart = isIdentifierStart; -exports.isIdentifierChar = isIdentifierChar; +/** + * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods + */ +Buffer._augment = function _augment (arr) { + arr.constructor = Buffer + arr._isBuffer = true -_babelToolsProtectJs3["default"](module); + // save reference to original Uint8Array set method before overwriting + arr._set = arr.set -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + // deprecated, will be removed in node 0.13+ + arr.get = BP.get + arr.set = BP.set -// This is a trick taken from Esprima. It turns out that, on -// non-Chrome browsers, to check whether a string is in a set, a -// predicate containing a big ugly `switch` statement is faster than -// a regular expression, and on Chrome the two are about on par. -// This function uses `eval` (non-lexical) to produce such a -// predicate from a space-separated string of words. -// -// It starts by sorting the words by length. + arr.write = BP.write + arr.toString = BP.toString + arr.toLocaleString = BP.toString + arr.toJSON = BP.toJSON + arr.equals = BP.equals + arr.compare = BP.compare + arr.indexOf = BP.indexOf + arr.copy = BP.copy + arr.slice = BP.slice + arr.readUIntLE = BP.readUIntLE + arr.readUIntBE = BP.readUIntBE + arr.readUInt8 = BP.readUInt8 + arr.readUInt16LE = BP.readUInt16LE + arr.readUInt16BE = BP.readUInt16BE + arr.readUInt32LE = BP.readUInt32LE + arr.readUInt32BE = BP.readUInt32BE + arr.readIntLE = BP.readIntLE + arr.readIntBE = BP.readIntBE + arr.readInt8 = BP.readInt8 + arr.readInt16LE = BP.readInt16LE + arr.readInt16BE = BP.readInt16BE + arr.readInt32LE = BP.readInt32LE + arr.readInt32BE = BP.readInt32BE + arr.readFloatLE = BP.readFloatLE + arr.readFloatBE = BP.readFloatBE + arr.readDoubleLE = BP.readDoubleLE + arr.readDoubleBE = BP.readDoubleBE + arr.writeUInt8 = BP.writeUInt8 + arr.writeUIntLE = BP.writeUIntLE + arr.writeUIntBE = BP.writeUIntBE + arr.writeUInt16LE = BP.writeUInt16LE + arr.writeUInt16BE = BP.writeUInt16BE + arr.writeUInt32LE = BP.writeUInt32LE + arr.writeUInt32BE = BP.writeUInt32BE + arr.writeIntLE = BP.writeIntLE + arr.writeIntBE = BP.writeIntBE + arr.writeInt8 = BP.writeInt8 + arr.writeInt16LE = BP.writeInt16LE + arr.writeInt16BE = BP.writeInt16BE + arr.writeInt32LE = BP.writeInt32LE + arr.writeInt32BE = BP.writeInt32BE + arr.writeFloatLE = BP.writeFloatLE + arr.writeFloatBE = BP.writeFloatBE + arr.writeDoubleLE = BP.writeDoubleLE + arr.writeDoubleBE = BP.writeDoubleBE + arr.fill = BP.fill + arr.inspect = BP.inspect + arr.toArrayBuffer = BP.toArrayBuffer -function makePredicate(words) { - words = words.split(" "); - return function (str) { - return words.indexOf(str) >= 0; - }; + return arr } -// Reserved word lists for various dialects of the language - -var reservedWords = { - 3: makePredicate("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: makePredicate("class enum extends super const export import"), - 6: makePredicate("enum await"), - strict: makePredicate("implements interface let package private protected public static yield"), - strictBind: makePredicate("eval arguments") -}; +var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g -exports.reservedWords = reservedWords; -// And the keywords +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} -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"; +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} -var keywords = { - 5: makePredicate(ecma5AndLessKeywords), - 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super") -}; +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} -exports.keywords = keywords; -// ## Character categories +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + var i = 0 -// 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 `tools/generate-identifier-regex.js`. + for (; i < length; i++) { + codePoint = string.charCodeAt(i) -var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; -var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_"; + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (leadSurrogate) { + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } else { + // valid surrogate pair + codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 + leadSurrogate = null + } + } else { + // no lead yet -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else { + // valid lead + leadSurrogate = codePoint + continue + } + } + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = null + } -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x200000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } -// 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 tools/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, 98, 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, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 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, 16355, 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, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 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, 4305, 6, 792618, 239]; + return bytes +} -// 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; +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) } + return byteArray } -// Test whether a given character code starts an identifier. +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; i++) { + if ((units -= 2) < 0) break -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); -} + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } -// Test whether a given character is part of an identifier. + return byteArray +} -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); +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) } -},{"./../../babel/tools/protect.js":52}],5:[function(require,module,exports){ -"use strict"; -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; i++) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); +function decodeUtf8Char (str) { + try { + return decodeURIComponent(str) + } catch (err) { + return String.fromCharCode(0xFFFD) // UTF 8 invalid char + } +} -exports.__esModule = true; -exports.parse = parse; -exports.parseExpressionAt = parseExpressionAt; -exports.tokenizer = tokenizer; -// 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 -// -// http://marijnhaverbeke.nl/git/acorn -// https://github.com/marijnh/acorn.git -// -// Please use the [github bug tracker][ghbt] to report issues. -// -// [ghbt]: https://github.com/marijnh/acorn/issues -// -// This file defines the main parser interface. The library also comes -// with a [error-tolerant parser][dammit] and an -// [abstract syntax tree walker][walk], defined in other files. -// -// [dammit]: acorn_loose.js -// [walk]: util/walk.js +},{"base64-js":5,"ieee754":6,"is-array":7}],5:[function(require,module,exports){ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -var _state = require("./state"); +;(function (exports) { + 'use strict'; -var _options = require("./options"); + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array -require("./parseutil"); + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) -require("./statement"); + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } -require("./lval"); + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr -require("./expression"); + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } -require("./lookahead"); + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 -_babelToolsProtectJs3["default"](module); + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length -exports.Parser = _state.Parser; -exports.plugins = _state.plugins; -exports.defaultOptions = _options.defaultOptions; + var L = 0 -var _location = require("./location"); + function push (v) { + arr[L++] = v + } -exports.SourceLocation = _location.SourceLocation; -exports.getLineInfo = _location.getLineInfo; + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } -var _node = require("./node"); + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } -exports.Node = _node.Node; + return arr + } -var _tokentype = require("./tokentype"); + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length -exports.TokenType = _tokentype.TokenType; -exports.tokTypes = _tokentype.types; + function encode (num) { + return lookup.charAt(num) + } -var _tokencontext = require("./tokencontext"); + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } -exports.TokContext = _tokencontext.TokContext; -exports.tokContexts = _tokencontext.types; + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } -var _identifier = require("./identifier"); + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } -exports.isIdentifierChar = _identifier.isIdentifierChar; -exports.isIdentifierStart = _identifier.isIdentifierStart; + return output + } -var _tokenize = require("./tokenize"); + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) -exports.Token = _tokenize.Token; +},{}],6:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] -var _whitespace = require("./whitespace"); + i += d -exports.isNewLine = _whitespace.isNewLine; -exports.lineBreak = _whitespace.lineBreak; -exports.lineBreakG = _whitespace.lineBreakG; -var version = "1.0.0"; + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} -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]. -// -// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} -function parse(input, options) { - var p = parser(options, input); - var startPos = p.options.locations ? [p.pos, p.curPosition()] : p.pos; - p.nextToken(); - return p.parseTopLevel(p.options.program || p.startNodeAt(startPos)); + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) } -// 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. +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 -function parseExpressionAt(input, pos, options) { - var p = parser(options, input, pos); - p.nextToken(); - return p.parseExpression(); -} + value = Math.abs(value) -// Acorn is organized as a tokenizer and a recursive-descent parser. -// The `tokenize` export provides an interface to the tokenizer. -// Because the tokenizer is optimized for being efficiently used by -// the Acorn parser itself, this interface is somewhat crude and not -// very modular. + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } -function tokenizer(input, options) { - return parser(options, input); -} - -function parser(options, input) { - return new _state.Parser(_options.getOptions(options), String(input)); -} -},{"./../../babel/tools/protect.js":52,"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){ -"use strict"; + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} -exports.__esModule = true; -exports.getLineInfo = getLineInfo; + buffer[offset + i - d] |= s * 128 +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +},{}],7:[function(require,module,exports){ -var _state = require("./state"); +/** + * isArray + */ -var _whitespace = require("./whitespace"); +var isArray = Array.isArray; -_babelToolsProtectJs3["default"](module); +/** + * toString + */ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +var str = Object.prototype.toString; -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. +/** + * Whether or not the given `val` + * is an array. + * + * example: + * + * isArray([]); + * // > true + * isArray(arguments); + * // > false + * isArray(''); + * // > false + * + * @param {mixed} val + * @return {bool} + */ -var Position = (function () { - function Position(line, col) { - _classCallCheck(this, Position); +module.exports = isArray || function (val) { + return !! val && '[object Array]' == str.call(val); +}; - this.line = line; - this.column = col; - } +},{}],8:[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. - Position.prototype.offset = function offset(n) { - return new Position(this.line, this.column + n); - }; +function EventEmitter() { + this._events = this._events || {}; + this._maxListeners = this._maxListeners || undefined; +} +module.exports = EventEmitter; - return Position; -})(); +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; -exports.Position = Position; +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._maxListeners = undefined; -var SourceLocation = function SourceLocation(p, start, end) { - _classCallCheck(this, SourceLocation); +// 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; - this.start = start; - this.end = end; - if (p.sourceFile !== null) this.source = p.sourceFile; +// 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; }; -exports.SourceLocation = SourceLocation; +EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; -// 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. + if (!this._events) + this._events = {}; -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); + // 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.'); } } -} -var pp = _state.Parser.prototype; + handler = this._events[type]; -// 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. + if (isUndefined(handler)) + return false; -pp.raise = function (pos, message) { - var loc = 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; -}; + 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: + len = arguments.length; + args = new Array(len - 1); + for (i = 1; i < len; i++) + args[i - 1] = arguments[i]; + handler.apply(this, args); + } + } else if (isObject(handler)) { + len = arguments.length; + args = new Array(len - 1); + for (i = 1; i < len; i++) + args[i - 1] = arguments[i]; -pp.curPosition = function () { - return new Position(this.curLine, this.pos - this.lineStart); -}; + listeners = handler.slice(); + len = listeners.length; + for (i = 0; i < len; i++) + listeners[i].apply(this, args); + } -pp.markPosition = function () { - return this.options.locations ? [this.start, this.startLoc] : this.start; + return true; }; -},{"./../../babel/tools/protect.js":52,"./state":12,"./whitespace":18}],7:[function(require,module,exports){ -"use strict"; - -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); +EventEmitter.prototype.addListener = function(type, listener) { + var m; -var _state = require("./state"); + if (!isFunction(listener)) + throw TypeError('listener must be a function'); -_babelToolsProtectJs3["default"](module); + if (!this._events) + this._events = {}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + // 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); -var pp = _state.Parser.prototype; + 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]; -var STATE_KEYS = ["lastTokStartLoc", "lastTokEndLoc", "lastTokStart", "lastTokEnd", "lineStart", "startLoc", "curLine", "endLoc", "start", "pos", "end", "type", "value", "exprAllowed", "potentialArrowAt", "currLine", "input", "inType", "inFunction", "inGenerator", "labels"]; + // Check for listener leak + if (isObject(this._events[type]) && !this._events[type].warned) { + var m; + if (!isUndefined(this._maxListeners)) { + m = this._maxListeners; + } else { + m = EventEmitter.defaultMaxListeners; + } -pp.getState = function () { - var state = {}; - for (var i = 0; i < STATE_KEYS.length; i++) { - var key = STATE_KEYS[i]; - state[key] = this[key]; + 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(); + } + } } - state.context = this.context.slice(); - state.labels = this.labels.slice(); - return state; -}; -pp.lookahead = function () { - var old = this.getState(); - this.isLookahead = true; - this.next(); - this.isLookahead = false; - var curr = this.getState(); - for (var key in old) this[key] = old[key]; - return curr; + return this; }; -},{"./../../babel/tools/protect.js":52,"./state":12}],8:[function(require,module,exports){ -"use strict"; - -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); +EventEmitter.prototype.on = EventEmitter.prototype.addListener; -var _tokentype = require("./tokentype"); +EventEmitter.prototype.once = function(type, listener) { + if (!isFunction(listener)) + throw TypeError('listener must be a function'); -var _state = require("./state"); + var fired = false; -var _identifier = require("./identifier"); + function g() { + this.removeListener(type, g); -var _util = require("./util"); + if (!fired) { + fired = true; + listener.apply(this, arguments); + } + } -_babelToolsProtectJs3["default"](module); + g.listener = listener; + this.on(type, g); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + return this; +}; -var pp = _state.Parser.prototype; +// emits a 'removeListener' event iff the listener was removed +EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; -// Convert existing expression atom to assignable pattern -// if possible. + if (!isFunction(listener)) + throw TypeError('listener must be a function'); -pp.toAssignable = function (node, isBinding) { - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - break; + if (!this._events || !this._events[type]) + return this; - case "ObjectExpression": - node.type = "ObjectPattern"; - for (var i = 0; i < node.properties.length; i++) { - var prop = node.properties[i]; - if (prop.type === "SpreadProperty") continue; - if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - this.toAssignable(prop.value, isBinding); - } - break; + list = this._events[type]; + length = list.length; + position = -1; - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding); - break; + if (list === listener || + (isFunction(list.listener) && list.listener === listener)) { + delete this._events[type]; + if (this._events.removeListener) + this.emit('removeListener', type, listener); - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - delete node.operator; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } + } else if (isObject(list)) { + for (i = length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + position = i; break; - - case "MemberExpression": - if (!isBinding) break; - - default: - this.raise(node.start, "Assigning to rvalue"); + } } - } - return node; -}; -// Convert list of expression atoms to binding list. + if (position < 0) + return this; -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 (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); } - } - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) this.toAssignable(elt, isBinding); - } - return exprList; -}; -// Parses spread element. + if (this._events.removeListener) + this.emit('removeListener', type, listener); + } -pp.parseSpread = function (refShorthandDefaultPos) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(refShorthandDefaultPos); - return this.finishNode(node, "SpreadElement"); + return this; }; -pp.parseRest = function () { - var node = this.startNode(); - this.next(); - node.argument = this.type === _tokentype.types.name || this.type === _tokentype.types.bracketL ? this.parseBindingAtom() : this.unexpected(); - return this.finishNode(node, "RestElement"); -}; +EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; -// Parses lvalue (assignable) atom. + if (!this._events) + return this; -pp.parseBindingAtom = function () { - if (this.options.ecmaVersion < 6) return this.parseIdent(); - switch (this.type) { - case _tokentype.types.name: - return this.parseIdent(); + // 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; + } - case _tokentype.types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(_tokentype.types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern"); + // 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; + } - case _tokentype.types.braceL: - return this.parseObj(true); + listeners = this._events[type]; - default: - this.unexpected(); + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else { + // LIFO order + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); } -}; + delete this._events[type]; -pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { - 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) { - elts.push(this.parseAssignableListItemTypes(this.parseRest())); - this.expect(close); - break; - } else { - var left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - elts.push(this.parseMaybeDefault(null, left)); - } - } - return elts; + return this; }; -pp.parseAssignableListItemTypes = function (param) { - return param; +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; }; -// Parses assignment pattern around given atom if possible. - -pp.parseMaybeDefault = function (startPos, left) { - startPos = startPos || this.markPosition(); - left = left || this.parseBindingAtom(); - if (!this.eat(_tokentype.types.eq)) return left; - var node = this.startNodeAt(startPos); - node.operator = "="; - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); +EventEmitter.listenerCount = function(emitter, type) { + var ret; + if (!emitter._events || !emitter._events[type]) + ret = 0; + else if (isFunction(emitter._events[type])) + ret = 1; + else + ret = emitter._events[type].length; + return ret; }; -// Verify that a node is an lval — something that can be assigned -// to. +function isFunction(arg) { + return typeof arg === 'function'; +} -pp.checkLVal = function (expr, isBinding, checkClashes) { - switch (expr.type) { - case "Identifier": - if (this.strict && (_identifier.reservedWords.strictBind(expr.name) || _identifier.reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); - if (checkClashes) { - if (_util.has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); - checkClashes[expr.name] = true; - } - break; +function isNumber(arg) { + return typeof arg === 'number'; +} - case "MemberExpression": - if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); - break; +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} - case "ObjectPattern": - for (var i = 0; i < expr.properties.length; i++) { - var prop = expr.properties[i]; - if (prop.type === "Property") prop = prop.value; - this.checkLVal(prop, isBinding, checkClashes); - } - break; +function isUndefined(arg) { + return arg === void 0; +} - case "ArrayPattern": - for (var i = 0; i < expr.elements.length; i++) { - var elem = expr.elements[i]; - if (elem) this.checkLVal(elem, isBinding, checkClashes); +},{}],9:[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 } - break; - - case "AssignmentPattern": - this.checkLVal(expr.left, isBinding, checkClashes); - break; - - case "SpreadProperty": - 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"); + }); + }; +} 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 } -}; -},{"./../../babel/tools/protect.js":52,"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],9:[function(require,module,exports){ -"use strict"; - -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); - -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var _state = require("./state"); - -var _location = require("./location"); - -_babelToolsProtectJs3["default"](module); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -// Start an AST node, attaching a start offset. - -var pp = _state.Parser.prototype; +} -var Node = function Node() { - _classCallCheck(this, Node); +},{}],10:[function(require,module,exports){ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; }; -exports.Node = Node; +},{}],11:[function(require,module,exports){ +(function (process){ +// 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. -pp.startNode = function () { - var node = new Node(); - node.start = this.start; - if (this.options.locations) node.loc = new _location.SourceLocation(this, this.startLoc); - if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; - if (this.options.ranges) node.range = [this.start, 0]; - return node; -}; +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } -pp.startNodeAt = function (pos) { - var node = new Node(), - start = pos; - if (this.options.locations) { - node.loc = new _location.SourceLocation(this, start[1]); - start = pos[0]; + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } } - node.start = start; - if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; - if (this.options.ranges) node.range = [start, 0]; - return node; -}; -// Finish an AST node, adding `type` and `end` properties. + return parts; +} -pp.finishNode = function (node, type) { - node.type = type; - node.end = this.lastTokEnd; - if (this.options.locations) node.loc.end = this.lastTokEndLoc; - if (this.options.ranges) node.range[1] = this.lastTokEnd; - return node; +// Split a filename into [root, dir, basename, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; +var splitPath = function(filename) { + return splitPathRe.exec(filename).slice(1); }; -// Finish node at given position +// path.resolve([from ...], to) +// posix version +exports.resolve = function() { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : process.cwd(); -pp.finishNodeAt = function (node, type, pos) { - if (this.options.locations) { - node.loc.end = pos[1];pos = pos[0]; + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; } - node.type = type; - node.end = pos; - if (this.options.ranges) node.range[1] = pos; - return node; -}; -},{"./../../babel/tools/protect.js":52,"./location":6,"./state":12}],10:[function(require,module,exports){ -"use strict"; -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); + // Normalize the path + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); -exports.__esModule = true; -exports.getOptions = getOptions; + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +}; -var _util = require("./util"); +// path.normalize(path) +// posix version +exports.normalize = function(path) { + var isAbsolute = exports.isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; -var _location = require("./location"); + // Normalize the path + path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isAbsolute).join('/'); -_babelToolsProtectJs3["default"](module); + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + return (isAbsolute ? '/' : '') + path; +}; -// A second optional argument can be given to further configure -// the parser process. These options are recognized: +// posix version +exports.isAbsolute = function(path) { + return path.charAt(0) === '/'; +}; -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. - ecmaVersion: 5, - // 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 not enforced. Disable - // `allowReserved` to enforce them. When this option has the - // value "never", reserved words and keywords can also not be - // used as property names. - allowReserved: true, - // 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 tokenize() returns. 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: {}, - // Babel-specific options - features: {}, - strictMode: null +// posix version +exports.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function(p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + return p; + }).join('/')); }; -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 (_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); +// path.relative(from, to) +// posix version +exports.relative = function(from, to) { + from = exports.resolve(from).substr(1); + to = exports.resolve(to).substr(1); - return options; -} + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } -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 _location.SourceLocation(this, startLoc, endLoc); - if (options.ranges) comment.range = [start, end]; - array.push(comment); - }; -} -},{"./../../babel/tools/protect.js":52,"./location":6,"./util":17}],11:[function(require,module,exports){ -"use strict"; + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); + if (start > end) return []; + return arr.slice(start, end - start + 1); + } -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); -var _tokentype = require("./tokentype"); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } -var _state = require("./state"); + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } -var _whitespace = require("./whitespace"); + outputParts = outputParts.concat(toParts.slice(samePartsLength)); -_babelToolsProtectJs3["default"](module); + return outputParts.join('/'); +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +exports.sep = '/'; +exports.delimiter = ':'; -var pp = _state.Parser.prototype; +exports.dirname = function(path) { + var result = splitPath(path), + root = result[0], + dir = result[1]; -// ## Parser utilities + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } -// Test whether a statement node is the string literal `"use strict"`. + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } -pp.isUseStrict = function (stmt) { - return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.value === "use strict"; + return root + dir; }; -// 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; +exports.basename = function(path, ext) { + var f = splitPath(path)[2]; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); } + return f; }; -// Tests whether parsed token is a contextual keyword. -pp.isContextual = function (name) { - return this.type === _tokentype.types.name && this.value === name; +exports.extname = function(path) { + return splitPath(path)[3]; }; -// Consumes contextual keyword if possible. +function filter (xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} -pp.eatContextual = function (name) { - return this.value === name && this.eat(_tokentype.types.name); -}; +// String.prototype.substr - negative index don't work in IE8 +var substr = 'ab'.substr(-1) === 'b' + ? function (str, start, len) { return str.substr(start, len) } + : function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + } +; -// Asserts that following token is given contextual keyword. +}).call(this,require('_process')) +},{"_process":12}],12:[function(require,module,exports){ +// shim for using process in browser -pp.expectContextual = function (name) { - if (!this.eatContextual(name)) this.unexpected(); +var process = module.exports = {}; +var queue = []; +var draining = false; + +function drainQueue() { + if (draining) { + return; + } + draining = true; + var currentQueue; + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + var i = -1; + while (++i < len) { + currentQueue[i](); + } + len = queue.length; + } + draining = false; +} +process.nextTick = function (fun) { + queue.push(fun); + if (!draining) { + setTimeout(drainQueue, 0); + } }; -// Test whether a semicolon can be inserted at the current position. +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; -pp.canInsertSemicolon = function () { - return this.type === _tokentype.types.eof || this.type === _tokentype.types.braceR || _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); +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'); }; -pp.insertSemicolon = function () { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); - return true; - } +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); }; +process.umask = function() { return 0; }; -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. +},{}],13:[function(require,module,exports){ +module.exports = require("./lib/_stream_duplex.js") -pp.semicolon = function () { - if (!this.eat(_tokentype.types.semi) && !this.insertSemicolon()) this.unexpected(); -}; +},{"./lib/_stream_duplex.js":14}],14:[function(require,module,exports){ +(function (process){ +// 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. -pp.afterTrailingComma = function (tokType) { - if (this.type == tokType) { - if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); - this.next(); - return true; - } -}; +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. +module.exports = Duplex; -pp.expect = function (type) { - this.eat(type) || this.unexpected(); -}; +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +} +/**/ -// Raise an unexpected token error. -pp.unexpected = function (pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; -},{"./../../babel/tools/protect.js":52,"./state":12,"./tokentype":16,"./whitespace":18}],12:[function(require,module,exports){ -"use strict"; +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); +util.inherits(Duplex, Readable); -exports.__esModule = true; -exports.Parser = Parser; +forEach(objectKeys(Writable.prototype), function(method) { + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; +}); -var _identifier = require("./identifier"); +function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); -var _tokentype = require("./tokentype"); + Readable.call(this, options); + Writable.call(this, options); -var _whitespace = require("./whitespace"); + if (options && options.readable === false) + this.readable = false; -_babelToolsProtectJs3["default"](module); + if (options && options.writable === false) + this.writable = false; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; -function Parser(options, input, startPos) { - this.options = options; - this.sourceFile = this.options.sourceFile || null; - this.isKeyword = _identifier.keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; - this.isReservedWord = _identifier.reservedWords[this.options.ecmaVersion]; - this.input = input; - this.loadPlugins(this.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; - } + this.once('end', onend); +} - // 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 = null; +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) + return; - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(this.end.bind(this)); +} - // 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; +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} - // Figure out if it's a module code. - this.inModule = this.options.sourceType === "module"; - this.strict = this.options.strictMode === false ? false : this.inModule; +}).call(this,require('_process')) +},{"./_stream_readable":16,"./_stream_writable":18,"_process":12,"core-util-is":19,"inherits":9}],15:[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. - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. - // Flags to track whether we are in a function, a generator. - this.inFunction = this.inGenerator = false; - // Labels in scope. - this.labels = []; +module.exports = PassThrough; - this.decorators = []; +var Transform = require('./_stream_transform'); - // If enabled, skip leading hashbang line. - if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); -} +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ -Parser.prototype.extend = function (name, f) { - this[name] = f(this[name]); -}; +util.inherits(PassThrough, Transform); -// Registered plugins +function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); -var plugins = {}; + Transform.call(this, options); +} -exports.plugins = plugins; -Parser.prototype.loadPlugins = function (plugins) { - for (var _name in plugins) { - var plugin = exports.plugins[_name]; - if (!plugin) throw new Error("Plugin '" + _name + "' not found"); - plugin(this, plugins[_name]); - } +PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); }; -},{"./../../babel/tools/protect.js":52,"./identifier":4,"./tokentype":16,"./whitespace":18}],13:[function(require,module,exports){ -"use strict"; -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); +},{"./_stream_transform":17,"core-util-is":19,"inherits":9}],16:[function(require,module,exports){ +(function (process){ +// 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 _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); +module.exports = Readable; -var _tokentype = require("./tokentype"); +/**/ +var isArray = require('isarray'); +/**/ -var _state = require("./state"); -var _whitespace = require("./whitespace"); +/**/ +var Buffer = require('buffer').Buffer; +/**/ -_babelToolsProtectJs3["default"](module); +Readable.ReadableState = ReadableState; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +var EE = require('events').EventEmitter; -var pp = _state.Parser.prototype; +/**/ +if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { + return emitter.listeners(type).length; +}; +/**/ -// ### Statement parsing +var Stream = require('stream'); -// 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. +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ -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 && 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 StringDecoder; -var loopLabel = { kind: "loop" }, - switchLabel = { kind: "switch" }; -// 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. +/**/ +var debug = require('util'); +if (debug && debug.debuglog) { + debug = debug.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ -pp.parseStatement = function (declaration, topLevel) { - if (this.type === _tokentype.types.at) { - this.parseDecorators(true); - } - var starttype = this.type, - node = this.startNode(); +util.inherits(Readable, Stream); - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. +function ReadableState(options, stream) { + var Duplex = require('./_stream_duplex'); - 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); + options = options || {}; - case _tokentype.types._class: - if (!declaration) this.unexpected(); - this.takeDecorators(node); - return this.parseClass(node, true); + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var defaultHwm = options.objectMode ? 16 : 16 * 1024; + this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; - 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._let:case _tokentype.types._const: - if (!declaration) this.unexpected(); // NOTE: falls through to _var - case _tokentype.types._var: - return this.parseVarStatement(node, starttype); - 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); + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; - case _tokentype.types.name: - if (this.options.features["es7.asyncFunctions"] && this.value === "async") { - var lookahead = this.lookahead(); - if (lookahead.type === _tokentype.types._function && !this.canInsertSemicolon.call(lookahead)) { - this.next(); - this.expect(_tokentype.types._function); - return this.parseFunction(node, true, false, true); - } - } + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; - // 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); - } -}; + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; -pp.takeDecorators = function (node) { - if (this.decorators.length) { - node.decorators = this.decorators; - this.decorators = []; - } -}; + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; -pp.parseDecorators = function (allowExport) { - while (this.type === _tokentype.types.at) { - this.decorators.push(this.parseDecorator()); - } - if (allowExport && this.type === _tokentype.types._export) { - return; - } + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; - if (this.type !== _tokentype.types._class) { - this.raise(this.start, "Leading decorators must be attached to a class declaration"); - } -}; + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; -pp.parseDecorator = function (allowExport) { - if (!this.options.features["es7.decorators"]) { - this.unexpected(); - } - var node = this.startNode(); - this.next(); - node.expression = this.parseMaybeAssign(); - return this.finishNode(node, "Decorator"); -}; + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; -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(); - } + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; - // 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"); -}; + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; -pp.parseDebuggerStatement = function (node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); -}; + // if true, a maybeReadMore has been scheduled + this.readingMore = false; -pp.parseDoStatement = function (node) { - var start = this.markPosition(); - 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"); -}; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} -// 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. +function Readable(options) { + var Duplex = require('./_stream_duplex'); -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); - if (this.type === _tokentype.types._var || this.type === _tokentype.types._let || this.type === _tokentype.types._const) { - var _init = this.startNode(), - varKind = this.type; - this.next(); - this.parseVar(_init, true, varKind); - this.finishNode(_init, "VariableDeclaration"); - if ((this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== _tokentype.types._var && _init.declarations[0].init)) return this.parseForIn(node, _init); - return this.parseFor(node, _init); - } - var refShorthandDefaultPos = { start: 0 }; - var init = this.parseExpression(true, refShorthandDefaultPos); - if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { - this.toAssignable(init); - this.checkLVal(init); - return this.parseForIn(node, init); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - return this.parseFor(node, init); -}; + if (!(this instanceof Readable)) + return new Readable(options); -pp.parseFunctionStatement = function (node) { - this.next(); - return this.parseFunction(node, true); -}; + this._readableState = new ReadableState(options, this); -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"); -}; + // legacy + this.readable = true; -pp.parseReturnStatement = function (node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function"); - this.next(); + Stream.call(this); +} - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; - if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.argument = null;else { - node.argument = this.parseExpression();this.semicolon(); + if (util.isString(chunk) && !state.objectMode) { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = new Buffer(chunk, encoding); + encoding = ''; + } } - return this.finishNode(node, "ReturnStatement"); + + return readableAddChunk(this, state, chunk, encoding, false); }; -pp.parseSwitchStatement = function (node) { - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(_tokentype.types.braceL); - this.labels.push(switchLabel); +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function(chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (util.isNullOrUndefined(chunk)) { + state.reading = false; + if (!state.ended) + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var e = new Error('stream.unshift() after end event'); + stream.emit('error', e); + } else { + if (state.decoder && !addToFront && !encoding) + chunk = state.decoder.write(chunk); - for (var cur, sawDefault; 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(); + if (!addToFront) + state.reading = false; + + // if we want the data now, just emit it. + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); } else { - if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses"); - sawDefault = true; - cur.test = null; + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) + state.buffer.unshift(chunk); + else + state.buffer.push(chunk); + + if (state.needReadable) + emitReadable(stream); } - this.expect(_tokentype.types.colon); - } else { - if (!cur) this.unexpected(); - cur.consequent.push(this.parseStatement(true)); + + maybeReadMore(stream, state); } + } else if (!addToFront) { + state.reading = false; } - 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"); -}; + return needMoreData(state); +} -// 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.guard = null; - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.guardedHandlers = empty; - 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"); -}; +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && + (state.needReadable || + state.length < state.highWaterMark || + state.length === 0); +} -pp.parseVarStatement = function (node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); +// backwards compatibility. +Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; }; -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"); -}; +// Don't raise the hwm > 128MB +var MAX_HWM = 0x800000; +function roundUpToNextPowerOf2(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n++; + } + return n; +} -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"); -}; +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) + return 0; -pp.parseEmptyStatement = function (node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); -}; + if (state.objectMode) + return n === 0 ? 0 : 1; -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; + if (isNaN(n) || util.isNull(n)) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) + return state.buffer[0].length; + else + return state.length; } - 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"); -}; + if (n <= 0) + return 0; -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) + state.highWaterMark = roundUpToNextPowerOf2(n); -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; + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else + return state.length; } - 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. + return n; +} -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"); -}; +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function(n) { + debug('read', n); + var state = this._readableState; + var nOrig = n; -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. + if (!util.isNumber(n) || n > 0) + state.emittedReadable = false; -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); -}; + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && + state.needReadable && + (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) + endReadable(this); + else + emitReadable(this); + return null; + } -// Parse a list of variable declarations. + n = howMuchToRead(n, state); -pp.parseVar = function (node, isFor, kind) { - node.declarations = []; - node.kind = kind.keyword; - for (;;) { - var decl = this.startNode(); - this.parseVarHead(decl); - if (this.eat(_tokentype.types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === _tokentype.types._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; + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; } - return node; -}; - -pp.parseVarHead = function (decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true); -}; -// Parse a function declaration or literal (depending on the -// `isStatement` parameter). + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. -pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync) { - this.initFunction(node, isAsync); - if (this.options.ecmaVersion >= 6) node.generator = this.eat(_tokentype.types.star); - if (isStatement || this.type === _tokentype.types.name) node.id = this.parseIdent(); - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody); - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); -}; + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); -pp.parseFunctionParams = function (node) { - this.expect(_tokentype.types.parenL); - node.params = this.parseBindingList(_tokentype.types.parenR, false, this.options.features["es7.trailingFunctionCommas"]); -}; - -// 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); - var decorators = []; - while (!this.eat(_tokentype.types.braceR)) { - if (this.eat(_tokentype.types.semi)) continue; - if (this.type === _tokentype.types.at) { - decorators.push(this.parseDecorator()); - continue; - } - var method = this.startNode(); - if (decorators.length) { - method.decorators = decorators; - decorators = []; - } - var isMaybeStatic = this.type === _tokentype.types.name && this.value === "static"; - var isGenerator = this.eat(_tokentype.types.star), - isAsync = false; - 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); - } - if (!isGenerator && method.key.type === "Identifier" && !method.computed && this.isClassProperty()) { - classBody.body.push(this.parseClassProperty(method)); - continue; - } - if (this.options.features["es7.asyncFunctions"] && this.type !== _tokentype.types.parenL && !method.computed && method.key.type === "Identifier" && method.key.name === "async") { - isAsync = true; - this.parsePropertyName(method); - } - var isGetSet = false; - method.kind = "method"; - if (!method.computed) { - var key = method.key; - - if (!isAsync && !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"); - if (isAsync) this.raise(key.start, "Constructor can't be an async function"); - method.kind = "constructor"; - hadConstructor = true; - } - } - if (method.kind === "constructor" && method.decorators) { - this.raise(method.start, "You can't attach decorators to a class constructor"); - } - this.parseClassMethod(classBody, method, isGenerator, isAsync); - 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.raise(start, "getter should have no params");else this.raise(start, "setter should have exactly one param"); - } - } - } - if (decorators.length) { - this.raise(this.start, "You have trailing decorators with no method"); + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); } - node.body = this.finishNode(classBody, "ClassBody"); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); -}; -pp.isClassProperty = function () { - return this.type === _tokentype.types.eq || (this.type === _tokentype.types.semi || this.canInsertSemicolon()); -}; + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } -pp.parseClassProperty = function (node) { - if (this.type === _tokentype.types.eq) { - if (!this.options.features["es7.classProperties"]) this.unexpected(); - this.next(); - node.value = this.parseMaybeAssign(); - } else { - node.value = null; + if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) + state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; } - this.semicolon(); - return this.finishNode(node, "ClassProperty"); -}; -pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) { - method.value = this.parseMethod(isGenerator, isAsync); - classBody.body.push(this.finishNode(method, "MethodDefinition")); -}; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (doRead && !state.reading) + n = howMuchToRead(nOrig, state); -pp.parseClassId = function (node, isStatement) { - node.id = this.type === _tokentype.types.name ? this.parseIdent() : isStatement ? this.unexpected() : null; -}; + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; -pp.parseClassSuper = function (node) { - node.superClass = this.eat(_tokentype.types._extends) ? this.parseExprSubscripts() : null; -}; + if (util.isNull(ret)) { + state.needReadable = true; + n = 0; + } -// Parses module export declaration. + state.length -= n; -pp.parseExport = function (node) { - this.next(); - // export * from '...' - if (this.type === _tokentype.types.star) { - var specifier = this.startNode(); - this.next(); - if (this.options.features["es7.exportExtensions"] && this.eatContextual("as")) { - specifier.exported = this.parseIdent(); - node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; - this.parseExportSpecifiersMaybe(node); - this.parseExportFrom(node); - } else { - this.parseExportFrom(node); - return this.finishNode(node, "ExportAllDeclaration"); - } - } else if (this.options.features["es7.exportExtensions"] && this.isExportDefaultSpecifier()) { - var specifier = this.startNode(); - specifier.exported = this.parseIdent(true); - node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - if (this.type === _tokentype.types.comma && this.lookahead().type === _tokentype.types.star) { - this.expect(_tokentype.types.comma); - var _specifier = this.startNode(); - this.expect(_tokentype.types.star); - this.expectContextual("as"); - _specifier.exported = this.parseIdent(); - node.specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier")); - } else { - this.parseExportSpecifiersMaybe(node); - } - this.parseExportFrom(node); - } else if (this.eat(_tokentype.types._default)) { - // export default ... - var expr = this.parseMaybeAssign(); - var needsSemi = true; - if (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(); - this.checkExport(node); - return this.finishNode(node, "ExportDefaultDeclaration"); - } else if (this.type.keyword || this.shouldParseExportDeclaration()) { - 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 { - node.source = null; - } - this.semicolon(); - } - this.checkExport(node); - return this.finishNode(node, "ExportNamedDeclaration"); -}; + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) + state.needReadable = true; -pp.isExportDefaultSpecifier = function () { - if (this.type === _tokentype.types.name) { - return this.value !== "type" && this.value !== "async"; - } + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended && state.length === 0) + endReadable(this); - if (this.type !== _tokentype.types._default) { - return false; - } + if (!util.isNull(ret)) + this.emit('data', ret); - var lookahead = this.lookahead(); - return lookahead.type === _tokentype.types.comma || lookahead.type === _tokentype.types.name && lookahead.value === "from"; + return ret; }; -pp.parseExportSpecifiersMaybe = function (node) { - if (this.eat(_tokentype.types.comma)) { - node.specifiers = node.specifiers.concat(this.parseExportSpecifiers()); +function chunkInvalid(state, chunk) { + var er = null; + if (!util.isBuffer(chunk) && + !util.isString(chunk) && + !util.isNullOrUndefined(chunk) && + !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); } -}; - -pp.parseExportFrom = function (node) { - this.expectContextual("from"); - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - this.semicolon(); - this.checkExport(node); -}; + return er; +} -pp.shouldParseExportDeclaration = function () { - return this.options.features["es7.asyncFunctions"] && this.isContextual("async"); -}; -pp.checkExport = function (node) { - if (this.decorators.length) { - var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); - if (!node.declaration || !isClass) { - this.raise(node.start, "You can only use decorators on an export when exporting a class"); +function onEofChunk(stream, state) { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; } - this.takeDecorators(node.declaration); } -}; - -// Parses a comma-separated list of module exports. + state.ended = true; -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; + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} - 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")); +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) + process.nextTick(function() { + emitReadable_(stream); + }); + else + emitReadable_(stream); } - 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(node); - this.expectContextual("from"); - node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); -}; +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} -// Parses a comma-separated list of module imports. -pp.parseImportSpecifiers = function (node) { - var first = true; - if (this.type === _tokentype.types.name) { - // import defaultObj, { x, y as z } from '...' - var start = this.markPosition(); - node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(), start)); - if (!this.eat(_tokentype.types.comma)) return; - } - if (this.type === _tokentype.types.star) { - var specifier = this.startNode(); - this.next(); - this.expectContextual("as"); - specifier.local = this.parseIdent(); - this.checkLVal(specifier.local, true); - node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier")); - return; +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(function() { + maybeReadMore_(stream, state); + }); } - 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 specifier = this.startNode(); - specifier.imported = this.parseIdent(true); - specifier.local = this.eatContextual("as") ? this.parseIdent() : specifier.imported; - this.checkLVal(specifier.local, true); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && + state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + else + len = state.length; } -}; + state.readingMore = false; +} -pp.parseImportSpecifierDefault = function (id, start) { - var node = this.startNodeAt(start); - node.local = id; - this.checkLVal(node.local, true); - return this.finishNode(node, "ImportDefaultSpecifier"); +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function(n) { + this.emit('error', new Error('not implemented')); }; -},{"./../../babel/tools/protect.js":52,"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,module,exports){ -"use strict"; - -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); - -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); - -exports.__esModule = true; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design -var _state = require("./state"); +Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; -var _tokentype = require("./tokentype"); + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); -var _whitespace = require("./whitespace"); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && + dest !== process.stdout && + dest !== process.stderr; -_babelToolsProtectJs3["default"](module); + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) + process.nextTick(endFn); + else + src.once('end', endFn); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + debug('onunpipe'); + if (readable === src) { + cleanup(); + } + } -var TokContext = function TokContext(token, isExpr, preserveSpace, override) { - _classCallCheck(this, TokContext); + function onend() { + debug('onend'); + dest.end(); + } - this.token = token; - this.isExpr = isExpr; - this.preserveSpace = preserveSpace; - this.override = override; -}; + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); -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) -}; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + src.removeListener('data', ondata); -exports.types = types; -var pp = _state.Parser.prototype; + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && + (!dest._writableState || dest._writableState.needDrain)) + ondrain(); + } -pp.initialContext = function () { - return [types.b_stat]; -}; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + var ret = dest.write(chunk); + if (false === ret) { + debug('false write response, pause', + src._readableState.awaitDrain); + src._readableState.awaitDrain++; + src.pause(); + } + } -pp.braceIsBlock = function (prevType) { - var parent = undefined; - if (prevType === _tokentype.types.colon && (parent = this.curContext()).token == "{") 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) return true; - if (prevType == _tokentype.types.braceL) return this.curContext() === types.b_stat; - return !this.exprAllowed; -}; + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EE.listenerCount(dest, 'error') === 0) + dest.emit('error', er); + } + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. + if (!dest._events || !dest._events.error) + dest.on('error', onerror); + else if (isArray(dest._events.error)) + dest._events.error.unshift(onerror); + else + dest._events.error = [onerror, dest._events.error]; -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; + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); } - 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; + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); } -}; - -_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; -}; + dest.once('finish', onfinish); -_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; -}; + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } -_tokentype.types.incDec.updateContext = function () {}; + // tell the dest that it's being piped to + dest.emit('pipe', src); -_tokentype.types._function.updateContext = function () { - if (this.curContext() !== types.b_stat) this.context.push(types.f_expr); - this.exprAllowed = false; -}; + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } -_tokentype.types.backQuote.updateContext = function () { - if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); - this.exprAllowed = false; + return dest; }; -// tokExprAllowed stays unchanged -},{"./../../babel/tools/protect.js":52,"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,module,exports){ -"use strict"; - -var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js"); +function pipeOnDrain(src) { + return function() { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) + state.awaitDrain--; + if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} -var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2); -exports.__esModule = true; +Readable.prototype.unpipe = function(dest) { + var state = this._readableState; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) + return this; -var _identifier = require("./identifier"); + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) + return this; -var _tokentype = require("./tokentype"); + if (!dest) + dest = state.pipes; -var _state = require("./state"); + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) + dest.emit('unpipe', this); + return this; + } -var _location = require("./location"); + // slow case. multiple pipe destinations. -var _whitespace = require("./whitespace"); + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; -_babelToolsProtectJs3["default"](module); + for (var i = 0; i < len; i++) + dests[i].emit('unpipe', this); + return this; + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + // try to find the right one. + var i = indexOf(state.pipes, dest); + if (i === -1) + return this; -// 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. + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; -var Token = function Token(p) { - _classCallCheck(this, Token); + dest.emit('unpipe', this); - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) this.loc = new _location.SourceLocation(p, p.startLoc, p.endLoc); - if (p.options.ranges) this.range = [p.start, p.end]; + return this; }; -exports.Token = Token; - -// ## Tokenizer - -var pp = _state.Parser.prototype; - -// Are we running under Rhino? -var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]"; +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); -// Move to the next token + // If listening to data, and it has not explicitly been paused, + // then call resume to start the flow of data on the next tick. + if (ev === 'data' && false !== this._readableState.flowing) { + this.resume(); + } -pp.next = function () { - if (this.options.onToken && !this.isLookahead) this.options.onToken(new Token(this)); + if (ev === 'readable' && this.readable) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + var self = this; + process.nextTick(function() { + debug('readable nexttick read 0'); + self.read(0); + }); + } else if (state.length) { + emitReadable(this, state); + } + } + } - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); + return res; }; +Readable.prototype.addListener = Readable.prototype.on; -pp.getToken = function () { - this.next(); - return new Token(this); +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + if (!state.reading) { + debug('resume read 0'); + this.read(0); + } + resume(this, state); + } + return this; }; -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { - var self = this; - return { next: function next() { - var token = self.getToken(); - return { - done: token.type === _tokentype.types.eof, - value: token - }; - } }; -}; +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(function() { + resume_(stream, state); + }); + } +} -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). +function resume_(stream, state) { + state.resumeScheduled = false; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) + stream.read(0); +} -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; - } +Readable.prototype.pause = function() { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); } - this.nextToken(); + return this; }; -pp.curContext = function () { - return this.context[this.context.length - 1]; -}; +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + if (state.flowing) { + do { + var chunk = stream.read(); + } while (null !== chunk && state.flowing); + } +} -// Read a single token, updating the parser object's token-related -// properties. +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function(stream) { + var state = this._readableState; + var paused = false; -pp.nextToken = function () { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); + var self = this; + stream.on('end', function() { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + self.push(chunk); + } - this.start = this.pos; - if (this.options.locations) this.startLoc = this.curPosition(); - if (this.pos >= this.input.length) return this.finishToken(_tokentype.types.eof); + self.push(null); + }); - if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos()); -}; + stream.on('data', function(chunk) { + debug('wrapped data'); + if (state.decoder) + chunk = state.decoder.write(chunk); + if (!chunk || !state.objectMode && !chunk.length) + return; -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(); + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); - return this.getTokenFromCode(code); -}; + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (util.isFunction(stream[i]) && util.isUndefined(this[i])) { + this[i] = function(method) { return function() { + return stream[method].apply(stream, arguments); + }}(i); + } + } -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; -}; + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + forEach(events, function(ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); -pp.skipBlockComment = function () { - var startLoc = this.options.onComment && this.options.locations && 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.options.locations && this.curPosition()); -}; - -pp.skipLineComment = function (startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.options.locations && 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.options.locations && this.curPosition()); -}; - -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. - -pp.skipSpace = function () { - while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - if (ch === 32) { - // ' ' - ++this.pos; - } else if (ch === 13) { - ++this.pos; - var next = this.input.charCodeAt(this.pos); - if (next === 10) { - ++this.pos; - } - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - } else if (ch === 10 || ch === 8232 || ch === 8233) { - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - } else if (ch > 8 && ch < 14) { - ++this.pos; - } else if (ch === 47) { - // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 42) { - // '*' - this.skipBlockComment(); - } else if (next === 47) { - // '/' - this.skipLineComment(2); - } else break; - } else if (ch === 160) { - // '\xa0' - ++this.pos; - } else if (ch >= 5760 && _whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break; + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function(n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); } - } + }; + + return self; }; -// 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); -}; +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; -// ### Token reading + // nothing in the list, definitely empty. + if (list.length === 0) + return null; -// 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); + if (length === 0) + ret = null; + else if (objectMode) + ret = list.shift(); + else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) + ret = list.join(''); + else + ret = Buffer.concat(list, length); + list.length = 0; } else { - ++this.pos; - return this.finishToken(_tokentype.types.dot); - } -}; + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) + ret = ''; + else + ret = new Buffer(n); -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); -}; + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var buf = list[0]; + var cpy = Math.min(n - c, buf.length); -pp.readToken_mult_modulo = function (code) { - // '%*' - var type = code === 42 ? _tokentype.types.star : _tokentype.types.modulo; - var width = 1; - var next = this.input.charCodeAt(this.pos + 1); + if (stringMode) + ret += buf.slice(0, cpy); + else + buf.copy(ret, c, 0, cpy); - if (next === 42) { - // '*' - width++; - next = this.input.charCodeAt(this.pos + 2); - type = _tokentype.types.exponent; - } + if (cpy < buf.length) + list[0] = buf.slice(cpy); + else + list.shift(); - if (next === 61) { - width++; - type = _tokentype.types.assign; + c += cpy; + } + } } - return this.finishOp(type, width); -}; + return ret; +} -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); -}; +function endReadable(stream) { + var state = stream._readableState; -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); -}; + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) + throw new Error('endReadable called on non-empty stream'); -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 (!state.endEmitted) { + state.ended = true; + process.nextTick(function() { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } + }); } - 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(); - // `` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken(); } + return this.finishOp(_types.types.incDec, 2); + } + + if (next === 61) { + return this.finishOp(_types.types.assign, 2); } else { - // strange IE quirks mode bug -> use typeof instead of isFunction - result = new (typeof this == 'function' ? this : Array)(length = $.toLength(O.length)); - for(; length > index; index++){ - result[index] = mapping ? f(O[index], index) : O[index]; + return this.finishOp(_types.types.plusMin, 1); + } + }; + + Tokenizer.prototype.readToken_lt_gt = function readToken_lt_gt(code) { + // '<>' + var next = this.input.charCodeAt(this.state.pos + 1); + var size = 1; + + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.state.pos + size) === 61) return this.finishOp(_types.types.assign, size + 1); + return this.finishOp(_types.types.bitShift, size); + } + + if (next === 33 && code === 60 && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { + if (this.inModule) this.unexpected(); + // ` regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) -function leftpad (str, len, ch) { - str = String(str); + this.debug(this.pattern, set) - var i = -1; + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) - ch || (ch = ' '); - len = len - str.length; + this.debug(this.pattern, set) + this.set = set +} - while (++i < len) { - str = ch + str; +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ } - return str; + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate } -},{}],361:[function(require,module,exports){ -/** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. - * - * @static - * @memberOf _ - * @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 = -1, - result = []; +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} - while (++index < length) { - var value = array[index]; - if (value) { - result[++resIndex] = value; +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} } } - return result; -} -module.exports = compact; + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern -},{}],362:[function(require,module,exports){ -var baseFlatten = require('../internal/baseFlatten'), - isIterateeCall = require('../internal/isIterateeCall'); + if (typeof pattern === 'undefined') { + throw new Error('undefined pattern') + } -/** - * Flattens a nested array. If `isDeep` is `true` the array is recursively - * flattened, otherwise it is only flattened a single level. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, 3, [4]]]); - * // => [1, 2, 3, [4]] - * - * // using `isDeep` - * _.flatten([1, [2, 3, [4]]], true); - * // => [1, 2, 3, 4] - */ -function flatten(array, isDeep, guard) { - var length = array ? array.length : 0; - if (guard && isIterateeCall(array, isDeep, guard)) { - isDeep = false; + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] } - return length ? baseFlatten(array, isDeep) : []; + + return expand(pattern) } -module.exports = flatten; +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + var options = this.options -},{"../internal/baseFlatten":390,"../internal/isIterateeCall":439}],363:[function(require,module,exports){ -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @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; -} + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' -module.exports = last; + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this -},{}],364:[function(require,module,exports){ -var baseIndexOf = require('../internal/baseIndexOf'); + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } -/** Used for native method references. */ -var arrayProto = Array.prototype; + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) -/** Native method references. */ -var splice = arrayProto.splice; + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } -/** - * Removes all provided values from `array` using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.without`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3, 1, 2, 3]; - * - * _.pull(array, 2, 3); - * console.log(array); - * // => [1, 1] - */ -function pull() { - var args = arguments, - array = args[0]; + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false - if (!(array && array.length)) { - return array; - } - var index = 0, - indexOf = baseIndexOf, - length = args.length; + case '\\': + clearStateChar() + escaping = true + continue - while (++index < length) { - var fromIndex = 0, - value = args[index]; + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { - splice.call(array, fromIndex, 1); - } - } - return array; -} + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } -module.exports = pull; + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue -},{"../internal/baseIndexOf":397}],365:[function(require,module,exports){ -var baseCallback = require('../internal/baseCallback'), - baseUniq = require('../internal/baseUniq'), - isIterateeCall = require('../internal/isIterateeCall'), - sortedUniq = require('../internal/sortedUniq'); + case '(': + if (inClass) { + re += '(' + continue + } -/** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons, in which only the first occurence of each element - * is kept. Providing `true` for `isSorted` performs a faster search algorithm - * for sorted arrays. If an iteratee function is provided it is invoked for - * each element in the array to generate the criterion by which uniqueness - * is computed. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index, array). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias unique - * @category Array - * @param {Array} array The array to inspect. - * @param {boolean} [isSorted] Specify the array is sorted. - * @param {Function|Object|string} [iteratee] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new duplicate-value-free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - * - * // using `isSorted` - * _.uniq([1, 1, 2], true); - * // => [1, 2] - * - * // using an iteratee function - * _.uniq([1, 2.5, 1.5, 2], function(n) { - * return this.floor(n); - * }, Math); - * // => [1, 2.5] - * - * // using the `_.property` callback shorthand - * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ -function uniq(array, isSorted, iteratee, thisArg) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (isSorted != null && typeof isSorted != 'boolean') { - thisArg = iteratee; - iteratee = isIterateeCall(array, isSorted, thisArg) ? null : isSorted; - isSorted = false; - } - iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3); - return (isSorted) - ? sortedUniq(array, iteratee) - : baseUniq(array, iteratee); -} + if (!stateChar) { + re += '\\(' + continue + } -module.exports = uniq; + plType = stateChar + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue -},{"../internal/baseCallback":384,"../internal/baseUniq":414,"../internal/isIterateeCall":439,"../internal/sortedUniq":446}],366:[function(require,module,exports){ -module.exports = require('./includes'); + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } -},{"./includes":369}],367:[function(require,module,exports){ -module.exports = require('./forEach'); + clearStateChar() + hasMagic = true + re += ')' + var pl = patternListStack.pop() + plType = pl.type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case '!': + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length + break + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway + } + continue -},{"./forEach":368}],368:[function(require,module,exports){ -var arrayEach = require('../internal/arrayEach'), - baseEach = require('../internal/baseEach'), - createForEach = require('../internal/createForEach'); + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } -/** - * Iterates over elements of `collection` invoking `iteratee` for each element. - * The `iteratee` is bound to `thisArg` and 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 `_.forIn` or `_.forOwn` - * may be used for object iteration. - * - * @static - * @memberOf _ - * @alias each - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array|Object|string} Returns `collection`. - * @example - * - * _([1, 2]).forEach(function(n) { - * console.log(n); - * }).value(); - * // => logs each value from left to right and returns the array - * - * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { - * console.log(n, key); - * }); - * // => logs each value-key pair and returns the object (iteration order is not guaranteed) - */ -var forEach = createForEach(arrayEach, baseEach); + clearStateChar() + re += '|' + continue -module.exports = forEach; + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() -},{"../internal/arrayEach":377,"../internal/baseEach":388,"../internal/createForEach":425}],369:[function(require,module,exports){ -var baseIndexOf = require('../internal/baseIndexOf'), - getLength = require('../internal/getLength'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'), - isLength = require('../internal/isLength'), - isString = require('../lang/isString'), - values = require('../object/values'); + if (inClass) { + re += '\\' + c + continue + } -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; + inClass = true + classStart = i + reClassStart = re.length + re += c + continue -/** - * Checks if `value` is in `collection` using - * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it is used as the offset - * from the end of `collection`. - * - * @static - * @memberOf _ - * @alias contains, include - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {*} target The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {boolean} Returns `true` if a matching element 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, target, fromIndex, guard) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - collection = values(collection); - length = collection.length; - } - if (!length) { - return false; - } - if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { - fromIndex = 0; - } else { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); - } - return (typeof collection == 'string' || !isArray(collection) && isString(collection)) - ? (fromIndex < length && collection.indexOf(target, fromIndex) > -1) - : (baseIndexOf(collection, target, fromIndex) > -1); -} + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } -module.exports = includes; + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } -},{"../internal/baseIndexOf":397,"../internal/getLength":430,"../internal/isIterateeCall":439,"../internal/isLength":441,"../lang/isArray":452,"../lang/isString":461,"../object/values":472}],370:[function(require,module,exports){ -var arrayMap = require('../internal/arrayMap'), - baseCallback = require('../internal/baseCallback'), - baseMap = require('../internal/baseMap'), - isArray = require('../lang/isArray'); + // finish up the class. + hasMagic = true + inClass = false + re += c + continue -/** - * Creates an array of values by running each element in `collection` through - * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, - * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, - * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, - * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, - * `sum`, `uniq`, and `words` - * - * @static - * @memberOf _ - * @alias collect - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new mapped array. - * @example - * - * function timesThree(n) { - * return n * 3; - * } - * - * _.map([1, 2], timesThree); - * // => [3, 6] - * - * _.map({ 'a': 1, 'b': 2 }, timesThree); - * // => [3, 6] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // using the `_.property` callback shorthand - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee, thisArg) { - var func = isArray(collection) ? arrayMap : baseMap; - iteratee = baseCallback(iteratee, thisArg, 3); - return func(collection, iteratee); -} + default: + // swallow any state char that wasn't consumed + clearStateChar() -module.exports = map; + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } -},{"../internal/arrayMap":378,"../internal/baseCallback":384,"../internal/baseMap":402,"../lang/isArray":452}],371:[function(require,module,exports){ -var arrayReduceRight = require('../internal/arrayReduceRight'), - baseEachRight = require('../internal/baseEachRight'), - createReduce = require('../internal/createReduce'); + re += c -/** - * This method is like `_.reduce` except that it iterates over elements of - * `collection` from right to left. - * - * @static - * @memberOf _ - * @alias foldr - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {*} Returns the accumulated value. - * @example - * - * var array = [[0, 1], [2, 3], [4, 5]]; - * - * _.reduceRight(array, function(flattened, other) { - * return flattened.concat(other); - * }, []); - * // => [4, 5, 2, 3, 0, 1] - */ -var reduceRight = createReduce(arrayReduceRight, baseEachRight); + } // switch + } // for -module.exports = reduceRight; + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } -},{"../internal/arrayReduceRight":379,"../internal/baseEachRight":389,"../internal/createReduce":426}],372:[function(require,module,exports){ -var arraySome = require('../internal/arraySome'), - baseCallback = require('../internal/baseCallback'), - baseSome = require('../internal/baseSome'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'); + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } -/** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * The function returns as soon as it finds a passing value and does not iterate - * over the entire collection. The predicate is bound to `thisArg` and invoked - * with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias any - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @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 } - * ]; - * - * // using the `_.matches` callback shorthand - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.some(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.some(users, 'active'); - * // => true - */ -function some(collection, predicate, thisArg) { - var func = isArray(collection) ? arraySome : baseSome; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = null; - } - if (typeof predicate != 'function' || thisArg !== undefined) { - predicate = baseCallback(predicate, thisArg, 3); - } - return func(collection, predicate); -} + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) -module.exports = some; + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type -},{"../internal/arraySome":380,"../internal/baseCallback":384,"../internal/baseSome":411,"../internal/isIterateeCall":439,"../lang/isArray":452}],373:[function(require,module,exports){ -var baseCallback = require('../internal/baseCallback'), - baseMap = require('../internal/baseMap'), - baseSortBy = require('../internal/baseSortBy'), - compareAscending = require('../internal/compareAscending'), - isIterateeCall = require('../internal/isIterateeCall'); + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection through `iteratee`. This method performs - * a stable sort, that is, it preserves the original sort order of equal elements. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new sorted array. - * @example - * - * _.sortBy([1, 2, 3], function(n) { - * return Math.sin(n); - * }); - * // => [3, 1, 2] - * - * _.sortBy([1, 2, 3], function(n) { - * return this.sin(n); - * }, Math); - * // => [3, 1, 2] - * - * var users = [ - * { 'user': 'fred' }, - * { 'user': 'pebbles' }, - * { 'user': 'barney' } - * ]; - * - * // using the `_.property` callback shorthand - * _.pluck(_.sortBy(users, 'user'), 'user'); - * // => ['barney', 'fred', 'pebbles'] - */ -function sortBy(collection, iteratee, thisArg) { - if (collection == null) { - return []; + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' } - if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { - iteratee = null; + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true } - var index = -1; - iteratee = baseCallback(iteratee, thisArg, 3); - var result = baseMap(collection, function(value, key, collection) { - return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; - }); - return baseSortBy(result, compareAscending); -} + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] -module.exports = sortBy; + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) -},{"../internal/baseCallback":384,"../internal/baseMap":402,"../internal/baseSortBy":412,"../internal/compareAscending":420,"../internal/isIterateeCall":439}],374:[function(require,module,exports){ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; + nlLast += nlAfter -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter -/** - * 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://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). - * - * @static - * @memberOf _ - * @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 = _.restParam(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ -function restParam(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe } - start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - rest = Array(length); - while (++index < length) { - rest[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, rest); - case 1: return func.call(this, args[0], rest); - case 2: return func.call(this, args[0], args[1], rest); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = rest; - return func.apply(this, otherArgs); - }; -} + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } -module.exports = restParam; + if (addPatternStart) { + re = patternStart + re + } -},{}],375:[function(require,module,exports){ -(function (global){ -var cachePush = require('./cachePush'), - getNative = require('./getNative'); + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } -/** Native method references. */ -var Set = getNative(global, 'Set'); + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeCreate = getNative(Object, 'create'); + var flags = options.nocase ? 'i' : '' + var regExp = new RegExp('^' + re + '$', flags) -/** - * - * Creates a cache object to store unique values. - * - * @private - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var length = values ? values.length : 0; + regExp._glob = pattern + regExp._src = re - this.data = { 'hash': nativeCreate(null), 'set': new Set }; - while (length--) { - this.push(values[length]); - } + return regExp } -// Add functions to the `Set` cache. -SetCache.prototype.push = cachePush; +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} -module.exports = SetCache; +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./cachePush":419,"./getNative":432}],376:[function(require,module,exports){ -/** - * 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 arrayCopy(source, array) { - var index = -1, - length = source.length; + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; + if (!set.length) { + this.regexp = false + return this.regexp } - return array; -} - -module.exports = arrayCopy; + var options = this.options -},{}],377:[function(require,module,exports){ -/** - * A specialized version of `_.forEach` for arrays without support for callback - * shorthands and `this` binding. - * - * @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.length; + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') -module.exports = arrayEach; + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' -},{}],378:[function(require,module,exports){ -/** - * A specialized version of `_.map` for arrays without support for callback - * shorthands and `this` binding. - * - * @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.length, - result = Array(length); + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' - while (++index < length) { - result[index] = iteratee(array[index], index, array); + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false } - return result; + return this.regexp } -module.exports = arrayMap; - -},{}],379:[function(require,module,exports){ -/** - * A specialized version of `_.reduceRight` for arrays without support for - * callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initFromArray] Specify using the last element of `array` - * as the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduceRight(array, iteratee, accumulator, initFromArray) { - var length = array.length; - if (initFromArray && length) { - accumulator = array[--length]; - } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) } - return accumulator; + return list } -module.exports = arrayReduceRight; - -},{}],380:[function(require,module,exports){ -/** - * A specialized version of `_.some` for arrays without support for callback - * shorthands and `this` binding. - * - * @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.length; +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} + if (f === '/' && partial) return true -module.exports = arraySome; + var options = this.options -},{}],381:[function(require,module,exports){ -/** - * Used by `_.defaults` to customize its `_.assign` use. - * - * @private - * @param {*} objectValue The destination object property value. - * @param {*} sourceValue The source object property value. - * @returns {*} Returns the value to assign to the destination object. - */ -function assignDefaults(objectValue, sourceValue) { - return objectValue === undefined ? sourceValue : objectValue; -} + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } -module.exports = assignDefaults; + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) -},{}],382:[function(require,module,exports){ -var keys = require('../object/keys'); + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. -/** - * A specialized version of `_.assign` for customizing assigned values without - * support for argument juggling, multiple sources, and `this` binding `customizer` - * functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - */ -function assignWith(object, source, customizer) { - var index = -1, - props = keys(source), - length = props.length; + var set = this.set + this.debug(this.pattern, 'set', set) - while (++index < length) { - var key = props[index], - value = object[key], - result = customizer(value, source[key], key, object, source); + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } - if ((result === result ? (result !== value) : (value === value)) || - (value === undefined && !(key in object))) { - object[key] = result; + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate } } - return object; -} -module.exports = assignWith; + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} -},{"../object/keys":468}],383:[function(require,module,exports){ -var baseCopy = require('./baseCopy'), - keys = require('../object/keys'); +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options -/** - * The base implementation of `_.assign` without support for argument juggling, - * multiple sources, and `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return source == null - ? object - : baseCopy(source, keys(source), object); -} + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) -module.exports = baseAssign; + this.debug('matchOne', file.length, pattern.length) -},{"../object/keys":468,"./baseCopy":387}],384:[function(require,module,exports){ -var baseMatches = require('./baseMatches'), - baseMatchesProperty = require('./baseMatchesProperty'), - bindCallback = require('./bindCallback'), - identity = require('../utility/identity'), - property = require('../utility/property'); + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] -/** - * The base implementation of `_.callback` which supports specifying the - * number of arguments to provide to `func`. - * - * @private - * @param {*} [func=_.identity] The value to convert to a callback. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ -function baseCallback(func, thisArg, argCount) { - var type = typeof func; - if (type == 'function') { - return thisArg === undefined - ? func - : bindCallback(func, thisArg, argCount); - } - if (func == null) { - return identity; - } - if (type == 'object') { - return baseMatches(func); - } - return thisArg === undefined - ? property(func) - : baseMatchesProperty(func, thisArg); -} + this.debug(pattern, p, f) -module.exports = baseCallback; + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false -},{"../utility/identity":476,"../utility/property":477,"./baseMatches":403,"./baseMatchesProperty":404,"./bindCallback":416}],385:[function(require,module,exports){ -var arrayCopy = require('./arrayCopy'), - arrayEach = require('./arrayEach'), - baseAssign = require('./baseAssign'), - baseForOwn = require('./baseForOwn'), - initCloneArray = require('./initCloneArray'), - initCloneByTag = require('./initCloneByTag'), - initCloneObject = require('./initCloneObject'), - isArray = require('../lang/isArray'), - isObject = require('../lang/isObject'); + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } -var arrayBufferTag = '[object ArrayBuffer]', - 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]'; + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = -cloneableTags[dateTag] = cloneableTags[float32Tag] = -cloneableTags[float64Tag] = cloneableTags[int8Tag] = -cloneableTags[int16Tag] = cloneableTags[int32Tag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[stringTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[mapTag] = cloneableTags[setTag] = -cloneableTags[weakMapTag] = false; + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) -/** Used for native method references. */ -var objectProto = Object.prototype; + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } -/** - * The base implementation of `_.clone` without support for argument juggling - * and `this` binding `customizer` functions. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The object `value` belongs to. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates clones with source counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { - var result; - if (customizer) { - result = object ? customizer(value, key, object) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return arrayCopy(value, result); + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false } - } else { - var tag = objToString.call(value), - isFunc = tag == funcTag; - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return baseAssign(result, value); + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p } + this.debug('string match', p, f, hit) } else { - return cloneableTags[tag] - ? initCloneByTag(value, tag, isDeep) - : (object ? value : {}); + hit = f.match(p) + this.debug('pattern match', p, f, hit) } + + if (!hit) return false } - // Check for circular references and return corresponding clone. - stackA || (stackA = []); - stackB || (stackB = []); - var length = stackA.length; - while (length--) { - if (stackA[length] == value) { - return stackB[length]; - } + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd } - // Add the source value to the stack of traversed objects and associate it with its clone. - stackA.push(value); - stackB.push(result); - // Recursively populate clone (susceptible to call stack limits). - (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { - result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); - }); - return result; + // should be unreachable. + throw new Error('wtf?') } -module.exports = baseClone; +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} -},{"../lang/isArray":452,"../lang/isObject":458,"./arrayCopy":376,"./arrayEach":377,"./baseAssign":383,"./baseForOwn":393,"./initCloneArray":434,"./initCloneByTag":435,"./initCloneObject":436}],386:[function(require,module,exports){ -/** - * The base implementation of `compareAscending` which compares values and - * sorts them in ascending order without guaranteeing a stable sort. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function baseCompareAscending(value, other) { - if (value !== other) { - var valIsNull = value === null, - valIsUndef = value === undefined, - valIsReflexive = value === value; +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} + +},{"brace-expansion":469,"path":11}],469:[function(require,module,exports){ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } - var othIsNull = other === null, - othIsUndef = other === undefined, - othIsReflexive = other === other; + parts.push.apply(parts, p); - if ((value > other && !othIsNull) || !valIsReflexive || - (valIsNull && !othIsUndef && othIsReflexive) || - (valIsUndef && othIsReflexive)) { - return 1; - } - if ((value < other && !valIsNull) || !othIsReflexive || - (othIsNull && !valIsUndef && valIsReflexive) || - (othIsUndef && valIsReflexive)) { - return -1; - } - } - return 0; + return parts; } -module.exports = baseCompareAscending; +function expandTop(str) { + if (!str) + return []; -},{}],387:[function(require,module,exports){ -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property names to copy. - * @param {Object} [object={}] The object to copy properties to. - * @returns {Object} Returns `object`. - */ -function baseCopy(source, props, object) { - object || (object = {}); + return expand(escapeBraces(str), true).map(unescapeBraces); +} - var index = -1, - length = props.length; +function identity(e) { + return e; +} - while (++index < length) { - var key = props[index]; - object[key] = source[key]; - } - return object; +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); } -module.exports = baseCopy; +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} -},{}],388:[function(require,module,exports){ -var baseForOwn = require('./baseForOwn'), - createBaseEach = require('./createBaseEach'); +function expand(str, isTop) { + var expansions = []; -/** - * The base implementation of `_.forEach` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object|string} Returns `collection`. - */ -var baseEach = createBaseEach(baseForOwn); + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; -module.exports = baseEach; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = /^(.*,)+(.+)?$/.test(m.body); + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } -},{"./baseForOwn":393,"./createBaseEach":422}],389:[function(require,module,exports){ -var baseForOwnRight = require('./baseForOwnRight'), - createBaseEach = require('./createBaseEach'); + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } -/** - * The base implementation of `_.forEachRight` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object|string} Returns `collection`. - */ -var baseEachRight = createBaseEach(baseForOwnRight, true); + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. -module.exports = baseEachRight; + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; -},{"./baseForOwnRight":394,"./createBaseEach":422}],390:[function(require,module,exports){ -var isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isArrayLike = require('./isArrayLike'), - isObjectLike = require('./isObjectLike'); + var N; -/** - * The base implementation of `_.flatten` with added support for restricting - * flattening and specifying the start index. - * - * @private - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, isDeep, isStrict) { - var index = -1, - length = array.length, - resIndex = -1, - result = []; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); - while (++index < length) { - var value = array[index]; - if (isObjectLike(value) && isArrayLike(value) && - (isStrict || isArray(value) || isArguments(value))) { - if (isDeep) { - // Recursively flatten arrays (susceptible to call stack limits). - value = baseFlatten(value, isDeep, isStrict); - } - var valIndex = -1, - valLength = value.length; + N = []; - while (++valIndex < valLength) { - result[++resIndex] = value[valIndex]; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } } - } else if (!isStrict) { - result[++resIndex] = value; + N.push(c); } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); } - return result; -} -module.exports = baseFlatten; + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } -},{"../lang/isArguments":451,"../lang/isArray":452,"./isArrayLike":437,"./isObjectLike":442}],391:[function(require,module,exports){ -var createBaseFor = require('./createBaseFor'); + return expansions; +} -/** - * The base implementation of `baseForIn` and `baseForOwn` which iterates - * over `object` properties returned by `keysFunc` invoking `iteratee` for - * each property. Iteratee functions may exit iteration early by explicitly - * returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); -module.exports = baseFor; +},{"balanced-match":470,"concat-map":471}],470:[function(require,module,exports){ +module.exports = balanced; +function balanced(a, b, str) { + var bal = 0; + var m = {}; + var ended = false; -},{"./createBaseFor":423}],392:[function(require,module,exports){ -var baseFor = require('./baseFor'), - keysIn = require('../object/keysIn'); + for (var i = 0; i < str.length; i++) { + if (a == str.substr(i, a.length)) { + if (!('start' in m)) m.start = i; + bal++; + } + else if (b == str.substr(i, b.length) && 'start' in m) { + ended = true; + bal--; + if (!bal) { + m.end = i; + m.pre = str.substr(0, m.start); + m.body = (m.end - m.start > 1) + ? str.substring(m.start + a.length, m.end) + : ''; + m.post = str.slice(m.end + b.length); + return m; + } + } + } -/** - * The base implementation of `_.forIn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForIn(object, iteratee) { - return baseFor(object, iteratee, keysIn); + // if we opened more than we closed, find the one we closed + if (bal && ended) { + var start = m.start + a.length; + m = balanced(a, b, str.substr(start)); + if (m) { + m.start += start; + m.end += start; + m.pre = str.slice(0, start) + m.pre; + } + return m; + } } -module.exports = baseForIn; +},{}],471:[function(require,module,exports){ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; -},{"../object/keysIn":469,"./baseFor":391}],393:[function(require,module,exports){ -var baseFor = require('./baseFor'), - keys = require('../object/keys'); +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; -/** - * The base implementation of `_.forOwn` without support for callback - * shorthands and `this` binding. - * - * @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 baseFor(object, iteratee, keys); -} +},{}],472:[function(require,module,exports){ +'use strict'; +var fs = require('fs') -module.exports = baseForOwn; +module.exports = function (pth, cb) { + var fn = typeof fs.access === 'function' ? fs.access : fs.stat; -},{"../object/keys":468,"./baseFor":391}],394:[function(require,module,exports){ -var baseForRight = require('./baseForRight'), - keys = require('../object/keys'); + fn(pth, function (err) { + cb(null, !err); + }); +}; -/** - * The base implementation of `_.forOwnRight` without support for callback - * shorthands and `this` binding. - * - * @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 baseForRight(object, iteratee, keys); -} +module.exports.sync = function (pth) { + var fn = typeof fs.accessSync === 'function' ? fs.accessSync : fs.statSync; -module.exports = baseForOwnRight; + try { + fn(pth); + return true; + } catch (err) { + return false; + } +}; -},{"../object/keys":468,"./baseForRight":395}],395:[function(require,module,exports){ -var createBaseFor = require('./createBaseFor'); +},{"fs":1}],473:[function(require,module,exports){ +(function (process){ +'use strict'; -/** - * 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); +function posix(path) { + return path.charAt(0) === '/'; +}; -module.exports = baseForRight; +function win32(path) { + // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = !!device && device.charAt(1) !== ':'; -},{"./createBaseFor":423}],396:[function(require,module,exports){ -var toObject = require('./toObject'); + // UNC paths are always absolute + return !!result[2] || isUnc; +}; -/** - * The base implementation of `get` without support for string paths - * and default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path of the property to get. - * @param {string} [pathKey] The key representation of path. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path, pathKey) { - if (object == null) { - return; - } - if (pathKey !== undefined && pathKey in toObject(object)) { - path = [pathKey]; +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; + +}).call(this,require('_process')) +},{"_process":12}],474:[function(require,module,exports){ +"use strict"; + +var originalObject = Object; +var originalDefProp = Object.defineProperty; +var originalCreate = Object.create; + +function defProp(obj, name, value) { + if (originalDefProp) try { + originalDefProp.call(originalObject, obj, name, { value: value }); + } catch (definePropertyIsBrokenInIE8) { + obj[name] = value; + } else { + obj[name] = value; } - var index = 0, - length = path.length; +} - while (object != null && index < length) { - object = object[path[index++]]; +// For functions that will be invoked using .call or .apply, we need to +// define those methods on the function objects themselves, rather than +// inheriting them from Function.prototype, so that a malicious or clumsy +// third party cannot interfere with the functionality of this module by +// redefining Function.prototype.call or .apply. +function makeSafeToCall(fun) { + if (fun) { + defProp(fun, "call", fun.call); + defProp(fun, "apply", fun.apply); } - return (index && index == length) ? object : undefined; + return fun; } -module.exports = baseGet; +makeSafeToCall(originalDefProp); +makeSafeToCall(originalCreate); -},{"./toObject":447}],397:[function(require,module,exports){ -var indexOfNaN = require('./indexOfNaN'); +var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty); +var numToStr = makeSafeToCall(Number.prototype.toString); +var strSlice = makeSafeToCall(String.prototype.slice); -/** - * The base implementation of `_.indexOf` without support for binary searches. - * - * @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 cloner = function(){}; +function create(prototype) { + if (originalCreate) { + return originalCreate.call(originalObject, prototype); } - var index = fromIndex - 1, - length = array.length; + cloner.prototype = prototype || null; + return new cloner; +} - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; +var rand = Math.random; +var uniqueKeys = create(null); + +function makeUniqueKey() { + // Collisions are highly unlikely, but this module is in the business of + // making guarantees rather than safe bets. + do var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2)); + while (hasOwn.call(uniqueKeys, uniqueKey)); + return uniqueKeys[uniqueKey] = uniqueKey; } -module.exports = baseIndexOf; +function internString(str) { + var obj = {}; + obj[str] = true; + return Object.keys(obj)[0]; +} -},{"./indexOfNaN":433}],398:[function(require,module,exports){ -var baseIsEqualDeep = require('./baseIsEqualDeep'), - isObject = require('../lang/isObject'), - isObjectLike = require('./isObjectLike'); +// External users might find this function useful, but it is not necessary +// for the typical use of this module. +defProp(exports, "makeUniqueKey", makeUniqueKey); -/** - * The base implementation of `_.isEqual` without support for `this` binding - * `customizer` functions. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { - return value !== value && other !== other; +// Object.getOwnPropertyNames is the only way to enumerate non-enumerable +// properties, so if we wrap it to ignore our secret keys, there should be +// no way (except guessing) to access those properties. +var originalGetOPNs = Object.getOwnPropertyNames; +Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + for (var names = originalGetOPNs(object), + src = 0, + dst = 0, + len = names.length; + src < len; + ++src) { + if (!hasOwn.call(uniqueKeys, names[src])) { + if (src > dst) { + names[dst] = names[src]; + } + ++dst; + } } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); + names.length = dst; + return names; +}; + +function defaultCreatorFn(object) { + return create(null); } -module.exports = baseIsEqual; +function makeAccessor(secretCreatorFn) { + var brand = makeUniqueKey(); + var passkey = create(null); + + secretCreatorFn = secretCreatorFn || defaultCreatorFn; + + function register(object) { + var secret; // Created lazily. + + function vault(key, forget) { + // Only code that has access to the passkey can retrieve (or forget) + // the secret object. + if (key === passkey) { + return forget + ? secret = null + : secret || (secret = secretCreatorFn(object)); + } + } -},{"../lang/isObject":458,"./baseIsEqualDeep":399,"./isObjectLike":442}],399:[function(require,module,exports){ -var equalArrays = require('./equalArrays'), - equalByTag = require('./equalByTag'), - equalObjects = require('./equalObjects'), - isArray = require('../lang/isArray'), - isTypedArray = require('../lang/isTypedArray'); + defProp(object, brand, vault); + } -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; + function accessor(object) { + if (!hasOwn.call(object, brand)) + register(object); + return object[brand](passkey); + } -/** Used for native method references. */ -var objectProto = Object.prototype; + accessor.forget = function(object) { + if (hasOwn.call(object, brand)) + object[brand](passkey, true); + }; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + return accessor; +} -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; +defProp(exports, "makeAccessor", makeAccessor); +},{}],475:[function(require,module,exports){ /** - * 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. + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. * - * @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 comparing objects. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `value` objects. - * @param {Array} [stackB=[]] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. */ -function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = arrayTag, - othTag = arrayTag; - if (!objIsArr) { - objTag = objToString.call(object); - if (objTag == argsTag) { - objTag = objectTag; - } else if (objTag != objectTag) { - objIsArr = isTypedArray(object); - } - } - if (!othIsArr) { - othTag = objToString.call(other); - if (othTag == argsTag) { - othTag = objectTag; - } else if (othTag != objectTag) { - othIsArr = isTypedArray(other); - } - } - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; +var assert = require("assert"); +var types = require("recast").types; +var isArray = types.builtInTypes.array; +var b = types.builders; +var n = types.namedTypes; +var leap = require("./leap"); +var meta = require("./meta"); +var util = require("./util"); +var runtimeProperty = util.runtimeProperty; +var hasOwn = Object.prototype.hasOwnProperty; - if (isSameTag && !(objIsArr || objIsObj)) { - return equalByTag(object, other, objTag); - } - if (!isLoose) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); +function Emitter(contextId) { + assert.ok(this instanceof Emitter); + n.Identifier.assert(contextId); - if (objIsWrapped || othIsWrapped) { - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); - } - } - if (!isSameTag) { - return false; - } - // Assume cyclic values are equal. - // For more information on detecting circular references see https://es5.github.io/#JO. - stackA || (stackA = []); - stackB || (stackB = []); + // Used to generate unique temporary names. + this.nextTempId = 0; - var length = stackA.length; - while (length--) { - if (stackA[length] == object) { - return stackB[length] == other; - } - } - // Add `object` and `other` to the stack of traversed objects. - stackA.push(object); - stackB.push(other); + Object.defineProperties(this, { + // In order to make sure the context object does not collide with + // anything in the local scope, we might have to rename it, so we + // refer to it symbolically instead of just assuming that it will be + // called "context". + contextId: { value: contextId }, - var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); + // An append-only list of Statements that grows each time this.emit is + // called. + listing: { value: [] }, - stackA.pop(); - stackB.pop(); + // A sparse array whose keys correspond to locations in this.listing + // that have been marked as branch/jump targets. + marked: { value: [true] }, - return result; + // The last location will be marked when this.getDispatchLoop is + // called. + finalLoc: { value: loc() }, + + // A list of all leap.TryEntry statements emitted. + tryEntries: { value: [] } + }); + + // The .leapManager property needs to be defined by a separate + // defineProperties call so that .finalLoc will be visible to the + // leap.LeapManager constructor. + Object.defineProperties(this, { + // Each time we evaluate the body of a loop, we tell this.leapManager + // to enter a nested loop context that determines the meaning of break + // and continue statements therein. + leapManager: { value: new leap.LeapManager(this) } + }); } -module.exports = baseIsEqualDeep; +var Ep = Emitter.prototype; +exports.Emitter = Emitter; -},{"../lang/isArray":452,"../lang/isTypedArray":462,"./equalArrays":427,"./equalByTag":428,"./equalObjects":429}],400:[function(require,module,exports){ -/** - * The base implementation of `_.isFunction` without support for environments - * with incorrect `typeof` results. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - */ -function baseIsFunction(value) { - // Avoid a Chakra JIT bug in compatibility modes of IE 11. - // See https://github.com/jashkenas/underscore/issues/1621 for more details. - return typeof value == 'function' || false; +// Offsets into this.listing that could be used as targets for branches or +// jumps are represented as numeric Literal nodes. This representation has +// the amazingly convenient benefit of allowing the exact value of the +// location to be determined at any time, even after generating code that +// refers to the location. +function loc() { + return b.literal(-1); } -module.exports = baseIsFunction; +// Sets the exact value of the given location to the offset of the next +// Statement emitted. +Ep.mark = function(loc) { + n.Literal.assert(loc); + var index = this.listing.length; + if (loc.value === -1) { + loc.value = index; + } else { + // Locations can be marked redundantly, but their values cannot change + // once set the first time. + assert.strictEqual(loc.value, index); + } + this.marked[index] = true; + return loc; +}; -},{}],401:[function(require,module,exports){ -var baseIsEqual = require('./baseIsEqual'), - toObject = require('./toObject'); +Ep.emit = function(node) { + if (n.Expression.check(node)) + node = b.expressionStatement(node); + n.Statement.assert(node); + this.listing.push(node); +}; -/** - * The base implementation of `_.isMatch` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} matchData The propery names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparing objects. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; +// Shorthand for emitting assignment statements. This will come in handy +// for assignments to temporary variables. +Ep.emitAssign = function(lhs, rhs) { + this.emit(this.assign(lhs, rhs)); + return lhs; +}; - if (object == null) { - return !length; - } - object = toObject(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]; +// Shorthand for an assignment statement. +Ep.assign = function(lhs, rhs) { + return b.expressionStatement( + b.assignmentExpression("=", lhs, rhs)); +}; - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var result = customizer ? customizer(objValue, srcValue, key) : undefined; - if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { - return false; - } - } +// Convenience function for generating expressions like context.next, +// context.sent, and context.rval. +Ep.contextProperty = function(name, computed) { + return b.memberExpression( + this.contextId, + computed ? b.literal(name) : b.identifier(name), + !!computed + ); +}; + +// Shorthand for setting context.rval and jumping to `context.stop()`. +Ep.stop = function(rval) { + if (rval) { + this.setReturnValue(rval); } - return true; -} -module.exports = baseIsMatch; + this.jump(this.finalLoc); +}; -},{"./baseIsEqual":398,"./toObject":447}],402:[function(require,module,exports){ -var baseEach = require('./baseEach'), - isArrayLike = require('./isArrayLike'); +Ep.setReturnValue = function(valuePath) { + n.Expression.assert(valuePath.value); -/** - * The base implementation of `_.map` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array|Object|string} 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) : []; + this.emitAssign( + this.contextProperty("rval"), + this.explodeExpression(valuePath) + ); +}; - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} +Ep.clearPendingException = function(tryLoc, assignee) { + n.Literal.assert(tryLoc); -module.exports = baseMap; + var catchCall = b.callExpression( + this.contextProperty("catch", true), + [tryLoc] + ); -},{"./baseEach":388,"./isArrayLike":437}],403:[function(require,module,exports){ -var baseIsMatch = require('./baseIsMatch'), - getMatchData = require('./getMatchData'), - toObject = require('./toObject'); + if (assignee) { + this.emitAssign(assignee, catchCall); + } else { + this.emit(catchCall); + } +}; -/** - * The base implementation of `_.matches` which does not clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. - */ -function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - var key = matchData[0][0], - value = matchData[0][1]; +// Emits code for an unconditional jump to the given location, even if the +// exact value of the location is not yet known. +Ep.jump = function(toLoc) { + this.emitAssign(this.contextProperty("next"), toLoc); + this.emit(b.breakStatement()); +}; - return function(object) { - if (object == null) { - return false; - } - return object[key] === value && (value !== undefined || (key in toObject(object))); - }; +// Conditional jump. +Ep.jumpIf = function(test, toLoc) { + n.Expression.assert(test); + n.Literal.assert(toLoc); + + this.emit(b.ifStatement( + test, + b.blockStatement([ + this.assign(this.contextProperty("next"), toLoc), + b.breakStatement() + ]) + )); +}; + +// Conditional jump, with the condition negated. +Ep.jumpIfNot = function(test, toLoc) { + n.Expression.assert(test); + n.Literal.assert(toLoc); + + var negatedTest; + if (n.UnaryExpression.check(test) && + test.operator === "!") { + // Avoid double negation. + negatedTest = test.argument; + } else { + negatedTest = b.unaryExpression("!", test); } - return function(object) { - return baseIsMatch(object, matchData); - }; -} -module.exports = baseMatches; + this.emit(b.ifStatement( + negatedTest, + b.blockStatement([ + this.assign(this.contextProperty("next"), toLoc), + b.breakStatement() + ]) + )); +}; -},{"./baseIsMatch":401,"./getMatchData":431,"./toObject":447}],404:[function(require,module,exports){ -var baseGet = require('./baseGet'), - baseIsEqual = require('./baseIsEqual'), - baseSlice = require('./baseSlice'), - isArray = require('../lang/isArray'), - isKey = require('./isKey'), - isStrictComparable = require('./isStrictComparable'), - last = require('../array/last'), - toObject = require('./toObject'), - toPath = require('./toPath'); +// Returns a unique MemberExpression that can be used to store and +// retrieve temporary values. Since the object of the member expression is +// the context object, which is presumed to coexist peacefully with all +// other local variables, and since we just increment `nextTempId` +// monotonically, uniqueness is assured. +Ep.makeTempVar = function() { + return this.contextProperty("t" + this.nextTempId++); +}; -/** - * The base implementation of `_.matchesProperty` which does not clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to compare. - * @returns {Function} Returns the new function. - */ -function baseMatchesProperty(path, srcValue) { - var isArr = isArray(path), - isCommon = isKey(path) && isStrictComparable(srcValue), - pathKey = (path + ''); +Ep.getContextFunction = function(id) { + return b.functionExpression( + id || null/*Anonymous*/, + [this.contextId], + b.blockStatement([this.getDispatchLoop()]), + false, // Not a generator anymore! + false // Nor an expression. + ); +}; - path = toPath(path); - return function(object) { - if (object == null) { - return false; +// Turns this.listing into a loop of the form +// +// while (1) switch (context.next) { +// case 0: +// ... +// case n: +// return context.stop(); +// } +// +// Each marked location in this.listing will correspond to one generated +// case statement. +Ep.getDispatchLoop = function() { + var self = this; + var cases = []; + var current; + + // If we encounter a break, continue, or return statement in a switch + // case, we can skip the rest of the statements until the next case. + var alreadyEnded = false; + + self.listing.forEach(function(stmt, i) { + if (self.marked.hasOwnProperty(i)) { + cases.push(b.switchCase( + b.literal(i), + current = [])); + alreadyEnded = false; } - var key = pathKey; - object = toObject(object); - if ((isArr || !isCommon) && !(key in object)) { - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - if (object == null) { - return false; - } - key = last(path); - object = toObject(object); + + if (!alreadyEnded) { + current.push(stmt); + if (isSwitchCaseEnder(stmt)) + alreadyEnded = true; } - return object[key] === srcValue - ? (srcValue !== undefined || (key in object)) - : baseIsEqual(srcValue, object[key], undefined, true); - }; -} + }); -module.exports = baseMatchesProperty; + // Now that we know how many statements there will be in this.listing, + // we can finally resolve this.finalLoc.value. + this.finalLoc.value = this.listing.length; -},{"../array/last":363,"../lang/isArray":452,"./baseGet":396,"./baseIsEqual":398,"./baseSlice":410,"./isKey":440,"./isStrictComparable":443,"./toObject":447,"./toPath":448}],405:[function(require,module,exports){ -var arrayEach = require('./arrayEach'), - baseMergeDeep = require('./baseMergeDeep'), - isArray = require('../lang/isArray'), - isArrayLike = require('./isArrayLike'), - isObject = require('../lang/isObject'), - isObjectLike = require('./isObjectLike'), - isTypedArray = require('../lang/isTypedArray'), - keys = require('../object/keys'); + cases.push( + b.switchCase(this.finalLoc, [ + // Intentionally fall through to the "end" case... + ]), -/** - * The base implementation of `_.merge` without support for argument juggling, - * multiple sources, and `this` binding `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} [customizer] The function to customize merging properties. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. - * @returns {Object} Returns `object`. - */ -function baseMerge(object, source, customizer, stackA, stackB) { - if (!isObject(object)) { - return object; + // So that the runtime can jump to the final location without having + // to know its offset, we provide the "end" case as a synonym. + b.switchCase(b.literal("end"), [ + // This will check/clear both context.thrown and context.rval. + b.returnStatement( + b.callExpression(this.contextProperty("stop"), []) + ) + ]) + ); + + return b.whileStatement( + b.literal(1), + b.switchStatement( + b.assignmentExpression( + "=", + this.contextProperty("prev"), + this.contextProperty("next") + ), + cases + ) + ); +}; + +// See comment above re: alreadyEnded. +function isSwitchCaseEnder(stmt) { + return n.BreakStatement.check(stmt) + || n.ContinueStatement.check(stmt) + || n.ReturnStatement.check(stmt) + || n.ThrowStatement.check(stmt); +} + +Ep.getTryLocsList = function() { + if (this.tryEntries.length === 0) { + // To avoid adding a needless [] to the majority of runtime.wrap + // argument lists, force the caller to handle this case specially. + return null; } - var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), - props = isSrcArr ? null : keys(source); - arrayEach(props || source, function(srcValue, key) { - if (props) { - key = srcValue; - srcValue = source[key]; - } - if (isObjectLike(srcValue)) { - stackA || (stackA = []); - stackB || (stackB = []); - baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); - } - else { - var value = object[key], - result = customizer ? customizer(value, srcValue, key, object, source) : undefined, - isCommon = result === undefined; + var lastLocValue = 0; - if (isCommon) { - result = srcValue; - } - if ((result !== undefined || (isSrcArr && !(key in object))) && - (isCommon || (result === result ? (result !== value) : (value === value)))) { - object[key] = result; + return b.arrayExpression( + this.tryEntries.map(function(tryEntry) { + var thisLocValue = tryEntry.firstLoc.value; + assert.ok(thisLocValue >= lastLocValue, "try entries out of order"); + lastLocValue = thisLocValue; + + var ce = tryEntry.catchEntry; + var fe = tryEntry.finallyEntry; + + var locs = [ + tryEntry.firstLoc, + // The null here makes a hole in the array. + ce ? ce.firstLoc : null + ]; + + if (fe) { + locs[2] = fe.firstLoc; + locs[3] = fe.afterLoc; } - } - }); - return object; -} -module.exports = baseMerge; + return b.arrayExpression(locs); + }) + ); +}; -},{"../lang/isArray":452,"../lang/isObject":458,"../lang/isTypedArray":462,"../object/keys":468,"./arrayEach":377,"./baseMergeDeep":406,"./isArrayLike":437,"./isObjectLike":442}],406:[function(require,module,exports){ -var arrayCopy = require('./arrayCopy'), - isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isArrayLike = require('./isArrayLike'), - isPlainObject = require('../lang/isPlainObject'), - isTypedArray = require('../lang/isTypedArray'), - toPlainObject = require('../lang/toPlainObject'); +// All side effects must be realized in order. -/** - * 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 {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize merging properties. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { - var length = stackA.length, - srcValue = source[key]; +// If any subexpression harbors a leap, all subexpressions must be +// neutered of side effects. - while (length--) { - if (stackA[length] == srcValue) { - object[key] = stackB[length]; - return; - } - } - var value = object[key], - result = customizer ? customizer(value, srcValue, key, object, source) : undefined, - isCommon = result === undefined; +// No destructive modification of AST nodes. - if (isCommon) { - result = srcValue; - if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) { - result = isArray(value) - ? value - : (isArrayLike(value) ? arrayCopy(value) : []); - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - result = isArguments(value) - ? toPlainObject(value) - : (isPlainObject(value) ? value : {}); - } - else { - isCommon = false; - } - } - // Add the source value to the stack of traversed objects and associate - // it with its merged value. - stackA.push(srcValue); - stackB.push(result); +Ep.explode = function(path, ignoreResult) { + assert.ok(path instanceof types.NodePath); - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); - } else if (result === result ? (result !== value) : (value === value)) { - object[key] = result; - } -} + var node = path.value; + var self = this; -module.exports = baseMergeDeep; + n.Node.assert(node); -},{"../lang/isArguments":451,"../lang/isArray":452,"../lang/isPlainObject":459,"../lang/isTypedArray":462,"../lang/toPlainObject":463,"./arrayCopy":376,"./isArrayLike":437}],407:[function(require,module,exports){ -/** - * 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 function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} + if (n.Statement.check(node)) + return self.explodeStatement(path); -module.exports = baseProperty; + if (n.Expression.check(node)) + return self.explodeExpression(path, ignoreResult); -},{}],408:[function(require,module,exports){ -var baseGet = require('./baseGet'), - toPath = require('./toPath'); + if (n.Declaration.check(node)) + throw getDeclError(node); -/** - * 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 function. - */ -function basePropertyDeep(path) { - var pathKey = (path + ''); - path = toPath(path); - return function(object) { - return baseGet(object, path, pathKey); - }; -} + switch (node.type) { + case "Program": + return path.get("body").map( + self.explodeStatement, + self + ); -module.exports = basePropertyDeep; + case "VariableDeclarator": + throw getDeclError(node); -},{"./baseGet":396,"./toPath":448}],409:[function(require,module,exports){ -/** - * The base implementation of `_.reduce` and `_.reduceRight` without support - * for callback shorthands and `this` binding, which iterates over `collection` - * using the provided `eachFunc`. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initFromCollection 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, initFromCollection, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initFromCollection - ? (initFromCollection = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; + // These node types should be handled by their parent nodes + // (ObjectExpression, SwitchStatement, and TryStatement, respectively). + case "Property": + case "SwitchCase": + case "CatchClause": + throw new Error( + node.type + " nodes should be handled by their parents"); + + default: + throw new Error( + "unknown Node of type " + + JSON.stringify(node.type)); + } +}; + +function getDeclError(node) { + return new Error( + "all declarations should have been transformed into " + + "assignments before the Exploder began its work: " + + JSON.stringify(node)); } -module.exports = baseReduce; +Ep.explodeStatement = function(path, labelId) { + assert.ok(path instanceof types.NodePath); -},{}],410:[function(require,module,exports){ -/** - * 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; + var stmt = path.value; + var self = this; - start = start == null ? 0 : (+start || 0); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : (+end || 0); - if (end < 0) { - end += length; + n.Statement.assert(stmt); + + if (labelId) { + n.Identifier.assert(labelId); + } else { + labelId = null; } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; + // Explode BlockStatement nodes even if they do not contain a yield, + // because we don't want or need the curly braces. + if (n.BlockStatement.check(stmt)) { + return path.get("body").each( + self.explodeStatement, + self + ); } - return result; -} -module.exports = baseSlice; + if (!meta.containsLeap(stmt)) { + // Technically we should be able to avoid emitting the statement + // altogether if !meta.hasSideEffects(stmt), but that leads to + // confusing generated code (for instance, `while (true) {}` just + // disappears) and is probably a more appropriate job for a dedicated + // dead code elimination pass. + self.emit(stmt); + return; + } -},{}],411:[function(require,module,exports){ -var baseEach = require('./baseEach'); + switch (stmt.type) { + case "ExpressionStatement": + self.explodeExpression(path.get("expression"), true); + break; -/** - * The base implementation of `_.some` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array|Object|string} 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; + case "LabeledStatement": + var after = loc(); - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; -} + // Did you know you can break from any labeled block statement or + // control structure? Well, you can! Note: when a labeled loop is + // encountered, the leap.LabeledEntry created here will immediately + // enclose a leap.LoopEntry on the leap manager's stack, and both + // entries will have the same label. Though this works just fine, it + // may seem a bit redundant. In theory, we could check here to + // determine if stmt knows how to handle its own label; for example, + // stmt happens to be a WhileStatement and so we know it's going to + // establish its own LoopEntry when we explode it (below). Then this + // LabeledEntry would be unnecessary. Alternatively, we might be + // tempted not to pass stmt.label down into self.explodeStatement, + // because we've handled the label here, but that's a mistake because + // labeled loops may contain labeled continue statements, which is not + // something we can handle in this generic case. All in all, I think a + // little redundancy greatly simplifies the logic of this case, since + // it's clear that we handle all possible LabeledStatements correctly + // here, regardless of whether they interact with the leap manager + // themselves. Also remember that labels and break/continue-to-label + // statements are rare, and all of this logic happens at transform + // time, so it has no additional runtime cost. + self.leapManager.withEntry( + new leap.LabeledEntry(after, stmt.label), + function() { + self.explodeStatement(path.get("body"), stmt.label); + } + ); -module.exports = baseSome; + self.mark(after); -},{"./baseEach":388}],412:[function(require,module,exports){ -/** - * 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; + break; - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} + case "WhileStatement": + var before = loc(); + var after = loc(); -module.exports = baseSortBy; + self.mark(before); + self.jumpIfNot(self.explodeExpression(path.get("test")), after); + self.leapManager.withEntry( + new leap.LoopEntry(after, before, labelId), + function() { self.explodeStatement(path.get("body")); } + ); + self.jump(before); + self.mark(after); -},{}],413:[function(require,module,exports){ -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - if (typeof value == 'string') { - return value; - } - return value == null ? '' : (value + ''); -} + break; -module.exports = baseToString; + case "DoWhileStatement": + var first = loc(); + var test = loc(); + var after = loc(); -},{}],414:[function(require,module,exports){ -var baseIndexOf = require('./baseIndexOf'), - cacheIndexOf = require('./cacheIndexOf'), - createCache = require('./createCache'); + self.mark(first); + self.leapManager.withEntry( + new leap.LoopEntry(after, test, labelId), + function() { self.explode(path.get("body")); } + ); + self.mark(test); + self.jumpIf(self.explodeExpression(path.get("test")), first); + self.mark(after); -/** - * The base implementation of `_.uniq` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate-value-free array. - */ -function baseUniq(array, iteratee) { - var index = -1, - indexOf = baseIndexOf, - length = array.length, - isCommon = true, - isLarge = isCommon && length >= 200, - seen = isLarge ? createCache() : null, - result = []; + break; - if (seen) { - indexOf = cacheIndexOf; - isCommon = false; - } else { - isLarge = false; - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value, index, array) : value; + case "ForStatement": + var head = loc(); + var update = loc(); + var after = loc(); - if (isCommon && value === value) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (indexOf(seen, computed, 0) < 0) { - if (iteratee || isLarge) { - seen.push(computed); - } - result.push(value); + if (stmt.init) { + // We pass true here to indicate that if stmt.init is an expression + // then we do not care about its result. + self.explode(path.get("init"), true); } - } - return result; -} - -module.exports = baseUniq; - -},{"./baseIndexOf":397,"./cacheIndexOf":418,"./createCache":424}],415:[function(require,module,exports){ -/** - * 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) { - var index = -1, - length = props.length, - result = Array(length); - while (++index < length) { - result[index] = object[props[index]]; - } - return result; -} + self.mark(head); -module.exports = baseValues; + if (stmt.test) { + self.jumpIfNot(self.explodeExpression(path.get("test")), after); + } else { + // No test means continue unconditionally. + } -},{}],416:[function(require,module,exports){ -var identity = require('../utility/identity'); + self.leapManager.withEntry( + new leap.LoopEntry(after, update, labelId), + function() { self.explodeStatement(path.get("body")); } + ); -/** - * A specialized version of `baseCallback` which only supports `this` binding - * and specifying the number of arguments to provide to `func`. - * - * @private - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ -function bindCallback(func, thisArg, argCount) { - if (typeof func != 'function') { - return identity; - } - if (thisArg === undefined) { - return func; - } - switch (argCount) { - case 1: return function(value) { - return func.call(thisArg, value); - }; - case 3: return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(thisArg, accumulator, value, index, collection); - }; - case 5: return function(value, other, key, object, source) { - return func.call(thisArg, value, other, key, object, source); - }; - } - return function() { - return func.apply(thisArg, arguments); - }; -} + self.mark(update); -module.exports = bindCallback; + if (stmt.update) { + // We pass true here to indicate that if stmt.update is an + // expression then we do not care about its result. + self.explode(path.get("update"), true); + } -},{"../utility/identity":476}],417:[function(require,module,exports){ -(function (global){ -var constant = require('../utility/constant'), - getNative = require('./getNative'); + self.jump(head); -/** Native method references. */ -var ArrayBuffer = getNative(global, 'ArrayBuffer'), - bufferSlice = getNative(ArrayBuffer && new ArrayBuffer(0), 'slice'), - floor = Math.floor, - Uint8Array = getNative(global, 'Uint8Array'); - -/** Used to clone array buffers. */ -var Float64Array = (function() { - // Safari 5 errors when using an array buffer to initialize a typed array - // where the array buffer's `byteLength` is not a multiple of the typed - // array's `BYTES_PER_ELEMENT`. - try { - var func = getNative(global, 'Float64Array'), - result = new func(new ArrayBuffer(10), 0, 1) && func; - } catch(e) {} - return result || null; -}()); + self.mark(after); -/** Used as the size, in bytes, of each `Float64Array` element. */ -var FLOAT64_BYTES_PER_ELEMENT = Float64Array ? Float64Array.BYTES_PER_ELEMENT : 0; + break; -/** - * Creates a clone of the given array buffer. - * - * @private - * @param {ArrayBuffer} buffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function bufferClone(buffer) { - return bufferSlice.call(buffer, 0); -} -if (!bufferSlice) { - // PhantomJS has `ArrayBuffer` and `Uint8Array` but not `Float64Array`. - bufferClone = !(ArrayBuffer && Uint8Array) ? constant(null) : function(buffer) { - var byteLength = buffer.byteLength, - floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0, - offset = floatLength * FLOAT64_BYTES_PER_ELEMENT, - result = new ArrayBuffer(byteLength); + case "ForInStatement": + var head = loc(); + var after = loc(); - if (floatLength) { - var view = new Float64Array(result, 0, floatLength); - view.set(new Float64Array(buffer, 0, floatLength)); - } - if (byteLength != offset) { - view = new Uint8Array(result, offset); - view.set(new Uint8Array(buffer, offset)); - } - return result; - }; -} + var keyIterNextFn = self.makeTempVar(); + self.emitAssign( + keyIterNextFn, + b.callExpression( + runtimeProperty("keys"), + [self.explodeExpression(path.get("right"))] + ) + ); -module.exports = bufferClone; + self.mark(head); -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../utility/constant":475,"./getNative":432}],418:[function(require,module,exports){ -var isObject = require('../lang/isObject'); + var keyInfoTmpVar = self.makeTempVar(); + self.jumpIf( + b.memberExpression( + b.assignmentExpression( + "=", + keyInfoTmpVar, + b.callExpression(keyIterNextFn, []) + ), + b.identifier("done"), + false + ), + after + ); -/** - * Checks if `value` is in `cache` mimicking the return signature of - * `_.indexOf` by returning `0` if the value is found, else `-1`. - * - * @private - * @param {Object} cache The cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `0` if `value` is found, else `-1`. - */ -function cacheIndexOf(cache, value) { - var data = cache.data, - result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; + self.emitAssign( + stmt.left, + b.memberExpression( + keyInfoTmpVar, + b.identifier("value"), + false + ) + ); - return result ? 0 : -1; -} + self.leapManager.withEntry( + new leap.LoopEntry(after, head, labelId), + function() { self.explodeStatement(path.get("body")); } + ); -module.exports = cacheIndexOf; + self.jump(head); -},{"../lang/isObject":458}],419:[function(require,module,exports){ -var isObject = require('../lang/isObject'); + self.mark(after); -/** - * Adds `value` to the cache. - * - * @private - * @name push - * @memberOf SetCache - * @param {*} value The value to cache. - */ -function cachePush(value) { - var data = this.data; - if (typeof value == 'string' || isObject(value)) { - data.set.add(value); - } else { - data.hash[value] = true; - } -} + break; -module.exports = cachePush; + case "BreakStatement": + self.emitAbruptCompletion({ + type: "break", + target: self.leapManager.getBreakLoc(stmt.label) + }); -},{"../lang/isObject":458}],420:[function(require,module,exports){ -var baseCompareAscending = require('./baseCompareAscending'); + break; -/** - * Used by `_.sortBy` to compare transformed elements of a collection and stable - * sort them in ascending order. - * - * @private - * @param {Object} object The object to compare to `other`. - * @param {Object} other The object to compare to `object`. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareAscending(object, other) { - return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index); -} + case "ContinueStatement": + self.emitAbruptCompletion({ + type: "continue", + target: self.leapManager.getContinueLoc(stmt.label) + }); -module.exports = compareAscending; + break; -},{"./baseCompareAscending":386}],421:[function(require,module,exports){ -var bindCallback = require('./bindCallback'), - isIterateeCall = require('./isIterateeCall'), - restParam = require('../function/restParam'); + case "SwitchStatement": + // Always save the discriminant into a temporary variable in case the + // test expressions overwrite values like context.sent. + var disc = self.emitAssign( + self.makeTempVar(), + self.explodeExpression(path.get("discriminant")) + ); -/** - * Creates a function that assigns properties of source object(s) to a given - * destination object. - * - * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return restParam(function(object, sources) { - var index = -1, - length = object == null ? 0 : sources.length, - customizer = length > 2 ? sources[length - 2] : undefined, - guard = length > 2 ? sources[2] : undefined, - thisArg = length > 1 ? sources[length - 1] : undefined; + var after = loc(); + var defaultLoc = loc(); + var condition = defaultLoc; + var caseLocs = []; - if (typeof customizer == 'function') { - customizer = bindCallback(customizer, thisArg, 5); - length -= 2; - } else { - customizer = typeof thisArg == 'function' ? thisArg : undefined; - length -= (customizer ? 1 : 0); - } - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, customizer); + // If there are no cases, .cases might be undefined. + var cases = stmt.cases || []; + + for (var i = cases.length - 1; i >= 0; --i) { + var c = cases[i]; + n.SwitchCase.assert(c); + + if (c.test) { + condition = b.conditionalExpression( + b.binaryExpression("===", disc, c.test), + caseLocs[i] = loc(), + condition + ); + } else { + caseLocs[i] = defaultLoc; } } - return object; - }); -} -module.exports = createAssigner; + self.jump(self.explodeExpression( + new types.NodePath(condition, path, "discriminant") + )); -},{"../function/restParam":374,"./bindCallback":416,"./isIterateeCall":439}],422:[function(require,module,exports){ -var getLength = require('./getLength'), - isLength = require('./isLength'), - toObject = require('./toObject'); + self.leapManager.withEntry( + new leap.SwitchEntry(after), + function() { + path.get("cases").each(function(casePath) { + var c = casePath.value; + var i = casePath.name; -/** - * 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) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - return eachFunc(collection, iteratee); - } - var index = fromRight ? length : -1, - iterable = toObject(collection); + self.mark(caseLocs[i]); - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; + casePath.get("consequent").each( + self.explodeStatement, + self + ); + }); } + ); + + self.mark(after); + if (defaultLoc.value === -1) { + self.mark(defaultLoc); + assert.strictEqual(after.value, defaultLoc.value); } - return collection; - }; -} -module.exports = createBaseEach; + break; -},{"./getLength":430,"./isLength":441,"./toObject":447}],423:[function(require,module,exports){ -var toObject = require('./toObject'); + case "IfStatement": + var elseLoc = stmt.alternate && loc(); + var after = loc(); -/** - * Creates a base function for `_.forIn` or `_.forInRight`. - * - * @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 iterable = toObject(object), - props = keysFunc(object), - length = props.length, - index = fromRight ? length : -1; + self.jumpIfNot( + self.explodeExpression(path.get("test")), + elseLoc || after + ); - while ((fromRight ? index-- : ++index < length)) { - var key = props[index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } + self.explodeStatement(path.get("consequent")); + + if (elseLoc) { + self.jump(after); + self.mark(elseLoc); + self.explodeStatement(path.get("alternate")); } - return object; - }; -} -module.exports = createBaseFor; + self.mark(after); -},{"./toObject":447}],424:[function(require,module,exports){ -(function (global){ -var SetCache = require('./SetCache'), - constant = require('../utility/constant'), - getNative = require('./getNative'); + break; -/** Native method references. */ -var Set = getNative(global, 'Set'); + case "ReturnStatement": + self.emitAbruptCompletion({ + type: "return", + value: self.explodeExpression(path.get("argument")) + }); -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeCreate = getNative(Object, 'create'); + break; -/** - * Creates a `Set` cache object to optimize linear searches of large arrays. - * - * @private - * @param {Array} [values] The values to cache. - * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. - */ -var createCache = !(nativeCreate && Set) ? constant(null) : function(values) { - return new SetCache(values); -}; + case "WithStatement": + throw new Error( + node.type + " not supported in generator functions."); -module.exports = createCache; + case "TryStatement": + var after = loc(); -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../utility/constant":475,"./SetCache":375,"./getNative":432}],425:[function(require,module,exports){ -var bindCallback = require('./bindCallback'), - isArray = require('../lang/isArray'); + var handler = stmt.handler; + if (!handler && stmt.handlers) { + handler = stmt.handlers[0] || null; + } -/** - * Creates a function for `_.forEach` or `_.forEachRight`. - * - * @private - * @param {Function} arrayFunc The function to iterate over an array. - * @param {Function} eachFunc The function to iterate over a collection. - * @returns {Function} Returns the new each function. - */ -function createForEach(arrayFunc, eachFunc) { - return function(collection, iteratee, thisArg) { - return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) - ? arrayFunc(collection, iteratee) - : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); - }; -} + var catchLoc = handler && loc(); + var catchEntry = catchLoc && new leap.CatchEntry( + catchLoc, + handler.param + ); -module.exports = createForEach; + var finallyLoc = stmt.finalizer && loc(); + var finallyEntry = finallyLoc && + new leap.FinallyEntry(finallyLoc, after); -},{"../lang/isArray":452,"./bindCallback":416}],426:[function(require,module,exports){ -var baseCallback = require('./baseCallback'), - baseReduce = require('./baseReduce'), - isArray = require('../lang/isArray'); + var tryEntry = new leap.TryEntry( + self.getUnmarkedCurrentLoc(), + catchEntry, + finallyEntry + ); -/** - * Creates a function for `_.reduce` or `_.reduceRight`. - * - * @private - * @param {Function} arrayFunc The function to iterate over an array. - * @param {Function} eachFunc The function to iterate over a collection. - * @returns {Function} Returns the new each function. - */ -function createReduce(arrayFunc, eachFunc) { - return function(collection, iteratee, accumulator, thisArg) { - var initFromArray = arguments.length < 3; - return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) - ? arrayFunc(collection, iteratee, accumulator, initFromArray) - : baseReduce(collection, baseCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc); - }; -} + self.tryEntries.push(tryEntry); + self.updateContextPrevLoc(tryEntry.firstLoc); -module.exports = createReduce; + self.leapManager.withEntry(tryEntry, function() { + self.explodeStatement(path.get("block")); -},{"../lang/isArray":452,"./baseCallback":384,"./baseReduce":409}],427:[function(require,module,exports){ -var arraySome = require('./arraySome'); + if (catchLoc) { + if (finallyLoc) { + // If we have both a catch block and a finally block, then + // because we emit the catch block first, we need to jump over + // it to the finally block. + self.jump(finallyLoc); -/** - * 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 comparing arrays. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { - var index = -1, - arrLength = array.length, - othLength = other.length; + } else { + // If there is no finally block, then we need to jump over the + // catch block to the fall-through location. + self.jump(after); + } - if (arrLength != othLength && !(isLoose && othLength > arrLength)) { - return false; - } - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index], - result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; + self.updateContextPrevLoc(self.mark(catchLoc)); - if (result !== undefined) { - if (result) { - continue; + var bodyPath = path.get("handler", "body"); + var safeParam = self.makeTempVar(); + self.clearPendingException(tryEntry.firstLoc, safeParam); + + var catchScope = bodyPath.scope; + var catchParamName = handler.param.name; + n.CatchClause.assert(catchScope.node); + assert.strictEqual(catchScope.lookup(catchParamName), catchScope); + + types.visit(bodyPath, { + visitIdentifier: function(path) { + if (util.isReference(path, catchParamName) && + path.scope.lookup(catchParamName) === catchScope) { + return safeParam; + } + + this.traverse(path); + }, + + visitFunction: function(path) { + if (path.scope.declares(catchParamName)) { + // Don't descend into nested scopes that shadow the catch + // parameter with their own declarations. This isn't + // logically necessary because of the path.scope.lookup we + // do in visitIdentifier, but it saves time. + return false; + } + + this.traverse(path); + } + }); + + self.leapManager.withEntry(catchEntry, function() { + self.explodeStatement(bodyPath); + }); } - return false; - } - // Recursively compare arrays (susceptible to call stack limits). - if (isLoose) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); - })) { - return false; + + if (finallyLoc) { + self.updateContextPrevLoc(self.mark(finallyLoc)); + + self.leapManager.withEntry(finallyEntry, function() { + self.explodeStatement(path.get("finalizer")); + }); + + self.emit(b.returnStatement(b.callExpression( + self.contextProperty("finish"), + [finallyEntry.firstLoc] + ))); } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { - return false; - } - } - return true; -} + }); -module.exports = equalArrays; + self.mark(after); -},{"./arraySome":380}],428:[function(require,module,exports){ -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; + break; -/** - * 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} value The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag) { - switch (tag) { - 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 "ThrowStatement": + self.emit(b.throwStatement( + self.explodeExpression(path.get("argument")) + )); - case errorTag: - return object.name == other.name && object.message == other.message; + break; - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) - ? other != +other - : object == +other; + default: + throw new Error( + "unknown Statement of type " + + JSON.stringify(stmt.type)); + } +}; - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. - return object == (other + ''); +Ep.emitAbruptCompletion = function(record) { + if (!isValidCompletion(record)) { + assert.ok( + false, + "invalid completion record: " + + JSON.stringify(record) + ); } - return false; -} -module.exports = equalByTag; + assert.notStrictEqual( + record.type, "normal", + "normal completions are not abrupt" + ); -},{}],429:[function(require,module,exports){ -var keys = require('../object/keys'); + var abruptArgs = [b.literal(record.type)]; -/** Used for native method references. */ -var objectProto = Object.prototype; + if (record.type === "break" || + record.type === "continue") { + n.Literal.assert(record.target); + abruptArgs[1] = record.target; + } else if (record.type === "return" || + record.type === "throw") { + if (record.value) { + n.Expression.assert(record.value); + abruptArgs[1] = record.value; + } + } -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + this.emit( + b.returnStatement( + b.callExpression( + this.contextProperty("abrupt"), + abruptArgs + ) + ) + ); +}; -/** - * 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 comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; +function isValidCompletion(record) { + var type = record.type; - if (objLength != othLength && !isLoose) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { - return false; - } + if (type === "normal") { + return !hasOwn.call(record, "target"); } - var skipCtor = isLoose; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key], - result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; - // Recursively compare objects (susceptible to call stack limits). - if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { - return false; - } - skipCtor || (skipCtor = key == 'constructor'); + if (type === "break" || + type === "continue") { + return !hasOwn.call(record, "value") + && n.Literal.check(record.target); } - if (!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)) { - return false; - } + if (type === "return" || + type === "throw") { + return hasOwn.call(record, "value") + && !hasOwn.call(record, "target"); } - return true; + + return false; } -module.exports = equalObjects; -},{"../object/keys":468}],430:[function(require,module,exports){ -var baseProperty = require('./baseProperty'); +// Not all offsets into emitter.listing are potential jump targets. For +// example, execution typically falls into the beginning of a try block +// without jumping directly there. This method returns the current offset +// without marking it, so that a switch case will not necessarily be +// generated for this offset (I say "not necessarily" because the same +// location might end up being marked in the process of emitting other +// statements). There's no logical harm in marking such locations as jump +// targets, but minimizing the number of switch cases keeps the generated +// code shorter. +Ep.getUnmarkedCurrentLoc = function() { + return b.literal(this.listing.length); +}; -/** - * 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'); +// The context.prev property takes the value of context.next whenever we +// evaluate the switch statement discriminant, which is generally good +// enough for tracking the last location we jumped to, but sometimes +// context.prev needs to be more precise, such as when we fall +// successfully out of a try block and into a finally block without +// jumping. This method exists to update context.prev to the freshest +// available location. If we were implementing a full interpreter, we +// would know the location of the current instruction with complete +// precision at all times, but we don't have that luxury here, as it would +// be costly and verbose to set context.prev before every statement. +Ep.updateContextPrevLoc = function(loc) { + if (loc) { + n.Literal.assert(loc); -module.exports = getLength; + if (loc.value === -1) { + // If an uninitialized location literal was passed in, set its value + // to the current this.listing.length. + loc.value = this.listing.length; + } else { + // Otherwise assert that the location matches the current offset. + assert.strictEqual(loc.value, this.listing.length); + } -},{"./baseProperty":407}],431:[function(require,module,exports){ -var isStrictComparable = require('./isStrictComparable'), - pairs = require('../object/pairs'); + } else { + loc = this.getUnmarkedCurrentLoc(); + } -/** - * Gets the propery 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 = pairs(object), - length = result.length; + // Make sure context.prev is up to date in case we fell into this try + // statement without jumping to it. TODO Consider avoiding this + // assignment when we know control must have jumped here. + this.emitAssign(this.contextProperty("prev"), loc); +}; - while (length--) { - result[length][2] = isStrictComparable(result[length][1]); +Ep.explodeExpression = function(path, ignoreResult) { + assert.ok(path instanceof types.NodePath); + + var expr = path.value; + if (expr) { + n.Expression.assert(expr); + } else { + return expr; } - return result; -} -module.exports = getMatchData; + var self = this; + var result; // Used optionally by several cases below. -},{"../object/pairs":471,"./isStrictComparable":443}],432:[function(require,module,exports){ -var isNative = require('../lang/isNative'); + function finish(expr) { + n.Expression.assert(expr); + if (ignoreResult) { + self.emit(expr); + } else { + return expr; + } + } -/** - * 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 = object == null ? undefined : object[key]; - return isNative(value) ? value : undefined; -} + // If the expression does not contain a leap, then we either emit the + // expression as a standalone statement or return it whole. + if (!meta.containsLeap(expr)) { + return finish(expr); + } -module.exports = getNative; + // If any child contains a leap (such as a yield or labeled continue or + // break statement), then any sibling subexpressions will almost + // certainly have to be exploded in order to maintain the order of their + // side effects relative to the leaping child(ren). + var hasLeapingChildren = meta.containsLeap.onlyChildren(expr); -},{"../lang/isNative":456}],433:[function(require,module,exports){ -/** - * 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 ? 0 : -1); + // In order to save the rest of explodeExpression from a combinatorial + // trainwreck of special cases, explodeViaTempVar is responsible for + // deciding when a subexpression needs to be "exploded," which is my + // very technical term for emitting the subexpression as an assignment + // to a temporary variable and the substituting the temporary variable + // for the original subexpression. Think of exploded view diagrams, not + // Michael Bay movies. The point of exploding subexpressions is to + // control the precise order in which the generated code realizes the + // side effects of those subexpressions. + function explodeViaTempVar(tempVar, childPath, ignoreChildResult) { + assert.ok(childPath instanceof types.NodePath); - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; + assert.ok( + !ignoreChildResult || !tempVar, + "Ignoring the result of a child expression but forcing it to " + + "be assigned to a temporary variable?" + ); + + var result = self.explodeExpression(childPath, ignoreChildResult); + + if (ignoreChildResult) { + // Side effects already emitted above. + + } else if (tempVar || (hasLeapingChildren && + !n.Literal.check(result))) { + // If tempVar was provided, then the result will always be assigned + // to it, even if the result does not otherwise need to be assigned + // to a temporary variable. When no tempVar is provided, we have + // the flexibility to decide whether a temporary variable is really + // necessary. Unfortunately, in general, a temporary variable is + // required whenever any child contains a yield expression, since it + // is difficult to prove (at all, let alone efficiently) whether + // this result would evaluate to the same value before and after the + // yield (see #206). One narrow case where we can prove it doesn't + // matter (and thus we do not need a temporary variable) is when the + // result in question is a Literal value. + result = self.emitAssign( + tempVar || self.makeTempVar(), + result + ); } + return result; } - return -1; -} -module.exports = indexOfNaN; + // If ignoreResult is true, then we must take full responsibility for + // emitting the expression with all its side effects, and we should not + // return a result. -},{}],434:[function(require,module,exports){ -/** Used for native method references. */ -var objectProto = Object.prototype; + switch (expr.type) { + case "MemberExpression": + return finish(b.memberExpression( + self.explodeExpression(path.get("object")), + expr.computed + ? explodeViaTempVar(null, path.get("property")) + : expr.property, + expr.computed + )); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + case "CallExpression": + var calleePath = path.get("callee"); + var argsPath = path.get("arguments"); -/** - * 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 = new array.constructor(length); + var newCallee; + var newArgs = []; - // Add array 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; -} + var hasLeapingArgs = false; + argsPath.each(function(argPath) { + hasLeapingArgs = hasLeapingArgs || + meta.containsLeap(argPath.value); + }); -module.exports = initCloneArray; + if (n.MemberExpression.check(calleePath.value)) { + if (hasLeapingArgs) { + // If the arguments of the CallExpression contained any yield + // expressions, then we need to be sure to evaluate the callee + // before evaluating the arguments, but if the callee was a member + // expression, then we must be careful that the object of the + // member expression still gets bound to `this` for the call. -},{}],435:[function(require,module,exports){ -var bufferClone = require('./bufferClone'); + var newObject = explodeViaTempVar( + // Assign the exploded callee.object expression to a temporary + // variable so that we can use it twice without reevaluating it. + self.makeTempVar(), + calleePath.get("object") + ); -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; + var newProperty = calleePath.value.computed + ? explodeViaTempVar(null, calleePath.get("property")) + : calleePath.value.property; -var arrayBufferTag = '[object ArrayBuffer]', - 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]'; + newArgs.unshift(newObject); -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; + newCallee = b.memberExpression( + b.memberExpression( + newObject, + newProperty, + calleePath.value.computed + ), + b.identifier("call"), + false + ); -/** - * 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 {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return bufferClone(object); + } else { + newCallee = self.explodeExpression(calleePath); + } - case boolTag: - case dateTag: - return new Ctor(+object); + } else { + newCallee = self.explodeExpression(calleePath); - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - var buffer = object.buffer; - return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); + if (n.MemberExpression.check(newCallee)) { + // If the callee was not previously a MemberExpression, then the + // CallExpression was "unqualified," meaning its `this` object + // should be the global object. If the exploded expression has + // become a MemberExpression (e.g. a context property, probably a + // temporary variable), then we need to force it to be unqualified + // by using the (0, object.property)(...) trick; otherwise, it + // will receive the object of the MemberExpression as its `this` + // object. + newCallee = b.sequenceExpression([ + b.literal(0), + newCallee + ]); + } + } - case numberTag: - case stringTag: - return new Ctor(object); + argsPath.each(function(argPath) { + newArgs.push(explodeViaTempVar(null, argPath)); + }); - case regexpTag: - var result = new Ctor(object.source, reFlags.exec(object)); - result.lastIndex = object.lastIndex; - } - return result; -} + return finish(b.callExpression( + newCallee, + newArgs + )); -module.exports = initCloneByTag; + case "NewExpression": + return finish(b.newExpression( + explodeViaTempVar(null, path.get("callee")), + path.get("arguments").map(function(argPath) { + return explodeViaTempVar(null, argPath); + }) + )); -},{"./bufferClone":417}],436:[function(require,module,exports){ -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - var Ctor = object.constructor; - if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { - Ctor = Object; - } - return new Ctor; -} + case "ObjectExpression": + return finish(b.objectExpression( + path.get("properties").map(function(propPath) { + return b.property( + propPath.value.kind, + propPath.value.key, + explodeViaTempVar(null, propPath.get("value")) + ); + }) + )); -module.exports = initCloneObject; + case "ArrayExpression": + return finish(b.arrayExpression( + path.get("elements").map(function(elemPath) { + return explodeViaTempVar(null, elemPath); + }) + )); -},{}],437:[function(require,module,exports){ -var getLength = require('./getLength'), - isLength = require('./isLength'); + case "SequenceExpression": + var lastIndex = expr.expressions.length - 1; -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} + path.get("expressions").each(function(exprPath) { + if (exprPath.name === lastIndex) { + result = self.explodeExpression(exprPath, ignoreResult); + } else { + self.explodeExpression(exprPath, true); + } + }); -module.exports = isArrayLike; + return result; -},{"./getLength":430,"./isLength":441}],438:[function(require,module,exports){ -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; + case "LogicalExpression": + var after = loc(); -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; + if (!ignoreResult) { + result = self.makeTempVar(); + } + + var left = explodeViaTempVar(result, path.get("left")); -/** - * 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) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} + if (expr.operator === "&&") { + self.jumpIfNot(left, after); + } else { + assert.strictEqual(expr.operator, "||"); + self.jumpIf(left, after); + } -module.exports = isIndex; + explodeViaTempVar(result, path.get("right"), ignoreResult); -},{}],439:[function(require,module,exports){ -var isArrayLike = require('./isArrayLike'), - isIndex = require('./isIndex'), - isObject = require('../lang/isObject'); + self.mark(after); -/** - * Checks if the provided 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)) { - var other = object[index]; - return value === value ? (value === other) : (other !== other); - } - return false; -} + return result; -module.exports = isIterateeCall; + case "ConditionalExpression": + var elseLoc = loc(); + var after = loc(); + var test = self.explodeExpression(path.get("test")); -},{"../lang/isObject":458,"./isArrayLike":437,"./isIndex":438}],440:[function(require,module,exports){ -var isArray = require('../lang/isArray'), - toObject = require('./toObject'); + self.jumpIfNot(test, elseLoc); -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; + if (!ignoreResult) { + result = self.makeTempVar(); + } -/** - * 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) { - var type = typeof value; - if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { - return true; - } - if (isArray(value)) { - return false; - } - var result = !reIsDeepProp.test(value); - return result || (object != null && value in toObject(object)); -} + explodeViaTempVar(result, path.get("consequent"), ignoreResult); + self.jump(after); -module.exports = isKey; + self.mark(elseLoc); + explodeViaTempVar(result, path.get("alternate"), ignoreResult); -},{"../lang/isArray":452,"./toObject":447}],441:[function(require,module,exports){ -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; + self.mark(after); -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} + return result; -module.exports = isLength; + case "UnaryExpression": + return finish(b.unaryExpression( + expr.operator, + // Can't (and don't need to) break up the syntax of the argument. + // Think about delete a[b]. + self.explodeExpression(path.get("argument")), + !!expr.prefix + )); -},{}],442:[function(require,module,exports){ -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} + case "BinaryExpression": + return finish(b.binaryExpression( + expr.operator, + explodeViaTempVar(null, path.get("left")), + explodeViaTempVar(null, path.get("right")) + )); -module.exports = isObjectLike; + case "AssignmentExpression": + return finish(b.assignmentExpression( + expr.operator, + self.explodeExpression(path.get("left")), + self.explodeExpression(path.get("right")) + )); -},{}],443:[function(require,module,exports){ -var isObject = require('../lang/isObject'); + case "UpdateExpression": + return finish(b.updateExpression( + expr.operator, + self.explodeExpression(path.get("argument")), + expr.prefix + )); -/** - * 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); -} + case "YieldExpression": + var after = loc(); + var arg = expr.argument && self.explodeExpression(path.get("argument")); -module.exports = isStrictComparable; + if (arg && expr.delegate) { + var result = self.makeTempVar(); -},{"../lang/isObject":458}],444:[function(require,module,exports){ -var baseForIn = require('./baseForIn'), - isObjectLike = require('./isObjectLike'); + self.emit(b.returnStatement(b.callExpression( + self.contextProperty("delegateYield"), [ + arg, + b.literal(result.property.name), + after + ] + ))); -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; + self.mark(after); -/** Used for native method references. */ -var objectProto = Object.prototype; + return result; + } -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + self.emitAssign(self.contextProperty("next"), after); + self.emit(b.returnStatement(arg || null)); + self.mark(after); -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; + return self.contextProperty("sent"); + default: + throw new Error( + "unknown Expression of type " + + JSON.stringify(expr.type)); + } +}; + +},{"./leap":477,"./meta":478,"./util":479,"assert":2,"recast":506}],476:[function(require,module,exports){ /** - * A fallback implementation of `_.isPlainObject` which checks if `value` - * is an object created by the `Object` constructor or has a `[[Prototype]]` - * of `null`. + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. */ -function shimIsPlainObject(value) { - var Ctor; - // Exit early for non `Object` objects. - if (!(isObjectLike(value) && objToString.call(value) == objectTag) || - (!hasOwnProperty.call(value, 'constructor') && - (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { - return false; - } - // IE < 9 iterates inherited properties before own properties. If the first - // iterated property is an object's own property then there are no inherited - // enumerable properties. - var result; - // In most environments an object's own properties are iterated before - // its inherited properties. If the last iterated property is an object's - // own property then there are no inherited enumerable properties. - baseForIn(value, function(subValue, key) { - result = key; - }); - return result === undefined || hasOwnProperty.call(value, result); -} +var assert = require("assert"); +var types = require("recast").types; +var n = types.namedTypes; +var b = types.builders; +var hasOwn = Object.prototype.hasOwnProperty; -module.exports = shimIsPlainObject; +// The hoist function takes a FunctionExpression or FunctionDeclaration +// and replaces any Declaration nodes in its body with assignments, then +// returns a VariableDeclaration containing just the names of the removed +// declarations. +exports.hoist = function(funPath) { + assert.ok(funPath instanceof types.NodePath); + n.Function.assert(funPath.value); -},{"./baseForIn":392,"./isObjectLike":442}],445:[function(require,module,exports){ -var isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isIndex = require('./isIndex'), - isLength = require('./isLength'), - keysIn = require('../object/keysIn'); + var vars = {}; -/** Used for native method references. */ -var objectProto = Object.prototype; + function varDeclToExpr(vdec, includeIdentifiers) { + n.VariableDeclaration.assert(vdec); + var exprs = []; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + vdec.declarations.forEach(function(dec) { + vars[dec.id.name] = dec.id; -/** - * A fallback implementation of `Object.keys` which creates an array of the - * own enumerable property names of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function shimKeys(object) { - var props = keysIn(object), - propsLength = props.length, - length = propsLength && object.length; + if (dec.init) { + exprs.push(b.assignmentExpression( + "=", dec.id, dec.init + )); + } else if (includeIdentifiers) { + exprs.push(dec.id); + } + }); - var allowIndexes = !!length && isLength(length) && - (isArray(object) || isArguments(object)); + if (exprs.length === 0) + return null; - var index = -1, - result = []; + if (exprs.length === 1) + return exprs[0]; - while (++index < propsLength) { - var key = props[index]; - if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { - result.push(key); - } + return b.sequenceExpression(exprs); } - return result; -} -module.exports = shimKeys; + types.visit(funPath.get("body"), { + visitVariableDeclaration: function(path) { + var expr = varDeclToExpr(path.value, false); + if (expr === null) { + path.replace(); + } else { + // We don't need to traverse this expression any further because + // there can't be any new declarations inside an expression. + return b.expressionStatement(expr); + } -},{"../lang/isArguments":451,"../lang/isArray":452,"../object/keysIn":469,"./isIndex":438,"./isLength":441}],446:[function(require,module,exports){ -/** - * An implementation of `_.uniq` optimized for sorted arrays without support - * for callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate-value-free array. - */ -function sortedUniq(array, iteratee) { - var seen, - index = -1, - length = array.length, - resIndex = -1, - result = []; + // Since the original node has been either removed or replaced, + // avoid traversing it any further. + return false; + }, - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value, index, array) : value; + visitForStatement: function(path) { + var init = path.value.init; + if (n.VariableDeclaration.check(init)) { + path.get("init").replace(varDeclToExpr(init, false)); + } + this.traverse(path); + }, - if (!index || seen !== computed) { - seen = computed; - result[++resIndex] = value; - } - } - return result; -} + visitForInStatement: function(path) { + var left = path.value.left; + if (n.VariableDeclaration.check(left)) { + path.get("left").replace(varDeclToExpr(left, true)); + } + this.traverse(path); + }, -module.exports = sortedUniq; + visitFunctionDeclaration: function(path) { + var node = path.value; + vars[node.id.name] = node.id; -},{}],447:[function(require,module,exports){ -var isObject = require('../lang/isObject'); + var parentNode = path.parent.node; + var assignment = b.expressionStatement( + b.assignmentExpression( + "=", + node.id, + b.functionExpression( + node.id, + node.params, + node.body, + node.generator, + node.expression + ) + ) + ); -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} + if (n.BlockStatement.check(path.parent.node)) { + // Insert the assignment form before the first statement in the + // enclosing block. + path.parent.get("body").unshift(assignment); -module.exports = toObject; + // Remove the function declaration now that we've inserted the + // equivalent assignment form at the beginning of the block. + path.replace(); -},{"../lang/isObject":458}],448:[function(require,module,exports){ -var baseToString = require('./baseToString'), - isArray = require('../lang/isArray'); + } else { + // If the parent node is not a block statement, then we can just + // replace the declaration with the equivalent assignment form + // without worrying about hoisting it. + path.replace(assignment); + } -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; + // Don't hoist variables out of inner functions. + return false; + }, -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; + visitFunctionExpression: function(path) { + // Don't descend into nested function expressions. + return false; + } + }); -/** - * Converts `value` to property path array if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Array} Returns the property path array. - */ -function toPath(value) { - if (isArray(value)) { - return value; - } - var result = []; - baseToString(value).replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + var paramNames = {}; + funPath.get("params").each(function(paramPath) { + var param = paramPath.value; + if (n.Identifier.check(param)) { + paramNames[param.name] = param; + } else { + // Variables declared by destructuring parameter patterns will be + // harmlessly re-declared. + } }); - return result; -} -module.exports = toPath; + var declarations = []; -},{"../lang/isArray":452,"./baseToString":413}],449:[function(require,module,exports){ -var baseClone = require('../internal/baseClone'), - bindCallback = require('../internal/bindCallback'), - isIterateeCall = require('../internal/isIterateeCall'); + Object.keys(vars).forEach(function(name) { + if (!hasOwn.call(paramNames, name)) { + declarations.push(b.variableDeclarator(vars[name], null)); + } + }); + + if (declarations.length === 0) { + return null; // Be sure to handle this case! + } + + return b.variableDeclaration("var", declarations); +}; +},{"assert":2,"recast":506}],477:[function(require,module,exports){ /** - * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned, - * otherwise they are assigned by reference. If `customizer` is provided it is - * invoked to produce the cloned values. If `customizer` returns `undefined` - * cloning is handled by the method instead. The `customizer` is bound to - * `thisArg` and invoked with two argument; (value [, index|key, object]). - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). - * The enumerable properties of `arguments` objects and objects created by - * constructors other than `Object` are cloned to plain `Object` objects. An - * empty object is returned for uncloneable values such as functions, DOM nodes, - * Maps, Sets, and WeakMaps. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {*} Returns the cloned value. - * @example - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * var shallow = _.clone(users); - * shallow[0] === users[0]; - * // => true - * - * var deep = _.clone(users, true); - * deep[0] === users[0]; - * // => false - * - * // using a customizer callback - * var el = _.clone(document.body, function(value) { - * if (_.isElement(value)) { - * return value.cloneNode(false); - * } - * }); + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. * - * el === document.body - * // => false - * el.nodeName - * // => BODY - * el.childNodes.length; - * // => 0 + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. */ -function clone(value, isDeep, customizer, thisArg) { - if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) { - isDeep = false; - } - else if (typeof isDeep == 'function') { - thisArg = customizer; - customizer = isDeep; - isDeep = false; - } - return typeof customizer == 'function' - ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1)) - : baseClone(value, isDeep); + +var assert = require("assert"); +var types = require("recast").types; +var n = types.namedTypes; +var b = types.builders; +var inherits = require("util").inherits; +var hasOwn = Object.prototype.hasOwnProperty; + +function Entry() { + assert.ok(this instanceof Entry); +} + +function FunctionEntry(returnLoc) { + Entry.call(this); + n.Literal.assert(returnLoc); + this.returnLoc = returnLoc; } -module.exports = clone; +inherits(FunctionEntry, Entry); +exports.FunctionEntry = FunctionEntry; -},{"../internal/baseClone":385,"../internal/bindCallback":416,"../internal/isIterateeCall":439}],450:[function(require,module,exports){ -var baseClone = require('../internal/baseClone'), - bindCallback = require('../internal/bindCallback'); +function LoopEntry(breakLoc, continueLoc, label) { + Entry.call(this); -/** - * Creates a deep clone of `value`. If `customizer` is provided it is invoked - * to produce the cloned values. If `customizer` returns `undefined` cloning - * is handled by the method instead. The `customizer` is bound to `thisArg` - * and invoked with two argument; (value [, index|key, object]). - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). - * The enumerable properties of `arguments` objects and objects created by - * constructors other than `Object` are cloned to plain `Object` objects. An - * empty object is returned for uncloneable values such as functions, DOM nodes, - * Maps, Sets, and WeakMaps. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {*} Returns the deep cloned value. - * @example - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * var deep = _.cloneDeep(users); - * deep[0] === users[0]; - * // => false - * - * // using a customizer callback - * var el = _.cloneDeep(document.body, function(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * }); - * - * el === document.body - * // => false - * el.nodeName - * // => BODY - * el.childNodes.length; - * // => 20 - */ -function cloneDeep(value, customizer, thisArg) { - return typeof customizer == 'function' - ? baseClone(value, true, bindCallback(customizer, thisArg, 1)) - : baseClone(value, true); + n.Literal.assert(breakLoc); + n.Literal.assert(continueLoc); + + if (label) { + n.Identifier.assert(label); + } else { + label = null; + } + + this.breakLoc = breakLoc; + this.continueLoc = continueLoc; + this.label = label; } -module.exports = cloneDeep; +inherits(LoopEntry, Entry); +exports.LoopEntry = LoopEntry; -},{"../internal/baseClone":385,"../internal/bindCallback":416}],451:[function(require,module,exports){ -var isArrayLike = require('../internal/isArrayLike'), - isObjectLike = require('../internal/isObjectLike'); +function SwitchEntry(breakLoc) { + Entry.call(this); + n.Literal.assert(breakLoc); + this.breakLoc = breakLoc; +} -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; +inherits(SwitchEntry, Entry); +exports.SwitchEntry = SwitchEntry; -/** Used for native method references. */ -var objectProto = Object.prototype; +function TryEntry(firstLoc, catchEntry, finallyEntry) { + Entry.call(this); -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; + n.Literal.assert(firstLoc); -/** - * Checks if `value` is classified as an `arguments` object. - * - * @static - * @memberOf _ - * @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) { - return isObjectLike(value) && isArrayLike(value) && objToString.call(value) == argsTag; -} + if (catchEntry) { + assert.ok(catchEntry instanceof CatchEntry); + } else { + catchEntry = null; + } -module.exports = isArguments; + if (finallyEntry) { + assert.ok(finallyEntry instanceof FinallyEntry); + } else { + finallyEntry = null; + } -},{"../internal/isArrayLike":437,"../internal/isObjectLike":442}],452:[function(require,module,exports){ -var getNative = require('../internal/getNative'), - isLength = require('../internal/isLength'), - isObjectLike = require('../internal/isObjectLike'); + // Have to have one or the other (or both). + assert.ok(catchEntry || finallyEntry); -/** `Object#toString` result references. */ -var arrayTag = '[object Array]'; + this.firstLoc = firstLoc; + this.catchEntry = catchEntry; + this.finallyEntry = finallyEntry; +} -/** Used for native method references. */ -var objectProto = Object.prototype; +inherits(TryEntry, Entry); +exports.TryEntry = TryEntry; -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; +function CatchEntry(firstLoc, paramId) { + Entry.call(this); -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsArray = getNative(Array, 'isArray'); + n.Literal.assert(firstLoc); + n.Identifier.assert(paramId); -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @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(function() { return arguments; }()); - * // => false - */ -var isArray = nativeIsArray || function(value) { - return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; -}; + this.firstLoc = firstLoc; + this.paramId = paramId; +} -module.exports = isArray; +inherits(CatchEntry, Entry); +exports.CatchEntry = CatchEntry; -},{"../internal/getNative":432,"../internal/isLength":441,"../internal/isObjectLike":442}],453:[function(require,module,exports){ -var isObjectLike = require('../internal/isObjectLike'); +function FinallyEntry(firstLoc, afterLoc) { + Entry.call(this); + n.Literal.assert(firstLoc); + n.Literal.assert(afterLoc); + this.firstLoc = firstLoc; + this.afterLoc = afterLoc; +} -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]'; +inherits(FinallyEntry, Entry); +exports.FinallyEntry = FinallyEntry; -/** Used for native method references. */ -var objectProto = Object.prototype; +function LabeledEntry(breakLoc, label) { + Entry.call(this); -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; + n.Literal.assert(breakLoc); + n.Identifier.assert(label); -/** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @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) && objToString.call(value) == boolTag); + this.breakLoc = breakLoc; + this.label = label; } -module.exports = isBoolean; +inherits(LabeledEntry, Entry); +exports.LabeledEntry = LabeledEntry; -},{"../internal/isObjectLike":442}],454:[function(require,module,exports){ -var isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLike = require('../internal/isArrayLike'), - isFunction = require('./isFunction'), - isObjectLike = require('../internal/isObjectLike'), - isString = require('./isString'), - keys = require('../object/keys'); +function LeapManager(emitter) { + assert.ok(this instanceof LeapManager); -/** - * Checks if `value` is empty. A value is considered empty unless it is an - * `arguments` object, array, string, or jQuery-like collection with a length - * greater than `0` or an object with own enumerable properties. - * - * @static - * @memberOf _ - * @category Lang - * @param {Array|Object|string} value The value to inspect. - * @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 (value == null) { - return true; - } - if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || - (isObjectLike(value) && isFunction(value.splice)))) { - return !value.length; - } - return !keys(value).length; + var Emitter = require("./emit").Emitter; + assert.ok(emitter instanceof Emitter); + + this.emitter = emitter; + this.entryStack = [new FunctionEntry(emitter.finalLoc)]; } -module.exports = isEmpty; +var LMp = LeapManager.prototype; +exports.LeapManager = LeapManager; -},{"../internal/isArrayLike":437,"../internal/isObjectLike":442,"../object/keys":468,"./isArguments":451,"./isArray":452,"./isFunction":455,"./isString":461}],455:[function(require,module,exports){ -(function (global){ -var baseIsFunction = require('../internal/baseIsFunction'), - getNative = require('../internal/getNative'); +LMp.withEntry = function(entry, callback) { + assert.ok(entry instanceof Entry); + this.entryStack.push(entry); + try { + callback.call(this.emitter); + } finally { + var popped = this.entryStack.pop(); + assert.strictEqual(popped, entry); + } +}; -/** `Object#toString` result references. */ -var funcTag = '[object Function]'; +LMp._findLeapLocation = function(property, label) { + for (var i = this.entryStack.length - 1; i >= 0; --i) { + var entry = this.entryStack[i]; + var loc = entry[property]; + if (loc) { + if (label) { + if (entry.label && + entry.label.name === label.name) { + return loc; + } + } else if (entry instanceof LabeledEntry) { + // Ignore LabeledEntry entries unless we are actually breaking to + // a label. + } else { + return loc; + } + } + } -/** Used for native method references. */ -var objectProto = Object.prototype; + return null; +}; -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; +LMp.getBreakLoc = function(label) { + return this._findLeapLocation("breakLoc", label); +}; -/** Native method references. */ -var Uint8Array = getNative(global, 'Uint8Array'); +LMp.getContinueLoc = function(label) { + return this._findLeapLocation("continueLoc", label); +}; +},{"./emit":475,"assert":2,"recast":506,"util":28}],478:[function(require,module,exports){ /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. * - * _.isFunction(/abc/); - * // => false + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. */ -var isFunction = !(baseIsFunction(/x/) || (Uint8Array && !baseIsFunction(Uint8Array))) ? baseIsFunction : function(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 equivalents which return 'object' for typed array constructors. - return objToString.call(value) == funcTag; -}; -module.exports = isFunction; +var assert = require("assert"); +var m = require("private").makeAccessor(); +var types = require("recast").types; +var isArray = types.builtInTypes.array; +var n = types.namedTypes; +var hasOwn = Object.prototype.hasOwnProperty; -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../internal/baseIsFunction":400,"../internal/getNative":432}],456:[function(require,module,exports){ -var escapeRegExp = require('../string/escapeRegExp'), - isObjectLike = require('../internal/isObjectLike'); +function makePredicate(propertyName, knownTypes) { + function onlyChildren(node) { + n.Node.assert(node); -/** `Object#toString` result references. */ -var funcTag = '[object Function]'; + // Assume no side effects until we find out otherwise. + var result = false; -/** Used to detect host constructors (Safari > 5). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; + function check(child) { + if (result) { + // Do nothing. + } else if (isArray.check(child)) { + child.some(check); + } else if (n.Node.check(child)) { + assert.strictEqual(result, false); + result = predicate(child); + } + return result; + } -/** Used for native method references. */ -var objectProto = Object.prototype; + types.eachField(node, function(name, child) { + check(child); + }); -/** Used to resolve the decompiled source of functions. */ -var fnToString = Function.prototype.toString; + return result; + } -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + function predicate(node) { + n.Node.assert(node); -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; + var meta = m(node); + if (hasOwn.call(meta, propertyName)) + return meta[propertyName]; -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - escapeRegExp(fnToString.call(hasOwnProperty)) - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); + // Certain types are "opaque," which means they have no side + // effects or leaps and we don't care about their subexpressions. + if (hasOwn.call(opaqueTypes, node.type)) + return meta[propertyName] = false; + + if (hasOwn.call(knownTypes, node.type)) + return meta[propertyName] = true; + + return meta[propertyName] = onlyChildren(node); + } + + predicate.onlyChildren = onlyChildren; + + return predicate; +} + +var opaqueTypes = { + FunctionExpression: true +}; + +// These types potentially have side effects regardless of what side +// effects their subexpressions have. +var sideEffectTypes = { + CallExpression: true, // Anything could happen! + ForInStatement: true, // Modifies the key variable. + UnaryExpression: true, // Think delete. + BinaryExpression: true, // Might invoke .toString() or .valueOf(). + AssignmentExpression: true, // Side-effecting by definition. + UpdateExpression: true, // Updates are essentially assignments. + NewExpression: true // Similar to CallExpression. +}; + +// These types are the direct cause of all leaps in control flow. +var leapTypes = { + YieldExpression: true, + BreakStatement: true, + ContinueStatement: true, + ReturnStatement: true, + ThrowStatement: true +}; + +// All leap types are also side effect types. +for (var type in leapTypes) { + if (hasOwn.call(leapTypes, type)) { + sideEffectTypes[type] = leapTypes[type]; + } +} + +exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes); +exports.containsLeap = makePredicate("containsLeap", leapTypes); +},{"assert":2,"private":474,"recast":506}],479:[function(require,module,exports){ /** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @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 + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. * - * _.isNative(_); - * // => false + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. */ -function isNative(value) { - if (value == null) { + +var assert = require("assert"); +var types = require("recast").types; +var n = types.namedTypes; +var b = types.builders; +var hasOwn = Object.prototype.hasOwnProperty; + +exports.defaults = function(obj) { + var len = arguments.length; + var extension; + + for (var i = 1; i < len; ++i) { + if ((extension = arguments[i])) { + for (var key in extension) { + if (hasOwn.call(extension, key) && !hasOwn.call(obj, key)) { + obj[key] = extension[key]; + } + } + } + } + + return obj; +}; + +exports.runtimeProperty = function(name) { + return b.memberExpression( + b.identifier("regeneratorRuntime"), + b.identifier(name), + false + ); +}; + +// Inspired by the isReference function from ast-util: +// https://github.com/eventualbuddha/ast-util/blob/9bf91c5ce8/lib/index.js#L466-L506 +exports.isReference = function(path, name) { + var node = path.value; + + if (!n.Identifier.check(node)) { return false; } - if (objToString.call(value) == funcTag) { - return reIsNative.test(fnToString.call(value)); + + if (name && node.name !== name) { + return false; } - return isObjectLike(value) && reIsHostCtor.test(value); -} -module.exports = isNative; + var parent = path.parent.value; + + switch (parent.type) { + case "VariableDeclarator": + return path.name === "init"; + + case "MemberExpression": + return path.name === "object" || ( + parent.computed && path.name === "property" + ); -},{"../internal/isObjectLike":442,"../string/escapeRegExp":473}],457:[function(require,module,exports){ -var isObjectLike = require('../internal/isObjectLike'); + case "FunctionExpression": + case "FunctionDeclaration": + case "ArrowFunctionExpression": + if (path.name === "id") { + return false; + } -/** `Object#toString` result references. */ -var numberTag = '[object Number]'; + if (path.parentPath.name === "params" && + parent.params === path.parentPath.value && + parent.params[path.name] === node) { + return false; + } -/** Used for native method references. */ -var objectProto = Object.prototype; + return true; -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; + case "ClassDeclaration": + case "ClassExpression": + return path.name !== "id"; -/** - * 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 _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isNumber(8.4); - * // => true - * - * _.isNumber(NaN); - * // => true - * - * _.isNumber('8.4'); - * // => false - */ -function isNumber(value) { - return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag); -} + case "CatchClause": + return path.name !== "param"; -module.exports = isNumber; + case "Property": + case "MethodDefinition": + return path.name !== "key"; + + case "ImportSpecifier": + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "LabeledStatement": + return false; + + default: + return true; + } +}; -},{"../internal/isObjectLike":442}],458:[function(require,module,exports){ +},{"assert":2,"recast":506}],480:[function(require,module,exports){ /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @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 + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. * - * _.isObject(1); - * // => false + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} -module.exports = isObject; +var assert = require("assert"); +var fs = require("fs"); +var recast = require("recast"); +var types = recast.types; +var n = types.namedTypes; +var b = types.builders; +var isArray = types.builtInTypes.array; +var isObject = types.builtInTypes.object; +var NodePath = types.NodePath; +var hoist = require("./hoist").hoist; +var Emitter = require("./emit").Emitter; +var util = require("./util"); +var runtimeProperty = util.runtimeProperty; +var getMarkInfo = require("private").makeAccessor(); -},{}],459:[function(require,module,exports){ -var getNative = require('../internal/getNative'), - shimIsPlainObject = require('../internal/shimIsPlainObject'); +exports.transform = function transform(node, options) { + options = options || {}; -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; + var path = node instanceof NodePath ? node : new NodePath(node); + visitor.visit(path, options); + node = path.value; -/** Used for native method references. */ -var objectProto = Object.prototype; + if (options.includeRuntime === true || + (options.includeRuntime === 'if used' && visitor.wasChangeReported())) { + injectRuntime(n.File.check(node) ? node.program : node); + } -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; + options.madeChanges = visitor.wasChangeReported(); -/** Native method references. */ -var getPrototypeOf = getNative(Object, 'getPrototypeOf'); + return node; +}; -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * **Note:** This method assumes objects created by the `Object` constructor - * have no inherited enumerable properties. - * - * @static - * @memberOf _ - * @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 - */ -var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { - if (!(value && objToString.call(value) == objectTag)) { - return false; - } - var valueOf = getNative(value, 'valueOf'), - objProto = valueOf && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); +function injectRuntime(program) { + n.Program.assert(program); - return objProto - ? (value == objProto || getPrototypeOf(value) == objProto) - : shimIsPlainObject(value); -}; + // Include the runtime by modifying the AST rather than by concatenating + // strings. This technique will allow for more accurate source mapping. + var runtimePath = require("..").runtime.path; + var runtime = fs.readFileSync(runtimePath, "utf8"); + var runtimeBody = recast.parse(runtime, { + sourceFileName: runtimePath + }).program.body; -module.exports = isPlainObject; + var body = program.body; + body.unshift.apply(body, runtimeBody); +} -},{"../internal/getNative":432,"../internal/shimIsPlainObject":444}],460:[function(require,module,exports){ -var isObjectLike = require('../internal/isObjectLike'); +var visitor = types.PathVisitor.fromMethodsObject({ + reset: function(node, options) { + this.options = options; + }, -/** `Object#toString` result references. */ -var regexpTag = '[object RegExp]'; + visitFunction: function(path) { + // Calling this.traverse(path) first makes for a post-order traversal. + this.traverse(path); -/** Used for native method references. */ -var objectProto = Object.prototype; + var node = path.value; + var shouldTransformAsync = node.async && !this.options.disableAsync; -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; + if (!node.generator && !shouldTransformAsync) { + return; + } -/** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @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 isObjectLike(value) && objToString.call(value) == regexpTag; -} + this.reportChanged(); -module.exports = isRegExp; + if (node.expression) { + // Transform expression lambdas into normal functions. + node.expression = false; + node.body = b.blockStatement([ + b.returnStatement(node.body) + ]); + } -},{"../internal/isObjectLike":442}],461:[function(require,module,exports){ -var isObjectLike = require('../internal/isObjectLike'); + if (shouldTransformAsync) { + awaitVisitor.visit(path.get("body")); + } -/** `Object#toString` result references. */ -var stringTag = '[object String]'; + var outerBody = []; + var innerBody = []; + var bodyPath = path.get("body", "body"); -/** Used for native method references. */ -var objectProto = Object.prototype; + bodyPath.each(function(childPath) { + var node = childPath.value; + if (node && node._blockHoist != null) { + outerBody.push(node); + } else { + innerBody.push(node); + } + }); -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; + if (outerBody.length > 0) { + // Only replace the inner body if we actually hoisted any statements + // to the outer body. + bodyPath.replace(innerBody); + } -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @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' || (isObjectLike(value) && objToString.call(value) == stringTag); -} + var outerFnExpr = getOuterFnExpr(path); + // Note that getOuterFnExpr has the side-effect of ensuring that the + // function has a name (so node.id will always be an Identifier), even + // if a temporary name has to be synthesized. + n.Identifier.assert(node.id); + var innerFnId = b.identifier(node.id.name + "$"); + var contextId = path.scope.declareTemporary("context$"); + var argsId = path.scope.declareTemporary("args$"); -module.exports = isString; + // Turn all declarations into vars, and replace the original + // declarations with equivalent assignment expressions. + var vars = hoist(path); -},{"../internal/isObjectLike":442}],462:[function(require,module,exports){ -var isLength = require('../internal/isLength'), - isObjectLike = require('../internal/isObjectLike'); + var didRenameArguments = renameArguments(path, argsId); + if (didRenameArguments) { + vars = vars || b.variableDeclaration("var", []); + vars.declarations.push(b.variableDeclarator( + argsId, b.identifier("arguments") + )); + } -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; + var emitter = new Emitter(contextId); + emitter.explode(path.get("body")); -var arrayBufferTag = '[object ArrayBuffer]', - 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]'; + if (vars && vars.declarations.length > 0) { + outerBody.push(vars); + } -/** 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[dateTag] = typedArrayTags[errorTag] = -typedArrayTags[funcTag] = typedArrayTags[mapTag] = -typedArrayTags[numberTag] = typedArrayTags[objectTag] = -typedArrayTags[regexpTag] = typedArrayTags[setTag] = -typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + var wrapArgs = [ + emitter.getContextFunction(innerFnId), + // Async functions that are not generators don't care about the + // outer function because they don't need it to be marked and don't + // inherit from its .prototype. + node.generator ? outerFnExpr : b.literal(null), + b.thisExpression() + ]; -/** Used for native method references. */ -var objectProto = Object.prototype; + var tryLocsList = emitter.getTryLocsList(); + if (tryLocsList) { + wrapArgs.push(tryLocsList); + } -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; + var wrapCall = b.callExpression( + runtimeProperty(shouldTransformAsync ? "async" : "wrap"), + wrapArgs + ); -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @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[objToString.call(value)]; -} + outerBody.push(b.returnStatement(wrapCall)); + node.body = b.blockStatement(outerBody); -module.exports = isTypedArray; + var wasGeneratorFunction = node.generator; + if (wasGeneratorFunction) { + node.generator = false; + } -},{"../internal/isLength":441,"../internal/isObjectLike":442}],463:[function(require,module,exports){ -var baseCopy = require('../internal/baseCopy'), - keysIn = require('../object/keysIn'); + if (shouldTransformAsync) { + node.async = false; + } -/** - * Converts `value` to a plain object flattening inherited enumerable - * properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @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 baseCopy(value, keysIn(value)); -} + if (wasGeneratorFunction && + n.Expression.check(node)) { + return b.callExpression(runtimeProperty("mark"), [node]); + } + }, -module.exports = toPlainObject; + visitForOfStatement: function(path) { + this.traverse(path); -},{"../internal/baseCopy":387,"../object/keysIn":469}],464:[function(require,module,exports){ -var assignWith = require('../internal/assignWith'), - baseAssign = require('../internal/baseAssign'), - createAssigner = require('../internal/createAssigner'); + var node = path.value; + var tempIterId = path.scope.declareTemporary("t$"); + var tempIterDecl = b.variableDeclarator( + tempIterId, + b.callExpression( + runtimeProperty("values"), + [node.right] + ) + ); -/** - * Assigns own enumerable properties of source object(s) to the destination - * object. Subsequent sources overwrite property assignments of previous sources. - * If `customizer` is provided it is invoked to produce the assigned values. - * The `customizer` is bound to `thisArg` and invoked with five arguments: - * (objectValue, sourceValue, key, object, source). - * - * **Note:** This method mutates `object` and is based on - * [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). - * - * @static - * @memberOf _ - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {Object} Returns `object`. - * @example - * - * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); - * // => { 'user': 'fred', 'age': 40 } - * - * // using a customizer callback - * var defaults = _.partialRight(_.assign, function(value, other) { - * return _.isUndefined(value) ? other : value; - * }); - * - * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } - */ -var assign = createAssigner(function(object, source, customizer) { - return customizer - ? assignWith(object, source, customizer) - : baseAssign(object, source); -}); + var tempInfoId = path.scope.declareTemporary("t$"); + var tempInfoDecl = b.variableDeclarator(tempInfoId, null); -module.exports = assign; + var init = node.left; + var loopId; + if (n.VariableDeclaration.check(init)) { + loopId = init.declarations[0].id; + init.declarations.push(tempIterDecl, tempInfoDecl); + } else { + loopId = init; + init = b.variableDeclaration("var", [ + tempIterDecl, + tempInfoDecl + ]); + } + n.Identifier.assert(loopId); -},{"../internal/assignWith":382,"../internal/baseAssign":383,"../internal/createAssigner":421}],465:[function(require,module,exports){ -var assign = require('./assign'), - assignDefaults = require('../internal/assignDefaults'), - restParam = require('../function/restParam'); + var loopIdAssignExprStmt = b.expressionStatement( + b.assignmentExpression( + "=", + loopId, + b.memberExpression( + tempInfoId, + b.identifier("value"), + false + ) + ) + ); + + if (n.BlockStatement.check(node.body)) { + node.body.body.unshift(loopIdAssignExprStmt); + } else { + node.body = b.blockStatement([ + loopIdAssignExprStmt, + node.body + ]); + } -/** - * Assigns own enumerable properties of source object(s) to the destination - * object for all destination properties that resolve to `undefined`. Once a - * property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } - */ -var defaults = restParam(function(args) { - var object = args[0]; - if (object == null) { - return object; + return b.forStatement( + init, + b.unaryExpression( + "!", + b.memberExpression( + b.assignmentExpression( + "=", + tempInfoId, + b.callExpression( + b.memberExpression( + tempIterId, + b.identifier("next"), + false + ), + [] + ) + ), + b.identifier("done"), + false + ) + ), + null, + node.body + ); } - args.push(assignDefaults); - return assign.apply(undefined, args); }); -module.exports = defaults; +// Given a NodePath for a Function, return an Expression node that can be +// used to refer reliably to the function object from inside the function. +// This expression is essentially a replacement for arguments.callee, with +// the key advantage that it works in strict mode. +function getOuterFnExpr(funPath) { + var node = funPath.value; + n.Function.assert(node); -},{"../function/restParam":374,"../internal/assignDefaults":381,"./assign":464}],466:[function(require,module,exports){ -module.exports = require('./assign'); + if (node.generator && // Non-generator functions don't need to be marked. + n.FunctionDeclaration.check(node)) { + var pp = funPath.parent; -},{"./assign":464}],467:[function(require,module,exports){ -var baseGet = require('../internal/baseGet'), - baseSlice = require('../internal/baseSlice'), - isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isIndex = require('../internal/isIndex'), - isKey = require('../internal/isKey'), - isLength = require('../internal/isLength'), - last = require('../array/last'), - toPath = require('../internal/toPath'); + while (pp && !(n.BlockStatement.check(pp.value) || + n.Program.check(pp.value))) { + pp = pp.parent; + } -/** Used for native method references. */ -var objectProto = Object.prototype; + if (!pp) { + return node.id; + } -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + var markDecl = getRuntimeMarkDecl(pp); + var markedArray = markDecl.declarations[0].id; + var funDeclIdArray = markDecl.declarations[0].init.callee.object; + n.ArrayExpression.assert(funDeclIdArray); -/** - * Checks if `path` is a direct property. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` is a direct property, else `false`. - * @example - * - * var object = { 'a': { 'b': { 'c': 3 } } }; - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b.c'); - * // => true - * - * _.has(object, ['a', 'b', 'c']); - * // => true - */ -function has(object, path) { - if (object == null) { - return false; - } - var result = hasOwnProperty.call(object, path); - if (!result && !isKey(path)) { - path = toPath(path); - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - if (object == null) { - return false; - } - path = last(path); - result = hasOwnProperty.call(object, path); + var index = funDeclIdArray.elements.length; + funDeclIdArray.elements.push(node.id); + + return b.memberExpression( + markedArray, + b.literal(index), + true + ); } - return result || (isLength(object.length) && isIndex(path, object.length) && - (isArray(object) || isArguments(object))); + + return node.id || ( + node.id = funPath.scope.parent.declareTemporary("callee$") + ); } -module.exports = has; +function getRuntimeMarkDecl(blockPath) { + assert.ok(blockPath instanceof NodePath); + var block = blockPath.node; + isArray.assert(block.body); -},{"../array/last":363,"../internal/baseGet":396,"../internal/baseSlice":410,"../internal/isIndex":438,"../internal/isKey":440,"../internal/isLength":441,"../internal/toPath":448,"../lang/isArguments":451,"../lang/isArray":452}],468:[function(require,module,exports){ -var getNative = require('../internal/getNative'), - isArrayLike = require('../internal/isArrayLike'), - isObject = require('../lang/isObject'), - shimKeys = require('../internal/shimKeys'); + var info = getMarkInfo(block); + if (info.decl) { + return info.decl; + } -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeKeys = getNative(Object, 'keys'); + info.decl = b.variableDeclaration("var", [ + b.variableDeclarator( + blockPath.scope.declareTemporary("marked"), + b.callExpression( + b.memberExpression( + b.arrayExpression([]), + b.identifier("map"), + false + ), + [runtimeProperty("mark")] + ) + ) + ]); -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys) - * for more details. - * - * @static - * @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'] - */ -var keys = !nativeKeys ? shimKeys : function(object) { - var Ctor = object == null ? null : object.constructor; - if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object != 'function' && isArrayLike(object))) { - return shimKeys(object); + for (var i = 0; i < block.body.length; ++i) { + if (!shouldNotHoistAbove(blockPath.get("body", i))) { + break; + } } - return isObject(object) ? nativeKeys(object) : []; -}; -module.exports = keys; + blockPath.get("body").insertAt(i, info.decl); -},{"../internal/getNative":432,"../internal/isArrayLike":437,"../internal/shimKeys":445,"../lang/isObject":458}],469:[function(require,module,exports){ -var isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isIndex = require('../internal/isIndex'), - isLength = require('../internal/isLength'), - isObject = require('../lang/isObject'); + return info.decl; +} -/** Used for native method references. */ -var objectProto = Object.prototype; +function shouldNotHoistAbove(stmtPath) { + var value = stmtPath.value; + n.Statement.assert(value); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + // If the first statement is a "use strict" declaration, make sure to + // insert hoisted declarations afterwards. + return n.ExpressionStatement.check(value) && + n.Literal.check(value.expression) && + value.expression.value === "use strict"; +} -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @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; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - if (object == null) { - return []; - } - if (!isObject(object)) { - object = Object(object); - } - var length = object.length; - length = (length && isLength(length) && - (isArray(object) || isArguments(object)) && length) || 0; +function renameArguments(funcPath, argsId) { + assert.ok(funcPath instanceof types.NodePath); + var func = funcPath.value; + var didRenameArguments = false; - var Ctor = object.constructor, - index = -1, - isProto = typeof Ctor == 'function' && Ctor.prototype === object, - result = Array(length), - skipIndexes = length > 0; + recast.visit(funcPath, { + visitFunction: function(path) { + if (path.value === func) { + this.traverse(path); + } else { + return false; + } + }, - while (++index < length) { - result[index] = (index + ''); - } - for (var key in object) { - if (!(skipIndexes && isIndex(key, length)) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); + visitIdentifier: function(path) { + if (path.value.name === "arguments" && + util.isReference(path)) { + path.replace(argsId); + didRenameArguments = true; + return false; + } + + this.traverse(path); } - } - return result; -} + }); -module.exports = keysIn; + // If the traversal replaced any arguments references, then we need to + // alias the outer function's arguments binding (be it the implicit + // arguments object or some other parameter or variable) to the variable + // named by argsId. + return didRenameArguments; +} -},{"../internal/isIndex":438,"../internal/isLength":441,"../lang/isArguments":451,"../lang/isArray":452,"../lang/isObject":458}],470:[function(require,module,exports){ -var baseMerge = require('../internal/baseMerge'), - createAssigner = require('../internal/createAssigner'); +var awaitVisitor = types.PathVisitor.fromMethodsObject({ + visitFunction: function(path) { + return false; // Don't descend into nested function scopes. + }, -/** - * Recursively merges own enumerable properties of the source object(s), that - * don't resolve to `undefined` into the destination object. Subsequent sources - * overwrite property assignments of previous sources. If `customizer` is - * provided it 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 bound to `thisArg` and invoked - * with five arguments: (objectValue, sourceValue, key, object, source). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @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 }] } - * - * // using a customizer callback - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; - * - * _.merge(object, other, function(a, b) { - * if (_.isArray(a)) { - * return a.concat(b); - * } - * }); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } - */ -var merge = createAssigner(baseMerge); + visitAwaitExpression: function(path) { + // Convert await and await* expressions to yield expressions. + var argument = path.value.argument; -module.exports = merge; + // If the parser supports await* syntax using a boolean .all property + // (#171), desugar that syntax to yield Promise.all(argument). + if (path.value.all) { + argument = b.callExpression( + b.memberExpression( + b.identifier("Promise"), + b.identifier("all"), + false + ), + [argument] + ); + } -},{"../internal/baseMerge":405,"../internal/createAssigner":421}],471:[function(require,module,exports){ -var keys = require('./keys'), - toObject = require('../internal/toObject'); + // Transforming `await x` to `yield regeneratorRuntime.awrap(x)` + // causes the argument to be wrapped in such a way that the runtime + // can distinguish between awaited and merely yielded values. + return b.yieldExpression( + b.callExpression( + runtimeProperty("awrap"), + [argument] + ), + false + ); + } +}); +},{"..":481,"./emit":475,"./hoist":476,"./util":479,"assert":2,"fs":1,"private":474,"recast":506}],481:[function(require,module,exports){ +(function (__dirname){ /** - * Creates a two dimensional array of the key-value pairs for `object`, - * e.g. `[[key1, value1], [key2, value2]]`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. - * @example + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. * - * _.pairs({ 'barney': 36, 'fred': 40 }); - * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. */ -function pairs(object) { - object = toObject(object); - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); +var assert = require("assert"); +var path = require("path"); +var fs = require("fs"); +var through = require("through"); +var transform = require("./lib/visit").transform; +var utils = require("./lib/util"); +var recast = require("recast"); +var types = recast.types; +var genOrAsyncFunExp = /\bfunction\s*\*|\basync\b/; +var blockBindingExp = /\b(let|const)\s+/; - while (++index < length) { - var key = props[index]; - result[index] = [key, object[key]]; +function exports(file, options) { + var data = []; + return through(write, end); + + function write(buf) { + data.push(buf); } - return result; -} -module.exports = pairs; + function end() { + this.queue(compile(data.join(""), options).code); + this.queue(null); + } +} -},{"../internal/toObject":447,"./keys":468}],472:[function(require,module,exports){ -var baseValues = require('../internal/baseValues'), - keys = require('./keys'); +// To get a writable stream for use as a browserify transform, call +// require("regenerator")(). +module.exports = exports; -/** - * Creates an array of the own enumerable property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @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 baseValues(object, keys(object)); +// To include the runtime globally in the current node process, call +// require("regenerator").runtime(). +function runtime() { + require("./runtime"); } +exports.runtime = runtime; +runtime.path = path.join(__dirname, "runtime.js"); -module.exports = values; +function compile(source, options) { + options = normalizeOptions(options); -},{"../internal/baseValues":415,"./keys":468}],473:[function(require,module,exports){ -var baseToString = require('../internal/baseToString'); + if (!genOrAsyncFunExp.test(source)) { + return { + // Shortcut: no generators or async functions to transform. + code: (options.includeRuntime === true ? fs.readFileSync( + path.join(__dirname, "runtime.js"), "utf-8" + ) + "\n" : "") + source + }; + } -/** - * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special). - * In addition to special characters the forward slash is escaped to allow for - * easier `eval` use and `Function` compilation. - */ -var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g, - reHasRegExpChars = RegExp(reRegExpChars.source); + var recastOptions = getRecastOptions(options); + var ast = recast.parse(source, recastOptions); + var nodePath = new types.NodePath(ast); + var programPath = nodePath.get("program"); -/** - * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?", - * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. - * - * @static - * @memberOf _ - * @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 = baseToString(string); - return (string && reHasRegExpChars.test(string)) - ? string.replace(reRegExpChars, '\\$&') - : string; -} + if (shouldVarify(source, options)) { + // Transpile let/const into var declarations. + varifyAst(programPath.node); + } + + transform(programPath, options); -module.exports = escapeRegExp; + return recast.print(nodePath, recastOptions); +} -},{"../internal/baseToString":413}],474:[function(require,module,exports){ -var baseToString = require('../internal/baseToString'); +function normalizeOptions(options) { + options = utils.defaults(options || {}, { + includeRuntime: false, + supportBlockBinding: true + }); -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; + if (!options.esprima) { + options.esprima = require("esprima-fb"); + } -/** - * Checks if `string` starts with the given target string. - * - * @static - * @memberOf _ - * @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 = baseToString(string); - position = position == null - ? 0 - : nativeMin(position < 0 ? 0 : (+position || 0), string.length); + assert.ok( + /harmony/.test(options.esprima.version), + "Bad esprima version: " + options.esprima.version + ); - return string.lastIndexOf(target, position) == position; + return options; } -module.exports = startsWith; - -},{"../internal/baseToString":413}],475:[function(require,module,exports){ -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @category Utility - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new function. - * @example - * - * var object = { 'user': 'fred' }; - * var getter = _.constant(object); - * - * getter() === object; - * // => true - */ -function constant(value) { - return function() { - return value; +function getRecastOptions(options) { + var recastOptions = { + range: true }; -} -module.exports = constant; + function copy(name) { + if (name in options) { + recastOptions[name] = options[name]; + } + } -},{}],476:[function(require,module,exports){ -/** - * This method returns the first argument provided to it. - * - * @static - * @memberOf _ - * @category Utility - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'user': 'fred' }; - * - * _.identity(object) === object; - * // => true - */ -function identity(value) { - return value; + copy("esprima"); + copy("sourceFileName"); + copy("sourceMapName"); + copy("inputSourceMap"); + copy("sourceRoot"); + + return recastOptions; } -module.exports = identity; +function shouldVarify(source, options) { + var supportBlockBinding = !!options.supportBlockBinding; + if (supportBlockBinding) { + if (!blockBindingExp.test(source)) { + supportBlockBinding = false; + } + } -},{}],477:[function(require,module,exports){ -var baseProperty = require('../internal/baseProperty'), - basePropertyDeep = require('../internal/basePropertyDeep'), - isKey = require('../internal/isKey'); + return supportBlockBinding; +} -/** - * Creates a function that returns the property value at `path` on a - * given object. - * - * @static - * @memberOf _ - * @category Utility - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. - * @example - * - * var objects = [ - * { 'a': { 'b': { 'c': 2 } } }, - * { 'a': { 'b': { 'c': 1 } } } - * ]; - * - * _.map(objects, _.property('a.b.c')); - * // => [2, 1] - * - * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); - * // => [1, 2] - */ -function property(path) { - return isKey(path) ? baseProperty(path) : basePropertyDeep(path); +function varify(source, options) { + var recastOptions = getRecastOptions(normalizeOptions(options)); + var ast = recast.parse(source, recastOptions); + varifyAst(ast.program); + return recast.print(ast, recastOptions).code; } -module.exports = property; +function varifyAst(ast) { + types.namedTypes.Program.assert(ast); -},{"../internal/baseProperty":407,"../internal/basePropertyDeep":408,"../internal/isKey":440}],478:[function(require,module,exports){ -module.exports = minimatch -minimatch.Minimatch = Minimatch + var defsResult = require("defs")(ast, { + ast: true, + disallowUnknownReferences: false, + disallowDuplicated: false, + disallowVars: false, + loopClosures: "iife" + }); -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} + if (defsResult.errors) { + throw new Error(defsResult.errors.join("\n")) + } -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') + return ast; +} -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' +// Convenience for just translating let/const to var declarations. +exports.varify = varify; -// * => any number of characters -var star = qmark + '*?' +// Allow packages that depend on Regenerator to use the same copy of +// ast-types, in case multiple versions are installed by NPM. +exports.types = types; -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' +// Transforms a string of source code, returning the { code, map? } result +// from recast.print. +exports.compile = compile; -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' +// To modify an AST directly, call require("regenerator").transform(ast). +exports.transform = transform; -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') +}).call(this,"/node_modules/regenerator") +},{"./lib/util":479,"./lib/visit":480,"./runtime":524,"assert":2,"defs":482,"esprima-fb":1,"fs":1,"path":11,"recast":506,"through":523}],482:[function(require,module,exports){ +"use strict"; -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) +var assert = require("assert"); +var is = require("simple-is"); +var fmt = require("simple-fmt"); +var stringmap = require("stringmap"); +var stringset = require("stringset"); +var alter = require("alter"); +var traverse = require("ast-traverse"); +var breakable = require("breakable"); +var Scope = require("./scope"); +var error = require("./error"); +var getline = error.getline; +var options = require("./options"); +var Stats = require("./stats"); +var jshint_vars = require("./jshint_globals/vars.js"); + + +function isConstLet(kind) { + return is.someof(kind, ["const", "let"]); } -// normalizes slashes. -var slashSplit = /\/+/ +function isVarConstLet(kind) { + return is.someof(kind, ["var", "const", "let"]); +} -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } +function isNonFunctionBlock(node) { + return node.type === "BlockStatement" && is.noneof(node.$parent.type, ["FunctionDeclaration", "FunctionExpression"]); } -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t +function isForWithConstLet(node) { + return node.type === "ForStatement" && node.init && node.init.type === "VariableDeclaration" && isConstLet(node.init.kind); } -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch +function isForInOfWithConstLet(node) { + return isForInOf(node) && node.left.type === "VariableDeclaration" && isConstLet(node.left.kind); +} - var orig = minimatch +function isForInOf(node) { + return is.someof(node.type, ["ForInStatement", "ForOfStatement"]); +} - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } +function isFunction(node) { + return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]); +} - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } +function isLoop(node) { + return is.someof(node.type, ["ForStatement", "ForInStatement", "ForOfStatement", "WhileStatement", "DoWhileStatement"]); +} - return m +function isReference(node) { + var parent = node.$parent; + return node.$refToScope || + node.type === "Identifier" && + !(parent.type === "VariableDeclarator" && parent.id === node) && // var|let|const $ + !(parent.type === "MemberExpression" && parent.computed === false && parent.property === node) && // obj.$ + !(parent.type === "Property" && parent.key === node) && // {$: ...} + !(parent.type === "LabeledStatement" && parent.label === node) && // $: ... + !(parent.type === "CatchClause" && parent.param === node) && // catch($) + !(isFunction(parent) && parent.id === node) && // function $(.. + !(isFunction(parent) && is.someof(node, parent.params)) && // function f($).. + true; } -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch +function isLvalue(node) { + return isReference(node) && + ((node.$parent.type === "AssignmentExpression" && node.$parent.left === node) || + (node.$parent.type === "UpdateExpression" && node.$parent.argument === node)); } -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } +function createScopes(node, parent) { + assert(!node.$scope); - if (!options) options = {} + node.$parent = parent; + node.$scope = node.$parent ? node.$parent.$scope : null; // may be overridden - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } + if (node.type === "Program") { + // Top-level program is a scope + // There's no block-scope under it + node.$scope = new Scope({ + kind: "hoist", + node: node, + parent: null, + }); - // "" only matches "" - if (pattern.trim() === '') return p === '' + } else if (isFunction(node)) { + // Function is a scope, with params in it + // There's no block-scope under it - return new Minimatch(pattern, options).match(p) -} + node.$scope = new Scope({ + kind: "hoist", + node: node, + parent: node.$parent.$scope, + }); -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } + // function has a name + if (node.id) { + assert(node.id.type === "Identifier"); - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + if (node.type === "FunctionDeclaration") { + // Function name goes in parent scope for declared functions + node.$parent.$scope.add(node.id.name, "fun", node.id, null); + } else if (node.type === "FunctionExpression") { + // Function name goes in function's scope for named function expressions + node.$scope.add(node.id.name, "fun", node.id, null); + } else { + assert(false); + } + } - if (!options) options = {} - pattern = pattern.trim() + node.params.forEach(function(param) { + node.$scope.add(param.name, "param", param, null); + }); - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } + } else if (node.type === "VariableDeclaration") { + // Variable declarations names goes in current scope + assert(isVarConstLet(node.kind)); + node.declarations.forEach(function(declarator) { + assert(declarator.type === "VariableDeclarator"); + var name = declarator.id.name; + if (options.disallowVars && node.kind === "var") { + error(getline(declarator), "var {0} is not allowed (use let or const)", name); + } + node.$scope.add(name, node.kind, declarator.id, declarator.range[1]); + }); - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false + } else if (isForWithConstLet(node) || isForInOfWithConstLet(node)) { + // For(In/Of) loop with const|let declaration is a scope, with declaration in it + // There may be a block-scope under it + node.$scope = new Scope({ + kind: "block", + node: node, + parent: node.$parent.$scope, + }); - // make the set of regexps etc. - this.make() + } else if (isNonFunctionBlock(node)) { + // A block node is a scope unless parent is a function + node.$scope = new Scope({ + kind: "block", + node: node, + parent: node.$parent.$scope, + }); + + } else if (node.type === "CatchClause") { + var identifier = node.param; + + node.$scope = new Scope({ + kind: "catch-block", + node: node, + parent: node.$parent.$scope, + }); + node.$scope.add(identifier.name, "caught", identifier, null); + + // All hoist-scope keeps track of which variables that are propagated through, + // i.e. an reference inside the scope points to a declaration outside the scope. + // This is used to mark "taint" the name since adding a new variable in the scope, + // with a propagated name, would change the meaning of the existing references. + // + // catch(e) is special because even though e is a variable in its own scope, + // we want to make sure that catch(e){let e} is never transformed to + // catch(e){var e} (but rather var e$0). For that reason we taint the use of e + // in the closest hoist-scope, i.e. where var e$0 belongs. + node.$scope.closestHoistScope().markPropagates(identifier.name); + } } -Minimatch.prototype.debug = function () {} +function createTopScope(programScope, environments, globals) { + function inject(obj) { + for (var name in obj) { + var writeable = obj[name]; + var kind = (writeable ? "var" : "const"); + if (topScope.hasOwn(name)) { + topScope.remove(name); + } + topScope.add(name, kind, {loc: {start: {line: -1}}}, -1); + } + } -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return + var topScope = new Scope({ + kind: "hoist", + node: {}, + parent: null, + }); - var pattern = this.pattern - var options = this.options + var complementary = { + undefined: false, + Infinity: false, + console: false, + }; - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } + inject(complementary); + inject(jshint_vars.reservedVars); + inject(jshint_vars.ecmaIdentifiers); + if (environments) { + environments.forEach(function(env) { + if (!jshint_vars[env]) { + error(-1, 'environment "{0}" not found', env); + } else { + inject(jshint_vars[env]); + } + }); + } + if (globals) { + inject(globals); + } - // step 1: figure out negation, etc. - this.parseNegate() + // link it in + programScope.parent = topScope; + topScope.children.push(programScope); - // step 2: expand braces - var set = this.globSet = this.braceExpand() + return topScope; +} - if (options.debug) this.debug = console.error +function setupReferences(ast, allIdentifiers, opts) { + var analyze = (is.own(opts, "analyze") ? opts.analyze : true); - this.debug(this.pattern, set) + function visit(node) { + if (!isReference(node)) { + return; + } + allIdentifiers.add(node.name); - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) + var scope = node.$scope.lookup(node.name); + if (analyze && !scope && options.disallowUnknownReferences) { + error(getline(node), "reference to unknown global variable {0}", node.name); + } + // check const and let for referenced-before-declaration + if (analyze && scope && is.someof(scope.getKind(node.name), ["const", "let"])) { + var allowedFromPos = scope.getFromPos(node.name); + var referencedAtPos = node.range[0]; + assert(is.finitenumber(allowedFromPos)); + assert(is.finitenumber(referencedAtPos)); + if (referencedAtPos < allowedFromPos) { + if (!node.$scope.hasFunctionScopeBetween(scope)) { + error(getline(node), "{0} is referenced before its declaration", node.name); + } + } + } + node.$refToScope = scope; + } - this.debug(this.pattern, set) + traverse(ast, {pre: visit}); +} + +// TODO for loops init and body props are parallel to each other but init scope is outer that of body +// TODO is this a problem? + +function varify(ast, stats, allIdentifiers, changes) { + function unique(name) { + assert(allIdentifiers.has(name)); + for (var cnt = 0; ; cnt++) { + var genName = name + "$" + String(cnt); + if (!allIdentifiers.has(genName)) { + return genName; + } + } + } + + function renameDeclarations(node) { + if (node.type === "VariableDeclaration" && isConstLet(node.kind)) { + var hoistScope = node.$scope.closestHoistScope(); + var origScope = node.$scope; - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) + // text change const|let => var + changes.push({ + start: node.range[0], + end: node.range[0] + node.kind.length, + str: "var", + }); - this.debug(this.pattern, set) + node.declarations.forEach(function(declarator) { + assert(declarator.type === "VariableDeclarator"); + var name = declarator.id.name; - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) + stats.declarator(node.kind); - this.debug(this.pattern, set) + // rename if + // 1) name already exists in hoistScope, or + // 2) name is already propagated (passed) through hoistScope or manually tainted + var rename = (origScope !== hoistScope && + (hoistScope.hasOwn(name) || hoistScope.doesPropagate(name))); - this.set = set -} + var newName = (rename ? unique(name) : name); -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 + origScope.remove(name); + hoistScope.add(newName, "var", declarator.id, declarator.range[1]); - if (options.nonegate) return + origScope.moves = origScope.moves || stringmap(); + origScope.moves.set(name, { + name: newName, + scope: hoistScope, + }); - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } + allIdentifiers.add(newName); - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} + if (newName !== name) { + stats.rename(name, newName, getline(declarator)); -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} + declarator.id.originalName = name; + declarator.id.name = newName; -Minimatch.prototype.braceExpand = braceExpand + // textchange var x => var x$1 + changes.push({ + start: declarator.id.range[0], + end: declarator.id.range[1], + str: newName, + }); + } + }); -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} + // ast change const|let => var + node.kind = "var"; + } } - } - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern + function renameReferences(node) { + if (!node.$refToScope) { + return; + } + var move = node.$refToScope.moves && node.$refToScope.moves.get(node.name); + if (!move) { + return; + } + node.$refToScope = move.scope; - if (typeof pattern === 'undefined') { - throw new Error('undefined pattern') - } + if (node.name !== move.name) { + node.originalName = node.name; + node.name = move.name; - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } + if (node.alterop) { + // node has no range because it is the result of another alter operation + var existingOp = null; + for (var i = 0; i < changes.length; i++) { + var op = changes[i]; + if (op.node === node) { + existingOp = op; + break; + } + } + assert(existingOp); - return expand(pattern) + // modify op + existingOp.str = move.name; + } else { + changes.push({ + start: node.range[0], + end: node.range[1], + str: move.name, + }); + } + } + } + + traverse(ast, {pre: renameDeclarations}); + traverse(ast, {pre: renameReferences}); + ast.$scope.traverse({pre: function(scope) { + delete scope.moves; + }}); } -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' +function detectLoopClosures(ast) { + traverse(ast, {pre: visit}); - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var plType - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this + function detectIifyBodyBlockers(body, node) { + return breakable(function(brk) { + traverse(body, {pre: function(n) { + // if we hit an inner function of the loop body, don't traverse further + if (isFunction(n)) { + return false; + } - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false + var err = true; // reset to false in else-statement below + var msg = "loop-variable {0} is captured by a loop-closure that can't be transformed due to use of {1} at line {2}"; + if (n.type === "BreakStatement") { + error(getline(node), msg, node.name, "break", getline(n)); + } else if (n.type === "ContinueStatement") { + error(getline(node), msg, node.name, "continue", getline(n)); + } else if (n.type === "ReturnStatement") { + error(getline(node), msg, node.name, "return", getline(n)); + } else if (n.type === "YieldExpression") { + error(getline(node), msg, node.name, "yield", getline(n)); + } else if (n.type === "Identifier" && n.name === "arguments") { + error(getline(node), msg, node.name, "arguments", getline(n)); + } else if (n.type === "VariableDeclaration" && n.kind === "var") { + error(getline(node), msg, node.name, "var", getline(n)); + } else { + err = false; + } + if (err) { + brk(true); // break traversal + } + }}); + return false; + }); } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } + function visit(node) { + // forbidden pattern: + // * * * * + var loopNode = null; + if (isReference(node) && node.$refToScope && isConstLet(node.$refToScope.getKind(node.name))) { + // traverse nodes up towards root from constlet-def + // if we hit a function (before a loop) - ok! + // if we hit a loop - maybe-ouch + // if we reach root - ok! + for (var n = node.$refToScope.node; ; ) { + if (isFunction(n)) { + // we're ok (function-local) + return; + } else if (isLoop(n)) { + loopNode = n; + // maybe not ok (between loop and function) + break; + } + n = n.$parent; + if (!n) { + // ok (reached root) + return; + } + } - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false + assert(isLoop(loopNode)); - case '\\': - clearStateChar() - escaping = true - continue + // traverse scopes from reference-scope up towards definition-scope + // if we hit a function, ouch! + var defScope = node.$refToScope; + var generateIIFE = (options.loopClosures === "iife"); - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + for (var s = node.$scope; s; s = s.parent) { + if (s === defScope) { + // we're ok + return; + } else if (isFunction(s.node)) { + // not ok (there's a function between the reference and definition) + // may be transformable via IIFE - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } + if (!generateIIFE) { + var msg = "loop-variable {0} is captured by a loop-closure. Tried \"loopClosures\": \"iife\" in defs-config.json?"; + return error(getline(node), msg, node.name); + } - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue + // here be dragons + // for (let x = ..; .. ; ..) { (function(){x})() } is forbidden because of current + // spec and VM status + if (loopNode.type === "ForStatement" && defScope.node === loopNode) { + var declarationNode = defScope.getNode(node.name); + return error(getline(declarationNode), "Not yet specced ES6 feature. {0} is declared in for-loop header and then captured in loop closure", declarationNode.name); + } - case '(': - if (inClass) { - re += '(' - continue - } + // speak now or forever hold your peace + if (detectIifyBodyBlockers(loopNode.body, node)) { + // error already generated + return; + } - if (!stateChar) { - re += '\\(' - continue + // mark loop for IIFE-insertion + loopNode.$iify = true; + } + } } + } +} - plType = stateChar - patternListStack.push({ type: plType, start: i - 1, reStart: re.length }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue +function transformLoopClosures(root, ops, options) { + function insertOp(pos, str, node) { + var op = { + start: pos, + end: pos, + str: str, } - - clearStateChar() - hasMagic = true - re += ')' - plType = patternListStack.pop().type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case '!': - re += '[^/]*?)' - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway + if (node) { + op.node = node; } - continue + ops.push(op); + } - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue + traverse(root, {pre: function(node) { + if (!node.$iify) { + return; } - clearStateChar() - re += '|' - continue + var hasBlock = (node.body.type === "BlockStatement"); - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() + var insertHead = (hasBlock ? + node.body.range[0] + 1 : // just after body { + node.body.range[0]); // just before existing expression + var insertFoot = (hasBlock ? + node.body.range[1] - 1 : // just before body } + node.body.range[1]); // just after existing expression - if (inClass) { - re += '\\' + c - continue - } + var forInName = (isForInOf(node) && node.left.declarations[0].id.name);; + var iifeHead = fmt("(function({0}){", forInName ? forInName : ""); + var iifeTail = fmt("}).call(this{0});", forInName ? ", " + forInName : ""); - inClass = true - classStart = i - reClassStart = re.length - re += c - continue + // modify AST + var iifeFragment = options.parse(iifeHead + iifeTail); + var iifeExpressionStatement = iifeFragment.body[0]; + var iifeBlockStatement = iifeExpressionStatement.expression.callee.object.body; - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue + if (hasBlock) { + var forBlockStatement = node.body; + var tmp = forBlockStatement.body; + forBlockStatement.body = [iifeExpressionStatement]; + iifeBlockStatement.body = tmp; + } else { + var tmp$0 = node.body; + node.body = iifeExpressionStatement; + iifeBlockStatement.body[0] = tmp$0; } - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } + // create ops + insertOp(insertHead, iifeHead); - // finish up the class. - hasMagic = true - inClass = false - re += c - continue + if (forInName) { + insertOp(insertFoot, "}).call(this, "); - default: - // swallow any state char that wasn't consumed - clearStateChar() + var args = iifeExpressionStatement.expression.arguments; + var iifeArgumentIdentifier = args[1]; + iifeArgumentIdentifier.alterop = true; + insertOp(insertFoot, forInName, iifeArgumentIdentifier); - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' + insertOp(insertFoot, ");"); + } else { + insertOp(insertFoot, iifeTail); } + }}); +} - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (var pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) +function detectConstAssignment(ast) { + traverse(ast, {pre: function(node) { + if (isLvalue(node)) { + var scope = node.$scope.lookup(node.name); + if (scope && scope.getKind(node.name) === "const") { + error(getline(node), "can't assign to const variable {0}", node.name); + } + } + }}); +} - this.debug('tail=%j\n %s', tail, tail) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type +function detectConstantLets(ast) { + traverse(ast, {pre: function(node) { + if (isLvalue(node)) { + var scope = node.$scope.lookup(node.name); + if (scope) { + scope.markWrite(node.name); + } + } + }}); - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } + ast.$scope.detectUnmodifiedLets(); +} - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } +function setupScopeAndReferences(root, opts) { + // setup scopes + traverse(root, {pre: createScopes}); + var topScope = createTopScope(root.$scope, options.environments, options.globals); - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } + // allIdentifiers contains all declared and referenced vars + // collect all declaration names (including those in topScope) + var allIdentifiers = stringset(); + topScope.traverse({pre: function(scope) { + allIdentifiers.addMany(scope.decls.keys()); + }}); - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) re = '(?=.)' + re + // setup node.$refToScope, check for errors. + // also collects all referenced names to allIdentifiers + setupReferences(root, allIdentifiers, opts); + return allIdentifiers; +} - if (addPatternStart) re = patternStart + re +function cleanupTree(root) { + traverse(root, {pre: function(node) { + for (var prop in node) { + if (prop[0] === "$") { + delete node[prop]; + } + } + }}); +} - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } +function run(src, config) { + // alter the options singleton with user configuration + for (var key in config) { + options[key] = config[key]; + } - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } + var parsed; - var flags = options.nocase ? 'i' : '' - var regExp = new RegExp('^' + re + '$', flags) + if (is.object(src)) { + if (!options.ast) { + return { + errors: [ + "Can't produce string output when input is an AST. " + + "Did you forget to set options.ast = true?" + ], + }; + } - regExp._glob = pattern - regExp._src = re + // Received an AST object as src, so no need to parse it. + parsed = src; - return regExp -} + } else if (is.string(src)) { + try { + parsed = options.parse(src, { + loc: true, + range: true, + }); + } catch (e) { + return { + errors: [ + fmt("line {0} column {1}: Error during input file parsing\n{2}\n{3}", + e.lineNumber, + e.column, + src.split("\n")[e.lineNumber - 1], + fmt.repeat(" ", e.column - 1) + "^") + ], + }; + } -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} + } else { + return { + errors: ["Input was neither an AST object nor a string."], + }; + } -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp + var ast = parsed; - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set + // TODO detect unused variables (never read) + error.reset(); - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options + var allIdentifiers = setupScopeAndReferences(ast, {}); - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' + // static analysis passes + detectLoopClosures(ast); + detectConstAssignment(ast); + //detectConstantLets(ast); - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') + var changes = []; + transformLoopClosures(ast, changes, options); - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' + //ast.$scope.print(); process.exit(-1); - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' + if (error.errors.length >= 1) { + return { + errors: error.errors, + }; + } - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} + if (changes.length > 0) { + cleanupTree(ast); + allIdentifiers = setupScopeAndReferences(ast, {analyze: false}); + } + assert(error.errors.length === 0); -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} + // change constlet declarations to var, renamed if needed + // varify modifies the scopes and AST accordingly and + // returns a list of change fragments (to use with alter) + var stats = new Stats(); + varify(ast, stats, allIdentifiers, changes); -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' + if (options.ast) { + // return the modified AST instead of src code + // get rid of all added $ properties first, such as $parent and $scope + cleanupTree(ast); + return { + stats: stats, + ast: ast, + }; + } else { + // apply changes produced by varify and return the transformed src + var transformedSrc = alter(src, changes); + return { + stats: stats, + src: transformedSrc, + }; + } +} - if (f === '/' && partial) return true +module.exports = run; - var options = this.options +},{"./error":483,"./jshint_globals/vars.js":484,"./options":485,"./scope":486,"./stats":487,"alter":488,"assert":2,"ast-traverse":490,"breakable":491,"simple-fmt":492,"simple-is":493,"stringmap":494,"stringset":495}],483:[function(require,module,exports){ +"use strict"; - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } +var fmt = require("simple-fmt"); +var assert = require("assert"); - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) +function error(line, var_args) { + assert(arguments.length >= 2); - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. + var msg = (arguments.length === 2 ? + String(var_args) : fmt.apply(fmt, Array.prototype.slice.call(arguments, 1))); - var set = this.set - this.debug(this.pattern, 'set', set) + error.errors.push(line === -1 ? msg : fmt("line {0}: {1}", line, msg)); +} - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } +error.reset = function() { + error.errors = []; +}; - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate +error.getline = function(node) { + if (node && node.loc && node.loc.start) { + return node.loc.start.line; } - } + return -1; +}; - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} +error.reset(); -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options +module.exports = error; - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) +},{"assert":2,"simple-fmt":492}],484:[function(require,module,exports){ +// jshint -W001 - this.debug('matchOne', file.length, pattern.length) +"use strict"; - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] +// Identifiers provided by the ECMAScript standard. - this.debug(pattern, p, f) +exports.reservedVars = { + arguments : false, + NaN : false +}; - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false +exports.ecmaIdentifiers = { + Array : false, + Boolean : false, + Date : false, + decodeURI : false, + decodeURIComponent : false, + encodeURI : false, + encodeURIComponent : false, + Error : false, + "eval" : false, + EvalError : false, + Function : false, + hasOwnProperty : false, + isFinite : false, + isNaN : false, + JSON : false, + Math : false, + Map : false, + Number : false, + Object : false, + parseInt : false, + parseFloat : false, + RangeError : false, + ReferenceError : false, + RegExp : false, + Set : false, + String : false, + SyntaxError : false, + TypeError : false, + URIError : false, + WeakMap : false +}; - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) +// Global variables commonly provided by a web browser environment. - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } +exports.browser = { + ArrayBuffer : false, + ArrayBufferView : false, + Audio : false, + Blob : false, + addEventListener : false, + applicationCache : false, + atob : false, + blur : false, + btoa : false, + clearInterval : false, + clearTimeout : false, + close : false, + closed : false, + DataView : false, + DOMParser : false, + defaultStatus : false, + document : false, + Element : false, + event : false, + FileReader : false, + Float32Array : false, + Float64Array : false, + FormData : false, + focus : false, + frames : false, + getComputedStyle : false, + HTMLElement : false, + HTMLAnchorElement : false, + HTMLBaseElement : false, + HTMLBlockquoteElement: false, + HTMLBodyElement : false, + HTMLBRElement : false, + HTMLButtonElement : false, + HTMLCanvasElement : false, + HTMLDirectoryElement : false, + HTMLDivElement : false, + HTMLDListElement : false, + HTMLFieldSetElement : false, + HTMLFontElement : false, + HTMLFormElement : false, + HTMLFrameElement : false, + HTMLFrameSetElement : false, + HTMLHeadElement : false, + HTMLHeadingElement : false, + HTMLHRElement : false, + HTMLHtmlElement : false, + HTMLIFrameElement : false, + HTMLImageElement : false, + HTMLInputElement : false, + HTMLIsIndexElement : false, + HTMLLabelElement : false, + HTMLLayerElement : false, + HTMLLegendElement : false, + HTMLLIElement : false, + HTMLLinkElement : false, + HTMLMapElement : false, + HTMLMenuElement : false, + HTMLMetaElement : false, + HTMLModElement : false, + HTMLObjectElement : false, + HTMLOListElement : false, + HTMLOptGroupElement : false, + HTMLOptionElement : false, + HTMLParagraphElement : false, + HTMLParamElement : false, + HTMLPreElement : false, + HTMLQuoteElement : false, + HTMLScriptElement : false, + HTMLSelectElement : false, + HTMLStyleElement : false, + HTMLTableCaptionElement: false, + HTMLTableCellElement : false, + HTMLTableColElement : false, + HTMLTableElement : false, + HTMLTableRowElement : false, + HTMLTableSectionElement: false, + HTMLTextAreaElement : false, + HTMLTitleElement : false, + HTMLUListElement : false, + HTMLVideoElement : false, + history : false, + Int16Array : false, + Int32Array : false, + Int8Array : false, + Image : false, + length : false, + localStorage : false, + location : false, + MessageChannel : false, + MessageEvent : false, + MessagePort : false, + moveBy : false, + moveTo : false, + MutationObserver : false, + name : false, + Node : false, + NodeFilter : false, + navigator : false, + onbeforeunload : true, + onblur : true, + onerror : true, + onfocus : true, + onload : true, + onresize : true, + onunload : true, + open : false, + openDatabase : false, + opener : false, + Option : false, + parent : false, + print : false, + removeEventListener : false, + resizeBy : false, + resizeTo : false, + screen : false, + scroll : false, + scrollBy : false, + scrollTo : false, + sessionStorage : false, + setInterval : false, + setTimeout : false, + SharedWorker : false, + status : false, + top : false, + Uint16Array : false, + Uint32Array : false, + Uint8Array : false, + Uint8ClampedArray : false, + WebSocket : false, + window : false, + Worker : false, + XMLHttpRequest : false, + XMLSerializer : false, + XPathEvaluator : false, + XPathException : false, + XPathExpression : false, + XPathNamespace : false, + XPathNSResolver : false, + XPathResult : false +}; - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] +exports.devel = { + alert : false, + confirm: false, + console: false, + Debug : false, + opera : false, + prompt : false +}; - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) +exports.worker = { + importScripts: true, + postMessage : true, + self : true +}; - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } +// Widely adopted global names that are not part of ECMAScript standard +exports.nonstandard = { + escape : false, + unescape: false +}; - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } +// Globals provided by popular JavaScript environments. - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } +exports.couch = { + "require" : false, + respond : false, + getRow : false, + emit : false, + send : false, + start : false, + sum : false, + log : false, + exports : false, + module : false, + provides : false +}; - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } +exports.node = { + __filename : false, + __dirname : false, + Buffer : false, + DataView : false, + console : false, + exports : true, // In Node it is ok to exports = module.exports = foo(); + GLOBAL : false, + global : false, + module : false, + process : false, + require : false, + setTimeout : false, + clearTimeout : false, + setInterval : false, + clearInterval: false +}; - if (!hit) return false - } +exports.phantom = { + phantom : true, + require : true, + WebPage : true +}; - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* +exports.rhino = { + defineClass : false, + deserialize : false, + gc : false, + help : false, + importPackage: false, + "java" : false, + load : false, + loadClass : false, + print : false, + quit : false, + readFile : false, + readUrl : false, + runCommand : false, + seal : false, + serialize : false, + spawn : false, + sync : false, + toint32 : false, + version : false +}; - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } +exports.wsh = { + ActiveXObject : true, + Enumerator : true, + GetObject : true, + ScriptEngine : true, + ScriptEngineBuildVersion : true, + ScriptEngineMajorVersion : true, + ScriptEngineMinorVersion : true, + VBArray : true, + WSH : true, + WScript : true, + XDomainRequest : true +}; - // should be unreachable. - throw new Error('wtf?') -} +// Globals provided by popular JavaScript libraries. -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} +exports.dojo = { + dojo : false, + dijit : false, + dojox : false, + define : false, + "require": false +}; -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} +exports.jquery = { + "$" : false, + jQuery : false +}; -},{"brace-expansion":479,"path":222}],479:[function(require,module,exports){ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); +exports.mootools = { + "$" : false, + "$$" : false, + Asset : false, + Browser : false, + Chain : false, + Class : false, + Color : false, + Cookie : false, + Core : false, + Document : false, + DomReady : false, + DOMEvent : false, + DOMReady : false, + Drag : false, + Element : false, + Elements : false, + Event : false, + Events : false, + Fx : false, + Group : false, + Hash : false, + HtmlTable : false, + Iframe : false, + IframeShim : false, + InputValidator: false, + instanceOf : false, + Keyboard : false, + Locale : false, + Mask : false, + MooTools : false, + Native : false, + Options : false, + OverText : false, + Request : false, + Scroller : false, + Slick : false, + Slider : false, + Sortables : false, + Spinner : false, + Swiff : false, + Tips : false, + Type : false, + typeOf : false, + URI : false, + Window : false +}; -module.exports = expandTop; +exports.prototypejs = { + "$" : false, + "$$" : false, + "$A" : false, + "$F" : false, + "$H" : false, + "$R" : false, + "$break" : false, + "$continue" : false, + "$w" : false, + Abstract : false, + Ajax : false, + Class : false, + Enumerable : false, + Element : false, + Event : false, + Field : false, + Form : false, + Hash : false, + Insertion : false, + ObjectRange : false, + PeriodicalExecuter: false, + Position : false, + Prototype : false, + Selector : false, + Template : false, + Toggle : false, + Try : false, + Autocompleter : false, + Builder : false, + Control : false, + Draggable : false, + Draggables : false, + Droppables : false, + Effect : false, + Sortable : false, + SortableObserver : false, + Sound : false, + Scriptaculous : false +}; -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; +exports.yui = { + YUI : false, + Y : false, + YUI_config: false +}; -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} +},{}],485:[function(require,module,exports){ +// default configuration -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} +module.exports = { + disallowVars: false, + disallowDuplicated: true, + disallowUnknownReferences: true, + parse: require("esprima-fb").parse, +}; +},{"esprima-fb":1}],486:[function(require,module,exports){ +"use strict"; -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; +var assert = require("assert"); +var stringmap = require("stringmap"); +var stringset = require("stringset"); +var is = require("simple-is"); +var fmt = require("simple-fmt"); +var error = require("./error"); +var getline = error.getline; +var options = require("./options"); - var parts = []; - var m = balanced('{', '}', str); +function Scope(args) { + assert(is.someof(args.kind, ["hoist", "block", "catch-block"])); + assert(is.object(args.node)); + assert(args.parent === null || is.object(args.parent)); - if (!m) - return str.split(','); + // kind === "hoist": function scopes, program scope, injected globals + // kind === "block": ES6 block scopes + // kind === "catch-block": catch block scopes + this.kind = args.kind; - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); + // the AST node the block corresponds to + this.node = args.node; - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } + // parent scope + this.parent = args.parent; - parts.push.apply(parts, p); + // children scopes for easier traversal (populated internally) + this.children = []; - return parts; -} + // scope declarations. decls[variable_name] = { + // kind: "fun" for functions, + // "param" for function parameters, + // "caught" for catch parameter + // "var", + // "const", + // "let" + // node: the AST node the declaration corresponds to + // from: source code index from which it is visible at earliest + // (only stored for "const", "let" [and "var"] nodes) + // } + this.decls = stringmap(); -function expandTop(str) { - if (!str) - return []; + // names of all declarations within this scope that was ever written + // TODO move to decls.w? + // TODO create corresponding read? + this.written = stringset(); - return expand(escapeBraces(str), true).map(unescapeBraces); -} + // names of all variables declared outside this hoist scope but + // referenced in this scope (immediately or in child). + // only stored on hoist scopes for efficiency + // (because we currently generate lots of empty block scopes) + this.propagates = (this.kind === "hoist" ? stringset() : null); -function identity(e) { - return e; + // scopes register themselves with their parents for easier traversal + if (this.parent) { + this.parent.children.push(this); + } } -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} +Scope.prototype.print = function(indent) { + indent = indent || 0; + var scope = this; + var names = this.decls.keys().map(function(name) { + return fmt("{0} [{1}]", name, scope.decls.get(name).kind); + }).join(", "); + var propagates = this.propagates ? this.propagates.items().join(", ") : ""; + console.log(fmt("{0}{1}: {2}. propagates: {3}", fmt.repeat(" ", indent), this.node.type, names, propagates)); + this.children.forEach(function(c) { + c.print(indent + 2); + }); +}; -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} +Scope.prototype.add = function(name, kind, node, referableFromPos) { + assert(is.someof(kind, ["fun", "param", "var", "caught", "const", "let"])); -function expand(str, isTop) { - var expansions = []; + function isConstLet(kind) { + return is.someof(kind, ["const", "let"]); + } - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; + var scope = this; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = /^(.*,)+(.+)?$/.test(m.body); - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); + // search nearest hoist-scope for fun, param and var's + // const, let and caught variables go directly in the scope (which may be hoist, block or catch-block) + if (is.someof(kind, ["fun", "param", "var"])) { + while (scope.kind !== "hoist") { + if (scope.decls.has(name) && isConstLet(scope.decls.get(name).kind)) { // could be caught + return error(getline(node), "{0} is already declared", name); + } + scope = scope.parent; + } + } + // name exists in scope and either new or existing kind is const|let => error + if (scope.decls.has(name) && (options.disallowDuplicated || isConstLet(scope.decls.get(name).kind) || isConstLet(kind))) { + return error(getline(node), "{0} is already declared", name); } - return [str]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } + var declaration = { + kind: kind, + node: node, + }; + if (referableFromPos) { + assert(is.someof(kind, ["var", "const", "let"])); + declaration.from = referableFromPos; } - } + scope.decls.set(name, declaration); +}; + +Scope.prototype.getKind = function(name) { + assert(is.string(name)); + var decl = this.decls.get(name); + return decl ? decl.kind : null; +}; + +Scope.prototype.getNode = function(name) { + assert(is.string(name)); + var decl = this.decls.get(name); + return decl ? decl.node : null; +}; - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. +Scope.prototype.getFromPos = function(name) { + assert(is.string(name)); + var decl = this.decls.get(name); + return decl ? decl.from : null; +}; - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; +Scope.prototype.hasOwn = function(name) { + return this.decls.has(name); +}; - var N; +Scope.prototype.remove = function(name) { + return this.decls.remove(name); +}; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; +Scope.prototype.doesPropagate = function(name) { + return this.propagates.has(name); +}; + +Scope.prototype.markPropagates = function(name) { + this.propagates.add(name); +}; + +Scope.prototype.closestHoistScope = function() { + var scope = this; + while (scope.kind !== "hoist") { + scope = scope.parent; } - var pad = n.some(isPadded); + return scope; +}; - N = []; +Scope.prototype.hasFunctionScopeBetween = function(outer) { + function isFunction(node) { + return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]); + } - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } + for (var scope = this; scope; scope = scope.parent) { + if (scope === outer) { + return false; + } + if (isFunction(scope.node)) { + return true; } - } - N.push(c); } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); + throw new Error("wasn't inner scope of outer"); +}; + +Scope.prototype.lookup = function(name) { + for (var scope = this; scope; scope = scope.parent) { + if (scope.decls.has(name)) { + return scope; + } else if (scope.kind === "hoist") { + scope.propagates.add(name); + } } - } + return null; +}; - return expansions; -} +Scope.prototype.markWrite = function(name) { + assert(is.string(name)); + this.written.add(name); +}; +// detects let variables that are never modified (ignores top-level) +Scope.prototype.detectUnmodifiedLets = function() { + var outmost = this; -},{"balanced-match":480,"concat-map":481}],480:[function(require,module,exports){ -module.exports = balanced; -function balanced(a, b, str) { - var bal = 0; - var m = {}; - var ended = false; + function detect(scope) { + if (scope !== outmost) { + scope.decls.keys().forEach(function(name) { + if (scope.getKind(name) === "let" && !scope.written.has(name)) { + return error(getline(scope.getNode(name)), "{0} is declared as let but never modified so could be const", name); + } + }); + } - for (var i = 0; i < str.length; i++) { - if (a == str.substr(i, a.length)) { - if (!('start' in m)) m.start = i; - bal++; - } - else if (b == str.substr(i, b.length) && 'start' in m) { - ended = true; - bal--; - if (!bal) { - m.end = i; - m.pre = str.substr(0, m.start); - m.body = (m.end - m.start > 1) - ? str.substring(m.start + a.length, m.end) - : ''; - m.post = str.slice(m.end + b.length); - return m; - } + scope.children.forEach(function(childScope) { + detect(childScope); + }); } - } + detect(this); +}; - // if we opened more than we closed, find the one we closed - if (bal && ended) { - var start = m.start + a.length; - m = balanced(a, b, str.substr(start)); - if (m) { - m.start += start; - m.end += start; - m.pre = str.slice(0, start) + m.pre; +Scope.prototype.traverse = function(options) { + options = options || {}; + var pre = options.pre; + var post = options.post; + + function visit(scope) { + if (pre) { + pre(scope); + } + scope.children.forEach(function(childScope) { + visit(childScope); + }); + if (post) { + post(scope); + } } - return m; - } + + visit(this); +}; + +module.exports = Scope; + +},{"./error":483,"./options":485,"assert":2,"simple-fmt":492,"simple-is":493,"stringmap":494,"stringset":495}],487:[function(require,module,exports){ +var fmt = require("simple-fmt"); +var is = require("simple-is"); +var assert = require("assert"); + +function Stats() { + this.lets = 0; + this.consts = 0; + this.renames = []; } -},{}],481:[function(require,module,exports){ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); +Stats.prototype.declarator = function(kind) { + assert(is.someof(kind, ["const", "let"])); + if (kind === "const") { + this.consts++; + } else { + this.lets++; } - return res; }; -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; +Stats.prototype.rename = function(oldName, newName, line) { + this.renames.push({ + oldName: oldName, + newName: newName, + line: line, + }); }; -},{}],482:[function(require,module,exports){ -'use strict'; -var fs = require('fs') +Stats.prototype.toString = function() { +// console.log("defs.js stats for file {0}:", filename) -module.exports = function (pth, cb) { - var fn = typeof fs.access === 'function' ? fs.access : fs.stat; + var renames = this.renames.map(function(r) { + return r; + }).sort(function(a, b) { + return a.line - b.line; + }); // sort a copy of renames - fn(pth, function (err) { - cb(null, !err); - }); -}; + var renameStr = renames.map(function(rename) { + return fmt("\nline {0}: {1} => {2}", rename.line, rename.oldName, rename.newName); + }).join(""); -module.exports.sync = function (pth) { - var fn = typeof fs.accessSync === 'function' ? fs.accessSync : fs.statSync; + var sum = this.consts + this.lets; + var constlets = (sum === 0 ? + "can't calculate const coverage (0 consts, 0 lets)" : + fmt("{0}% const coverage ({1} consts, {2} lets)", + Math.floor(100 * this.consts / sum), this.consts, this.lets)); - try { - fn(pth); - return true; - } catch (err) { - return false; - } + return constlets + renameStr + "\n"; }; -},{"fs":212}],483:[function(require,module,exports){ -(function (process){ -'use strict'; +module.exports = Stats; -function posix(path) { - return path.charAt(0) === '/'; -}; +},{"assert":2,"simple-fmt":492,"simple-is":493}],488:[function(require,module,exports){ +// alter.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus -function win32(path) { - // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = !!device && device.charAt(1) !== ':'; +var assert = require("assert"); +var stableSort = require("stable"); - // UNC paths are always absolute - return !!result[2] || isUnc; -}; +// fragments is a list of {start: index, end: index, str: string to replace with} +function alter(str, fragments) { + "use strict"; -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; + var isArray = Array.isArray || function(v) { + return Object.prototype.toString.call(v) === "[object Array]"; + };; -}).call(this,require('_process')) -},{"_process":223}],484:[function(require,module,exports){ -"use strict"; + assert(typeof str === "string"); + assert(isArray(fragments)); -var originalObject = Object; -var originalDefProp = Object.defineProperty; -var originalCreate = Object.create; + // stableSort isn't in-place so no need to copy array first + var sortedFragments = stableSort(fragments, function(a, b) { + return a.start - b.start; + }); -function defProp(obj, name, value) { - if (originalDefProp) try { - originalDefProp.call(originalObject, obj, name, { value: value }); - } catch (definePropertyIsBrokenInIE8) { - obj[name] = value; - } else { - obj[name] = value; - } + var outs = []; + + var pos = 0; + for (var i = 0; i < sortedFragments.length; i++) { + var frag = sortedFragments[i]; + + assert(pos <= frag.start); + assert(frag.start <= frag.end); + outs.push(str.slice(pos, frag.start)); + outs.push(frag.str); + pos = frag.end; + } + if (pos < str.length) { + outs.push(str.slice(pos)); + } + + return outs.join(""); } -// For functions that will be invoked using .call or .apply, we need to -// define those methods on the function objects themselves, rather than -// inheriting them from Function.prototype, so that a malicious or clumsy -// third party cannot interfere with the functionality of this module by -// redefining Function.prototype.call or .apply. -function makeSafeToCall(fun) { - if (fun) { - defProp(fun, "call", fun.call); - defProp(fun, "apply", fun.apply); - } - return fun; +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = alter; } -makeSafeToCall(originalDefProp); -makeSafeToCall(originalCreate); +},{"assert":2,"stable":489}],489:[function(require,module,exports){ +//! stable.js 0.1.5, https://github.com/Two-Screen/stable +//! © 2014 Angry Bytes and contributors. MIT licensed. -var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty); -var numToStr = makeSafeToCall(Number.prototype.toString); -var strSlice = makeSafeToCall(String.prototype.slice); +(function() { -var cloner = function(){}; -function create(prototype) { - if (originalCreate) { - return originalCreate.call(originalObject, prototype); - } - cloner.prototype = prototype || null; - return new cloner; -} +// A stable array sort, because `Array#sort()` is not guaranteed stable. +// This is an implementation of merge sort, without recursion. -var rand = Math.random; -var uniqueKeys = create(null); +var stable = function(arr, comp) { + return exec(arr.slice(), comp); +}; -function makeUniqueKey() { - // Collisions are highly unlikely, but this module is in the business of - // making guarantees rather than safe bets. - do var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2)); - while (hasOwn.call(uniqueKeys, uniqueKey)); - return uniqueKeys[uniqueKey] = uniqueKey; -} +stable.inplace = function(arr, comp) { + var result = exec(arr, comp); -function internString(str) { - var obj = {}; - obj[str] = true; - return Object.keys(obj)[0]; + // This simply copies back if the result isn't in the original array, + // which happens on an odd number of passes. + if (result !== arr) { + pass(result, null, arr.length, arr); + } + + return arr; +}; + +// Execute the sort using the input array and a second buffer as work space. +// Returns one of those two, containing the final result. +function exec(arr, comp) { + if (typeof(comp) !== 'function') { + comp = function(a, b) { + return String(a).localeCompare(b); + }; + } + + // Short-circuit when there's nothing to sort. + var len = arr.length; + if (len <= 1) { + return arr; + } + + // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. + // Chunks are the size of the left or right hand in merge sort. + // Stop when the left-hand covers all of the array. + var buffer = new Array(len); + for (var chk = 1; chk < len; chk *= 2) { + pass(arr, comp, chk, buffer); + + var tmp = arr; + arr = buffer; + buffer = tmp; + } + + return arr; } -// External users might find this function useful, but it is not necessary -// for the typical use of this module. -defProp(exports, "makeUniqueKey", makeUniqueKey); +// Run a single pass with the given chunk size. +var pass = function(arr, comp, chk, result) { + var len = arr.length; + var i = 0; + // Step size / double chunk size. + var dbl = chk * 2; + // Bounds of the left and right chunks. + var l, r, e; + // Iterators over the left and right chunk. + var li, ri; -// Object.getOwnPropertyNames is the only way to enumerate non-enumerable -// properties, so if we wrap it to ignore our secret keys, there should be -// no way (except guessing) to access those properties. -var originalGetOPNs = Object.getOwnPropertyNames; -Object.getOwnPropertyNames = function getOwnPropertyNames(object) { - for (var names = originalGetOPNs(object), - src = 0, - dst = 0, - len = names.length; - src < len; - ++src) { - if (!hasOwn.call(uniqueKeys, names[src])) { - if (src > dst) { - names[dst] = names[src]; - } - ++dst; + // Iterate over pairs of chunks. + for (l = 0; l < len; l += dbl) { + r = l + chk; + e = r + chk; + if (r > len) r = len; + if (e > len) e = len; + + // Iterate both chunks in parallel. + li = l; + ri = r; + while (true) { + // Compare the chunks. + if (li < r && ri < e) { + // This works for a regular `sort()` compatible comparator, + // but also for a simple comparator like: `a > b` + if (comp(arr[li], arr[ri]) <= 0) { + result[i++] = arr[li++]; + } + else { + result[i++] = arr[ri++]; + } + } + // Nothing to compare, just flush what's left. + else if (li < r) { + result[i++] = arr[li++]; + } + else if (ri < e) { + result[i++] = arr[ri++]; + } + // Both iterators are at the chunk ends. + else { + break; + } + } } - } - names.length = dst; - return names; }; -function defaultCreatorFn(object) { - return create(null); +// Export using CommonJS or to the window. +if (typeof(module) !== 'undefined') { + module.exports = stable; +} +else { + window.stable = stable; } -function makeAccessor(secretCreatorFn) { - var brand = makeUniqueKey(); - var passkey = create(null); +})(); - secretCreatorFn = secretCreatorFn || defaultCreatorFn; +},{}],490:[function(require,module,exports){ +function traverse(root, options) { + "use strict"; - function register(object) { - var secret; // Created lazily. + options = options || {}; + var pre = options.pre; + var post = options.post; + var skipProperty = options.skipProperty; - function vault(key, forget) { - // Only code that has access to the passkey can retrieve (or forget) - // the secret object. - if (key === passkey) { - return forget - ? secret = null - : secret || (secret = secretCreatorFn(object)); - } - } + function visit(node, parent, prop, idx) { + if (!node || typeof node.type !== "string") { + return; + } - defProp(object, brand, vault); - } + var res = undefined; + if (pre) { + res = pre(node, parent, prop, idx); + } - function accessor(object) { - if (!hasOwn.call(object, brand)) - register(object); - return object[brand](passkey); - } + if (res !== false) { + for (var prop in node) { + if (skipProperty ? skipProperty(prop, node) : prop[0] === "$") { + continue; + } + + var child = node[prop]; + + if (Array.isArray(child)) { + for (var i = 0; i < child.length; i++) { + visit(child[i], node, prop, i); + } + } else { + visit(child, node, prop); + } + } + } - accessor.forget = function(object) { - if (hasOwn.call(object, brand)) - object[brand](passkey, true); - }; + if (post) { + post(node, parent, prop, idx); + } + } - return accessor; -} + visit(root, null); +}; -defProp(exports, "makeAccessor", makeAccessor); +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = traverse; +} -},{}],485:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ +},{}],491:[function(require,module,exports){ +// breakable.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013-2014 Olov Lassus -var assert = require("assert"); -var types = require("recast").types; -var isArray = types.builtInTypes.array; -var b = types.builders; -var n = types.namedTypes; -var leap = require("./leap"); -var meta = require("./meta"); -var util = require("./util"); -var runtimeProperty = util.runtimeProperty; -var hasOwn = Object.prototype.hasOwnProperty; +var breakable = (function() { + "use strict"; -function Emitter(contextId) { - assert.ok(this instanceof Emitter); - n.Identifier.assert(contextId); + function Val(val, brk) { + this.val = val; + this.brk = brk; + } - // Used to generate unique temporary names. - this.nextTempId = 0; + function make_brk() { + return function brk(val) { + throw new Val(val, brk); + }; + } - Object.defineProperties(this, { - // In order to make sure the context object does not collide with - // anything in the local scope, we might have to rename it, so we - // refer to it symbolically instead of just assuming that it will be - // called "context". - contextId: { value: contextId }, + function breakable(fn) { + var brk = make_brk(); + try { + return fn(brk); + } catch (e) { + if (e instanceof Val && e.brk === brk) { + return e.val; + } + throw e; + } + } - // An append-only list of Statements that grows each time this.emit is - // called. - listing: { value: [] }, + return breakable; +})(); - // A sparse array whose keys correspond to locations in this.listing - // that have been marked as branch/jump targets. - marked: { value: [true] }, +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = breakable; +} - // The last location will be marked when this.getDispatchLoop is - // called. - finalLoc: { value: loc() }, +},{}],492:[function(require,module,exports){ +// simple-fmt.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus - // A list of all leap.TryEntry statements emitted. - tryEntries: { value: [] } - }); +var fmt = (function() { + "use strict"; - // The .leapManager property needs to be defined by a separate - // defineProperties call so that .finalLoc will be visible to the - // leap.LeapManager constructor. - Object.defineProperties(this, { - // Each time we evaluate the body of a loop, we tell this.leapManager - // to enter a nested loop context that determines the meaning of break - // and continue statements therein. - leapManager: { value: new leap.LeapManager(this) } - }); -} + function fmt(str, var_args) { + var args = Array.prototype.slice.call(arguments, 1); + return str.replace(/\{(\d+)\}/g, function(s, match) { + return (match in args ? args[match] : s); + }); + } -var Ep = Emitter.prototype; -exports.Emitter = Emitter; + function obj(str, obj) { + return str.replace(/\{([_$a-zA-Z0-9][_$a-zA-Z0-9]*)\}/g, function(s, match) { + return (match in obj ? obj[match] : s); + }); + } -// Offsets into this.listing that could be used as targets for branches or -// jumps are represented as numeric Literal nodes. This representation has -// the amazingly convenient benefit of allowing the exact value of the -// location to be determined at any time, even after generating code that -// refers to the location. -function loc() { - return b.literal(-1); -} + function repeat(str, n) { + return (new Array(n + 1)).join(str); + } -// Sets the exact value of the given location to the offset of the next -// Statement emitted. -Ep.mark = function(loc) { - n.Literal.assert(loc); - var index = this.listing.length; - if (loc.value === -1) { - loc.value = index; - } else { - // Locations can be marked redundantly, but their values cannot change - // once set the first time. - assert.strictEqual(loc.value, index); - } - this.marked[index] = true; - return loc; -}; + fmt.fmt = fmt; + fmt.obj = obj; + fmt.repeat = repeat; + return fmt; +})(); -Ep.emit = function(node) { - if (n.Expression.check(node)) - node = b.expressionStatement(node); - n.Statement.assert(node); - this.listing.push(node); -}; +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = fmt; +} -// Shorthand for emitting assignment statements. This will come in handy -// for assignments to temporary variables. -Ep.emitAssign = function(lhs, rhs) { - this.emit(this.assign(lhs, rhs)); - return lhs; -}; +},{}],493:[function(require,module,exports){ +// simple-is.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus -// Shorthand for an assignment statement. -Ep.assign = function(lhs, rhs) { - return b.expressionStatement( - b.assignmentExpression("=", lhs, rhs)); -}; +var is = (function() { + "use strict"; -// Convenience function for generating expressions like context.next, -// context.sent, and context.rval. -Ep.contextProperty = function(name, computed) { - return b.memberExpression( - this.contextId, - computed ? b.literal(name) : b.identifier(name), - !!computed - ); -}; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var toString = Object.prototype.toString; + var _undefined = void 0; -// Shorthand for setting context.rval and jumping to `context.stop()`. -Ep.stop = function(rval) { - if (rval) { - this.setReturnValue(rval); - } + return { + nan: function(v) { + return v !== v; + }, + boolean: function(v) { + return typeof v === "boolean"; + }, + number: function(v) { + return typeof v === "number"; + }, + string: function(v) { + return typeof v === "string"; + }, + fn: function(v) { + return typeof v === "function"; + }, + object: function(v) { + return v !== null && typeof v === "object"; + }, + primitive: function(v) { + var t = typeof v; + return v === null || v === _undefined || + t === "boolean" || t === "number" || t === "string"; + }, + array: Array.isArray || function(v) { + return toString.call(v) === "[object Array]"; + }, + finitenumber: function(v) { + return typeof v === "number" && isFinite(v); + }, + someof: function(v, values) { + return values.indexOf(v) >= 0; + }, + noneof: function(v, values) { + return values.indexOf(v) === -1; + }, + own: function(obj, prop) { + return hasOwnProperty.call(obj, prop); + }, + }; +})(); - this.jump(this.finalLoc); -}; +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = is; +} -Ep.setReturnValue = function(valuePath) { - n.Expression.assert(valuePath.value); +},{}],494:[function(require,module,exports){ +// stringmap.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus - this.emitAssign( - this.contextProperty("rval"), - this.explodeExpression(valuePath) - ); -}; +var StringMap = (function() { + "use strict"; -Ep.clearPendingException = function(tryLoc, assignee) { - n.Literal.assert(tryLoc); + // to save us a few characters + var hasOwnProperty = Object.prototype.hasOwnProperty; - var catchCall = b.callExpression( - this.contextProperty("catch", true), - [tryLoc] - ); + var create = (function() { + function hasOwnEnumerableProps(obj) { + for (var prop in obj) { + if (hasOwnProperty.call(obj, prop)) { + return true; + } + } + return false; + } + // FF <= 3.6: + // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true + // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false + function hasOwnPollutedProps(obj) { + return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__"); + } - if (assignee) { - this.emitAssign(assignee, catchCall); - } else { - this.emit(catchCall); - } -}; + var useObjectCreate = false; + if (typeof Object.create === "function") { + if (!hasOwnEnumerableProps(Object.create(null))) { + useObjectCreate = true; + } + } + if (useObjectCreate === false) { + if (hasOwnEnumerableProps({})) { + throw new Error("StringMap environment error 0, please file a bug at https://github.com/olov/stringmap/issues"); + } + } + // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims) -// Emits code for an unconditional jump to the given location, even if the -// exact value of the location is not yet known. -Ep.jump = function(toLoc) { - this.emitAssign(this.contextProperty("next"), toLoc); - this.emit(b.breakStatement()); -}; + var o = (useObjectCreate ? Object.create(null) : {}); + var useProtoClear = false; + if (hasOwnPollutedProps(o)) { + o.__proto__ = null; + if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) { + throw new Error("StringMap environment error 1, please file a bug at https://github.com/olov/stringmap/issues"); + } + useProtoClear = true; + } + // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims) -// Conditional jump. -Ep.jumpIf = function(test, toLoc) { - n.Expression.assert(test); - n.Literal.assert(toLoc); + return function() { + var o = (useObjectCreate ? Object.create(null) : {}); + if (useProtoClear) { + o.__proto__ = null; + } + return o; + }; + })(); - this.emit(b.ifStatement( - test, - b.blockStatement([ - this.assign(this.contextProperty("next"), toLoc), - b.breakStatement() - ]) - )); -}; + // stringmap ctor + function stringmap(optional_object) { + // use with or without new + if (!(this instanceof stringmap)) { + return new stringmap(optional_object); + } + this.obj = create(); + this.hasProto = false; // false (no __proto__ key) or true (has __proto__ key) + this.proto = undefined; // value for __proto__ key when hasProto is true, undefined otherwise -// Conditional jump, with the condition negated. -Ep.jumpIfNot = function(test, toLoc) { - n.Expression.assert(test); - n.Literal.assert(toLoc); + if (optional_object) { + this.setMany(optional_object); + } + }; - var negatedTest; - if (n.UnaryExpression.check(test) && - test.operator === "!") { - // Avoid double negation. - negatedTest = test.argument; - } else { - negatedTest = b.unaryExpression("!", test); - } + // primitive methods that deals with data representation + stringmap.prototype.has = function(key) { + // The type-check of key in has, get, set and delete is important because otherwise an object + // {toString: function() { return "__proto__"; }} can avoid the key === "__proto__" test. + // The alternative to type-checking would be to force string conversion, i.e. key = String(key); + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + return (key === "__proto__" ? + this.hasProto : + hasOwnProperty.call(this.obj, key)); + }; - this.emit(b.ifStatement( - negatedTest, - b.blockStatement([ - this.assign(this.contextProperty("next"), toLoc), - b.breakStatement() - ]) - )); -}; + stringmap.prototype.get = function(key) { + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + return (key === "__proto__" ? + this.proto : + (hasOwnProperty.call(this.obj, key) ? this.obj[key] : undefined)); + }; -// Returns a unique MemberExpression that can be used to store and -// retrieve temporary values. Since the object of the member expression is -// the context object, which is presumed to coexist peacefully with all -// other local variables, and since we just increment `nextTempId` -// monotonically, uniqueness is assured. -Ep.makeTempVar = function() { - return this.contextProperty("t" + this.nextTempId++); -}; + stringmap.prototype.set = function(key, value) { + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + if (key === "__proto__") { + this.hasProto = true; + this.proto = value; + } else { + this.obj[key] = value; + } + }; -Ep.getContextFunction = function(id) { - return b.functionExpression( - id || null/*Anonymous*/, - [this.contextId], - b.blockStatement([this.getDispatchLoop()]), - false, // Not a generator anymore! - false // Nor an expression. - ); -}; + stringmap.prototype.remove = function(key) { + if (typeof key !== "string") { + throw new Error("StringMap expected string key"); + } + var didExist = this.has(key); + if (key === "__proto__") { + this.hasProto = false; + this.proto = undefined; + } else { + delete this.obj[key]; + } + return didExist; + }; -// Turns this.listing into a loop of the form -// -// while (1) switch (context.next) { -// case 0: -// ... -// case n: -// return context.stop(); -// } -// -// Each marked location in this.listing will correspond to one generated -// case statement. -Ep.getDispatchLoop = function() { - var self = this; - var cases = []; - var current; + // alias remove to delete but beware: + // sm.delete("key"); // OK in ES5 and later + // sm['delete']("key"); // OK in all ES versions + // sm.remove("key"); // OK in all ES versions + stringmap.prototype['delete'] = stringmap.prototype.remove; - // If we encounter a break, continue, or return statement in a switch - // case, we can skip the rest of the statements until the next case. - var alreadyEnded = false; + stringmap.prototype.isEmpty = function() { + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + return false; + } + } + return !this.hasProto; + }; - self.listing.forEach(function(stmt, i) { - if (self.marked.hasOwnProperty(i)) { - cases.push(b.switchCase( - b.literal(i), - current = [])); - alreadyEnded = false; - } + stringmap.prototype.size = function() { + var len = 0; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + ++len; + } + } + return (this.hasProto ? len + 1 : len); + }; - if (!alreadyEnded) { - current.push(stmt); - if (isSwitchCaseEnder(stmt)) - alreadyEnded = true; - } - }); + stringmap.prototype.keys = function() { + var keys = []; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + keys.push(key); + } + } + if (this.hasProto) { + keys.push("__proto__"); + } + return keys; + }; - // Now that we know how many statements there will be in this.listing, - // we can finally resolve this.finalLoc.value. - this.finalLoc.value = this.listing.length; + stringmap.prototype.values = function() { + var values = []; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + values.push(this.obj[key]); + } + } + if (this.hasProto) { + values.push(this.proto); + } + return values; + }; - cases.push( - b.switchCase(this.finalLoc, [ - // Intentionally fall through to the "end" case... - ]), + stringmap.prototype.items = function() { + var items = []; + for (var key in this.obj) { + if (hasOwnProperty.call(this.obj, key)) { + items.push([key, this.obj[key]]); + } + } + if (this.hasProto) { + items.push(["__proto__", this.proto]); + } + return items; + }; - // So that the runtime can jump to the final location without having - // to know its offset, we provide the "end" case as a synonym. - b.switchCase(b.literal("end"), [ - // This will check/clear both context.thrown and context.rval. - b.returnStatement( - b.callExpression(this.contextProperty("stop"), []) - ) - ]) - ); - return b.whileStatement( - b.literal(1), - b.switchStatement( - b.assignmentExpression( - "=", - this.contextProperty("prev"), - this.contextProperty("next") - ), - cases - ) - ); -}; + // methods that rely on the above primitives + stringmap.prototype.setMany = function(object) { + if (object === null || (typeof object !== "object" && typeof object !== "function")) { + throw new Error("StringMap expected Object"); + } + for (var key in object) { + if (hasOwnProperty.call(object, key)) { + this.set(key, object[key]); + } + } + return this; + }; -// See comment above re: alreadyEnded. -function isSwitchCaseEnder(stmt) { - return n.BreakStatement.check(stmt) - || n.ContinueStatement.check(stmt) - || n.ReturnStatement.check(stmt) - || n.ThrowStatement.check(stmt); -} + stringmap.prototype.merge = function(other) { + var keys = other.keys(); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + this.set(key, other.get(key)); + } + return this; + }; -Ep.getTryLocsList = function() { - if (this.tryEntries.length === 0) { - // To avoid adding a needless [] to the majority of runtime.wrap - // argument lists, force the caller to handle this case specially. - return null; - } + stringmap.prototype.map = function(fn) { + var keys = this.keys(); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + keys[i] = fn(this.get(key), key); // re-use keys array for results + } + return keys; + }; - var lastLocValue = 0; + stringmap.prototype.forEach = function(fn) { + var keys = this.keys(); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + fn(this.get(key), key); + } + }; - return b.arrayExpression( - this.tryEntries.map(function(tryEntry) { - var thisLocValue = tryEntry.firstLoc.value; - assert.ok(thisLocValue >= lastLocValue, "try entries out of order"); - lastLocValue = thisLocValue; + stringmap.prototype.clone = function() { + var other = stringmap(); + return other.merge(this); + }; - var ce = tryEntry.catchEntry; - var fe = tryEntry.finallyEntry; + stringmap.prototype.toString = function() { + var self = this; + return "{" + this.keys().map(function(key) { + return JSON.stringify(key) + ":" + JSON.stringify(self.get(key)); + }).join(",") + "}"; + }; - var locs = [ - tryEntry.firstLoc, - // The null here makes a hole in the array. - ce ? ce.firstLoc : null - ]; + return stringmap; +})(); - if (fe) { - locs[2] = fe.firstLoc; - locs[3] = fe.afterLoc; - } +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = StringMap; +} - return b.arrayExpression(locs); - }) - ); -}; +},{}],495:[function(require,module,exports){ +// stringset.js +// MIT licensed, see LICENSE file +// Copyright (c) 2013 Olov Lassus -// All side effects must be realized in order. +var StringSet = (function() { + "use strict"; -// If any subexpression harbors a leap, all subexpressions must be -// neutered of side effects. + // to save us a few characters + var hasOwnProperty = Object.prototype.hasOwnProperty; -// No destructive modification of AST nodes. + var create = (function() { + function hasOwnEnumerableProps(obj) { + for (var prop in obj) { + if (hasOwnProperty.call(obj, prop)) { + return true; + } + } + return false; + } -Ep.explode = function(path, ignoreResult) { - assert.ok(path instanceof types.NodePath); + // FF <= 3.6: + // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true + // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false + function hasOwnPollutedProps(obj) { + return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__"); + } - var node = path.value; - var self = this; + var useObjectCreate = false; + if (typeof Object.create === "function") { + if (!hasOwnEnumerableProps(Object.create(null))) { + useObjectCreate = true; + } + } + if (useObjectCreate === false) { + if (hasOwnEnumerableProps({})) { + throw new Error("StringSet environment error 0, please file a bug at https://github.com/olov/stringset/issues"); + } + } + // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims) - n.Node.assert(node); + var o = (useObjectCreate ? Object.create(null) : {}); + var useProtoClear = false; + if (hasOwnPollutedProps(o)) { + o.__proto__ = null; + if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) { + throw new Error("StringSet environment error 1, please file a bug at https://github.com/olov/stringset/issues"); + } + useProtoClear = true; + } + // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims) - if (n.Statement.check(node)) - return self.explodeStatement(path); + return function() { + var o = (useObjectCreate ? Object.create(null) : {}); + if (useProtoClear) { + o.__proto__ = null; + } + return o; + }; + })(); - if (n.Expression.check(node)) - return self.explodeExpression(path, ignoreResult); + // stringset ctor + function stringset(optional_array) { + // use with or without new + if (!(this instanceof stringset)) { + return new stringset(optional_array); + } + this.obj = create(); + this.hasProto = false; // false (no __proto__ item) or true (has __proto__ item) - if (n.Declaration.check(node)) - throw getDeclError(node); + if (optional_array) { + this.addMany(optional_array); + } + }; - switch (node.type) { - case "Program": - return path.get("body").map( - self.explodeStatement, - self - ); + // primitive methods that deals with data representation + stringset.prototype.has = function(item) { + // The type-check of item in has, get, set and delete is important because otherwise an object + // {toString: function() { return "__proto__"; }} can avoid the item === "__proto__" test. + // The alternative to type-checking would be to force string conversion, i.e. item = String(item); + if (typeof item !== "string") { + throw new Error("StringSet expected string item"); + } + return (item === "__proto__" ? + this.hasProto : + hasOwnProperty.call(this.obj, item)); + }; - case "VariableDeclarator": - throw getDeclError(node); + stringset.prototype.add = function(item) { + if (typeof item !== "string") { + throw new Error("StringSet expected string item"); + } + if (item === "__proto__") { + this.hasProto = true; + } else { + this.obj[item] = true; + } + }; - // These node types should be handled by their parent nodes - // (ObjectExpression, SwitchStatement, and TryStatement, respectively). - case "Property": - case "SwitchCase": - case "CatchClause": - throw new Error( - node.type + " nodes should be handled by their parents"); + stringset.prototype.remove = function(item) { + if (typeof item !== "string") { + throw new Error("StringSet expected string item"); + } + var didExist = this.has(item); + if (item === "__proto__") { + this.hasProto = false; + } else { + delete this.obj[item]; + } + return didExist; + }; - default: - throw new Error( - "unknown Node of type " + - JSON.stringify(node.type)); - } -}; + // alias remove to delete but beware: + // ss.delete("key"); // OK in ES5 and later + // ss['delete']("key"); // OK in all ES versions + // ss.remove("key"); // OK in all ES versions + stringset.prototype['delete'] = stringset.prototype.remove; -function getDeclError(node) { - return new Error( - "all declarations should have been transformed into " + - "assignments before the Exploder began its work: " + - JSON.stringify(node)); -} + stringset.prototype.isEmpty = function() { + for (var item in this.obj) { + if (hasOwnProperty.call(this.obj, item)) { + return false; + } + } + return !this.hasProto; + }; -Ep.explodeStatement = function(path, labelId) { - assert.ok(path instanceof types.NodePath); + stringset.prototype.size = function() { + var len = 0; + for (var item in this.obj) { + if (hasOwnProperty.call(this.obj, item)) { + ++len; + } + } + return (this.hasProto ? len + 1 : len); + }; - var stmt = path.value; - var self = this; + stringset.prototype.items = function() { + var items = []; + for (var item in this.obj) { + if (hasOwnProperty.call(this.obj, item)) { + items.push(item); + } + } + if (this.hasProto) { + items.push("__proto__"); + } + return items; + }; - n.Statement.assert(stmt); - if (labelId) { - n.Identifier.assert(labelId); - } else { - labelId = null; - } + // methods that rely on the above primitives + stringset.prototype.addMany = function(items) { + if (!Array.isArray(items)) { + throw new Error("StringSet expected array"); + } + for (var i = 0; i < items.length; i++) { + this.add(items[i]); + } + return this; + }; - // Explode BlockStatement nodes even if they do not contain a yield, - // because we don't want or need the curly braces. - if (n.BlockStatement.check(stmt)) { - return path.get("body").each( - self.explodeStatement, - self - ); - } + stringset.prototype.merge = function(other) { + this.addMany(other.items()); + return this; + }; - if (!meta.containsLeap(stmt)) { - // Technically we should be able to avoid emitting the statement - // altogether if !meta.hasSideEffects(stmt), but that leads to - // confusing generated code (for instance, `while (true) {}` just - // disappears) and is probably a more appropriate job for a dedicated - // dead code elimination pass. - self.emit(stmt); - return; - } + stringset.prototype.clone = function() { + var other = stringset(); + return other.merge(this); + }; - switch (stmt.type) { - case "ExpressionStatement": - self.explodeExpression(path.get("expression"), true); - break; + stringset.prototype.toString = function() { + return "{" + this.items().map(JSON.stringify).join(",") + "}"; + }; - case "LabeledStatement": - var after = loc(); + return stringset; +})(); - // Did you know you can break from any labeled block statement or - // control structure? Well, you can! Note: when a labeled loop is - // encountered, the leap.LabeledEntry created here will immediately - // enclose a leap.LoopEntry on the leap manager's stack, and both - // entries will have the same label. Though this works just fine, it - // may seem a bit redundant. In theory, we could check here to - // determine if stmt knows how to handle its own label; for example, - // stmt happens to be a WhileStatement and so we know it's going to - // establish its own LoopEntry when we explode it (below). Then this - // LabeledEntry would be unnecessary. Alternatively, we might be - // tempted not to pass stmt.label down into self.explodeStatement, - // because we've handled the label here, but that's a mistake because - // labeled loops may contain labeled continue statements, which is not - // something we can handle in this generic case. All in all, I think a - // little redundancy greatly simplifies the logic of this case, since - // it's clear that we handle all possible LabeledStatements correctly - // here, regardless of whether they interact with the leap manager - // themselves. Also remember that labels and break/continue-to-label - // statements are rare, and all of this logic happens at transform - // time, so it has no additional runtime cost. - self.leapManager.withEntry( - new leap.LabeledEntry(after, stmt.label), - function() { - self.explodeStatement(path.get("body"), stmt.label); - } - ); +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = StringSet; +} - self.mark(after); +},{}],496:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var n = types.namedTypes; +var isArray = types.builtInTypes.array; +var isObject = types.builtInTypes.object; +var linesModule = require("./lines"); +var fromString = linesModule.fromString; +var Lines = linesModule.Lines; +var concat = linesModule.concat; +var util = require("./util"); +var comparePos = util.comparePos; +var childNodesCacheKey = require("private").makeUniqueKey(); - break; +// TODO Move a non-caching implementation of this function into ast-types, +// and implement a caching wrapper function here. +function getSortedChildNodes(node, resultArray) { + if (!node) { + return; + } - case "WhileStatement": - var before = loc(); - var after = loc(); + // The .loc checks below are sensitive to some of the problems that + // are fixed by this utility function. Specifically, if it decides to + // set node.loc to null, indicating that the node's .loc information + // is unreliable, then we don't want to add node to the resultArray. + util.fixFaultyLocations(node); - self.mark(before); - self.jumpIfNot(self.explodeExpression(path.get("test")), after); - self.leapManager.withEntry( - new leap.LoopEntry(after, before, labelId), - function() { self.explodeStatement(path.get("body")); } - ); - self.jump(before); - self.mark(after); + if (resultArray) { + if (n.Node.check(node) && + n.SourceLocation.check(node.loc)) { + // This reverse insertion sort almost always takes constant + // time because we almost always (maybe always?) append the + // nodes in order anyway. + for (var i = resultArray.length - 1; i >= 0; --i) { + if (comparePos(resultArray[i].loc.end, + node.loc.start) <= 0) { + break; + } + } + resultArray.splice(i + 1, 0, node); + return; + } + } else if (node[childNodesCacheKey]) { + return node[childNodesCacheKey]; + } - break; + var names; + if (isArray.check(node)) { + names = Object.keys(node); + } else if (isObject.check(node)) { + names = types.getFieldNames(node); + } else { + return; + } - case "DoWhileStatement": - var first = loc(); - var test = loc(); - var after = loc(); + if (!resultArray) { + Object.defineProperty(node, childNodesCacheKey, { + value: resultArray = [], + enumerable: false + }); + } - self.mark(first); - self.leapManager.withEntry( - new leap.LoopEntry(after, test, labelId), - function() { self.explode(path.get("body")); } - ); - self.mark(test); - self.jumpIf(self.explodeExpression(path.get("test")), first); - self.mark(after); + for (var i = 0, nameCount = names.length; i < nameCount; ++i) { + getSortedChildNodes(node[names[i]], resultArray); + } - break; + return resultArray; +} - case "ForStatement": - var head = loc(); - var update = loc(); - var after = loc(); +// As efficiently as possible, decorate the comment object with +// .precedingNode, .enclosingNode, and/or .followingNode properties, at +// least one of which is guaranteed to be defined. +function decorateComment(node, comment) { + var childNodes = getSortedChildNodes(node); - if (stmt.init) { - // We pass true here to indicate that if stmt.init is an expression - // then we do not care about its result. - self.explode(path.get("init"), true); - } + // Time to dust off the old binary search robes and wizard hat. + var left = 0, right = childNodes.length; + while (left < right) { + var middle = (left + right) >> 1; + var child = childNodes[middle]; - self.mark(head); + if (comparePos(child.loc.start, comment.loc.start) <= 0 && + comparePos(comment.loc.end, child.loc.end) <= 0) { + // The comment is completely contained by this child node. + decorateComment(comment.enclosingNode = child, comment); + return; // Abandon the binary search at this level. + } - if (stmt.test) { - self.jumpIfNot(self.explodeExpression(path.get("test")), after); - } else { - // No test means continue unconditionally. - } + if (comparePos(child.loc.end, comment.loc.start) <= 0) { + // This child node falls completely before the comment. + // Because we will never consider this node or any nodes + // before it again, this node must be the closest preceding + // node we have encountered so far. + var precedingNode = child; + left = middle + 1; + continue; + } - self.leapManager.withEntry( - new leap.LoopEntry(after, update, labelId), - function() { self.explodeStatement(path.get("body")); } - ); + if (comparePos(comment.loc.end, child.loc.start) <= 0) { + // This child node falls completely after the comment. + // Because we will never consider this node or any nodes after + // it again, this node must be the closest following node we + // have encountered so far. + var followingNode = child; + right = middle; + continue; + } - self.mark(update); + throw new Error("Comment location overlaps with node location"); + } - if (stmt.update) { - // We pass true here to indicate that if stmt.update is an - // expression then we do not care about its result. - self.explode(path.get("update"), true); + if (precedingNode) { + comment.precedingNode = precedingNode; } - self.jump(head); + if (followingNode) { + comment.followingNode = followingNode; + } +} - self.mark(after); +exports.attach = function(comments, ast, lines) { + if (!isArray.check(comments)) { + return; + } - break; + var tiesToBreak = []; - case "ForInStatement": - var head = loc(); - var after = loc(); + comments.forEach(function(comment) { + comment.loc.lines = lines; + decorateComment(ast, comment); - var keyIterNextFn = self.makeTempVar(); - self.emitAssign( - keyIterNextFn, - b.callExpression( - runtimeProperty("keys"), - [self.explodeExpression(path.get("right"))] - ) - ); + var pn = comment.precedingNode; + var en = comment.enclosingNode; + var fn = comment.followingNode; - self.mark(head); + if (pn && fn) { + var tieCount = tiesToBreak.length; + if (tieCount > 0) { + var lastTie = tiesToBreak[tieCount - 1]; - var keyInfoTmpVar = self.makeTempVar(); - self.jumpIf( - b.memberExpression( - b.assignmentExpression( - "=", - keyInfoTmpVar, - b.callExpression(keyIterNextFn, []) - ), - b.identifier("done"), - false - ), - after - ); + assert.strictEqual( + lastTie.precedingNode === comment.precedingNode, + lastTie.followingNode === comment.followingNode + ); - self.emitAssign( - stmt.left, - b.memberExpression( - keyInfoTmpVar, - b.identifier("value"), - false - ) - ); + if (lastTie.followingNode !== comment.followingNode) { + breakTies(tiesToBreak, lines); + } + } - self.leapManager.withEntry( - new leap.LoopEntry(after, head, labelId), - function() { self.explodeStatement(path.get("body")); } - ); + tiesToBreak.push(comment); - self.jump(head); + } else if (pn) { + // No contest: we have a trailing comment. + breakTies(tiesToBreak, lines); + addTrailingComment(pn, comment); - self.mark(after); + } else if (fn) { + // No contest: we have a leading comment. + breakTies(tiesToBreak, lines); + addLeadingComment(fn, comment); - break; + } else if (en) { + // The enclosing node has no child nodes at all, so what we + // have here is a dangling comment, e.g. [/* crickets */]. + breakTies(tiesToBreak, lines); + addDanglingComment(en, comment); - case "BreakStatement": - self.emitAbruptCompletion({ - type: "break", - target: self.leapManager.getBreakLoc(stmt.label) + } else { + throw new Error("AST contains no nodes at all?"); + } }); - break; + breakTies(tiesToBreak, lines); - case "ContinueStatement": - self.emitAbruptCompletion({ - type: "continue", - target: self.leapManager.getContinueLoc(stmt.label) + comments.forEach(function(comment) { + // These node references were useful for breaking ties, but we + // don't need them anymore, and they create cycles in the AST that + // may lead to infinite recursion if we don't delete them here. + delete comment.precedingNode; + delete comment.enclosingNode; + delete comment.followingNode; }); +}; - break; - - case "SwitchStatement": - // Always save the discriminant into a temporary variable in case the - // test expressions overwrite values like context.sent. - var disc = self.emitAssign( - self.makeTempVar(), - self.explodeExpression(path.get("discriminant")) - ); - - var after = loc(); - var defaultLoc = loc(); - var condition = defaultLoc; - var caseLocs = []; - - // If there are no cases, .cases might be undefined. - var cases = stmt.cases || []; - - for (var i = cases.length - 1; i >= 0; --i) { - var c = cases[i]; - n.SwitchCase.assert(c); - - if (c.test) { - condition = b.conditionalExpression( - b.binaryExpression("===", disc, c.test), - caseLocs[i] = loc(), - condition - ); - } else { - caseLocs[i] = defaultLoc; - } +function breakTies(tiesToBreak, lines) { + var tieCount = tiesToBreak.length; + if (tieCount === 0) { + return; } - self.jump(self.explodeExpression( - new types.NodePath(condition, path, "discriminant") - )); - - self.leapManager.withEntry( - new leap.SwitchEntry(after), - function() { - path.get("cases").each(function(casePath) { - var c = casePath.value; - var i = casePath.name; + var pn = tiesToBreak[0].precedingNode; + var fn = tiesToBreak[0].followingNode; + var gapEndPos = fn.loc.start; - self.mark(caseLocs[i]); + // Iterate backwards through tiesToBreak, examining the gaps + // between the tied comments. In order to qualify as leading, a + // comment must be separated from fn by an unbroken series of + // whitespace-only gaps (or other comments). + for (var indexOfFirstLeadingComment = tieCount; + indexOfFirstLeadingComment > 0; + --indexOfFirstLeadingComment) { + var comment = tiesToBreak[indexOfFirstLeadingComment - 1]; + assert.strictEqual(comment.precedingNode, pn); + assert.strictEqual(comment.followingNode, fn); - casePath.get("consequent").each( - self.explodeStatement, - self - ); - }); - } - ); + var gap = lines.sliceString(comment.loc.end, gapEndPos); + if (/\S/.test(gap)) { + // The gap string contained something other than whitespace. + break; + } - self.mark(after); - if (defaultLoc.value === -1) { - self.mark(defaultLoc); - assert.strictEqual(after.value, defaultLoc.value); + gapEndPos = comment.loc.start; } - break; - - case "IfStatement": - var elseLoc = stmt.alternate && loc(); - var after = loc(); - - self.jumpIfNot( - self.explodeExpression(path.get("test")), - elseLoc || after - ); - - self.explodeStatement(path.get("consequent")); - - if (elseLoc) { - self.jump(after); - self.mark(elseLoc); - self.explodeStatement(path.get("alternate")); + while (indexOfFirstLeadingComment <= tieCount && + (comment = tiesToBreak[indexOfFirstLeadingComment]) && + // If the comment is a //-style comment and indented more + // deeply than the node itself, reconsider it as trailing. + comment.type === "Line" && + comment.loc.start.column > fn.loc.start.column) { + ++indexOfFirstLeadingComment; } - self.mark(after); - - break; - - case "ReturnStatement": - self.emitAbruptCompletion({ - type: "return", - value: self.explodeExpression(path.get("argument")) + tiesToBreak.forEach(function(comment, i) { + if (i < indexOfFirstLeadingComment) { + addTrailingComment(pn, comment); + } else { + addLeadingComment(fn, comment); + } }); - break; - - case "WithStatement": - throw new Error( - node.type + " not supported in generator functions."); + tiesToBreak.length = 0; +} - case "TryStatement": - var after = loc(); +function addCommentHelper(node, comment) { + var comments = node.comments || (node.comments = []); + comments.push(comment); +} - var handler = stmt.handler; - if (!handler && stmt.handlers) { - handler = stmt.handlers[0] || null; - } +function addLeadingComment(node, comment) { + comment.leading = true; + comment.trailing = false; + addCommentHelper(node, comment); +} - var catchLoc = handler && loc(); - var catchEntry = catchLoc && new leap.CatchEntry( - catchLoc, - handler.param - ); +function addDanglingComment(node, comment) { + comment.leading = false; + comment.trailing = false; + addCommentHelper(node, comment); +} - var finallyLoc = stmt.finalizer && loc(); - var finallyEntry = finallyLoc && - new leap.FinallyEntry(finallyLoc, after); +function addTrailingComment(node, comment) { + comment.leading = false; + comment.trailing = true; + addCommentHelper(node, comment); +} - var tryEntry = new leap.TryEntry( - self.getUnmarkedCurrentLoc(), - catchEntry, - finallyEntry - ); +function printLeadingComment(commentPath, print) { + var comment = commentPath.getValue(); + n.Comment.assert(comment); - self.tryEntries.push(tryEntry); - self.updateContextPrevLoc(tryEntry.firstLoc); + var loc = comment.loc; + var lines = loc && loc.lines; + var parts = [print(commentPath)]; - self.leapManager.withEntry(tryEntry, function() { - self.explodeStatement(path.get("block")); + if (comment.trailing) { + // When we print trailing comments as leading comments, we don't + // want to bring any trailing spaces along. + parts.push("\n"); - if (catchLoc) { - if (finallyLoc) { - // If we have both a catch block and a finally block, then - // because we emit the catch block first, we need to jump over - // it to the finally block. - self.jump(finallyLoc); + } else if (lines instanceof Lines) { + var trailingSpace = lines.slice( + loc.end, + lines.skipSpaces(loc.end) + ); + if (trailingSpace.length === 1) { + // If the trailing space contains no newlines, then we want to + // preserve it exactly as we found it. + parts.push(trailingSpace); } else { - // If there is no finally block, then we need to jump over the - // catch block to the fall-through location. - self.jump(after); + // If the trailing space contains newlines, then replace it + // with just that many newlines, with all other spaces removed. + parts.push(new Array(trailingSpace.length).join("\n")); } - self.updateContextPrevLoc(self.mark(catchLoc)); - - var bodyPath = path.get("handler", "body"); - var safeParam = self.makeTempVar(); - self.clearPendingException(tryEntry.firstLoc, safeParam); - - var catchScope = bodyPath.scope; - var catchParamName = handler.param.name; - n.CatchClause.assert(catchScope.node); - assert.strictEqual(catchScope.lookup(catchParamName), catchScope); + } else { + parts.push("\n"); + } - types.visit(bodyPath, { - visitIdentifier: function(path) { - if (util.isReference(path, catchParamName) && - path.scope.lookup(catchParamName) === catchScope) { - return safeParam; - } + return concat(parts); +} - this.traverse(path); - }, +function printTrailingComment(commentPath, print) { + var comment = commentPath.getValue(commentPath); + n.Comment.assert(comment); - visitFunction: function(path) { - if (path.scope.declares(catchParamName)) { - // Don't descend into nested scopes that shadow the catch - // parameter with their own declarations. This isn't - // logically necessary because of the path.scope.lookup we - // do in visitIdentifier, but it saves time. - return false; - } + var loc = comment.loc; + var lines = loc && loc.lines; + var parts = []; - this.traverse(path); - } - }); + if (lines instanceof Lines) { + var fromPos = lines.skipSpaces(loc.start, true) || lines.firstPos(); + var leadingSpace = lines.slice(fromPos, loc.start); - self.leapManager.withEntry(catchEntry, function() { - self.explodeStatement(bodyPath); - }); - } + if (leadingSpace.length === 1) { + // If the leading space contains no newlines, then we want to + // preserve it exactly as we found it. + parts.push(leadingSpace); + } else { + // If the leading space contains newlines, then replace it + // with just that many newlines, sans all other spaces. + parts.push(new Array(leadingSpace.length).join("\n")); + } + } - if (finallyLoc) { - self.updateContextPrevLoc(self.mark(finallyLoc)); + parts.push(print(commentPath)); - self.leapManager.withEntry(finallyEntry, function() { - self.explodeStatement(path.get("finalizer")); - }); + return concat(parts); +} - self.emit(b.returnStatement(b.callExpression( - self.contextProperty("finish"), - [finallyEntry.firstLoc] - ))); - } - }); +exports.printComments = function(path, print) { + var value = path.getValue(); + var innerLines = print(path); + var comments = n.Node.check(value) && + types.getFieldValue(value, "comments"); - self.mark(after); + if (!comments || comments.length === 0) { + return innerLines; + } - break; + var leadingParts = []; + var trailingParts = [innerLines]; - case "ThrowStatement": - self.emit(b.throwStatement( - self.explodeExpression(path.get("argument")) - )); + path.each(function(commentPath) { + var comment = commentPath.getValue(); + var leading = types.getFieldValue(comment, "leading"); + var trailing = types.getFieldValue(comment, "trailing"); - break; + if (leading || (trailing && comment.type !== "Block")) { + leadingParts.push(printLeadingComment(commentPath, print)); + } else if (trailing) { + assert.strictEqual(comment.type, "Block"); + trailingParts.push(printTrailingComment(commentPath, print)); + } + }, "comments"); - default: - throw new Error( - "unknown Statement of type " + - JSON.stringify(stmt.type)); - } + leadingParts.push.apply(leadingParts, trailingParts); + return concat(leadingParts); }; -Ep.emitAbruptCompletion = function(record) { - if (!isValidCompletion(record)) { - assert.ok( - false, - "invalid completion record: " + - JSON.stringify(record) - ); - } +},{"./lines":498,"./types":504,"./util":505,"assert":2,"private":474}],497:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var n = types.namedTypes; +var Node = n.Node; +var isArray = types.builtInTypes.array; +var isNumber = types.builtInTypes.number; - assert.notStrictEqual( - record.type, "normal", - "normal completions are not abrupt" - ); +function FastPath(value) { + assert.ok(this instanceof FastPath); + this.stack = [value]; +} - var abruptArgs = [b.literal(record.type)]; +var FPp = FastPath.prototype; +module.exports = FastPath; - if (record.type === "break" || - record.type === "continue") { - n.Literal.assert(record.target); - abruptArgs[1] = record.target; - } else if (record.type === "return" || - record.type === "throw") { - if (record.value) { - n.Expression.assert(record.value); - abruptArgs[1] = record.value; +// Static convenience function for coercing a value to a FastPath. +FastPath.from = function(obj) { + if (obj instanceof FastPath) { + // Return a defensive copy of any existing FastPath instances. + return obj.copy(); } - } - this.emit( - b.returnStatement( - b.callExpression( - this.contextProperty("abrupt"), - abruptArgs - ) - ) - ); + if (obj instanceof types.NodePath) { + // For backwards compatibility, unroll NodePath instances into + // lightweight FastPath [..., name, value] stacks. + var copy = Object.create(FastPath.prototype); + var stack = [obj.value]; + for (var pp; (pp = obj.parentPath); obj = pp) + stack.push(obj.name, pp.value); + copy.stack = stack.reverse(); + return copy; + } + + // Otherwise use obj as the value of the new FastPath instance. + return new FastPath(obj); }; -function isValidCompletion(record) { - var type = record.type; +FPp.copy = function copy() { + var copy = Object.create(FastPath.prototype); + copy.stack = this.stack.slice(0); + return copy; +}; - if (type === "normal") { - return !hasOwn.call(record, "target"); - } +// The name of the current property is always the penultimate element of +// this.stack, and always a String. +FPp.getName = function getName() { + var s = this.stack; + var len = s.length; + if (len > 1) { + return s[len - 2]; + } + // Since the name is always a string, null is a safe sentinel value to + // return if we do not know the name of the (root) value. + return null; +}; - if (type === "break" || - type === "continue") { - return !hasOwn.call(record, "value") - && n.Literal.check(record.target); - } +// The value of the current property is always the final element of +// this.stack. +FPp.getValue = function getValue() { + var s = this.stack; + return s[s.length - 1]; +}; - if (type === "return" || - type === "throw") { - return hasOwn.call(record, "value") - && !hasOwn.call(record, "target"); - } +function getNodeHelper(path, count) { + var s = path.stack; - return false; + for (var i = s.length - 1; i >= 0; i -= 2) { + var value = s[i]; + if (n.Node.check(value) && --count < 0) { + return value; + } + } + + return null; } +FPp.getNode = function getNode(count) { + return getNodeHelper(this, ~~count); +}; -// Not all offsets into emitter.listing are potential jump targets. For -// example, execution typically falls into the beginning of a try block -// without jumping directly there. This method returns the current offset -// without marking it, so that a switch case will not necessarily be -// generated for this offset (I say "not necessarily" because the same -// location might end up being marked in the process of emitting other -// statements). There's no logical harm in marking such locations as jump -// targets, but minimizing the number of switch cases keeps the generated -// code shorter. -Ep.getUnmarkedCurrentLoc = function() { - return b.literal(this.listing.length); +FPp.getParentNode = function getParentNode(count) { + return getNodeHelper(this, ~~count + 1); }; -// The context.prev property takes the value of context.next whenever we -// evaluate the switch statement discriminant, which is generally good -// enough for tracking the last location we jumped to, but sometimes -// context.prev needs to be more precise, such as when we fall -// successfully out of a try block and into a finally block without -// jumping. This method exists to update context.prev to the freshest -// available location. If we were implementing a full interpreter, we -// would know the location of the current instruction with complete -// precision at all times, but we don't have that luxury here, as it would -// be costly and verbose to set context.prev before every statement. -Ep.updateContextPrevLoc = function(loc) { - if (loc) { - n.Literal.assert(loc); +// The length of the stack can be either even or odd, depending on whether +// or not we have a name for the root value. The difference between the +// index of the root value and the index of the final value is always +// even, though, which allows us to return the root value in constant time +// (i.e. without iterating backwards through the stack). +FPp.getRootValue = function getRootValue() { + var s = this.stack; + if (s.length % 2 === 0) { + return s[1]; + } + return s[0]; +}; - if (loc.value === -1) { - // If an uninitialized location literal was passed in, set its value - // to the current this.listing.length. - loc.value = this.listing.length; - } else { - // Otherwise assert that the location matches the current offset. - assert.strictEqual(loc.value, this.listing.length); +// Temporarily push properties named by string arguments given after the +// callback function onto this.stack, then call the callback with a +// reference to this (modified) FastPath object. Note that the stack will +// be restored to its original state after the callback is finished, so it +// is probably a mistake to retain a reference to the path. +FPp.call = function call(callback/*, name1, name2, ... */) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); } + var result = callback(this); + s.length = origLen; + return result; +}; - } else { - loc = this.getUnmarkedCurrentLoc(); - } +// Similar to FastPath.prototype.call, except that the value obtained by +// accessing this.getValue()[name1][name2]... should be array-like. The +// callback will be called with a reference to this path object for each +// element of the array. +FPp.each = function each(callback/*, name1, name2, ... */) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; - // Make sure context.prev is up to date in case we fell into this try - // statement without jumping to it. TODO Consider avoiding this - // assignment when we know control must have jumped here. - this.emitAssign(this.contextProperty("prev"), loc); -}; + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); + } -Ep.explodeExpression = function(path, ignoreResult) { - assert.ok(path instanceof types.NodePath); + for (var i = 0; i < value.length; ++i) { + if (i in value) { + s.push(i, value[i]); + // If the callback needs to know the value of i, call + // path.getName(), assuming path is the parameter name. + callback(this); + s.length -= 2; + } + } - var expr = path.value; - if (expr) { - n.Expression.assert(expr); - } else { - return expr; - } + s.length = origLen; +}; - var self = this; - var result; // Used optionally by several cases below. +// Similar to FastPath.prototype.each, except that the results of the +// callback function invocations are stored in an array and returned at +// the end of the iteration. +FPp.map = function map(callback/*, name1, name2, ... */) { + var s = this.stack; + var origLen = s.length; + var value = s[origLen - 1]; + var argc = arguments.length; - function finish(expr) { - n.Expression.assert(expr); - if (ignoreResult) { - self.emit(expr); - } else { - return expr; + for (var i = 1; i < argc; ++i) { + var name = arguments[i]; + value = value[name]; + s.push(name, value); } - } - // If the expression does not contain a leap, then we either emit the - // expression as a standalone statement or return it whole. - if (!meta.containsLeap(expr)) { - return finish(expr); - } + var result = new Array(value.length); - // If any child contains a leap (such as a yield or labeled continue or - // break statement), then any sibling subexpressions will almost - // certainly have to be exploded in order to maintain the order of their - // side effects relative to the leaping child(ren). - var hasLeapingChildren = meta.containsLeap.onlyChildren(expr); + for (var i = 0; i < value.length; ++i) { + if (i in value) { + s.push(i, value[i]); + result[i] = callback(this, i); + s.length -= 2; + } + } - // In order to save the rest of explodeExpression from a combinatorial - // trainwreck of special cases, explodeViaTempVar is responsible for - // deciding when a subexpression needs to be "exploded," which is my - // very technical term for emitting the subexpression as an assignment - // to a temporary variable and the substituting the temporary variable - // for the original subexpression. Think of exploded view diagrams, not - // Michael Bay movies. The point of exploding subexpressions is to - // control the precise order in which the generated code realizes the - // side effects of those subexpressions. - function explodeViaTempVar(tempVar, childPath, ignoreChildResult) { - assert.ok(childPath instanceof types.NodePath); + s.length = origLen; - assert.ok( - !ignoreChildResult || !tempVar, - "Ignoring the result of a child expression but forcing it to " + - "be assigned to a temporary variable?" - ); + return result; +}; - var result = self.explodeExpression(childPath, ignoreChildResult); +// Inspired by require("ast-types").NodePath.prototype.needsParens, but +// more efficient because we're iterating backwards through a stack. +FPp.needsParens = function(assumeExpressionContext) { + var parent = this.getParentNode(); + if (!parent) { + return false; + } - if (ignoreChildResult) { - // Side effects already emitted above. + var name = this.getName(); + var node = this.getNode(); - } else if (tempVar || (hasLeapingChildren && - !n.Literal.check(result))) { - // If tempVar was provided, then the result will always be assigned - // to it, even if the result does not otherwise need to be assigned - // to a temporary variable. When no tempVar is provided, we have - // the flexibility to decide whether a temporary variable is really - // necessary. Unfortunately, in general, a temporary variable is - // required whenever any child contains a yield expression, since it - // is difficult to prove (at all, let alone efficiently) whether - // this result would evaluate to the same value before and after the - // yield (see #206). One narrow case where we can prove it doesn't - // matter (and thus we do not need a temporary variable) is when the - // result in question is a Literal value. - result = self.emitAssign( - tempVar || self.makeTempVar(), - result - ); + // If the value of this path is some child of a Node and not a Node + // itself, then it doesn't need parentheses. Only Node objects (in + // fact, only Expression nodes) need parentheses. + if (this.getValue() !== node) { + return false; } - return result; - } - // If ignoreResult is true, then we must take full responsibility for - // emitting the expression with all its side effects, and we should not - // return a result. + // Only expressions need parentheses. + if (!n.Expression.check(node)) { + return false; + } - switch (expr.type) { - case "MemberExpression": - return finish(b.memberExpression( - self.explodeExpression(path.get("object")), - expr.computed - ? explodeViaTempVar(null, path.get("property")) - : expr.property, - expr.computed - )); + // Identifiers never need parentheses. + if (node.type === "Identifier") { + return false; + } - case "CallExpression": - var calleePath = path.get("callee"); - var argsPath = path.get("arguments"); + if (parent.type === "ParenthesizedExpression") { + return false; + } - var newCallee; - var newArgs = []; + switch (node.type) { + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + return parent.type === "MemberExpression" + && name === "object" + && parent.object === node; - var hasLeapingArgs = false; - argsPath.each(function(argPath) { - hasLeapingArgs = hasLeapingArgs || - meta.containsLeap(argPath.value); - }); + case "BinaryExpression": + case "LogicalExpression": + switch (parent.type) { + case "CallExpression": + return name === "callee" + && parent.callee === node; - if (n.MemberExpression.check(calleePath.value)) { - if (hasLeapingArgs) { - // If the arguments of the CallExpression contained any yield - // expressions, then we need to be sure to evaluate the callee - // before evaluating the arguments, but if the callee was a member - // expression, then we must be careful that the object of the - // member expression still gets bound to `this` for the call. + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + return true; - var newObject = explodeViaTempVar( - // Assign the exploded callee.object expression to a temporary - // variable so that we can use it twice without reevaluating it. - self.makeTempVar(), - calleePath.get("object") - ); + case "MemberExpression": + return name === "object" + && parent.object === node; - var newProperty = calleePath.value.computed - ? explodeViaTempVar(null, calleePath.get("property")) - : calleePath.value.property; + case "BinaryExpression": + case "LogicalExpression": + var po = parent.operator; + var pp = PRECEDENCE[po]; + var no = node.operator; + var np = PRECEDENCE[no]; - newArgs.unshift(newObject); + if (pp > np) { + return true; + } - newCallee = b.memberExpression( - b.memberExpression( - newObject, - newProperty, - calleePath.value.computed - ), - b.identifier("call"), - false - ); + if (pp === np && name === "right") { + assert.strictEqual(parent.right, node); + return true; + } - } else { - newCallee = self.explodeExpression(calleePath); - } + default: + return false; + } - } else { - newCallee = self.explodeExpression(calleePath); + case "SequenceExpression": + switch (parent.type) { + case "ForStatement": + // Although parentheses wouldn't hurt around sequence + // expressions in the head of for loops, traditional style + // dictates that e.g. i++, j++ should not be wrapped with + // parentheses. + return false; - if (n.MemberExpression.check(newCallee)) { - // If the callee was not previously a MemberExpression, then the - // CallExpression was "unqualified," meaning its `this` object - // should be the global object. If the exploded expression has - // become a MemberExpression (e.g. a context property, probably a - // temporary variable), then we need to force it to be unqualified - // by using the (0, object.property)(...) trick; otherwise, it - // will receive the object of the MemberExpression as its `this` - // object. - newCallee = b.sequenceExpression([ - b.literal(0), - newCallee - ]); - } - } + case "ExpressionStatement": + return name !== "expression"; - argsPath.each(function(argPath) { - newArgs.push(explodeViaTempVar(null, argPath)); - }); + default: + // Otherwise err on the side of overparenthesization, adding + // explicit exceptions above if this proves overzealous. + return true; + } - return finish(b.callExpression( - newCallee, - newArgs - )); + case "YieldExpression": + switch (parent.type) { + case "BinaryExpression": + case "LogicalExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "CallExpression": + case "MemberExpression": + case "NewExpression": + case "ConditionalExpression": + case "YieldExpression": + return true; - case "NewExpression": - return finish(b.newExpression( - explodeViaTempVar(null, path.get("callee")), - path.get("arguments").map(function(argPath) { - return explodeViaTempVar(null, argPath); - }) - )); + default: + return false; + } - case "ObjectExpression": - return finish(b.objectExpression( - path.get("properties").map(function(propPath) { - return b.property( - propPath.value.kind, - propPath.value.key, - explodeViaTempVar(null, propPath.get("value")) - ); - }) - )); + case "Literal": + return parent.type === "MemberExpression" + && isNumber.check(node.value) + && name === "object" + && parent.object === node; - case "ArrayExpression": - return finish(b.arrayExpression( - path.get("elements").map(function(elemPath) { - return explodeViaTempVar(null, elemPath); - }) - )); + case "AssignmentExpression": + case "ConditionalExpression": + switch (parent.type) { + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + return true; - case "SequenceExpression": - var lastIndex = expr.expressions.length - 1; + case "CallExpression": + return name === "callee" + && parent.callee === node; - path.get("expressions").each(function(exprPath) { - if (exprPath.name === lastIndex) { - result = self.explodeExpression(exprPath, ignoreResult); - } else { - self.explodeExpression(exprPath, true); - } - }); + case "ConditionalExpression": + return name === "test" + && parent.test === node; - return result; + case "MemberExpression": + return name === "object" + && parent.object === node; - case "LogicalExpression": - var after = loc(); + default: + return false; + } - if (!ignoreResult) { - result = self.makeTempVar(); - } + case "ArrowFunctionExpression": + return isBinary(parent); - var left = explodeViaTempVar(result, path.get("left")); + case "ObjectExpression": + if (parent.type === "ArrowFunctionExpression" && + name === "body") { + return true; + } - if (expr.operator === "&&") { - self.jumpIfNot(left, after); - } else { - assert.strictEqual(expr.operator, "||"); - self.jumpIf(left, after); + default: + if (parent.type === "NewExpression" && + name === "callee" && + parent.callee === node) { + return containsCallExpression(node); + } } - explodeViaTempVar(result, path.get("right"), ignoreResult); + if (assumeExpressionContext !== true && + !this.canBeFirstInStatement() && + this.firstInStatement()) + return true; - self.mark(after); + return false; +}; - return result; +function isBinary(node) { + return n.BinaryExpression.check(node) + || n.LogicalExpression.check(node); +} - case "ConditionalExpression": - var elseLoc = loc(); - var after = loc(); - var test = self.explodeExpression(path.get("test")); +function isUnaryLike(node) { + return n.UnaryExpression.check(node) + // I considered making SpreadElement and SpreadProperty subtypes + // of UnaryExpression, but they're not really Expression nodes. + || (n.SpreadElement && n.SpreadElement.check(node)) + || (n.SpreadProperty && n.SpreadProperty.check(node)); +} - self.jumpIfNot(test, elseLoc); +var PRECEDENCE = {}; +[["||"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"] +].forEach(function(tier, i) { + tier.forEach(function(op) { + PRECEDENCE[op] = i; + }); +}); - if (!ignoreResult) { - result = self.makeTempVar(); +function containsCallExpression(node) { + if (n.CallExpression.check(node)) { + return true; } - explodeViaTempVar(result, path.get("consequent"), ignoreResult); - self.jump(after); + if (isArray.check(node)) { + return node.some(containsCallExpression); + } - self.mark(elseLoc); - explodeViaTempVar(result, path.get("alternate"), ignoreResult); + if (n.Node.check(node)) { + return types.someField(node, function(name, child) { + return containsCallExpression(child); + }); + } - self.mark(after); + return false; +} + +FPp.canBeFirstInStatement = function() { + var node = this.getNode(); + return !n.FunctionExpression.check(node) + && !n.ObjectExpression.check(node); +}; - return result; +FPp.firstInStatement = function() { + var s = this.stack; + var parentName, parent; + var childName, child; - case "UnaryExpression": - return finish(b.unaryExpression( - expr.operator, - // Can't (and don't need to) break up the syntax of the argument. - // Think about delete a[b]. - self.explodeExpression(path.get("argument")), - !!expr.prefix - )); + for (var i = s.length - 1; i >= 0; i -= 2) { + if (n.Node.check(s[i])) { + childName = parentName; + child = parent; + parentName = s[i - 1]; + parent = s[i]; + } - case "BinaryExpression": - return finish(b.binaryExpression( - expr.operator, - explodeViaTempVar(null, path.get("left")), - explodeViaTempVar(null, path.get("right")) - )); + if (!parent || !child) { + continue; + } - case "AssignmentExpression": - return finish(b.assignmentExpression( - expr.operator, - self.explodeExpression(path.get("left")), - self.explodeExpression(path.get("right")) - )); + if (n.BlockStatement.check(parent) && + parentName === "body" && + childName === 0) { + assert.strictEqual(parent.body[0], child); + return true; + } - case "UpdateExpression": - return finish(b.updateExpression( - expr.operator, - self.explodeExpression(path.get("argument")), - expr.prefix - )); + if (n.ExpressionStatement.check(parent) && + childName === "expression") { + assert.strictEqual(parent.expression, child); + return true; + } - case "YieldExpression": - var after = loc(); - var arg = expr.argument && self.explodeExpression(path.get("argument")); + if (n.SequenceExpression.check(parent) && + parentName === "expressions" && + childName === 0) { + assert.strictEqual(parent.expressions[0], child); + continue; + } - if (arg && expr.delegate) { - var result = self.makeTempVar(); + if (n.CallExpression.check(parent) && + childName === "callee") { + assert.strictEqual(parent.callee, child); + continue; + } - self.emit(b.returnStatement(b.callExpression( - self.contextProperty("delegateYield"), [ - arg, - b.literal(result.property.name), - after - ] - ))); + if (n.MemberExpression.check(parent) && + childName === "object") { + assert.strictEqual(parent.object, child); + continue; + } - self.mark(after); + if (n.ConditionalExpression.check(parent) && + childName === "test") { + assert.strictEqual(parent.test, child); + continue; + } - return result; - } + if (isBinary(parent) && + childName === "left") { + assert.strictEqual(parent.left, child); + continue; + } - self.emitAssign(self.contextProperty("next"), after); - self.emit(b.returnStatement(arg || null)); - self.mark(after); + if (n.UnaryExpression.check(parent) && + !parent.prefix && + childName === "argument") { + assert.strictEqual(parent.argument, child); + continue; + } - return self.contextProperty("sent"); + return false; + } - default: - throw new Error( - "unknown Expression of type " + - JSON.stringify(expr.type)); - } + return true; }; -},{"./leap":487,"./meta":488,"./util":489,"assert":213,"recast":516}],486:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ - +},{"./types":504,"assert":2}],498:[function(require,module,exports){ var assert = require("assert"); -var types = require("recast").types; -var n = types.namedTypes; -var b = types.builders; -var hasOwn = Object.prototype.hasOwnProperty; +var sourceMap = require("source-map"); +var normalizeOptions = require("./options").normalize; +var secretKey = require("private").makeUniqueKey(); +var types = require("./types"); +var isString = types.builtInTypes.string; +var comparePos = require("./util").comparePos; +var Mapping = require("./mapping"); -// The hoist function takes a FunctionExpression or FunctionDeclaration -// and replaces any Declaration nodes in its body with assignments, then -// returns a VariableDeclaration containing just the names of the removed -// declarations. -exports.hoist = function(funPath) { - assert.ok(funPath instanceof types.NodePath); - n.Function.assert(funPath.value); +// Goals: +// 1. Minimize new string creation. +// 2. Keep (de)identation O(lines) time. +// 3. Permit negative indentations. +// 4. Enforce immutability. +// 5. No newline characters. - var vars = {}; +function getSecret(lines) { + return lines[secretKey]; +} - function varDeclToExpr(vdec, includeIdentifiers) { - n.VariableDeclaration.assert(vdec); - var exprs = []; +function Lines(infos, sourceFileName) { + assert.ok(this instanceof Lines); + assert.ok(infos.length > 0); - vdec.declarations.forEach(function(dec) { - vars[dec.id.name] = dec.id; + if (sourceFileName) { + isString.assert(sourceFileName); + } else { + sourceFileName = null; + } - if (dec.init) { - exprs.push(b.assignmentExpression( - "=", dec.id, dec.init - )); - } else if (includeIdentifiers) { - exprs.push(dec.id); - } + Object.defineProperty(this, secretKey, { + value: { + infos: infos, + mappings: [], + name: sourceFileName, + cachedSourceMap: null + } }); - if (exprs.length === 0) - return null; - - if (exprs.length === 1) - return exprs[0]; - - return b.sequenceExpression(exprs); - } + if (sourceFileName) { + getSecret(this).mappings.push(new Mapping(this, { + start: this.firstPos(), + end: this.lastPos() + })); + } +} - types.visit(funPath.get("body"), { - visitVariableDeclaration: function(path) { - var expr = varDeclToExpr(path.value, false); - if (expr === null) { - path.replace(); - } else { - // We don't need to traverse this expression any further because - // there can't be any new declarations inside an expression. - return b.expressionStatement(expr); - } +// Exposed for instanceof checks. The fromString function should be used +// to create new Lines objects. +exports.Lines = Lines; +var Lp = Lines.prototype; - // Since the original node has been either removed or replaced, - // avoid traversing it any further. - return false; +// These properties used to be assigned to each new object in the Lines +// constructor, but we can more efficiently stuff them into the secret and +// let these lazy accessors compute their values on-the-fly. +Object.defineProperties(Lp, { + length: { + get: function() { + return getSecret(this).infos.length; + } }, - visitForStatement: function(path) { - var init = path.value.init; - if (n.VariableDeclaration.check(init)) { - path.get("init").replace(varDeclToExpr(init, false)); - } - this.traverse(path); - }, + name: { + get: function() { + return getSecret(this).name; + } + } +}); - visitForInStatement: function(path) { - var left = path.value.left; - if (n.VariableDeclaration.check(left)) { - path.get("left").replace(varDeclToExpr(left, true)); - } - this.traverse(path); - }, +function copyLineInfo(info) { + return { + line: info.line, + indent: info.indent, + sliceStart: info.sliceStart, + sliceEnd: info.sliceEnd + }; +} - visitFunctionDeclaration: function(path) { - var node = path.value; - vars[node.id.name] = node.id; +var fromStringCache = {}; +var hasOwn = fromStringCache.hasOwnProperty; +var maxCacheKeyLen = 10; - var parentNode = path.parent.node; - var assignment = b.expressionStatement( - b.assignmentExpression( - "=", - node.id, - b.functionExpression( - node.id, - node.params, - node.body, - node.generator, - node.expression - ) - ) - ); +function countSpaces(spaces, tabWidth) { + var count = 0; + var len = spaces.length; - if (n.BlockStatement.check(path.parent.node)) { - // Insert the assignment form before the first statement in the - // enclosing block. - path.parent.get("body").unshift(assignment); + for (var i = 0; i < len; ++i) { + switch (spaces.charCodeAt(i)) { + case 9: // '\t' + assert.strictEqual(typeof tabWidth, "number"); + assert.ok(tabWidth > 0); - // Remove the function declaration now that we've inserted the - // equivalent assignment form at the beginning of the block. - path.replace(); + var next = Math.ceil(count / tabWidth) * tabWidth; + if (next === count) { + count += tabWidth; + } else { + count = next; + } - } else { - // If the parent node is not a block statement, then we can just - // replace the declaration with the equivalent assignment form - // without worrying about hoisting it. - path.replace(assignment); - } + break; - // Don't hoist variables out of inner functions. - return false; - }, + case 11: // '\v' + case 12: // '\f' + case 13: // '\r' + case 0xfeff: // zero-width non-breaking space + // These characters contribute nothing to indentation. + break; - visitFunctionExpression: function(path) { - // Don't descend into nested function expressions. - return false; + case 32: // ' ' + default: // Treat all other whitespace like ' '. + count += 1; + break; + } } - }); - var paramNames = {}; - funPath.get("params").each(function(paramPath) { - var param = paramPath.value; - if (n.Identifier.check(param)) { - paramNames[param.name] = param; - } else { - // Variables declared by destructuring parameter patterns will be - // harmlessly re-declared. - } - }); + return count; +} +exports.countSpaces = countSpaces; - var declarations = []; +var leadingSpaceExp = /^\s*/; - Object.keys(vars).forEach(function(name) { - if (!hasOwn.call(paramNames, name)) { - declarations.push(b.variableDeclarator(vars[name], null)); - } - }); +/** + * @param {Object} options - Options object that configures printing. + */ +function fromString(string, options) { + if (string instanceof Lines) + return string; - if (declarations.length === 0) { - return null; // Be sure to handle this case! - } + string += ""; - return b.variableDeclaration("var", declarations); -}; + var tabWidth = options && options.tabWidth; + var tabless = string.indexOf("\t") < 0; + var cacheable = !options && tabless && (string.length <= maxCacheKeyLen); -},{"assert":213,"recast":516}],487:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ + assert.ok(tabWidth || tabless, "No tab width specified but encountered tabs in string\n" + string); -var assert = require("assert"); -var types = require("recast").types; -var n = types.namedTypes; -var b = types.builders; -var inherits = require("util").inherits; -var hasOwn = Object.prototype.hasOwnProperty; + if (cacheable && hasOwn.call(fromStringCache, string)) + return fromStringCache[string]; -function Entry() { - assert.ok(this instanceof Entry); + var lines = new Lines(string.split("\n").map(function(line) { + var spaces = leadingSpaceExp.exec(line)[0]; + return { + line: line, + indent: countSpaces(spaces, tabWidth), + sliceStart: spaces.length, + sliceEnd: line.length + }; + }), normalizeOptions(options).sourceFileName); + + if (cacheable) + fromStringCache[string] = lines; + + return lines; } +exports.fromString = fromString; -function FunctionEntry(returnLoc) { - Entry.call(this); - n.Literal.assert(returnLoc); - this.returnLoc = returnLoc; +function isOnlyWhitespace(string) { + return !/\S/.test(string); } -inherits(FunctionEntry, Entry); -exports.FunctionEntry = FunctionEntry; +Lp.toString = function(options) { + return this.sliceString(this.firstPos(), this.lastPos(), options); +}; -function LoopEntry(breakLoc, continueLoc, label) { - Entry.call(this); +Lp.getSourceMap = function(sourceMapName, sourceRoot) { + if (!sourceMapName) { + // Although we could make up a name or generate an anonymous + // source map, instead we assume that any consumer who does not + // provide a name does not actually want a source map. + return null; + } - n.Literal.assert(breakLoc); - n.Literal.assert(continueLoc); + var targetLines = this; - if (label) { - n.Identifier.assert(label); - } else { - label = null; - } + function updateJSON(json) { + json = json || {}; - this.breakLoc = breakLoc; - this.continueLoc = continueLoc; - this.label = label; -} + isString.assert(sourceMapName); + json.file = sourceMapName; -inherits(LoopEntry, Entry); -exports.LoopEntry = LoopEntry; + if (sourceRoot) { + isString.assert(sourceRoot); + json.sourceRoot = sourceRoot; + } -function SwitchEntry(breakLoc) { - Entry.call(this); - n.Literal.assert(breakLoc); - this.breakLoc = breakLoc; -} + return json; + } -inherits(SwitchEntry, Entry); -exports.SwitchEntry = SwitchEntry; + var secret = getSecret(targetLines); + if (secret.cachedSourceMap) { + // Since Lines objects are immutable, we can reuse any source map + // that was previously generated. Nevertheless, we return a new + // JSON object here to protect the cached source map from outside + // modification. + return updateJSON(secret.cachedSourceMap.toJSON()); + } -function TryEntry(firstLoc, catchEntry, finallyEntry) { - Entry.call(this); + var smg = new sourceMap.SourceMapGenerator(updateJSON()); + var sourcesToContents = {}; - n.Literal.assert(firstLoc); + secret.mappings.forEach(function(mapping) { + var sourceCursor = mapping.sourceLines.skipSpaces( + mapping.sourceLoc.start + ) || mapping.sourceLines.lastPos(); - if (catchEntry) { - assert.ok(catchEntry instanceof CatchEntry); - } else { - catchEntry = null; - } + var targetCursor = targetLines.skipSpaces( + mapping.targetLoc.start + ) || targetLines.lastPos(); - if (finallyEntry) { - assert.ok(finallyEntry instanceof FinallyEntry); - } else { - finallyEntry = null; - } + while (comparePos(sourceCursor, mapping.sourceLoc.end) < 0 && + comparePos(targetCursor, mapping.targetLoc.end) < 0) { - // Have to have one or the other (or both). - assert.ok(catchEntry || finallyEntry); + var sourceChar = mapping.sourceLines.charAt(sourceCursor); + var targetChar = targetLines.charAt(targetCursor); + assert.strictEqual(sourceChar, targetChar); - this.firstLoc = firstLoc; - this.catchEntry = catchEntry; - this.finallyEntry = finallyEntry; -} + var sourceName = mapping.sourceLines.name; -inherits(TryEntry, Entry); -exports.TryEntry = TryEntry; + // Add mappings one character at a time for maximum resolution. + smg.addMapping({ + source: sourceName, + original: { line: sourceCursor.line, + column: sourceCursor.column }, + generated: { line: targetCursor.line, + column: targetCursor.column } + }); -function CatchEntry(firstLoc, paramId) { - Entry.call(this); + if (!hasOwn.call(sourcesToContents, sourceName)) { + var sourceContent = mapping.sourceLines.toString(); + smg.setSourceContent(sourceName, sourceContent); + sourcesToContents[sourceName] = sourceContent; + } - n.Literal.assert(firstLoc); - n.Identifier.assert(paramId); + targetLines.nextPos(targetCursor, true); + mapping.sourceLines.nextPos(sourceCursor, true); + } + }); - this.firstLoc = firstLoc; - this.paramId = paramId; -} + secret.cachedSourceMap = smg; -inherits(CatchEntry, Entry); -exports.CatchEntry = CatchEntry; + return smg.toJSON(); +}; -function FinallyEntry(firstLoc, afterLoc) { - Entry.call(this); - n.Literal.assert(firstLoc); - n.Literal.assert(afterLoc); - this.firstLoc = firstLoc; - this.afterLoc = afterLoc; -} +Lp.bootstrapCharAt = function(pos) { + assert.strictEqual(typeof pos, "object"); + assert.strictEqual(typeof pos.line, "number"); + assert.strictEqual(typeof pos.column, "number"); -inherits(FinallyEntry, Entry); -exports.FinallyEntry = FinallyEntry; + var line = pos.line, + column = pos.column, + strings = this.toString().split("\n"), + string = strings[line - 1]; -function LabeledEntry(breakLoc, label) { - Entry.call(this); + if (typeof string === "undefined") + return ""; - n.Literal.assert(breakLoc); - n.Identifier.assert(label); + if (column === string.length && + line < strings.length) + return "\n"; - this.breakLoc = breakLoc; - this.label = label; -} + if (column >= string.length) + return ""; -inherits(LabeledEntry, Entry); -exports.LabeledEntry = LabeledEntry; + return string.charAt(column); +}; -function LeapManager(emitter) { - assert.ok(this instanceof LeapManager); +Lp.charAt = function(pos) { + assert.strictEqual(typeof pos, "object"); + assert.strictEqual(typeof pos.line, "number"); + assert.strictEqual(typeof pos.column, "number"); - var Emitter = require("./emit").Emitter; - assert.ok(emitter instanceof Emitter); + var line = pos.line, + column = pos.column, + secret = getSecret(this), + infos = secret.infos, + info = infos[line - 1], + c = column; - this.emitter = emitter; - this.entryStack = [new FunctionEntry(emitter.finalLoc)]; -} + if (typeof info === "undefined" || c < 0) + return ""; -var LMp = LeapManager.prototype; -exports.LeapManager = LeapManager; + var indent = this.getIndentAt(line); + if (c < indent) + return " "; -LMp.withEntry = function(entry, callback) { - assert.ok(entry instanceof Entry); - this.entryStack.push(entry); - try { - callback.call(this.emitter); - } finally { - var popped = this.entryStack.pop(); - assert.strictEqual(popped, entry); - } -}; + c += info.sliceStart - indent; -LMp._findLeapLocation = function(property, label) { - for (var i = this.entryStack.length - 1; i >= 0; --i) { - var entry = this.entryStack[i]; - var loc = entry[property]; - if (loc) { - if (label) { - if (entry.label && - entry.label.name === label.name) { - return loc; - } - } else if (entry instanceof LabeledEntry) { - // Ignore LabeledEntry entries unless we are actually breaking to - // a label. - } else { - return loc; - } - } - } + if (c === info.sliceEnd && + line < this.length) + return "\n"; - return null; -}; + if (c >= info.sliceEnd) + return ""; -LMp.getBreakLoc = function(label) { - return this._findLeapLocation("breakLoc", label); + return info.line.charAt(c); }; -LMp.getContinueLoc = function(label) { - return this._findLeapLocation("continueLoc", label); -}; +Lp.stripMargin = function(width, skipFirstLine) { + if (width === 0) + return this; -},{"./emit":485,"assert":213,"recast":516,"util":239}],488:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ + assert.ok(width > 0, "negative margin: " + width); -var assert = require("assert"); -var m = require("private").makeAccessor(); -var types = require("recast").types; -var isArray = types.builtInTypes.array; -var n = types.namedTypes; -var hasOwn = Object.prototype.hasOwnProperty; + if (skipFirstLine && this.length === 1) + return this; -function makePredicate(propertyName, knownTypes) { - function onlyChildren(node) { - n.Node.assert(node); + var secret = getSecret(this); - // Assume no side effects until we find out otherwise. - var result = false; + var lines = new Lines(secret.infos.map(function(info, i) { + if (info.line && (i > 0 || !skipFirstLine)) { + info = copyLineInfo(info); + info.indent = Math.max(0, info.indent - width); + } + return info; + })); - function check(child) { - if (result) { - // Do nothing. - } else if (isArray.check(child)) { - child.some(check); - } else if (n.Node.check(child)) { - assert.strictEqual(result, false); - result = predicate(child); - } - return result; + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + newMappings.push(mapping.indent(width, skipFirstLine, true)); + }); } - types.eachField(node, function(name, child) { - check(child); - }); + return lines; +}; - return result; - } +Lp.indent = function(by) { + if (by === 0) + return this; - function predicate(node) { - n.Node.assert(node); + var secret = getSecret(this); - var meta = m(node); - if (hasOwn.call(meta, propertyName)) - return meta[propertyName]; + var lines = new Lines(secret.infos.map(function(info) { + if (info.line) { + info = copyLineInfo(info); + info.indent += by; + } + return info + })); - // Certain types are "opaque," which means they have no side - // effects or leaps and we don't care about their subexpressions. - if (hasOwn.call(opaqueTypes, node.type)) - return meta[propertyName] = false; + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + newMappings.push(mapping.indent(by)); + }); + } - if (hasOwn.call(knownTypes, node.type)) - return meta[propertyName] = true; + return lines; +}; - return meta[propertyName] = onlyChildren(node); - } +Lp.indentTail = function(by) { + if (by === 0) + return this; - predicate.onlyChildren = onlyChildren; + if (this.length < 2) + return this; - return predicate; -} + var secret = getSecret(this); -var opaqueTypes = { - FunctionExpression: true -}; + var lines = new Lines(secret.infos.map(function(info, i) { + if (i > 0 && info.line) { + info = copyLineInfo(info); + info.indent += by; + } -// These types potentially have side effects regardless of what side -// effects their subexpressions have. -var sideEffectTypes = { - CallExpression: true, // Anything could happen! - ForInStatement: true, // Modifies the key variable. - UnaryExpression: true, // Think delete. - BinaryExpression: true, // Might invoke .toString() or .valueOf(). - AssignmentExpression: true, // Side-effecting by definition. - UpdateExpression: true, // Updates are essentially assignments. - NewExpression: true // Similar to CallExpression. + return info; + })); + + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + newMappings.push(mapping.indent(by, true)); + }); + } + + return lines; }; -// These types are the direct cause of all leaps in control flow. -var leapTypes = { - YieldExpression: true, - BreakStatement: true, - ContinueStatement: true, - ReturnStatement: true, - ThrowStatement: true +Lp.getIndentAt = function(line) { + assert.ok(line >= 1, "no line " + line + " (line numbers start from 1)"); + var secret = getSecret(this), + info = secret.infos[line - 1]; + return Math.max(info.indent, 0); }; -// All leap types are also side effect types. -for (var type in leapTypes) { - if (hasOwn.call(leapTypes, type)) { - sideEffectTypes[type] = leapTypes[type]; - } -} +Lp.guessTabWidth = function() { + var secret = getSecret(this); + if (hasOwn.call(secret, "cachedTabWidth")) { + return secret.cachedTabWidth; + } -exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes); -exports.containsLeap = makePredicate("containsLeap", leapTypes); + var counts = []; // Sparse array. + var lastIndent = 0; -},{"assert":213,"private":484,"recast":516}],489:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ + for (var line = 1, last = this.length; line <= last; ++line) { + var info = secret.infos[line - 1]; + var sliced = info.line.slice(info.sliceStart, info.sliceEnd); -var assert = require("assert"); -var types = require("recast").types; -var n = types.namedTypes; -var b = types.builders; -var hasOwn = Object.prototype.hasOwnProperty; + // Whitespace-only lines don't tell us much about the likely tab + // width of this code. + if (isOnlyWhitespace(sliced)) { + continue; + } -exports.defaults = function(obj) { - var len = arguments.length; - var extension; + var diff = Math.abs(info.indent - lastIndent); + counts[diff] = ~~counts[diff] + 1; + lastIndent = info.indent; + } - for (var i = 1; i < len; ++i) { - if ((extension = arguments[i])) { - for (var key in extension) { - if (hasOwn.call(extension, key) && !hasOwn.call(obj, key)) { - obj[key] = extension[key]; + var maxCount = -1; + var result = 2; + + for (var tabWidth = 1; + tabWidth < counts.length; + tabWidth += 1) { + if (hasOwn.call(counts, tabWidth) && + counts[tabWidth] > maxCount) { + maxCount = counts[tabWidth]; + result = tabWidth; } - } } - } - return obj; + return secret.cachedTabWidth = result; }; -exports.runtimeProperty = function(name) { - return b.memberExpression( - b.identifier("regeneratorRuntime"), - b.identifier(name), - false - ); +Lp.isOnlyWhitespace = function() { + return isOnlyWhitespace(this.toString()); }; -// Inspired by the isReference function from ast-util: -// https://github.com/eventualbuddha/ast-util/blob/9bf91c5ce8/lib/index.js#L466-L506 -exports.isReference = function(path, name) { - var node = path.value; +Lp.isPrecededOnlyByWhitespace = function(pos) { + var secret = getSecret(this); + var info = secret.infos[pos.line - 1]; + var indent = Math.max(info.indent, 0); - if (!n.Identifier.check(node)) { - return false; - } + var diff = pos.column - indent; + if (diff <= 0) { + // If pos.column does not exceed the indentation amount, then + // there must be only whitespace before it. + return true; + } - if (name && node.name !== name) { - return false; - } + var start = info.sliceStart; + var end = Math.min(start + diff, info.sliceEnd); + var prefix = info.line.slice(start, end); - var parent = path.parent.value; + return isOnlyWhitespace(prefix); +}; - switch (parent.type) { - case "VariableDeclarator": - return path.name === "init"; +Lp.getLineLength = function(line) { + var secret = getSecret(this), + info = secret.infos[line - 1]; + return this.getIndentAt(line) + info.sliceEnd - info.sliceStart; +}; - case "MemberExpression": - return path.name === "object" || ( - parent.computed && path.name === "property" - ); +Lp.nextPos = function(pos, skipSpaces) { + var l = Math.max(pos.line, 0), + c = Math.max(pos.column, 0); - case "FunctionExpression": - case "FunctionDeclaration": - case "ArrowFunctionExpression": - if (path.name === "id") { - return false; + if (c < this.getLineLength(l)) { + pos.column += 1; + + return skipSpaces + ? !!this.skipSpaces(pos, false, true) + : true; } - if (path.parentPath.name === "params" && - parent.params === path.parentPath.value && - parent.params[path.name] === node) { - return false; + if (l < this.length) { + pos.line += 1; + pos.column = 0; + + return skipSpaces + ? !!this.skipSpaces(pos, false, true) + : true; } - return true; + return false; +}; - case "ClassDeclaration": - case "ClassExpression": - return path.name !== "id"; +Lp.prevPos = function(pos, skipSpaces) { + var l = pos.line, + c = pos.column; - case "CatchClause": - return path.name !== "param"; + if (c < 1) { + l -= 1; - case "Property": - case "MethodDefinition": - return path.name !== "key"; + if (l < 1) + return false; - case "ImportSpecifier": - case "ImportDefaultSpecifier": - case "ImportNamespaceSpecifier": - case "LabeledStatement": - return false; + c = this.getLineLength(l); - default: - return true; - } -}; + } else { + c = Math.min(c - 1, this.getLineLength(l)); + } -},{"assert":213,"recast":516}],490:[function(require,module,exports){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ + pos.line = l; + pos.column = c; -var assert = require("assert"); -var fs = require("fs"); -var recast = require("recast"); -var types = recast.types; -var n = types.namedTypes; -var b = types.builders; -var isArray = types.builtInTypes.array; -var isObject = types.builtInTypes.object; -var NodePath = types.NodePath; -var hoist = require("./hoist").hoist; -var Emitter = require("./emit").Emitter; -var util = require("./util"); -var runtimeProperty = util.runtimeProperty; -var getMarkInfo = require("private").makeAccessor(); + return skipSpaces + ? !!this.skipSpaces(pos, true, true) + : true; +}; -exports.transform = function transform(node, options) { - options = options || {}; +Lp.firstPos = function() { + // Trivial, but provided for completeness. + return { line: 1, column: 0 }; +}; - var path = node instanceof NodePath ? node : new NodePath(node); - visitor.visit(path, options); - node = path.value; +Lp.lastPos = function() { + return { + line: this.length, + column: this.getLineLength(this.length) + }; +}; - if (options.includeRuntime === true || - (options.includeRuntime === 'if used' && visitor.wasChangeReported())) { - injectRuntime(n.File.check(node) ? node.program : node); - } +Lp.skipSpaces = function(pos, backward, modifyInPlace) { + if (pos) { + pos = modifyInPlace ? pos : { + line: pos.line, + column: pos.column + }; + } else if (backward) { + pos = this.lastPos(); + } else { + pos = this.firstPos(); + } - options.madeChanges = visitor.wasChangeReported(); + if (backward) { + while (this.prevPos(pos)) { + if (!isOnlyWhitespace(this.charAt(pos)) && + this.nextPos(pos)) { + return pos; + } + } - return node; -}; + return null; -function injectRuntime(program) { - n.Program.assert(program); + } else { + while (isOnlyWhitespace(this.charAt(pos))) { + if (!this.nextPos(pos)) { + return null; + } + } - // Include the runtime by modifying the AST rather than by concatenating - // strings. This technique will allow for more accurate source mapping. - var runtimePath = require("..").runtime.path; - var runtime = fs.readFileSync(runtimePath, "utf8"); - var runtimeBody = recast.parse(runtime, { - sourceFileName: runtimePath - }).program.body; + return pos; + } +}; - var body = program.body; - body.unshift.apply(body, runtimeBody); -} +Lp.trimLeft = function() { + var pos = this.skipSpaces(this.firstPos(), false, true); + return pos ? this.slice(pos) : emptyLines; +}; -var visitor = types.PathVisitor.fromMethodsObject({ - reset: function(node, options) { - this.options = options; - }, +Lp.trimRight = function() { + var pos = this.skipSpaces(this.lastPos(), true, true); + return pos ? this.slice(this.firstPos(), pos) : emptyLines; +}; - visitFunction: function(path) { - // Calling this.traverse(path) first makes for a post-order traversal. - this.traverse(path); +Lp.trim = function() { + var start = this.skipSpaces(this.firstPos(), false, true); + if (start === null) + return emptyLines; - var node = path.value; - var shouldTransformAsync = node.async && !this.options.disableAsync; + var end = this.skipSpaces(this.lastPos(), true, true); + assert.notStrictEqual(end, null); - if (!node.generator && !shouldTransformAsync) { - return; - } + return this.slice(start, end); +}; - this.reportChanged(); +Lp.eachPos = function(callback, startPos, skipSpaces) { + var pos = this.firstPos(); - if (node.expression) { - // Transform expression lambdas into normal functions. - node.expression = false; - node.body = b.blockStatement([ - b.returnStatement(node.body) - ]); + if (startPos) { + pos.line = startPos.line, + pos.column = startPos.column } - if (shouldTransformAsync) { - awaitVisitor.visit(path.get("body")); + if (skipSpaces && !this.skipSpaces(pos, false, true)) { + return; // Encountered nothing but spaces. } - var outerBody = []; - var innerBody = []; - var bodyPath = path.get("body", "body"); + do callback.call(this, pos); + while (this.nextPos(pos, skipSpaces)); +}; - bodyPath.each(function(childPath) { - var node = childPath.value; - if (node && node._blockHoist != null) { - outerBody.push(node); - } else { - innerBody.push(node); - } - }); +Lp.bootstrapSlice = function(start, end) { + var strings = this.toString().split("\n").slice( + start.line - 1, end.line); - if (outerBody.length > 0) { - // Only replace the inner body if we actually hoisted any statements - // to the outer body. - bodyPath.replace(innerBody); - } + strings.push(strings.pop().slice(0, end.column)); + strings[0] = strings[0].slice(start.column); - var outerFnExpr = getOuterFnExpr(path); - // Note that getOuterFnExpr has the side-effect of ensuring that the - // function has a name (so node.id will always be an Identifier), even - // if a temporary name has to be synthesized. - n.Identifier.assert(node.id); - var innerFnId = b.identifier(node.id.name + "$"); - var contextId = path.scope.declareTemporary("context$"); - var argsId = path.scope.declareTemporary("args$"); + return fromString(strings.join("\n")); +}; - // Turn all declarations into vars, and replace the original - // declarations with equivalent assignment expressions. - var vars = hoist(path); +Lp.slice = function(start, end) { + if (!end) { + if (!start) { + // The client seems to want a copy of this Lines object, but + // Lines objects are immutable, so it's perfectly adequate to + // return the same object. + return this; + } - var didRenameArguments = renameArguments(path, argsId); - if (didRenameArguments) { - vars = vars || b.variableDeclaration("var", []); - vars.declarations.push(b.variableDeclarator( - argsId, b.identifier("arguments") - )); + // Slice to the end if no end position was provided. + end = this.lastPos(); } - var emitter = new Emitter(contextId); - emitter.explode(path.get("body")); + var secret = getSecret(this); + var sliced = secret.infos.slice(start.line - 1, end.line); - if (vars && vars.declarations.length > 0) { - outerBody.push(vars); + if (start.line === end.line) { + sliced[0] = sliceInfo(sliced[0], start.column, end.column); + } else { + assert.ok(start.line < end.line); + sliced[0] = sliceInfo(sliced[0], start.column); + sliced.push(sliceInfo(sliced.pop(), 0, end.column)); } - var wrapArgs = [ - emitter.getContextFunction(innerFnId), - // Async functions that are not generators don't care about the - // outer function because they don't need it to be marked and don't - // inherit from its .prototype. - node.generator ? outerFnExpr : b.literal(null), - b.thisExpression() - ]; + var lines = new Lines(sliced); - var tryLocsList = emitter.getTryLocsList(); - if (tryLocsList) { - wrapArgs.push(tryLocsList); + if (secret.mappings.length > 0) { + var newMappings = getSecret(lines).mappings; + assert.strictEqual(newMappings.length, 0); + secret.mappings.forEach(function(mapping) { + var sliced = mapping.slice(this, start, end); + if (sliced) { + newMappings.push(sliced); + } + }, this); } - var wrapCall = b.callExpression( - runtimeProperty(shouldTransformAsync ? "async" : "wrap"), - wrapArgs - ); - - outerBody.push(b.returnStatement(wrapCall)); - node.body = b.blockStatement(outerBody); - - var wasGeneratorFunction = node.generator; - if (wasGeneratorFunction) { - node.generator = false; - } + return lines; +}; - if (shouldTransformAsync) { - node.async = false; - } +function sliceInfo(info, startCol, endCol) { + var sliceStart = info.sliceStart; + var sliceEnd = info.sliceEnd; + var indent = Math.max(info.indent, 0); + var lineLength = indent + sliceEnd - sliceStart; - if (wasGeneratorFunction && - n.Expression.check(node)) { - return b.callExpression(runtimeProperty("mark"), [node]); + if (typeof endCol === "undefined") { + endCol = lineLength; } - }, - - visitForOfStatement: function(path) { - this.traverse(path); - - var node = path.value; - var tempIterId = path.scope.declareTemporary("t$"); - var tempIterDecl = b.variableDeclarator( - tempIterId, - b.callExpression( - runtimeProperty("values"), - [node.right] - ) - ); - var tempInfoId = path.scope.declareTemporary("t$"); - var tempInfoDecl = b.variableDeclarator(tempInfoId, null); + startCol = Math.max(startCol, 0); + endCol = Math.min(endCol, lineLength); + endCol = Math.max(endCol, startCol); - var init = node.left; - var loopId; - if (n.VariableDeclaration.check(init)) { - loopId = init.declarations[0].id; - init.declarations.push(tempIterDecl, tempInfoDecl); + if (endCol < indent) { + indent = endCol; + sliceEnd = sliceStart; } else { - loopId = init; - init = b.variableDeclaration("var", [ - tempIterDecl, - tempInfoDecl - ]); + sliceEnd -= lineLength - endCol; } - n.Identifier.assert(loopId); - var loopIdAssignExprStmt = b.expressionStatement( - b.assignmentExpression( - "=", - loopId, - b.memberExpression( - tempInfoId, - b.identifier("value"), - false - ) - ) - ); + lineLength = endCol; + lineLength -= startCol; - if (n.BlockStatement.check(node.body)) { - node.body.body.unshift(loopIdAssignExprStmt); + if (startCol < indent) { + indent -= startCol; } else { - node.body = b.blockStatement([ - loopIdAssignExprStmt, - node.body - ]); + startCol -= indent; + indent = 0; + sliceStart += startCol; } - return b.forStatement( - init, - b.unaryExpression( - "!", - b.memberExpression( - b.assignmentExpression( - "=", - tempInfoId, - b.callExpression( - b.memberExpression( - tempIterId, - b.identifier("next"), - false - ), - [] - ) - ), - b.identifier("done"), - false - ) - ), - null, - node.body - ); - } -}); - -// Given a NodePath for a Function, return an Expression node that can be -// used to refer reliably to the function object from inside the function. -// This expression is essentially a replacement for arguments.callee, with -// the key advantage that it works in strict mode. -function getOuterFnExpr(funPath) { - var node = funPath.value; - n.Function.assert(node); - - if (node.generator && // Non-generator functions don't need to be marked. - n.FunctionDeclaration.check(node)) { - var pp = funPath.parent; + assert.ok(indent >= 0); + assert.ok(sliceStart <= sliceEnd); + assert.strictEqual(lineLength, indent + sliceEnd - sliceStart); - while (pp && !(n.BlockStatement.check(pp.value) || - n.Program.check(pp.value))) { - pp = pp.parent; + if (info.indent === indent && + info.sliceStart === sliceStart && + info.sliceEnd === sliceEnd) { + return info; } - if (!pp) { - return node.id; - } + return { + line: info.line, + indent: indent, + sliceStart: sliceStart, + sliceEnd: sliceEnd + }; +} - var markDecl = getRuntimeMarkDecl(pp); - var markedArray = markDecl.declarations[0].id; - var funDeclIdArray = markDecl.declarations[0].init.callee.object; - n.ArrayExpression.assert(funDeclIdArray); +Lp.bootstrapSliceString = function(start, end, options) { + return this.slice(start, end).toString(options); +}; - var index = funDeclIdArray.elements.length; - funDeclIdArray.elements.push(node.id); +Lp.sliceString = function(start, end, options) { + if (!end) { + if (!start) { + // The client seems to want a copy of this Lines object, but + // Lines objects are immutable, so it's perfectly adequate to + // return the same object. + return this; + } - return b.memberExpression( - markedArray, - b.literal(index), - true - ); - } + // Slice to the end if no end position was provided. + end = this.lastPos(); + } - return node.id || ( - node.id = funPath.scope.parent.declareTemporary("callee$") - ); -} + options = normalizeOptions(options); -function getRuntimeMarkDecl(blockPath) { - assert.ok(blockPath instanceof NodePath); - var block = blockPath.node; - isArray.assert(block.body); + var infos = getSecret(this).infos; + var parts = []; + var tabWidth = options.tabWidth; - var info = getMarkInfo(block); - if (info.decl) { - return info.decl; - } + for (var line = start.line; line <= end.line; ++line) { + var info = infos[line - 1]; - info.decl = b.variableDeclaration("var", [ - b.variableDeclarator( - blockPath.scope.declareTemporary("marked"), - b.callExpression( - b.memberExpression( - b.arrayExpression([]), - b.identifier("map"), - false - ), - [runtimeProperty("mark")] - ) - ) - ]); + if (line === start.line) { + if (line === end.line) { + info = sliceInfo(info, start.column, end.column); + } else { + info = sliceInfo(info, start.column); + } + } else if (line === end.line) { + info = sliceInfo(info, 0, end.column); + } - for (var i = 0; i < block.body.length; ++i) { - if (!shouldNotHoistAbove(blockPath.get("body", i))) { - break; - } - } + var indent = Math.max(info.indent, 0); - blockPath.get("body").insertAt(i, info.decl); + var before = info.line.slice(0, info.sliceStart); + if (options.reuseWhitespace && + isOnlyWhitespace(before) && + countSpaces(before, options.tabWidth) === indent) { + // Reuse original spaces if the indentation is correct. + parts.push(info.line.slice(0, info.sliceEnd)); + continue; + } - return info.decl; -} + var tabs = 0; + var spaces = indent; -function shouldNotHoistAbove(stmtPath) { - var value = stmtPath.value; - n.Statement.assert(value); + if (options.useTabs) { + tabs = Math.floor(indent / tabWidth); + spaces -= tabs * tabWidth; + } - // If the first statement is a "use strict" declaration, make sure to - // insert hoisted declarations afterwards. - return n.ExpressionStatement.check(value) && - n.Literal.check(value.expression) && - value.expression.value === "use strict"; -} + var result = ""; -function renameArguments(funcPath, argsId) { - assert.ok(funcPath instanceof types.NodePath); - var func = funcPath.value; - var didRenameArguments = false; + if (tabs > 0) { + result += new Array(tabs + 1).join("\t"); + } - recast.visit(funcPath, { - visitFunction: function(path) { - if (path.value === func) { - this.traverse(path); - } else { - return false; - } - }, + if (spaces > 0) { + result += new Array(spaces + 1).join(" "); + } - visitIdentifier: function(path) { - if (path.value.name === "arguments" && - util.isReference(path)) { - path.replace(argsId); - didRenameArguments = true; - return false; - } + result += info.line.slice(info.sliceStart, info.sliceEnd); - this.traverse(path); + parts.push(result); } - }); - // If the traversal replaced any arguments references, then we need to - // alias the outer function's arguments binding (be it the implicit - // arguments object or some other parameter or variable) to the variable - // named by argsId. - return didRenameArguments; -} + return parts.join("\n"); +}; -var awaitVisitor = types.PathVisitor.fromMethodsObject({ - visitFunction: function(path) { - return false; // Don't descend into nested function scopes. - }, +Lp.isEmpty = function() { + return this.length < 2 && this.getLineLength(1) < 1; +}; - visitAwaitExpression: function(path) { - // Convert await and await* expressions to yield expressions. - var argument = path.value.argument; +Lp.join = function(elements) { + var separator = this; + var separatorSecret = getSecret(separator); + var infos = []; + var mappings = []; + var prevInfo; - // If the parser supports await* syntax using a boolean .all property - // (#171), desugar that syntax to yield Promise.all(argument). - if (path.value.all) { - argument = b.callExpression( - b.memberExpression( - b.identifier("Promise"), - b.identifier("all"), - false - ), - [argument] - ); - } + function appendSecret(secret) { + if (secret === null) + return; - // Transforming `await x` to `yield regeneratorRuntime.awrap(x)` - // causes the argument to be wrapped in such a way that the runtime - // can distinguish between awaited and merely yielded values. - return b.yieldExpression( - b.callExpression( - runtimeProperty("awrap"), - [argument] - ), - false - ); - } -}); + if (prevInfo) { + var info = secret.infos[0]; + var indent = new Array(info.indent + 1).join(" "); + var prevLine = infos.length; + var prevColumn = Math.max(prevInfo.indent, 0) + + prevInfo.sliceEnd - prevInfo.sliceStart; -},{"..":491,"./emit":485,"./hoist":486,"./util":489,"assert":213,"fs":212,"private":484,"recast":516}],491:[function(require,module,exports){ -(function (__dirname){ -/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ + prevInfo.line = prevInfo.line.slice( + 0, prevInfo.sliceEnd) + indent + info.line.slice( + info.sliceStart, info.sliceEnd); -var assert = require("assert"); -var path = require("path"); -var fs = require("fs"); -var through = require("through"); -var transform = require("./lib/visit").transform; -var utils = require("./lib/util"); -var recast = require("recast"); -var types = recast.types; -var genOrAsyncFunExp = /\bfunction\s*\*|\basync\b/; -var blockBindingExp = /\b(let|const)\s+/; + prevInfo.sliceEnd = prevInfo.line.length; -function exports(file, options) { - var data = []; - return through(write, end); + if (secret.mappings.length > 0) { + secret.mappings.forEach(function(mapping) { + mappings.push(mapping.add(prevLine, prevColumn)); + }); + } - function write(buf) { - data.push(buf); - } + } else if (secret.mappings.length > 0) { + mappings.push.apply(mappings, secret.mappings); + } - function end() { - this.queue(compile(data.join(""), options).code); - this.queue(null); - } -} + secret.infos.forEach(function(info, i) { + if (!prevInfo || i > 0) { + prevInfo = copyLineInfo(info); + infos.push(prevInfo); + } + }); + } -// To get a writable stream for use as a browserify transform, call -// require("regenerator")(). -module.exports = exports; + function appendWithSeparator(secret, i) { + if (i > 0) + appendSecret(separatorSecret); + appendSecret(secret); + } -// To include the runtime globally in the current node process, call -// require("regenerator").runtime(). -function runtime() { - require("./runtime"); -} -exports.runtime = runtime; -runtime.path = path.join(__dirname, "runtime.js"); + elements.map(function(elem) { + var lines = fromString(elem); + if (lines.isEmpty()) + return null; + return getSecret(lines); + }).forEach(separator.isEmpty() + ? appendSecret + : appendWithSeparator); + + if (infos.length < 1) + return emptyLines; -function compile(source, options) { - options = normalizeOptions(options); + var lines = new Lines(infos); - if (!genOrAsyncFunExp.test(source)) { - return { - // Shortcut: no generators or async functions to transform. - code: (options.includeRuntime === true ? fs.readFileSync( - path.join(__dirname, "runtime.js"), "utf-8" - ) + "\n" : "") + source - }; - } + getSecret(lines).mappings = mappings; - var recastOptions = getRecastOptions(options); - var ast = recast.parse(source, recastOptions); - var nodePath = new types.NodePath(ast); - var programPath = nodePath.get("program"); + return lines; +}; - if (shouldVarify(source, options)) { - // Transpile let/const into var declarations. - varifyAst(programPath.node); - } +exports.concat = function(elements) { + return emptyLines.join(elements); +}; - transform(programPath, options); +Lp.concat = function(other) { + var args = arguments, + list = [this]; + list.push.apply(list, args); + assert.strictEqual(list.length, args.length + 1); + return emptyLines.join(list); +}; - return recast.print(nodePath, recastOptions); -} +// The emptyLines object needs to be created all the way down here so that +// Lines.prototype will be fully populated. +var emptyLines = fromString(""); -function normalizeOptions(options) { - options = utils.defaults(options || {}, { - includeRuntime: false, - supportBlockBinding: true - }); +},{"./mapping":499,"./options":500,"./types":504,"./util":505,"assert":2,"private":474,"source-map":536}],499:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var isString = types.builtInTypes.string; +var isNumber = types.builtInTypes.number; +var SourceLocation = types.namedTypes.SourceLocation; +var Position = types.namedTypes.Position; +var linesModule = require("./lines"); +var comparePos = require("./util").comparePos; - if (!options.esprima) { - options.esprima = require("esprima-fb"); - } +function Mapping(sourceLines, sourceLoc, targetLoc) { + assert.ok(this instanceof Mapping); + assert.ok(sourceLines instanceof linesModule.Lines); + SourceLocation.assert(sourceLoc); - assert.ok( - /harmony/.test(options.esprima.version), - "Bad esprima version: " + options.esprima.version - ); + if (targetLoc) { + // In certain cases it's possible for targetLoc.{start,end}.column + // values to be negative, which technically makes them no longer + // valid SourceLocation nodes, so we need to be more forgiving. + assert.ok( + isNumber.check(targetLoc.start.line) && + isNumber.check(targetLoc.start.column) && + isNumber.check(targetLoc.end.line) && + isNumber.check(targetLoc.end.column) + ); + } else { + // Assume identity mapping if no targetLoc specified. + targetLoc = sourceLoc; + } - return options; + Object.defineProperties(this, { + sourceLines: { value: sourceLines }, + sourceLoc: { value: sourceLoc }, + targetLoc: { value: targetLoc } + }); } -function getRecastOptions(options) { - var recastOptions = { - range: true - }; +var Mp = Mapping.prototype; +module.exports = Mapping; - function copy(name) { - if (name in options) { - recastOptions[name] = options[name]; +Mp.slice = function(lines, start, end) { + assert.ok(lines instanceof linesModule.Lines); + Position.assert(start); + + if (end) { + Position.assert(end); + } else { + end = lines.lastPos(); } - } - copy("esprima"); - copy("sourceFileName"); - copy("sourceMapName"); - copy("inputSourceMap"); - copy("sourceRoot"); + var sourceLines = this.sourceLines; + var sourceLoc = this.sourceLoc; + var targetLoc = this.targetLoc; - return recastOptions; -} + function skip(name) { + var sourceFromPos = sourceLoc[name]; + var targetFromPos = targetLoc[name]; + var targetToPos = start; -function shouldVarify(source, options) { - var supportBlockBinding = !!options.supportBlockBinding; - if (supportBlockBinding) { - if (!blockBindingExp.test(source)) { - supportBlockBinding = false; - } - } + if (name === "end") { + targetToPos = end; + } else { + assert.strictEqual(name, "start"); + } - return supportBlockBinding; -} + return skipChars( + sourceLines, sourceFromPos, + lines, targetFromPos, targetToPos + ); + } -function varify(source, options) { - var recastOptions = getRecastOptions(normalizeOptions(options)); - var ast = recast.parse(source, recastOptions); - varifyAst(ast.program); - return recast.print(ast, recastOptions).code; -} + if (comparePos(start, targetLoc.start) <= 0) { + if (comparePos(targetLoc.end, end) <= 0) { + targetLoc = { + start: subtractPos(targetLoc.start, start.line, start.column), + end: subtractPos(targetLoc.end, start.line, start.column) + }; -function varifyAst(ast) { - types.namedTypes.Program.assert(ast); + // The sourceLoc can stay the same because the contents of the + // targetLoc have not changed. - var defsResult = require("defs")(ast, { - ast: true, - disallowUnknownReferences: false, - disallowDuplicated: false, - disallowVars: false, - loopClosures: "iife" - }); + } else if (comparePos(end, targetLoc.start) <= 0) { + return null; - if (defsResult.errors) { - throw new Error(defsResult.errors.join("\n")) - } + } else { + sourceLoc = { + start: sourceLoc.start, + end: skip("end") + }; - return ast; -} + targetLoc = { + start: subtractPos(targetLoc.start, start.line, start.column), + end: subtractPos(end, start.line, start.column) + }; + } -// Convenience for just translating let/const to var declarations. -exports.varify = varify; + } else { + if (comparePos(targetLoc.end, start) <= 0) { + return null; + } -// Transforms a string of source code, returning the { code, map? } result -// from recast.print. -exports.compile = compile; + if (comparePos(targetLoc.end, end) <= 0) { + sourceLoc = { + start: skip("start"), + end: sourceLoc.end + }; -// To modify an AST directly, call require("regenerator").transform(ast). -exports.transform = transform; + targetLoc = { + // Same as subtractPos(start, start.line, start.column): + start: { line: 1, column: 0 }, + end: subtractPos(targetLoc.end, start.line, start.column) + }; -}).call(this,"/node_modules/regenerator") -},{"./lib/util":489,"./lib/visit":490,"./runtime":518,"assert":213,"defs":492,"esprima-fb":212,"fs":212,"path":222,"recast":516,"through":517}],492:[function(require,module,exports){ -"use strict"; + } else { + sourceLoc = { + start: skip("start"), + end: skip("end") + }; -var assert = require("assert"); -var is = require("simple-is"); -var fmt = require("simple-fmt"); -var stringmap = require("stringmap"); -var stringset = require("stringset"); -var alter = require("alter"); -var traverse = require("ast-traverse"); -var breakable = require("breakable"); -var Scope = require("./scope"); -var error = require("./error"); -var getline = error.getline; -var options = require("./options"); -var Stats = require("./stats"); -var jshint_vars = require("./jshint_globals/vars.js"); + targetLoc = { + // Same as subtractPos(start, start.line, start.column): + start: { line: 1, column: 0 }, + end: subtractPos(end, start.line, start.column) + }; + } + } + return new Mapping(this.sourceLines, sourceLoc, targetLoc); +}; -function isConstLet(kind) { - return is.someof(kind, ["const", "let"]); -} +Mp.add = function(line, column) { + return new Mapping(this.sourceLines, this.sourceLoc, { + start: addPos(this.targetLoc.start, line, column), + end: addPos(this.targetLoc.end, line, column) + }); +}; -function isVarConstLet(kind) { - return is.someof(kind, ["var", "const", "let"]); +function addPos(toPos, line, column) { + return { + line: toPos.line + line - 1, + column: (toPos.line === 1) + ? toPos.column + column + : toPos.column + }; } -function isNonFunctionBlock(node) { - return node.type === "BlockStatement" && is.noneof(node.$parent.type, ["FunctionDeclaration", "FunctionExpression"]); -} +Mp.subtract = function(line, column) { + return new Mapping(this.sourceLines, this.sourceLoc, { + start: subtractPos(this.targetLoc.start, line, column), + end: subtractPos(this.targetLoc.end, line, column) + }); +}; -function isForWithConstLet(node) { - return node.type === "ForStatement" && node.init && node.init.type === "VariableDeclaration" && isConstLet(node.init.kind); +function subtractPos(fromPos, line, column) { + return { + line: fromPos.line - line + 1, + column: (fromPos.line === line) + ? fromPos.column - column + : fromPos.column + }; } -function isForInOfWithConstLet(node) { - return isForInOf(node) && node.left.type === "VariableDeclaration" && isConstLet(node.left.kind); -} +Mp.indent = function(by, skipFirstLine, noNegativeColumns) { + if (by === 0) { + return this; + } -function isForInOf(node) { - return is.someof(node.type, ["ForInStatement", "ForOfStatement"]); -} + var targetLoc = this.targetLoc; + var startLine = targetLoc.start.line; + var endLine = targetLoc.end.line; -function isFunction(node) { - return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]); -} + if (skipFirstLine && startLine === 1 && endLine === 1) { + return this; + } -function isLoop(node) { - return is.someof(node.type, ["ForStatement", "ForInStatement", "ForOfStatement", "WhileStatement", "DoWhileStatement"]); -} + targetLoc = { + start: targetLoc.start, + end: targetLoc.end + }; -function isReference(node) { - var parent = node.$parent; - return node.$refToScope || - node.type === "Identifier" && - !(parent.type === "VariableDeclarator" && parent.id === node) && // var|let|const $ - !(parent.type === "MemberExpression" && parent.computed === false && parent.property === node) && // obj.$ - !(parent.type === "Property" && parent.key === node) && // {$: ...} - !(parent.type === "LabeledStatement" && parent.label === node) && // $: ... - !(parent.type === "CatchClause" && parent.param === node) && // catch($) - !(isFunction(parent) && parent.id === node) && // function $(.. - !(isFunction(parent) && is.someof(node, parent.params)) && // function f($).. - true; -} + if (!skipFirstLine || startLine > 1) { + var startColumn = targetLoc.start.column + by; + targetLoc.start = { + line: startLine, + column: noNegativeColumns + ? Math.max(0, startColumn) + : startColumn + }; + } -function isLvalue(node) { - return isReference(node) && - ((node.$parent.type === "AssignmentExpression" && node.$parent.left === node) || - (node.$parent.type === "UpdateExpression" && node.$parent.argument === node)); -} + if (!skipFirstLine || endLine > 1) { + var endColumn = targetLoc.end.column + by; + targetLoc.end = { + line: endLine, + column: noNegativeColumns + ? Math.max(0, endColumn) + : endColumn + }; + } -function createScopes(node, parent) { - assert(!node.$scope); + return new Mapping(this.sourceLines, this.sourceLoc, targetLoc); +}; - node.$parent = parent; - node.$scope = node.$parent ? node.$parent.$scope : null; // may be overridden +function skipChars( + sourceLines, sourceFromPos, + targetLines, targetFromPos, targetToPos +) { + assert.ok(sourceLines instanceof linesModule.Lines); + assert.ok(targetLines instanceof linesModule.Lines); + Position.assert(sourceFromPos); + Position.assert(targetFromPos); + Position.assert(targetToPos); - if (node.type === "Program") { - // Top-level program is a scope - // There's no block-scope under it - node.$scope = new Scope({ - kind: "hoist", - node: node, - parent: null, - }); + var targetComparison = comparePos(targetFromPos, targetToPos); + if (targetComparison === 0) { + // Trivial case: no characters to skip. + return sourceFromPos; + } - } else if (isFunction(node)) { - // Function is a scope, with params in it - // There's no block-scope under it + if (targetComparison < 0) { + // Skipping forward. - node.$scope = new Scope({ - kind: "hoist", - node: node, - parent: node.$parent.$scope, - }); + var sourceCursor = sourceLines.skipSpaces(sourceFromPos); + var targetCursor = targetLines.skipSpaces(targetFromPos); - // function has a name - if (node.id) { - assert(node.id.type === "Identifier"); + var lineDiff = targetToPos.line - targetCursor.line; + sourceCursor.line += lineDiff; + targetCursor.line += lineDiff; - if (node.type === "FunctionDeclaration") { - // Function name goes in parent scope for declared functions - node.$parent.$scope.add(node.id.name, "fun", node.id, null); - } else if (node.type === "FunctionExpression") { - // Function name goes in function's scope for named function expressions - node.$scope.add(node.id.name, "fun", node.id, null); - } else { - assert(false); - } + if (lineDiff > 0) { + // If jumping to later lines, reset columns to the beginnings + // of those lines. + sourceCursor.column = 0; + targetCursor.column = 0; + } else { + assert.strictEqual(lineDiff, 0); } - node.params.forEach(function(param) { - node.$scope.add(param.name, "param", param, null); - }); - - } else if (node.type === "VariableDeclaration") { - // Variable declarations names goes in current scope - assert(isVarConstLet(node.kind)); - node.declarations.forEach(function(declarator) { - assert(declarator.type === "VariableDeclarator"); - var name = declarator.id.name; - if (options.disallowVars && node.kind === "var") { - error(getline(declarator), "var {0} is not allowed (use let or const)", name); - } - node.$scope.add(name, node.kind, declarator.id, declarator.range[1]); - }); + while (comparePos(targetCursor, targetToPos) < 0 && + targetLines.nextPos(targetCursor, true)) { + assert.ok(sourceLines.nextPos(sourceCursor, true)); + assert.strictEqual( + sourceLines.charAt(sourceCursor), + targetLines.charAt(targetCursor) + ); + } - } else if (isForWithConstLet(node) || isForInOfWithConstLet(node)) { - // For(In/Of) loop with const|let declaration is a scope, with declaration in it - // There may be a block-scope under it - node.$scope = new Scope({ - kind: "block", - node: node, - parent: node.$parent.$scope, - }); + } else { + // Skipping backward. - } else if (isNonFunctionBlock(node)) { - // A block node is a scope unless parent is a function - node.$scope = new Scope({ - kind: "block", - node: node, - parent: node.$parent.$scope, - }); + var sourceCursor = sourceLines.skipSpaces(sourceFromPos, true); + var targetCursor = targetLines.skipSpaces(targetFromPos, true); - } else if (node.type === "CatchClause") { - var identifier = node.param; + var lineDiff = targetToPos.line - targetCursor.line; + sourceCursor.line += lineDiff; + targetCursor.line += lineDiff; - node.$scope = new Scope({ - kind: "catch-block", - node: node, - parent: node.$parent.$scope, - }); - node.$scope.add(identifier.name, "caught", identifier, null); + if (lineDiff < 0) { + // If jumping to earlier lines, reset columns to the ends of + // those lines. + sourceCursor.column = sourceLines.getLineLength(sourceCursor.line); + targetCursor.column = targetLines.getLineLength(targetCursor.line); + } else { + assert.strictEqual(lineDiff, 0); + } - // All hoist-scope keeps track of which variables that are propagated through, - // i.e. an reference inside the scope points to a declaration outside the scope. - // This is used to mark "taint" the name since adding a new variable in the scope, - // with a propagated name, would change the meaning of the existing references. - // - // catch(e) is special because even though e is a variable in its own scope, - // we want to make sure that catch(e){let e} is never transformed to - // catch(e){var e} (but rather var e$0). For that reason we taint the use of e - // in the closest hoist-scope, i.e. where var e$0 belongs. - node.$scope.closestHoistScope().markPropagates(identifier.name); + while (comparePos(targetToPos, targetCursor) < 0 && + targetLines.prevPos(targetCursor, true)) { + assert.ok(sourceLines.prevPos(sourceCursor, true)); + assert.strictEqual( + sourceLines.charAt(sourceCursor), + targetLines.charAt(targetCursor) + ); + } } + + return sourceCursor; } -function createTopScope(programScope, environments, globals) { - function inject(obj) { - for (var name in obj) { - var writeable = obj[name]; - var kind = (writeable ? "var" : "const"); - if (topScope.hasOwn(name)) { - topScope.remove(name); - } - topScope.add(name, kind, {loc: {start: {line: -1}}}, -1); - } - } +},{"./lines":498,"./types":504,"./util":505,"assert":2}],500:[function(require,module,exports){ +var defaults = { + // If you want to use a different branch of esprima, or any other + // module that supports a .parse function, pass that module object to + // recast.parse as options.esprima. + esprima: require("esprima-fb"), - var topScope = new Scope({ - kind: "hoist", - node: {}, - parent: null, - }); + // Number of spaces the pretty-printer should use per tab for + // indentation. If you do not pass this option explicitly, it will be + // (quite reliably!) inferred from the original code. + tabWidth: 4, - var complementary = { - undefined: false, - Infinity: false, - console: false, - }; + // If you really want the pretty-printer to use tabs instead of + // spaces, make this option true. + useTabs: false, + + // The reprinting code leaves leading whitespace untouched unless it + // has to reindent a line, or you pass false for this option. + reuseWhitespace: true, + + // Some of the pretty-printer code (such as that for printing function + // parameter lists) makes a valiant attempt to prevent really long + // lines. You can adjust the limit by changing this option; however, + // there is no guarantee that line length will fit inside this limit. + wrapColumn: 74, // Aspirational for now. + + // Pass a string as options.sourceFileName to recast.parse to tell the + // reprinter to keep track of reused code so that it can construct a + // source map automatically. + sourceFileName: null, - inject(complementary); - inject(jshint_vars.reservedVars); - inject(jshint_vars.ecmaIdentifiers); - if (environments) { - environments.forEach(function(env) { - if (!jshint_vars[env]) { - error(-1, 'environment "{0}" not found', env); - } else { - inject(jshint_vars[env]); - } - }); - } - if (globals) { - inject(globals); - } + // Pass a string as options.sourceMapName to recast.print, and + // (provided you passed options.sourceFileName earlier) the + // PrintResult of recast.print will have a .map property for the + // generated source map. + sourceMapName: null, - // link it in - programScope.parent = topScope; - topScope.children.push(programScope); + // If provided, this option will be passed along to the source map + // generator as a root directory for relative source file paths. + sourceRoot: null, - return topScope; -} + // If you provide a source map that was generated from a previous call + // to recast.print as options.inputSourceMap, the old source map will + // be composed with the new source map. + inputSourceMap: null, -function setupReferences(ast, allIdentifiers, opts) { - var analyze = (is.own(opts, "analyze") ? opts.analyze : true); + // If you want esprima to generate .range information (recast only + // uses .loc internally), pass true for this option. + range: false, - function visit(node) { - if (!isReference(node)) { - return; - } - allIdentifiers.add(node.name); + // If you want esprima not to throw exceptions when it encounters + // non-fatal errors, keep this option true. + tolerant: true, - var scope = node.$scope.lookup(node.name); - if (analyze && !scope && options.disallowUnknownReferences) { - error(getline(node), "reference to unknown global variable {0}", node.name); - } - // check const and let for referenced-before-declaration - if (analyze && scope && is.someof(scope.getKind(node.name), ["const", "let"])) { - var allowedFromPos = scope.getFromPos(node.name); - var referencedAtPos = node.range[0]; - assert(is.finitenumber(allowedFromPos)); - assert(is.finitenumber(referencedAtPos)); - if (referencedAtPos < allowedFromPos) { - if (!node.$scope.hasFunctionScopeBetween(scope)) { - error(getline(node), "{0} is referenced before its declaration", node.name); - } - } - } - node.$refToScope = scope; - } + // If you want to override the quotes used in string literals, specify + // either "single", "double", or "auto" here ("auto" will select the one + // which results in the shorter literal) + // Otherwise, the input marks will be preserved + quote: null, - traverse(ast, {pre: visit}); -} + // If you want to print trailing commas in object literals, + // array expressions, functions calls and function definitions pass true + // for this option. + trailingComma: false, +}, hasOwn = defaults.hasOwnProperty; -// TODO for loops init and body props are parallel to each other but init scope is outer that of body -// TODO is this a problem? +// Copy options and fill in default values. +exports.normalize = function(options) { + options = options || defaults; -function varify(ast, stats, allIdentifiers, changes) { - function unique(name) { - assert(allIdentifiers.has(name)); - for (var cnt = 0; ; cnt++) { - var genName = name + "$" + String(cnt); - if (!allIdentifiers.has(genName)) { - return genName; - } - } + function get(key) { + return hasOwn.call(options, key) + ? options[key] + : defaults[key]; } - function renameDeclarations(node) { - if (node.type === "VariableDeclaration" && isConstLet(node.kind)) { - var hoistScope = node.$scope.closestHoistScope(); - var origScope = node.$scope; + return { + tabWidth: +get("tabWidth"), + useTabs: !!get("useTabs"), + reuseWhitespace: !!get("reuseWhitespace"), + wrapColumn: Math.max(get("wrapColumn"), 0), + sourceFileName: get("sourceFileName"), + sourceMapName: get("sourceMapName"), + sourceRoot: get("sourceRoot"), + inputSourceMap: get("inputSourceMap"), + esprima: get("esprima"), + range: get("range"), + tolerant: get("tolerant"), + quote: get("quote"), + trailingComma: get("trailingComma"), + }; +}; - // text change const|let => var - changes.push({ - start: node.range[0], - end: node.range[0] + node.kind.length, - str: "var", - }); +},{"esprima-fb":1}],501:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var n = types.namedTypes; +var b = types.builders; +var isObject = types.builtInTypes.object; +var isArray = types.builtInTypes.array; +var isFunction = types.builtInTypes.function; +var Patcher = require("./patcher").Patcher; +var normalizeOptions = require("./options").normalize; +var fromString = require("./lines").fromString; +var attachComments = require("./comments").attach; +var util = require("./util"); - node.declarations.forEach(function(declarator) { - assert(declarator.type === "VariableDeclarator"); - var name = declarator.id.name; +exports.parse = function parse(source, options) { + options = normalizeOptions(options); - stats.declarator(node.kind); + var lines = fromString(source, options); - // rename if - // 1) name already exists in hoistScope, or - // 2) name is already propagated (passed) through hoistScope or manually tainted - var rename = (origScope !== hoistScope && - (hoistScope.hasOwn(name) || hoistScope.doesPropagate(name))); + var sourceWithoutTabs = lines.toString({ + tabWidth: options.tabWidth, + reuseWhitespace: false, + useTabs: false + }); - var newName = (rename ? unique(name) : name); + var comments = []; + var program = options.esprima.parse(sourceWithoutTabs, { + loc: true, + locations: true, + range: options.range, + comment: true, + onComment: comments, + tolerant: options.tolerant, + ecmaVersion: 6, + sourceType: 'module' + }); - origScope.remove(name); - hoistScope.add(newName, "var", declarator.id, declarator.range[1]); + // Expand the Program node's .loc to include all comments, since + // typically its .loc.start and .loc.end will coincide with those of + // the first and last statements, respectively, excluding any comments + // that fall outside that region. + program.loc = util.getTrueLoc(program); - origScope.moves = origScope.moves || stringmap(); - origScope.moves.set(name, { - name: newName, - scope: hoistScope, - }); + if (program.comments) { + comments = program.comments; + delete program.comments; + } - allIdentifiers.add(newName); + // In order to ensure we reprint leading and trailing program + // comments, wrap the original Program node with a File node. + var file = b.file(program); + file.loc = { + lines: lines, + indent: 0, + start: lines.firstPos(), + end: lines.lastPos() + }; - if (newName !== name) { - stats.rename(name, newName, getline(declarator)); + // Passing file.program here instead of just file means that initial + // comments will be attached to program.body[0] instead of program. + attachComments( + comments, + program.body.length ? file.program : file, + lines + ); - declarator.id.originalName = name; - declarator.id.name = newName; + // Return a copy of the original AST so that any changes made may be + // compared to the original. + return new TreeCopier(lines).copy(file); +}; - // textchange var x => var x$1 - changes.push({ - start: declarator.id.range[0], - end: declarator.id.range[1], - str: newName, - }); - } - }); +function TreeCopier(lines) { + assert.ok(this instanceof TreeCopier); + this.lines = lines; + this.indent = 0; +} - // ast change const|let => var - node.kind = "var"; - } +var TCp = TreeCopier.prototype; + +TCp.copy = function(node) { + if (isArray.check(node)) { + return node.map(this.copy, this); } - function renameReferences(node) { - if (!node.$refToScope) { - return; - } - var move = node.$refToScope.moves && node.$refToScope.moves.get(node.name); - if (!move) { - return; + if (!isObject.check(node)) { + return node; + } + + util.fixFaultyLocations(node); + + var copy = Object.create(Object.getPrototypeOf(node), { + original: { // Provide a link from the copy to the original. + value: node, + configurable: false, + enumerable: false, + writable: true } - node.$refToScope = move.scope; + }); - if (node.name !== move.name) { - node.originalName = node.name; - node.name = move.name; + var loc = node.loc; + var oldIndent = this.indent; + var newIndent = oldIndent; - if (node.alterop) { - // node has no range because it is the result of another alter operation - var existingOp = null; - for (var i = 0; i < changes.length; i++) { - var op = changes[i]; - if (op.node === node) { - existingOp = op; - break; - } - } - assert(existingOp); + if (loc) { + // When node is a comment, we set node.loc.indent to + // node.loc.start.column so that, when/if we print the comment by + // itself, we can strip that much whitespace from the left margin + // of the comment. This only really matters for multiline Block + // comments, but it doesn't hurt for Line comments. + if (node.type === "Block" || node.type === "Line" || + this.lines.isPrecededOnlyByWhitespace(loc.start)) { + newIndent = this.indent = loc.start.column; + } - // modify op - existingOp.str = move.name; - } else { - changes.push({ - start: node.range[0], - end: node.range[1], - str: move.name, - }); - } + loc.lines = this.lines; + loc.indent = newIndent; + } + + var keys = Object.keys(node); + var keyCount = keys.length; + for (var i = 0; i < keyCount; ++i) { + var key = keys[i]; + if (key === "loc") { + copy[key] = node[key]; + } else { + copy[key] = this.copy(node[key]); } } - traverse(ast, {pre: renameDeclarations}); - traverse(ast, {pre: renameReferences}); - ast.$scope.traverse({pre: function(scope) { - delete scope.moves; - }}); -} + this.indent = oldIndent; + return copy; +}; -function detectLoopClosures(ast) { - traverse(ast, {pre: visit}); +},{"./comments":496,"./lines":498,"./options":500,"./patcher":502,"./types":504,"./util":505,"assert":2}],502:[function(require,module,exports){ +var assert = require("assert"); +var linesModule = require("./lines"); +var types = require("./types"); +var getFieldValue = types.getFieldValue; +var Printable = types.namedTypes.Printable; +var Expression = types.namedTypes.Expression; +var SourceLocation = types.namedTypes.SourceLocation; +var util = require("./util"); +var comparePos = util.comparePos; +var FastPath = require("./fast-path"); +var isObject = types.builtInTypes.object; +var isArray = types.builtInTypes.array; +var isString = types.builtInTypes.string; +var riskyAdjoiningCharExp = /[0-9a-z_$]/i; - function detectIifyBodyBlockers(body, node) { - return breakable(function(brk) { - traverse(body, {pre: function(n) { - // if we hit an inner function of the loop body, don't traverse further - if (isFunction(n)) { - return false; - } +function Patcher(lines) { + assert.ok(this instanceof Patcher); + assert.ok(lines instanceof linesModule.Lines); - var err = true; // reset to false in else-statement below - var msg = "loop-variable {0} is captured by a loop-closure that can't be transformed due to use of {1} at line {2}"; - if (n.type === "BreakStatement") { - error(getline(node), msg, node.name, "break", getline(n)); - } else if (n.type === "ContinueStatement") { - error(getline(node), msg, node.name, "continue", getline(n)); - } else if (n.type === "ReturnStatement") { - error(getline(node), msg, node.name, "return", getline(n)); - } else if (n.type === "YieldExpression") { - error(getline(node), msg, node.name, "yield", getline(n)); - } else if (n.type === "Identifier" && n.name === "arguments") { - error(getline(node), msg, node.name, "arguments", getline(n)); - } else if (n.type === "VariableDeclaration" && n.kind === "var") { - error(getline(node), msg, node.name, "var", getline(n)); - } else { - err = false; - } - if (err) { - brk(true); // break traversal - } - }}); - return false; - }); - } + var self = this, + replacements = []; - function visit(node) { - // forbidden pattern: - // * * * * - var loopNode = null; - if (isReference(node) && node.$refToScope && isConstLet(node.$refToScope.getKind(node.name))) { - // traverse nodes up towards root from constlet-def - // if we hit a function (before a loop) - ok! - // if we hit a loop - maybe-ouch - // if we reach root - ok! - for (var n = node.$refToScope.node; ; ) { - if (isFunction(n)) { - // we're ok (function-local) - return; - } else if (isLoop(n)) { - loopNode = n; - // maybe not ok (between loop and function) - break; - } - n = n.$parent; - if (!n) { - // ok (reached root) - return; - } - } + self.replace = function(loc, lines) { + if (isString.check(lines)) + lines = linesModule.fromString(lines); - assert(isLoop(loopNode)); + replacements.push({ + lines: lines, + start: loc.start, + end: loc.end + }); + }; - // traverse scopes from reference-scope up towards definition-scope - // if we hit a function, ouch! - var defScope = node.$refToScope; - var generateIIFE = (options.loopClosures === "iife"); + self.get = function(loc) { + // If no location is provided, return the complete Lines object. + loc = loc || { + start: { line: 1, column: 0 }, + end: { line: lines.length, + column: lines.getLineLength(lines.length) } + }; - for (var s = node.$scope; s; s = s.parent) { - if (s === defScope) { - // we're ok - return; - } else if (isFunction(s.node)) { - // not ok (there's a function between the reference and definition) - // may be transformable via IIFE + var sliceFrom = loc.start, + toConcat = []; - if (!generateIIFE) { - var msg = "loop-variable {0} is captured by a loop-closure. Tried \"loopClosures\": \"iife\" in defs-config.json?"; - return error(getline(node), msg, node.name); - } + function pushSlice(from, to) { + assert.ok(comparePos(from, to) <= 0); + toConcat.push(lines.slice(from, to)); + } - // here be dragons - // for (let x = ..; .. ; ..) { (function(){x})() } is forbidden because of current - // spec and VM status - if (loopNode.type === "ForStatement" && defScope.node === loopNode) { - var declarationNode = defScope.getNode(node.name); - return error(getline(declarationNode), "Not yet specced ES6 feature. {0} is declared in for-loop header and then captured in loop closure", declarationNode.name); - } + replacements.sort(function(a, b) { + return comparePos(a.start, b.start); + }).forEach(function(rep) { + if (comparePos(sliceFrom, rep.start) > 0) { + // Ignore nested replacement ranges. + } else { + pushSlice(sliceFrom, rep.start); + toConcat.push(rep.lines); + sliceFrom = rep.end; + } + }); - // speak now or forever hold your peace - if (detectIifyBodyBlockers(loopNode.body, node)) { - // error already generated - return; - } + pushSlice(sliceFrom, loc.end); - // mark loop for IIFE-insertion - loopNode.$iify = true; - } - } - } - } + return linesModule.concat(toConcat); + }; } +exports.Patcher = Patcher; -function transformLoopClosures(root, ops, options) { - function insertOp(pos, str, node) { - var op = { - start: pos, - end: pos, - str: str, - } - if (node) { - op.node = node; - } - ops.push(op); - } +var Pp = Patcher.prototype; - traverse(root, {pre: function(node) { - if (!node.$iify) { - return; - } +Pp.tryToReprintComments = function(newNode, oldNode, print) { + var patcher = this; - var hasBlock = (node.body.type === "BlockStatement"); + if (!newNode.comments && + !oldNode.comments) { + // We were (vacuously) able to reprint all the comments! + return true; + } - var insertHead = (hasBlock ? - node.body.range[0] + 1 : // just after body { - node.body.range[0]); // just before existing expression - var insertFoot = (hasBlock ? - node.body.range[1] - 1 : // just before body } - node.body.range[1]); // just after existing expression + var newPath = FastPath.from(newNode); + var oldPath = FastPath.from(oldNode); - var forInName = (isForInOf(node) && node.left.declarations[0].id.name);; - var iifeHead = fmt("(function({0}){", forInName ? forInName : ""); - var iifeTail = fmt("}).call(this{0});", forInName ? ", " + forInName : ""); + newPath.stack.push("comments", getSurroundingComments(newNode)); + oldPath.stack.push("comments", getSurroundingComments(oldNode)); - // modify AST - var iifeFragment = options.parse(iifeHead + iifeTail); - var iifeExpressionStatement = iifeFragment.body[0]; - var iifeBlockStatement = iifeExpressionStatement.expression.callee.object.body; + var reprints = []; + var ableToReprintComments = + findArrayReprints(newPath, oldPath, reprints); - if (hasBlock) { - var forBlockStatement = node.body; - var tmp = forBlockStatement.body; - forBlockStatement.body = [iifeExpressionStatement]; - iifeBlockStatement.body = tmp; - } else { - var tmp$0 = node.body; - node.body = iifeExpressionStatement; - iifeBlockStatement.body[0] = tmp$0; - } + // No need to pop anything from newPath.stack or oldPath.stack, since + // newPath and oldPath are fresh local variables. + + if (ableToReprintComments && reprints.length > 0) { + reprints.forEach(function(reprint) { + var oldComment = reprint.oldPath.getValue(); + assert.ok(oldComment.leading || oldComment.trailing); + patcher.replace( + oldComment.loc, + // Comments can't have .comments, so it doesn't matter + // whether we print with comments or without. + print(reprint.newPath).indentTail(oldComment.loc.indent) + ); + }); + } - // create ops - insertOp(insertHead, iifeHead); + return ableToReprintComments; +}; - if (forInName) { - insertOp(insertFoot, "}).call(this, "); +// Get all comments that are either leading or trailing, ignoring any +// comments that occur inside node.loc. Returns an empty array for nodes +// with no leading or trailing comments. +function getSurroundingComments(node) { + var result = []; + if (node.comments && + node.comments.length > 0) { + node.comments.forEach(function(comment) { + if (comment.leading || comment.trailing) { + result.push(comment); + } + }); + } + return result; +} - var args = iifeExpressionStatement.expression.arguments; - var iifeArgumentIdentifier = args[1]; - iifeArgumentIdentifier.alterop = true; - insertOp(insertFoot, forInName, iifeArgumentIdentifier); +Pp.deleteComments = function(node) { + if (!node.comments) { + return; + } - insertOp(insertFoot, ");"); - } else { - insertOp(insertFoot, iifeTail); - } - }}); -} + var patcher = this; -function detectConstAssignment(ast) { - traverse(ast, {pre: function(node) { - if (isLvalue(node)) { - var scope = node.$scope.lookup(node.name); - if (scope && scope.getKind(node.name) === "const") { - error(getline(node), "can't assign to const variable {0}", node.name); - } - } - }}); -} + node.comments.forEach(function(comment) { + if (comment.leading) { + // Delete leading comments along with any trailing whitespace + // they might have. + patcher.replace({ + start: comment.loc.start, + end: node.loc.lines.skipSpaces( + comment.loc.end, false, false) + }, ""); -function detectConstantLets(ast) { - traverse(ast, {pre: function(node) { - if (isLvalue(node)) { - var scope = node.$scope.lookup(node.name); - if (scope) { - scope.markWrite(node.name); - } + } else if (comment.trailing) { + // Delete trailing comments along with any leading whitespace + // they might have. + patcher.replace({ + start: node.loc.lines.skipSpaces( + comment.loc.start, true, false), + end: comment.loc.end + }, ""); } - }}); + }); +}; - ast.$scope.detectUnmodifiedLets(); -} +exports.getReprinter = function(path) { + assert.ok(path instanceof FastPath); -function setupScopeAndReferences(root, opts) { - // setup scopes - traverse(root, {pre: createScopes}); - var topScope = createTopScope(root.$scope, options.environments, options.globals); + // Make sure that this path refers specifically to a Node, rather than + // some non-Node subproperty of a Node. + var node = path.getValue(); + if (!Printable.check(node)) + return; - // allIdentifiers contains all declared and referenced vars - // collect all declaration names (including those in topScope) - var allIdentifiers = stringset(); - topScope.traverse({pre: function(scope) { - allIdentifiers.addMany(scope.decls.keys()); - }}); + var orig = node.original; + var origLoc = orig && orig.loc; + var lines = origLoc && origLoc.lines; + var reprints = []; - // setup node.$refToScope, check for errors. - // also collects all referenced names to allIdentifiers - setupReferences(root, allIdentifiers, opts); - return allIdentifiers; -} + if (!lines || !findReprints(path, reprints)) + return; -function cleanupTree(root) { - traverse(root, {pre: function(node) { - for (var prop in node) { - if (prop[0] === "$") { - delete node[prop]; - } - } - }}); -} + return function(print) { + var patcher = new Patcher(lines); -function run(src, config) { - // alter the options singleton with user configuration - for (var key in config) { - options[key] = config[key]; - } + reprints.forEach(function(reprint) { + var newNode = reprint.newPath.getValue(); + var oldNode = reprint.oldPath.getValue(); - var parsed; + SourceLocation.assert(oldNode.loc, true); - if (is.object(src)) { - if (!options.ast) { - return { - errors: [ - "Can't produce string output when input is an AST. " + - "Did you forget to set options.ast = true?" - ], - }; - } + var needToPrintNewPathWithComments = + !patcher.tryToReprintComments(newNode, oldNode, print) - // Received an AST object as src, so no need to parse it. - parsed = src; + if (needToPrintNewPathWithComments) { + // Since we were not able to preserve all leading/trailing + // comments, we delete oldNode's comments, print newPath + // with comments, and then patch the resulting lines where + // oldNode used to be. + patcher.deleteComments(oldNode); + } - } else if (is.string(src)) { - try { - parsed = options.parse(src, { - loc: true, - range: true, - }); - } catch (e) { - return { - errors: [ - fmt("line {0} column {1}: Error during input file parsing\n{2}\n{3}", - e.lineNumber, - e.column, - src.split("\n")[e.lineNumber - 1], - fmt.repeat(" ", e.column - 1) + "^") - ], - }; - } + var pos = util.copyPos(oldNode.loc.start); + var needsLeadingSpace = lines.prevPos(pos) && + riskyAdjoiningCharExp.test(lines.charAt(pos)); - } else { - return { - errors: ["Input was neither an AST object nor a string."], - }; - } + var newLines = print( + reprint.newPath, + needToPrintNewPathWithComments + ).indentTail(oldNode.loc.indent); - var ast = parsed; + var needsTrailingSpace = + riskyAdjoiningCharExp.test(lines.charAt(oldNode.loc.end)); - // TODO detect unused variables (never read) - error.reset(); + // If we try to replace the argument of a ReturnStatement like + // return"asdf" with e.g. a literal null expression, we run + // the risk of ending up with returnnull, so we need to add an + // extra leading space in situations where that might + // happen. Likewise for "asdf"in obj. See #170. + if (needsLeadingSpace || needsTrailingSpace) { + var newParts = []; + needsLeadingSpace && newParts.push(" "); + newParts.push(newLines); + needsTrailingSpace && newParts.push(" "); + newLines = linesModule.concat(newParts); + } - var allIdentifiers = setupScopeAndReferences(ast, {}); + patcher.replace(oldNode.loc, newLines); + }); - // static analysis passes - detectLoopClosures(ast); - detectConstAssignment(ast); - //detectConstantLets(ast); + // Recall that origLoc is the .loc of an ancestor node that is + // guaranteed to contain all the reprinted nodes and comments. + return patcher.get(origLoc).indentTail(-orig.loc.indent); + }; +}; - var changes = []; - transformLoopClosures(ast, changes, options); +function findReprints(newPath, reprints) { + var newNode = newPath.getValue(); + Printable.assert(newNode); - //ast.$scope.print(); process.exit(-1); + var oldNode = newNode.original; + Printable.assert(oldNode); - if (error.errors.length >= 1) { - return { - errors: error.errors, - }; - } + assert.deepEqual(reprints, []); - if (changes.length > 0) { - cleanupTree(ast); - allIdentifiers = setupScopeAndReferences(ast, {analyze: false}); + if (newNode.type !== oldNode.type) { + return false; } - assert(error.errors.length === 0); - // change constlet declarations to var, renamed if needed - // varify modifies the scopes and AST accordingly and - // returns a list of change fragments (to use with alter) - var stats = new Stats(); - varify(ast, stats, allIdentifiers, changes); + var oldPath = new FastPath(oldNode); + var canReprint = findChildReprints(newPath, oldPath, reprints); - if (options.ast) { - // return the modified AST instead of src code - // get rid of all added $ properties first, such as $parent and $scope - cleanupTree(ast); - return { - stats: stats, - ast: ast, - }; - } else { - // apply changes produced by varify and return the transformed src - var transformedSrc = alter(src, changes); - return { - stats: stats, - src: transformedSrc, - }; + if (!canReprint) { + // Make absolutely sure the calling code does not attempt to reprint + // any nodes. + reprints.length = 0; } -} -module.exports = run; + return canReprint; +} -},{"./error":493,"./jshint_globals/vars.js":494,"./options":495,"./scope":496,"./stats":497,"alter":498,"assert":213,"ast-traverse":500,"breakable":501,"simple-fmt":502,"simple-is":503,"stringmap":504,"stringset":505}],493:[function(require,module,exports){ -"use strict"; +function findAnyReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + var oldNode = oldPath.getValue(); -var fmt = require("simple-fmt"); -var assert = require("assert"); + if (newNode === oldNode) + return true; -function error(line, var_args) { - assert(arguments.length >= 2); + if (isArray.check(newNode)) + return findArrayReprints(newPath, oldPath, reprints); - var msg = (arguments.length === 2 ? - String(var_args) : fmt.apply(fmt, Array.prototype.slice.call(arguments, 1))); + if (isObject.check(newNode)) + return findObjectReprints(newPath, oldPath, reprints); - error.errors.push(line === -1 ? msg : fmt("line {0}: {1}", line, msg)); + return false; } -error.reset = function() { - error.errors = []; -}; +function findArrayReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + var oldNode = oldPath.getValue(); + isArray.assert(newNode); + var len = newNode.length; -error.getline = function(node) { - if (node && node.loc && node.loc.start) { - return node.loc.start.line; - } - return -1; -}; + if (!(isArray.check(oldNode) && + oldNode.length === len)) + return false; -error.reset(); + for (var i = 0; i < len; ++i) { + newPath.stack.push(i, newNode[i]); + oldPath.stack.push(i, oldNode[i]); + var canReprint = findAnyReprints(newPath, oldPath, reprints); + newPath.stack.length -= 2; + oldPath.stack.length -= 2; + if (!canReprint) { + return false; + } + } -module.exports = error; + return true; +} -},{"assert":213,"simple-fmt":502}],494:[function(require,module,exports){ -// jshint -W001 +function findObjectReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + isObject.assert(newNode); -"use strict"; + if (newNode.original === null) { + // If newNode.original node was set to null, reprint the node. + return false; + } -// Identifiers provided by the ECMAScript standard. + var oldNode = oldPath.getValue(); + if (!isObject.check(oldNode)) + return false; -exports.reservedVars = { - arguments : false, - NaN : false -}; + if (Printable.check(newNode)) { + if (!Printable.check(oldNode)) { + return false; + } -exports.ecmaIdentifiers = { - Array : false, - Boolean : false, - Date : false, - decodeURI : false, - decodeURIComponent : false, - encodeURI : false, - encodeURIComponent : false, - Error : false, - "eval" : false, - EvalError : false, - Function : false, - hasOwnProperty : false, - isFinite : false, - isNaN : false, - JSON : false, - Math : false, - Map : false, - Number : false, - Object : false, - parseInt : false, - parseFloat : false, - RangeError : false, - ReferenceError : false, - RegExp : false, - Set : false, - String : false, - SyntaxError : false, - TypeError : false, - URIError : false, - WeakMap : false -}; + // Here we need to decide whether the reprinted code for newNode + // is appropriate for patching into the location of oldNode. -// Global variables commonly provided by a web browser environment. + if (newNode.type === oldNode.type) { + var childReprints = []; -exports.browser = { - ArrayBuffer : false, - ArrayBufferView : false, - Audio : false, - Blob : false, - addEventListener : false, - applicationCache : false, - atob : false, - blur : false, - btoa : false, - clearInterval : false, - clearTimeout : false, - close : false, - closed : false, - DataView : false, - DOMParser : false, - defaultStatus : false, - document : false, - Element : false, - event : false, - FileReader : false, - Float32Array : false, - Float64Array : false, - FormData : false, - focus : false, - frames : false, - getComputedStyle : false, - HTMLElement : false, - HTMLAnchorElement : false, - HTMLBaseElement : false, - HTMLBlockquoteElement: false, - HTMLBodyElement : false, - HTMLBRElement : false, - HTMLButtonElement : false, - HTMLCanvasElement : false, - HTMLDirectoryElement : false, - HTMLDivElement : false, - HTMLDListElement : false, - HTMLFieldSetElement : false, - HTMLFontElement : false, - HTMLFormElement : false, - HTMLFrameElement : false, - HTMLFrameSetElement : false, - HTMLHeadElement : false, - HTMLHeadingElement : false, - HTMLHRElement : false, - HTMLHtmlElement : false, - HTMLIFrameElement : false, - HTMLImageElement : false, - HTMLInputElement : false, - HTMLIsIndexElement : false, - HTMLLabelElement : false, - HTMLLayerElement : false, - HTMLLegendElement : false, - HTMLLIElement : false, - HTMLLinkElement : false, - HTMLMapElement : false, - HTMLMenuElement : false, - HTMLMetaElement : false, - HTMLModElement : false, - HTMLObjectElement : false, - HTMLOListElement : false, - HTMLOptGroupElement : false, - HTMLOptionElement : false, - HTMLParagraphElement : false, - HTMLParamElement : false, - HTMLPreElement : false, - HTMLQuoteElement : false, - HTMLScriptElement : false, - HTMLSelectElement : false, - HTMLStyleElement : false, - HTMLTableCaptionElement: false, - HTMLTableCellElement : false, - HTMLTableColElement : false, - HTMLTableElement : false, - HTMLTableRowElement : false, - HTMLTableSectionElement: false, - HTMLTextAreaElement : false, - HTMLTitleElement : false, - HTMLUListElement : false, - HTMLVideoElement : false, - history : false, - Int16Array : false, - Int32Array : false, - Int8Array : false, - Image : false, - length : false, - localStorage : false, - location : false, - MessageChannel : false, - MessageEvent : false, - MessagePort : false, - moveBy : false, - moveTo : false, - MutationObserver : false, - name : false, - Node : false, - NodeFilter : false, - navigator : false, - onbeforeunload : true, - onblur : true, - onerror : true, - onfocus : true, - onload : true, - onresize : true, - onunload : true, - open : false, - openDatabase : false, - opener : false, - Option : false, - parent : false, - print : false, - removeEventListener : false, - resizeBy : false, - resizeTo : false, - screen : false, - scroll : false, - scrollBy : false, - scrollTo : false, - sessionStorage : false, - setInterval : false, - setTimeout : false, - SharedWorker : false, - status : false, - top : false, - Uint16Array : false, - Uint32Array : false, - Uint8Array : false, - Uint8ClampedArray : false, - WebSocket : false, - window : false, - Worker : false, - XMLHttpRequest : false, - XMLSerializer : false, - XPathEvaluator : false, - XPathException : false, - XPathExpression : false, - XPathNamespace : false, - XPathNSResolver : false, - XPathResult : false -}; + if (findChildReprints(newPath, oldPath, childReprints)) { + reprints.push.apply(reprints, childReprints); + } else if (oldNode.loc) { + // If we have no .loc information for oldNode, then we + // won't be able to reprint it. + reprints.push({ + oldPath: oldPath.copy(), + newPath: newPath.copy() + }); + } else { + return false; + } -exports.devel = { - alert : false, - confirm: false, - console: false, - Debug : false, - opera : false, - prompt : false -}; + return true; + } -exports.worker = { - importScripts: true, - postMessage : true, - self : true -}; + if (Expression.check(newNode) && + Expression.check(oldNode) && + // If we have no .loc information for oldNode, then we won't + // be able to reprint it. + oldNode.loc) { -// Widely adopted global names that are not part of ECMAScript standard -exports.nonstandard = { - escape : false, - unescape: false -}; + // If both nodes are subtypes of Expression, then we should be + // able to fill the location occupied by the old node with + // code printed for the new node with no ill consequences. + reprints.push({ + oldPath: oldPath.copy(), + newPath: newPath.copy() + }); -// Globals provided by popular JavaScript environments. + return true; + } -exports.couch = { - "require" : false, - respond : false, - getRow : false, - emit : false, - send : false, - start : false, - sum : false, - log : false, - exports : false, - module : false, - provides : false -}; + // The nodes have different types, and at least one of the types + // is not a subtype of the Expression type, so we cannot safely + // assume the nodes are syntactically interchangeable. + return false; + } -exports.node = { - __filename : false, - __dirname : false, - Buffer : false, - DataView : false, - console : false, - exports : true, // In Node it is ok to exports = module.exports = foo(); - GLOBAL : false, - global : false, - module : false, - process : false, - require : false, - setTimeout : false, - clearTimeout : false, - setInterval : false, - clearInterval: false -}; + return findChildReprints(newPath, oldPath, reprints); +} -exports.phantom = { - phantom : true, - require : true, - WebPage : true -}; +// This object is reused in hasOpeningParen and hasClosingParen to avoid +// having to allocate a temporary object. +var reusablePos = { line: 1, column: 0 }; +var nonSpaceExp = /\S/; -exports.rhino = { - defineClass : false, - deserialize : false, - gc : false, - help : false, - importPackage: false, - "java" : false, - load : false, - loadClass : false, - print : false, - quit : false, - readFile : false, - readUrl : false, - runCommand : false, - seal : false, - serialize : false, - spawn : false, - sync : false, - toint32 : false, - version : false -}; +function hasOpeningParen(oldPath) { + var oldNode = oldPath.getValue(); + var loc = oldNode.loc; + var lines = loc && loc.lines; -exports.wsh = { - ActiveXObject : true, - Enumerator : true, - GetObject : true, - ScriptEngine : true, - ScriptEngineBuildVersion : true, - ScriptEngineMajorVersion : true, - ScriptEngineMinorVersion : true, - VBArray : true, - WSH : true, - WScript : true, - XDomainRequest : true -}; + if (lines) { + var pos = reusablePos; + pos.line = loc.start.line; + pos.column = loc.start.column; -// Globals provided by popular JavaScript libraries. + while (lines.prevPos(pos)) { + var ch = lines.charAt(pos); -exports.dojo = { - dojo : false, - dijit : false, - dojox : false, - define : false, - "require": false -}; + if (ch === "(") { + // If we found an opening parenthesis but it occurred before + // the start of the original subtree for this reprinting, then + // we must not return true for hasOpeningParen(oldPath). + return comparePos(oldPath.getRootValue().loc.start, pos) <= 0; + } -exports.jquery = { - "$" : false, - jQuery : false -}; + if (nonSpaceExp.test(ch)) { + return false; + } + } + } -exports.mootools = { - "$" : false, - "$$" : false, - Asset : false, - Browser : false, - Chain : false, - Class : false, - Color : false, - Cookie : false, - Core : false, - Document : false, - DomReady : false, - DOMEvent : false, - DOMReady : false, - Drag : false, - Element : false, - Elements : false, - Event : false, - Events : false, - Fx : false, - Group : false, - Hash : false, - HtmlTable : false, - Iframe : false, - IframeShim : false, - InputValidator: false, - instanceOf : false, - Keyboard : false, - Locale : false, - Mask : false, - MooTools : false, - Native : false, - Options : false, - OverText : false, - Request : false, - Scroller : false, - Slick : false, - Slider : false, - Sortables : false, - Spinner : false, - Swiff : false, - Tips : false, - Type : false, - typeOf : false, - URI : false, - Window : false -}; + return false; +} -exports.prototypejs = { - "$" : false, - "$$" : false, - "$A" : false, - "$F" : false, - "$H" : false, - "$R" : false, - "$break" : false, - "$continue" : false, - "$w" : false, - Abstract : false, - Ajax : false, - Class : false, - Enumerable : false, - Element : false, - Event : false, - Field : false, - Form : false, - Hash : false, - Insertion : false, - ObjectRange : false, - PeriodicalExecuter: false, - Position : false, - Prototype : false, - Selector : false, - Template : false, - Toggle : false, - Try : false, - Autocompleter : false, - Builder : false, - Control : false, - Draggable : false, - Draggables : false, - Droppables : false, - Effect : false, - Sortable : false, - SortableObserver : false, - Sound : false, - Scriptaculous : false -}; +function hasClosingParen(oldPath) { + var oldNode = oldPath.getValue(); + var loc = oldNode.loc; + var lines = loc && loc.lines; -exports.yui = { - YUI : false, - Y : false, - YUI_config: false -}; + if (lines) { + var pos = reusablePos; + pos.line = loc.end.line; + pos.column = loc.end.column; + do { + var ch = lines.charAt(pos); -},{}],495:[function(require,module,exports){ -// default configuration + if (ch === ")") { + // If we found a closing parenthesis but it occurred after the + // end of the original subtree for this reprinting, then we + // must not return true for hasClosingParen(oldPath). + return comparePos(pos, oldPath.getRootValue().loc.end) <= 0; + } -module.exports = { - disallowVars: false, - disallowDuplicated: true, - disallowUnknownReferences: true, - parse: require("esprima-fb").parse, -}; + if (nonSpaceExp.test(ch)) { + return false; + } -},{"esprima-fb":212}],496:[function(require,module,exports){ -"use strict"; + } while (lines.nextPos(pos)); + } -var assert = require("assert"); -var stringmap = require("stringmap"); -var stringset = require("stringset"); -var is = require("simple-is"); -var fmt = require("simple-fmt"); -var error = require("./error"); -var getline = error.getline; -var options = require("./options"); + return false; +} -function Scope(args) { - assert(is.someof(args.kind, ["hoist", "block", "catch-block"])); - assert(is.object(args.node)); - assert(args.parent === null || is.object(args.parent)); +function hasParens(oldPath) { + // This logic can technically be fooled if the node has parentheses + // but there are comments intervening between the parentheses and the + // node. In such cases the node will be harmlessly wrapped in an + // additional layer of parentheses. + return hasOpeningParen(oldPath) && hasClosingParen(oldPath); +} - // kind === "hoist": function scopes, program scope, injected globals - // kind === "block": ES6 block scopes - // kind === "catch-block": catch block scopes - this.kind = args.kind; +function findChildReprints(newPath, oldPath, reprints) { + var newNode = newPath.getValue(); + var oldNode = oldPath.getValue(); - // the AST node the block corresponds to - this.node = args.node; + isObject.assert(newNode); + isObject.assert(oldNode); - // parent scope - this.parent = args.parent; + if (newNode.original === null) { + // If newNode.original node was set to null, reprint the node. + return false; + } - // children scopes for easier traversal (populated internally) - this.children = []; + // If this type of node cannot come lexically first in its enclosing + // statement (e.g. a function expression or object literal), and it + // seems to be doing so, then the only way we can ignore this problem + // and save ourselves from falling back to the pretty printer is if an + // opening parenthesis happens to precede the node. For example, + // (function(){ ... }()); does not need to be reprinted, even though + // the FunctionExpression comes lexically first in the enclosing + // ExpressionStatement and fails the hasParens test, because the + // parent CallExpression passes the hasParens test. If we relied on + // the path.needsParens() && !hasParens(oldNode) check below, the + // absence of a closing parenthesis after the FunctionExpression would + // trigger pretty-printing unnecessarily. + if (!newPath.canBeFirstInStatement() && + newPath.firstInStatement() && + !hasOpeningParen(oldPath)) + return false; - // scope declarations. decls[variable_name] = { - // kind: "fun" for functions, - // "param" for function parameters, - // "caught" for catch parameter - // "var", - // "const", - // "let" - // node: the AST node the declaration corresponds to - // from: source code index from which it is visible at earliest - // (only stored for "const", "let" [and "var"] nodes) - // } - this.decls = stringmap(); + // If this node needs parentheses and will not be wrapped with + // parentheses when reprinted, then return false to skip reprinting + // and let it be printed generically. + if (newPath.needsParens(true) && !hasParens(oldPath)) { + return false; + } - // names of all declarations within this scope that was ever written - // TODO move to decls.w? - // TODO create corresponding read? - this.written = stringset(); + for (var k in util.getUnionOfKeys(newNode, oldNode)) { + if (k === "loc") + continue; - // names of all variables declared outside this hoist scope but - // referenced in this scope (immediately or in child). - // only stored on hoist scopes for efficiency - // (because we currently generate lots of empty block scopes) - this.propagates = (this.kind === "hoist" ? stringset() : null); + newPath.stack.push(k, types.getFieldValue(newNode, k)); + oldPath.stack.push(k, types.getFieldValue(oldNode, k)); + var canReprint = findAnyReprints(newPath, oldPath, reprints); + newPath.stack.length -= 2; + oldPath.stack.length -= 2; - // scopes register themselves with their parents for easier traversal - if (this.parent) { - this.parent.children.push(this); + if (!canReprint) { + return false; + } } + + return true; } -Scope.prototype.print = function(indent) { - indent = indent || 0; - var scope = this; - var names = this.decls.keys().map(function(name) { - return fmt("{0} [{1}]", name, scope.decls.get(name).kind); - }).join(", "); - var propagates = this.propagates ? this.propagates.items().join(", ") : ""; - console.log(fmt("{0}{1}: {2}. propagates: {3}", fmt.repeat(" ", indent), this.node.type, names, propagates)); - this.children.forEach(function(c) { - c.print(indent + 2); - }); +},{"./fast-path":497,"./lines":498,"./types":504,"./util":505,"assert":2}],503:[function(require,module,exports){ +var assert = require("assert"); +var sourceMap = require("source-map"); +var printComments = require("./comments").printComments; +var linesModule = require("./lines"); +var fromString = linesModule.fromString; +var concat = linesModule.concat; +var normalizeOptions = require("./options").normalize; +var getReprinter = require("./patcher").getReprinter; +var types = require("./types"); +var namedTypes = types.namedTypes; +var isString = types.builtInTypes.string; +var isObject = types.builtInTypes.object; +var FastPath = require("./fast-path"); +var util = require("./util"); + +function PrintResult(code, sourceMap) { + assert.ok(this instanceof PrintResult); + + isString.assert(code); + this.code = code; + + if (sourceMap) { + isObject.assert(sourceMap); + this.map = sourceMap; + } +} + +var PRp = PrintResult.prototype; +var warnedAboutToString = false; + +PRp.toString = function() { + if (!warnedAboutToString) { + console.warn( + "Deprecation warning: recast.print now returns an object with " + + "a .code property. You appear to be treating the object as a " + + "string, which might still work but is strongly discouraged." + ); + + warnedAboutToString = true; + } + + return this.code; }; -Scope.prototype.add = function(name, kind, node, referableFromPos) { - assert(is.someof(kind, ["fun", "param", "var", "caught", "const", "let"])); +var emptyPrintResult = new PrintResult(""); - function isConstLet(kind) { - return is.someof(kind, ["const", "let"]); +function Printer(originalOptions) { + assert.ok(this instanceof Printer); + + var explicitTabWidth = originalOptions && originalOptions.tabWidth; + var options = normalizeOptions(originalOptions); + assert.notStrictEqual(options, originalOptions); + + // It's common for client code to pass the same options into both + // recast.parse and recast.print, but the Printer doesn't need (and + // can be confused by) options.sourceFileName, so we null it out. + options.sourceFileName = null; + + function printWithComments(path) { + assert.ok(path instanceof FastPath); + return printComments(path, print); } - var scope = this; + function print(path, includeComments) { + if (includeComments) + return printWithComments(path); - // search nearest hoist-scope for fun, param and var's - // const, let and caught variables go directly in the scope (which may be hoist, block or catch-block) - if (is.someof(kind, ["fun", "param", "var"])) { - while (scope.kind !== "hoist") { - if (scope.decls.has(name) && isConstLet(scope.decls.get(name).kind)) { // could be caught - return error(getline(node), "{0} is already declared", name); + assert.ok(path instanceof FastPath); + + if (!explicitTabWidth) { + var oldTabWidth = options.tabWidth; + var loc = path.getNode().loc; + if (loc && loc.lines && loc.lines.guessTabWidth) { + options.tabWidth = loc.lines.guessTabWidth(); + var lines = maybeReprint(path); + options.tabWidth = oldTabWidth; + return lines; } - scope = scope.parent; } + + return maybeReprint(path); } - // name exists in scope and either new or existing kind is const|let => error - if (scope.decls.has(name) && (options.disallowDuplicated || isConstLet(scope.decls.get(name).kind) || isConstLet(kind))) { - return error(getline(node), "{0} is already declared", name); + + function maybeReprint(path) { + var reprinter = getReprinter(path); + if (reprinter) + return maybeAddParens(path, reprinter(print)); + return printRootGenerically(path); } - var declaration = { - kind: kind, - node: node, - }; - if (referableFromPos) { - assert(is.someof(kind, ["var", "const", "let"])); - declaration.from = referableFromPos; + // Print the root node generically, but then resume reprinting its + // children non-generically. + function printRootGenerically(path) { + return genericPrint(path, options, printWithComments); } - scope.decls.set(name, declaration); -}; -Scope.prototype.getKind = function(name) { - assert(is.string(name)); - var decl = this.decls.get(name); - return decl ? decl.kind : null; -}; + // Print the entire AST generically. + function printGenerically(path) { + return genericPrint(path, options, printGenerically); + } + + this.print = function(ast) { + if (!ast) { + return emptyPrintResult; + } + + var lines = print(FastPath.from(ast), true); + + return new PrintResult( + lines.toString(options), + util.composeSourceMaps( + options.inputSourceMap, + lines.getSourceMap( + options.sourceMapName, + options.sourceRoot + ) + ) + ); + }; + + this.printGenerically = function(ast) { + if (!ast) { + return emptyPrintResult; + } -Scope.prototype.getNode = function(name) { - assert(is.string(name)); - var decl = this.decls.get(name); - return decl ? decl.node : null; -}; + var path = FastPath.from(ast); + var oldReuseWhitespace = options.reuseWhitespace; -Scope.prototype.getFromPos = function(name) { - assert(is.string(name)); - var decl = this.decls.get(name); - return decl ? decl.from : null; -}; + // Do not reuse whitespace (or anything else, for that matter) + // when printing generically. + options.reuseWhitespace = false; -Scope.prototype.hasOwn = function(name) { - return this.decls.has(name); -}; + // TODO Allow printing of comments? + var pr = new PrintResult(printGenerically(path).toString(options)); + options.reuseWhitespace = oldReuseWhitespace; + return pr; + }; +} -Scope.prototype.remove = function(name) { - return this.decls.remove(name); -}; +exports.Printer = Printer; -Scope.prototype.doesPropagate = function(name) { - return this.propagates.has(name); -}; +function maybeAddParens(path, lines) { + return path.needsParens() ? concat(["(", lines, ")"]) : lines; +} -Scope.prototype.markPropagates = function(name) { - this.propagates.add(name); -}; +function genericPrint(path, options, printPath) { + assert.ok(path instanceof FastPath); + return maybeAddParens(path, genericPrintNoParens(path, options, printPath)); +} -Scope.prototype.closestHoistScope = function() { - var scope = this; - while (scope.kind !== "hoist") { - scope = scope.parent; - } - return scope; -}; +function genericPrintNoParens(path, options, print) { + var n = path.getValue(); -Scope.prototype.hasFunctionScopeBetween = function(outer) { - function isFunction(node) { - return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]); + if (!n) { + return fromString(""); } - for (var scope = this; scope; scope = scope.parent) { - if (scope === outer) { - return false; - } - if (isFunction(scope.node)) { - return true; - } + if (typeof n === "string") { + return fromString(n, options); } - throw new Error("wasn't inner scope of outer"); -}; + namedTypes.Printable.assert(n); -Scope.prototype.lookup = function(name) { - for (var scope = this; scope; scope = scope.parent) { - if (scope.decls.has(name)) { - return scope; - } else if (scope.kind === "hoist") { - scope.propagates.add(name); - } - } - return null; -}; + switch (n.type) { + case "File": + return path.call(print, "program"); -Scope.prototype.markWrite = function(name) { - assert(is.string(name)); - this.written.add(name); -}; + case "Program": + return path.call(function(bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body"); -// detects let variables that are never modified (ignores top-level) -Scope.prototype.detectUnmodifiedLets = function() { - var outmost = this; + case "Noop": // Babel extension. + case "EmptyStatement": + return fromString(""); - function detect(scope) { - if (scope !== outmost) { - scope.decls.keys().forEach(function(name) { - if (scope.getKind(name) === "let" && !scope.written.has(name)) { - return error(getline(scope.getNode(name)), "{0} is declared as let but never modified so could be const", name); - } - }); - } + case "ExpressionStatement": + return concat([path.call(print, "expression"), ";"]); - scope.children.forEach(function(childScope) { - detect(childScope); - }); - } - detect(this); -}; + case "ParenthesizedExpression": // Babel extension. + return concat(["(", path.call(print, "expression"), ")"]); -Scope.prototype.traverse = function(options) { - options = options || {}; - var pre = options.pre; - var post = options.post; + case "BinaryExpression": + case "LogicalExpression": + case "AssignmentExpression": + return fromString(" ").join([ + path.call(print, "left"), + n.operator, + path.call(print, "right") + ]); - function visit(scope) { - if (pre) { - pre(scope); - } - scope.children.forEach(function(childScope) { - visit(childScope); - }); - if (post) { - post(scope); + case "AssignmentPattern": + return concat([ + path.call(print, "left"), + "=", + path.call(print, "right") + ]); + + case "MemberExpression": + var parts = [path.call(print, "object")]; + + var property = path.call(print, "property"); + if (n.computed) { + parts.push("[", property, "]"); + } else { + parts.push(".", property); } - } - visit(this); -}; + return concat(parts); -module.exports = Scope; + case "MetaProperty": + return concat([ + path.call(print, "meta"), + ".", + path.call(print, "property") + ]); -},{"./error":493,"./options":495,"assert":213,"simple-fmt":502,"simple-is":503,"stringmap":504,"stringset":505}],497:[function(require,module,exports){ -var fmt = require("simple-fmt"); -var is = require("simple-is"); -var assert = require("assert"); + case "BindExpression": + var parts = []; -function Stats() { - this.lets = 0; - this.consts = 0; - this.renames = []; -} + if (n.object) { + parts.push(path.call(print, "object")); + } -Stats.prototype.declarator = function(kind) { - assert(is.someof(kind, ["const", "let"])); - if (kind === "const") { - this.consts++; - } else { - this.lets++; - } -}; + parts.push("::", path.call(print, "callee")); -Stats.prototype.rename = function(oldName, newName, line) { - this.renames.push({ - oldName: oldName, - newName: newName, - line: line, - }); -}; + return concat(parts); -Stats.prototype.toString = function() { -// console.log("defs.js stats for file {0}:", filename) + case "Path": + return fromString(".").join(n.body); - var renames = this.renames.map(function(r) { - return r; - }).sort(function(a, b) { - return a.line - b.line; - }); // sort a copy of renames + case "Identifier": + return concat([ + fromString(n.name, options), + path.call(print, "typeAnnotation") + ]); - var renameStr = renames.map(function(rename) { - return fmt("\nline {0}: {1} => {2}", rename.line, rename.oldName, rename.newName); - }).join(""); + case "SpreadElement": + case "SpreadElementPattern": + case "SpreadProperty": + case "SpreadPropertyPattern": + case "RestElement": + return concat(["...", path.call(print, "argument")]); - var sum = this.consts + this.lets; - var constlets = (sum === 0 ? - "can't calculate const coverage (0 consts, 0 lets)" : - fmt("{0}% const coverage ({1} consts, {2} lets)", - Math.floor(100 * this.consts / sum), this.consts, this.lets)); + case "FunctionDeclaration": + case "FunctionExpression": + var parts = []; - return constlets + renameStr + "\n"; -}; + if (n.async) + parts.push("async "); -module.exports = Stats; + parts.push("function"); -},{"assert":213,"simple-fmt":502,"simple-is":503}],498:[function(require,module,exports){ -// alter.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013 Olov Lassus + if (n.generator) + parts.push("*"); -var assert = require("assert"); -var stableSort = require("stable"); + if (n.id) { + parts.push( + " ", + path.call(print, "id"), + path.call(print, "typeParameters") + ); + } -// fragments is a list of {start: index, end: index, str: string to replace with} -function alter(str, fragments) { - "use strict"; + parts.push( + "(", + printFunctionParams(path, options, print), + ")", + path.call(print, "returnType"), + " ", + path.call(print, "body") + ); - var isArray = Array.isArray || function(v) { - return Object.prototype.toString.call(v) === "[object Array]"; - };; + return concat(parts); - assert(typeof str === "string"); - assert(isArray(fragments)); + case "ArrowFunctionExpression": + var parts = []; - // stableSort isn't in-place so no need to copy array first - var sortedFragments = stableSort(fragments, function(a, b) { - return a.start - b.start; - }); + if (n.async) + parts.push("async "); - var outs = []; + if (n.params.length === 1 && !n.rest) { + parts.push(path.call(print, "params", 0)); + } else { + parts.push( + "(", + printFunctionParams(path, options, print), + ")" + ); + } - var pos = 0; - for (var i = 0; i < sortedFragments.length; i++) { - var frag = sortedFragments[i]; + parts.push(" => ", path.call(print, "body")); - assert(pos <= frag.start); - assert(frag.start <= frag.end); - outs.push(str.slice(pos, frag.start)); - outs.push(frag.str); - pos = frag.end; - } - if (pos < str.length) { - outs.push(str.slice(pos)); - } + return concat(parts); - return outs.join(""); -} + case "MethodDefinition": + var parts = []; -if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = alter; -} + if (n.static) { + parts.push("static "); + } -},{"assert":213,"stable":499}],499:[function(require,module,exports){ -//! stable.js 0.1.5, https://github.com/Two-Screen/stable -//! © 2014 Angry Bytes and contributors. MIT licensed. + parts.push(printMethod(path, options, print)); -(function() { + return concat(parts); -// A stable array sort, because `Array#sort()` is not guaranteed stable. -// This is an implementation of merge sort, without recursion. + case "YieldExpression": + var parts = ["yield"]; -var stable = function(arr, comp) { - return exec(arr.slice(), comp); -}; + if (n.delegate) + parts.push("*"); -stable.inplace = function(arr, comp) { - var result = exec(arr, comp); + if (n.argument) + parts.push(" ", path.call(print, "argument")); - // This simply copies back if the result isn't in the original array, - // which happens on an odd number of passes. - if (result !== arr) { - pass(result, null, arr.length, arr); - } + return concat(parts); - return arr; -}; + case "AwaitExpression": + var parts = ["await"]; -// Execute the sort using the input array and a second buffer as work space. -// Returns one of those two, containing the final result. -function exec(arr, comp) { - if (typeof(comp) !== 'function') { - comp = function(a, b) { - return String(a).localeCompare(b); - }; - } + if (n.all) + parts.push("*"); - // Short-circuit when there's nothing to sort. - var len = arr.length; - if (len <= 1) { - return arr; - } + if (n.argument) + parts.push(" ", path.call(print, "argument")); - // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. - // Chunks are the size of the left or right hand in merge sort. - // Stop when the left-hand covers all of the array. - var buffer = new Array(len); - for (var chk = 1; chk < len; chk *= 2) { - pass(arr, comp, chk, buffer); + return concat(parts); - var tmp = arr; - arr = buffer; - buffer = tmp; - } + case "ModuleDeclaration": + var parts = ["module", path.call(print, "id")]; - return arr; -} + if (n.source) { + assert.ok(!n.body); + parts.push("from", path.call(print, "source")); + } else { + parts.push(path.call(print, "body")); + } -// Run a single pass with the given chunk size. -var pass = function(arr, comp, chk, result) { - var len = arr.length; - var i = 0; - // Step size / double chunk size. - var dbl = chk * 2; - // Bounds of the left and right chunks. - var l, r, e; - // Iterators over the left and right chunk. - var li, ri; + return fromString(" ").join(parts); - // Iterate over pairs of chunks. - for (l = 0; l < len; l += dbl) { - r = l + chk; - e = r + chk; - if (r > len) r = len; - if (e > len) e = len; + case "ImportSpecifier": + var parts = []; - // Iterate both chunks in parallel. - li = l; - ri = r; - while (true) { - // Compare the chunks. - if (li < r && ri < e) { - // This works for a regular `sort()` compatible comparator, - // but also for a simple comparator like: `a > b` - if (comp(arr[li], arr[ri]) <= 0) { - result[i++] = arr[li++]; - } - else { - result[i++] = arr[ri++]; - } - } - // Nothing to compare, just flush what's left. - else if (li < r) { - result[i++] = arr[li++]; - } - else if (ri < e) { - result[i++] = arr[ri++]; + if (n.imported) { + parts.push(path.call(print, "imported")); + if (n.local && + n.local.name !== n.imported.name) { + parts.push(" as ", path.call(print, "local")); } - // Both iterators are at the chunk ends. - else { - break; + } else if (n.id) { + parts.push(path.call(print, "id")); + if (n.name) { + parts.push(" as ", path.call(print, "name")); } } - } -}; - -// Export using CommonJS or to the window. -if (typeof(module) !== 'undefined') { - module.exports = stable; -} -else { - window.stable = stable; -} - -})(); -},{}],500:[function(require,module,exports){ -function traverse(root, options) { - "use strict"; + return concat(parts); - options = options || {}; - var pre = options.pre; - var post = options.post; - var skipProperty = options.skipProperty; + case "ExportSpecifier": + var parts = []; - function visit(node, parent, prop, idx) { - if (!node || typeof node.type !== "string") { - return; + if (n.local) { + parts.push(path.call(print, "local")); + if (n.exported && + n.exported.name !== n.local.name) { + parts.push(" as ", path.call(print, "exported")); + } + } else if (n.id) { + parts.push(path.call(print, "id")); + if (n.name) { + parts.push(" as ", path.call(print, "name")); + } } - var res = undefined; - if (pre) { - res = pre(node, parent, prop, idx); - } + return concat(parts); - if (res !== false) { - for (var prop in node) { - if (skipProperty ? skipProperty(prop, node) : prop[0] === "$") { - continue; - } + case "ExportBatchSpecifier": + return fromString("*"); - var child = node[prop]; + case "ImportNamespaceSpecifier": + return concat(["* as ", path.call(print, "id")]); - if (Array.isArray(child)) { - for (var i = 0; i < child.length; i++) { - visit(child[i], node, prop, i); - } - } else { - visit(child, node, prop); - } - } - } + case "ImportDefaultSpecifier": + return path.call(print, "id"); - if (post) { - post(node, parent, prop, idx); - } - } + case "ExportDeclaration": + var parts = ["export"]; - visit(root, null); -}; + if (n["default"]) { + parts.push(" default"); -if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = traverse; -} + } else if (n.specifiers && + n.specifiers.length > 0) { -},{}],501:[function(require,module,exports){ -// breakable.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013-2014 Olov Lassus + if (n.specifiers.length === 1 && + n.specifiers[0].type === "ExportBatchSpecifier") { + parts.push(" *"); + } else { + parts.push( + " { ", + fromString(", ").join(path.map(print, "specifiers")), + " }" + ); + } -var breakable = (function() { - "use strict"; + if (n.source) + parts.push(" from ", path.call(print, "source")); - function Val(val, brk) { - this.val = val; - this.brk = brk; - } + parts.push(";"); - function make_brk() { - return function brk(val) { - throw new Val(val, brk); - }; - } + return concat(parts); + } - function breakable(fn) { - var brk = make_brk(); - try { - return fn(brk); - } catch (e) { - if (e instanceof Val && e.brk === brk) { - return e.val; + if (n.declaration) { + var decLines = path.call(print, "declaration"); + parts.push(" ", decLines); + if (lastNonSpaceCharacter(decLines) !== ";") { + parts.push(";"); } - throw e; } - } - return breakable; -})(); + return concat(parts); -if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = breakable; -} + case "ExportDefaultDeclaration": + return concat([ + "export default ", + path.call(print, "declaration") + ]); -},{}],502:[function(require,module,exports){ -// simple-fmt.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013 Olov Lassus + case "ExportNamedDeclaration": + var parts = ["export "]; -var fmt = (function() { - "use strict"; + if (n.declaration) { + parts.push(path.call(print, "declaration")); + } - function fmt(str, var_args) { - var args = Array.prototype.slice.call(arguments, 1); - return str.replace(/\{(\d+)\}/g, function(s, match) { - return (match in args ? args[match] : s); - }); - } + if (n.specifiers && + n.specifiers.length > 0) { + parts.push( + n.declaration ? ", {" : "{", + fromString(", ").join(path.map(print, "specifiers")), + "}" + ); + } - function obj(str, obj) { - return str.replace(/\{([_$a-zA-Z0-9][_$a-zA-Z0-9]*)\}/g, function(s, match) { - return (match in obj ? obj[match] : s); - }); - } + if (n.source) { + parts.push(" from ", path.call(print, "source")); + } - function repeat(str, n) { - return (new Array(n + 1)).join(str); - } + return concat(parts); - fmt.fmt = fmt; - fmt.obj = obj; - fmt.repeat = repeat; - return fmt; -})(); + case "ExportAllDeclaration": + var parts = ["export *"]; -if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = fmt; -} + if (n.exported) { + parts.push(" as ", path.call(print, "exported")); + } -},{}],503:[function(require,module,exports){ -// simple-is.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013 Olov Lassus + return concat([ + " from ", + path.call(print, "source") + ]); -var is = (function() { - "use strict"; + case "ExportNamespaceSpecifier": + return concat(["* as ", path.call(print, "exported")]); - var hasOwnProperty = Object.prototype.hasOwnProperty; - var toString = Object.prototype.toString; - var _undefined = void 0; + case "ExportDefaultSpecifier": + return path.call(print, "exported"); - return { - nan: function(v) { - return v !== v; - }, - boolean: function(v) { - return typeof v === "boolean"; - }, - number: function(v) { - return typeof v === "number"; - }, - string: function(v) { - return typeof v === "string"; - }, - fn: function(v) { - return typeof v === "function"; - }, - object: function(v) { - return v !== null && typeof v === "object"; - }, - primitive: function(v) { - var t = typeof v; - return v === null || v === _undefined || - t === "boolean" || t === "number" || t === "string"; - }, - array: Array.isArray || function(v) { - return toString.call(v) === "[object Array]"; - }, - finitenumber: function(v) { - return typeof v === "number" && isFinite(v); - }, - someof: function(v, values) { - return values.indexOf(v) >= 0; - }, - noneof: function(v, values) { - return values.indexOf(v) === -1; - }, - own: function(obj, prop) { - return hasOwnProperty.call(obj, prop); - }, - }; -})(); + case "ImportDeclaration": + var parts = ["import "]; -if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = is; -} + if (n.specifiers && + n.specifiers.length > 0) { -},{}],504:[function(require,module,exports){ -// stringmap.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013 Olov Lassus + var foundImportSpecifier = false; -var StringMap = (function() { - "use strict"; + path.each(function(specifierPath) { + var i = specifierPath.getName(); + if (i > 0) { + parts.push(", "); + } - // to save us a few characters - var hasOwnProperty = Object.prototype.hasOwnProperty; + var value = specifierPath.getValue(); - var create = (function() { - function hasOwnEnumerableProps(obj) { - for (var prop in obj) { - if (hasOwnProperty.call(obj, prop)) { - return true; + if (namedTypes.ImportDefaultSpecifier.check(value) || + namedTypes.ImportNamespaceSpecifier.check(value)) { + assert.strictEqual(foundImportSpecifier, false); + } else { + namedTypes.ImportSpecifier.assert(value); + if (!foundImportSpecifier) { + foundImportSpecifier = true; + parts.push("{"); + } } - } - return false; - } - // FF <= 3.6: - // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true - // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false - function hasOwnPollutedProps(obj) { - return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__"); - } - var useObjectCreate = false; - if (typeof Object.create === "function") { - if (!hasOwnEnumerableProps(Object.create(null))) { - useObjectCreate = true; - } - } - if (useObjectCreate === false) { - if (hasOwnEnumerableProps({})) { - throw new Error("StringMap environment error 0, please file a bug at https://github.com/olov/stringmap/issues"); - } - } - // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims) + parts.push(print(specifierPath)); + }, "specifiers"); - var o = (useObjectCreate ? Object.create(null) : {}); - var useProtoClear = false; - if (hasOwnPollutedProps(o)) { - o.__proto__ = null; - if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) { - throw new Error("StringMap environment error 1, please file a bug at https://github.com/olov/stringmap/issues"); + if (foundImportSpecifier) { + parts.push("}"); } - useProtoClear = true; + + parts.push(" from "); } - // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims) - return function() { - var o = (useObjectCreate ? Object.create(null) : {}); - if (useProtoClear) { - o.__proto__ = null; - } - return o; - }; - })(); + parts.push(path.call(print, "source"), ";"); - // stringmap ctor - function stringmap(optional_object) { - // use with or without new - if (!(this instanceof stringmap)) { - return new stringmap(optional_object); - } - this.obj = create(); - this.hasProto = false; // false (no __proto__ key) or true (has __proto__ key) - this.proto = undefined; // value for __proto__ key when hasProto is true, undefined otherwise + return concat(parts); - if (optional_object) { - this.setMany(optional_object); - } - }; + case "BlockStatement": + var naked = path.call(function(bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body"); - // primitive methods that deals with data representation - stringmap.prototype.has = function(key) { - // The type-check of key in has, get, set and delete is important because otherwise an object - // {toString: function() { return "__proto__"; }} can avoid the key === "__proto__" test. - // The alternative to type-checking would be to force string conversion, i.e. key = String(key); - if (typeof key !== "string") { - throw new Error("StringMap expected string key"); + if (naked.isEmpty()) { + return fromString("{}"); } - return (key === "__proto__" ? - this.hasProto : - hasOwnProperty.call(this.obj, key)); - }; - stringmap.prototype.get = function(key) { - if (typeof key !== "string") { - throw new Error("StringMap expected string key"); - } - return (key === "__proto__" ? - this.proto : - (hasOwnProperty.call(this.obj, key) ? this.obj[key] : undefined)); - }; + return concat([ + "{\n", + naked.indent(options.tabWidth), + "\n}" + ]); - stringmap.prototype.set = function(key, value) { - if (typeof key !== "string") { - throw new Error("StringMap expected string key"); - } - if (key === "__proto__") { - this.hasProto = true; - this.proto = value; - } else { - this.obj[key] = value; - } - }; + case "ReturnStatement": + var parts = ["return"]; - stringmap.prototype.remove = function(key) { - if (typeof key !== "string") { - throw new Error("StringMap expected string key"); - } - var didExist = this.has(key); - if (key === "__proto__") { - this.hasProto = false; - this.proto = undefined; - } else { - delete this.obj[key]; + if (n.argument) { + var argLines = path.call(print, "argument"); + if (argLines.length > 1 && + (namedTypes.XJSElement && + namedTypes.XJSElement.check(n.argument) || + namedTypes.JSXElement && + namedTypes.JSXElement.check(n.argument))) { + parts.push( + " (\n", + argLines.indent(options.tabWidth), + "\n)" + ); + } else { + parts.push(" ", argLines); + } } - return didExist; - }; - // alias remove to delete but beware: - // sm.delete("key"); // OK in ES5 and later - // sm['delete']("key"); // OK in all ES versions - // sm.remove("key"); // OK in all ES versions - stringmap.prototype['delete'] = stringmap.prototype.remove; + parts.push(";"); - stringmap.prototype.isEmpty = function() { - for (var key in this.obj) { - if (hasOwnProperty.call(this.obj, key)) { - return false; - } + return concat(parts); + + case "CallExpression": + return concat([ + path.call(print, "callee"), + printArgumentsList(path, options, print) + ]); + + case "ObjectExpression": + case "ObjectPattern": + case "ObjectTypeAnnotation": + var allowBreak = false; + var isTypeAnnotation = n.type === "ObjectTypeAnnotation"; + var separator = isTypeAnnotation ? ';' : ','; + var fields = []; + + if (isTypeAnnotation) { + fields.push("indexers", "callProperties"); } - return !this.hasProto; - }; - stringmap.prototype.size = function() { + fields.push("properties"); + var len = 0; - for (var key in this.obj) { - if (hasOwnProperty.call(this.obj, key)) { - ++len; - } - } - return (this.hasProto ? len + 1 : len); - }; + fields.forEach(function(field) { + len += n[field].length; + }); - stringmap.prototype.keys = function() { - var keys = []; - for (var key in this.obj) { - if (hasOwnProperty.call(this.obj, key)) { - keys.push(key); - } - } - if (this.hasProto) { - keys.push("__proto__"); - } - return keys; - }; + var oneLine = (isTypeAnnotation && len === 1) || len === 0; + var parts = [oneLine ? "{" : "{\n"]; - stringmap.prototype.values = function() { - var values = []; - for (var key in this.obj) { - if (hasOwnProperty.call(this.obj, key)) { - values.push(this.obj[key]); - } - } - if (this.hasProto) { - values.push(this.proto); - } - return values; - }; + fields.forEach(function(field) { + path.map(function(childPath) { + var i = childPath.getName(); + var lines = print(childPath); - stringmap.prototype.items = function() { - var items = []; - for (var key in this.obj) { - if (hasOwnProperty.call(this.obj, key)) { - items.push([key, this.obj[key]]); - } - } - if (this.hasProto) { - items.push(["__proto__", this.proto]); - } - return items; - }; + if (!oneLine) { + lines = lines.indent(options.tabWidth); + } + var multiLine = !isTypeAnnotation && lines.length > 1; + if (multiLine && allowBreak) { + // Similar to the logic for BlockStatement. + parts.push("\n"); + } - // methods that rely on the above primitives - stringmap.prototype.setMany = function(object) { - if (object === null || (typeof object !== "object" && typeof object !== "function")) { - throw new Error("StringMap expected Object"); - } - for (var key in object) { - if (hasOwnProperty.call(object, key)) { - this.set(key, object[key]); - } + parts.push(lines); + + if (i < len - 1) { + // Add an extra line break if the previous object property + // had a multi-line value. + parts.push(separator + (multiLine ? "\n\n" : "\n")); + allowBreak = !multiLine; + } else if (len !== 1 && isTypeAnnotation) { + parts.push(separator); + } else if (options.trailingComma) { + parts.push(separator); + } + }, field); + }); + + parts.push(oneLine ? "}" : "\n}"); + + return concat(parts); + + case "PropertyPattern": + return concat([ + path.call(print, "key"), + ": ", + path.call(print, "pattern") + ]); + + case "Property": // Non-standard AST node type. + if (n.method || n.kind === "get" || n.kind === "set") { + return printMethod(path, options, print); } - return this; - }; - stringmap.prototype.merge = function(other) { - var keys = other.keys(); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - this.set(key, other.get(key)); + var parts = []; + + if (n.decorators) { + path.each(function(decoratorPath) { + parts.push(print(decoratorPath), "\n"); + }, "decorators"); } - return this; - }; - stringmap.prototype.map = function(fn) { - var keys = this.keys(); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - keys[i] = fn(this.get(key), key); // re-use keys array for results + var key = path.call(print, "key"); + if (n.computed) { + parts.push("[", key, "]"); + } else { + parts.push(key); } - return keys; - }; - stringmap.prototype.forEach = function(fn) { - var keys = this.keys(); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - fn(this.get(key), key); + if (! n.shorthand) { + parts.push(": ", path.call(print, "value")); } - }; - stringmap.prototype.clone = function() { - var other = stringmap(); - return other.merge(this); - }; + return concat(parts); - stringmap.prototype.toString = function() { - var self = this; - return "{" + this.keys().map(function(key) { - return JSON.stringify(key) + ":" + JSON.stringify(self.get(key)); - }).join(",") + "}"; - }; + case "Decorator": + return concat(["@", path.call(print, "expression")]); - return stringmap; -})(); + case "ArrayExpression": + case "ArrayPattern": + var elems = n.elements, + len = elems.length; -if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = StringMap; -} + var printed = path.map(print, "elements"); + var joined = fromString(", ").join(printed); + var oneLine = joined.getLineLength(1) <= options.wrapColumn; + var parts = [oneLine ? "[" : "[\n"]; -},{}],505:[function(require,module,exports){ -// stringset.js -// MIT licensed, see LICENSE file -// Copyright (c) 2013 Olov Lassus + path.each(function(elemPath) { + var i = elemPath.getName(); + var elem = elemPath.getValue(); + if (!elem) { + // If the array expression ends with a hole, that hole + // will be ignored by the interpreter, but if it ends with + // two (or more) holes, we need to write out two (or more) + // commas so that the resulting code is interpreted with + // both (all) of the holes. + parts.push(","); + } else { + var lines = printed[i]; + if (oneLine) { + if (i > 0) + parts.push(" "); + } else { + lines = lines.indent(options.tabWidth); + } + parts.push(lines); + if (i < len - 1 || (!oneLine && options.trailingComma)) + parts.push(","); + if (!oneLine) + parts.push("\n"); + } + }, "elements"); -var StringSet = (function() { - "use strict"; + parts.push("]"); - // to save us a few characters - var hasOwnProperty = Object.prototype.hasOwnProperty; + return concat(parts); - var create = (function() { - function hasOwnEnumerableProps(obj) { - for (var prop in obj) { - if (hasOwnProperty.call(obj, prop)) { - return true; - } - } - return false; - } + case "SequenceExpression": + return fromString(", ").join(path.map(print, "expressions")); - // FF <= 3.6: - // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true - // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false - function hasOwnPollutedProps(obj) { - return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__"); + case "ThisExpression": + return fromString("this"); + + case "Super": + return fromString("super"); + + case "Literal": + if (typeof n.value !== "string") + return fromString(n.value, options); + + return fromString(nodeStr(n.value, options), options); + + case "ModuleSpecifier": + if (n.local) { + throw new Error( + "The ESTree ModuleSpecifier type should be abstract" + ); } - var useObjectCreate = false; - if (typeof Object.create === "function") { - if (!hasOwnEnumerableProps(Object.create(null))) { - useObjectCreate = true; - } - } - if (useObjectCreate === false) { - if (hasOwnEnumerableProps({})) { - throw new Error("StringSet environment error 0, please file a bug at https://github.com/olov/stringset/issues"); - } - } - // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims) + // The Esprima ModuleSpecifier type is just a string-valued + // Literal identifying the imported-from module. + return fromString(nodeStr(n.value, options), options); - var o = (useObjectCreate ? Object.create(null) : {}); - var useProtoClear = false; - if (hasOwnPollutedProps(o)) { - o.__proto__ = null; - if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) { - throw new Error("StringSet environment error 1, please file a bug at https://github.com/olov/stringset/issues"); - } - useProtoClear = true; - } - // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims) + case "UnaryExpression": + var parts = [n.operator]; + if (/[a-z]$/.test(n.operator)) + parts.push(" "); + parts.push(path.call(print, "argument")); + return concat(parts); - return function() { - var o = (useObjectCreate ? Object.create(null) : {}); - if (useProtoClear) { - o.__proto__ = null; - } - return o; - }; - })(); + case "UpdateExpression": + var parts = [path.call(print, "argument"), n.operator]; - // stringset ctor - function stringset(optional_array) { - // use with or without new - if (!(this instanceof stringset)) { - return new stringset(optional_array); - } - this.obj = create(); - this.hasProto = false; // false (no __proto__ item) or true (has __proto__ item) + if (n.prefix) + parts.reverse(); - if (optional_array) { - this.addMany(optional_array); - } - }; + return concat(parts); - // primitive methods that deals with data representation - stringset.prototype.has = function(item) { - // The type-check of item in has, get, set and delete is important because otherwise an object - // {toString: function() { return "__proto__"; }} can avoid the item === "__proto__" test. - // The alternative to type-checking would be to force string conversion, i.e. item = String(item); - if (typeof item !== "string") { - throw new Error("StringSet expected string item"); - } - return (item === "__proto__" ? - this.hasProto : - hasOwnProperty.call(this.obj, item)); - }; + case "ConditionalExpression": + return concat([ + "(", path.call(print, "test"), + " ? ", path.call(print, "consequent"), + " : ", path.call(print, "alternate"), ")" + ]); - stringset.prototype.add = function(item) { - if (typeof item !== "string") { - throw new Error("StringSet expected string item"); + case "NewExpression": + var parts = ["new ", path.call(print, "callee")]; + var args = n.arguments; + if (args) { + parts.push(printArgumentsList(path, options, print)); } - if (item === "__proto__") { - this.hasProto = true; + + return concat(parts); + + case "VariableDeclaration": + var parts = [n.kind, " "]; + var maxLen = 0; + var printed = path.map(function(childPath) { + var lines = print(childPath); + maxLen = Math.max(lines.length, maxLen); + return lines; + }, "declarations"); + + if (maxLen === 1) { + parts.push(fromString(", ").join(printed)); + } else if (printed.length > 1 ) { + parts.push( + fromString(",\n").join(printed) + .indentTail(n.kind.length + 1) + ); } else { - this.obj[item] = true; + parts.push(printed[0]); } - }; - stringset.prototype.remove = function(item) { - if (typeof item !== "string") { - throw new Error("StringSet expected string item"); - } - var didExist = this.has(item); - if (item === "__proto__") { - this.hasProto = false; - } else { - delete this.obj[item]; + // We generally want to terminate all variable declarations with a + // semicolon, except when they are children of for loops. + var parentNode = path.getParentNode(); + if (!namedTypes.ForStatement.check(parentNode) && + !namedTypes.ForInStatement.check(parentNode) && + !(namedTypes.ForOfStatement && + namedTypes.ForOfStatement.check(parentNode))) { + parts.push(";"); } - return didExist; - }; - // alias remove to delete but beware: - // ss.delete("key"); // OK in ES5 and later - // ss['delete']("key"); // OK in all ES versions - // ss.remove("key"); // OK in all ES versions - stringset.prototype['delete'] = stringset.prototype.remove; + return concat(parts); - stringset.prototype.isEmpty = function() { - for (var item in this.obj) { - if (hasOwnProperty.call(this.obj, item)) { - return false; - } - } - return !this.hasProto; - }; + case "VariableDeclarator": + return n.init ? fromString(" = ").join([ + path.call(print, "id"), + path.call(print, "init") + ]) : path.call(print, "id"); - stringset.prototype.size = function() { - var len = 0; - for (var item in this.obj) { - if (hasOwnProperty.call(this.obj, item)) { - ++len; - } - } - return (this.hasProto ? len + 1 : len); - }; + case "WithStatement": + return concat([ + "with (", + path.call(print, "object"), + ") ", + path.call(print, "body") + ]); - stringset.prototype.items = function() { - var items = []; - for (var item in this.obj) { - if (hasOwnProperty.call(this.obj, item)) { - items.push(item); - } - } - if (this.hasProto) { - items.push("__proto__"); - } - return items; - }; + case "IfStatement": + var con = adjustClause(path.call(print, "consequent"), options), + parts = ["if (", path.call(print, "test"), ")", con]; + + if (n.alternate) + parts.push( + endsWithBrace(con) ? " else" : "\nelse", + adjustClause(path.call(print, "alternate"), options)); + return concat(parts); - // methods that rely on the above primitives - stringset.prototype.addMany = function(items) { - if (!Array.isArray(items)) { - throw new Error("StringSet expected array"); - } - for (var i = 0; i < items.length; i++) { - this.add(items[i]); + case "ForStatement": + // TODO Get the for (;;) case right. + var init = path.call(print, "init"), + sep = init.length > 1 ? ";\n" : "; ", + forParen = "for (", + indented = fromString(sep).join([ + init, + path.call(print, "test"), + path.call(print, "update") + ]).indentTail(forParen.length), + head = concat([forParen, indented, ")"]), + clause = adjustClause(path.call(print, "body"), options), + parts = [head]; + + if (head.length > 1) { + parts.push("\n"); + clause = clause.trimLeft(); } - return this; - }; - stringset.prototype.merge = function(other) { - this.addMany(other.items()); - return this; - }; + parts.push(clause); - stringset.prototype.clone = function() { - var other = stringset(); - return other.merge(this); - }; + return concat(parts); - stringset.prototype.toString = function() { - return "{" + this.items().map(JSON.stringify).join(",") + "}"; - }; + case "WhileStatement": + return concat([ + "while (", + path.call(print, "test"), + ")", + adjustClause(path.call(print, "body"), options) + ]); - return stringset; -})(); + case "ForInStatement": + // Note: esprima can't actually parse "for each (". + return concat([ + n.each ? "for each (" : "for (", + path.call(print, "left"), + " in ", + path.call(print, "right"), + ")", + adjustClause(path.call(print, "body"), options) + ]); -if (typeof module !== "undefined" && typeof module.exports !== "undefined") { - module.exports = StringSet; -} + case "ForOfStatement": + return concat([ + "for (", + path.call(print, "left"), + " of ", + path.call(print, "right"), + ")", + adjustClause(path.call(print, "body"), options) + ]); -},{}],506:[function(require,module,exports){ -var assert = require("assert"); -var types = require("./types"); -var n = types.namedTypes; -var isArray = types.builtInTypes.array; -var isObject = types.builtInTypes.object; -var linesModule = require("./lines"); -var fromString = linesModule.fromString; -var Lines = linesModule.Lines; -var concat = linesModule.concat; -var util = require("./util"); -var comparePos = util.comparePos; -var childNodesCacheKey = require("private").makeUniqueKey(); + case "DoWhileStatement": + var doBody = concat([ + "do", + adjustClause(path.call(print, "body"), options) + ]), parts = [doBody]; -// TODO Move a non-caching implementation of this function into ast-types, -// and implement a caching wrapper function here. -function getSortedChildNodes(node, resultArray) { - if (!node) { - return; - } + if (endsWithBrace(doBody)) + parts.push(" while"); + else + parts.push("\nwhile"); - // The .loc checks below are sensitive to some of the problems that - // are fixed by this utility function. Specifically, if it decides to - // set node.loc to null, indicating that the node's .loc information - // is unreliable, then we don't want to add node to the resultArray. - util.fixFaultyLocations(node); + parts.push(" (", path.call(print, "test"), ");"); - if (resultArray) { - if (n.Node.check(node) && - n.SourceLocation.check(node.loc)) { - // This reverse insertion sort almost always takes constant - // time because we almost always (maybe always?) append the - // nodes in order anyway. - for (var i = resultArray.length - 1; i >= 0; --i) { - if (comparePos(resultArray[i].loc.end, - node.loc.start) <= 0) { - break; - } - } - resultArray.splice(i + 1, 0, node); - return; - } - } else if (node[childNodesCacheKey]) { - return node[childNodesCacheKey]; - } + return concat(parts); - var names; - if (isArray.check(node)) { - names = Object.keys(node); - } else if (isObject.check(node)) { - names = types.getFieldNames(node); - } else { - return; - } + case "DoExpression": + var statements = path.call(function(bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body"); - if (!resultArray) { - Object.defineProperty(node, childNodesCacheKey, { - value: resultArray = [], - enumerable: false - }); - } + return concat([ + "do {\n", + statements.indent(options.tabWidth), + "\n}" + ]); - for (var i = 0, nameCount = names.length; i < nameCount; ++i) { - getSortedChildNodes(node[names[i]], resultArray); - } + case "BreakStatement": + var parts = ["break"]; + if (n.label) + parts.push(" ", path.call(print, "label")); + parts.push(";"); + return concat(parts); - return resultArray; -} + case "ContinueStatement": + var parts = ["continue"]; + if (n.label) + parts.push(" ", path.call(print, "label")); + parts.push(";"); + return concat(parts); -// As efficiently as possible, decorate the comment object with -// .precedingNode, .enclosingNode, and/or .followingNode properties, at -// least one of which is guaranteed to be defined. -function decorateComment(node, comment) { - var childNodes = getSortedChildNodes(node); + case "LabeledStatement": + return concat([ + path.call(print, "label"), + ":\n", + path.call(print, "body") + ]); - // Time to dust off the old binary search robes and wizard hat. - var left = 0, right = childNodes.length; - while (left < right) { - var middle = (left + right) >> 1; - var child = childNodes[middle]; + case "TryStatement": + var parts = [ + "try ", + path.call(print, "block") + ]; - if (comparePos(child.loc.start, comment.loc.start) <= 0 && - comparePos(comment.loc.end, child.loc.end) <= 0) { - // The comment is completely contained by this child node. - decorateComment(comment.enclosingNode = child, comment); - return; // Abandon the binary search at this level. + if (n.handler) { + parts.push(" ", path.call(print, "handler")); + } else if (n.handlers) { + path.each(function(handlerPath) { + parts.push(" ", print(handlerPath)); + }, "handlers"); } - if (comparePos(child.loc.end, comment.loc.start) <= 0) { - // This child node falls completely before the comment. - // Because we will never consider this node or any nodes - // before it again, this node must be the closest preceding - // node we have encountered so far. - var precedingNode = child; - left = middle + 1; - continue; + if (n.finalizer) { + parts.push(" finally ", path.call(print, "finalizer")); } - if (comparePos(comment.loc.end, child.loc.start) <= 0) { - // This child node falls completely after the comment. - // Because we will never consider this node or any nodes after - // it again, this node must be the closest following node we - // have encountered so far. - var followingNode = child; - right = middle; - continue; - } + return concat(parts); - throw new Error("Comment location overlaps with node location"); - } + case "CatchClause": + var parts = ["catch (", path.call(print, "param")]; - if (precedingNode) { - comment.precedingNode = precedingNode; - } + if (n.guard) + // Note: esprima does not recognize conditional catch clauses. + parts.push(" if ", path.call(print, "guard")); - if (followingNode) { - comment.followingNode = followingNode; - } -} + parts.push(") ", path.call(print, "body")); -exports.attach = function(comments, ast, lines) { - if (!isArray.check(comments)) { - return; - } + return concat(parts); - var tiesToBreak = []; + case "ThrowStatement": + return concat(["throw ", path.call(print, "argument"), ";"]); - comments.forEach(function(comment) { - comment.loc.lines = lines; - decorateComment(ast, comment); + case "SwitchStatement": + return concat([ + "switch (", + path.call(print, "discriminant"), + ") {\n", + fromString("\n").join(path.map(print, "cases")), + "\n}" + ]); - var pn = comment.precedingNode; - var en = comment.enclosingNode; - var fn = comment.followingNode; + // Note: ignoring n.lexical because it has no printing consequences. - if (pn && fn) { - var tieCount = tiesToBreak.length; - if (tieCount > 0) { - var lastTie = tiesToBreak[tieCount - 1]; + case "SwitchCase": + var parts = []; - assert.strictEqual( - lastTie.precedingNode === comment.precedingNode, - lastTie.followingNode === comment.followingNode - ); + if (n.test) + parts.push("case ", path.call(print, "test"), ":"); + else + parts.push("default:"); - if (lastTie.followingNode !== comment.followingNode) { - breakTies(tiesToBreak, lines); - } - } + if (n.consequent.length > 0) { + parts.push("\n", path.call(function(consequentPath) { + return printStatementSequence(consequentPath, options, print); + }, "consequent").indent(options.tabWidth)); + } - tiesToBreak.push(comment); + return concat(parts); - } else if (pn) { - // No contest: we have a trailing comment. - breakTies(tiesToBreak, lines); - addTrailingComment(pn, comment); + case "DebuggerStatement": + return fromString("debugger;"); - } else if (fn) { - // No contest: we have a leading comment. - breakTies(tiesToBreak, lines); - addLeadingComment(fn, comment); + // JSX extensions below. - } else if (en) { - // The enclosing node has no child nodes at all, so what we - // have here is a dangling comment, e.g. [/* crickets */]. - breakTies(tiesToBreak, lines); - addDanglingComment(en, comment); + case "XJSAttribute": + case "JSXAttribute": + var parts = [path.call(print, "name")]; + if (n.value) + parts.push("=", path.call(print, "value")); + return concat(parts); - } else { - throw new Error("AST contains no nodes at all?"); - } - }); + case "XJSIdentifier": + case "JSXIdentifier": + return fromString(n.name, options); - breakTies(tiesToBreak, lines); + case "XJSNamespacedName": + case "JSXNamespacedName": + return fromString(":").join([ + path.call(print, "namespace"), + path.call(print, "name") + ]); + + case "XJSMemberExpression": + case "JSXMemberExpression": + return fromString(".").join([ + path.call(print, "object"), + path.call(print, "property") + ]); + + case "XJSSpreadAttribute": + case "JSXSpreadAttribute": + return concat(["{...", path.call(print, "argument"), "}"]); + + case "XJSExpressionContainer": + case "JSXExpressionContainer": + return concat(["{", path.call(print, "expression"), "}"]); + + case "XJSElement": + case "JSXElement": + var openingLines = path.call(print, "openingElement"); + + if (n.openingElement.selfClosing) { + assert.ok(!n.closingElement); + return openingLines; + } - comments.forEach(function(comment) { - // These node references were useful for breaking ties, but we - // don't need them anymore, and they create cycles in the AST that - // may lead to infinite recursion if we don't delete them here. - delete comment.precedingNode; - delete comment.enclosingNode; - delete comment.followingNode; - }); -}; + var childLines = concat( + path.map(function(childPath) { + var child = childPath.getValue(); -function breakTies(tiesToBreak, lines) { - var tieCount = tiesToBreak.length; - if (tieCount === 0) { - return; - } + if (namedTypes.Literal.check(child) && + typeof child.value === "string") { + if (/\S/.test(child.value)) { + return child.value.replace(/^\s+|\s+$/g, ""); + } else if (/\n/.test(child.value)) { + return "\n"; + } + } - var pn = tiesToBreak[0].precedingNode; - var fn = tiesToBreak[0].followingNode; - var gapEndPos = fn.loc.start; + return print(childPath); + }, "children") + ).indentTail(options.tabWidth); - // Iterate backwards through tiesToBreak, examining the gaps - // between the tied comments. In order to qualify as leading, a - // comment must be separated from fn by an unbroken series of - // whitespace-only gaps (or other comments). - for (var indexOfFirstLeadingComment = tieCount; - indexOfFirstLeadingComment > 0; - --indexOfFirstLeadingComment) { - var comment = tiesToBreak[indexOfFirstLeadingComment - 1]; - assert.strictEqual(comment.precedingNode, pn); - assert.strictEqual(comment.followingNode, fn); + var closingLines = path.call(print, "closingElement"); - var gap = lines.sliceString(comment.loc.end, gapEndPos); - if (/\S/.test(gap)) { - // The gap string contained something other than whitespace. - break; - } + return concat([ + openingLines, + childLines, + closingLines + ]); - gapEndPos = comment.loc.start; - } + case "XJSOpeningElement": + case "JSXOpeningElement": + var parts = ["<", path.call(print, "name")]; + var attrParts = []; - while (indexOfFirstLeadingComment <= tieCount && - (comment = tiesToBreak[indexOfFirstLeadingComment]) && - // If the comment is a //-style comment and indented more - // deeply than the node itself, reconsider it as trailing. - comment.type === "Line" && - comment.loc.start.column > fn.loc.start.column) { - ++indexOfFirstLeadingComment; - } + path.each(function(attrPath) { + attrParts.push(" ", print(attrPath)); + }, "attributes"); - tiesToBreak.forEach(function(comment, i) { - if (i < indexOfFirstLeadingComment) { - addTrailingComment(pn, comment); - } else { - addLeadingComment(fn, comment); - } - }); + var attrLines = concat(attrParts); - tiesToBreak.length = 0; -} + var needLineWrap = ( + attrLines.length > 1 || + attrLines.getLineLength(1) > options.wrapColumn + ); -function addCommentHelper(node, comment) { - var comments = node.comments || (node.comments = []); - comments.push(comment); -} + if (needLineWrap) { + attrParts.forEach(function(part, i) { + if (part === " ") { + assert.strictEqual(i % 2, 0); + attrParts[i] = "\n"; + } + }); -function addLeadingComment(node, comment) { - comment.leading = true; - comment.trailing = false; - addCommentHelper(node, comment); -} + attrLines = concat(attrParts).indentTail(options.tabWidth); + } -function addDanglingComment(node, comment) { - comment.leading = false; - comment.trailing = false; - addCommentHelper(node, comment); -} + parts.push(attrLines, n.selfClosing ? " />" : ">"); -function addTrailingComment(node, comment) { - comment.leading = false; - comment.trailing = true; - addCommentHelper(node, comment); -} + return concat(parts); -function printLeadingComment(commentPath, print) { - var comment = commentPath.getValue(); - n.Comment.assert(comment); + case "XJSClosingElement": + case "JSXClosingElement": + return concat([""]); - var loc = comment.loc; - var lines = loc && loc.lines; - var parts = [print(commentPath)]; + case "XJSText": + case "JSXText": + return fromString(n.value, options); - if (comment.trailing) { - // When we print trailing comments as leading comments, we don't - // want to bring any trailing spaces along. - parts.push("\n"); + case "XJSEmptyExpression": + case "JSXEmptyExpression": + return fromString(""); - } else if (lines instanceof Lines) { - var trailingSpace = lines.slice( - loc.end, - lines.skipSpaces(loc.end) - ); + case "TypeAnnotatedIdentifier": + return concat([ + path.call(print, "annotation"), + " ", + path.call(print, "identifier") + ]); - if (trailingSpace.length === 1) { - // If the trailing space contains no newlines, then we want to - // preserve it exactly as we found it. - parts.push(trailingSpace); - } else { - // If the trailing space contains newlines, then replace it - // with just that many newlines, with all other spaces removed. - parts.push(new Array(trailingSpace.length).join("\n")); + case "ClassBody": + if (n.body.length === 0) { + return fromString("{}"); } - } else { - parts.push("\n"); - } + return concat([ + "{\n", + path.call(function(bodyPath) { + return printStatementSequence(bodyPath, options, print); + }, "body").indent(options.tabWidth), + "\n}" + ]); - return concat(parts); -} + case "ClassPropertyDefinition": + var parts = ["static ", path.call(print, "definition")]; + if (!namedTypes.MethodDefinition.check(n.definition)) + parts.push(";"); + return concat(parts); -function printTrailingComment(commentPath, print) { - var comment = commentPath.getValue(commentPath); - n.Comment.assert(comment); + case "ClassProperty": + return concat([ + path.call(print, "key"), + path.call(print, "typeAnnotation"), + ";" + ]); - var loc = comment.loc; - var lines = loc && loc.lines; - var parts = []; + case "ClassDeclaration": + case "ClassExpression": + var parts = ["class"]; - if (lines instanceof Lines) { - var fromPos = lines.skipSpaces(loc.start, true) || lines.firstPos(); - var leadingSpace = lines.slice(fromPos, loc.start); + if (n.id) { + parts.push( + " ", + path.call(print, "id"), + path.call(print, "typeParameters") + ); + } - if (leadingSpace.length === 1) { - // If the leading space contains no newlines, then we want to - // preserve it exactly as we found it. - parts.push(leadingSpace); - } else { - // If the leading space contains newlines, then replace it - // with just that many newlines, sans all other spaces. - parts.push(new Array(leadingSpace.length).join("\n")); + if (n.superClass) { + parts.push( + " extends ", + path.call(print, "superClass"), + path.call(print, "superTypeParameters") + ); } - } - parts.push(print(commentPath)); + if (n["implements"]) { + parts.push( + " implements ", + fromString(", ").join(path.map(print, "implements")) + ); + } - return concat(parts); -} + parts.push(" ", path.call(print, "body")); -exports.printComments = function(path, print) { - var value = path.getValue(); - var innerLines = print(path); - var comments = n.Node.check(value) && - types.getFieldValue(value, "comments"); + return concat(parts); - if (!comments || comments.length === 0) { - return innerLines; - } + // These types are unprintable because they serve as abstract + // supertypes for other (printable) types. + case "Node": + case "Printable": + case "SourceLocation": + case "Position": + case "Statement": + case "Function": + case "Pattern": + case "Expression": + case "Declaration": + case "Specifier": + case "NamedSpecifier": + case "Comment": // Supertype of Block and Line. + case "MemberTypeAnnotation": // Flow + case "TupleTypeAnnotation": // Flow + case "Type": // Flow + throw new Error("unprintable type: " + JSON.stringify(n.type)); - var leadingParts = []; - var trailingParts = [innerLines]; + case "Block": // Block comment. + return concat(["/*", fromString(n.value, options), "*/"]); - path.each(function(commentPath) { - var comment = commentPath.getValue(); - var leading = types.getFieldValue(comment, "leading"); - var trailing = types.getFieldValue(comment, "trailing"); + case "Line": // Line comment. + return concat(["//", fromString(n.value, options)]); - if (leading || (trailing && comment.type !== "Block")) { - leadingParts.push(printLeadingComment(commentPath, print)); - } else if (trailing) { - assert.strictEqual(comment.type, "Block"); - trailingParts.push(printTrailingComment(commentPath, print)); + // Type Annotations for Facebook Flow, typically stripped out or + // transformed away before printing. + case "TypeAnnotation": + var parts = []; + + if (n.typeAnnotation) { + if (n.typeAnnotation.type !== "FunctionTypeAnnotation") { + parts.push(": "); + } + parts.push(path.call(print, "typeAnnotation")); + return concat(parts); } - }, "comments"); - leadingParts.push.apply(leadingParts, trailingParts); - return concat(leadingParts); -}; + return fromString(""); -},{"./lines":508,"./types":514,"./util":515,"assert":213,"private":484}],507:[function(require,module,exports){ -var assert = require("assert"); -var types = require("./types"); -var n = types.namedTypes; -var Node = n.Node; -var isArray = types.builtInTypes.array; -var isNumber = types.builtInTypes.number; + case "AnyTypeAnnotation": + return fromString("any", options); -function FastPath(value) { - assert.ok(this instanceof FastPath); - this.stack = [value]; -} + case "MixedTypeAnnotation": + return fromString("mixed", options); -var FPp = FastPath.prototype; -module.exports = FastPath; + case "ArrayTypeAnnotation": + return concat([ + path.call(print, "elementType"), + "[]" + ]); -// Static convenience function for coercing a value to a FastPath. -FastPath.from = function(obj) { - if (obj instanceof FastPath) { - // Return a defensive copy of any existing FastPath instances. - return obj.copy(); - } + case "BooleanTypeAnnotation": + return fromString("boolean", options); - if (obj instanceof types.NodePath) { - // For backwards compatibility, unroll NodePath instances into - // lightweight FastPath [..., name, value] stacks. - var copy = Object.create(FastPath.prototype); - var stack = [obj.value]; - for (var pp; (pp = obj.parentPath); obj = pp) - stack.push(obj.name, pp.value); - copy.stack = stack.reverse(); - return copy; - } + case "BooleanLiteralTypeAnnotation": + assert.strictEqual(typeof n.value, "boolean"); + return fromString("" + n.value, options); - // Otherwise use obj as the value of the new FastPath instance. - return new FastPath(obj); -}; + case "DeclareClass": + return concat([ + fromString("declare class ", options), + path.call(print, "id"), + " ", + path.call(print, "body"), + ]); -FPp.copy = function copy() { - var copy = Object.create(FastPath.prototype); - copy.stack = this.stack.slice(0); - return copy; -}; + case "DeclareFunction": + return concat([ + fromString("declare function ", options), + path.call(print, "id") + ]); -// The name of the current property is always the penultimate element of -// this.stack, and always a String. -FPp.getName = function getName() { - var s = this.stack; - var len = s.length; - if (len > 1) { - return s[len - 2]; - } - // Since the name is always a string, null is a safe sentinel value to - // return if we do not know the name of the (root) value. - return null; -}; + case "DeclareModule": + return concat([ + fromString("declare module ", options), + path.call(print, "id"), + " ", + path.call(print, "body"), + ]); -// The value of the current property is always the final element of -// this.stack. -FPp.getValue = function getValue() { - var s = this.stack; - return s[s.length - 1]; -}; + case "DeclareVariable": + return concat([ + fromString("declare var ", options), + path.call(print, "id") + ]); -function getNodeHelper(path, count) { - var s = path.stack; + case "FunctionTypeAnnotation": + // FunctionTypeAnnotation is ambiguous: + // declare function(a: B): void; OR + // var A: (a: B) => void; + var parts = []; + var parent = path.getParentNode(0); + var isArrowFunctionTypeAnnotation = !( + namedTypes.ObjectTypeCallProperty.check(parent) || + namedTypes.DeclareFunction.check(path.getParentNode(2)) + ); - for (var i = s.length - 1; i >= 0; i -= 2) { - var value = s[i]; - if (n.Node.check(value) && --count < 0) { - return value; - } - } + var needsColon = + isArrowFunctionTypeAnnotation && + !namedTypes.FunctionTypeParam.check(parent); - return null; -} + if (needsColon) { + parts.push(": "); + } -FPp.getNode = function getNode(count) { - return getNodeHelper(this, ~~count); -}; + parts.push( + "(", + fromString(", ").join(path.map(print, "params")), + ")" + ); -FPp.getParentNode = function getParentNode(count) { - return getNodeHelper(this, ~~count + 1); -}; + // The returnType is not wrapped in a TypeAnnotation, so the colon + // needs to be added separately. + if (n.returnType) { + parts.push( + isArrowFunctionTypeAnnotation ? " => " : ": ", + path.call(print, "returnType") + ); + } -// The length of the stack can be either even or odd, depending on whether -// or not we have a name for the root value. The difference between the -// index of the root value and the index of the final value is always -// even, though, which allows us to return the root value in constant time -// (i.e. without iterating backwards through the stack). -FPp.getRootValue = function getRootValue() { - var s = this.stack; - if (s.length % 2 === 0) { - return s[1]; - } - return s[0]; -}; + return concat(parts); -// Temporarily push properties named by string arguments given after the -// callback function onto this.stack, then call the callback with a -// reference to this (modified) FastPath object. Note that the stack will -// be restored to its original state after the callback is finished, so it -// is probably a mistake to retain a reference to the path. -FPp.call = function call(callback/*, name1, name2, ... */) { - var s = this.stack; - var origLen = s.length; - var value = s[origLen - 1]; - var argc = arguments.length; - for (var i = 1; i < argc; ++i) { - var name = arguments[i]; - value = value[name]; - s.push(name, value); - } - var result = callback(this); - s.length = origLen; - return result; -}; + case "FunctionTypeParam": + return concat([ + path.call(print, "name"), + ": ", + path.call(print, "typeAnnotation"), + ]); -// Similar to FastPath.prototype.call, except that the value obtained by -// accessing this.getValue()[name1][name2]... should be array-like. The -// callback will be called with a reference to this path object for each -// element of the array. -FPp.each = function each(callback/*, name1, name2, ... */) { - var s = this.stack; - var origLen = s.length; - var value = s[origLen - 1]; - var argc = arguments.length; + case "GenericTypeAnnotation": + return concat([ + path.call(print, "id"), + path.call(print, "typeParameters") + ]); - for (var i = 1; i < argc; ++i) { - var name = arguments[i]; - value = value[name]; - s.push(name, value); - } + case "InterfaceDeclaration": + var parts = [ + fromString("interface ", options), + path.call(print, "id"), + path.call(print, "typeParameters"), + " " + ]; - for (var i = 0; i < value.length; ++i) { - if (i in value) { - s.push(i, value[i]); - // If the callback needs to know the value of i, call - // path.getName(), assuming path is the parameter name. - callback(this); - s.length -= 2; + if (n["extends"]) { + parts.push( + "extends ", + fromString(", ").join(path.map(print, "extends")) + ); } - } - s.length = origLen; -}; + parts.push(path.call(print, "body")); -// Similar to FastPath.prototype.each, except that the results of the -// callback function invocations are stored in an array and returned at -// the end of the iteration. -FPp.map = function map(callback/*, name1, name2, ... */) { - var s = this.stack; - var origLen = s.length; - var value = s[origLen - 1]; - var argc = arguments.length; + return concat(parts); + + case "ClassImplements": + case "InterfaceExtends": + return concat([ + path.call(print, "id"), + path.call(print, "typeParameters") + ]); + + case "IntersectionTypeAnnotation": + return fromString(" & ").join(path.map(print, "types")); + + case "NullableTypeAnnotation": + return concat([ + "?", + path.call(print, "typeAnnotation") + ]); - for (var i = 1; i < argc; ++i) { - var name = arguments[i]; - value = value[name]; - s.push(name, value); - } + case "NumberTypeAnnotation": + return fromString("number", options); - var result = new Array(value.length); + case "ObjectTypeCallProperty": + return path.call(print, "value"); - for (var i = 0; i < value.length; ++i) { - if (i in value) { - s.push(i, value[i]); - result[i] = callback(this, i); - s.length -= 2; - } - } + case "ObjectTypeIndexer": + return concat([ + "[", + path.call(print, "id"), + ": ", + path.call(print, "key"), + "]: ", + path.call(print, "value") + ]); - s.length = origLen; + case "ObjectTypeProperty": + return concat([ + path.call(print, "key"), + ": ", + path.call(print, "value") + ]); - return result; -}; + case "QualifiedTypeIdentifier": + return concat([ + path.call(print, "qualification"), + ".", + path.call(print, "id") + ]); -// Inspired by require("ast-types").NodePath.prototype.needsParens, but -// more efficient because we're iterating backwards through a stack. -FPp.needsParens = function(assumeExpressionContext) { - var parent = this.getParentNode(); - if (!parent) { - return false; - } + case "StringLiteralTypeAnnotation": + return fromString(nodeStr(n.value, options), options); - var name = this.getName(); - var node = this.getNode(); + case "NumberLiteralTypeAnnotation": + assert.strictEqual(typeof n.value, "number"); + return fromString("" + n.value, options); - // If the value of this path is some child of a Node and not a Node - // itself, then it doesn't need parentheses. Only Node objects (in - // fact, only Expression nodes) need parentheses. - if (this.getValue() !== node) { - return false; - } + case "StringTypeAnnotation": + return fromString("string", options); - // Only expressions need parentheses. - if (!n.Expression.check(node)) { - return false; - } + case "TypeAlias": + return concat([ + "type ", + path.call(print, "id"), + " = ", + path.call(print, "right") + ]); - // Identifiers never need parentheses. - if (node.type === "Identifier") { - return false; - } + case "TypeCastExpression": + return concat([ + "(", + path.call(print, "expression"), + path.call(print, "typeAnnotation"), + ")" + ]); - switch (node.type) { - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - return parent.type === "MemberExpression" - && name === "object" - && parent.object === node; + case "TypeParameterDeclaration": + case "TypeParameterInstantiation": + return concat([ + "<", + fromString(", ").join(path.map(print, "params")), + ">" + ]); - case "BinaryExpression": - case "LogicalExpression": - switch (parent.type) { - case "CallExpression": - return name === "callee" - && parent.callee === node; + case "TypeofTypeAnnotation": + return concat([ + fromString("typeof ", options), + path.call(print, "argument") + ]); - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - return true; + case "UnionTypeAnnotation": + return fromString(" | ").join(path.map(print, "types")); - case "MemberExpression": - return name === "object" - && parent.object === node; + case "VoidTypeAnnotation": + return fromString("void", options); - case "BinaryExpression": - case "LogicalExpression": - var po = parent.operator; - var pp = PRECEDENCE[po]; - var no = node.operator; - var np = PRECEDENCE[no]; + // Unhandled types below. If encountered, nodes of these types should + // be either left alone or desugared into AST types that are fully + // supported by the pretty-printer. + case "ClassHeritage": // TODO + case "ComprehensionBlock": // TODO + case "ComprehensionExpression": // TODO + case "Glob": // TODO + case "TaggedTemplateExpression": // TODO + case "TemplateElement": // TODO + case "TemplateLiteral": // TODO + case "GeneratorExpression": // TODO + case "LetStatement": // TODO + case "LetExpression": // TODO + case "GraphExpression": // TODO + case "GraphIndexExpression": // TODO - if (pp > np) { - return true; - } + // XML types that nobody cares about or needs to print. + case "XMLDefaultDeclaration": + case "XMLAnyName": + case "XMLQualifiedIdentifier": + case "XMLFunctionQualifiedIdentifier": + case "XMLAttributeSelector": + case "XMLFilterExpression": + case "XML": + case "XMLElement": + case "XMLList": + case "XMLEscape": + case "XMLText": + case "XMLStartTag": + case "XMLEndTag": + case "XMLPointTag": + case "XMLName": + case "XMLAttribute": + case "XMLCdata": + case "XMLComment": + case "XMLProcessingInstruction": + default: + debugger; + throw new Error("unknown type: " + JSON.stringify(n.type)); + } - if (pp === np && name === "right") { - assert.strictEqual(parent.right, node); - return true; - } + return p; +} - default: - return false; - } +function printStatementSequence(path, options, print) { + var inClassBody = + namedTypes.ClassBody && + namedTypes.ClassBody.check(path.getParentNode()); - case "SequenceExpression": - switch (parent.type) { - case "ForStatement": - // Although parentheses wouldn't hurt around sequence - // expressions in the head of for loops, traditional style - // dictates that e.g. i++, j++ should not be wrapped with - // parentheses. - return false; + var filtered = []; + var sawComment = false; + var sawStatement = false; - case "ExpressionStatement": - return name !== "expression"; + path.each(function(stmtPath) { + var i = stmtPath.getName(); + var stmt = stmtPath.getValue(); - default: - // Otherwise err on the side of overparenthesization, adding - // explicit exceptions above if this proves overzealous. - return true; + // Just in case the AST has been modified to contain falsy + // "statements," it's safer simply to skip them. + if (!stmt) { + return; } - case "YieldExpression": - switch (parent.type) { - case "BinaryExpression": - case "LogicalExpression": - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - case "CallExpression": - case "MemberExpression": - case "NewExpression": - case "ConditionalExpression": - case "YieldExpression": - return true; + // Skip printing EmptyStatement nodes to avoid leaving stray + // semicolons lying around. + if (stmt.type === "EmptyStatement") { + return; + } - default: - return false; + if (namedTypes.Comment.check(stmt)) { + // The pretty printer allows a dangling Comment node to act as + // a Statement when the Comment can't be attached to any other + // non-Comment node in the tree. + sawComment = true; + } else if (!inClassBody) { + namedTypes.Statement.assert(stmt); + sawStatement = true; } - case "Literal": - return parent.type === "MemberExpression" - && isNumber.check(node.value) - && name === "object" - && parent.object === node; + // We can't hang onto stmtPath outside of this function, because + // it's just a reference to a mutable FastPath object, so we have + // to go ahead and print it here. + filtered.push({ + node: stmt, + printed: print(stmtPath) + }); + }); - case "AssignmentExpression": - case "ConditionalExpression": - switch (parent.type) { - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - case "BinaryExpression": - case "LogicalExpression": - return true; + if (sawComment) { + assert.strictEqual( + sawStatement, false, + "Comments may appear as statements in otherwise empty statement " + + "lists, but may not coexist with non-Comment nodes." + ); + } - case "CallExpression": - return name === "callee" - && parent.callee === node; + var prevTrailingSpace = null; + var len = filtered.length; + var parts = []; - case "ConditionalExpression": - return name === "test" - && parent.test === node; + filtered.forEach(function(info, i) { + var printed = info.printed; + var stmt = info.node; + var multiLine = printed.length > 1; + var notFirst = i > 0; + var notLast = i < len - 1; + var leadingSpace; + var trailingSpace; - case "MemberExpression": - return name === "object" - && parent.object === node; + var trueLoc = options.reuseWhitespace && util.getTrueLoc(stmt); + var lines = trueLoc && trueLoc.lines; - default: - return false; + if (notFirst) { + if (lines) { + var beforeStart = lines.skipSpaces(trueLoc.start, true); + var beforeStartLine = beforeStart ? beforeStart.line : 1; + var leadingGap = trueLoc.start.line - beforeStartLine; + leadingSpace = Array(leadingGap + 1).join("\n"); + } else { + leadingSpace = multiLine ? "\n\n" : "\n"; + } + } else { + leadingSpace = ""; } - case "ArrowFunctionExpression": - return isBinary(parent); - - case "ObjectExpression": - if (parent.type === "ArrowFunctionExpression" && - name === "body") { - return true; + if (notLast) { + if (lines) { + var afterEnd = lines.skipSpaces(trueLoc.end); + var afterEndLine = afterEnd ? afterEnd.line : lines.length; + var trailingGap = afterEndLine - trueLoc.end.line; + trailingSpace = Array(trailingGap + 1).join("\n"); + } else { + trailingSpace = multiLine ? "\n\n" : "\n"; + } + } else { + trailingSpace = ""; } - default: - if (parent.type === "NewExpression" && - name === "callee" && - parent.callee === node) { - return containsCallExpression(node); + parts.push( + maxSpace(prevTrailingSpace, leadingSpace), + printed + ); + + if (notLast) { + prevTrailingSpace = trailingSpace; + } else if (trailingSpace) { + parts.push(trailingSpace); } + }); + + return concat(parts); +} + +function maxSpace(s1, s2) { + if (!s1 && !s2) { + return fromString(""); } - if (assumeExpressionContext !== true && - !this.canBeFirstInStatement() && - this.firstInStatement()) - return true; + if (!s1) { + return fromString(s2); + } - return false; -}; + if (!s2) { + return fromString(s1); + } -function isBinary(node) { - return n.BinaryExpression.check(node) - || n.LogicalExpression.check(node); -} + var spaceLines1 = fromString(s1); + var spaceLines2 = fromString(s2); -function isUnaryLike(node) { - return n.UnaryExpression.check(node) - // I considered making SpreadElement and SpreadProperty subtypes - // of UnaryExpression, but they're not really Expression nodes. - || (n.SpreadElement && n.SpreadElement.check(node)) - || (n.SpreadProperty && n.SpreadProperty.check(node)); + if (spaceLines2.length > spaceLines1.length) { + return spaceLines2; + } + + return spaceLines1; } -var PRECEDENCE = {}; -[["||"], - ["&&"], - ["|"], - ["^"], - ["&"], - ["==", "===", "!=", "!=="], - ["<", ">", "<=", ">=", "in", "instanceof"], - [">>", "<<", ">>>"], - ["+", "-"], - ["*", "/", "%"] -].forEach(function(tier, i) { - tier.forEach(function(op) { - PRECEDENCE[op] = i; - }); -}); +function printMethod(path, options, print) { + var node = path.getNode(); + var kind = node.kind; + var parts = []; -function containsCallExpression(node) { - if (n.CallExpression.check(node)) { - return true; + namedTypes.FunctionExpression.assert(node.value); + + if (node.decorators) { + path.each(function(decoratorPath) { + parts.push(print(decoratorPath), "\n"); + }, "decorators"); } - if (isArray.check(node)) { - return node.some(containsCallExpression); + if (node.value.async) { + parts.push("async "); } - if (n.Node.check(node)) { - return types.someField(node, function(name, child) { - return containsCallExpression(child); - }); + if (!kind || kind === "init") { + if (node.value.generator) { + parts.push("*"); + } + } else { + assert.ok(kind === "get" || kind === "set"); + parts.push(kind, " "); } - return false; + var key = path.call(print, "key"); + if (node.computed) { + key = concat(["[", key, "]"]); + } + + parts.push( + key, + path.call(print, "value", "typeParameters"), + "(", + path.call(function(valuePath) { + return printFunctionParams(valuePath, options, print); + }, "value"), + ")", + path.call(print, "value", "returnType"), + " ", + path.call(print, "value", "body") + ); + + return concat(parts); } -FPp.canBeFirstInStatement = function() { - var node = this.getNode(); - return !n.FunctionExpression.check(node) - && !n.ObjectExpression.check(node); -}; +function printArgumentsList(path, options, print) { + var printed = path.map(print, "arguments"); -FPp.firstInStatement = function() { - var s = this.stack; - var parentName, parent; - var childName, child; + var joined = fromString(", ").join(printed); + if (joined.getLineLength(1) > options.wrapColumn) { + joined = fromString(",\n").join(printed); + return concat([ + "(\n", + joined.indent(options.tabWidth), + options.trailingComma ? ",\n)" : "\n)" + ]); + } - for (var i = s.length - 1; i >= 0; i -= 2) { - if (n.Node.check(s[i])) { - childName = parentName; - child = parent; - parentName = s[i - 1]; - parent = s[i]; - } + return concat(["(", joined, ")"]); +} - if (!parent || !child) { - continue; - } +function printFunctionParams(path, options, print) { + var fun = path.getValue(); + namedTypes.Function.assert(fun); - if (n.BlockStatement.check(parent) && - parentName === "body" && - childName === 0) { - assert.strictEqual(parent.body[0], child); - return true; - } + var printed = path.map(print, "params"); - if (n.ExpressionStatement.check(parent) && - childName === "expression") { - assert.strictEqual(parent.expression, child); - return true; - } + if (fun.defaults) { + path.each(function(defExprPath) { + var i = defExprPath.getName(); + var p = printed[i]; + if (p && defExprPath.getValue()) { + printed[i] = concat([p, "=", print(defExprPath)]); + } + }, "defaults"); + } - if (n.SequenceExpression.check(parent) && - parentName === "expressions" && - childName === 0) { - assert.strictEqual(parent.expressions[0], child); - continue; - } + if (fun.rest) { + printed.push(concat(["...", path.call(print, "rest")])); + } - if (n.CallExpression.check(parent) && - childName === "callee") { - assert.strictEqual(parent.callee, child); - continue; + var joined = fromString(", ").join(printed); + if (joined.length > 1 || + joined.getLineLength(1) > options.wrapColumn) { + joined = fromString(",\n").join(printed); + if (options.trailingComma && !fun.rest) { + joined = concat([joined, ",\n"]); } + return concat(["\n", joined.indent(options.tabWidth)]); + } - if (n.MemberExpression.check(parent) && - childName === "object") { - assert.strictEqual(parent.object, child); - continue; - } + return joined; +} - if (n.ConditionalExpression.check(parent) && - childName === "test") { - assert.strictEqual(parent.test, child); - continue; - } +function adjustClause(clause, options) { + if (clause.length > 1) + return concat([" ", clause]); + + return concat([ + "\n", + maybeAddSemicolon(clause).indent(options.tabWidth) + ]); +} - if (isBinary(parent) && - childName === "left") { - assert.strictEqual(parent.left, child); - continue; - } +function lastNonSpaceCharacter(lines) { + var pos = lines.lastPos(); + do { + var ch = lines.charAt(pos); + if (/\S/.test(ch)) + return ch; + } while (lines.prevPos(pos)); +} - if (n.UnaryExpression.check(parent) && - !parent.prefix && - childName === "argument") { - assert.strictEqual(parent.argument, child); - continue; - } +function endsWithBrace(lines) { + return lastNonSpaceCharacter(lines) === "}"; +} - return false; +function swapQuotes(str) { + return str.replace(/['"]/g, function(m) { + return m === '"' ? '\'' : '"'; + }); +} + +function nodeStr(str, options) { + isString.assert(str); + switch (options.quote) { + case "auto": + var double = JSON.stringify(str); + var single = swapQuotes(JSON.stringify(swapQuotes(str))); + return double.length > single.length ? single : double; + case "single": + return swapQuotes(JSON.stringify(swapQuotes(str))); + case "double": + default: + return JSON.stringify(str); } +} - return true; -}; +function maybeAddSemicolon(lines) { + var eoc = lastNonSpaceCharacter(lines); + if (!eoc || "\n};".indexOf(eoc) < 0) + return concat([lines, ";"]); + return lines; +} -},{"./types":514,"assert":213}],508:[function(require,module,exports){ +},{"./comments":496,"./fast-path":497,"./lines":498,"./options":500,"./patcher":502,"./types":504,"./util":505,"assert":2,"source-map":536}],504:[function(require,module,exports){ +// This module was originally created so that Recast could add its own +// custom types to the AST type system (in particular, the File type), but +// those types are now incorporated into ast-types, so this module doesn't +// have much to do anymore. Still, it might prove useful in the future. +module.exports = require("ast-types"); + +},{"ast-types":522}],505:[function(require,module,exports){ var assert = require("assert"); -var sourceMap = require("source-map"); -var normalizeOptions = require("./options").normalize; -var secretKey = require("private").makeUniqueKey(); var types = require("./types"); -var isString = types.builtInTypes.string; -var comparePos = require("./util").comparePos; -var Mapping = require("./mapping"); +var getFieldValue = types.getFieldValue; +var n = types.namedTypes; +var sourceMap = require("source-map"); +var SourceMapConsumer = sourceMap.SourceMapConsumer; +var SourceMapGenerator = sourceMap.SourceMapGenerator; +var hasOwn = Object.prototype.hasOwnProperty; -// Goals: -// 1. Minimize new string creation. -// 2. Keep (de)identation O(lines) time. -// 3. Permit negative indentations. -// 4. Enforce immutability. -// 5. No newline characters. +function getUnionOfKeys() { + var result = {}; + var argc = arguments.length; + for (var i = 0; i < argc; ++i) { + var keys = Object.keys(arguments[i]); + var keyCount = keys.length; + for (var j = 0; j < keyCount; ++j) { + result[keys[j]] = true; + } + } + return result; +} +exports.getUnionOfKeys = getUnionOfKeys; -function getSecret(lines) { - return lines[secretKey]; +function comparePos(pos1, pos2) { + return (pos1.line - pos2.line) || (pos1.column - pos2.column); } +exports.comparePos = comparePos; -function Lines(infos, sourceFileName) { - assert.ok(this instanceof Lines); - assert.ok(infos.length > 0); +function copyPos(pos) { + return { + line: pos.line, + column: pos.column + }; +} +exports.copyPos = copyPos; - if (sourceFileName) { - isString.assert(sourceFileName); +exports.composeSourceMaps = function(formerMap, latterMap) { + if (formerMap) { + if (!latterMap) { + return formerMap; + } } else { - sourceFileName = null; + return latterMap || null; } - Object.defineProperty(this, secretKey, { - value: { - infos: infos, - mappings: [], - name: sourceFileName, - cachedSourceMap: null - } + var smcFormer = new SourceMapConsumer(formerMap); + var smcLatter = new SourceMapConsumer(latterMap); + var smg = new SourceMapGenerator({ + file: latterMap.file, + sourceRoot: latterMap.sourceRoot }); - if (sourceFileName) { - getSecret(this).mappings.push(new Mapping(this, { - start: this.firstPos(), - end: this.lastPos() - })); - } -} + var sourcesToContents = {}; -// Exposed for instanceof checks. The fromString function should be used -// to create new Lines objects. -exports.Lines = Lines; -var Lp = Lines.prototype; + smcLatter.eachMapping(function(mapping) { + var origPos = smcFormer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); -// These properties used to be assigned to each new object in the Lines -// constructor, but we can more efficiently stuff them into the secret and -// let these lazy accessors compute their values on-the-fly. -Object.defineProperties(Lp, { - length: { - get: function() { - return getSecret(this).infos.length; + var sourceName = origPos.source; + if (sourceName === null) { + return; } - }, - name: { - get: function() { - return getSecret(this).name; + smg.addMapping({ + source: sourceName, + original: copyPos(origPos), + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + }, + name: mapping.name + }); + + var sourceContent = smcFormer.sourceContentFor(sourceName); + if (sourceContent && !hasOwn.call(sourcesToContents, sourceName)) { + sourcesToContents[sourceName] = sourceContent; + smg.setSourceContent(sourceName, sourceContent); } - } -}); + }); -function copyLineInfo(info) { - return { - line: info.line, - indent: info.indent, - sliceStart: info.sliceStart, - sliceEnd: info.sliceEnd - }; -} + return smg.toJSON(); +}; -var fromStringCache = {}; -var hasOwn = fromStringCache.hasOwnProperty; -var maxCacheKeyLen = 10; +exports.getTrueLoc = function(node) { + // It's possible that node is newly-created (not parsed by Esprima), + // in which case it probably won't have a .loc property (or an + // .original property for that matter). That's fine; we'll just + // pretty-print it as usual. + if (!node.loc) { + return null; + } -function countSpaces(spaces, tabWidth) { - var count = 0; - var len = spaces.length; + if (!node.comments) { + // If the node has no comments, regard node.loc as true. + return node.loc; + } - for (var i = 0; i < len; ++i) { - switch (spaces.charCodeAt(i)) { - case 9: // '\t' - assert.strictEqual(typeof tabWidth, "number"); - assert.ok(tabWidth > 0); + var start = node.loc.start; + var end = node.loc.end; - var next = Math.ceil(count / tabWidth) * tabWidth; - if (next === count) { - count += tabWidth; - } else { - count = next; + // If the node has any comments, their locations might contribute to + // the true start/end positions of the node. + node.comments.forEach(function(comment) { + if (comment.loc) { + if (comparePos(comment.loc.start, start) < 0) { + start = comment.loc.start; } - break; + if (comparePos(end, comment.loc.end) < 0) { + end = comment.loc.end; + } + } + }); - case 11: // '\v' - case 12: // '\f' - case 13: // '\r' - case 0xfeff: // zero-width non-breaking space - // These characters contribute nothing to indentation. - break; + return { + lines: node.loc.lines, + start: start, + end: end + }; +}; - case 32: // ' ' - default: // Treat all other whitespace like ' '. - count += 1; - break; +exports.fixFaultyLocations = function(node) { + if ((n.MethodDefinition && n.MethodDefinition.check(node)) || + (n.Property.check(node) && (node.method || node.shorthand))) { + // If the node is a MethodDefinition or a .method or .shorthand + // Property, then the location information stored in + // node.value.loc is very likely untrustworthy (just the {body} + // part of a method, or nothing in the case of shorthand + // properties), so we null out that information to prevent + // accidental reuse of bogus source code during reprinting. + node.value.loc = null; + + if (n.FunctionExpression.check(node.value)) { + // FunctionExpression method values should be anonymous, + // because their .id fields are ignored anyway. + node.value.id = null; } } - return count; -} -exports.countSpaces = countSpaces; - -var leadingSpaceExp = /^\s*/; - -/** - * @param {Object} options - Options object that configures printing. - */ -function fromString(string, options) { - if (string instanceof Lines) - return string; + var loc = node.loc; + if (loc) { + if (loc.start.line < 1) { + loc.start.line = 1; + } - string += ""; + if (loc.end.line < 1) { + loc.end.line = 1; + } + } +}; - var tabWidth = options && options.tabWidth; - var tabless = string.indexOf("\t") < 0; - var cacheable = !options && tabless && (string.length <= maxCacheKeyLen); +},{"./types":504,"assert":2,"source-map":536}],506:[function(require,module,exports){ +(function (process){ +var types = require("./lib/types"); +var parse = require("./lib/parser").parse; +var Printer = require("./lib/printer").Printer; - assert.ok(tabWidth || tabless, "No tab width specified but encountered tabs in string\n" + string); +function print(node, options) { + return new Printer(options).print(node); +} - if (cacheable && hasOwn.call(fromStringCache, string)) - return fromStringCache[string]; +function prettyPrint(node, options) { + return new Printer(options).printGenerically(node); +} - var lines = new Lines(string.split("\n").map(function(line) { - var spaces = leadingSpaceExp.exec(line)[0]; - return { - line: line, - indent: countSpaces(spaces, tabWidth), - sliceStart: spaces.length, - sliceEnd: line.length - }; - }), normalizeOptions(options).sourceFileName); +function run(transformer, options) { + return runFile(process.argv[2], transformer, options); +} - if (cacheable) - fromStringCache[string] = lines; +function runFile(path, transformer, options) { + require("fs").readFile(path, "utf-8", function(err, code) { + if (err) { + console.error(err); + return; + } - return lines; + runString(code, transformer, options); + }); } -exports.fromString = fromString; -function isOnlyWhitespace(string) { - return !/\S/.test(string); +function defaultWriteback(output) { + process.stdout.write(output); } -Lp.toString = function(options) { - return this.sliceString(this.firstPos(), this.lastPos(), options); -}; +function runString(code, transformer, options) { + var writeback = options && options.writeback || defaultWriteback; + transformer(parse(code, options), function(node) { + writeback(print(node, options).code); + }); +} -Lp.getSourceMap = function(sourceMapName, sourceRoot) { - if (!sourceMapName) { - // Although we could make up a name or generate an anonymous - // source map, instead we assume that any consumer who does not - // provide a name does not actually want a source map. - return null; - } +Object.defineProperties(exports, { + /** + * Parse a string of code into an augmented syntax tree suitable for + * arbitrary modification and reprinting. + */ + parse: { + enumerable: true, + value: parse + }, - var targetLines = this; + /** + * Traverse and potentially modify an abstract syntax tree using a + * convenient visitor syntax: + * + * recast.visit(ast, { + * names: [], + * visitIdentifier: function(path) { + * var node = path.value; + * this.visitor.names.push(node.name); + * this.traverse(path); + * } + * }); + */ + visit: { + enumerable: true, + value: types.visit + }, - function updateJSON(json) { - json = json || {}; + /** + * Reprint a modified syntax tree using as much of the original source + * code as possible. + */ + print: { + enumerable: true, + value: print + }, - isString.assert(sourceMapName); - json.file = sourceMapName; + /** + * Print without attempting to reuse any original source code. + */ + prettyPrint: { + enumerable: false, + value: prettyPrint + }, - if (sourceRoot) { - isString.assert(sourceRoot); - json.sourceRoot = sourceRoot; - } + /** + * Customized version of require("ast-types"). + */ + types: { + enumerable: false, + value: types + }, - return json; + /** + * Convenient command-line interface (see e.g. example/add-braces). + */ + run: { + enumerable: false, + value: run } +}); - var secret = getSecret(targetLines); - if (secret.cachedSourceMap) { - // Since Lines objects are immutable, we can reuse any source map - // that was previously generated. Nevertheless, we return a new - // JSON object here to protect the cached source map from outside - // modification. - return updateJSON(secret.cachedSourceMap.toJSON()); - } +}).call(this,require('_process')) +},{"./lib/parser":501,"./lib/printer":503,"./lib/types":504,"_process":12,"fs":1}],507:[function(require,module,exports){ +require("./es7"); - var smg = new sourceMap.SourceMapGenerator(updateJSON()); - var sourcesToContents = {}; +var types = require("../lib/types"); +var defaults = require("../lib/shared").defaults; +var def = types.Type.def; +var or = types.Type.or; - secret.mappings.forEach(function(mapping) { - var sourceCursor = mapping.sourceLines.skipSpaces( - mapping.sourceLoc.start - ) || mapping.sourceLines.lastPos(); +def("Noop") + .bases("Node") + .build(); - var targetCursor = targetLines.skipSpaces( - mapping.targetLoc.start - ) || targetLines.lastPos(); +def("DoExpression") + .bases("Expression") + .build("body") + .field("body", [def("Statement")]); - while (comparePos(sourceCursor, mapping.sourceLoc.end) < 0 && - comparePos(targetCursor, mapping.targetLoc.end) < 0) { +def("Super") + .bases("Expression") + .build(); - var sourceChar = mapping.sourceLines.charAt(sourceCursor); - var targetChar = targetLines.charAt(targetCursor); - assert.strictEqual(sourceChar, targetChar); +def("BindExpression") + .bases("Expression") + .build("object", "callee") + .field("object", or(def("Expression"), null)) + .field("callee", def("Expression")); - var sourceName = mapping.sourceLines.name; +def("Decorator") + .bases("Node") + .build("expression") + .field("expression", def("Expression")); - // Add mappings one character at a time for maximum resolution. - smg.addMapping({ - source: sourceName, - original: { line: sourceCursor.line, - column: sourceCursor.column }, - generated: { line: targetCursor.line, - column: targetCursor.column } - }); +def("Property") + .field("decorators", + or([def("Decorator")], null), + defaults["null"]); - if (!hasOwn.call(sourcesToContents, sourceName)) { - var sourceContent = mapping.sourceLines.toString(); - smg.setSourceContent(sourceName, sourceContent); - sourcesToContents[sourceName] = sourceContent; - } +def("MethodDefinition") + .field("decorators", + or([def("Decorator")], null), + defaults["null"]); - targetLines.nextPos(targetCursor, true); - mapping.sourceLines.nextPos(sourceCursor, true); - } - }); +def("MetaProperty") + .bases("Expression") + .build("meta", "property") + .field("meta", def("Identifier")) + .field("property", def("Identifier")); - secret.cachedSourceMap = smg; +def("ParenthesizedExpression") + .bases("Expression") + .build("expression") + .field("expression", def("Expression")); - return smg.toJSON(); -}; +def("ModuleSpecifier") + .bases("Specifier") + .field("local", def("Identifier")); -Lp.bootstrapCharAt = function(pos) { - assert.strictEqual(typeof pos, "object"); - assert.strictEqual(typeof pos.line, "number"); - assert.strictEqual(typeof pos.column, "number"); +def("ImportSpecifier") + .bases("ModuleSpecifier") + .build("imported", "local") + .field("imported", def("Identifier")); - var line = pos.line, - column = pos.column, - strings = this.toString().split("\n"), - string = strings[line - 1]; +def("ImportDefaultSpecifier") + .bases("ModuleSpecifier") + .build("local"); - if (typeof string === "undefined") - return ""; +def("ImportNamespaceSpecifier") + .bases("ModuleSpecifier") + .build("local"); - if (column === string.length && - line < strings.length) - return "\n"; +def("ExportDefaultDeclaration") + .bases("Declaration") + .build("declaration") + .field("declaration", or(def("Declaration"), def("Expression"))); - if (column >= string.length) - return ""; +def("ExportNamedDeclaration") + .bases("Declaration") + .build("declaration", "specifiers", "source") + .field("declaration", or(def("Declaration"), null)) + .field("specifiers", [def("ExportSpecifier")], defaults.emptyArray) + .field("source", or(def("Literal"), null), defaults["null"]); - return string.charAt(column); -}; +def("ExportSpecifier") + .bases("ModuleSpecifier") + .build("local", "exported") + .field("exported", def("Identifier")); -Lp.charAt = function(pos) { - assert.strictEqual(typeof pos, "object"); - assert.strictEqual(typeof pos.line, "number"); - assert.strictEqual(typeof pos.column, "number"); +def("ExportNamespaceSpecifier") + .bases("Specifier") + .build("exported") + .field("exported", def("Identifier")); - var line = pos.line, - column = pos.column, - secret = getSecret(this), - infos = secret.infos, - info = infos[line - 1], - c = column; +def("ExportDefaultSpecifier") + .bases("Specifier") + .build("exported") + .field("exported", def("Identifier")); - if (typeof info === "undefined" || c < 0) - return ""; +def("ExportAllDeclaration") + .bases("Declaration") + .build("exported", "source") + .field("exported", or(def("Identifier"), null)) + .field("source", def("Literal")); - var indent = this.getIndentAt(line); - if (c < indent) - return " "; +},{"../lib/shared":520,"../lib/types":521,"./es7":511}],508:[function(require,module,exports){ +var types = require("../lib/types"); +var Type = types.Type; +var def = Type.def; +var or = Type.or; +var shared = require("../lib/shared"); +var defaults = shared.defaults; +var geq = shared.geq; + +// Abstract supertype of all syntactic entities that are allowed to have a +// .loc field. +def("Printable") + .field("loc", or( + def("SourceLocation"), + null + ), defaults["null"], true); + +def("Node") + .bases("Printable") + .field("type", String) + .field("comments", or( + [def("Comment")], + null + ), defaults["null"], true); - c += info.sliceStart - indent; +def("SourceLocation") + .build("start", "end", "source") + .field("start", def("Position")) + .field("end", def("Position")) + .field("source", or(String, null), defaults["null"]); - if (c === info.sliceEnd && - line < this.length) - return "\n"; +def("Position") + .build("line", "column") + .field("line", geq(1)) + .field("column", geq(0)); - if (c >= info.sliceEnd) - return ""; +def("File") + .bases("Node") + .build("program") + .field("program", def("Program")); - return info.line.charAt(c); -}; +def("Program") + .bases("Node") + .build("body") + .field("body", [def("Statement")]); -Lp.stripMargin = function(width, skipFirstLine) { - if (width === 0) - return this; +def("Function") + .bases("Node") + .field("id", or(def("Identifier"), null), defaults["null"]) + .field("params", [def("Pattern")]) + .field("body", def("BlockStatement")); - assert.ok(width > 0, "negative margin: " + width); +def("Statement").bases("Node"); - if (skipFirstLine && this.length === 1) - return this; +// The empty .build() here means that an EmptyStatement can be constructed +// (i.e. it's not abstract) but that it needs no arguments. +def("EmptyStatement").bases("Statement").build(); - var secret = getSecret(this); +def("BlockStatement") + .bases("Statement") + .build("body") + .field("body", [def("Statement")]); - var lines = new Lines(secret.infos.map(function(info, i) { - if (info.line && (i > 0 || !skipFirstLine)) { - info = copyLineInfo(info); - info.indent = Math.max(0, info.indent - width); - } - return info; - })); +// TODO Figure out how to silently coerce Expressions to +// ExpressionStatements where a Statement was expected. +def("ExpressionStatement") + .bases("Statement") + .build("expression") + .field("expression", def("Expression")); - if (secret.mappings.length > 0) { - var newMappings = getSecret(lines).mappings; - assert.strictEqual(newMappings.length, 0); - secret.mappings.forEach(function(mapping) { - newMappings.push(mapping.indent(width, skipFirstLine, true)); - }); - } +def("IfStatement") + .bases("Statement") + .build("test", "consequent", "alternate") + .field("test", def("Expression")) + .field("consequent", def("Statement")) + .field("alternate", or(def("Statement"), null), defaults["null"]); - return lines; -}; +def("LabeledStatement") + .bases("Statement") + .build("label", "body") + .field("label", def("Identifier")) + .field("body", def("Statement")); -Lp.indent = function(by) { - if (by === 0) - return this; +def("BreakStatement") + .bases("Statement") + .build("label") + .field("label", or(def("Identifier"), null), defaults["null"]); - var secret = getSecret(this); +def("ContinueStatement") + .bases("Statement") + .build("label") + .field("label", or(def("Identifier"), null), defaults["null"]); - var lines = new Lines(secret.infos.map(function(info) { - if (info.line) { - info = copyLineInfo(info); - info.indent += by; - } - return info - })); +def("WithStatement") + .bases("Statement") + .build("object", "body") + .field("object", def("Expression")) + .field("body", def("Statement")); - if (secret.mappings.length > 0) { - var newMappings = getSecret(lines).mappings; - assert.strictEqual(newMappings.length, 0); - secret.mappings.forEach(function(mapping) { - newMappings.push(mapping.indent(by)); - }); - } +def("SwitchStatement") + .bases("Statement") + .build("discriminant", "cases", "lexical") + .field("discriminant", def("Expression")) + .field("cases", [def("SwitchCase")]) + .field("lexical", Boolean, defaults["false"]); - return lines; -}; +def("ReturnStatement") + .bases("Statement") + .build("argument") + .field("argument", or(def("Expression"), null)); -Lp.indentTail = function(by) { - if (by === 0) - return this; +def("ThrowStatement") + .bases("Statement") + .build("argument") + .field("argument", def("Expression")); - if (this.length < 2) - return this; +def("TryStatement") + .bases("Statement") + .build("block", "handler", "finalizer") + .field("block", def("BlockStatement")) + .field("handler", or(def("CatchClause"), null), function() { + return this.handlers && this.handlers[0] || null; + }) + .field("handlers", [def("CatchClause")], function() { + return this.handler ? [this.handler] : []; + }, true) // Indicates this field is hidden from eachField iteration. + .field("guardedHandlers", [def("CatchClause")], defaults.emptyArray) + .field("finalizer", or(def("BlockStatement"), null), defaults["null"]); - var secret = getSecret(this); +def("CatchClause") + .bases("Node") + .build("param", "guard", "body") + .field("param", def("Pattern")) + .field("guard", or(def("Expression"), null), defaults["null"]) + .field("body", def("BlockStatement")); - var lines = new Lines(secret.infos.map(function(info, i) { - if (i > 0 && info.line) { - info = copyLineInfo(info); - info.indent += by; - } +def("WhileStatement") + .bases("Statement") + .build("test", "body") + .field("test", def("Expression")) + .field("body", def("Statement")); - return info; - })); +def("DoWhileStatement") + .bases("Statement") + .build("body", "test") + .field("body", def("Statement")) + .field("test", def("Expression")); - if (secret.mappings.length > 0) { - var newMappings = getSecret(lines).mappings; - assert.strictEqual(newMappings.length, 0); - secret.mappings.forEach(function(mapping) { - newMappings.push(mapping.indent(by, true)); - }); - } +def("ForStatement") + .bases("Statement") + .build("init", "test", "update", "body") + .field("init", or( + def("VariableDeclaration"), + def("Expression"), + null)) + .field("test", or(def("Expression"), null)) + .field("update", or(def("Expression"), null)) + .field("body", def("Statement")); - return lines; -}; +def("ForInStatement") + .bases("Statement") + .build("left", "right", "body") + .field("left", or( + def("VariableDeclaration"), + def("Expression"))) + .field("right", def("Expression")) + .field("body", def("Statement")); -Lp.getIndentAt = function(line) { - assert.ok(line >= 1, "no line " + line + " (line numbers start from 1)"); - var secret = getSecret(this), - info = secret.infos[line - 1]; - return Math.max(info.indent, 0); -}; +def("DebuggerStatement").bases("Statement").build(); -Lp.guessTabWidth = function() { - var secret = getSecret(this); - if (hasOwn.call(secret, "cachedTabWidth")) { - return secret.cachedTabWidth; - } +def("Declaration").bases("Statement"); - var counts = []; // Sparse array. - var lastIndent = 0; +def("FunctionDeclaration") + .bases("Function", "Declaration") + .build("id", "params", "body") + .field("id", def("Identifier")); - for (var line = 1, last = this.length; line <= last; ++line) { - var info = secret.infos[line - 1]; - var sliced = info.line.slice(info.sliceStart, info.sliceEnd); +def("FunctionExpression") + .bases("Function", "Expression") + .build("id", "params", "body"); - // Whitespace-only lines don't tell us much about the likely tab - // width of this code. - if (isOnlyWhitespace(sliced)) { - continue; - } +def("VariableDeclaration") + .bases("Declaration") + .build("kind", "declarations") + .field("kind", or("var", "let", "const")) + .field("declarations", [def("VariableDeclarator")]); - var diff = Math.abs(info.indent - lastIndent); - counts[diff] = ~~counts[diff] + 1; - lastIndent = info.indent; - } +def("VariableDeclarator") + .bases("Node") + .build("id", "init") + .field("id", def("Pattern")) + .field("init", or(def("Expression"), null)); - var maxCount = -1; - var result = 2; +// TODO Are all Expressions really Patterns? +def("Expression").bases("Node", "Pattern"); - for (var tabWidth = 1; - tabWidth < counts.length; - tabWidth += 1) { - if (hasOwn.call(counts, tabWidth) && - counts[tabWidth] > maxCount) { - maxCount = counts[tabWidth]; - result = tabWidth; - } - } +def("ThisExpression").bases("Expression").build(); - return secret.cachedTabWidth = result; -}; +def("ArrayExpression") + .bases("Expression") + .build("elements") + .field("elements", [or(def("Expression"), null)]); -Lp.isOnlyWhitespace = function() { - return isOnlyWhitespace(this.toString()); -}; +def("ObjectExpression") + .bases("Expression") + .build("properties") + .field("properties", [def("Property")]); -Lp.isPrecededOnlyByWhitespace = function(pos) { - var secret = getSecret(this); - var info = secret.infos[pos.line - 1]; - var indent = Math.max(info.indent, 0); +// TODO Not in the Mozilla Parser API, but used by Esprima. +def("Property") + .bases("Node") // Want to be able to visit Property Nodes. + .build("kind", "key", "value") + .field("kind", or("init", "get", "set")) + .field("key", or(def("Literal"), def("Identifier"))) + .field("value", def("Expression")); - var diff = pos.column - indent; - if (diff <= 0) { - // If pos.column does not exceed the indentation amount, then - // there must be only whitespace before it. - return true; - } +def("SequenceExpression") + .bases("Expression") + .build("expressions") + .field("expressions", [def("Expression")]); - var start = info.sliceStart; - var end = Math.min(start + diff, info.sliceEnd); - var prefix = info.line.slice(start, end); +var UnaryOperator = or( + "-", "+", "!", "~", + "typeof", "void", "delete"); - return isOnlyWhitespace(prefix); -}; +def("UnaryExpression") + .bases("Expression") + .build("operator", "argument", "prefix") + .field("operator", UnaryOperator) + .field("argument", def("Expression")) + // Esprima doesn't bother with this field, presumably because it's + // always true for unary operators. + .field("prefix", Boolean, defaults["true"]); -Lp.getLineLength = function(line) { - var secret = getSecret(this), - info = secret.infos[line - 1]; - return this.getIndentAt(line) + info.sliceEnd - info.sliceStart; -}; +var BinaryOperator = or( + "==", "!=", "===", "!==", + "<", "<=", ">", ">=", + "<<", ">>", ">>>", + "+", "-", "*", "/", "%", + "&", // TODO Missing from the Parser API. + "|", "^", "in", + "instanceof", ".."); -Lp.nextPos = function(pos, skipSpaces) { - var l = Math.max(pos.line, 0), - c = Math.max(pos.column, 0); +def("BinaryExpression") + .bases("Expression") + .build("operator", "left", "right") + .field("operator", BinaryOperator) + .field("left", def("Expression")) + .field("right", def("Expression")); - if (c < this.getLineLength(l)) { - pos.column += 1; +var AssignmentOperator = or( + "=", "+=", "-=", "*=", "/=", "%=", + "<<=", ">>=", ">>>=", + "|=", "^=", "&="); - return skipSpaces - ? !!this.skipSpaces(pos, false, true) - : true; - } +def("AssignmentExpression") + .bases("Expression") + .build("operator", "left", "right") + .field("operator", AssignmentOperator) + .field("left", def("Pattern")) + .field("right", def("Expression")); - if (l < this.length) { - pos.line += 1; - pos.column = 0; +var UpdateOperator = or("++", "--"); - return skipSpaces - ? !!this.skipSpaces(pos, false, true) - : true; - } +def("UpdateExpression") + .bases("Expression") + .build("operator", "argument", "prefix") + .field("operator", UpdateOperator) + .field("argument", def("Expression")) + .field("prefix", Boolean); - return false; -}; +var LogicalOperator = or("||", "&&"); -Lp.prevPos = function(pos, skipSpaces) { - var l = pos.line, - c = pos.column; +def("LogicalExpression") + .bases("Expression") + .build("operator", "left", "right") + .field("operator", LogicalOperator) + .field("left", def("Expression")) + .field("right", def("Expression")); - if (c < 1) { - l -= 1; +def("ConditionalExpression") + .bases("Expression") + .build("test", "consequent", "alternate") + .field("test", def("Expression")) + .field("consequent", def("Expression")) + .field("alternate", def("Expression")); - if (l < 1) - return false; +def("NewExpression") + .bases("Expression") + .build("callee", "arguments") + .field("callee", def("Expression")) + // The Mozilla Parser API gives this type as [or(def("Expression"), + // null)], but null values don't really make sense at the call site. + // TODO Report this nonsense. + .field("arguments", [def("Expression")]); - c = this.getLineLength(l); +def("CallExpression") + .bases("Expression") + .build("callee", "arguments") + .field("callee", def("Expression")) + // See comment for NewExpression above. + .field("arguments", [def("Expression")]); - } else { - c = Math.min(c - 1, this.getLineLength(l)); - } +def("MemberExpression") + .bases("Expression") + .build("object", "property", "computed") + .field("object", def("Expression")) + .field("property", or(def("Identifier"), def("Expression"))) + .field("computed", Boolean, defaults["false"]); - pos.line = l; - pos.column = c; +def("Pattern").bases("Node"); - return skipSpaces - ? !!this.skipSpaces(pos, true, true) - : true; -}; +def("SwitchCase") + .bases("Node") + .build("test", "consequent") + .field("test", or(def("Expression"), null)) + .field("consequent", [def("Statement")]); -Lp.firstPos = function() { - // Trivial, but provided for completeness. - return { line: 1, column: 0 }; -}; +def("Identifier") + // But aren't Expressions and Patterns already Nodes? TODO Report this. + .bases("Node", "Expression", "Pattern") + .build("name") + .field("name", String); -Lp.lastPos = function() { - return { - line: this.length, - column: this.getLineLength(this.length) - }; -}; +def("Literal") + // But aren't Expressions already Nodes? TODO Report this. + .bases("Node", "Expression") + .build("value") + .field("value", or(String, Boolean, null, Number, RegExp)) + .field("regex", or({ + pattern: String, + flags: String + }, null), function() { + if (this.value instanceof RegExp) { + var flags = ""; -Lp.skipSpaces = function(pos, backward, modifyInPlace) { - if (pos) { - pos = modifyInPlace ? pos : { - line: pos.line, - column: pos.column - }; - } else if (backward) { - pos = this.lastPos(); - } else { - pos = this.firstPos(); - } + if (this.value.ignoreCase) flags += "i"; + if (this.value.multiline) flags += "m"; + if (this.value.global) flags += "g"; - if (backward) { - while (this.prevPos(pos)) { - if (!isOnlyWhitespace(this.charAt(pos)) && - this.nextPos(pos)) { - return pos; - } + return { + pattern: this.value.source, + flags: flags + }; } return null; + }); - } else { - while (isOnlyWhitespace(this.charAt(pos))) { - if (!this.nextPos(pos)) { - return null; - } - } - - return pos; - } -}; +// Abstract (non-buildable) comment supertype. Not a Node. +def("Comment") + .bases("Printable") + .field("value", String) + // A .leading comment comes before the node, whereas a .trailing + // comment comes after it. These two fields should not both be true, + // but they might both be false when the comment falls inside a node + // and the node has no children for the comment to lead or trail, + // e.g. { /*dangling*/ }. + .field("leading", Boolean, defaults["true"]) + .field("trailing", Boolean, defaults["false"]); -Lp.trimLeft = function() { - var pos = this.skipSpaces(this.firstPos(), false, true); - return pos ? this.slice(pos) : emptyLines; -}; +// Block comment. The .type really should be BlockComment rather than +// Block, but that's what we're stuck with for now. +def("Block") + .bases("Comment") + .build("value", /*optional:*/ "leading", "trailing"); -Lp.trimRight = function() { - var pos = this.skipSpaces(this.lastPos(), true, true); - return pos ? this.slice(this.firstPos(), pos) : emptyLines; -}; +// Single line comment. The .type really should be LineComment rather than +// Line, but that's what we're stuck with for now. +def("Line") + .bases("Comment") + .build("value", /*optional:*/ "leading", "trailing"); -Lp.trim = function() { - var start = this.skipSpaces(this.firstPos(), false, true); - if (start === null) - return emptyLines; +},{"../lib/shared":520,"../lib/types":521}],509:[function(require,module,exports){ +require("./core"); +var types = require("../lib/types"); +var def = types.Type.def; +var or = types.Type.or; - var end = this.skipSpaces(this.lastPos(), true, true); - assert.notStrictEqual(end, null); +// Note that none of these types are buildable because the Mozilla Parser +// API doesn't specify any builder functions, and nobody uses E4X anymore. - return this.slice(start, end); -}; +def("XMLDefaultDeclaration") + .bases("Declaration") + .field("namespace", def("Expression")); -Lp.eachPos = function(callback, startPos, skipSpaces) { - var pos = this.firstPos(); +def("XMLAnyName").bases("Expression"); - if (startPos) { - pos.line = startPos.line, - pos.column = startPos.column - } +def("XMLQualifiedIdentifier") + .bases("Expression") + .field("left", or(def("Identifier"), def("XMLAnyName"))) + .field("right", or(def("Identifier"), def("Expression"))) + .field("computed", Boolean); - if (skipSpaces && !this.skipSpaces(pos, false, true)) { - return; // Encountered nothing but spaces. - } +def("XMLFunctionQualifiedIdentifier") + .bases("Expression") + .field("right", or(def("Identifier"), def("Expression"))) + .field("computed", Boolean); - do callback.call(this, pos); - while (this.nextPos(pos, skipSpaces)); -}; +def("XMLAttributeSelector") + .bases("Expression") + .field("attribute", def("Expression")); -Lp.bootstrapSlice = function(start, end) { - var strings = this.toString().split("\n").slice( - start.line - 1, end.line); +def("XMLFilterExpression") + .bases("Expression") + .field("left", def("Expression")) + .field("right", def("Expression")); - strings.push(strings.pop().slice(0, end.column)); - strings[0] = strings[0].slice(start.column); +def("XMLElement") + .bases("XML", "Expression") + .field("contents", [def("XML")]); - return fromString(strings.join("\n")); -}; +def("XMLList") + .bases("XML", "Expression") + .field("contents", [def("XML")]); -Lp.slice = function(start, end) { - if (!end) { - if (!start) { - // The client seems to want a copy of this Lines object, but - // Lines objects are immutable, so it's perfectly adequate to - // return the same object. - return this; - } +def("XML").bases("Node"); - // Slice to the end if no end position was provided. - end = this.lastPos(); - } +def("XMLEscape") + .bases("XML") + .field("expression", def("Expression")); - var secret = getSecret(this); - var sliced = secret.infos.slice(start.line - 1, end.line); +def("XMLText") + .bases("XML") + .field("text", String); - if (start.line === end.line) { - sliced[0] = sliceInfo(sliced[0], start.column, end.column); - } else { - assert.ok(start.line < end.line); - sliced[0] = sliceInfo(sliced[0], start.column); - sliced.push(sliceInfo(sliced.pop(), 0, end.column)); - } +def("XMLStartTag") + .bases("XML") + .field("contents", [def("XML")]); - var lines = new Lines(sliced); +def("XMLEndTag") + .bases("XML") + .field("contents", [def("XML")]); - if (secret.mappings.length > 0) { - var newMappings = getSecret(lines).mappings; - assert.strictEqual(newMappings.length, 0); - secret.mappings.forEach(function(mapping) { - var sliced = mapping.slice(this, start, end); - if (sliced) { - newMappings.push(sliced); - } - }, this); - } +def("XMLPointTag") + .bases("XML") + .field("contents", [def("XML")]); - return lines; -}; +def("XMLName") + .bases("XML") + .field("contents", or(String, [def("XML")])); -function sliceInfo(info, startCol, endCol) { - var sliceStart = info.sliceStart; - var sliceEnd = info.sliceEnd; - var indent = Math.max(info.indent, 0); - var lineLength = indent + sliceEnd - sliceStart; +def("XMLAttribute") + .bases("XML") + .field("value", String); - if (typeof endCol === "undefined") { - endCol = lineLength; - } +def("XMLCdata") + .bases("XML") + .field("contents", String); - startCol = Math.max(startCol, 0); - endCol = Math.min(endCol, lineLength); - endCol = Math.max(endCol, startCol); +def("XMLComment") + .bases("XML") + .field("contents", String); - if (endCol < indent) { - indent = endCol; - sliceEnd = sliceStart; - } else { - sliceEnd -= lineLength - endCol; - } +def("XMLProcessingInstruction") + .bases("XML") + .field("target", String) + .field("contents", or(String, null)); - lineLength = endCol; - lineLength -= startCol; +},{"../lib/types":521,"./core":508}],510:[function(require,module,exports){ +require("./core"); +var types = require("../lib/types"); +var def = types.Type.def; +var or = types.Type.or; +var defaults = require("../lib/shared").defaults; - if (startCol < indent) { - indent -= startCol; - } else { - startCol -= indent; - indent = 0; - sliceStart += startCol; - } +def("Function") + .field("generator", Boolean, defaults["false"]) + .field("expression", Boolean, defaults["false"]) + .field("defaults", [or(def("Expression"), null)], defaults.emptyArray) + // TODO This could be represented as a RestElement in .params. + .field("rest", or(def("Identifier"), null), defaults["null"]); - assert.ok(indent >= 0); - assert.ok(sliceStart <= sliceEnd); - assert.strictEqual(lineLength, indent + sliceEnd - sliceStart); +// The ESTree way of representing a ...rest parameter. +def("RestElement") + .bases("Pattern") + .build("argument") + .field("argument", def("Pattern")); - if (info.indent === indent && - info.sliceStart === sliceStart && - info.sliceEnd === sliceEnd) { - return info; - } +def("SpreadElementPattern") + .bases("Pattern") + .build("argument") + .field("argument", def("Pattern")); - return { - line: info.line, - indent: indent, - sliceStart: sliceStart, - sliceEnd: sliceEnd - }; -} +def("FunctionDeclaration") + .build("id", "params", "body", "generator", "expression"); -Lp.bootstrapSliceString = function(start, end, options) { - return this.slice(start, end).toString(options); -}; +def("FunctionExpression") + .build("id", "params", "body", "generator", "expression"); -Lp.sliceString = function(start, end, options) { - if (!end) { - if (!start) { - // The client seems to want a copy of this Lines object, but - // Lines objects are immutable, so it's perfectly adequate to - // return the same object. - return this; - } +// The Parser API calls this ArrowExpression, but Esprima and all other +// actual parsers use ArrowFunctionExpression. +def("ArrowFunctionExpression") + .bases("Function", "Expression") + .build("params", "body", "expression") + // The forced null value here is compatible with the overridden + // definition of the "id" field in the Function interface. + .field("id", null, defaults["null"]) + // Arrow function bodies are allowed to be expressions. + .field("body", or(def("BlockStatement"), def("Expression"))) + // The current spec forbids arrow generators, so I have taken the + // liberty of enforcing that. TODO Report this. + .field("generator", false, defaults["false"]); - // Slice to the end if no end position was provided. - end = this.lastPos(); - } +def("YieldExpression") + .bases("Expression") + .build("argument", "delegate") + .field("argument", or(def("Expression"), null)) + .field("delegate", Boolean, defaults["false"]); - options = normalizeOptions(options); +def("GeneratorExpression") + .bases("Expression") + .build("body", "blocks", "filter") + .field("body", def("Expression")) + .field("blocks", [def("ComprehensionBlock")]) + .field("filter", or(def("Expression"), null)); - var infos = getSecret(this).infos; - var parts = []; - var tabWidth = options.tabWidth; +def("ComprehensionExpression") + .bases("Expression") + .build("body", "blocks", "filter") + .field("body", def("Expression")) + .field("blocks", [def("ComprehensionBlock")]) + .field("filter", or(def("Expression"), null)); - for (var line = start.line; line <= end.line; ++line) { - var info = infos[line - 1]; +def("ComprehensionBlock") + .bases("Node") + .build("left", "right", "each") + .field("left", def("Pattern")) + .field("right", def("Expression")) + .field("each", Boolean); - if (line === start.line) { - if (line === end.line) { - info = sliceInfo(info, start.column, end.column); - } else { - info = sliceInfo(info, start.column); - } - } else if (line === end.line) { - info = sliceInfo(info, 0, end.column); - } +def("Property") + .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) + .field("value", or(def("Expression"), def("Pattern"))) + .field("method", Boolean, defaults["false"]) + .field("shorthand", Boolean, defaults["false"]) + .field("computed", Boolean, defaults["false"]); - var indent = Math.max(info.indent, 0); +def("PropertyPattern") + .bases("Pattern") + .build("key", "pattern") + .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) + .field("pattern", def("Pattern")) + .field("computed", Boolean, defaults["false"]); - var before = info.line.slice(0, info.sliceStart); - if (options.reuseWhitespace && - isOnlyWhitespace(before) && - countSpaces(before, options.tabWidth) === indent) { - // Reuse original spaces if the indentation is correct. - parts.push(info.line.slice(0, info.sliceEnd)); - continue; - } +def("ObjectPattern") + .bases("Pattern") + .build("properties") + .field("properties", [or(def("PropertyPattern"), def("Property"))]); - var tabs = 0; - var spaces = indent; +def("ArrayPattern") + .bases("Pattern") + .build("elements") + .field("elements", [or(def("Pattern"), null)]); - if (options.useTabs) { - tabs = Math.floor(indent / tabWidth); - spaces -= tabs * tabWidth; - } +def("MethodDefinition") + .bases("Declaration") + .build("kind", "key", "value", "static") + .field("kind", or("constructor", "method", "get", "set")) + .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) + .field("value", def("Function")) + .field("computed", Boolean, defaults["false"]) + .field("static", Boolean, defaults["false"]); - var result = ""; +def("SpreadElement") + .bases("Node") + .build("argument") + .field("argument", def("Expression")); - if (tabs > 0) { - result += new Array(tabs + 1).join("\t"); - } +def("ArrayExpression") + .field("elements", [or(def("Expression"), def("SpreadElement"), null)]); - if (spaces > 0) { - result += new Array(spaces + 1).join(" "); - } +def("NewExpression") + .field("arguments", [or(def("Expression"), def("SpreadElement"))]); - result += info.line.slice(info.sliceStart, info.sliceEnd); +def("CallExpression") + .field("arguments", [or(def("Expression"), def("SpreadElement"))]); - parts.push(result); - } +// Note: this node type is *not* an AssignmentExpression with a Pattern on +// the left-hand side! The existing AssignmentExpression type already +// supports destructuring assignments. AssignmentPattern nodes may appear +// wherever a Pattern is allowed, and the right-hand side represents a +// default value to be destructured against the left-hand side, if no +// value is otherwise provided. For example: default parameter values. +def("AssignmentPattern") + .bases("Pattern") + .build("left", "right") + .field("left", def("Pattern")) + .field("right", def("Expression")); - return parts.join("\n"); -}; +var ClassBodyElement = or( + def("MethodDefinition"), + def("VariableDeclarator"), + def("ClassPropertyDefinition"), + def("ClassProperty") +); -Lp.isEmpty = function() { - return this.length < 2 && this.getLineLength(1) < 1; -}; +def("ClassProperty") + .bases("Declaration") + .build("key") + .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) + .field("computed", Boolean, defaults["false"]); -Lp.join = function(elements) { - var separator = this; - var separatorSecret = getSecret(separator); - var infos = []; - var mappings = []; - var prevInfo; +def("ClassPropertyDefinition") // static property + .bases("Declaration") + .build("definition") + // Yes, Virginia, circular definitions are permitted. + .field("definition", ClassBodyElement); - function appendSecret(secret) { - if (secret === null) - return; +def("ClassBody") + .bases("Declaration") + .build("body") + .field("body", [ClassBodyElement]); - if (prevInfo) { - var info = secret.infos[0]; - var indent = new Array(info.indent + 1).join(" "); - var prevLine = infos.length; - var prevColumn = Math.max(prevInfo.indent, 0) + - prevInfo.sliceEnd - prevInfo.sliceStart; +def("ClassDeclaration") + .bases("Declaration") + .build("id", "body", "superClass") + .field("id", or(def("Identifier"), null)) + .field("body", def("ClassBody")) + .field("superClass", or(def("Expression"), null), defaults["null"]); - prevInfo.line = prevInfo.line.slice( - 0, prevInfo.sliceEnd) + indent + info.line.slice( - info.sliceStart, info.sliceEnd); +def("ClassExpression") + .bases("Expression") + .build("id", "body", "superClass") + .field("id", or(def("Identifier"), null), defaults["null"]) + .field("body", def("ClassBody")) + .field("superClass", or(def("Expression"), null), defaults["null"]) + .field("implements", [def("ClassImplements")], defaults.emptyArray); - prevInfo.sliceEnd = prevInfo.line.length; +def("ClassImplements") + .bases("Node") + .build("id") + .field("id", def("Identifier")) + .field("superClass", or(def("Expression"), null), defaults["null"]); - if (secret.mappings.length > 0) { - secret.mappings.forEach(function(mapping) { - mappings.push(mapping.add(prevLine, prevColumn)); - }); - } +// Specifier and NamedSpecifier are abstract non-standard types that I +// introduced for definitional convenience. +def("Specifier").bases("Node"); - } else if (secret.mappings.length > 0) { - mappings.push.apply(mappings, secret.mappings); - } +def("TaggedTemplateExpression") + .bases("Expression") + .build("tag", "quasi") + .field("tag", def("Expression")) + .field("quasi", def("TemplateLiteral")); - secret.infos.forEach(function(info, i) { - if (!prevInfo || i > 0) { - prevInfo = copyLineInfo(info); - infos.push(prevInfo); - } - }); - } +def("TemplateLiteral") + .bases("Expression") + .build("quasis", "expressions") + .field("quasis", [def("TemplateElement")]) + .field("expressions", [def("Expression")]); - function appendWithSeparator(secret, i) { - if (i > 0) - appendSecret(separatorSecret); - appendSecret(secret); - } +def("TemplateElement") + .bases("Node") + .build("value", "tail") + .field("value", {"cooked": String, "raw": String}) + .field("tail", Boolean); - elements.map(function(elem) { - var lines = fromString(elem); - if (lines.isEmpty()) - return null; - return getSecret(lines); - }).forEach(separator.isEmpty() - ? appendSecret - : appendWithSeparator); +},{"../lib/shared":520,"../lib/types":521,"./core":508}],511:[function(require,module,exports){ +require("./es6"); - if (infos.length < 1) - return emptyLines; +var types = require("../lib/types"); +var def = types.Type.def; +var or = types.Type.or; +var builtin = types.builtInTypes; +var defaults = require("../lib/shared").defaults; - var lines = new Lines(infos); +def("Function") + .field("async", Boolean, defaults["false"]); - getSecret(lines).mappings = mappings; +def("SpreadProperty") + .bases("Node") + .build("argument") + .field("argument", def("Expression")); - return lines; -}; +def("ObjectExpression") + .field("properties", [or(def("Property"), def("SpreadProperty"))]); -exports.concat = function(elements) { - return emptyLines.join(elements); -}; +def("SpreadPropertyPattern") + .bases("Pattern") + .build("argument") + .field("argument", def("Pattern")); -Lp.concat = function(other) { - var args = arguments, - list = [this]; - list.push.apply(list, args); - assert.strictEqual(list.length, args.length + 1); - return emptyLines.join(list); -}; +def("ObjectPattern") + .field("properties", [or( + def("Property"), + def("PropertyPattern"), + def("SpreadPropertyPattern") + )]); -// The emptyLines object needs to be created all the way down here so that -// Lines.prototype will be fully populated. -var emptyLines = fromString(""); +def("AwaitExpression") + .bases("Expression") + .build("argument", "all") + .field("argument", or(def("Expression"), null)) + .field("all", Boolean, defaults["false"]); -},{"./mapping":509,"./options":510,"./types":514,"./util":515,"assert":213,"private":484,"source-map":530}],509:[function(require,module,exports){ -var assert = require("assert"); -var types = require("./types"); -var isString = types.builtInTypes.string; -var isNumber = types.builtInTypes.number; -var SourceLocation = types.namedTypes.SourceLocation; -var Position = types.namedTypes.Position; -var linesModule = require("./lines"); -var comparePos = require("./util").comparePos; +},{"../lib/shared":520,"../lib/types":521,"./es6":510}],512:[function(require,module,exports){ +require("./es7"); -function Mapping(sourceLines, sourceLoc, targetLoc) { - assert.ok(this instanceof Mapping); - assert.ok(sourceLines instanceof linesModule.Lines); - SourceLocation.assert(sourceLoc); +var types = require("../lib/types"); +var defaults = require("../lib/shared").defaults; +var def = types.Type.def; +var or = types.Type.or; - if (targetLoc) { - // In certain cases it's possible for targetLoc.{start,end}.column - // values to be negative, which technically makes them no longer - // valid SourceLocation nodes, so we need to be more forgiving. - assert.ok( - isNumber.check(targetLoc.start.line) && - isNumber.check(targetLoc.start.column) && - isNumber.check(targetLoc.end.line) && - isNumber.check(targetLoc.end.column) - ); - } else { - // Assume identity mapping if no targetLoc specified. - targetLoc = sourceLoc; - } +def("VariableDeclaration") + .field("declarations", [or( + def("VariableDeclarator"), + def("Identifier") // Esprima deviation. + )]); - Object.defineProperties(this, { - sourceLines: { value: sourceLines }, - sourceLoc: { value: sourceLoc }, - targetLoc: { value: targetLoc } - }); -} +def("Property") + .field("value", or( + def("Expression"), + def("Pattern") // Esprima deviation. + )); -var Mp = Mapping.prototype; -module.exports = Mapping; +def("ArrayPattern") + .field("elements", [or( + def("Pattern"), + def("SpreadElement"), + null + )]); -Mp.slice = function(lines, start, end) { - assert.ok(lines instanceof linesModule.Lines); - Position.assert(start); +def("ObjectPattern") + .field("properties", [or( + def("Property"), + def("PropertyPattern"), + def("SpreadPropertyPattern"), + def("SpreadProperty") // Used by Esprima. + )]); - if (end) { - Position.assert(end); - } else { - end = lines.lastPos(); - } +def("NamedSpecifier") + .bases("Specifier") + // Note: this abstract type is intentionally not buildable. + .field("id", def("Identifier")) + .field("name", or(def("Identifier"), null), defaults["null"]); - var sourceLines = this.sourceLines; - var sourceLoc = this.sourceLoc; - var targetLoc = this.targetLoc; +// Like NamedSpecifier, except type:"ExportSpecifier" and buildable. +// export {} [from ...]; +def("ExportSpecifier") + .bases("NamedSpecifier") + .build("id", "name"); - function skip(name) { - var sourceFromPos = sourceLoc[name]; - var targetFromPos = targetLoc[name]; - var targetToPos = start; +// export <*> from ...; +def("ExportBatchSpecifier") + .bases("Specifier") + .build(); - if (name === "end") { - targetToPos = end; - } else { - assert.strictEqual(name, "start"); - } +// Like NamedSpecifier, except type:"ImportSpecifier" and buildable. +// import {} from ...; +def("ImportSpecifier") + .bases("NamedSpecifier") + .build("id", "name"); + +// import <* as id> from ...; +def("ImportNamespaceSpecifier") + .bases("Specifier") + .build("id") + .field("id", def("Identifier")); - return skipChars( - sourceLines, sourceFromPos, - lines, targetFromPos, targetToPos - ); - } +// import from ...; +def("ImportDefaultSpecifier") + .bases("Specifier") + .build("id") + .field("id", def("Identifier")); - if (comparePos(start, targetLoc.start) <= 0) { - if (comparePos(targetLoc.end, end) <= 0) { - targetLoc = { - start: subtractPos(targetLoc.start, start.line, start.column), - end: subtractPos(targetLoc.end, start.line, start.column) - }; +def("ExportDeclaration") + .bases("Declaration") + .build("default", "declaration", "specifiers", "source") + .field("default", Boolean) + .field("declaration", or( + def("Declaration"), + def("Expression"), // Implies default. + null + )) + .field("specifiers", [or( + def("ExportSpecifier"), + def("ExportBatchSpecifier") + )], defaults.emptyArray) + .field("source", or( + def("Literal"), + null + ), defaults["null"]); - // The sourceLoc can stay the same because the contents of the - // targetLoc have not changed. +def("ImportDeclaration") + .bases("Declaration") + .build("specifiers", "source") + .field("specifiers", [or( + def("ImportSpecifier"), + def("ImportNamespaceSpecifier"), + def("ImportDefaultSpecifier") + )], defaults.emptyArray) + .field("source", def("Literal")); - } else if (comparePos(end, targetLoc.start) <= 0) { - return null; +},{"../lib/shared":520,"../lib/types":521,"./es7":511}],513:[function(require,module,exports){ +require("./es7"); - } else { - sourceLoc = { - start: sourceLoc.start, - end: skip("end") - }; +var types = require("../lib/types"); +var def = types.Type.def; +var or = types.Type.or; +var defaults = require("../lib/shared").defaults; - targetLoc = { - start: subtractPos(targetLoc.start, start.line, start.column), - end: subtractPos(end, start.line, start.column) - }; - } +def("JSXAttribute") + .bases("Node") + .build("name", "value") + .field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))) + .field("value", or( + def("Literal"), // attr="value" + def("JSXExpressionContainer"), // attr={value} + null // attr= or just attr + ), defaults["null"]); - } else { - if (comparePos(targetLoc.end, start) <= 0) { - return null; - } +def("JSXIdentifier") + .bases("Identifier") + .build("name") + .field("name", String); - if (comparePos(targetLoc.end, end) <= 0) { - sourceLoc = { - start: skip("start"), - end: sourceLoc.end - }; +def("JSXNamespacedName") + .bases("Node") + .build("namespace", "name") + .field("namespace", def("JSXIdentifier")) + .field("name", def("JSXIdentifier")); - targetLoc = { - // Same as subtractPos(start, start.line, start.column): - start: { line: 1, column: 0 }, - end: subtractPos(targetLoc.end, start.line, start.column) - }; +def("JSXMemberExpression") + .bases("MemberExpression") + .build("object", "property") + .field("object", or(def("JSXIdentifier"), def("JSXMemberExpression"))) + .field("property", def("JSXIdentifier")) + .field("computed", Boolean, defaults.false); - } else { - sourceLoc = { - start: skip("start"), - end: skip("end") - }; +var JSXElementName = or( + def("JSXIdentifier"), + def("JSXNamespacedName"), + def("JSXMemberExpression") +); - targetLoc = { - // Same as subtractPos(start, start.line, start.column): - start: { line: 1, column: 0 }, - end: subtractPos(end, start.line, start.column) - }; - } - } +def("JSXSpreadAttribute") + .bases("Node") + .build("argument") + .field("argument", def("Expression")); - return new Mapping(this.sourceLines, sourceLoc, targetLoc); -}; +var JSXAttributes = [or( + def("JSXAttribute"), + def("JSXSpreadAttribute") +)]; -Mp.add = function(line, column) { - return new Mapping(this.sourceLines, this.sourceLoc, { - start: addPos(this.targetLoc.start, line, column), - end: addPos(this.targetLoc.end, line, column) +def("JSXExpressionContainer") + .bases("Expression") + .build("expression") + .field("expression", def("Expression")); + +def("JSXElement") + .bases("Expression") + .build("openingElement", "closingElement", "children") + .field("openingElement", def("JSXOpeningElement")) + .field("closingElement", or(def("JSXClosingElement"), null), defaults["null"]) + .field("children", [or( + def("JSXElement"), + def("JSXExpressionContainer"), + def("JSXText"), + def("Literal") // TODO Esprima should return JSXText instead. + )], defaults.emptyArray) + .field("name", JSXElementName, function() { + // Little-known fact: the `this` object inside a default function + // is none other than the partially-built object itself, and any + // fields initialized directly from builder function arguments + // (like openingElement, closingElement, and children) are + // guaranteed to be available. + return this.openingElement.name; + }) + .field("selfClosing", Boolean, function() { + return this.openingElement.selfClosing; + }) + .field("attributes", JSXAttributes, function() { + return this.openingElement.attributes; }); -}; -function addPos(toPos, line, column) { - return { - line: toPos.line + line - 1, - column: (toPos.line === 1) - ? toPos.column + column - : toPos.column - }; -} +def("JSXOpeningElement") + .bases("Node") // TODO Does this make sense? Can't really be an JSXElement. + .build("name", "attributes", "selfClosing") + .field("name", JSXElementName) + .field("attributes", JSXAttributes, defaults.emptyArray) + .field("selfClosing", Boolean, defaults["false"]); -Mp.subtract = function(line, column) { - return new Mapping(this.sourceLines, this.sourceLoc, { - start: subtractPos(this.targetLoc.start, line, column), - end: subtractPos(this.targetLoc.end, line, column) - }); -}; +def("JSXClosingElement") + .bases("Node") // TODO Same concern. + .build("name") + .field("name", JSXElementName); -function subtractPos(fromPos, line, column) { - return { - line: fromPos.line - line + 1, - column: (fromPos.line === line) - ? fromPos.column - column - : fromPos.column - }; -} +def("JSXText") + .bases("Literal") + .build("value") + .field("value", String); -Mp.indent = function(by, skipFirstLine, noNegativeColumns) { - if (by === 0) { - return this; - } +def("JSXEmptyExpression").bases("Expression").build(); - var targetLoc = this.targetLoc; - var startLine = targetLoc.start.line; - var endLine = targetLoc.end.line; +// Type Annotations +def("Type").bases("Node"); - if (skipFirstLine && startLine === 1 && endLine === 1) { - return this; - } +def("AnyTypeAnnotation") + .bases("Type") + .build(); - targetLoc = { - start: targetLoc.start, - end: targetLoc.end - }; +def("MixedTypeAnnotation") + .bases("Type") + .build(); - if (!skipFirstLine || startLine > 1) { - var startColumn = targetLoc.start.column + by; - targetLoc.start = { - line: startLine, - column: noNegativeColumns - ? Math.max(0, startColumn) - : startColumn - }; - } +def("VoidTypeAnnotation") + .bases("Type") + .build(); - if (!skipFirstLine || endLine > 1) { - var endColumn = targetLoc.end.column + by; - targetLoc.end = { - line: endLine, - column: noNegativeColumns - ? Math.max(0, endColumn) - : endColumn - }; - } +def("NumberTypeAnnotation") + .bases("Type") + .build(); - return new Mapping(this.sourceLines, this.sourceLoc, targetLoc); -}; +def("NumberLiteralTypeAnnotation") + .bases("Type") + .build("value", "raw") + .field("value", Number) + .field("raw", String); -function skipChars( - sourceLines, sourceFromPos, - targetLines, targetFromPos, targetToPos -) { - assert.ok(sourceLines instanceof linesModule.Lines); - assert.ok(targetLines instanceof linesModule.Lines); - Position.assert(sourceFromPos); - Position.assert(targetFromPos); - Position.assert(targetToPos); +def("StringTypeAnnotation") + .bases("Type") + .build(); - var targetComparison = comparePos(targetFromPos, targetToPos); - if (targetComparison === 0) { - // Trivial case: no characters to skip. - return sourceFromPos; - } +def("StringLiteralTypeAnnotation") + .bases("Type") + .build("value", "raw") + .field("value", String) + .field("raw", String); - if (targetComparison < 0) { - // Skipping forward. +def("BooleanTypeAnnotation") + .bases("Type") + .build(); - var sourceCursor = sourceLines.skipSpaces(sourceFromPos); - var targetCursor = targetLines.skipSpaces(targetFromPos); +def("BooleanLiteralTypeAnnotation") + .bases("Type") + .build("value", "raw") + .field("value", Boolean) + .field("raw", String); - var lineDiff = targetToPos.line - targetCursor.line; - sourceCursor.line += lineDiff; - targetCursor.line += lineDiff; +def("TypeAnnotation") + .bases("Node") + .build("typeAnnotation") + .field("typeAnnotation", def("Type")); - if (lineDiff > 0) { - // If jumping to later lines, reset columns to the beginnings - // of those lines. - sourceCursor.column = 0; - targetCursor.column = 0; - } else { - assert.strictEqual(lineDiff, 0); - } +def("NullableTypeAnnotation") + .bases("Type") + .build("typeAnnotation") + .field("typeAnnotation", def("Type")); - while (comparePos(targetCursor, targetToPos) < 0 && - targetLines.nextPos(targetCursor, true)) { - assert.ok(sourceLines.nextPos(sourceCursor, true)); - assert.strictEqual( - sourceLines.charAt(sourceCursor), - targetLines.charAt(targetCursor) - ); - } +def("FunctionTypeAnnotation") + .bases("Type") + .build("params", "returnType", "rest", "typeParameters") + .field("params", [def("FunctionTypeParam")]) + .field("returnType", def("Type")) + .field("rest", or(def("FunctionTypeParam"), null)) + .field("typeParameters", or(def("TypeParameterDeclaration"), null)); - } else { - // Skipping backward. +def("FunctionTypeParam") + .bases("Node") + .build("name", "typeAnnotation", "optional") + .field("name", def("Identifier")) + .field("typeAnnotation", def("Type")) + .field("optional", Boolean); - var sourceCursor = sourceLines.skipSpaces(sourceFromPos, true); - var targetCursor = targetLines.skipSpaces(targetFromPos, true); +def("ArrayTypeAnnotation") + .bases("Type") + .build("elementType") + .field("elementType", def("Type")); - var lineDiff = targetToPos.line - targetCursor.line; - sourceCursor.line += lineDiff; - targetCursor.line += lineDiff; +def("ObjectTypeAnnotation") + .bases("Type") + .build("properties") + .field("properties", [def("ObjectTypeProperty")]) + .field("indexers", [def("ObjectTypeIndexer")], defaults.emptyArray) + .field("callProperties", + [def("ObjectTypeCallProperty")], + defaults.emptyArray); - if (lineDiff < 0) { - // If jumping to earlier lines, reset columns to the ends of - // those lines. - sourceCursor.column = sourceLines.getLineLength(sourceCursor.line); - targetCursor.column = targetLines.getLineLength(targetCursor.line); - } else { - assert.strictEqual(lineDiff, 0); - } +def("ObjectTypeProperty") + .bases("Node") + .build("key", "value", "optional") + .field("key", or(def("Literal"), def("Identifier"))) + .field("value", def("Type")) + .field("optional", Boolean); - while (comparePos(targetToPos, targetCursor) < 0 && - targetLines.prevPos(targetCursor, true)) { - assert.ok(sourceLines.prevPos(sourceCursor, true)); - assert.strictEqual( - sourceLines.charAt(sourceCursor), - targetLines.charAt(targetCursor) - ); - } - } +def("ObjectTypeIndexer") + .bases("Node") + .build("id", "key", "value") + .field("id", def("Identifier")) + .field("key", def("Type")) + .field("value", def("Type")); - return sourceCursor; -} +def("ObjectTypeCallProperty") + .bases("Node") + .build("value") + .field("value", def("FunctionTypeAnnotation")) + .field("static", Boolean, false); -},{"./lines":508,"./types":514,"./util":515,"assert":213}],510:[function(require,module,exports){ -var defaults = { - // If you want to use a different branch of esprima, or any other - // module that supports a .parse function, pass that module object to - // recast.parse as options.esprima. - esprima: require("esprima-fb"), +def("QualifiedTypeIdentifier") + .bases("Node") + .build("qualification", "id") + .field("qualification", + or(def("Identifier"), + def("QualifiedTypeIdentifier"))) + .field("id", def("Identifier")); - // Number of spaces the pretty-printer should use per tab for - // indentation. If you do not pass this option explicitly, it will be - // (quite reliably!) inferred from the original code. - tabWidth: 4, +def("GenericTypeAnnotation") + .bases("Type") + .build("id", "typeParameters") + .field("id", or(def("Identifier"), def("QualifiedTypeIdentifier"))) + .field("typeParameters", or(def("TypeParameterInstantiation"), null)); - // If you really want the pretty-printer to use tabs instead of - // spaces, make this option true. - useTabs: false, +def("MemberTypeAnnotation") + .bases("Type") + .build("object", "property") + .field("object", def("Identifier")) + .field("property", + or(def("MemberTypeAnnotation"), + def("GenericTypeAnnotation"))); - // The reprinting code leaves leading whitespace untouched unless it - // has to reindent a line, or you pass false for this option. - reuseWhitespace: true, +def("UnionTypeAnnotation") + .bases("Type") + .build("types") + .field("types", [def("Type")]); - // Some of the pretty-printer code (such as that for printing function - // parameter lists) makes a valiant attempt to prevent really long - // lines. You can adjust the limit by changing this option; however, - // there is no guarantee that line length will fit inside this limit. - wrapColumn: 74, // Aspirational for now. +def("IntersectionTypeAnnotation") + .bases("Type") + .build("types") + .field("types", [def("Type")]); - // Pass a string as options.sourceFileName to recast.parse to tell the - // reprinter to keep track of reused code so that it can construct a - // source map automatically. - sourceFileName: null, +def("TypeofTypeAnnotation") + .bases("Type") + .build("argument") + .field("argument", def("Type")); - // Pass a string as options.sourceMapName to recast.print, and - // (provided you passed options.sourceFileName earlier) the - // PrintResult of recast.print will have a .map property for the - // generated source map. - sourceMapName: null, +def("Identifier") + .field("typeAnnotation", or(def("TypeAnnotation"), null), defaults["null"]); - // If provided, this option will be passed along to the source map - // generator as a root directory for relative source file paths. - sourceRoot: null, +def("TypeParameterDeclaration") + .bases("Node") + .build("params") + .field("params", [def("Identifier")]); - // If you provide a source map that was generated from a previous call - // to recast.print as options.inputSourceMap, the old source map will - // be composed with the new source map. - inputSourceMap: null, +def("TypeParameterInstantiation") + .bases("Node") + .build("params") + .field("params", [def("Type")]); - // If you want esprima to generate .range information (recast only - // uses .loc internally), pass true for this option. - range: false, +def("Function") + .field("returnType", + or(def("TypeAnnotation"), null), + defaults["null"]) + .field("typeParameters", + or(def("TypeParameterDeclaration"), null), + defaults["null"]); - // If you want esprima not to throw exceptions when it encounters - // non-fatal errors, keep this option true. - tolerant: true, +def("ClassProperty") + .build("key", "typeAnnotation") + .field("typeAnnotation", def("TypeAnnotation")) + .field("static", Boolean, false); - // If you want to override the quotes used in string literals, specify - // either "single", "double", or "auto" here ("auto" will select the one - // which results in the shorter literal) - // Otherwise, the input marks will be preserved - quote: null, +def("ClassImplements") + .field("typeParameters", + or(def("TypeParameterInstantiation"), null), + defaults["null"]); - // If you want to print trailing commas in object literals, - // array expressions, functions calls and function definitions pass true - // for this option. - trailingComma: false, -}, hasOwn = defaults.hasOwnProperty; +def("InterfaceDeclaration") + .bases("Statement") + .build("id", "body", "extends") + .field("id", def("Identifier")) + .field("typeParameters", + or(def("TypeParameterDeclaration"), null), + defaults["null"]) + .field("body", def("ObjectTypeAnnotation")) + .field("extends", [def("InterfaceExtends")]); -// Copy options and fill in default values. -exports.normalize = function(options) { - options = options || defaults; +def("InterfaceExtends") + .bases("Node") + .build("id") + .field("id", def("Identifier")) + .field("typeParameters", or(def("TypeParameterInstantiation"), null)); - function get(key) { - return hasOwn.call(options, key) - ? options[key] - : defaults[key]; - } +def("TypeAlias") + .bases("Statement") + .build("id", "typeParameters", "right") + .field("id", def("Identifier")) + .field("typeParameters", or(def("TypeParameterDeclaration"), null)) + .field("right", def("Type")); - return { - tabWidth: +get("tabWidth"), - useTabs: !!get("useTabs"), - reuseWhitespace: !!get("reuseWhitespace"), - wrapColumn: Math.max(get("wrapColumn"), 0), - sourceFileName: get("sourceFileName"), - sourceMapName: get("sourceMapName"), - sourceRoot: get("sourceRoot"), - inputSourceMap: get("inputSourceMap"), - esprima: get("esprima"), - range: get("range"), - tolerant: get("tolerant"), - quote: get("quote"), - trailingComma: get("trailingComma"), - }; -}; +def("TypeCastExpression") + .bases("Expression") + .build("expression", "typeAnnotation") + .field("expression", def("Expression")) + .field("typeAnnotation", def("TypeAnnotation")); -},{"esprima-fb":212}],511:[function(require,module,exports){ -var assert = require("assert"); -var types = require("./types"); -var n = types.namedTypes; -var b = types.builders; -var isObject = types.builtInTypes.object; -var isArray = types.builtInTypes.array; -var isFunction = types.builtInTypes.function; -var Patcher = require("./patcher").Patcher; -var normalizeOptions = require("./options").normalize; -var fromString = require("./lines").fromString; -var attachComments = require("./comments").attach; -var util = require("./util"); +def("TupleTypeAnnotation") + .bases("Type") + .build("types") + .field("types", [def("Type")]); + +def("DeclareVariable") + .bases("Statement") + .build("id") + .field("id", def("Identifier")); -exports.parse = function parse(source, options) { - options = normalizeOptions(options); +def("DeclareFunction") + .bases("Statement") + .build("id") + .field("id", def("Identifier")); - var lines = fromString(source, options); +def("DeclareClass") + .bases("InterfaceDeclaration") + .build("id"); - var sourceWithoutTabs = lines.toString({ - tabWidth: options.tabWidth, - reuseWhitespace: false, - useTabs: false - }); +def("DeclareModule") + .bases("Statement") + .build("id", "body") + .field("id", or(def("Identifier"), def("Literal"))) + .field("body", def("BlockStatement")); - var program = options.esprima.parse(sourceWithoutTabs, { - loc: true, - range: options.range, - comment: true, - tolerant: options.tolerant, - sourceType: 'module' - }); +},{"../lib/shared":520,"../lib/types":521,"./es7":511}],514:[function(require,module,exports){ +require("./core"); +var types = require("../lib/types"); +var def = types.Type.def; +var or = types.Type.or; +var shared = require("../lib/shared"); +var geq = shared.geq; +var defaults = shared.defaults; - // Expand the Program node's .loc to include all comments, since - // typically its .loc.start and .loc.end will coincide with those of - // the first and last statements, respectively, excluding any comments - // that fall outside that region. - program.loc = util.getTrueLoc(program); +def("Function") + // SpiderMonkey allows expression closures: function(x) x+1 + .field("body", or(def("BlockStatement"), def("Expression"))); - var comments = program.comments; - delete program.comments; +def("ForInStatement") + .build("left", "right", "body", "each") + .field("each", Boolean, defaults["false"]); - // In order to ensure we reprint leading and trailing program - // comments, wrap the original Program node with a File node. - var file = b.file(program); - file.loc = { - lines: lines, - indent: 0, - start: lines.firstPos(), - end: lines.lastPos() - }; +def("ForOfStatement") + .bases("Statement") + .build("left", "right", "body") + .field("left", or( + def("VariableDeclaration"), + def("Expression"))) + .field("right", def("Expression")) + .field("body", def("Statement")); - // Passing file.program here instead of just file means that initial - // comments will be attached to program.body[0] instead of program. - attachComments( - comments, - program.body.length ? file.program : file, - lines - ); +def("LetStatement") + .bases("Statement") + .build("head", "body") + // TODO Deviating from the spec by reusing VariableDeclarator here. + .field("head", [def("VariableDeclarator")]) + .field("body", def("Statement")); - // Return a copy of the original AST so that any changes made may be - // compared to the original. - return new TreeCopier(lines).copy(file); -}; +def("LetExpression") + .bases("Expression") + .build("head", "body") + // TODO Deviating from the spec by reusing VariableDeclarator here. + .field("head", [def("VariableDeclarator")]) + .field("body", def("Expression")); -function TreeCopier(lines) { - assert.ok(this instanceof TreeCopier); - this.lines = lines; - this.indent = 0; -} +def("GraphExpression") + .bases("Expression") + .build("index", "expression") + .field("index", geq(0)) + .field("expression", def("Literal")); -var TCp = TreeCopier.prototype; +def("GraphIndexExpression") + .bases("Expression") + .build("index") + .field("index", geq(0)); -TCp.copy = function(node) { - if (isArray.check(node)) { - return node.map(this.copy, this); - } +},{"../lib/shared":520,"../lib/types":521,"./core":508}],515:[function(require,module,exports){ +var assert = require("assert"); +var types = require("../main"); +var getFieldNames = types.getFieldNames; +var getFieldValue = types.getFieldValue; +var isArray = types.builtInTypes.array; +var isObject = types.builtInTypes.object; +var isDate = types.builtInTypes.Date; +var isRegExp = types.builtInTypes.RegExp; +var hasOwn = Object.prototype.hasOwnProperty; - if (!isObject.check(node)) { - return node; +function astNodesAreEquivalent(a, b, problemPath) { + if (isArray.check(problemPath)) { + problemPath.length = 0; + } else { + problemPath = null; } - util.fixFaultyLocations(node); + return areEquivalent(a, b, problemPath); +} - var copy = Object.create(Object.getPrototypeOf(node), { - original: { // Provide a link from the copy to the original. - value: node, - configurable: false, - enumerable: false, - writable: true +astNodesAreEquivalent.assert = function(a, b) { + var problemPath = []; + if (!astNodesAreEquivalent(a, b, problemPath)) { + if (problemPath.length === 0) { + assert.strictEqual(a, b); + } else { + assert.ok( + false, + "Nodes differ in the following path: " + + problemPath.map(subscriptForProperty).join("") + ); } - }); + } +}; - var loc = node.loc; - var oldIndent = this.indent; - var newIndent = oldIndent; +function subscriptForProperty(property) { + if (/[_$a-z][_$a-z0-9]*/i.test(property)) { + return "." + property; + } + return "[" + JSON.stringify(property) + "]"; +} - if (loc) { - // When node is a comment, we set node.loc.indent to - // node.loc.start.column so that, when/if we print the comment by - // itself, we can strip that much whitespace from the left margin - // of the comment. This only really matters for multiline Block - // comments, but it doesn't hurt for Line comments. - if (node.type === "Block" || node.type === "Line" || - this.lines.isPrecededOnlyByWhitespace(loc.start)) { - newIndent = this.indent = loc.start.column; - } +function areEquivalent(a, b, problemPath) { + if (a === b) { + return true; + } - loc.lines = this.lines; - loc.indent = newIndent; + if (isArray.check(a)) { + return arraysAreEquivalent(a, b, problemPath); } - var keys = Object.keys(node); - var keyCount = keys.length; - for (var i = 0; i < keyCount; ++i) { - var key = keys[i]; - if (key === "loc") { - copy[key] = node[key]; - } else { - copy[key] = this.copy(node[key]); - } + if (isObject.check(a)) { + return objectsAreEquivalent(a, b, problemPath); } - this.indent = oldIndent; + if (isDate.check(a)) { + return isDate.check(b) && (+a === +b); + } - return copy; -}; + if (isRegExp.check(a)) { + return isRegExp.check(b) && ( + a.source === b.source && + a.global === b.global && + a.multiline === b.multiline && + a.ignoreCase === b.ignoreCase + ); + } -},{"./comments":506,"./lines":508,"./options":510,"./patcher":512,"./types":514,"./util":515,"assert":213}],512:[function(require,module,exports){ -var assert = require("assert"); -var linesModule = require("./lines"); -var types = require("./types"); -var getFieldValue = types.getFieldValue; -var Printable = types.namedTypes.Printable; -var Expression = types.namedTypes.Expression; -var SourceLocation = types.namedTypes.SourceLocation; -var util = require("./util"); -var comparePos = util.comparePos; -var FastPath = require("./fast-path"); -var isObject = types.builtInTypes.object; -var isArray = types.builtInTypes.array; -var isString = types.builtInTypes.string; -var riskyAdjoiningCharExp = /[0-9a-z_$]/i; + return a == b; +} -function Patcher(lines) { - assert.ok(this instanceof Patcher); - assert.ok(lines instanceof linesModule.Lines); +function arraysAreEquivalent(a, b, problemPath) { + isArray.assert(a); + var aLength = a.length; - var self = this, - replacements = []; + if (!isArray.check(b) || b.length !== aLength) { + if (problemPath) { + problemPath.push("length"); + } + return false; + } - self.replace = function(loc, lines) { - if (isString.check(lines)) - lines = linesModule.fromString(lines); + for (var i = 0; i < aLength; ++i) { + if (problemPath) { + problemPath.push(i); + } - replacements.push({ - lines: lines, - start: loc.start, - end: loc.end - }); - }; + if (i in a !== i in b) { + return false; + } - self.get = function(loc) { - // If no location is provided, return the complete Lines object. - loc = loc || { - start: { line: 1, column: 0 }, - end: { line: lines.length, - column: lines.getLineLength(lines.length) } - }; + if (!areEquivalent(a[i], b[i], problemPath)) { + return false; + } - var sliceFrom = loc.start, - toConcat = []; + if (problemPath) { + assert.strictEqual(problemPath.pop(), i); + } + } - function pushSlice(from, to) { - assert.ok(comparePos(from, to) <= 0); - toConcat.push(lines.slice(from, to)); + return true; +} + +function objectsAreEquivalent(a, b, problemPath) { + isObject.assert(a); + if (!isObject.check(b)) { + return false; + } + + // Fast path for a common property of AST nodes. + if (a.type !== b.type) { + if (problemPath) { + problemPath.push("type"); } + return false; + } - replacements.sort(function(a, b) { - return comparePos(a.start, b.start); - }).forEach(function(rep) { - if (comparePos(sliceFrom, rep.start) > 0) { - // Ignore nested replacement ranges. - } else { - pushSlice(sliceFrom, rep.start); - toConcat.push(rep.lines); - sliceFrom = rep.end; - } - }); + var aNames = getFieldNames(a); + var aNameCount = aNames.length; - pushSlice(sliceFrom, loc.end); + var bNames = getFieldNames(b); + var bNameCount = bNames.length; - return linesModule.concat(toConcat); - }; -} -exports.Patcher = Patcher; + if (aNameCount === bNameCount) { + for (var i = 0; i < aNameCount; ++i) { + var name = aNames[i]; + var aChild = getFieldValue(a, name); + var bChild = getFieldValue(b, name); -var Pp = Patcher.prototype; + if (problemPath) { + problemPath.push(name); + } -Pp.tryToReprintComments = function(newNode, oldNode, print) { - var patcher = this; + if (!areEquivalent(aChild, bChild, problemPath)) { + return false; + } + + if (problemPath) { + assert.strictEqual(problemPath.pop(), name); + } + } - if (!newNode.comments && - !oldNode.comments) { - // We were (vacuously) able to reprint all the comments! return true; } - var newPath = FastPath.from(newNode); - var oldPath = FastPath.from(oldNode); - - newPath.stack.push("comments", getSurroundingComments(newNode)); - oldPath.stack.push("comments", getSurroundingComments(oldNode)); + if (!problemPath) { + return false; + } - var reprints = []; - var ableToReprintComments = - findArrayReprints(newPath, oldPath, reprints); + // Since aNameCount !== bNameCount, we need to find some name that's + // missing in aNames but present in bNames, or vice-versa. - // No need to pop anything from newPath.stack or oldPath.stack, since - // newPath and oldPath are fresh local variables. + var seenNames = Object.create(null); - if (ableToReprintComments && reprints.length > 0) { - reprints.forEach(function(reprint) { - var oldComment = reprint.oldPath.getValue(); - assert.ok(oldComment.leading || oldComment.trailing); - patcher.replace( - oldComment.loc, - // Comments can't have .comments, so it doesn't matter - // whether we print with comments or without. - print(reprint.newPath).indentTail(oldComment.loc.indent) - ); - }); + for (i = 0; i < aNameCount; ++i) { + seenNames[aNames[i]] = true; } - return ableToReprintComments; -}; + for (i = 0; i < bNameCount; ++i) { + name = bNames[i]; -// Get all comments that are either leading or trailing, ignoring any -// comments that occur inside node.loc. Returns an empty array for nodes -// with no leading or trailing comments. -function getSurroundingComments(node) { - var result = []; - if (node.comments && - node.comments.length > 0) { - node.comments.forEach(function(comment) { - if (comment.leading || comment.trailing) { - result.push(comment); - } - }); - } - return result; -} + if (!hasOwn.call(seenNames, name)) { + problemPath.push(name); + return false; + } -Pp.deleteComments = function(node) { - if (!node.comments) { - return; + delete seenNames[name]; } - var patcher = this; + for (name in seenNames) { + problemPath.push(name); + break; + } - node.comments.forEach(function(comment) { - if (comment.leading) { - // Delete leading comments along with any trailing whitespace - // they might have. - patcher.replace({ - start: comment.loc.start, - end: node.loc.lines.skipSpaces( - comment.loc.end, false, false) - }, ""); + return false; +} - } else if (comment.trailing) { - // Delete trailing comments along with any leading whitespace - // they might have. - patcher.replace({ - start: node.loc.lines.skipSpaces( - comment.loc.start, true, false), - end: comment.loc.end - }, ""); - } - }); -}; +module.exports = astNodesAreEquivalent; -exports.getReprinter = function(path) { - assert.ok(path instanceof FastPath); +},{"../main":522,"assert":2}],516:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var n = types.namedTypes; +var b = types.builders; +var isNumber = types.builtInTypes.number; +var isArray = types.builtInTypes.array; +var Path = require("./path"); +var Scope = require("./scope"); - // Make sure that this path refers specifically to a Node, rather than - // some non-Node subproperty of a Node. - var node = path.getValue(); - if (!Printable.check(node)) - return; +function NodePath(value, parentPath, name) { + assert.ok(this instanceof NodePath); + Path.call(this, value, parentPath, name); +} - var orig = node.original; - var origLoc = orig && orig.loc; - var lines = origLoc && origLoc.lines; - var reprints = []; +require("util").inherits(NodePath, Path); +var NPp = NodePath.prototype; - if (!lines || !findReprints(path, reprints)) - return; +Object.defineProperties(NPp, { + node: { + get: function() { + Object.defineProperty(this, "node", { + configurable: true, // Enable deletion. + value: this._computeNode() + }); - return function(print) { - var patcher = new Patcher(lines); + return this.node; + } + }, - reprints.forEach(function(reprint) { - var newNode = reprint.newPath.getValue(); - var oldNode = reprint.oldPath.getValue(); + parent: { + get: function() { + Object.defineProperty(this, "parent", { + configurable: true, // Enable deletion. + value: this._computeParent() + }); - SourceLocation.assert(oldNode.loc, true); + return this.parent; + } + }, - var needToPrintNewPathWithComments = - !patcher.tryToReprintComments(newNode, oldNode, print) + scope: { + get: function() { + Object.defineProperty(this, "scope", { + configurable: true, // Enable deletion. + value: this._computeScope() + }); - if (needToPrintNewPathWithComments) { - // Since we were not able to preserve all leading/trailing - // comments, we delete oldNode's comments, print newPath - // with comments, and then patch the resulting lines where - // oldNode used to be. - patcher.deleteComments(oldNode); - } + return this.scope; + } + } +}); - var pos = util.copyPos(oldNode.loc.start); - var needsLeadingSpace = lines.prevPos(pos) && - riskyAdjoiningCharExp.test(lines.charAt(pos)); +NPp.replace = function() { + delete this.node; + delete this.parent; + delete this.scope; + return Path.prototype.replace.apply(this, arguments); +}; - var newLines = print( - reprint.newPath, - needToPrintNewPathWithComments - ).indentTail(oldNode.loc.indent); +NPp.prune = function() { + var remainingNodePath = this.parent; - var needsTrailingSpace = - riskyAdjoiningCharExp.test(lines.charAt(oldNode.loc.end)); + this.replace(); - // If we try to replace the argument of a ReturnStatement like - // return"asdf" with e.g. a literal null expression, we run - // the risk of ending up with returnnull, so we need to add an - // extra leading space in situations where that might - // happen. Likewise for "asdf"in obj. See #170. - if (needsLeadingSpace || needsTrailingSpace) { - var newParts = []; - needsLeadingSpace && newParts.push(" "); - newParts.push(newLines); - needsTrailingSpace && newParts.push(" "); - newLines = linesModule.concat(newParts); - } + return cleanUpNodesAfterPrune(remainingNodePath); +}; - patcher.replace(oldNode.loc, newLines); - }); +// The value of the first ancestor Path whose value is a Node. +NPp._computeNode = function() { + var value = this.value; + if (n.Node.check(value)) { + return value; + } - // Recall that origLoc is the .loc of an ancestor node that is - // guaranteed to contain all the reprinted nodes and comments. - return patcher.get(origLoc).indentTail(-orig.loc.indent); - }; + var pp = this.parentPath; + return pp && pp.node || null; }; -function findReprints(newPath, reprints) { - var newNode = newPath.getValue(); - Printable.assert(newNode); - - var oldNode = newNode.original; - Printable.assert(oldNode); +// The first ancestor Path whose value is a Node distinct from this.node. +NPp._computeParent = function() { + var value = this.value; + var pp = this.parentPath; - assert.deepEqual(reprints, []); + if (!n.Node.check(value)) { + while (pp && !n.Node.check(pp.value)) { + pp = pp.parentPath; + } - if (newNode.type !== oldNode.type) { - return false; + if (pp) { + pp = pp.parentPath; + } } - var oldPath = new FastPath(oldNode); - var canReprint = findChildReprints(newPath, oldPath, reprints); - - if (!canReprint) { - // Make absolutely sure the calling code does not attempt to reprint - // any nodes. - reprints.length = 0; + while (pp && !n.Node.check(pp.value)) { + pp = pp.parentPath; } - return canReprint; -} + return pp || null; +}; -function findAnyReprints(newPath, oldPath, reprints) { - var newNode = newPath.getValue(); - var oldNode = oldPath.getValue(); +// The closest enclosing scope that governs this node. +NPp._computeScope = function() { + var value = this.value; + var pp = this.parentPath; + var scope = pp && pp.scope; - if (newNode === oldNode) - return true; + if (n.Node.check(value) && + Scope.isEstablishedBy(value)) { + scope = new Scope(this, scope); + } - if (isArray.check(newNode)) - return findArrayReprints(newPath, oldPath, reprints); + return scope || null; +}; - if (isObject.check(newNode)) - return findObjectReprints(newPath, oldPath, reprints); +NPp.getValueProperty = function(name) { + return types.getFieldValue(this.value, name); +}; - return false; -} +/** + * Determine whether this.node needs to be wrapped in parentheses in order + * for a parser to reproduce the same local AST structure. + * + * For instance, in the expression `(1 + 2) * 3`, the BinaryExpression + * whose operator is "+" needs parentheses, because `1 + 2 * 3` would + * parse differently. + * + * If assumeExpressionContext === true, we don't worry about edge cases + * like an anonymous FunctionExpression appearing lexically first in its + * enclosing statement and thus needing parentheses to avoid being parsed + * as a FunctionDeclaration with a missing name. + */ +NPp.needsParens = function(assumeExpressionContext) { + var pp = this.parentPath; + if (!pp) { + return false; + } -function findArrayReprints(newPath, oldPath, reprints) { - var newNode = newPath.getValue(); - var oldNode = oldPath.getValue(); - isArray.assert(newNode); - var len = newNode.length; + var node = this.value; - if (!(isArray.check(oldNode) && - oldNode.length === len)) + // Only expressions need parentheses. + if (!n.Expression.check(node)) { return false; + } - for (var i = 0; i < len; ++i) { - newPath.stack.push(i, newNode[i]); - oldPath.stack.push(i, oldNode[i]); - var canReprint = findAnyReprints(newPath, oldPath, reprints); - newPath.stack.length -= 2; - oldPath.stack.length -= 2; - if (!canReprint) { + // Identifiers never need parentheses. + if (node.type === "Identifier") { + return false; + } + + while (!n.Node.check(pp.value)) { + pp = pp.parentPath; + if (!pp) { return false; } } - return true; -} + var parent = pp.value; -function findObjectReprints(newPath, oldPath, reprints) { - var newNode = newPath.getValue(); - isObject.assert(newNode); + switch (node.type) { + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + return parent.type === "MemberExpression" + && this.name === "object" + && parent.object === node; - if (newNode.original === null) { - // If newNode.original node was set to null, reprint the node. - return false; - } + case "BinaryExpression": + case "LogicalExpression": + switch (parent.type) { + case "CallExpression": + return this.name === "callee" + && parent.callee === node; - var oldNode = oldPath.getValue(); - if (!isObject.check(oldNode)) - return false; + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + return true; - if (Printable.check(newNode)) { - if (!Printable.check(oldNode)) { - return false; - } + case "MemberExpression": + return this.name === "object" + && parent.object === node; - // Here we need to decide whether the reprinted code for newNode - // is appropriate for patching into the location of oldNode. + case "BinaryExpression": + case "LogicalExpression": + var po = parent.operator; + var pp = PRECEDENCE[po]; + var no = node.operator; + var np = PRECEDENCE[no]; - if (newNode.type === oldNode.type) { - var childReprints = []; + if (pp > np) { + return true; + } - if (findChildReprints(newPath, oldPath, childReprints)) { - reprints.push.apply(reprints, childReprints); - } else if (oldNode.loc) { - // If we have no .loc information for oldNode, then we - // won't be able to reprint it. - reprints.push({ - oldPath: oldPath.copy(), - newPath: newPath.copy() - }); - } else { - return false; + if (pp === np && this.name === "right") { + assert.strictEqual(parent.right, node); + return true; } - return true; + default: + return false; } - if (Expression.check(newNode) && - Expression.check(oldNode) && - // If we have no .loc information for oldNode, then we won't - // be able to reprint it. - oldNode.loc) { + case "SequenceExpression": + switch (parent.type) { + case "ForStatement": + // Although parentheses wouldn't hurt around sequence + // expressions in the head of for loops, traditional style + // dictates that e.g. i++, j++ should not be wrapped with + // parentheses. + return false; - // If both nodes are subtypes of Expression, then we should be - // able to fill the location occupied by the old node with - // code printed for the new node with no ill consequences. - reprints.push({ - oldPath: oldPath.copy(), - newPath: newPath.copy() - }); + case "ExpressionStatement": + return this.name !== "expression"; + default: + // Otherwise err on the side of overparenthesization, adding + // explicit exceptions above if this proves overzealous. return true; } - // The nodes have different types, and at least one of the types - // is not a subtype of the Expression type, so we cannot safely - // assume the nodes are syntactically interchangeable. - return false; - } + case "YieldExpression": + switch (parent.type) { + case "BinaryExpression": + case "LogicalExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "CallExpression": + case "MemberExpression": + case "NewExpression": + case "ConditionalExpression": + case "YieldExpression": + return true; - return findChildReprints(newPath, oldPath, reprints); -} + default: + return false; + } -// This object is reused in hasOpeningParen and hasClosingParen to avoid -// having to allocate a temporary object. -var reusablePos = { line: 1, column: 0 }; -var nonSpaceExp = /\S/; + case "Literal": + return parent.type === "MemberExpression" + && isNumber.check(node.value) + && this.name === "object" + && parent.object === node; -function hasOpeningParen(oldPath) { - var oldNode = oldPath.getValue(); - var loc = oldNode.loc; - var lines = loc && loc.lines; + case "AssignmentExpression": + case "ConditionalExpression": + switch (parent.type) { + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + return true; - if (lines) { - var pos = reusablePos; - pos.line = loc.start.line; - pos.column = loc.start.column; + case "CallExpression": + return this.name === "callee" + && parent.callee === node; - while (lines.prevPos(pos)) { - var ch = lines.charAt(pos); + case "ConditionalExpression": + return this.name === "test" + && parent.test === node; - if (ch === "(") { - // If we found an opening parenthesis but it occurred before - // the start of the original subtree for this reprinting, then - // we must not return true for hasOpeningParen(oldPath). - return comparePos(oldPath.getRootValue().loc.start, pos) <= 0; - } + case "MemberExpression": + return this.name === "object" + && parent.object === node; - if (nonSpaceExp.test(ch)) { - return false; - } + default: + return false; + } + + default: + if (parent.type === "NewExpression" && + this.name === "callee" && + parent.callee === node) { + return containsCallExpression(node); } } + if (assumeExpressionContext !== true && + !this.canBeFirstInStatement() && + this.firstInStatement()) + return true; + return false; -} +}; -function hasClosingParen(oldPath) { - var oldNode = oldPath.getValue(); - var loc = oldNode.loc; - var lines = loc && loc.lines; +function isBinary(node) { + return n.BinaryExpression.check(node) + || n.LogicalExpression.check(node); +} - if (lines) { - var pos = reusablePos; - pos.line = loc.end.line; - pos.column = loc.end.column; +function isUnaryLike(node) { + return n.UnaryExpression.check(node) + // I considered making SpreadElement and SpreadProperty subtypes + // of UnaryExpression, but they're not really Expression nodes. + || (n.SpreadElement && n.SpreadElement.check(node)) + || (n.SpreadProperty && n.SpreadProperty.check(node)); +} - do { - var ch = lines.charAt(pos); +var PRECEDENCE = {}; +[["||"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"] +].forEach(function(tier, i) { + tier.forEach(function(op) { + PRECEDENCE[op] = i; + }); +}); - if (ch === ")") { - // If we found a closing parenthesis but it occurred after the - // end of the original subtree for this reprinting, then we - // must not return true for hasClosingParen(oldPath). - return comparePos(pos, oldPath.getRootValue().loc.end) <= 0; - } +function containsCallExpression(node) { + if (n.CallExpression.check(node)) { + return true; + } - if (nonSpaceExp.test(ch)) { - return false; - } + if (isArray.check(node)) { + return node.some(containsCallExpression); + } - } while (lines.nextPos(pos)); + if (n.Node.check(node)) { + return types.someField(node, function(name, child) { + return containsCallExpression(child); + }); } return false; } -function hasParens(oldPath) { - // This logic can technically be fooled if the node has parentheses - // but there are comments intervening between the parentheses and the - // node. In such cases the node will be harmlessly wrapped in an - // additional layer of parentheses. - return hasOpeningParen(oldPath) && hasClosingParen(oldPath); -} +NPp.canBeFirstInStatement = function() { + var node = this.node; + return !n.FunctionExpression.check(node) + && !n.ObjectExpression.check(node); +}; -function findChildReprints(newPath, oldPath, reprints) { - var newNode = newPath.getValue(); - var oldNode = oldPath.getValue(); +NPp.firstInStatement = function() { + return firstInStatement(this); +}; - isObject.assert(newNode); - isObject.assert(oldNode); +function firstInStatement(path) { + for (var node, parent; path.parent; path = path.parent) { + node = path.node; + parent = path.parent.node; - if (newNode.original === null) { - // If newNode.original node was set to null, reprint the node. - return false; - } + if (n.BlockStatement.check(parent) && + path.parent.name === "body" && + path.name === 0) { + assert.strictEqual(parent.body[0], node); + return true; + } - // If this type of node cannot come lexically first in its enclosing - // statement (e.g. a function expression or object literal), and it - // seems to be doing so, then the only way we can ignore this problem - // and save ourselves from falling back to the pretty printer is if an - // opening parenthesis happens to precede the node. For example, - // (function(){ ... }()); does not need to be reprinted, even though - // the FunctionExpression comes lexically first in the enclosing - // ExpressionStatement and fails the hasParens test, because the - // parent CallExpression passes the hasParens test. If we relied on - // the path.needsParens() && !hasParens(oldNode) check below, the - // absence of a closing parenthesis after the FunctionExpression would - // trigger pretty-printing unnecessarily. - if (!newPath.canBeFirstInStatement() && - newPath.firstInStatement() && - !hasOpeningParen(oldPath)) - return false; + if (n.ExpressionStatement.check(parent) && + path.name === "expression") { + assert.strictEqual(parent.expression, node); + return true; + } - // If this node needs parentheses and will not be wrapped with - // parentheses when reprinted, then return false to skip reprinting - // and let it be printed generically. - if (newPath.needsParens(true) && !hasParens(oldPath)) { - return false; - } + if (n.SequenceExpression.check(parent) && + path.parent.name === "expressions" && + path.name === 0) { + assert.strictEqual(parent.expressions[0], node); + continue; + } - for (var k in util.getUnionOfKeys(newNode, oldNode)) { - if (k === "loc") + if (n.CallExpression.check(parent) && + path.name === "callee") { + assert.strictEqual(parent.callee, node); + continue; + } + + if (n.MemberExpression.check(parent) && + path.name === "object") { + assert.strictEqual(parent.object, node); continue; + } - newPath.stack.push(k, types.getFieldValue(newNode, k)); - oldPath.stack.push(k, types.getFieldValue(oldNode, k)); - var canReprint = findAnyReprints(newPath, oldPath, reprints); - newPath.stack.length -= 2; - oldPath.stack.length -= 2; + if (n.ConditionalExpression.check(parent) && + path.name === "test") { + assert.strictEqual(parent.test, node); + continue; + } - if (!canReprint) { - return false; + if (isBinary(parent) && + path.name === "left") { + assert.strictEqual(parent.left, node); + continue; + } + + if (n.UnaryExpression.check(parent) && + !parent.prefix && + path.name === "argument") { + assert.strictEqual(parent.argument, node); + continue; } + + return false; } return true; } -},{"./fast-path":507,"./lines":508,"./types":514,"./util":515,"assert":213}],513:[function(require,module,exports){ -var assert = require("assert"); -var sourceMap = require("source-map"); -var printComments = require("./comments").printComments; -var linesModule = require("./lines"); -var fromString = linesModule.fromString; -var concat = linesModule.concat; -var normalizeOptions = require("./options").normalize; -var getReprinter = require("./patcher").getReprinter; -var types = require("./types"); -var namedTypes = types.namedTypes; -var isString = types.builtInTypes.string; -var isObject = types.builtInTypes.object; -var FastPath = require("./fast-path"); -var util = require("./util"); +/** + * Pruning certain nodes will result in empty or incomplete nodes, here we clean those nodes up. + */ +function cleanUpNodesAfterPrune(remainingNodePath) { + if (n.VariableDeclaration.check(remainingNodePath.node)) { + var declarations = remainingNodePath.get('declarations').value; + if (!declarations || declarations.length === 0) { + return remainingNodePath.prune(); + } + } else if (n.ExpressionStatement.check(remainingNodePath.node)) { + if (!remainingNodePath.get('expression').value) { + return remainingNodePath.prune(); + } + } else if (n.IfStatement.check(remainingNodePath.node)) { + cleanUpIfStatementAfterPrune(remainingNodePath); + } -function PrintResult(code, sourceMap) { - assert.ok(this instanceof PrintResult); + return remainingNodePath; +} - isString.assert(code); - this.code = code; +function cleanUpIfStatementAfterPrune(ifStatement) { + var testExpression = ifStatement.get('test').value; + var alternate = ifStatement.get('alternate').value; + var consequent = ifStatement.get('consequent').value; - if (sourceMap) { - isObject.assert(sourceMap); - this.map = sourceMap; - } -} + if (!consequent && !alternate) { + var testExpressionStatement = b.expressionStatement(testExpression); -var PRp = PrintResult.prototype; -var warnedAboutToString = false; + ifStatement.replace(testExpressionStatement); + } else if (!consequent && alternate) { + var negatedTestExpression = b.unaryExpression('!', testExpression, true); -PRp.toString = function() { - if (!warnedAboutToString) { - console.warn( - "Deprecation warning: recast.print now returns an object with " + - "a .code property. You appear to be treating the object as a " + - "string, which might still work but is strongly discouraged." - ); + if (n.UnaryExpression.check(testExpression) && testExpression.operator === '!') { + negatedTestExpression = testExpression.argument; + } - warnedAboutToString = true; + ifStatement.get("test").replace(negatedTestExpression); + ifStatement.get("consequent").replace(alternate); + ifStatement.get("alternate").replace(); } +} - return this.code; -}; +module.exports = NodePath; -var emptyPrintResult = new PrintResult(""); +},{"./path":518,"./scope":519,"./types":521,"assert":2,"util":28}],517:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var NodePath = require("./node-path"); +var Printable = types.namedTypes.Printable; +var isArray = types.builtInTypes.array; +var isObject = types.builtInTypes.object; +var isFunction = types.builtInTypes.function; +var hasOwn = Object.prototype.hasOwnProperty; +var undefined; -function Printer(originalOptions) { - assert.ok(this instanceof Printer); +function PathVisitor() { + assert.ok(this instanceof PathVisitor); - var explicitTabWidth = originalOptions && originalOptions.tabWidth; - var options = normalizeOptions(originalOptions); - assert.notStrictEqual(options, originalOptions); + // Permanent state. + this._reusableContextStack = []; - // It's common for client code to pass the same options into both - // recast.parse and recast.print, but the Printer doesn't need (and - // can be confused by) options.sourceFileName, so we null it out. - options.sourceFileName = null; + this._methodNameTable = computeMethodNameTable(this); + this._shouldVisitComments = + hasOwn.call(this._methodNameTable, "Block") || + hasOwn.call(this._methodNameTable, "Line"); - function printWithComments(path) { - assert.ok(path instanceof FastPath); - return printComments(path, print); - } + this.Context = makeContextConstructor(this); - function print(path, includeComments) { - if (includeComments) - return printWithComments(path); + // State reset every time PathVisitor.prototype.visit is called. + this._visiting = false; + this._changeReported = false; +} - assert.ok(path instanceof FastPath); +function computeMethodNameTable(visitor) { + var typeNames = Object.create(null); - if (!explicitTabWidth) { - var oldTabWidth = options.tabWidth; - var loc = path.getNode().loc; - if (loc && loc.lines && loc.lines.guessTabWidth) { - options.tabWidth = loc.lines.guessTabWidth(); - var lines = maybeReprint(path); - options.tabWidth = oldTabWidth; - return lines; - } + for (var methodName in visitor) { + if (/^visit[A-Z]/.test(methodName)) { + typeNames[methodName.slice("visit".length)] = true; } - - return maybeReprint(path); } - function maybeReprint(path) { - var reprinter = getReprinter(path); - if (reprinter) - return maybeAddParens(path, reprinter(print)); - return printRootGenerically(path); + var supertypeTable = types.computeSupertypeLookupTable(typeNames); + var methodNameTable = Object.create(null); + + var typeNames = Object.keys(supertypeTable); + var typeNameCount = typeNames.length; + for (var i = 0; i < typeNameCount; ++i) { + var typeName = typeNames[i]; + methodName = "visit" + supertypeTable[typeName]; + if (isFunction.check(visitor[methodName])) { + methodNameTable[typeName] = methodName; + } } - // Print the root node generically, but then resume reprinting its - // children non-generically. - function printRootGenerically(path) { - return genericPrint(path, options, printWithComments); + return methodNameTable; +} + +PathVisitor.fromMethodsObject = function fromMethodsObject(methods) { + if (methods instanceof PathVisitor) { + return methods; } - // Print the entire AST generically. - function printGenerically(path) { - return genericPrint(path, options, printGenerically); + if (!isObject.check(methods)) { + // An empty visitor? + return new PathVisitor; } - this.print = function(ast) { - if (!ast) { - return emptyPrintResult; - } + function Visitor() { + assert.ok(this instanceof Visitor); + PathVisitor.call(this); + } - var lines = print(FastPath.from(ast), true); + var Vp = Visitor.prototype = Object.create(PVp); + Vp.constructor = Visitor; - return new PrintResult( - lines.toString(options), - util.composeSourceMaps( - options.inputSourceMap, - lines.getSourceMap( - options.sourceMapName, - options.sourceRoot - ) - ) - ); - }; + extend(Vp, methods); + extend(Visitor, PathVisitor); - this.printGenerically = function(ast) { - if (!ast) { - return emptyPrintResult; - } + isFunction.assert(Visitor.fromMethodsObject); + isFunction.assert(Visitor.visit); - var path = FastPath.from(ast); - var oldReuseWhitespace = options.reuseWhitespace; + return new Visitor; +}; - // Do not reuse whitespace (or anything else, for that matter) - // when printing generically. - options.reuseWhitespace = false; +function extend(target, source) { + for (var property in source) { + if (hasOwn.call(source, property)) { + target[property] = source[property]; + } + } - // TODO Allow printing of comments? - var pr = new PrintResult(printGenerically(path).toString(options)); - options.reuseWhitespace = oldReuseWhitespace; - return pr; - }; + return target; } -exports.Printer = Printer; +PathVisitor.visit = function visit(node, methods) { + return PathVisitor.fromMethodsObject(methods).visit(node); +}; -function maybeAddParens(path, lines) { - return path.needsParens() ? concat(["(", lines, ")"]) : lines; -} +var PVp = PathVisitor.prototype; -function genericPrint(path, options, printPath) { - assert.ok(path instanceof FastPath); - return maybeAddParens(path, genericPrintNoParens(path, options, printPath)); -} +var recursiveVisitWarning = [ + "Recursively calling visitor.visit(path) resets visitor state.", + "Try this.visit(path) or this.traverse(path) instead." +].join(" "); -function genericPrintNoParens(path, options, print) { - var n = path.getValue(); +PVp.visit = function() { + assert.ok(!this._visiting, recursiveVisitWarning); - if (!n) { - return fromString(""); + // Private state that needs to be reset before every traversal. + this._visiting = true; + this._changeReported = false; + this._abortRequested = false; + + var argc = arguments.length; + var args = new Array(argc) + for (var i = 0; i < argc; ++i) { + args[i] = arguments[i]; } - if (typeof n === "string") { - return fromString(n, options); + if (!(args[0] instanceof NodePath)) { + args[0] = new NodePath({ root: args[0] }).get("root"); } - namedTypes.Printable.assert(n); + // Called with the same arguments as .visit. + this.reset.apply(this, args); - switch (n.type) { - case "File": - return path.call(print, "program"); + try { + var root = this.visitWithoutReset(args[0]); + var didNotThrow = true; + } finally { + this._visiting = false; - case "Program": - return maybeAddSemicolon(path.call(function(bodyPath) { - return printStatementSequence(bodyPath, options, print); - }, "body")); + if (!didNotThrow && this._abortRequested) { + // If this.visitWithoutReset threw an exception and + // this._abortRequested was set to true, return the root of + // the AST instead of letting the exception propagate, so that + // client code does not have to provide a try-catch block to + // intercept the AbortRequest exception. Other kinds of + // exceptions will propagate without being intercepted and + // rethrown by a catch block, so their stacks will accurately + // reflect the original throwing context. + return args[0].value; + } + } - case "EmptyStatement": - return fromString(""); + return root; +}; - case "ExpressionStatement": - return concat([path.call(print, "expression"), ";"]); +PVp.AbortRequest = function AbortRequest() {}; +PVp.abort = function() { + var visitor = this; + visitor._abortRequested = true; + var request = new visitor.AbortRequest(); - case "BinaryExpression": - case "LogicalExpression": - case "AssignmentExpression": - return fromString(" ").join([ - path.call(print, "left"), - n.operator, - path.call(print, "right") - ]); + // If you decide to catch this exception and stop it from propagating, + // make sure to call its cancel method to avoid silencing other + // exceptions that might be thrown later in the traversal. + request.cancel = function() { + visitor._abortRequested = false; + }; - case "AssignmentPattern": - return concat([ - path.call(print, "left"), - "=", - path.call(print, "right") - ]); + throw request; +}; - case "MemberExpression": - var parts = [path.call(print, "object")]; +PVp.reset = function(path/*, additional arguments */) { + // Empty stub; may be reassigned or overridden by subclasses. +}; - var property = path.call(print, "property"); - if (n.computed) { - parts.push("[", property, "]"); - } else { - parts.push(".", property); - } +PVp.visitWithoutReset = function(path) { + if (this instanceof this.Context) { + // Since this.Context.prototype === this, there's a chance we + // might accidentally call context.visitWithoutReset. If that + // happens, re-invoke the method against context.visitor. + return this.visitor.visitWithoutReset(path); + } - return concat(parts); + assert.ok(path instanceof NodePath); + var value = path.value; - case "Path": - return fromString(".").join(n.body); + var methodName = Printable.check(value) && this._methodNameTable[value.type]; + if (methodName) { + var context = this.acquireContext(path); + try { + return context.invokeVisitorMethod(methodName); + } finally { + this.releaseContext(context); + } - case "Identifier": - return concat([ - fromString(n.name, options), - path.call(print, "typeAnnotation") - ]); + } else { + // If there was no visitor method to call, visit the children of + // this node generically. + return visitChildren(path, this); + } +}; - case "SpreadElement": - case "SpreadElementPattern": - case "SpreadProperty": - case "SpreadPropertyPattern": - case "RestElement": - return concat(["...", path.call(print, "argument")]); +function visitChildren(path, visitor) { + assert.ok(path instanceof NodePath); + assert.ok(visitor instanceof PathVisitor); - case "FunctionDeclaration": - case "FunctionExpression": - var parts = []; + var value = path.value; - if (n.async) - parts.push("async "); + if (isArray.check(value)) { + path.each(visitor.visitWithoutReset, visitor); + } else if (!isObject.check(value)) { + // No children to visit. + } else { + var childNames = types.getFieldNames(value); - parts.push("function"); + // The .comments field of the Node type is hidden, so we only + // visit it if the visitor defines visitBlock or visitLine, and + // value.comments is defined. + if (visitor._shouldVisitComments && + value.comments && + childNames.indexOf("comments") < 0) { + childNames.push("comments"); + } - if (n.generator) - parts.push("*"); + var childCount = childNames.length; + var childPaths = []; - if (n.id) { - parts.push( - " ", - path.call(print, "id"), - path.call(print, "typeParameters") - ); + for (var i = 0; i < childCount; ++i) { + var childName = childNames[i]; + if (!hasOwn.call(value, childName)) { + value[childName] = types.getFieldValue(value, childName); + } + childPaths.push(path.get(childName)); } - parts.push( - "(", - printFunctionParams(path, options, print), - ")", - path.call(print, "returnType"), - " ", - path.call(print, "body") - ); + for (var i = 0; i < childCount; ++i) { + visitor.visitWithoutReset(childPaths[i]); + } + } - return concat(parts); + return path.value; +} - case "ArrowFunctionExpression": - var parts = []; +PVp.acquireContext = function(path) { + if (this._reusableContextStack.length === 0) { + return new this.Context(path); + } + return this._reusableContextStack.pop().reset(path); +}; - if (n.async) - parts.push("async "); +PVp.releaseContext = function(context) { + assert.ok(context instanceof this.Context); + this._reusableContextStack.push(context); + context.currentPath = null; +}; - if (n.params.length === 1 && !n.rest) { - parts.push(path.call(print, "params", 0)); - } else { - parts.push( - "(", - printFunctionParams(path, options, print), - ")" - ); - } +PVp.reportChanged = function() { + this._changeReported = true; +}; - parts.push(" => ", path.call(print, "body")); +PVp.wasChangeReported = function() { + return this._changeReported; +}; - return concat(parts); +function makeContextConstructor(visitor) { + function Context(path) { + assert.ok(this instanceof Context); + assert.ok(this instanceof PathVisitor); + assert.ok(path instanceof NodePath); - case "MethodDefinition": - var parts = []; + Object.defineProperty(this, "visitor", { + value: visitor, + writable: false, + enumerable: true, + configurable: false + }); - if (n.static) { - parts.push("static "); - } + this.currentPath = path; + this.needToCallTraverse = true; - parts.push(printMethod(path, options, print)); + Object.seal(this); + } - return concat(parts); + assert.ok(visitor instanceof PathVisitor); - case "YieldExpression": - var parts = ["yield"]; + // Note that the visitor object is the prototype of Context.prototype, + // so all visitor methods are inherited by context objects. + var Cp = Context.prototype = Object.create(visitor); - if (n.delegate) - parts.push("*"); + Cp.constructor = Context; + extend(Cp, sharedContextProtoMethods); - if (n.argument) - parts.push(" ", path.call(print, "argument")); + return Context; +} - return concat(parts); +// Every PathVisitor has a different this.Context constructor and +// this.Context.prototype object, but those prototypes can all use the +// same reset, invokeVisitorMethod, and traverse function objects. +var sharedContextProtoMethods = Object.create(null); - case "AwaitExpression": - var parts = ["await"]; +sharedContextProtoMethods.reset = +function reset(path) { + assert.ok(this instanceof this.Context); + assert.ok(path instanceof NodePath); - if (n.all) - parts.push("*"); + this.currentPath = path; + this.needToCallTraverse = true; - if (n.argument) - parts.push(" ", path.call(print, "argument")); + return this; +}; - return concat(parts); +sharedContextProtoMethods.invokeVisitorMethod = +function invokeVisitorMethod(methodName) { + assert.ok(this instanceof this.Context); + assert.ok(this.currentPath instanceof NodePath); - case "ModuleDeclaration": - var parts = ["module", path.call(print, "id")]; + var result = this.visitor[methodName].call(this, this.currentPath); - if (n.source) { - assert.ok(!n.body); - parts.push("from", path.call(print, "source")); - } else { - parts.push(path.call(print, "body")); + if (result === false) { + // Visitor methods return false to indicate that they have handled + // their own traversal needs, and we should not complain if + // this.needToCallTraverse is still true. + this.needToCallTraverse = false; + + } else if (result !== undefined) { + // Any other non-undefined value returned from the visitor method + // is interpreted as a replacement value. + this.currentPath = this.currentPath.replace(result)[0]; + + if (this.needToCallTraverse) { + // If this.traverse still hasn't been called, visit the + // children of the replacement node. + this.traverse(this.currentPath); } + } - return fromString(" ").join(parts); + assert.strictEqual( + this.needToCallTraverse, false, + "Must either call this.traverse or return false in " + methodName + ); - case "ImportSpecifier": - case "ExportSpecifier": - var parts = [path.call(print, "id")]; + var path = this.currentPath; + return path && path.value; +}; - if (n.name) - parts.push(" as ", path.call(print, "name")); +sharedContextProtoMethods.traverse = +function traverse(path, newVisitor) { + assert.ok(this instanceof this.Context); + assert.ok(path instanceof NodePath); + assert.ok(this.currentPath instanceof NodePath); - return concat(parts); + this.needToCallTraverse = false; - case "ExportBatchSpecifier": - return fromString("*"); + return visitChildren(path, PathVisitor.fromMethodsObject( + newVisitor || this.visitor + )); +}; - case "ImportNamespaceSpecifier": - return concat(["* as ", path.call(print, "id")]); +sharedContextProtoMethods.visit = +function visit(path, newVisitor) { + assert.ok(this instanceof this.Context); + assert.ok(path instanceof NodePath); + assert.ok(this.currentPath instanceof NodePath); - case "ImportDefaultSpecifier": - return path.call(print, "id"); + this.needToCallTraverse = false; - case "ExportDeclaration": - var parts = ["export"]; + return PathVisitor.fromMethodsObject( + newVisitor || this.visitor + ).visitWithoutReset(path); +}; - if (n["default"]) { - parts.push(" default"); +sharedContextProtoMethods.reportChanged = function reportChanged() { + this.visitor.reportChanged(); +}; + +sharedContextProtoMethods.abort = function abort() { + this.needToCallTraverse = false; + this.visitor.abort(); +}; + +module.exports = PathVisitor; + +},{"./node-path":516,"./types":521,"assert":2}],518:[function(require,module,exports){ +var assert = require("assert"); +var Op = Object.prototype; +var hasOwn = Op.hasOwnProperty; +var types = require("./types"); +var isArray = types.builtInTypes.array; +var isNumber = types.builtInTypes.number; +var Ap = Array.prototype; +var slice = Ap.slice; +var map = Ap.map; - } else if (n.specifiers && - n.specifiers.length > 0) { +function Path(value, parentPath, name) { + assert.ok(this instanceof Path); - if (n.specifiers.length === 1 && - n.specifiers[0].type === "ExportBatchSpecifier") { - parts.push(" *"); - } else { - parts.push( - " { ", - fromString(", ").join(path.map(print, "specifiers")), - " }" - ); - } + if (parentPath) { + assert.ok(parentPath instanceof Path); + } else { + parentPath = null; + name = null; + } - if (n.source) - parts.push(" from ", path.call(print, "source")); + // The value encapsulated by this Path, generally equal to + // parentPath.value[name] if we have a parentPath. + this.value = value; - parts.push(";"); + // The immediate parent Path of this Path. + this.parentPath = parentPath; - return concat(parts); - } + // The name of the property of parentPath.value through which this + // Path's value was reached. + this.name = name; - if (n.declaration) { - if (!namedTypes.Node.check(n.declaration)) { - console.log(JSON.stringify(n, null, 2)); - } - var decLines = path.call(print, "declaration"); - parts.push(" ", decLines); - if (lastNonSpaceCharacter(decLines) !== ";") { - parts.push(";"); - } - } + // Calling path.get("child") multiple times always returns the same + // child Path object, for both performance and consistency reasons. + this.__childCache = null; +} - return concat(parts); +var Pp = Path.prototype; - case "ImportDeclaration": - var parts = ["import "]; +function getChildCache(path) { + // Lazily create the child cache. This also cheapens cache + // invalidation, since you can just reset path.__childCache to null. + return path.__childCache || (path.__childCache = Object.create(null)); +} - if (n.specifiers && - n.specifiers.length > 0) { +function getChildPath(path, name) { + var cache = getChildCache(path); + var actualChildValue = path.getValueProperty(name); + var childPath = cache[name]; + if (!hasOwn.call(cache, name) || + // Ensure consistency between cache and reality. + childPath.value !== actualChildValue) { + childPath = cache[name] = new path.constructor( + actualChildValue, path, name + ); + } + return childPath; +} - var foundImportSpecifier = false; +// This method is designed to be overridden by subclasses that need to +// handle missing properties, etc. +Pp.getValueProperty = function getValueProperty(name) { + return this.value[name]; +}; - path.each(function(specifierPath) { - var i = specifierPath.getName(); - if (i > 0) { - parts.push(", "); - } +Pp.get = function get(name) { + var path = this; + var names = arguments; + var count = names.length; - var value = specifierPath.getValue(); + for (var i = 0; i < count; ++i) { + path = getChildPath(path, names[i]); + } - if (namedTypes.ImportDefaultSpecifier.check(value) || - namedTypes.ImportNamespaceSpecifier.check(value)) { - assert.strictEqual(foundImportSpecifier, false); - } else { - namedTypes.ImportSpecifier.assert(value); - if (!foundImportSpecifier) { - foundImportSpecifier = true; - parts.push("{"); - } - } + return path; +}; - parts.push(print(specifierPath)); - }, "specifiers"); +Pp.each = function each(callback, context) { + var childPaths = []; + var len = this.value.length; + var i = 0; - if (foundImportSpecifier) { - parts.push("}"); - } + // Collect all the original child paths before invoking the callback. + for (var i = 0; i < len; ++i) { + if (hasOwn.call(this.value, i)) { + childPaths[i] = this.get(i); + } + } - parts.push(" from "); + // Invoke the callback on just the original child paths, regardless of + // any modifications made to the array by the callback. I chose these + // semantics over cleverly invoking the callback on new elements because + // this way is much easier to reason about. + context = context || this; + for (i = 0; i < len; ++i) { + if (hasOwn.call(childPaths, i)) { + callback.call(context, childPaths[i]); } + } +}; - parts.push(path.call(print, "source"), ";"); +Pp.map = function map(callback, context) { + var result = []; - return concat(parts); + this.each(function(childPath) { + result.push(callback.call(this, childPath)); + }, context); - case "BlockStatement": - var naked = path.call(function(bodyPath) { - return printStatementSequence(bodyPath, options, print); - }, "body"); + return result; +}; - if (naked.isEmpty()) { - return fromString("{}"); +Pp.filter = function filter(callback, context) { + var result = []; + + this.each(function(childPath) { + if (callback.call(this, childPath)) { + result.push(childPath); } + }, context); - return concat([ - "{\n", - naked.indent(options.tabWidth), - "\n}" - ]); + return result; +}; - case "ReturnStatement": - var parts = ["return"]; +function emptyMoves() {} +function getMoves(path, offset, start, end) { + isArray.assert(path.value); - if (n.argument) { - var argLines = path.call(print, "argument"); - if (argLines.length > 1 && - (namedTypes.XJSElement && - namedTypes.XJSElement.check(n.argument) || - namedTypes.JSXElement && - namedTypes.JSXElement.check(n.argument))) { - parts.push( - " (\n", - argLines.indent(options.tabWidth), - "\n)" - ); - } else { - parts.push(" ", argLines); - } - } + if (offset === 0) { + return emptyMoves; + } - parts.push(";"); + var length = path.value.length; + if (length < 1) { + return emptyMoves; + } - return concat(parts); + var argc = arguments.length; + if (argc === 2) { + start = 0; + end = length; + } else if (argc === 3) { + start = Math.max(start, 0); + end = length; + } else { + start = Math.max(start, 0); + end = Math.min(end, length); + } - case "CallExpression": - return concat([ - path.call(print, "callee"), - printArgumentsList(path, options, print) - ]); + isNumber.assert(start); + isNumber.assert(end); - case "ObjectExpression": - case "ObjectPattern": - case "ObjectTypeAnnotation": - var allowBreak = false; - var isTypeAnnotation = n.type === "ObjectTypeAnnotation"; - var separator = isTypeAnnotation ? ';' : ','; - var fields = []; + var moves = Object.create(null); + var cache = getChildCache(path); - if (isTypeAnnotation) { - fields.push("indexers", "callProperties"); + for (var i = start; i < end; ++i) { + if (hasOwn.call(path.value, i)) { + var childPath = path.get(i); + assert.strictEqual(childPath.name, i); + var newIndex = i + offset; + childPath.name = newIndex; + moves[newIndex] = childPath; + delete cache[i]; } + } - fields.push("properties"); + delete cache.length; - var len = 0; - fields.forEach(function(field) { - len += n[field].length; - }); + return function() { + for (var newIndex in moves) { + var childPath = moves[newIndex]; + assert.strictEqual(childPath.name, +newIndex); + cache[newIndex] = childPath; + path.value[newIndex] = childPath.value; + } + }; +} - var oneLine = (isTypeAnnotation && len === 1) || len === 0; - var parts = [oneLine ? "{" : "{\n"]; +Pp.shift = function shift() { + var move = getMoves(this, -1); + var result = this.value.shift(); + move(); + return result; +}; - fields.forEach(function(field) { - path.map(function(childPath) { - var i = childPath.getName(); - var lines = print(childPath); +Pp.unshift = function unshift(node) { + var move = getMoves(this, arguments.length); + var result = this.value.unshift.apply(this.value, arguments); + move(); + return result; +}; - if (!oneLine) { - lines = lines.indent(options.tabWidth); - } +Pp.push = function push(node) { + isArray.assert(this.value); + delete getChildCache(this).length + return this.value.push.apply(this.value, arguments); +}; - var multiLine = !isTypeAnnotation && lines.length > 1; - if (multiLine && allowBreak) { - // Similar to the logic for BlockStatement. - parts.push("\n"); - } +Pp.pop = function pop() { + isArray.assert(this.value); + var cache = getChildCache(this); + delete cache[this.value.length - 1]; + delete cache.length; + return this.value.pop(); +}; - parts.push(lines); +Pp.insertAt = function insertAt(index, node) { + var argc = arguments.length; + var move = getMoves(this, argc - 1, index); + if (move === emptyMoves) { + return this; + } - if (i < len - 1) { - // Add an extra line break if the previous object property - // had a multi-line value. - parts.push(separator + (multiLine ? "\n\n" : "\n")); - allowBreak = !multiLine; - } else if (len !== 1 && isTypeAnnotation) { - parts.push(separator); - } else if (options.trailingComma) { - parts.push(separator); - } - }, field); - }); + index = Math.max(index, 0); - parts.push(oneLine ? "}" : "\n}"); + for (var i = 1; i < argc; ++i) { + this.value[index + i - 1] = arguments[i]; + } - return concat(parts); + move(); - case "PropertyPattern": - return concat([ - path.call(print, "key"), - ": ", - path.call(print, "pattern") - ]); + return this; +}; - case "Property": // Non-standard AST node type. - if (n.method || n.kind === "get" || n.kind === "set") { - return printMethod(path, options, print); - } +Pp.insertBefore = function insertBefore(node) { + var pp = this.parentPath; + var argc = arguments.length; + var insertAtArgs = [this.name]; + for (var i = 0; i < argc; ++i) { + insertAtArgs.push(arguments[i]); + } + return pp.insertAt.apply(pp, insertAtArgs); +}; - var key = path.call(print, "key"); - if (n.computed) { - key = concat(["[", key, "]"]); - } +Pp.insertAfter = function insertAfter(node) { + var pp = this.parentPath; + var argc = arguments.length; + var insertAtArgs = [this.name + 1]; + for (var i = 0; i < argc; ++i) { + insertAtArgs.push(arguments[i]); + } + return pp.insertAt.apply(pp, insertAtArgs); +}; - if (n.shorthand) { - return key; - } +function repairRelationshipWithParent(path) { + assert.ok(path instanceof Path); - return concat([key, ": ", path.call(print, "value")]); + var pp = path.parentPath; + if (!pp) { + // Orphan paths have no relationship to repair. + return path; + } - case "ArrayExpression": - case "ArrayPattern": - var elems = n.elements, - len = elems.length; + var parentValue = pp.value; + var parentCache = getChildCache(pp); - var printed = path.map(print, "elements"); - var joined = fromString(", ").join(printed); - var oneLine = joined.getLineLength(1) <= options.wrapColumn; - var parts = [oneLine ? "[" : "[\n"]; + // Make sure parentCache[path.name] is populated. + if (parentValue[path.name] === path.value) { + parentCache[path.name] = path; + } else if (isArray.check(parentValue)) { + // Something caused path.name to become out of date, so attempt to + // recover by searching for path.value in parentValue. + var i = parentValue.indexOf(path.value); + if (i >= 0) { + parentCache[path.name = i] = path; + } + } else { + // If path.value disagrees with parentValue[path.name], and + // path.name is not an array index, let path.value become the new + // parentValue[path.name] and update parentCache accordingly. + parentValue[path.name] = path.value; + parentCache[path.name] = path; + } - path.each(function(elemPath) { - var i = elemPath.getName(); - var elem = elemPath.getValue(); - if (!elem) { - // If the array expression ends with a hole, that hole - // will be ignored by the interpreter, but if it ends with - // two (or more) holes, we need to write out two (or more) - // commas so that the resulting code is interpreted with - // both (all) of the holes. - parts.push(","); - } else { - var lines = printed[i]; - if (oneLine) { - if (i > 0) - parts.push(" "); - } else { - lines = lines.indent(options.tabWidth); - } - parts.push(lines); - if (i < len - 1 || (!oneLine && options.trailingComma)) - parts.push(","); - if (!oneLine) - parts.push("\n"); - } - }, "elements"); + assert.strictEqual(parentValue[path.name], path.value); + assert.strictEqual(path.parentPath.get(path.name), path); - parts.push("]"); + return path; +} - return concat(parts); +Pp.replace = function replace(replacement) { + var results = []; + var parentValue = this.parentPath.value; + var parentCache = getChildCache(this.parentPath); + var count = arguments.length; - case "SequenceExpression": - return fromString(", ").join(path.map(print, "expressions")); + repairRelationshipWithParent(this); - case "ThisExpression": - return fromString("this"); + if (isArray.check(parentValue)) { + var originalLength = parentValue.length; + var move = getMoves(this.parentPath, count - 1, this.name + 1); - case "Literal": - if (typeof n.value !== "string") - return fromString(n.value, options); + var spliceArgs = [this.name, 1]; + for (var i = 0; i < count; ++i) { + spliceArgs.push(arguments[i]); + } - // intentionally fall through... + var splicedOut = parentValue.splice.apply(parentValue, spliceArgs); - case "ModuleSpecifier": - return fromString(nodeStr(n.value, options), options); + assert.strictEqual(splicedOut[0], this.value); + assert.strictEqual( + parentValue.length, + originalLength - 1 + count + ); - case "UnaryExpression": - var parts = [n.operator]; - if (/[a-z]$/.test(n.operator)) - parts.push(" "); - parts.push(path.call(print, "argument")); - return concat(parts); + move(); - case "UpdateExpression": - var parts = [path.call(print, "argument"), n.operator]; + if (count === 0) { + delete this.value; + delete parentCache[this.name]; + this.__childCache = null; - if (n.prefix) - parts.reverse(); + } else { + assert.strictEqual(parentValue[this.name], replacement); - return concat(parts); + if (this.value !== replacement) { + this.value = replacement; + this.__childCache = null; + } - case "ConditionalExpression": - return concat([ - "(", path.call(print, "test"), - " ? ", path.call(print, "consequent"), - " : ", path.call(print, "alternate"), ")" - ]); + for (i = 0; i < count; ++i) { + results.push(this.parentPath.get(this.name + i)); + } - case "NewExpression": - var parts = ["new ", path.call(print, "callee")]; - var args = n.arguments; - if (args) { - parts.push(printArgumentsList(path, options, print)); + assert.strictEqual(results[0], this); } - return concat(parts); + } else if (count === 1) { + if (this.value !== replacement) { + this.__childCache = null; + } + this.value = parentValue[this.name] = replacement; + results.push(this); - case "VariableDeclaration": - var parts = [n.kind, " "]; - var maxLen = 0; - var printed = path.map(function(childPath) { - var lines = print(childPath); - maxLen = Math.max(lines.length, maxLen); - return lines; - }, "declarations"); + } else if (count === 0) { + delete parentValue[this.name]; + delete this.value; + this.__childCache = null; - if (maxLen === 1) { - parts.push(fromString(", ").join(printed)); - } else if (printed.length > 1 ) { - parts.push( - fromString(",\n").join(printed) - .indentTail(n.kind.length + 1) - ); - } else { - parts.push(printed[0]); - } + // Leave this path cached as parentCache[this.name], even though + // it no longer has a value defined. - // We generally want to terminate all variable declarations with a - // semicolon, except when they are children of for loops. - var parentNode = path.getParentNode(); - if (!namedTypes.ForStatement.check(parentNode) && - !namedTypes.ForInStatement.check(parentNode) && - !(namedTypes.ForOfStatement && - namedTypes.ForOfStatement.check(parentNode))) { - parts.push(";"); - } + } else { + assert.ok(false, "Could not replace path"); + } - return concat(parts); + return results; +}; - case "VariableDeclarator": - return n.init ? fromString(" = ").join([ - path.call(print, "id"), - path.call(print, "init") - ]) : path.call(print, "id"); +module.exports = Path; - case "WithStatement": - return concat([ - "with (", - path.call(print, "object"), - ") ", - path.call(print, "body") - ]); +},{"./types":521,"assert":2}],519:[function(require,module,exports){ +var assert = require("assert"); +var types = require("./types"); +var Type = types.Type; +var namedTypes = types.namedTypes; +var Node = namedTypes.Node; +var Expression = namedTypes.Expression; +var isArray = types.builtInTypes.array; +var hasOwn = Object.prototype.hasOwnProperty; +var b = types.builders; - case "IfStatement": - var con = adjustClause(path.call(print, "consequent"), options), - parts = ["if (", path.call(print, "test"), ")", con]; +function Scope(path, parentScope) { + assert.ok(this instanceof Scope); + assert.ok(path instanceof require("./node-path")); + ScopeType.assert(path.value); - if (n.alternate) - parts.push( - endsWithBrace(con) ? " else" : "\nelse", - adjustClause(path.call(print, "alternate"), options)); + var depth; - return concat(parts); + if (parentScope) { + assert.ok(parentScope instanceof Scope); + depth = parentScope.depth + 1; + } else { + parentScope = null; + depth = 0; + } - case "ForStatement": - // TODO Get the for (;;) case right. - var init = path.call(print, "init"), - sep = init.length > 1 ? ";\n" : "; ", - forParen = "for (", - indented = fromString(sep).join([ - init, - path.call(print, "test"), - path.call(print, "update") - ]).indentTail(forParen.length), - head = concat([forParen, indented, ")"]), - clause = adjustClause(path.call(print, "body"), options), - parts = [head]; + Object.defineProperties(this, { + path: { value: path }, + node: { value: path.value }, + isGlobal: { value: !parentScope, enumerable: true }, + depth: { value: depth }, + parent: { value: parentScope }, + bindings: { value: {} } + }); +} - if (head.length > 1) { - parts.push("\n"); - clause = clause.trimLeft(); - } +var scopeTypes = [ + // Program nodes introduce global scopes. + namedTypes.Program, - parts.push(clause); + // Function is the supertype of FunctionExpression, + // FunctionDeclaration, ArrowExpression, etc. + namedTypes.Function, - return concat(parts); + // In case you didn't know, the caught parameter shadows any variable + // of the same name in an outer scope. + namedTypes.CatchClause +]; - case "WhileStatement": - return concat([ - "while (", - path.call(print, "test"), - ")", - adjustClause(path.call(print, "body"), options) - ]); +var ScopeType = Type.or.apply(Type, scopeTypes); - case "ForInStatement": - // Note: esprima can't actually parse "for each (". - return concat([ - n.each ? "for each (" : "for (", - path.call(print, "left"), - " in ", - path.call(print, "right"), - ")", - adjustClause(path.call(print, "body"), options) - ]); +Scope.isEstablishedBy = function(node) { + return ScopeType.check(node); +}; - case "ForOfStatement": - return concat([ - "for (", - path.call(print, "left"), - " of ", - path.call(print, "right"), - ")", - adjustClause(path.call(print, "body"), options) - ]); +var Sp = Scope.prototype; - case "DoWhileStatement": - var doBody = concat([ - "do", - adjustClause(path.call(print, "body"), options) - ]), parts = [doBody]; +// Will be overridden after an instance lazily calls scanScope. +Sp.didScan = false; - if (endsWithBrace(doBody)) - parts.push(" while"); - else - parts.push("\nwhile"); +Sp.declares = function(name) { + this.scan(); + return hasOwn.call(this.bindings, name); +}; - parts.push(" (", path.call(print, "test"), ");"); +Sp.declareTemporary = function(prefix) { + if (prefix) { + assert.ok(/^[a-z$_]/i.test(prefix), prefix); + } else { + prefix = "t$"; + } - return concat(parts); + // Include this.depth in the name to make sure the name does not + // collide with any variables in nested/enclosing scopes. + prefix += this.depth.toString(36) + "$"; - case "BreakStatement": - var parts = ["break"]; - if (n.label) - parts.push(" ", path.call(print, "label")); - parts.push(";"); - return concat(parts); + this.scan(); - case "ContinueStatement": - var parts = ["continue"]; - if (n.label) - parts.push(" ", path.call(print, "label")); - parts.push(";"); - return concat(parts); + var index = 0; + while (this.declares(prefix + index)) { + ++index; + } - case "LabeledStatement": - return concat([ - path.call(print, "label"), - ":\n", - path.call(print, "body") - ]); + var name = prefix + index; + return this.bindings[name] = types.builders.identifier(name); +}; - case "TryStatement": - var parts = [ - "try ", - path.call(print, "block") - ]; +Sp.injectTemporary = function(identifier, init) { + identifier || (identifier = this.declareTemporary()); - if (n.handler) { - parts.push(" ", path.call(print, "handler")); - } else if (n.handlers) { - path.each(function(handlerPath) { - parts.push(" ", print(handlerPath)); - }, "handlers"); - } + var bodyPath = this.path.get("body"); + if (namedTypes.BlockStatement.check(bodyPath.value)) { + bodyPath = bodyPath.get("body"); + } - if (n.finalizer) { - parts.push(" finally ", path.call(print, "finalizer")); + bodyPath.unshift( + b.variableDeclaration( + "var", + [b.variableDeclarator(identifier, init || null)] + ) + ); + + return identifier; +}; + +Sp.scan = function(force) { + if (force || !this.didScan) { + for (var name in this.bindings) { + // Empty out this.bindings, just in cases. + delete this.bindings[name]; } + scanScope(this.path, this.bindings); + this.didScan = true; + } +}; - return concat(parts); +Sp.getBindings = function () { + this.scan(); + return this.bindings; +}; - case "CatchClause": - var parts = ["catch (", path.call(print, "param")]; +function scanScope(path, bindings) { + var node = path.value; + ScopeType.assert(node); - if (n.guard) - // Note: esprima does not recognize conditional catch clauses. - parts.push(" if ", path.call(print, "guard")); + if (namedTypes.CatchClause.check(node)) { + // A catch clause establishes a new scope but the only variable + // bound in that scope is the catch parameter. Any other + // declarations create bindings in the outer scope. + addPattern(path.get("param"), bindings); - parts.push(") ", path.call(print, "body")); + } else { + recursiveScanScope(path, bindings); + } +} - return concat(parts); +function recursiveScanScope(path, bindings) { + var node = path.value; - case "ThrowStatement": - return concat(["throw ", path.call(print, "argument"), ";"]); + if (path.parent && + namedTypes.FunctionExpression.check(path.parent.node) && + path.parent.node.id) { + addPattern(path.parent.get("id"), bindings); + } - case "SwitchStatement": - return concat([ - "switch (", - path.call(print, "discriminant"), - ") {\n", - fromString("\n").join(path.map(print, "cases")), - "\n}" - ]); + if (!node) { + // None of the remaining cases matter if node is falsy. - // Note: ignoring n.lexical because it has no printing consequences. + } else if (isArray.check(node)) { + path.each(function(childPath) { + recursiveScanChild(childPath, bindings); + }); - case "SwitchCase": - var parts = []; + } else if (namedTypes.Function.check(node)) { + path.get("params").each(function(paramPath) { + addPattern(paramPath, bindings); + }); - if (n.test) - parts.push("case ", path.call(print, "test"), ":"); - else - parts.push("default:"); + recursiveScanChild(path.get("body"), bindings); - if (n.consequent.length > 0) { - parts.push("\n", path.call(function(consequentPath) { - return printStatementSequence(consequentPath, options, print); - }, "consequent").indent(options.tabWidth)); - } + } else if (namedTypes.VariableDeclarator.check(node)) { + addPattern(path.get("id"), bindings); + recursiveScanChild(path.get("init"), bindings); - return concat(parts); + } else if (node.type === "ImportSpecifier" || + node.type === "ImportNamespaceSpecifier" || + node.type === "ImportDefaultSpecifier") { + addPattern( + // Esprima used to use the .name field to refer to the local + // binding identifier for ImportSpecifier nodes, but .id for + // ImportNamespaceSpecifier and ImportDefaultSpecifier nodes. + // ESTree/Acorn/ESpree use .local for all three node types. + path.get(node.local ? "local" : + node.name ? "name" : "id"), + bindings + ); - case "DebuggerStatement": - return fromString("debugger;"); + } else if (Node.check(node) && !Expression.check(node)) { + types.eachField(node, function(name, child) { + var childPath = path.get(name); + assert.strictEqual(childPath.value, child); + recursiveScanChild(childPath, bindings); + }); + } +} - // JSX extensions below. +function recursiveScanChild(path, bindings) { + var node = path.value; - case "XJSAttribute": - case "JSXAttribute": - var parts = [path.call(print, "name")]; - if (n.value) - parts.push("=", path.call(print, "value")); - return concat(parts); + if (!node || Expression.check(node)) { + // Ignore falsy values and Expressions. - case "XJSIdentifier": - case "JSXIdentifier": - return fromString(n.name, options); + } else if (namedTypes.FunctionDeclaration.check(node)) { + addPattern(path.get("id"), bindings); - case "XJSNamespacedName": - case "JSXNamespacedName": - return fromString(":").join([ - path.call(print, "namespace"), - path.call(print, "name") - ]); + } else if (namedTypes.ClassDeclaration && + namedTypes.ClassDeclaration.check(node)) { + addPattern(path.get("id"), bindings); - case "XJSMemberExpression": - case "JSXMemberExpression": - return fromString(".").join([ - path.call(print, "object"), - path.call(print, "property") - ]); + } else if (ScopeType.check(node)) { + if (namedTypes.CatchClause.check(node)) { + var catchParamName = node.param.name; + var hadBinding = hasOwn.call(bindings, catchParamName); - case "XJSSpreadAttribute": - case "JSXSpreadAttribute": - return concat(["{...", path.call(print, "argument"), "}"]); + // Any declarations that occur inside the catch body that do + // not have the same name as the catch parameter should count + // as bindings in the outer scope. + recursiveScanScope(path.get("body"), bindings); - case "XJSExpressionContainer": - case "JSXExpressionContainer": - return concat(["{", path.call(print, "expression"), "}"]); + // If a new binding matching the catch parameter name was + // created while scanning the catch body, ignore it because it + // actually refers to the catch parameter and not the outer + // scope that we're currently scanning. + if (!hadBinding) { + delete bindings[catchParamName]; + } + } - case "XJSElement": - case "JSXElement": - var openingLines = path.call(print, "openingElement"); + } else { + recursiveScanScope(path, bindings); + } +} - if (n.openingElement.selfClosing) { - assert.ok(!n.closingElement); - return openingLines; +function addPattern(patternPath, bindings) { + var pattern = patternPath.value; + namedTypes.Pattern.assert(pattern); + + if (namedTypes.Identifier.check(pattern)) { + if (hasOwn.call(bindings, pattern.name)) { + bindings[pattern.name].push(patternPath); + } else { + bindings[pattern.name] = [patternPath]; } - var childLines = concat( - path.map(function(childPath) { - var child = childPath.getValue(); + } else if (namedTypes.ObjectPattern && + namedTypes.ObjectPattern.check(pattern)) { + patternPath.get('properties').each(function(propertyPath) { + var property = propertyPath.value; + if (namedTypes.Pattern.check(property)) { + addPattern(propertyPath, bindings); + } else if (namedTypes.Property.check(property)) { + addPattern(propertyPath.get('value'), bindings); + } else if (namedTypes.SpreadProperty && + namedTypes.SpreadProperty.check(property)) { + addPattern(propertyPath.get('argument'), bindings); + } + }); - if (namedTypes.Literal.check(child) && - typeof child.value === "string") { - if (/\S/.test(child.value)) { - return child.value.replace(/^\s+|\s+$/g, ""); - } else if (/\n/.test(child.value)) { - return "\n"; - } - } + } else if (namedTypes.ArrayPattern && + namedTypes.ArrayPattern.check(pattern)) { + patternPath.get('elements').each(function(elementPath) { + var element = elementPath.value; + if (namedTypes.Pattern.check(element)) { + addPattern(elementPath, bindings); + } else if (namedTypes.SpreadElement && + namedTypes.SpreadElement.check(element)) { + addPattern(elementPath.get("argument"), bindings); + } + }); - return print(childPath); - }, "children") - ).indentTail(options.tabWidth); + } else if (namedTypes.PropertyPattern && + namedTypes.PropertyPattern.check(pattern)) { + addPattern(patternPath.get('pattern'), bindings); - var closingLines = path.call(print, "closingElement"); + } else if ((namedTypes.SpreadElementPattern && + namedTypes.SpreadElementPattern.check(pattern)) || + (namedTypes.SpreadPropertyPattern && + namedTypes.SpreadPropertyPattern.check(pattern))) { + addPattern(patternPath.get('argument'), bindings); + } +} - return concat([ - openingLines, - childLines, - closingLines - ]); +Sp.lookup = function(name) { + for (var scope = this; scope; scope = scope.parent) + if (scope.declares(name)) + break; + return scope; +}; - case "XJSOpeningElement": - case "JSXOpeningElement": - var parts = ["<", path.call(print, "name")]; - var attrParts = []; +Sp.getGlobalScope = function() { + var scope = this; + while (!scope.isGlobal) + scope = scope.parent; + return scope; +}; - path.each(function(attrPath) { - attrParts.push(" ", print(attrPath)); - }, "attributes"); +module.exports = Scope; - var attrLines = concat(attrParts); +},{"./node-path":516,"./types":521,"assert":2}],520:[function(require,module,exports){ +var types = require("../lib/types"); +var Type = types.Type; +var builtin = types.builtInTypes; +var isNumber = builtin.number; - var needLineWrap = ( - attrLines.length > 1 || - attrLines.getLineLength(1) > options.wrapColumn - ); +// An example of constructing a new type with arbitrary constraints from +// an existing type. +exports.geq = function(than) { + return new Type(function(value) { + return isNumber.check(value) && value >= than; + }, isNumber + " >= " + than); +}; - if (needLineWrap) { - attrParts.forEach(function(part, i) { - if (part === " ") { - assert.strictEqual(i % 2, 0); - attrParts[i] = "\n"; - } - }); +// Default value-returning functions that may optionally be passed as a +// third argument to Def.prototype.field. +exports.defaults = { + // Functions were used because (among other reasons) that's the most + // elegant way to allow for the emptyArray one always to give a new + // array instance. + "null": function() { return null }, + "emptyArray": function() { return [] }, + "false": function() { return false }, + "true": function() { return true }, + "undefined": function() {} +}; - attrLines = concat(attrParts).indentTail(options.tabWidth); - } +var naiveIsPrimitive = Type.or( + builtin.string, + builtin.number, + builtin.boolean, + builtin.null, + builtin.undefined +); - parts.push(attrLines, n.selfClosing ? " />" : ">"); +exports.isPrimitive = new Type(function(value) { + if (value === null) + return true; + var type = typeof value; + return !(type === "object" || + type === "function"); +}, naiveIsPrimitive.toString()); - return concat(parts); +},{"../lib/types":521}],521:[function(require,module,exports){ +var assert = require("assert"); +var Ap = Array.prototype; +var slice = Ap.slice; +var map = Ap.map; +var each = Ap.forEach; +var Op = Object.prototype; +var objToStr = Op.toString; +var funObjStr = objToStr.call(function(){}); +var strObjStr = objToStr.call(""); +var hasOwn = Op.hasOwnProperty; - case "XJSClosingElement": - case "JSXClosingElement": - return concat([""]); +// A type is an object with a .check method that takes a value and returns +// true or false according to whether the value matches the type. - case "XJSText": - case "JSXText": - return fromString(n.value, options); +function Type(check, name) { + var self = this; + assert.ok(self instanceof Type, self); - case "XJSEmptyExpression": - case "JSXEmptyExpression": - return fromString(""); + // Unfortunately we can't elegantly reuse isFunction and isString, + // here, because this code is executed while defining those types. + assert.strictEqual(objToStr.call(check), funObjStr, + check + " is not a function"); - case "TypeAnnotatedIdentifier": - return concat([ - path.call(print, "annotation"), - " ", - path.call(print, "identifier") - ]); + // The `name` parameter can be either a function or a string. + var nameObjStr = objToStr.call(name); + assert.ok(nameObjStr === funObjStr || + nameObjStr === strObjStr, + name + " is neither a function nor a string"); - case "ClassBody": - if (n.body.length === 0) { - return fromString("{}"); + Object.defineProperties(self, { + name: { value: name }, + check: { + value: function(value, deep) { + var result = check.call(self, value, deep); + if (!result && deep && objToStr.call(deep) === funObjStr) + deep(self, value); + return result; + } } + }); +} - return concat([ - "{\n", - path.call(function(bodyPath) { - return printStatementSequence(bodyPath, options, print); - }, "body").indent(options.tabWidth), - "\n}" - ]); +var Tp = Type.prototype; - case "ClassPropertyDefinition": - var parts = ["static ", path.call(print, "definition")]; - if (!namedTypes.MethodDefinition.check(n.definition)) - parts.push(";"); - return concat(parts); +// Throughout this file we use Object.defineProperty to prevent +// redefinition of exported properties. +exports.Type = Type; - case "ClassProperty": - return concat([ - path.call(print, "key"), - path.call(print, "typeAnnotation"), - ";" - ]); +// Like .check, except that failure triggers an AssertionError. +Tp.assert = function(value, deep) { + if (!this.check(value, deep)) { + var str = shallowStringify(value); + assert.ok(false, str + " does not match type " + this); + return false; + } + return true; +}; - case "ClassDeclaration": - case "ClassExpression": - var parts = ["class"]; +function shallowStringify(value) { + if (isObject.check(value)) + return "{" + Object.keys(value).map(function(key) { + return key + ": " + value[key]; + }).join(", ") + "}"; - if (n.id) { - parts.push( - " ", - path.call(print, "id"), - path.call(print, "typeParameters") - ); - } + if (isArray.check(value)) + return "[" + value.map(shallowStringify).join(", ") + "]"; - if (n.superClass) { - parts.push( - " extends ", - path.call(print, "superClass"), - path.call(print, "superTypeParameters") - ); - } + return JSON.stringify(value); +} - if (n["implements"]) { - parts.push( - " implements ", - fromString(", ").join(path.map(print, "implements")) - ); - } +Tp.toString = function() { + var name = this.name; - parts.push(" ", path.call(print, "body")); + if (isString.check(name)) + return name; - return concat(parts); + if (isFunction.check(name)) + return name.call(this) + ""; - // These types are unprintable because they serve as abstract - // supertypes for other (printable) types. - case "Node": - case "Printable": - case "SourceLocation": - case "Position": - case "Statement": - case "Function": - case "Pattern": - case "Expression": - case "Declaration": - case "Specifier": - case "NamedSpecifier": - case "Comment": // Supertype of Block and Line. - case "MemberTypeAnnotation": // Flow - case "TupleTypeAnnotation": // Flow - case "Type": // Flow - throw new Error("unprintable type: " + JSON.stringify(n.type)); + return name + " type"; +}; - case "Block": // Block comment. - return concat(["/*", fromString(n.value, options), "*/"]); +var builtInCtorFns = []; +var builtInCtorTypes = []; +var builtInTypes = {}; +exports.builtInTypes = builtInTypes; - case "Line": // Line comment. - return concat(["//", fromString(n.value, options)]); +function defBuiltInType(example, name) { + var objStr = objToStr.call(example); - // Type Annotations for Facebook Flow, typically stripped out or - // transformed away before printing. - case "TypeAnnotation": - var parts = []; + var type = new Type(function(value) { + return objToStr.call(value) === objStr; + }, name); - if (n.typeAnnotation) { - if (n.typeAnnotation.type !== "FunctionTypeAnnotation") { - parts.push(": "); - } - parts.push(path.call(print, "typeAnnotation")); - return concat(parts); - } + builtInTypes[name] = type; - return fromString(""); + if (example && typeof example.constructor === "function") { + builtInCtorFns.push(example.constructor); + builtInCtorTypes.push(type); + } - case "AnyTypeAnnotation": - return fromString("any", options); + return type; +} - case "ArrayTypeAnnotation": - return concat([ - path.call(print, "elementType"), - "[]" - ]); +// These types check the underlying [[Class]] attribute of the given +// value, rather than using the problematic typeof operator. Note however +// that no subtyping is considered; so, for instance, isObject.check +// returns false for [], /./, new Date, and null. +var isString = defBuiltInType("truthy", "string"); +var isFunction = defBuiltInType(function(){}, "function"); +var isArray = defBuiltInType([], "array"); +var isObject = defBuiltInType({}, "object"); +var isRegExp = defBuiltInType(/./, "RegExp"); +var isDate = defBuiltInType(new Date, "Date"); +var isNumber = defBuiltInType(3, "number"); +var isBoolean = defBuiltInType(true, "boolean"); +var isNull = defBuiltInType(null, "null"); +var isUndefined = defBuiltInType(void 0, "undefined"); - case "BooleanTypeAnnotation": - return fromString("boolean", options); +// There are a number of idiomatic ways of expressing types, so this +// function serves to coerce them all to actual Type objects. Note that +// providing the name argument is not necessary in most cases. +function toType(from, name) { + // The toType function should of course be idempotent. + if (from instanceof Type) + return from; - case "DeclareClass": - return concat([ - fromString("declare class ", options), - path.call(print, "id"), - " ", - path.call(print, "body"), - ]); + // The Def type is used as a helper for constructing compound + // interface types for AST nodes. + if (from instanceof Def) + return from.type; - case "DeclareFunction": - return concat([ - fromString("declare function ", options), - path.call(print, "id") - ]); + // Support [ElemType] syntax. + if (isArray.check(from)) + return Type.fromArray(from); - case "DeclareModule": - return concat([ - fromString("declare module ", options), - path.call(print, "id"), - " ", - path.call(print, "body"), - ]); + // Support { someField: FieldType, ... } syntax. + if (isObject.check(from)) + return Type.fromObject(from); - case "DeclareVariable": - return concat([ - fromString("declare var ", options), - path.call(print, "id") - ]); + if (isFunction.check(from)) { + var bicfIndex = builtInCtorFns.indexOf(from); + if (bicfIndex >= 0) { + return builtInCtorTypes[bicfIndex]; + } - case "FunctionTypeAnnotation": - // FunctionTypeAnnotation is ambiguous: - // declare function(a: B): void; OR - // var A: (a: B) => void; - var parts = []; - var parent = path.getParentNode(0); - var isArrowFunctionTypeAnnotation = !( - namedTypes.ObjectTypeCallProperty.check(parent) || - namedTypes.DeclareFunction.check(path.getParentNode(2)) - ); + // If isFunction.check(from), and from is not a built-in + // constructor, assume from is a binary predicate function we can + // use to define the type. + return new Type(from, name); + } - var needsColon = - isArrowFunctionTypeAnnotation && - !namedTypes.FunctionTypeParam.check(parent); + // As a last resort, toType returns a type that matches any value that + // is === from. This is primarily useful for literal values like + // toType(null), but it has the additional advantage of allowing + // toType to be a total function. + return new Type(function(value) { + return value === from; + }, isUndefined.check(name) ? function() { + return from + ""; + } : name); +} - if (needsColon) { - parts.push(": "); - } +// Returns a type that matches the given value iff any of type1, type2, +// etc. match the value. +Type.or = function(/* type1, type2, ... */) { + var types = []; + var len = arguments.length; + for (var i = 0; i < len; ++i) + types.push(toType(arguments[i])); - parts.push( - "(", - fromString(", ").join(path.map(print, "params")), - ")" - ); + return new Type(function(value, deep) { + for (var i = 0; i < len; ++i) + if (types[i].check(value, deep)) + return true; + return false; + }, function() { + return types.join(" | "); + }); +}; - // The returnType is not wrapped in a TypeAnnotation, so the colon - // needs to be added separately. - if (n.returnType) { - parts.push( - isArrowFunctionTypeAnnotation ? " => " : ": ", - path.call(print, "returnType") - ); - } +Type.fromArray = function(arr) { + assert.ok(isArray.check(arr)); + assert.strictEqual( + arr.length, 1, + "only one element type is permitted for typed arrays"); + return toType(arr[0]).arrayOf(); +}; - return concat(parts); +Tp.arrayOf = function() { + var elemType = this; + return new Type(function(value, deep) { + return isArray.check(value) && value.every(function(elem) { + return elemType.check(elem, deep); + }); + }, function() { + return "[" + elemType + "]"; + }); +}; - case "FunctionTypeParam": - return concat([ - path.call(print, "name"), - ": ", - path.call(print, "typeAnnotation"), - ]); +Type.fromObject = function(obj) { + var fields = Object.keys(obj).map(function(name) { + return new Field(name, obj[name]); + }); - case "GenericTypeAnnotation": - return concat([ - path.call(print, "id"), - path.call(print, "typeParameters") - ]); + return new Type(function(value, deep) { + return isObject.check(value) && fields.every(function(field) { + return field.type.check(value[field.name], deep); + }); + }, function() { + return "{ " + fields.join(", ") + " }"; + }); +}; - case "InterfaceDeclaration": - var parts = [ - fromString("interface ", options), - path.call(print, "id"), - path.call(print, "typeParameters"), - " " - ]; +function Field(name, type, defaultFn, hidden) { + var self = this; - if (n["extends"]) { - parts.push( - "extends ", - fromString(", ").join(path.map(print, "extends")) - ); - } + assert.ok(self instanceof Field); + isString.assert(name); - parts.push(path.call(print, "body")); + type = toType(type); - return concat(parts); + var properties = { + name: { value: name }, + type: { value: type }, + hidden: { value: !!hidden } + }; - case "ClassImplements": - case "InterfaceExtends": - return concat([ - path.call(print, "id"), - path.call(print, "typeParameters") - ]); + if (isFunction.check(defaultFn)) { + properties.defaultFn = { value: defaultFn }; + } - case "IntersectionTypeAnnotation": - return fromString(" & ").join(path.map(print, "types")); + Object.defineProperties(self, properties); +} - case "NullableTypeAnnotation": - return concat([ - "?", - path.call(print, "typeAnnotation") - ]); +var Fp = Field.prototype; - case "NumberTypeAnnotation": - return fromString("number", options); +Fp.toString = function() { + return JSON.stringify(this.name) + ": " + this.type; +}; - case "ObjectTypeCallProperty": - return path.call(print, "value"); +Fp.getValue = function(obj) { + var value = obj[this.name]; - case "ObjectTypeIndexer": - return concat([ - "[", - path.call(print, "id"), - ": ", - path.call(print, "key"), - "]: ", - path.call(print, "value") - ]); + if (!isUndefined.check(value)) + return value; - case "ObjectTypeProperty": - return concat([ - path.call(print, "key"), - ": ", - path.call(print, "value") - ]); + if (this.defaultFn) + value = this.defaultFn.call(obj); - case "QualifiedTypeIdentifier": - return concat([ - path.call(print, "qualification"), - ".", - path.call(print, "id") - ]); + return value; +}; - case "StringLiteralTypeAnnotation": - return fromString(nodeStr(n.value, options), options); +// Define a type whose name is registered in a namespace (the defCache) so +// that future definitions will return the same type given the same name. +// In particular, this system allows for circular and forward definitions. +// The Def object d returned from Type.def may be used to configure the +// type d.type by calling methods such as d.bases, d.build, and d.field. +Type.def = function(typeName) { + isString.assert(typeName); + return hasOwn.call(defCache, typeName) + ? defCache[typeName] + : defCache[typeName] = new Def(typeName); +}; - case "StringTypeAnnotation": - return fromString("string", options); +// In order to return the same Def instance every time Type.def is called +// with a particular name, those instances need to be stored in a cache. +var defCache = Object.create(null); - case "TypeAlias": - return concat([ - "type ", - path.call(print, "id"), - " = ", - path.call(print, "right") - ]); +function Def(typeName) { + var self = this; + assert.ok(self instanceof Def); - case "TypeCastExpression": - return concat([ - "(", - path.call(print, "expression"), - path.call(print, "typeAnnotation"), - ")" - ]); + Object.defineProperties(self, { + typeName: { value: typeName }, + baseNames: { value: [] }, + ownFields: { value: Object.create(null) }, - case "TypeParameterDeclaration": - case "TypeParameterInstantiation": - return concat([ - "<", - fromString(", ").join(path.map(print, "params")), - ">" - ]); + // These two are populated during finalization. + allSupertypes: { value: Object.create(null) }, // Includes own typeName. + supertypeList: { value: [] }, // Linear inheritance hierarchy. + allFields: { value: Object.create(null) }, // Includes inherited fields. + fieldNames: { value: [] }, // Non-hidden keys of allFields. - case "TypeofTypeAnnotation": - return concat([ - fromString("typeof ", options), - path.call(print, "argument") - ]); + type: { + value: new Type(function(value, deep) { + return self.check(value, deep); + }, typeName) + } + }); +} - case "UnionTypeAnnotation": - return fromString(" | ").join(path.map(print, "types")); +Def.fromValue = function(value) { + if (value && typeof value === "object") { + var type = value.type; + if (typeof type === "string" && + hasOwn.call(defCache, type)) { + var d = defCache[type]; + if (d.finalized) { + return d; + } + } + } - case "VoidTypeAnnotation": - return fromString("void", options); + return null; +}; - // Unhandled types below. If encountered, nodes of these types should - // be either left alone or desugared into AST types that are fully - // supported by the pretty-printer. - case "ClassHeritage": // TODO - case "ComprehensionBlock": // TODO - case "ComprehensionExpression": // TODO - case "Glob": // TODO - case "TaggedTemplateExpression": // TODO - case "TemplateElement": // TODO - case "TemplateLiteral": // TODO - case "GeneratorExpression": // TODO - case "LetStatement": // TODO - case "LetExpression": // TODO - case "GraphExpression": // TODO - case "GraphIndexExpression": // TODO +var Dp = Def.prototype; - // XML types that nobody cares about or needs to print. - case "XMLDefaultDeclaration": - case "XMLAnyName": - case "XMLQualifiedIdentifier": - case "XMLFunctionQualifiedIdentifier": - case "XMLAttributeSelector": - case "XMLFilterExpression": - case "XML": - case "XMLElement": - case "XMLList": - case "XMLEscape": - case "XMLText": - case "XMLStartTag": - case "XMLEndTag": - case "XMLPointTag": - case "XMLName": - case "XMLAttribute": - case "XMLCdata": - case "XMLComment": - case "XMLProcessingInstruction": - default: - debugger; - throw new Error("unknown type: " + JSON.stringify(n.type)); +Dp.isSupertypeOf = function(that) { + if (that instanceof Def) { + assert.strictEqual(this.finalized, true); + assert.strictEqual(that.finalized, true); + return hasOwn.call(that.allSupertypes, this.typeName); + } else { + assert.ok(false, that + " is not a Def"); } +}; - return p; -} - -function printStatementSequence(path, options, print) { - var inClassBody = - namedTypes.ClassBody && - namedTypes.ClassBody.check(path.getParentNode()); +// Note that the list returned by this function is a copy of the internal +// supertypeList, *without* the typeName itself as the first element. +exports.getSupertypeNames = function(typeName) { + assert.ok(hasOwn.call(defCache, typeName)); + var d = defCache[typeName]; + assert.strictEqual(d.finalized, true); + return d.supertypeList.slice(1); +}; - var filtered = []; - path.each(function(stmtPath) { - var i = stmtPath.getName(); - var stmt = stmtPath.getValue(); +// Returns an object mapping from every known type in the defCache to the +// most specific supertype whose name is an own property of the candidates +// object. +exports.computeSupertypeLookupTable = function(candidates) { + var table = {}; + var typeNames = Object.keys(defCache); + var typeNameCount = typeNames.length; - // Just in case the AST has been modified to contain falsy - // "statements," it's safer simply to skip them. - if (!stmt) { - return; + for (var i = 0; i < typeNameCount; ++i) { + var typeName = typeNames[i]; + var d = defCache[typeName]; + assert.strictEqual(d.finalized, true, typeName); + for (var j = 0; j < d.supertypeList.length; ++j) { + var superTypeName = d.supertypeList[j]; + if (hasOwn.call(candidates, superTypeName)) { + table[typeName] = superTypeName; + break; + } } + } - // Skip printing EmptyStatement nodes to avoid leaving stray - // semicolons lying around. - if (stmt.type === "EmptyStatement") { - return; - } + return table; +}; - if (!inClassBody) { - namedTypes.Statement.assert(stmt); - } +Dp.checkAllFields = function(value, deep) { + var allFields = this.allFields; + assert.strictEqual(this.finalized, true, this.typeName); - // We can't hang onto stmtPath outside of this function, because - // it's just a reference to a mutable FastPath object, so we have - // to go ahead and print it here. - filtered.push({ - node: stmt, - printed: print(stmtPath) - }); - }); + function checkFieldByName(name) { + var field = allFields[name]; + var type = field.type; + var child = field.getValue(value); + return type.check(child, deep); + } - var prevTrailingSpace = null; - var len = filtered.length; - var parts = []; + return isObject.check(value) + && Object.keys(allFields).every(checkFieldByName); +}; - filtered.forEach(function(info, i) { - var printed = info.printed; - var stmt = info.node; - var needSemicolon = true; - var multiLine = printed.length > 1; - var notFirst = i > 0; - var notLast = i < len - 1; - var leadingSpace; - var trailingSpace; +Dp.check = function(value, deep) { + assert.strictEqual( + this.finalized, true, + "prematurely checking unfinalized type " + this.typeName); - if (inClassBody) { - if (namedTypes.MethodDefinition.check(stmt) || - (namedTypes.ClassPropertyDefinition.check(stmt) && - namedTypes.MethodDefinition.check(stmt.definition))) { - needSemicolon = false; - } - } + // A Def type can only match an object value. + if (!isObject.check(value)) + return false; - if (needSemicolon) { - // Try to add a semicolon to anything that isn't a method in a - // class body. - printed = maybeAddSemicolon(printed); + var vDef = Def.fromValue(value); + if (!vDef) { + // If we couldn't infer the Def associated with the given value, + // and we expected it to be a SourceLocation or a Position, it was + // probably just missing a "type" field (because Esprima does not + // assign a type property to such nodes). Be optimistic and let + // this.checkAllFields make the final decision. + if (this.typeName === "SourceLocation" || + this.typeName === "Position") { + return this.checkAllFields(value, deep); } - var trueLoc = options.reuseWhitespace && util.getTrueLoc(stmt); - var lines = trueLoc && trueLoc.lines; + // Calling this.checkAllFields for any other type of node is both + // bad for performance and way too forgiving. + return false; + } - if (notFirst) { - if (lines) { - var beforeStart = lines.skipSpaces(trueLoc.start, true); - var beforeStartLine = beforeStart ? beforeStart.line : 1; - var leadingGap = trueLoc.start.line - beforeStartLine; - leadingSpace = Array(leadingGap + 1).join("\n"); - } else { - leadingSpace = multiLine ? "\n\n" : "\n"; - } - } else { - leadingSpace = ""; - } + // If checking deeply and vDef === this, then we only need to call + // checkAllFields once. Calling checkAllFields is too strict when deep + // is false, because then we only care about this.isSupertypeOf(vDef). + if (deep && vDef === this) + return this.checkAllFields(value, deep); - if (notLast) { - if (lines) { - var afterEnd = lines.skipSpaces(trueLoc.end); - var afterEndLine = afterEnd ? afterEnd.line : lines.length; - var trailingGap = afterEndLine - trueLoc.end.line; - trailingSpace = Array(trailingGap + 1).join("\n"); - } else { - trailingSpace = multiLine ? "\n\n" : "\n"; - } - } else { - trailingSpace = ""; - } + // In most cases we rely exclusively on isSupertypeOf to make O(1) + // subtyping determinations. This suffices in most situations outside + // of unit tests, since interface conformance is checked whenever new + // instances are created using builder functions. + if (!this.isSupertypeOf(vDef)) + return false; - parts.push( - maxSpace(prevTrailingSpace, leadingSpace), - printed - ); + // The exception is when deep is true; then, we recursively check all + // fields. + if (!deep) + return true; - if (notLast) { - prevTrailingSpace = trailingSpace; - } else if (trailingSpace) { - parts.push(trailingSpace); - } - }); + // Use the more specific Def (vDef) to perform the deep check, but + // shallow-check fields defined by the less specific Def (this). + return vDef.checkAllFields(value, deep) + && this.checkAllFields(value, false); +}; - return concat(parts); -} +Dp.bases = function() { + var args = slice.call(arguments); + var bases = this.baseNames; -function maxSpace(s1, s2) { - if (!s1 && !s2) { - return fromString(""); + if (this.finalized) { + assert.deepEqual(args, bases); + return this; } - if (!s1) { - return fromString(s2); - } + args.forEach(function(baseName) { + isString.assert(baseName); - if (!s2) { - return fromString(s1); - } + // This indexOf lookup may be O(n), but the typical number of base + // names is very small, and indexOf is a native Array method. + if (bases.indexOf(baseName) < 0) + bases.push(baseName); + }); - var spaceLines1 = fromString(s1); - var spaceLines2 = fromString(s2); + return this; // For chaining. +}; - if (spaceLines2.length > spaceLines1.length) { - return spaceLines2; - } +// False by default until .build(...) is called on an instance. +Object.defineProperty(Dp, "buildable", { value: false }); - return spaceLines1; -} +var builders = {}; +exports.builders = builders; -function printMethod(path, options, print) { - var node = path.getNode(); - var kind = node.kind; - var parts = []; +// This object is used as prototype for any node created by a builder. +var nodePrototype = {}; - namedTypes.FunctionExpression.assert(node.value); +// Call this function to define a new method to be shared by all AST +// nodes. The replaced method (if any) is returned for easy wrapping. +exports.defineMethod = function(name, func) { + var old = nodePrototype[name]; - if (node.value.async) { - parts.push("async "); - } + // Pass undefined as func to delete nodePrototype[name]. + if (isUndefined.check(func)) { + delete nodePrototype[name]; - if (!kind || kind === "init") { - if (node.value.generator) { - parts.push("*"); - } } else { - assert.ok(kind === "get" || kind === "set"); - parts.push(kind, " "); - } + isFunction.assert(func); - var key = path.call(print, "key"); - if (node.computed) { - key = concat(["[", key, "]"]); + Object.defineProperty(nodePrototype, name, { + enumerable: true, // For discoverability. + configurable: true, // For delete proto[name]. + value: func + }); } - parts.push( - key, - path.call(print, "value", "typeParameters"), - "(", - path.call(function(valuePath) { - return printFunctionParams(valuePath, options, print); - }, "value"), - ")", - path.call(print, "value", "returnType"), - " ", - path.call(print, "value", "body") - ); + return old; +}; - return concat(parts); -} +var isArrayOfString = isString.arrayOf(); -function printArgumentsList(path, options, print) { - var printed = path.map(print, "arguments"); +// Calling the .build method of a Def simultaneously marks the type as +// buildable (by defining builders[getBuilderName(typeName)]) and +// specifies the order of arguments that should be passed to the builder +// function to create an instance of the type. +Dp.build = function(/* param1, param2, ... */) { + var self = this; - var joined = fromString(", ").join(printed); - if (joined.getLineLength(1) > options.wrapColumn) { - joined = fromString(",\n").join(printed); - return concat([ - "(\n", - joined.indent(options.tabWidth), - options.trailingComma ? ",\n)" : "\n)" - ]); + var newBuildParams = slice.call(arguments); + isArrayOfString.assert(newBuildParams); + + // Calling Def.prototype.build multiple times has the effect of merely + // redefining this property. + Object.defineProperty(self, "buildParams", { + value: newBuildParams, + writable: false, + enumerable: false, + configurable: true + }); + + if (self.buildable) { + // If this Def is already buildable, update self.buildParams and + // continue using the old builder function. + return self; } - return concat(["(", joined, ")"]); -} + // Every buildable type will have its "type" field filled in + // automatically. This includes types that are not subtypes of Node, + // like SourceLocation, but that seems harmless (TODO?). + self.field("type", String, function() { return self.typeName }); -function printFunctionParams(path, options, print) { - var fun = path.getValue(); - namedTypes.Function.assert(fun); + // Override Dp.buildable for this Def instance. + Object.defineProperty(self, "buildable", { value: true }); - var printed = path.map(print, "params"); + Object.defineProperty(builders, getBuilderName(self.typeName), { + enumerable: true, - if (fun.defaults) { - path.each(function(defExprPath) { - var i = defExprPath.getName(); - var p = printed[i]; - if (p && defExprPath.getValue()) { - printed[i] = concat([p, "=", print(defExprPath)]); - } - }, "defaults"); - } + value: function() { + var args = arguments; + var argc = args.length; + var built = Object.create(nodePrototype); - if (fun.rest) { - printed.push(concat(["...", path.call(print, "rest")])); - } + assert.ok( + self.finalized, + "attempting to instantiate unfinalized type " + self.typeName); - var joined = fromString(", ").join(printed); - if (joined.length > 1 || - joined.getLineLength(1) > options.wrapColumn) { - joined = fromString(",\n").join(printed); - if (options.trailingComma && !fun.rest) { - joined = concat([joined, ",\n"]); - } - return concat(["\n", joined.indent(options.tabWidth)]); - } + function add(param, i) { + if (hasOwn.call(built, param)) + return; - return joined; -} + var all = self.allFields; + assert.ok(hasOwn.call(all, param), param); -function adjustClause(clause, options) { - if (clause.length > 1) - return concat([" ", clause]); + var field = all[param]; + var type = field.type; + var value; - return concat([ - "\n", - maybeAddSemicolon(clause).indent(options.tabWidth) - ]); -} + if (isNumber.check(i) && i < argc) { + value = args[i]; + } else if (field.defaultFn) { + // Expose the partially-built object to the default + // function as its `this` object. + value = field.defaultFn.call(built); + } else { + var message = "no value or default function given for field " + + JSON.stringify(param) + " of " + self.typeName + "(" + + self.buildParams.map(function(name) { + return all[name]; + }).join(", ") + ")"; + assert.ok(false, message); + } -function lastNonSpaceCharacter(lines) { - var pos = lines.lastPos(); - do { - var ch = lines.charAt(pos); - if (/\S/.test(ch)) - return ch; - } while (lines.prevPos(pos)); -} + if (!type.check(value)) { + assert.ok( + false, + shallowStringify(value) + + " does not match field " + field + + " of type " + self.typeName + ); + } -function endsWithBrace(lines) { - return lastNonSpaceCharacter(lines) === "}"; -} + // TODO Could attach getters and setters here to enforce + // dynamic type safety. + built[param] = value; + } -function swapQuotes(str) { - return str.replace(/['"]/g, function(m) { - return m === '"' ? '\'' : '"'; + self.buildParams.forEach(function(param, i) { + add(param, i); + }); + + Object.keys(self.allFields).forEach(function(param) { + add(param); // Use the default value. + }); + + // Make sure that the "type" field was filled automatically. + assert.strictEqual(built.type, self.typeName); + + return built; + } }); -} -function nodeStr(str, options) { - isString.assert(str); - switch (options.quote) { - case "auto": - var double = JSON.stringify(str); - var single = swapQuotes(JSON.stringify(swapQuotes(str))); - return double.length > single.length ? single : double; - case "single": - return swapQuotes(JSON.stringify(swapQuotes(str))); - case "double": - default: - return JSON.stringify(str); - } + return self; // For chaining. +}; + +function getBuilderName(typeName) { + return typeName.replace(/^[A-Z]+/, function(upperCasePrefix) { + var len = upperCasePrefix.length; + switch (len) { + case 0: return ""; + // If there's only one initial capital letter, just lower-case it. + case 1: return upperCasePrefix.toLowerCase(); + default: + // If there's more than one initial capital letter, lower-case + // all but the last one, so that XMLDefaultDeclaration (for + // example) becomes xmlDefaultDeclaration. + return upperCasePrefix.slice( + 0, len - 1).toLowerCase() + + upperCasePrefix.charAt(len - 1); + } + }); } +exports.getBuilderName = getBuilderName; -function maybeAddSemicolon(lines) { - var eoc = lastNonSpaceCharacter(lines); - if (!eoc || "\n};".indexOf(eoc) < 0) - return concat([lines, ";"]); - return lines; +function getStatementBuilderName(typeName) { + typeName = getBuilderName(typeName); + return typeName.replace(/(Expression)?$/, "Statement"); } +exports.getStatementBuilderName = getStatementBuilderName; -},{"./comments":506,"./fast-path":507,"./lines":508,"./options":510,"./patcher":512,"./types":514,"./util":515,"assert":213,"source-map":530}],514:[function(require,module,exports){ -var types = require("ast-types"); -var def = types.Type.def; +// The reason fields are specified using .field(...) instead of an object +// literal syntax is somewhat subtle: the object literal syntax would +// support only one key and one value, but with .field(...) we can pass +// any number of arguments to specify the field. +Dp.field = function(name, type, defaultFn, hidden) { + if (this.finalized) { + console.error("Ignoring attempt to redefine field " + + JSON.stringify(name) + " of finalized type " + + JSON.stringify(this.typeName)); + return this; + } + this.ownFields[name] = new Field(name, type, defaultFn, hidden); + return this; // For chaining. +}; -def("File") - .bases("Node") - .build("program") - .field("program", def("Program")); +var namedTypes = {}; +exports.namedTypes = namedTypes; -types.finalize(); +// Like Object.keys, but aware of what fields each AST type should have. +function getFieldNames(object) { + var d = Def.fromValue(object); + if (d) { + return d.fieldNames.slice(0); + } -module.exports = types; + if ("type" in object) { + assert.ok( + false, + "did not recognize object of type " + + JSON.stringify(object.type) + ); + } -},{"ast-types":194}],515:[function(require,module,exports){ -var assert = require("assert"); -var types = require("./types"); -var getFieldValue = types.getFieldValue; -var n = types.namedTypes; -var sourceMap = require("source-map"); -var SourceMapConsumer = sourceMap.SourceMapConsumer; -var SourceMapGenerator = sourceMap.SourceMapGenerator; -var hasOwn = Object.prototype.hasOwnProperty; + return Object.keys(object); +} +exports.getFieldNames = getFieldNames; -function getUnionOfKeys() { - var result = {}; - var argc = arguments.length; - for (var i = 0; i < argc; ++i) { - var keys = Object.keys(arguments[i]); - var keyCount = keys.length; - for (var j = 0; j < keyCount; ++j) { - result[keys[j]] = true; +// Get the value of an object property, taking object.type and default +// functions into account. +function getFieldValue(object, fieldName) { + var d = Def.fromValue(object); + if (d) { + var field = d.allFields[fieldName]; + if (field) { + return field.getValue(object); } } - return result; -} -exports.getUnionOfKeys = getUnionOfKeys; -function comparePos(pos1, pos2) { - return (pos1.line - pos2.line) || (pos1.column - pos2.column); + return object[fieldName]; } -exports.comparePos = comparePos; +exports.getFieldValue = getFieldValue; -function copyPos(pos) { - return { - line: pos.line, - column: pos.column - }; -} -exports.copyPos = copyPos; +// Iterate over all defined fields of an object, including those missing +// or undefined, passing each field name and effective value (as returned +// by getFieldValue) to the callback. If the object has no corresponding +// Def, the callback will never be called. +exports.eachField = function(object, callback, context) { + getFieldNames(object).forEach(function(name) { + callback.call(this, name, getFieldValue(object, name)); + }, context); +}; + +// Similar to eachField, except that iteration stops as soon as the +// callback returns a truthy value. Like Array.prototype.some, the final +// result is either true or false to indicates whether the callback +// returned true for any element or not. +exports.someField = function(object, callback, context) { + return getFieldNames(object).some(function(name) { + return callback.call(this, name, getFieldValue(object, name)); + }, context); +}; -exports.composeSourceMaps = function(formerMap, latterMap) { - if (formerMap) { - if (!latterMap) { - return formerMap; - } - } else { - return latterMap || null; - } +// This property will be overridden as true by individual Def instances +// when they are finalized. +Object.defineProperty(Dp, "finalized", { value: false }); - var smcFormer = new SourceMapConsumer(formerMap); - var smcLatter = new SourceMapConsumer(latterMap); - var smg = new SourceMapGenerator({ - file: latterMap.file, - sourceRoot: latterMap.sourceRoot - }); +Dp.finalize = function() { + var self = this; - var sourcesToContents = {}; + // It's not an error to finalize a type more than once, but only the + // first call to .finalize does anything. + if (!self.finalized) { + var allFields = self.allFields; + var allSupertypes = self.allSupertypes; - smcLatter.eachMapping(function(mapping) { - var origPos = smcFormer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn + self.baseNames.forEach(function(name) { + var def = defCache[name]; + if (def instanceof Def) { + def.finalize(); + extend(allFields, def.allFields); + extend(allSupertypes, def.allSupertypes); + } else { + var message = "unknown supertype name " + + JSON.stringify(name) + + " for subtype " + + JSON.stringify(self.typeName); + assert.ok(false, message); + } }); - var sourceName = origPos.source; - if (sourceName === null) { - return; + // TODO Warn if fields are overridden with incompatible types. + extend(allFields, self.ownFields); + allSupertypes[self.typeName] = self; + + self.fieldNames.length = 0; + for (var fieldName in allFields) { + if (hasOwn.call(allFields, fieldName) && + !allFields[fieldName].hidden) { + self.fieldNames.push(fieldName); + } } - smg.addMapping({ - source: sourceName, - original: copyPos(origPos), - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - }, - name: mapping.name + // Types are exported only once they have been finalized. + Object.defineProperty(namedTypes, self.typeName, { + enumerable: true, + value: self.type }); - var sourceContent = smcFormer.sourceContentFor(sourceName); - if (sourceContent && !hasOwn.call(sourcesToContents, sourceName)) { - sourcesToContents[sourceName] = sourceContent; - smg.setSourceContent(sourceName, sourceContent); - } - }); + Object.defineProperty(self, "finalized", { value: true }); - return smg.toJSON(); -}; + // A linearization of the inheritance hierarchy. + populateSupertypeList(self.typeName, self.supertypeList); -exports.getTrueLoc = function(node) { - // It's possible that node is newly-created (not parsed by Esprima), - // in which case it probably won't have a .loc property (or an - // .original property for that matter). That's fine; we'll just - // pretty-print it as usual. - if (!node.loc) { - return null; + if (self.buildable && self.supertypeList.lastIndexOf("Expression") >= 0) { + wrapExpressionBuilderWithStatement(self.typeName); + } } +}; - if (!node.comments) { - // If the node has no comments, regard node.loc as true. - return node.loc; - } +// Adds an additional builder for Expression subtypes +// that wraps the built Expression in an ExpressionStatements. +function wrapExpressionBuilderWithStatement(typeName) { + var wrapperName = getStatementBuilderName(typeName); - var start = node.loc.start; - var end = node.loc.end; + // skip if the builder already exists + if (builders[wrapperName]) return; - // If the node has any comments, their locations might contribute to - // the true start/end positions of the node. - node.comments.forEach(function(comment) { - if (comment.loc) { - if (comparePos(comment.loc.start, start) < 0) { - start = comment.loc.start; - } + // the builder function to wrap with builders.ExpressionStatement + var wrapped = builders[getBuilderName(typeName)]; - if (comparePos(end, comment.loc.end) < 0) { - end = comment.loc.end; - } - } - }); + // skip if there is nothing to wrap + if (!wrapped) return; - return { - lines: node.loc.lines, - start: start, - end: end + builders[wrapperName] = function() { + return builders.expressionStatement(wrapped.apply(builders, arguments)); }; -}; +} -exports.fixFaultyLocations = function(node) { - if ((n.MethodDefinition && n.MethodDefinition.check(node)) || - (n.Property.check(node) && (node.method || node.shorthand))) { - // If the node is a MethodDefinition or a .method or .shorthand - // Property, then the location information stored in - // node.value.loc is very likely untrustworthy (just the {body} - // part of a method, or nothing in the case of shorthand - // properties), so we null out that information to prevent - // accidental reuse of bogus source code during reprinting. - node.value.loc = null; +function populateSupertypeList(typeName, list) { + list.length = 0; + list.push(typeName); - if (n.FunctionExpression.check(node.value)) { - // FunctionExpression method values should be anonymous, - // because their .id fields are ignored anyway. - node.value.id = null; - } - } + var lastSeen = Object.create(null); - var loc = node.loc; - if (loc) { - if (loc.start.line < 1) { - loc.start.line = 1; - } + for (var pos = 0; pos < list.length; ++pos) { + typeName = list[pos]; + var d = defCache[typeName]; + assert.strictEqual(d.finalized, true); - if (loc.end.line < 1) { - loc.end.line = 1; + // If we saw typeName earlier in the breadth-first traversal, + // delete the last-seen occurrence. + if (hasOwn.call(lastSeen, typeName)) { + delete list[lastSeen[typeName]]; } - } -}; -},{"./types":514,"assert":213,"source-map":530}],516:[function(require,module,exports){ -(function (process){ -var types = require("./lib/types"); -var parse = require("./lib/parser").parse; -var Printer = require("./lib/printer").Printer; + // Record the new index of the last-seen occurrence of typeName. + lastSeen[typeName] = pos; -function print(node, options) { - return new Printer(options).print(node); -} + // Enqueue the base names of this type. + list.push.apply(list, d.baseNames); + } -function prettyPrint(node, options) { - return new Printer(options).printGenerically(node); -} + // Compaction loop to remove array holes. + for (var to = 0, from = to, len = list.length; from < len; ++from) { + if (hasOwn.call(list, from)) { + list[to++] = list[from]; + } + } -function run(transformer, options) { - return runFile(process.argv[2], transformer, options); + list.length = to; } -function runFile(path, transformer, options) { - require("fs").readFile(path, "utf-8", function(err, code) { - if (err) { - console.error(err); - return; - } - - runString(code, transformer, options); +function extend(into, from) { + Object.keys(from).forEach(function(name) { + into[name] = from[name]; }); -} -function defaultWriteback(output) { - process.stdout.write(output); -} + return into; +}; -function runString(code, transformer, options) { - var writeback = options && options.writeback || defaultWriteback; - transformer(parse(code, options), function(node) { - writeback(print(node, options).code); +exports.finalize = function() { + Object.keys(defCache).forEach(function(name) { + defCache[name].finalize(); }); -} - -Object.defineProperties(exports, { - /** - * Parse a string of code into an augmented syntax tree suitable for - * arbitrary modification and reprinting. - */ - parse: { - enumerable: true, - value: parse - }, +}; - /** - * Traverse and potentially modify an abstract syntax tree using a - * convenient visitor syntax: - * - * recast.visit(ast, { - * names: [], - * visitIdentifier: function(path) { - * var node = path.value; - * this.visitor.names.push(node.name); - * this.traverse(path); - * } - * }); - */ - visit: { - enumerable: true, - value: types.visit - }, +},{"assert":2}],522:[function(require,module,exports){ +var types = require("./lib/types"); - /** - * Reprint a modified syntax tree using as much of the original source - * code as possible. - */ - print: { - enumerable: true, - value: print - }, +// This core module of AST types captures ES5 as it is parsed today by +// git://github.com/ariya/esprima.git#master. +require("./def/core"); - /** - * Print without attempting to reuse any original source code. - */ - prettyPrint: { - enumerable: false, - value: prettyPrint - }, +// Feel free to add to or remove from this list of extension modules to +// configure the precise type hierarchy that you need. +require("./def/es6"); +require("./def/es7"); +require("./def/mozilla"); +require("./def/e4x"); +require("./def/fb-harmony"); +require("./def/esprima"); +require("./def/babel"); - /** - * Customized version of require("ast-types"). - */ - types: { - enumerable: false, - value: types - }, +types.finalize(); - /** - * Convenient command-line interface (see e.g. example/add-braces). - */ - run: { - enumerable: false, - value: run - } -}); +exports.Type = types.Type; +exports.builtInTypes = types.builtInTypes; +exports.namedTypes = types.namedTypes; +exports.builders = types.builders; +exports.defineMethod = types.defineMethod; +exports.getFieldNames = types.getFieldNames; +exports.getFieldValue = types.getFieldValue; +exports.eachField = types.eachField; +exports.someField = types.someField; +exports.getSupertypeNames = types.getSupertypeNames; +exports.astNodesAreEquivalent = require("./lib/equiv"); +exports.finalize = types.finalize; +exports.NodePath = require("./lib/node-path"); +exports.PathVisitor = require("./lib/path-visitor"); +exports.visit = exports.PathVisitor.visit; -}).call(this,require('_process')) -},{"./lib/parser":511,"./lib/printer":513,"./lib/types":514,"_process":223,"fs":212}],517:[function(require,module,exports){ +},{"./def/babel":507,"./def/core":508,"./def/e4x":509,"./def/es6":510,"./def/es7":511,"./def/esprima":512,"./def/fb-harmony":513,"./def/mozilla":514,"./lib/equiv":515,"./lib/node-path":516,"./lib/path-visitor":517,"./lib/types":521}],523:[function(require,module,exports){ (function (process){ var Stream = require('stream') @@ -57814,7 +61214,7 @@ function through (write, end, opts) { }).call(this,require('_process')) -},{"_process":223,"stream":235}],518:[function(require,module,exports){ +},{"_process":12,"stream":24}],524:[function(require,module,exports){ (function (process,global){ /** * Copyright (c) 2014, Facebook, Inc. @@ -57952,9 +61352,24 @@ function through (write, end, opts) { return value instanceof AwaitArgument ? Promise.resolve(value.arg).then(invokeNext, invokeThrow) : Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. result.value = unwrapped; return result; - }, invokeThrow); + }); } if (typeof process === "object" && process.domain) { @@ -57987,9 +61402,8 @@ function through (write, end, opts) { }); // Avoid propagating enqueueResult failures to Promises returned by - // later invocations of the iterator, and call generator.return() to - // allow the generator a chance to clean up. - previousPromise = enqueueResult["catch"](invokeReturn); + // later invocations of the iterator. + previousPromise = enqueueResult["catch"](function(ignored){}); return enqueueResult; } @@ -58025,6 +61439,10 @@ function through (write, end, opts) { } if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + // Be forgiving, per 25.3.3.3.3 of the spec: // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume return doneResult(); @@ -58098,7 +61516,7 @@ function through (write, end, opts) { if (state === GenStateSuspendedYield) { context.sent = arg; } else { - delete context.sent; + context.sent = undefined; } } else if (method === "throw") { @@ -58194,7 +61612,7 @@ function through (write, end, opts) { // locations where there is no enclosing try statement. this.tryEntries = [{ tryLoc: "root" }]; tryLocsList.forEach(pushTryEntry, this); - this.reset(); + this.reset(true); } runtime.keys = function(object) { @@ -58267,7 +61685,7 @@ function through (write, end, opts) { Context.prototype = { constructor: Context, - reset: function() { + reset: function(skipTempReset) { this.prev = 0; this.next = 0; this.sent = undefined; @@ -58276,12 +61694,15 @@ function through (write, end, opts) { this.tryEntries.forEach(resetTryEntry); - // Pre-initialize at least 20 temporary variables to enable hidden - // class optimizations for simple generators. - for (var tempIndex = 0, tempName; - hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20; - ++tempIndex) { - this[tempName] = null; + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } } }, @@ -58448,7 +61869,7 @@ function through (write, end, opts) { ); }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":223}],519:[function(require,module,exports){ +},{"_process":12}],525:[function(require,module,exports){ // Generated by `/scripts/character-class-escape-sets.js`. Do not edit. var regenerate = require('regenerate'); @@ -58554,7 +61975,7 @@ exports.UNICODE_IGNORE_CASE = { .addRange(0x7B, 0x10FFFF) }; -},{"regenerate":521}],520:[function(require,module,exports){ +},{"regenerate":527}],526:[function(require,module,exports){ module.exports={ "75": 8490, "83": 383, @@ -58852,7 +62273,7 @@ module.exports={ "71903": 71871 } -},{}],521:[function(require,module,exports){ +},{}],527:[function(require,module,exports){ (function (global){ /*! https://mths.be/regenerate v1.2.0 by @mathias | MIT license */ ;(function(root) { @@ -60014,7 +63435,7 @@ module.exports={ }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],522:[function(require,module,exports){ +},{}],528:[function(require,module,exports){ (function (global){ /*! * RegJSGen @@ -60426,7 +63847,7 @@ module.exports={ }.call(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],523:[function(require,module,exports){ +},{}],529:[function(require,module,exports){ // regjsparser // // ================================================================== @@ -61375,7 +64796,7 @@ module.exports={ }()); -},{}],524:[function(require,module,exports){ +},{}],530:[function(require,module,exports){ var generate = require('regjsgen').generate; var parse = require('regjsparser').parse; var regenerate = require('regenerate'); @@ -61570,7 +64991,7 @@ module.exports = function(pattern, flags) { return generate(tree); }; -},{"./data/character-class-escape-sets.js":519,"./data/iu-mappings.json":520,"regenerate":521,"regjsgen":522,"regjsparser":523}],525:[function(require,module,exports){ +},{"./data/character-class-escape-sets.js":525,"./data/iu-mappings.json":526,"regenerate":527,"regjsgen":528,"regjsparser":529}],531:[function(require,module,exports){ 'use strict'; var isFinite = require('is-finite'); @@ -61596,15 +65017,15 @@ module.exports = function (str, n) { return ret; }; -},{"is-finite":526}],526:[function(require,module,exports){ -arguments[4][351][0].apply(exports,arguments) -},{"dup":351,"number-is-nan":527}],527:[function(require,module,exports){ -arguments[4][352][0].apply(exports,arguments) -},{"dup":352}],528:[function(require,module,exports){ +},{"is-finite":532}],532:[function(require,module,exports){ +arguments[4][341][0].apply(exports,arguments) +},{"dup":341,"number-is-nan":533}],533:[function(require,module,exports){ +arguments[4][342][0].apply(exports,arguments) +},{"dup":342}],534:[function(require,module,exports){ 'use strict'; module.exports = /^#!.*/; -},{}],529:[function(require,module,exports){ +},{}],535:[function(require,module,exports){ 'use strict'; module.exports = function (str) { var isExtendedLengthPath = /^\\\\\?\\/.test(str); @@ -61617,7 +65038,7 @@ module.exports = function (str) { return str.replace(/\\/g, '/'); }; -},{}],530:[function(require,module,exports){ +},{}],536:[function(require,module,exports){ /* * Copyright 2009-2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE.txt or: @@ -61627,7 +65048,7 @@ exports.SourceMapGenerator = require('./source-map/source-map-generator').Source exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; exports.SourceNode = require('./source-map/source-node').SourceNode; -},{"./source-map/source-map-consumer":536,"./source-map/source-map-generator":537,"./source-map/source-node":538}],531:[function(require,module,exports){ +},{"./source-map/source-map-consumer":543,"./source-map/source-map-generator":544,"./source-map/source-node":545}],537:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -61663,6 +65084,16 @@ define(function (require, exports, module) { return set; }; + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return Object.getOwnPropertyNames(this._set).length; + }; + /** * Add the given string to this set. * @@ -61726,7 +65157,7 @@ define(function (require, exports, module) { }); -},{"./util":539,"amdefine":540}],532:[function(require,module,exports){ +},{"./util":546,"amdefine":547}],538:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -61856,7 +65287,12 @@ define(function (require, exports, module) { if (aIndex >= strLen) { throw new Error("Expected more digits in base 64 VLQ value."); } - digit = base64.decode(aStr.charAt(aIndex++)); + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + continuation = !!(digit & VLQ_CONTINUATION_BIT); digit &= VLQ_BASE_MASK; result = result + (digit << shift); @@ -61869,7 +65305,7 @@ define(function (require, exports, module) { }); -},{"./base64":533,"amdefine":540}],533:[function(require,module,exports){ +},{"./base64":539,"amdefine":547}],539:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -61881,39 +65317,70 @@ if (typeof define !== 'function') { } define(function (require, exports, module) { - var charToIntMap = {}; - var intToCharMap = {}; - - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' - .split('') - .forEach(function (ch, index) { - charToIntMap[ch] = index; - intToCharMap[index] = ch; - }); + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); /** * Encode an integer in the range of 0 to 63 to a single base 64 digit. */ - exports.encode = function base64_encode(aNumber) { - if (aNumber in intToCharMap) { - return intToCharMap[aNumber]; + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; } throw new TypeError("Must be between 0 and 63: " + aNumber); }; /** - * Decode a single base 64 digit to an integer. + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. */ - exports.decode = function base64_decode(aChar) { - if (aChar in charToIntMap) { - return charToIntMap[aChar]; + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; } - throw new TypeError("Not a valid base 64 digit: " + aChar); + + // Invalid base64 digit. + return -1; }; }); -},{"amdefine":540}],534:[function(require,module,exports){ +},{"amdefine":547}],540:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -62032,7 +65499,7 @@ define(function (require, exports, module) { }); -},{"amdefine":540}],535:[function(require,module,exports){ +},{"amdefine":547}],541:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2014 Mozilla Foundation and contributors @@ -62057,7 +65524,7 @@ define(function (require, exports, module) { var columnA = mappingA.generatedColumn; var columnB = mappingB.generatedColumn; return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositions(mappingA, mappingB) <= 0; + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; } /** @@ -62110,7 +65577,7 @@ define(function (require, exports, module) { */ MappingList.prototype.toArray = function MappingList_toArray() { if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositions); + this._array.sort(util.compareByGeneratedPositionsInflated); this._sorted = true; } return this._array; @@ -62120,7 +65587,129 @@ define(function (require, exports, module) { }); -},{"./util":539,"amdefine":540}],536:[function(require,module,exports){ +},{"./util":546,"amdefine":547}],542:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + +}); + +},{"amdefine":547}],543:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -62136,6 +65725,7 @@ define(function (require, exports, module) { var binarySearch = require('./binary-search'); var ArraySet = require('./array-set').ArraySet; var base64VLQ = require('./base64-vlq'); + var quickSort = require('./quick-sort').quickSort; function SourceMapConsumer(aSourceMap) { var sourceMap = aSourceMap; @@ -62191,8 +65781,6 @@ define(function (require, exports, module) { Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { get: function () { if (!this.__generatedMappings) { - this.__generatedMappings = []; - this.__originalMappings = []; this._parseMappings(this._mappings, this.sourceRoot); } @@ -62204,8 +65792,6 @@ define(function (require, exports, module) { Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { get: function () { if (!this.__originalMappings) { - this.__generatedMappings = []; - this.__originalMappings = []; this._parseMappings(this._mappings, this.sourceRoot); } @@ -62213,8 +65799,8 @@ define(function (require, exports, module) { } }); - SourceMapConsumer.prototype._nextCharIsMappingSeparator = - function SourceMapConsumer_nextCharIsMappingSeparator(aStr, index) { + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { var c = aStr.charAt(index); return c === ";" || c === ","; }; @@ -62270,7 +65856,7 @@ define(function (require, exports, module) { var sourceRoot = this.sourceRoot; mappings.map(function (mapping) { - var source = mapping.source; + var source = mapping.source === null ? null : this._sources.at(mapping.source); if (source != null && sourceRoot != null) { source = util.join(sourceRoot, source); } @@ -62280,16 +65866,18 @@ define(function (require, exports, module) { generatedColumn: mapping.generatedColumn, originalLine: mapping.originalLine, originalColumn: mapping.originalColumn, - name: mapping.name + name: mapping.name === null ? null : this._names.at(mapping.name) }; - }).forEach(aCallback, context); + }, this).forEach(aCallback, context); }; /** * Returns all generated line and column information for the original source, * line, and column provided. If no column is provided, returns all mappings - * corresponding to a single line. Otherwise, returns all mappings - * corresponding to a single line and column. + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. * * The only argument is an object with the following properties: * @@ -62304,19 +65892,25 @@ define(function (require, exports, module) { */ SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping // returns the index of the closest mapping less than the needle. By // setting needle.originalColumn to 0, we thus find the last mapping for // the given line, provided such a mapping exists. var needle = { source: util.getArg(aArgs, 'source'), - originalLine: util.getArg(aArgs, 'line'), + originalLine: line, originalColumn: util.getArg(aArgs, 'column', 0) }; if (this.sourceRoot != null) { needle.source = util.relative(this.sourceRoot, needle.source); } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); var mappings = []; @@ -62328,22 +65922,41 @@ define(function (require, exports, module) { binarySearch.LEAST_UPPER_BOUND); if (index >= 0) { var mapping = this._originalMappings[index]; - var originalLine = mapping.originalLine; - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line. Since mappings are sorted, this is - // guaranteed to find all mappings for the line we are searching for. - while (mapping && mapping.originalLine === originalLine && - (aArgs.column === undefined || - mapping.originalColumn === originalColumn)) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - mapping = this._originalMappings[++index]; + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } } } @@ -62436,16 +66049,44 @@ define(function (require, exports, module) { function SourceMapConsumer_fromSourceMap(aSourceMap) { var smc = Object.create(BasicSourceMapConsumer.prototype); - smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); smc.sourceRoot = aSourceMap._sourceRoot; smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot); smc.file = aSourceMap._file; - smc.__generatedMappings = aSourceMap._mappings.toArray().slice(); - smc.__originalMappings = aSourceMap._mappings.toArray().slice() - .sort(util.compareByOriginalPositions); + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); return smc; }; @@ -62466,6 +66107,18 @@ define(function (require, exports, module) { } }); + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + /** * Parse the mappings in a string in to a data structure which we can easily * query (the ordered arrays in the `this.__generatedMappings` and @@ -62481,21 +66134,23 @@ define(function (require, exports, module) { var previousName = 0; var length = aStr.length; var index = 0; - var cachedValues = {}; + var cachedSegments = {}; var temp = {}; - var mapping, str, values, end, value; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; while (index < length) { if (aStr.charAt(index) === ';') { generatedLine++; - ++index; + index++; previousGeneratedColumn = 0; } else if (aStr.charAt(index) === ',') { - ++index; + index++; } else { - mapping = {}; + mapping = new Mapping(); mapping.generatedLine = generatedLine; // Because each offset is encoded relative to the previous one, @@ -62503,68 +66158,74 @@ define(function (require, exports, module) { // fact by caching the parsed variable length fields of each segment, // allowing us to avoid a second parse if we encounter the same // segment again. - for (end = index; end < length; ++end) { - if (this._nextCharIsMappingSeparator(aStr, end)) { + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { break; } } str = aStr.slice(index, end); - values = cachedValues[str]; - if (values) { + segment = cachedSegments[str]; + if (segment) { index += str.length; } else { - values = []; + segment = []; while (index < end) { base64VLQ.decode(aStr, index, temp); value = temp.value; index = temp.rest; - values.push(value); + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); } - cachedValues[str] = values; + + cachedSegments[str] = segment; } // Generated column. - mapping.generatedColumn = previousGeneratedColumn + values[0]; + mapping.generatedColumn = previousGeneratedColumn + segment[0]; previousGeneratedColumn = mapping.generatedColumn; - if (values.length > 1) { + if (segment.length > 1) { // Original source. - mapping.source = this._sources.at(previousSource + values[1]); - previousSource += values[1]; - if (values.length === 2) { - throw new Error('Found a source, but no line and column'); - } + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; // Original line. - mapping.originalLine = previousOriginalLine + values[2]; + mapping.originalLine = previousOriginalLine + segment[2]; previousOriginalLine = mapping.originalLine; // Lines are stored 0-based mapping.originalLine += 1; - if (values.length === 3) { - throw new Error('Found a source and line, but no column'); - } // Original column. - mapping.originalColumn = previousOriginalColumn + values[3]; + mapping.originalColumn = previousOriginalColumn + segment[3]; previousOriginalColumn = mapping.originalColumn; - if (values.length > 4) { + if (segment.length > 4) { // Original name. - mapping.name = this._names.at(previousName + values[4]); - previousName += values[4]; + mapping.name = previousName + segment[4]; + previousName += segment[4]; } } - this.__generatedMappings.push(mapping); + generatedMappings.push(mapping); if (typeof mapping.originalLine === 'number') { - this.__originalMappings.push(mapping); + originalMappings.push(mapping); } } } - this.__generatedMappings.sort(util.compareByGeneratedPositions); - this.__originalMappings.sort(util.compareByOriginalPositions); + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; }; /** @@ -62650,7 +66311,7 @@ define(function (require, exports, module) { this._generatedMappings, "generatedLine", "generatedColumn", - util.compareByGeneratedPositions, + util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) ); @@ -62659,14 +66320,21 @@ define(function (require, exports, module) { if (mapping.generatedLine === needle.generatedLine) { var source = util.getArg(mapping, 'source', null); - if (source != null && this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); } return { source: source, line: util.getArg(mapping, 'originalLine', null), column: util.getArg(mapping, 'originalColumn', null), - name: util.getArg(mapping, 'name', null) + name: name }; } } @@ -62679,6 +66347,19 @@ define(function (require, exports, module) { }; }; + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + /** * Returns the original source content. The only argument is the url of the * original source file. Returns null if no original source content is @@ -62750,16 +66431,25 @@ define(function (require, exports, module) { */ BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + var needle = { - source: util.getArg(aArgs, 'source'), + source: source, originalLine: util.getArg(aArgs, 'line'), originalColumn: util.getArg(aArgs, 'column') }; - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - var index = this._findMapping( needle, this._originalMappings, @@ -62848,6 +66538,9 @@ define(function (require, exports, module) { throw new Error('Unsupported version: ' + version); } + this._sources = new ArraySet(); + this._names = new ArraySet(); + var lastOffset = { line: -1, column: 0 @@ -62959,6 +66652,17 @@ define(function (require, exports, module) { }); }; + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + /** * Returns the original source content. The only argument is the url of the * original source file. Returns null if no original source content is @@ -63041,12 +66745,16 @@ define(function (require, exports, module) { for (var j = 0; j < sectionMappings.length; j++) { var mapping = sectionMappings[i]; - var source = mapping.source; - var sourceRoot = section.consumer.sourceRoot; - - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); // The mappings coming from the consumer for the section have // generated positions relative to the start of the section, so we @@ -63062,7 +66770,7 @@ define(function (require, exports, module) { : 0, originalLine: mapping.originalLine, originalColumn: mapping.originalColumn, - name: mapping.name + name: name }; this.__generatedMappings.push(adjustedMapping); @@ -63072,15 +66780,15 @@ define(function (require, exports, module) { }; }; - this.__generatedMappings.sort(util.compareByGeneratedPositions); - this.__originalMappings.sort(util.compareByOriginalPositions); - }; + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; }); -},{"./array-set":531,"./base64-vlq":532,"./binary-search":534,"./util":539,"amdefine":540}],537:[function(require,module,exports){ +},{"./array-set":537,"./base64-vlq":538,"./binary-search":540,"./quick-sort":542,"./util":546,"amdefine":547}],544:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -63380,7 +67088,6 @@ define(function (require, exports, module) { var mapping; var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { mapping = mappings[i]; @@ -63393,7 +67100,7 @@ define(function (require, exports, module) { } else { if (i > 0) { - if (!util.compareByGeneratedPositions(mapping, mappings[i - 1])) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { continue; } result += ','; @@ -63482,7 +67189,7 @@ define(function (require, exports, module) { }); -},{"./array-set":531,"./base64-vlq":532,"./mapping-list":535,"./util":539,"amdefine":540}],538:[function(require,module,exports){ +},{"./array-set":537,"./base64-vlq":538,"./mapping-list":541,"./util":546,"amdefine":547}],545:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -63898,7 +67605,7 @@ define(function (require, exports, module) { }); -},{"./source-map-generator":537,"./util":539,"amdefine":540}],539:[function(require,module,exports){ +},{"./source-map-generator":544,"./util":546,"amdefine":547}],546:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors @@ -64099,15 +67806,30 @@ define(function (require, exports, module) { aRoot = aRoot.replace(/\/$/, ''); - // XXX: It is possible to remove this block, and the tests still pass! - var url = urlParse(aRoot); - if (aPath.charAt(0) == "/" && url && url.path == "/") { - return aPath.slice(1); + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; } - return aPath.indexOf(aRoot + '/') === 0 - ? aPath.substr(aRoot.length + 1) - : aPath; + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); } exports.relative = relative; @@ -64130,12 +67852,6 @@ define(function (require, exports, module) { } exports.fromSetString = fromSetString; - function strcmp(aStr1, aStr2) { - var s1 = aStr1 || ""; - var s2 = aStr2 || ""; - return (s1 > s2) - (s1 < s2); - } - /** * Comparator between two mappings where the original positions are compared. * @@ -64145,84 +67861,126 @@ define(function (require, exports, module) { * stubbed out mapping. */ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp; - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { + if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp || onlyCompareOriginal) { + if (cmp !== 0 || onlyCompareOriginal) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp) { + if (cmp !== 0) { return cmp; } cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { + if (cmp !== 0) { return cmp; } - return strcmp(mappingA.name, mappingB.name); + return mappingA.name - mappingB.name; }; exports.compareByOriginalPositions = compareByOriginalPositions; /** - * Comparator between two mappings where the generated positions are - * compared. + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. * * Optionally pass in `true` as `onlyCompareGenerated` to consider two * mappings with the same generated line and column, but different * source/name/original line and column the same. Useful when searching for a * mapping with a stubbed out mapping. */ - function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { - var cmp; + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + }; + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp || onlyCompareGenerated) { + if (cmp !== 0) { return cmp; } cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { + if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { + if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp) { + if (cmp !== 0) { return cmp; } return strcmp(mappingA.name, mappingB.name); }; - exports.compareByGeneratedPositions = compareByGeneratedPositions; + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; }); -},{"amdefine":540}],540:[function(require,module,exports){ +},{"amdefine":547}],547:[function(require,module,exports){ (function (process,__filename){ /** vim: et:ts=4:sw=4:sts=4 - * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. + * @license amdefine 1.0.0 Copyright (c) 2011-2015, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/amdefine for details */ @@ -64524,7 +68282,7 @@ function amdefine(module, requireFn) { module.exports = amdefine; }).call(this,require('_process'),"/node_modules/source-map/node_modules/amdefine/amdefine.js") -},{"_process":223,"path":222}],541:[function(require,module,exports){ +},{"_process":12,"path":11}],548:[function(require,module,exports){ /*! strip-json-comments Strip comments from JSON. Lets you use comments in your JSON files! @@ -64593,7 +68351,7 @@ module.exports = amdefine; } })(); -},{}],542:[function(require,module,exports){ +},{}],549:[function(require,module,exports){ 'use strict'; module.exports = function toFastProperties(obj) { /*jshint -W027*/ @@ -64604,23 +68362,60 @@ module.exports = function toFastProperties(obj) { eval(obj); }; -},{}],543:[function(require,module,exports){ +},{}],550:[function(require,module,exports){ 'use strict'; module.exports = function (str) { - return str.replace(/[\s\uFEFF\xA0]+$/g, ''); + var tail = str.length; + + while (/[\s\uFEFF\u00A0]/.test(str[tail - 1])) { + tail--; + } + + return str.slice(0, tail); +}; + +},{}],551:[function(require,module,exports){ +(function (process){ +var Module = require("module"); + +var resolve = module.exports = function (loc, _require) { + try { + return (_require || require).resolve(loc); + } catch (err) { + return null; + } +}; + +var relativeMod; + +resolve.relative = function (loc) { + // we're in the browser, probably + if (typeof Module === "object") return null; + + if (!relativeMod) { + relativeMod = new Module; + relativeMod.paths = Module._nodeModulePaths(process.cwd()); + } + + try { + return Module._resolveFilename(loc, relativeMod); + } catch (err) { + return null; + } }; -},{}],544:[function(require,module,exports){ +}).call(this,require('_process')) +},{"_process":12,"module":1}],552:[function(require,module,exports){ module.exports={ "name": "babel-core", + "version": "5.8.14", "description": "A compiler for writing next generation JavaScript", - "version": "5.6.15", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", "license": "MIT", "repository": "babel/babel", "browser": { - "./lib/babel/api/register/node.js": "./lib/babel/api/register/browser.js" + "./lib/api/register/node.js": "./lib/api/register/browser.js" }, "keywords": [ "6to5", @@ -64640,13 +68435,11 @@ module.exports={ "test": "make test" }, "dependencies": { - "acorn-jsx": "^1.0.0", - "ast-types": "~0.7.0", "babel-plugin-constant-folding": "^1.0.1", "babel-plugin-dead-code-elimination": "^1.0.2", "babel-plugin-eval": "^1.0.1", "babel-plugin-inline-environment-variables": "^1.0.1", - "babel-plugin-jscript": "^1.0.1", + "babel-plugin-jscript": "^1.0.4", "babel-plugin-member-expression-literals": "^1.0.1", "babel-plugin-property-literals": "^1.0.1", "babel-plugin-proto-to-assign": "^1.0.3", @@ -64657,12 +68450,13 @@ module.exports={ "babel-plugin-runtime": "^1.0.7", "babel-plugin-undeclared-variables-check": "^1.0.2", "babel-plugin-undefined-to-void": "^1.1.6", + "babylon": "^5.8.12", + "bluebird": "^2.9.33", "chalk": "^1.0.0", "convert-source-map": "^1.1.0", "core-js": "^0.9.0", "debug": "^2.1.1", "detect-indent": "^3.0.0", - "estraverse": "^4.0.0", "esutils": "^2.0.0", "fs-readdir-recursive": "^0.1.0", "globals": "^6.4.0", @@ -64670,13 +68464,13 @@ module.exports={ "is-integer": "^1.0.4", "js-tokens": "1.0.1", "line-numbers": "0.2.0", - "lodash": "^3.6.0", + "lodash": "^3.10.0", "minimatch": "^2.0.3", "output-file-sync": "^1.1.0", "path-exists": "^1.0.0", "path-is-absolute": "^1.0.0", "private": "^0.1.6", - "regenerator": "0.8.31", + "regenerator": "0.8.34", "regexpu": "^1.1.2", "repeating": "^1.1.2", "resolve": "^1.1.6", @@ -64686,24 +68480,11 @@ module.exports={ "source-map-support": "^0.2.10", "strip-json-comments": "^1.0.2", "to-fast-properties": "^1.0.0", - "trim-right": "^1.0.0" - }, - "devDependencies": { - "babel": "5.6.10", - "babel-eslint": "^3.1.19", - "browserify": "^9.0.8", - "chai": "^2.2.0", - "eslint": "^0.21.2", - "esvalid": "^1.1.0", - "istanbul": "^0.3.5", - "matcha": "^0.6.0", - "mocha": "2.2.0", - "rimraf": "^2.3.2", - "uglify-js": "^2.4.16" - } -} - -},{}],545:[function(require,module,exports){ -module.exports={"abstract-expression-call":{"body":[{"expression":{"callee":{"object":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceGet","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"abstract-expression-delete":{"body":[{"expression":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceDelete","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"abstract-expression-get":{"body":[{"expression":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceGet","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"abstract-expression-set":{"body":[{"expression":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceSet","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"},{"name":"VALUE","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"array-comprehension-container":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"declarations":[{"id":{"name":"KEY","type":"Identifier"},"init":{"elements":[],"type":"ArrayExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"argument":{"name":"KEY","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"array-from":{"body":[{"expression":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"from","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"VALUE","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"array-push":{"body":[{"expression":{"callee":{"object":{"name":"KEY","type":"Identifier"},"property":{"name":"push","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"STATEMENT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"call":{"body":[{"expression":{"callee":{"object":{"name":"OBJECT","type":"Identifier"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"CONTEXT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"class-decorator":{"body":[{"expression":{"operator":"=","left":{"name":"CLASS_REF","type":"Identifier"},"right":{"left":{"callee":{"name":"DECORATOR","type":"Identifier"},"arguments":[{"name":"CLASS_REF","type":"Identifier"}],"type":"CallExpression"},"operator":"||","right":{"name":"CLASS_REF","type":"Identifier"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"class-derived-default-constructor":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"expression":{"callee":{"type":"Super"},"arguments":[{"argument":{"name":"arguments","type":"Identifier"},"type":"SpreadElement"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"default-parameter-assign":{"body":[{"test":{"left":{"name":"VARIABLE_NAME","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"expression":{"operator":"=","left":{"name":"VARIABLE_NAME","type":"Identifier"},"right":{"name":"DEFAULT_VALUE","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"Program"},"default-parameter":{"body":[{"declarations":[{"id":{"name":"VARIABLE_NAME","type":"Identifier"},"init":{"test":{"left":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"ARGUMENT_KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"name":"DEFAULT_VALUE","type":"Identifier"},"alternate":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"ARGUMENT_KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"ConditionalExpression"},"type":"VariableDeclarator"}],"kind":"let","type":"VariableDeclaration"}],"type":"Program"},"exports-assign":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"name":"KEY","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"VALUE","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-default-assign":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"module","type":"Identifier"},"property":{"name":"exports","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"VALUE","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-from-assign":{"body":[{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"exports","type":"Identifier"},{"name":"ID","type":"Identifier"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"enumerable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"get","type":"Identifier"},"value":{"id":{"name":"get","type":"Identifier"},"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"name":"INIT","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-module-declaration-loose":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-module-declaration":{"body":[{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"exports","type":"Identifier"},{"value":"__esModule","type":"Literal"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"for-of-array":{"body":[{"init":{"declarations":[{"id":{"name":"KEY","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"KEY","type":"Identifier"},"operator":"<","right":{"object":{"name":"ARR","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"KEY","type":"Identifier"},"type":"UpdateExpression"},"body":{"expression":{"name":"BODY","type":"Identifier"},"type":"ExpressionStatement"},"type":"ForStatement"}],"type":"Program"},"for-of-loose":{"body":[{"init":{"declarations":[{"id":{"name":"LOOP_OBJECT","type":"Identifier"},"init":{"name":"OBJECT","type":"Identifier"},"type":"VariableDeclarator"},{"id":{"name":"IS_ARRAY","type":"Identifier"},"init":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"LOOP_OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"INDEX","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"},{"id":{"name":"LOOP_OBJECT","type":"Identifier"},"init":{"test":{"name":"IS_ARRAY","type":"Identifier"},"consequent":{"name":"LOOP_OBJECT","type":"Identifier"},"alternate":{"callee":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ConditionalExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":null,"update":null,"body":{"body":[{"declarations":[{"id":{"name":"ID","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"name":"IS_ARRAY","type":"Identifier"},"consequent":{"body":[{"test":{"left":{"name":"INDEX","type":"Identifier"},"operator":">=","right":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"name":"ID","type":"Identifier"},"right":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"operator":"++","prefix":false,"argument":{"name":"INDEX","type":"Identifier"},"type":"UpdateExpression"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"expression":{"operator":"=","left":{"name":"INDEX","type":"Identifier"},"right":{"callee":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"object":{"name":"INDEX","type":"Identifier"},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"name":"ID","type":"Identifier"},"right":{"object":{"name":"INDEX","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"Program"},"for-of":{"body":[{"declarations":[{"id":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"init":{"value":true,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier"},"init":{"value":false,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"ITERATOR_ERROR_KEY","type":"Identifier"},"init":{"name":"undefined","type":"Identifier"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"block":{"body":[{"init":{"declarations":[{"id":{"name":"ITERATOR_KEY","type":"Identifier"},"init":{"callee":{"object":{"name":"OBJECT","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"STEP_KEY","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"operator":"!","prefix":true,"argument":{"operator":"=","left":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"right":{"object":{"operator":"=","left":{"name":"STEP_KEY","type":"Identifier"},"right":{"callee":{"object":{"name":"ITERATOR_KEY","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"type":"UnaryExpression"},"update":{"operator":"=","left":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"body":{"body":[],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"handler":{"param":{"name":"err","type":"Identifier"},"guard":null,"body":{"body":[{"expression":{"operator":"=","left":{"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"name":"ITERATOR_ERROR_KEY","type":"Identifier"},"right":{"name":"err","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"CatchClause"},"guardedHandlers":[],"finalizer":{"body":[{"block":{"body":[{"test":{"left":{"operator":"!","prefix":true,"argument":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"type":"UnaryExpression"},"operator":"&&","right":{"object":{"name":"ITERATOR_KEY","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"object":{"name":"ITERATOR_KEY","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"handler":null,"guardedHandlers":[],"finalizer":{"body":[{"test":{"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier"},"consequent":{"body":[{"argument":{"name":"ITERATOR_ERROR_KEY","type":"Identifier"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"TryStatement"}],"type":"BlockStatement"},"type":"TryStatement"}],"type":"Program"},"helper-async-to-generator":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"fn","type":"Identifier"}],"body":{"body":[{"argument":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"declarations":[{"id":{"name":"gen","type":"Identifier"},"init":{"callee":{"object":{"name":"fn","type":"Identifier"},"property":{"name":"apply","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"type":"ThisExpression"},{"name":"arguments","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"argument":{"callee":{"name":"Promise","type":"Identifier"},"arguments":[{"id":null,"generator":false,"expression":false,"params":[{"name":"resolve","type":"Identifier"},{"name":"reject","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"callNext","type":"Identifier"},"init":{"callee":{"object":{"name":"step","type":"Identifier"},"property":{"name":"bind","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"value":null,"type":"Literal"},{"value":"next","type":"Literal"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"callThrow","type":"Identifier"},"init":{"callee":{"object":{"name":"step","type":"Identifier"},"property":{"name":"bind","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"value":null,"type":"Literal"},{"value":"throw","type":"Literal"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"id":{"name":"step","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"key","type":"Identifier"},{"name":"arg","type":"Identifier"}],"body":{"body":[{"block":{"body":[{"declarations":[{"id":{"name":"info","type":"Identifier"},"init":{"callee":{"object":{"name":"gen","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"arg","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"value","type":"Identifier"},"init":{"object":{"name":"info","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"}],"type":"BlockStatement"},"handler":{"param":{"name":"error","type":"Identifier"},"guard":null,"body":{"body":[{"expression":{"callee":{"name":"reject","type":"Identifier"},"arguments":[{"name":"error","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"argument":null,"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"CatchClause"},"guardedHandlers":[],"finalizer":null,"type":"TryStatement"},{"test":{"object":{"name":"info","type":"Identifier"},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"resolve","type":"Identifier"},"arguments":[{"name":"value","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"expression":{"callee":{"object":{"callee":{"object":{"name":"Promise","type":"Identifier"},"property":{"name":"resolve","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"value","type":"Identifier"}],"type":"CallExpression"},"property":{"name":"then","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"callNext","type":"Identifier"},{"name":"callThrow","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"expression":{"callee":{"name":"callNext","type":"Identifier"},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"}],"type":"NewExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-bind":{"body":[{"expression":{"object":{"object":{"name":"Function","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"bind","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-class-call-check":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"instance","type":"Identifier"},{"name":"Constructor","type":"Identifier"}],"body":{"body":[{"test":{"operator":"!","prefix":true,"argument":{"left":{"name":"instance","type":"Identifier"},"operator":"instanceof","right":{"name":"Constructor","type":"Identifier"},"type":"BinaryExpression","parenthesizedExpression":true},"type":"UnaryExpression"},"consequent":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Cannot call a class as a function","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-create-class":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"id":{"name":"defineProperties","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"},{"name":"props","type":"Identifier"}],"body":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"props","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"object":{"name":"props","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"||","right":{"value":false,"type":"Literal"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"descriptor","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"argument":{"id":null,"generator":false,"expression":false,"params":[{"name":"Constructor","type":"Identifier"},{"name":"protoProps","type":"Identifier"},{"name":"staticProps","type":"Identifier"}],"body":{"body":[{"test":{"name":"protoProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"object":{"name":"Constructor","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"protoProps","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"test":{"name":"staticProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"name":"Constructor","type":"Identifier"},{"name":"staticProps","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"name":"Constructor","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-create-decorated-class":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"id":{"name":"defineProperties","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"},{"name":"descriptors","type":"Identifier"},{"name":"initializers","type":"Identifier"}],"body":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"decorators","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"||","right":{"value":false,"type":"Literal"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"left":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"descriptor","type":"Identifier"},"type":"BinaryExpression"},"operator":"||","right":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"test":{"name":"decorators","type":"Identifier"},"consequent":{"body":[{"init":{"declarations":[{"id":{"name":"f","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"f","type":"Identifier"},"operator":"<","right":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"f","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"decorator","type":"Identifier"},"init":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"f","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"name":"descriptor","type":"Identifier"},"right":{"left":{"callee":{"name":"decorator","type":"Identifier"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"operator":"||","right":{"name":"descriptor","type":"Identifier"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"left":{"left":{"left":{"value":"The decorator for method ","type":"Literal"},"operator":"+","right":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"operator":"+","right":{"value":" is of the invalid type ","type":"Literal"},"type":"BinaryExpression"},"operator":"+","right":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"test":{"left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"!==","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"initializers","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"name":"descriptor","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"label":null,"type":"ContinueStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"argument":{"id":null,"generator":false,"expression":false,"params":[{"name":"Constructor","type":"Identifier"},{"name":"protoProps","type":"Identifier"},{"name":"staticProps","type":"Identifier"},{"name":"protoInitializers","type":"Identifier"},{"name":"staticInitializers","type":"Identifier"}],"body":{"body":[{"test":{"name":"protoProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"object":{"name":"Constructor","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"protoProps","type":"Identifier"},{"name":"protoInitializers","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"test":{"name":"staticProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"name":"Constructor","type":"Identifier"},{"name":"staticProps","type":"Identifier"},{"name":"staticInitializers","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"name":"Constructor","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-create-decorated-object":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"descriptors","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"target","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"decorators","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"name":"decorators","type":"Identifier"},"consequent":{"body":[{"init":{"declarations":[{"id":{"name":"f","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"f","type":"Identifier"},"operator":"<","right":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"f","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"decorator","type":"Identifier"},"init":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"f","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"name":"descriptor","type":"Identifier"},"right":{"left":{"callee":{"name":"decorator","type":"Identifier"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"operator":"||","right":{"name":"descriptor","type":"Identifier"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"left":{"left":{"left":{"value":"The decorator for method ","type":"Literal"},"operator":"+","right":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"operator":"+","right":{"value":" is of the invalid type ","type":"Literal"},"type":"BinaryExpression"},"operator":"+","right":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"test":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"callee":{"object":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"}],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"target","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-default-props":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"defaultProps","type":"Identifier"},{"name":"props","type":"Identifier"}],"body":{"body":[{"test":{"name":"defaultProps","type":"Identifier"},"consequent":{"body":[{"left":{"declarations":[{"id":{"name":"propName","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"defaultProps","type":"Identifier"},"body":{"body":[{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"object":{"name":"props","type":"Identifier"},"property":{"name":"propName","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"UnaryExpression"},"operator":"===","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"props","type":"Identifier"},"property":{"name":"propName","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"defaultProps","type":"Identifier"},"property":{"name":"propName","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForInStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"name":"props","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-defaults":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"},{"name":"defaults","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"keys","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyNames","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"defaults","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"keys","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":{"object":{"name":"keys","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"value","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyDescriptor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"defaults","type":"Identifier"},{"name":"key","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"left":{"name":"value","type":"Identifier"},"operator":"&&","right":{"object":{"name":"value","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"operator":"&&","right":{"left":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"value","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"obj","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-define-decorated-property-descriptor":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptors","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"_descriptor","type":"Identifier"},"init":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"operator":"!","prefix":true,"argument":{"name":"_descriptor","type":"Identifier"},"type":"UnaryExpression"},"consequent":{"argument":null,"type":"ReturnStatement"},"alternate":null,"type":"IfStatement"},{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"left":{"declarations":[{"id":{"name":"_key","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"_descriptor","type":"Identifier"},"body":{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"_key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"_descriptor","type":"Identifier"},"property":{"name":"_key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"type":"ForInStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"callee":{"object":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"}],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-define-property":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"value","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"key","type":"Identifier"},"operator":"in","right":{"name":"obj","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"name":"value","type":"Identifier"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"enumerable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"configurable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"writable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"name":"value","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"},{"argument":{"name":"obj","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-extends":{"body":[{"expression":{"left":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"assign","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"||","right":{"id":null,"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"}],"body":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":1,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"arguments","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"source","type":"Identifier"},"init":{"object":{"name":"arguments","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"left":{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"source","type":"Identifier"},"body":{"body":[{"test":{"callee":{"object":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"source","type":"Identifier"},{"name":"key","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"target","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"source","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForInStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"target","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"LogicalExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-get":{"body":[{"expression":{"id":{"name":"get","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"object","type":"Identifier"},"operator":"===","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"expression":{"operator":"=","left":{"name":"object","type":"Identifier"},"right":{"object":{"name":"Function","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"declarations":[{"id":{"name":"desc","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyDescriptor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"desc","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"declarations":[{"id":{"name":"parent","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getPrototypeOf","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"parent","type":"Identifier"},"operator":"===","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"name":"undefined","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"get","type":"Identifier"},"arguments":[{"name":"parent","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"desc","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"getter","type":"Identifier"},"init":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"get","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"getter","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"name":"undefined","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"callee":{"object":{"name":"getter","type":"Identifier"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"receiver","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-has-own":{"body":[{"expression":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-inherits":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"subClass","type":"Identifier"},{"name":"superClass","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"superClass","type":"Identifier"},"type":"UnaryExpression"},"operator":"!==","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"left":{"name":"superClass","type":"Identifier"},"operator":"!==","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"left":{"value":"Super expression must either be null or a function, not ","type":"Literal"},"operator":"+","right":{"operator":"typeof","prefix":true,"argument":{"name":"superClass","type":"Identifier"},"type":"UnaryExpression"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"object":{"name":"subClass","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"create","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"left":{"name":"superClass","type":"Identifier"},"operator":"&&","right":{"object":{"name":"superClass","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"constructor","type":"Identifier"},"value":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"name":"subClass","type":"Identifier"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"enumerable","type":"Identifier"},"value":{"value":false,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"writable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"configurable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"name":"superClass","type":"Identifier"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"subClass","type":"Identifier"},"property":{"name":"__proto__","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"superClass","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-instanceof":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"left","type":"Identifier"},{"name":"right","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"name":"right","type":"Identifier"},"operator":"!=","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"right","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"hasInstance","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"argument":{"callee":{"object":{"name":"right","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"hasInstance","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"left","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"left":{"name":"left","type":"Identifier"},"operator":"instanceof","right":{"name":"right","type":"Identifier"},"type":"BinaryExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-interop-require-default":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"name":"obj","type":"Identifier"},"alternate":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"value":"default","type":"Literal"},"value":{"name":"obj","type":"Identifier"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-interop-require-wildcard":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"argument":{"name":"obj","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"newObj","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"!=","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"left":{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"obj","type":"Identifier"},"body":{"body":[{"test":{"callee":{"object":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"}],"type":"CallExpression"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"newObj","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForInStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"object":{"name":"newObj","type":"Identifier"},"property":{"value":"default","type":"Literal"},"computed":true,"type":"MemberExpression"},"right":{"name":"obj","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"newObj","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-interop-require":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"object":{"name":"obj","type":"Identifier"},"property":{"value":"default","type":"Literal"},"computed":true,"type":"MemberExpression"},"alternate":{"name":"obj","type":"Identifier"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-object-destructuring-empty":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"==","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Cannot destructure undefined","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-object-without-properties":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"},{"name":"keys","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"target","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"left":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"obj","type":"Identifier"},"body":{"body":[{"test":{"left":{"callee":{"object":{"name":"keys","type":"Identifier"},"property":{"name":"indexOf","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"i","type":"Identifier"}],"type":"CallExpression"},"operator":">=","right":{"value":0,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"label":null,"type":"ContinueStatement"},"alternate":null,"type":"IfStatement"},{"test":{"operator":"!","prefix":true,"argument":{"callee":{"object":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"i","type":"Identifier"}],"type":"CallExpression"},"type":"UnaryExpression"},"consequent":{"label":null,"type":"ContinueStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"object":{"name":"target","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForInStatement"},{"argument":{"name":"target","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-self-global":{"body":[{"expression":{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"global","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"consequent":{"name":"self","type":"Identifier"},"alternate":{"name":"global","type":"Identifier"},"type":"ConditionalExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-set":{"body":[{"expression":{"id":{"name":"set","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"value","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"desc","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyDescriptor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"desc","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"declarations":[{"id":{"name":"parent","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getPrototypeOf","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"parent","type":"Identifier"},"operator":"!==","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"set","type":"Identifier"},"arguments":[{"name":"parent","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"value","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"desc","type":"Identifier"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"value","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"setter","type":"Identifier"},"init":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"set","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"setter","type":"Identifier"},"operator":"!==","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"callee":{"object":{"name":"setter","type":"Identifier"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"receiver","type":"Identifier"},{"name":"value","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"},{"argument":{"name":"value","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-slice":{"body":[{"expression":{"object":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"slice","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-sliced-to-array-loose":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"},{"name":"i","type":"Identifier"}],"body":{"body":[{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"argument":{"name":"arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"in","right":{"callee":{"name":"Object","type":"Identifier"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"BinaryExpression"},"consequent":{"body":[{"declarations":[{"id":{"name":"_arr","type":"Identifier"},"init":{"elements":[],"type":"ArrayExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"init":{"declarations":[{"id":{"name":"_iterator","type":"Identifier"},"init":{"callee":{"object":{"name":"arr","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"_step","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"operator":"!","prefix":true,"argument":{"object":{"operator":"=","left":{"name":"_step","type":"Identifier"},"right":{"callee":{"object":{"name":"_iterator","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"update":null,"body":{"body":[{"expression":{"callee":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"push","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"object":{"name":"_step","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"test":{"left":{"name":"i","type":"Identifier"},"operator":"&&","right":{"left":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"===","right":{"name":"i","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"_arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Invalid attempt to destructure non-iterable instance","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-sliced-to-array":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"id":{"name":"sliceIterator","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"},{"name":"i","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"_arr","type":"Identifier"},"init":{"elements":[],"type":"ArrayExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"_n","type":"Identifier"},"init":{"value":true,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"_d","type":"Identifier"},"init":{"value":false,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"_e","type":"Identifier"},"init":{"name":"undefined","type":"Identifier"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"block":{"body":[{"init":{"declarations":[{"id":{"name":"_i","type":"Identifier"},"init":{"callee":{"object":{"name":"arr","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"_s","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"operator":"!","prefix":true,"argument":{"operator":"=","left":{"name":"_n","type":"Identifier"},"right":{"object":{"operator":"=","left":{"name":"_s","type":"Identifier"},"right":{"callee":{"object":{"name":"_i","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"type":"UnaryExpression"},"update":{"operator":"=","left":{"name":"_n","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"body":{"body":[{"expression":{"callee":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"push","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"object":{"name":"_s","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"test":{"left":{"name":"i","type":"Identifier"},"operator":"&&","right":{"left":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"===","right":{"name":"i","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"handler":{"param":{"name":"err","type":"Identifier"},"guard":null,"body":{"body":[{"expression":{"operator":"=","left":{"name":"_d","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"name":"_e","type":"Identifier"},"right":{"name":"err","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"CatchClause"},"guardedHandlers":[],"finalizer":{"body":[{"block":{"body":[{"test":{"left":{"operator":"!","prefix":true,"argument":{"name":"_n","type":"Identifier"},"type":"UnaryExpression"},"operator":"&&","right":{"object":{"name":"_i","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"expression":{"callee":{"object":{"name":"_i","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"handler":null,"guardedHandlers":[],"finalizer":{"body":[{"test":{"name":"_d","type":"Identifier"},"consequent":{"argument":{"name":"_e","type":"Identifier"},"type":"ThrowStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"TryStatement"}],"type":"BlockStatement"},"type":"TryStatement"},{"argument":{"name":"_arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"argument":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"},{"name":"i","type":"Identifier"}],"body":{"body":[{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"argument":{"name":"arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"in","right":{"callee":{"name":"Object","type":"Identifier"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"callee":{"name":"sliceIterator","type":"Identifier"},"arguments":[{"name":"arr","type":"Identifier"},{"name":"i","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Invalid attempt to destructure non-iterable instance","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-tagged-template-literal-loose":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"strings","type":"Identifier"},{"name":"raw","type":"Identifier"}],"body":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"strings","type":"Identifier"},"property":{"name":"raw","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"raw","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"strings","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-tagged-template-literal":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"strings","type":"Identifier"},{"name":"raw","type":"Identifier"}],"body":{"body":[{"argument":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"freeze","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperties","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"strings","type":"Identifier"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"raw","type":"Identifier"},"value":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"freeze","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"raw","type":"Identifier"}],"type":"CallExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-temporal-assert-defined":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"val","type":"Identifier"},{"name":"name","type":"Identifier"},{"name":"undef","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"val","type":"Identifier"},"operator":"===","right":{"name":"undef","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"callee":{"name":"ReferenceError","type":"Identifier"},"arguments":[{"left":{"name":"name","type":"Identifier"},"operator":"+","right":{"value":" is not defined - temporal dead zone","type":"Literal"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"value":true,"type":"Literal"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-temporal-undefined":{"body":[{"expression":{"properties":[],"type":"ObjectExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-to-array":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"name":"arr","type":"Identifier"},"alternate":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"from","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-to-consumable-array":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"}],"body":{"body":[{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"},{"id":{"name":"arr2","type":"Identifier"},"init":{"callee":{"name":"Array","type":"Identifier"},"arguments":[{"object":{"name":"arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"expression":{"operator":"=","left":{"object":{"name":"arr2","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"arr","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"type":"ForStatement"},{"argument":{"name":"arr2","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"from","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-typeof":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"left":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"constructor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"===","right":{"name":"Symbol","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"value":"symbol","type":"Literal"},"alternate":{"operator":"typeof","prefix":true,"argument":{"name":"obj","type":"Identifier"},"type":"UnaryExpression"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"let-scoping-return":{"body":[{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"RETURN","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"object","type":"Literal"},"type":"BinaryExpression"},"consequent":{"argument":{"object":{"name":"RETURN","type":"Identifier"},"property":{"name":"v","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ReturnStatement"},"alternate":null,"type":"IfStatement"}],"type":"Program"},"named-function":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"id":{"name":"GET_OUTER_ID","type":"Identifier"},"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"name":"FUNCTION_ID","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"argument":{"name":"FUNCTION","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"property-method-assignment-wrapper-generator":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[{"name":"FUNCTION_KEY","type":"Identifier"}],"body":{"body":[{"id":{"name":"FUNCTION_ID","type":"Identifier"},"generator":true,"expression":false,"params":[],"body":{"body":[{"argument":{"delegate":true,"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"apply","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"type":"ThisExpression"},{"name":"arguments","type":"Identifier"}],"type":"CallExpression"},"type":"YieldExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"expression":{"operator":"=","left":{"object":{"name":"FUNCTION_ID","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"FUNCTION_ID","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[{"name":"FUNCTION","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"property-method-assignment-wrapper":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[{"name":"FUNCTION_KEY","type":"Identifier"}],"body":{"body":[{"id":{"name":"FUNCTION_ID","type":"Identifier"},"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"apply","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"type":"ThisExpression"},{"name":"arguments","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"expression":{"operator":"=","left":{"object":{"name":"FUNCTION_ID","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"FUNCTION_ID","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[{"name":"FUNCTION","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"prototype-identifier":{"body":[{"expression":{"object":{"name":"CLASS_NAME","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"require-assign-key":{"body":[{"declarations":[{"id":{"name":"VARIABLE_NAME","type":"Identifier"},"init":{"object":{"callee":{"name":"require","type":"Identifier"},"arguments":[{"name":"MODULE_NAME","type":"Identifier"}],"type":"CallExpression"},"property":{"name":"KEY","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"}],"type":"Program"},"require":{"body":[{"expression":{"callee":{"name":"require","type":"Identifier"},"arguments":[{"name":"MODULE_NAME","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"rest":{"body":[{"init":{"declarations":[{"id":{"name":"LEN","type":"Identifier"},"init":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"},{"id":{"name":"ARRAY","type":"Identifier"},"init":{"callee":{"name":"Array","type":"Identifier"},"arguments":[{"name":"ARRAY_LEN","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"KEY","type":"Identifier"},"init":{"name":"START","type":"Identifier"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"KEY","type":"Identifier"},"operator":"<","right":{"name":"LEN","type":"Identifier"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"KEY","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"ARRAY","type":"Identifier"},"property":{"name":"ARRAY_KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"Program"},"self-contained-helpers-head":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"value":"default","type":"Literal"},"computed":true,"type":"MemberExpression"},"right":{"name":"HELPER","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"system":{"body":[{"expression":{"callee":{"object":{"name":"System","type":"Identifier"},"property":{"name":"register","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"MODULE_NAME","type":"Identifier"},{"name":"MODULE_DEPENDENCIES","type":"Identifier"},{"id":null,"generator":false,"expression":false,"params":[{"name":"EXPORT_IDENTIFIER","type":"Identifier"}],"body":{"body":[{"argument":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"setters","type":"Identifier"},"value":{"name":"SETTERS","type":"Identifier"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"execute","type":"Identifier"},"value":{"name":"EXECUTE","type":"Identifier"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"tail-call-body":{"body":[{"body":[{"declarations":[{"id":{"name":"AGAIN_ID","type":"Identifier"},"init":{"value":true,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"body":{"test":{"name":"AGAIN_ID","type":"Identifier"},"body":{"expression":{"name":"BLOCK","type":"Identifier"},"type":"ExpressionStatement"},"type":"WhileStatement"},"label":{"name":"FUNCTION_ID","type":"Identifier"},"type":"LabeledStatement"}],"type":"BlockStatement"}],"type":"Program"},"test-exports":{"body":[{"expression":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"exports","type":"Identifier"},"type":"UnaryExpression"},"operator":"!==","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"type":"ExpressionStatement"}],"type":"Program"},"test-module":{"body":[{"expression":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"module","type":"Identifier"},"type":"UnaryExpression"},"operator":"!==","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"type":"ExpressionStatement"}],"type":"Program"},"umd-commonjs-strict":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[{"name":"root","type":"Identifier"},{"name":"factory","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"define","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"define","type":"Identifier"},"property":{"name":"amd","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"define","type":"Identifier"},"arguments":[{"name":"AMD_ARGUMENTS","type":"Identifier"},{"name":"factory","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"exports","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"object","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"name":"COMMON_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"name":"BROWSER_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[{"name":"UMD_ROOT","type":"Identifier"},{"id":null,"generator":false,"expression":false,"params":[{"name":"FACTORY_PARAMETERS","type":"Identifier"}],"body":{"body":[{"expression":{"name":"FACTORY_BODY","type":"Identifier"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"umd-runner-body":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"global","type":"Identifier"},{"name":"factory","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"define","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"define","type":"Identifier"},"property":{"name":"amd","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"define","type":"Identifier"},"arguments":[{"name":"AMD_ARGUMENTS","type":"Identifier"},{"name":"factory","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"test":{"name":"COMMON_TEST","type":"Identifier"},"consequent":{"body":[{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"name":"COMMON_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"mod","type":"Identifier"},"init":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"exports","type":"Identifier"},"value":{"properties":[],"type":"ObjectExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"object":{"name":"mod","type":"Identifier"},"property":{"name":"exports","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"BROWSER_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"global","type":"Identifier"},"property":{"name":"GLOBAL_ARG","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"object":{"name":"mod","type":"Identifier"},"property":{"name":"exports","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"}} -},{}]},{},[19])(19) + "trim-right": "^1.0.0", + "try-resolve": "^1.0.0" + } +} +},{}],553:[function(require,module,exports){ +module.exports={"abstract-expression-call":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"PROPERTY"},"property":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"referenceGet"},"computed":false},"computed":true},"arguments":[{"type":"Identifier","name":"OBJECT"}]},"property":{"type":"Identifier","name":"call"},"computed":false},"arguments":[{"type":"Identifier","name":"OBJECT"}]}}]},"abstract-expression-delete":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"PROPERTY"},"property":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"referenceDelete"},"computed":false},"computed":true},"arguments":[{"type":"Identifier","name":"OBJECT"}]}}]},"abstract-expression-get":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"PROPERTY"},"property":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"referenceGet"},"computed":false},"computed":true},"arguments":[{"type":"Identifier","name":"OBJECT"}]}}]},"abstract-expression-set":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"PROPERTY"},"property":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"referenceSet"},"computed":false},"computed":true},"arguments":[{"type":"Identifier","name":"OBJECT"},{"type":"Identifier","name":"VALUE"}]}}]},"array-comprehension-container":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"KEY"},"init":{"type":"ArrayExpression","elements":[]}}],"kind":"var"},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"KEY"}}]},"parenthesizedExpression":true},"arguments":[]}}]},"array-from":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Array"},"property":{"type":"Identifier","name":"from"},"computed":false},"arguments":[{"type":"Identifier","name":"VALUE"}]}}]},"array-push":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"KEY"},"property":{"type":"Identifier","name":"push"},"computed":false},"arguments":[{"type":"Identifier","name":"STATEMENT"}]}}]},"call":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"OBJECT"},"property":{"type":"Identifier","name":"call"},"computed":false},"arguments":[{"type":"Identifier","name":"CONTEXT"}]}}]},"class-decorator":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"CLASS_REF"},"right":{"type":"LogicalExpression","left":{"type":"CallExpression","callee":{"type":"Identifier","name":"DECORATOR"},"arguments":[{"type":"Identifier","name":"CLASS_REF"}]},"operator":"||","right":{"type":"Identifier","name":"CLASS_REF"}}}}]},"class-derived-default-constructor":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Super"},"arguments":[{"type":"SpreadElement","argument":{"type":"Identifier","name":"arguments"}}]}}]},"parenthesizedExpression":true}}]},"default-parameter-assign":{"type":"Program","body":[{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"VARIABLE_NAME"},"operator":"===","right":{"type":"Identifier","name":"undefined"}},"consequent":{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"VARIABLE_NAME"},"right":{"type":"Identifier","name":"DEFAULT_VALUE"}}},"alternate":null}]},"default-parameter":{"type":"Program","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"VARIABLE_NAME"},"init":{"type":"ConditionalExpression","test":{"type":"LogicalExpression","left":{"type":"BinaryExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"ARGUMENTS"},"property":{"type":"Identifier","name":"length"},"computed":false},"operator":"<=","right":{"type":"Identifier","name":"ARGUMENT_KEY"}},"operator":"||","right":{"type":"BinaryExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"ARGUMENTS"},"property":{"type":"Identifier","name":"ARGUMENT_KEY"},"computed":true},"operator":"===","right":{"type":"Identifier","name":"undefined"}}},"consequent":{"type":"Identifier","name":"DEFAULT_VALUE"},"alternate":{"type":"MemberExpression","object":{"type":"Identifier","name":"ARGUMENTS"},"property":{"type":"Identifier","name":"ARGUMENT_KEY"},"computed":true}}}],"kind":"let"}]},"exports-assign":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"exports"},"property":{"type":"Identifier","name":"KEY"},"computed":false},"right":{"type":"Identifier","name":"VALUE"}}}]},"exports-default-assign":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"module"},"property":{"type":"Identifier","name":"exports"},"computed":false},"right":{"type":"Identifier","name":"VALUE"}}}]},"exports-from-assign":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"defineProperty"},"computed":false},"arguments":[{"type":"Identifier","name":"exports"},{"type":"Identifier","name":"ID"},{"type":"ObjectExpression","properties":[{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"enumerable"},"value":{"type":"Literal","value":true},"kind":"init"},{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"get"},"value":{"type":"FunctionExpression","id":{"type":"Identifier","name":"get"},"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"Identifier","name":"INIT"}}]}},"kind":"init"}]}]}}]},"exports-module-declaration-loose":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"exports"},"property":{"type":"Identifier","name":"__esModule"},"computed":false},"right":{"type":"Literal","value":true}}}]},"exports-module-declaration":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"defineProperty"},"computed":false},"arguments":[{"type":"Identifier","name":"exports"},{"type":"Literal","value":"__esModule"},{"type":"ObjectExpression","properties":[{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"value"},"value":{"type":"Literal","value":true},"kind":"init"}]}]}}]},"for-of-array":{"type":"Program","body":[{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"KEY"},"init":{"type":"Literal","value":0}}],"kind":"var"},"test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"KEY"},"operator":"<","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"ARR"},"property":{"type":"Identifier","name":"length"},"computed":false}},"update":{"type":"UpdateExpression","operator":"++","prefix":false,"argument":{"type":"Identifier","name":"KEY"}},"body":{"type":"ExpressionStatement","expression":{"type":"Identifier","name":"BODY"}}}]},"for-of-loose":{"type":"Program","body":[{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"LOOP_OBJECT"},"init":{"type":"Identifier","name":"OBJECT"}},{"type":"VariableDeclarator","id":{"type":"Identifier","name":"IS_ARRAY"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Array"},"property":{"type":"Identifier","name":"isArray"},"computed":false},"arguments":[{"type":"Identifier","name":"LOOP_OBJECT"}]}},{"type":"VariableDeclarator","id":{"type":"Identifier","name":"INDEX"},"init":{"type":"Literal","value":0}},{"type":"VariableDeclarator","id":{"type":"Identifier","name":"LOOP_OBJECT"},"init":{"type":"ConditionalExpression","test":{"type":"Identifier","name":"IS_ARRAY"},"consequent":{"type":"Identifier","name":"LOOP_OBJECT"},"alternate":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"LOOP_OBJECT"},"property":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"iterator"},"computed":false},"computed":true},"arguments":[]}}}],"kind":"var"},"test":null,"update":null,"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"ID"},"init":null}],"kind":"var"},{"type":"IfStatement","test":{"type":"Identifier","name":"IS_ARRAY"},"consequent":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"INDEX"},"operator":">=","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"LOOP_OBJECT"},"property":{"type":"Identifier","name":"length"},"computed":false}},"consequent":{"type":"BreakStatement","label":null},"alternate":null},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"ID"},"right":{"type":"MemberExpression","object":{"type":"Identifier","name":"LOOP_OBJECT"},"property":{"type":"UpdateExpression","operator":"++","prefix":false,"argument":{"type":"Identifier","name":"INDEX"}},"computed":true}}}]},"alternate":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"INDEX"},"right":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"LOOP_OBJECT"},"property":{"type":"Identifier","name":"next"},"computed":false},"arguments":[]}}},{"type":"IfStatement","test":{"type":"MemberExpression","object":{"type":"Identifier","name":"INDEX"},"property":{"type":"Identifier","name":"done"},"computed":false},"consequent":{"type":"BreakStatement","label":null},"alternate":null},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"ID"},"right":{"type":"MemberExpression","object":{"type":"Identifier","name":"INDEX"},"property":{"type":"Identifier","name":"value"},"computed":false}}}]}}]}}]},"for-of":{"type":"Program","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"ITERATOR_COMPLETION"},"init":{"type":"Literal","value":true}}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"ITERATOR_HAD_ERROR_KEY"},"init":{"type":"Literal","value":false}}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"ITERATOR_ERROR_KEY"},"init":{"type":"Identifier","name":"undefined"}}],"kind":"var"},{"type":"TryStatement","block":{"type":"BlockStatement","body":[{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"ITERATOR_KEY"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"OBJECT"},"property":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"iterator"},"computed":false},"computed":true},"arguments":[]}},{"type":"VariableDeclarator","id":{"type":"Identifier","name":"STEP_KEY"},"init":null}],"kind":"var"},"test":{"type":"UnaryExpression","operator":"!","prefix":true,"argument":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"ITERATOR_COMPLETION"},"right":{"type":"MemberExpression","object":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"STEP_KEY"},"right":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"ITERATOR_KEY"},"property":{"type":"Identifier","name":"next"},"computed":false},"arguments":[]},"parenthesizedExpression":true},"property":{"type":"Identifier","name":"done"},"computed":false},"parenthesizedExpression":true}},"update":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"ITERATOR_COMPLETION"},"right":{"type":"Literal","value":true}},"body":{"type":"BlockStatement","body":[]}}]},"handler":{"type":"CatchClause","param":{"type":"Identifier","name":"err"},"body":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"ITERATOR_HAD_ERROR_KEY"},"right":{"type":"Literal","value":true}}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"ITERATOR_ERROR_KEY"},"right":{"type":"Identifier","name":"err"}}}]}},"guardedHandlers":[],"finalizer":{"type":"BlockStatement","body":[{"type":"TryStatement","block":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"UnaryExpression","operator":"!","prefix":true,"argument":{"type":"Identifier","name":"ITERATOR_COMPLETION"}},"operator":"&&","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"ITERATOR_KEY"},"property":{"type":"Literal","value":"return"},"computed":true}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"ITERATOR_KEY"},"property":{"type":"Literal","value":"return"},"computed":true},"arguments":[]}}]},"alternate":null}]},"handler":null,"guardedHandlers":[],"finalizer":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"Identifier","name":"ITERATOR_HAD_ERROR_KEY"},"consequent":{"type":"BlockStatement","body":[{"type":"ThrowStatement","argument":{"type":"Identifier","name":"ITERATOR_ERROR_KEY"}}]},"alternate":null}]}}]}}]},"helper-async-to-generator":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"fn"}],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"gen"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"fn"},"property":{"type":"Identifier","name":"apply"},"computed":false},"arguments":[{"type":"ThisExpression"},{"type":"Identifier","name":"arguments"}]}}],"kind":"var"},{"type":"ReturnStatement","argument":{"type":"NewExpression","callee":{"type":"Identifier","name":"Promise"},"arguments":[{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"resolve"},{"type":"Identifier","name":"reject"}],"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"callNext"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"step"},"property":{"type":"Identifier","name":"bind"},"computed":false},"arguments":[{"type":"Literal","value":null,"rawValue":null},{"type":"Literal","value":"next"}]}}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"callThrow"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"step"},"property":{"type":"Identifier","name":"bind"},"computed":false},"arguments":[{"type":"Literal","value":null,"rawValue":null},{"type":"Literal","value":"throw"}]}}],"kind":"var"},{"type":"FunctionDeclaration","id":{"type":"Identifier","name":"step"},"generator":false,"expression":false,"params":[{"type":"Identifier","name":"key"},{"type":"Identifier","name":"arg"}],"body":{"type":"BlockStatement","body":[{"type":"TryStatement","block":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"info"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"gen"},"property":{"type":"Identifier","name":"key"},"computed":true},"arguments":[{"type":"Identifier","name":"arg"}]}}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"value"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"info"},"property":{"type":"Identifier","name":"value"},"computed":false}}],"kind":"var"}]},"handler":{"type":"CatchClause","param":{"type":"Identifier","name":"error"},"body":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"reject"},"arguments":[{"type":"Identifier","name":"error"}]}},{"type":"ReturnStatement","argument":null}]}},"guardedHandlers":[],"finalizer":null},{"type":"IfStatement","test":{"type":"MemberExpression","object":{"type":"Identifier","name":"info"},"property":{"type":"Identifier","name":"done"},"computed":false},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"resolve"},"arguments":[{"type":"Identifier","name":"value"}]}}]},"alternate":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Promise"},"property":{"type":"Identifier","name":"resolve"},"computed":false},"arguments":[{"type":"Identifier","name":"value"}]},"property":{"type":"Identifier","name":"then"},"computed":false},"arguments":[{"type":"Identifier","name":"callNext"},{"type":"Identifier","name":"callThrow"}]}}]}}]}},{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"callNext"},"arguments":[]}}]}}]}}]}}}]},"parenthesizedExpression":true}}]},"helper-bind":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"MemberExpression","object":{"type":"MemberExpression","object":{"type":"Identifier","name":"Function"},"property":{"type":"Identifier","name":"prototype"},"computed":false},"property":{"type":"Identifier","name":"bind"},"computed":false}}]},"helper-class-call-check":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"instance"},{"type":"Identifier","name":"Constructor"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"UnaryExpression","operator":"!","prefix":true,"argument":{"type":"BinaryExpression","left":{"type":"Identifier","name":"instance"},"operator":"instanceof","right":{"type":"Identifier","name":"Constructor"},"parenthesizedExpression":true}},"consequent":{"type":"BlockStatement","body":[{"type":"ThrowStatement","argument":{"type":"NewExpression","callee":{"type":"Identifier","name":"TypeError"},"arguments":[{"type":"Literal","value":"Cannot call a class as a function"}]}}]},"alternate":null}]},"parenthesizedExpression":true}}]},"helper-create-class":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"FunctionDeclaration","id":{"type":"Identifier","name":"defineProperties"},"generator":false,"expression":false,"params":[{"type":"Identifier","name":"target"},{"type":"Identifier","name":"props"}],"body":{"type":"BlockStatement","body":[{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"i"},"init":{"type":"Literal","value":0}}],"kind":"var"},"test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"i"},"operator":"<","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"props"},"property":{"type":"Identifier","name":"length"},"computed":false}},"update":{"type":"UpdateExpression","operator":"++","prefix":false,"argument":{"type":"Identifier","name":"i"}},"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"descriptor"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"props"},"property":{"type":"Identifier","name":"i"},"computed":true}}],"kind":"var"},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"enumerable"},"computed":false},"right":{"type":"LogicalExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"enumerable"},"computed":false},"operator":"||","right":{"type":"Literal","value":false}}}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"configurable"},"computed":false},"right":{"type":"Literal","value":true}}},{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Literal","value":"value"},"operator":"in","right":{"type":"Identifier","name":"descriptor"}},"consequent":{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"writable"},"computed":false},"right":{"type":"Literal","value":true}}},"alternate":null},{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"defineProperty"},"computed":false},"arguments":[{"type":"Identifier","name":"target"},{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"key"},"computed":false},{"type":"Identifier","name":"descriptor"}]}}]}}]}},{"type":"ReturnStatement","argument":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"Constructor"},{"type":"Identifier","name":"protoProps"},{"type":"Identifier","name":"staticProps"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"Identifier","name":"protoProps"},"consequent":{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"defineProperties"},"arguments":[{"type":"MemberExpression","object":{"type":"Identifier","name":"Constructor"},"property":{"type":"Identifier","name":"prototype"},"computed":false},{"type":"Identifier","name":"protoProps"}]}},"alternate":null},{"type":"IfStatement","test":{"type":"Identifier","name":"staticProps"},"consequent":{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"defineProperties"},"arguments":[{"type":"Identifier","name":"Constructor"},{"type":"Identifier","name":"staticProps"}]}},"alternate":null},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"Constructor"}}]}}}]},"parenthesizedExpression":true},"arguments":[]}}]},"helper-create-decorated-class":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"FunctionDeclaration","id":{"type":"Identifier","name":"defineProperties"},"generator":false,"expression":false,"params":[{"type":"Identifier","name":"target"},{"type":"Identifier","name":"descriptors"},{"type":"Identifier","name":"initializers"}],"body":{"type":"BlockStatement","body":[{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"i"},"init":{"type":"Literal","value":0}}],"kind":"var"},"test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"i"},"operator":"<","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptors"},"property":{"type":"Identifier","name":"length"},"computed":false}},"update":{"type":"UpdateExpression","operator":"++","prefix":false,"argument":{"type":"Identifier","name":"i"}},"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"descriptor"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptors"},"property":{"type":"Identifier","name":"i"},"computed":true}}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"decorators"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"decorators"},"computed":false}}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"key"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"key"},"computed":false}}],"kind":"var"},{"type":"ExpressionStatement","expression":{"type":"UnaryExpression","operator":"delete","prefix":true,"argument":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor","leadingComments":null},"property":{"type":"Identifier","name":"key"},"computed":false,"leadingComments":null},"leadingComments":null}},{"type":"ExpressionStatement","expression":{"type":"UnaryExpression","operator":"delete","prefix":true,"argument":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"decorators"},"computed":false}}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"enumerable"},"computed":false},"right":{"type":"LogicalExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"enumerable"},"computed":false},"operator":"||","right":{"type":"Literal","value":false}}}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"configurable"},"computed":false},"right":{"type":"Literal","value":true}}},{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"BinaryExpression","left":{"type":"Literal","value":"value"},"operator":"in","right":{"type":"Identifier","name":"descriptor"}},"operator":"||","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"initializer"},"computed":false}},"consequent":{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"writable"},"computed":false},"right":{"type":"Literal","value":true}}},"alternate":null},{"type":"IfStatement","test":{"type":"Identifier","name":"decorators"},"consequent":{"type":"BlockStatement","body":[{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"f"},"init":{"type":"Literal","value":0}}],"kind":"var"},"test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"f"},"operator":"<","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"decorators"},"property":{"type":"Identifier","name":"length"},"computed":false}},"update":{"type":"UpdateExpression","operator":"++","prefix":false,"argument":{"type":"Identifier","name":"f"}},"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"decorator"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"decorators"},"property":{"type":"Identifier","name":"f"},"computed":true}}],"kind":"var"},{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"decorator"}},"operator":"===","right":{"type":"Literal","value":"function"}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"descriptor"},"right":{"type":"LogicalExpression","left":{"type":"CallExpression","callee":{"type":"Identifier","name":"decorator"},"arguments":[{"type":"Identifier","name":"target"},{"type":"Identifier","name":"key"},{"type":"Identifier","name":"descriptor"}]},"operator":"||","right":{"type":"Identifier","name":"descriptor"}}}}]},"alternate":{"type":"BlockStatement","body":[{"type":"ThrowStatement","argument":{"type":"NewExpression","callee":{"type":"Identifier","name":"TypeError"},"arguments":[{"type":"BinaryExpression","left":{"type":"BinaryExpression","left":{"type":"BinaryExpression","left":{"type":"Literal","value":"The decorator for method "},"operator":"+","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"key"},"computed":false}},"operator":"+","right":{"type":"Literal","value":" is of the invalid type "}},"operator":"+","right":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"decorator"}}}]}}]}}]}},{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"initializer"},"computed":false},"operator":"!==","right":{"type":"Identifier","name":"undefined"}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"initializers"},"property":{"type":"Identifier","name":"key"},"computed":true},"right":{"type":"Identifier","name":"descriptor"}}},{"type":"ContinueStatement","label":null}]},"alternate":null}]},"alternate":null},{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"defineProperty"},"computed":false},"arguments":[{"type":"Identifier","name":"target"},{"type":"Identifier","name":"key"},{"type":"Identifier","name":"descriptor"}]}}]}}]}},{"type":"ReturnStatement","argument":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"Constructor"},{"type":"Identifier","name":"protoProps"},{"type":"Identifier","name":"staticProps"},{"type":"Identifier","name":"protoInitializers"},{"type":"Identifier","name":"staticInitializers"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"Identifier","name":"protoProps"},"consequent":{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"defineProperties"},"arguments":[{"type":"MemberExpression","object":{"type":"Identifier","name":"Constructor"},"property":{"type":"Identifier","name":"prototype"},"computed":false},{"type":"Identifier","name":"protoProps"},{"type":"Identifier","name":"protoInitializers"}]}},"alternate":null},{"type":"IfStatement","test":{"type":"Identifier","name":"staticProps"},"consequent":{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"defineProperties"},"arguments":[{"type":"Identifier","name":"Constructor"},{"type":"Identifier","name":"staticProps"},{"type":"Identifier","name":"staticInitializers"}]}},"alternate":null},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"Constructor"}}]}}}]},"parenthesizedExpression":true},"arguments":[]}}]},"helper-create-decorated-object":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"descriptors"}],"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"target"},"init":{"type":"ObjectExpression","properties":[]}}],"kind":"var"},{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"i"},"init":{"type":"Literal","value":0}}],"kind":"var"},"test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"i"},"operator":"<","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptors"},"property":{"type":"Identifier","name":"length"},"computed":false}},"update":{"type":"UpdateExpression","operator":"++","prefix":false,"argument":{"type":"Identifier","name":"i"}},"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"descriptor"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptors"},"property":{"type":"Identifier","name":"i"},"computed":true}}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"decorators"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"decorators"},"computed":false}}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"key"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"key"},"computed":false}}],"kind":"var"},{"type":"ExpressionStatement","expression":{"type":"UnaryExpression","operator":"delete","prefix":true,"argument":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor","leadingComments":null},"property":{"type":"Identifier","name":"key"},"computed":false,"leadingComments":null},"leadingComments":null}},{"type":"ExpressionStatement","expression":{"type":"UnaryExpression","operator":"delete","prefix":true,"argument":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"decorators"},"computed":false}}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"enumerable"},"computed":false},"right":{"type":"Literal","value":true}}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"configurable"},"computed":false},"right":{"type":"Literal","value":true}}},{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"BinaryExpression","left":{"type":"Literal","value":"value"},"operator":"in","right":{"type":"Identifier","name":"descriptor"}},"operator":"||","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"initializer"},"computed":false}},"consequent":{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"writable"},"computed":false},"right":{"type":"Literal","value":true}}},"alternate":null},{"type":"IfStatement","test":{"type":"Identifier","name":"decorators"},"consequent":{"type":"BlockStatement","body":[{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"f"},"init":{"type":"Literal","value":0}}],"kind":"var"},"test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"f"},"operator":"<","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"decorators"},"property":{"type":"Identifier","name":"length"},"computed":false}},"update":{"type":"UpdateExpression","operator":"++","prefix":false,"argument":{"type":"Identifier","name":"f"}},"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"decorator"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"decorators"},"property":{"type":"Identifier","name":"f"},"computed":true}}],"kind":"var"},{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"decorator"}},"operator":"===","right":{"type":"Literal","value":"function"}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"descriptor"},"right":{"type":"LogicalExpression","left":{"type":"CallExpression","callee":{"type":"Identifier","name":"decorator"},"arguments":[{"type":"Identifier","name":"target"},{"type":"Identifier","name":"key"},{"type":"Identifier","name":"descriptor"}]},"operator":"||","right":{"type":"Identifier","name":"descriptor"}}}}]},"alternate":{"type":"BlockStatement","body":[{"type":"ThrowStatement","argument":{"type":"NewExpression","callee":{"type":"Identifier","name":"TypeError"},"arguments":[{"type":"BinaryExpression","left":{"type":"BinaryExpression","left":{"type":"BinaryExpression","left":{"type":"Literal","value":"The decorator for method "},"operator":"+","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"key"},"computed":false}},"operator":"+","right":{"type":"Literal","value":" is of the invalid type "}},"operator":"+","right":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"decorator"}}}]}}]}}]}}]},"alternate":null},{"type":"IfStatement","test":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"initializer"},"computed":false},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"value"},"computed":false},"right":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"initializer"},"computed":false},"property":{"type":"Identifier","name":"call"},"computed":false},"arguments":[{"type":"Identifier","name":"target"}]}}}]},"alternate":null},{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"defineProperty"},"computed":false},"arguments":[{"type":"Identifier","name":"target"},{"type":"Identifier","name":"key"},{"type":"Identifier","name":"descriptor"}]}}]}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"target"}}]},"parenthesizedExpression":true}}]},"helper-default-props":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"defaultProps"},{"type":"Identifier","name":"props"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"Identifier","name":"defaultProps"},"consequent":{"type":"BlockStatement","body":[{"type":"ForInStatement","left":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"propName"},"init":null}],"kind":"var"},"right":{"type":"Identifier","name":"defaultProps"},"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"MemberExpression","object":{"type":"Identifier","name":"props"},"property":{"type":"Identifier","name":"propName"},"computed":true}},"operator":"===","right":{"type":"Literal","value":"undefined"}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"props"},"property":{"type":"Identifier","name":"propName"},"computed":true},"right":{"type":"MemberExpression","object":{"type":"Identifier","name":"defaultProps"},"property":{"type":"Identifier","name":"propName"},"computed":true}}}]},"alternate":null}]}}]},"alternate":null},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"props"}}]},"parenthesizedExpression":true}}]},"helper-defaults":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"obj"},{"type":"Identifier","name":"defaults"}],"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"keys"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"getOwnPropertyNames"},"computed":false},"arguments":[{"type":"Identifier","name":"defaults"}]}}],"kind":"var"},{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"i"},"init":{"type":"Literal","value":0}}],"kind":"var"},"test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"i"},"operator":"<","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"keys"},"property":{"type":"Identifier","name":"length"},"computed":false}},"update":{"type":"UpdateExpression","operator":"++","prefix":false,"argument":{"type":"Identifier","name":"i"}},"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"key"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"keys"},"property":{"type":"Identifier","name":"i"},"computed":true}}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"value"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"getOwnPropertyDescriptor"},"computed":false},"arguments":[{"type":"Identifier","name":"defaults"},{"type":"Identifier","name":"key"}]}}],"kind":"var"},{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"LogicalExpression","left":{"type":"Identifier","name":"value"},"operator":"&&","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"value"},"property":{"type":"Identifier","name":"configurable"},"computed":false}},"operator":"&&","right":{"type":"BinaryExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"obj"},"property":{"type":"Identifier","name":"key"},"computed":true},"operator":"===","right":{"type":"Identifier","name":"undefined"}}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"defineProperty"},"computed":false},"arguments":[{"type":"Identifier","name":"obj"},{"type":"Identifier","name":"key"},{"type":"Identifier","name":"value"}]}}]},"alternate":null}]}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"obj"}}]},"parenthesizedExpression":true}}]},"helper-define-decorated-property-descriptor":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"target"},{"type":"Identifier","name":"key"},{"type":"Identifier","name":"descriptors"}],"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"_descriptor"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptors"},"property":{"type":"Identifier","name":"key"},"computed":true}}],"kind":"var"},{"type":"IfStatement","test":{"type":"UnaryExpression","operator":"!","prefix":true,"argument":{"type":"Identifier","name":"_descriptor"}},"consequent":{"type":"ReturnStatement","argument":null,"leadingComments":null,"trailingComments":null},"alternate":null},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"descriptor","leadingComments":null},"init":{"type":"ObjectExpression","properties":[]},"leadingComments":null}],"kind":"var"},{"type":"ForInStatement","left":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"_key"},"init":null}],"kind":"var"},"right":{"type":"Identifier","name":"_descriptor"},"body":{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"_key"},"computed":true},"right":{"type":"MemberExpression","object":{"type":"Identifier","name":"_descriptor"},"property":{"type":"Identifier","name":"_key"},"computed":true}},"trailingComments":null}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor","leadingComments":null},"property":{"type":"Identifier","name":"value"},"computed":false,"leadingComments":null},"right":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"MemberExpression","object":{"type":"Identifier","name":"descriptor"},"property":{"type":"Identifier","name":"initializer"},"computed":false},"property":{"type":"Identifier","name":"call"},"computed":false},"arguments":[{"type":"Identifier","name":"target"}]},"leadingComments":null}},{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"defineProperty"},"computed":false},"arguments":[{"type":"Identifier","name":"target"},{"type":"Identifier","name":"key"},{"type":"Identifier","name":"descriptor"}]}}]},"parenthesizedExpression":true}}]},"helper-define-property":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"obj"},{"type":"Identifier","name":"key"},{"type":"Identifier","name":"value"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"key","leadingComments":null},"operator":"in","right":{"type":"Identifier","name":"obj"},"leadingComments":null},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"defineProperty"},"computed":false},"arguments":[{"type":"Identifier","name":"obj"},{"type":"Identifier","name":"key"},{"type":"ObjectExpression","properties":[{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"value"},"value":{"type":"Identifier","name":"value"},"kind":"init"},{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"enumerable"},"value":{"type":"Literal","value":true},"kind":"init"},{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"configurable"},"value":{"type":"Literal","value":true},"kind":"init"},{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"writable"},"value":{"type":"Literal","value":true},"kind":"init"}]}]}}]},"alternate":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"obj"},"property":{"type":"Identifier","name":"key"},"computed":true},"right":{"type":"Identifier","name":"value"}}}]}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"obj"}}]},"parenthesizedExpression":true}}]},"helper-extends":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"LogicalExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"assign"},"computed":false},"operator":"||","right":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"target"}],"body":{"type":"BlockStatement","body":[{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"i"},"init":{"type":"Literal","value":1}}],"kind":"var"},"test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"i"},"operator":"<","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"arguments"},"property":{"type":"Identifier","name":"length"},"computed":false}},"update":{"type":"UpdateExpression","operator":"++","prefix":false,"argument":{"type":"Identifier","name":"i"}},"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"source"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"arguments"},"property":{"type":"Identifier","name":"i"},"computed":true}}],"kind":"var"},{"type":"ForInStatement","left":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"key"},"init":null}],"kind":"var"},"right":{"type":"Identifier","name":"source"},"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"MemberExpression","object":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"prototype"},"computed":false},"property":{"type":"Identifier","name":"hasOwnProperty"},"computed":false},"property":{"type":"Identifier","name":"call"},"computed":false},"arguments":[{"type":"Identifier","name":"source"},{"type":"Identifier","name":"key"}]},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"target"},"property":{"type":"Identifier","name":"key"},"computed":true},"right":{"type":"MemberExpression","object":{"type":"Identifier","name":"source"},"property":{"type":"Identifier","name":"key"},"computed":true}}}]},"alternate":null}]}}]}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"target"}}]}}}}]},"helper-get":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":{"type":"Identifier","name":"get"},"generator":false,"expression":false,"params":[{"type":"Identifier","name":"object"},{"type":"Identifier","name":"property"},{"type":"Identifier","name":"receiver"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"object"},"operator":"===","right":{"type":"Literal","value":null,"rawValue":null}},"consequent":{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"object"},"right":{"type":"MemberExpression","object":{"type":"Identifier","name":"Function"},"property":{"type":"Identifier","name":"prototype"},"computed":false}}},"alternate":null},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"desc"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"getOwnPropertyDescriptor"},"computed":false},"arguments":[{"type":"Identifier","name":"object"},{"type":"Identifier","name":"property"}]}}],"kind":"var"},{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"desc"},"operator":"===","right":{"type":"Identifier","name":"undefined"}},"consequent":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"parent"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"getPrototypeOf"},"computed":false},"arguments":[{"type":"Identifier","name":"object"}]}}],"kind":"var"},{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"parent"},"operator":"===","right":{"type":"Literal","value":null,"rawValue":null}},"consequent":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"Identifier","name":"undefined"}}]},"alternate":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"CallExpression","callee":{"type":"Identifier","name":"get"},"arguments":[{"type":"Identifier","name":"parent"},{"type":"Identifier","name":"property"},{"type":"Identifier","name":"receiver"}]}}]}}]},"alternate":{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Literal","value":"value"},"operator":"in","right":{"type":"Identifier","name":"desc"}},"consequent":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"MemberExpression","object":{"type":"Identifier","name":"desc"},"property":{"type":"Identifier","name":"value"},"computed":false}}]},"alternate":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"getter"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"desc"},"property":{"type":"Identifier","name":"get"},"computed":false}}],"kind":"var"},{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"getter"},"operator":"===","right":{"type":"Identifier","name":"undefined"}},"consequent":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"Identifier","name":"undefined"}}]},"alternate":null},{"type":"ReturnStatement","argument":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"getter"},"property":{"type":"Identifier","name":"call"},"computed":false},"arguments":[{"type":"Identifier","name":"receiver"}]}}]}}}]},"parenthesizedExpression":true}}]},"helper-has-own":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"MemberExpression","object":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"prototype"},"computed":false},"property":{"type":"Identifier","name":"hasOwnProperty"},"computed":false}}]},"helper-inherits":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"subClass"},{"type":"Identifier","name":"superClass"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"BinaryExpression","left":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"superClass"}},"operator":"!==","right":{"type":"Literal","value":"function"}},"operator":"&&","right":{"type":"BinaryExpression","left":{"type":"Identifier","name":"superClass"},"operator":"!==","right":{"type":"Literal","value":null,"rawValue":null}}},"consequent":{"type":"BlockStatement","body":[{"type":"ThrowStatement","argument":{"type":"NewExpression","callee":{"type":"Identifier","name":"TypeError"},"arguments":[{"type":"BinaryExpression","left":{"type":"Literal","value":"Super expression must either be null or a function, not "},"operator":"+","right":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"superClass"}}}]}}]},"alternate":null},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"subClass"},"property":{"type":"Identifier","name":"prototype"},"computed":false},"right":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"create"},"computed":false},"arguments":[{"type":"LogicalExpression","left":{"type":"Identifier","name":"superClass"},"operator":"&&","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"superClass"},"property":{"type":"Identifier","name":"prototype"},"computed":false}},{"type":"ObjectExpression","properties":[{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"constructor"},"value":{"type":"ObjectExpression","properties":[{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"value"},"value":{"type":"Identifier","name":"subClass"},"kind":"init"},{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"enumerable"},"value":{"type":"Literal","value":false},"kind":"init"},{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"writable"},"value":{"type":"Literal","value":true},"kind":"init"},{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"configurable"},"value":{"type":"Literal","value":true},"kind":"init"}]},"kind":"init"}]}]}}},{"type":"IfStatement","test":{"type":"Identifier","name":"superClass"},"consequent":{"type":"ExpressionStatement","expression":{"type":"ConditionalExpression","test":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"setPrototypeOf"},"computed":false},"consequent":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"setPrototypeOf"},"computed":false},"arguments":[{"type":"Identifier","name":"subClass"},{"type":"Identifier","name":"superClass"}]},"alternate":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"subClass"},"property":{"type":"Identifier","name":"__proto__"},"computed":false},"right":{"type":"Identifier","name":"superClass"}}}},"alternate":null}]},"parenthesizedExpression":true}}]},"helper-instanceof":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"left"},{"type":"Identifier","name":"right"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"BinaryExpression","left":{"type":"Identifier","name":"right"},"operator":"!=","right":{"type":"Literal","value":null,"rawValue":null}},"operator":"&&","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"right"},"property":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"hasInstance"},"computed":false},"computed":true}},"consequent":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"right"},"property":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"hasInstance"},"computed":false},"computed":true},"arguments":[{"type":"Identifier","name":"left"}]}}]},"alternate":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"BinaryExpression","left":{"type":"Identifier","name":"left"},"operator":"instanceof","right":{"type":"Identifier","name":"right"}}}]}}]},"parenthesizedExpression":true}}]},"helper-interop-require-default":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"obj"}],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"ConditionalExpression","test":{"type":"LogicalExpression","left":{"type":"Identifier","name":"obj"},"operator":"&&","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"obj"},"property":{"type":"Identifier","name":"__esModule"},"computed":false}},"consequent":{"type":"Identifier","name":"obj"},"alternate":{"type":"ObjectExpression","properties":[{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Literal","value":"default"},"value":{"type":"Identifier","name":"obj"},"kind":"init"}]}}}]},"parenthesizedExpression":true}}]},"helper-interop-require-wildcard":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"obj"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"Identifier","name":"obj"},"operator":"&&","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"obj"},"property":{"type":"Identifier","name":"__esModule"},"computed":false}},"consequent":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"Identifier","name":"obj"}}]},"alternate":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"newObj"},"init":{"type":"ObjectExpression","properties":[]}}],"kind":"var"},{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"obj"},"operator":"!=","right":{"type":"Literal","value":null,"rawValue":null}},"consequent":{"type":"BlockStatement","body":[{"type":"ForInStatement","left":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"key"},"init":null}],"kind":"var"},"right":{"type":"Identifier","name":"obj"},"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"MemberExpression","object":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"prototype"},"computed":false},"property":{"type":"Identifier","name":"hasOwnProperty"},"computed":false},"property":{"type":"Identifier","name":"call"},"computed":false},"arguments":[{"type":"Identifier","name":"obj"},{"type":"Identifier","name":"key"}]},"consequent":{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"newObj"},"property":{"type":"Identifier","name":"key"},"computed":true},"right":{"type":"MemberExpression","object":{"type":"Identifier","name":"obj"},"property":{"type":"Identifier","name":"key"},"computed":true}}},"alternate":null}]}}]},"alternate":null},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"newObj"},"property":{"type":"Literal","value":"default"},"computed":true},"right":{"type":"Identifier","name":"obj"}}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"newObj"}}]}}]},"parenthesizedExpression":true}}]},"helper-interop-require":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"obj"}],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"ConditionalExpression","test":{"type":"LogicalExpression","left":{"type":"Identifier","name":"obj"},"operator":"&&","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"obj"},"property":{"type":"Identifier","name":"__esModule"},"computed":false}},"consequent":{"type":"MemberExpression","object":{"type":"Identifier","name":"obj"},"property":{"type":"Literal","value":"default"},"computed":true},"alternate":{"type":"Identifier","name":"obj"}}}]},"parenthesizedExpression":true}}]},"helper-object-destructuring-empty":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"obj"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"obj"},"operator":"==","right":{"type":"Literal","value":null,"rawValue":null}},"consequent":{"type":"ThrowStatement","argument":{"type":"NewExpression","callee":{"type":"Identifier","name":"TypeError"},"arguments":[{"type":"Literal","value":"Cannot destructure undefined"}]}},"alternate":null}]},"parenthesizedExpression":true}}]},"helper-object-without-properties":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"obj"},{"type":"Identifier","name":"keys"}],"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"target"},"init":{"type":"ObjectExpression","properties":[]}}],"kind":"var"},{"type":"ForInStatement","left":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"i"},"init":null}],"kind":"var"},"right":{"type":"Identifier","name":"obj"},"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"keys"},"property":{"type":"Identifier","name":"indexOf"},"computed":false},"arguments":[{"type":"Identifier","name":"i"}]},"operator":">=","right":{"type":"Literal","value":0}},"consequent":{"type":"ContinueStatement","label":null},"alternate":null},{"type":"IfStatement","test":{"type":"UnaryExpression","operator":"!","prefix":true,"argument":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"MemberExpression","object":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"prototype"},"computed":false},"property":{"type":"Identifier","name":"hasOwnProperty"},"computed":false},"property":{"type":"Identifier","name":"call"},"computed":false},"arguments":[{"type":"Identifier","name":"obj"},{"type":"Identifier","name":"i"}]}},"consequent":{"type":"ContinueStatement","label":null},"alternate":null},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"target"},"property":{"type":"Identifier","name":"i"},"computed":true},"right":{"type":"MemberExpression","object":{"type":"Identifier","name":"obj"},"property":{"type":"Identifier","name":"i"},"computed":true}}}]}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"target"}}]},"parenthesizedExpression":true}}]},"helper-self-global":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"ConditionalExpression","test":{"type":"BinaryExpression","left":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"global"}},"operator":"===","right":{"type":"Literal","value":"undefined"}},"consequent":{"type":"Identifier","name":"self"},"alternate":{"type":"Identifier","name":"global"}}}]},"helper-set":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":{"type":"Identifier","name":"set"},"generator":false,"expression":false,"params":[{"type":"Identifier","name":"object"},{"type":"Identifier","name":"property"},{"type":"Identifier","name":"value"},{"type":"Identifier","name":"receiver"}],"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"desc"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"getOwnPropertyDescriptor"},"computed":false},"arguments":[{"type":"Identifier","name":"object"},{"type":"Identifier","name":"property"}]}}],"kind":"var"},{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"desc"},"operator":"===","right":{"type":"Identifier","name":"undefined"}},"consequent":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"parent"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"getPrototypeOf"},"computed":false},"arguments":[{"type":"Identifier","name":"object"}]}}],"kind":"var"},{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"parent"},"operator":"!==","right":{"type":"Literal","value":null,"rawValue":null}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"set"},"arguments":[{"type":"Identifier","name":"parent"},{"type":"Identifier","name":"property"},{"type":"Identifier","name":"value"},{"type":"Identifier","name":"receiver"}]}}]},"alternate":null}]},"alternate":{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"BinaryExpression","left":{"type":"Literal","value":"value"},"operator":"in","right":{"type":"Identifier","name":"desc"}},"operator":"&&","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"desc"},"property":{"type":"Identifier","name":"writable"},"computed":false}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"desc"},"property":{"type":"Identifier","name":"value"},"computed":false},"right":{"type":"Identifier","name":"value"}}}]},"alternate":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"setter"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"desc"},"property":{"type":"Identifier","name":"set"},"computed":false}}],"kind":"var"},{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"setter"},"operator":"!==","right":{"type":"Identifier","name":"undefined"}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"setter"},"property":{"type":"Identifier","name":"call"},"computed":false},"arguments":[{"type":"Identifier","name":"receiver"},{"type":"Identifier","name":"value"}]}}]},"alternate":null}]}}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"value"}}]},"parenthesizedExpression":true}}]},"helper-slice":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"MemberExpression","object":{"type":"MemberExpression","object":{"type":"Identifier","name":"Array"},"property":{"type":"Identifier","name":"prototype"},"computed":false},"property":{"type":"Identifier","name":"slice"},"computed":false}}]},"helper-sliced-to-array-loose":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"arr"},{"type":"Identifier","name":"i"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Array"},"property":{"type":"Identifier","name":"isArray"},"computed":false},"arguments":[{"type":"Identifier","name":"arr"}]},"consequent":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"Identifier","name":"arr"}}]},"alternate":{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"iterator"},"computed":false},"operator":"in","right":{"type":"CallExpression","callee":{"type":"Identifier","name":"Object"},"arguments":[{"type":"Identifier","name":"arr"}]}},"consequent":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"_arr"},"init":{"type":"ArrayExpression","elements":[]}}],"kind":"var"},{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"_iterator"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"arr"},"property":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"iterator"},"computed":false},"computed":true},"arguments":[]}},{"type":"VariableDeclarator","id":{"type":"Identifier","name":"_step"},"init":null}],"kind":"var"},"test":{"type":"UnaryExpression","operator":"!","prefix":true,"argument":{"type":"MemberExpression","object":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"_step"},"right":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"_iterator"},"property":{"type":"Identifier","name":"next"},"computed":false},"arguments":[]},"parenthesizedExpression":true},"property":{"type":"Identifier","name":"done"},"computed":false}},"update":null,"body":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"_arr"},"property":{"type":"Identifier","name":"push"},"computed":false},"arguments":[{"type":"MemberExpression","object":{"type":"Identifier","name":"_step"},"property":{"type":"Identifier","name":"value"},"computed":false}]}},{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"Identifier","name":"i"},"operator":"&&","right":{"type":"BinaryExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"_arr"},"property":{"type":"Identifier","name":"length"},"computed":false},"operator":"===","right":{"type":"Identifier","name":"i"}}},"consequent":{"type":"BreakStatement","label":null},"alternate":null}]}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"_arr"}}]},"alternate":{"type":"BlockStatement","body":[{"type":"ThrowStatement","argument":{"type":"NewExpression","callee":{"type":"Identifier","name":"TypeError"},"arguments":[{"type":"Literal","value":"Invalid attempt to destructure non-iterable instance"}]}}]}}}]},"parenthesizedExpression":true}}]},"helper-sliced-to-array":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"FunctionDeclaration","id":{"type":"Identifier","name":"sliceIterator","leadingComments":null},"generator":false,"expression":false,"params":[{"type":"Identifier","name":"arr"},{"type":"Identifier","name":"i"}],"body":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"_arr","leadingComments":null},"init":{"type":"ArrayExpression","elements":[]},"leadingComments":null}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"_n"},"init":{"type":"Literal","value":true}}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"_d"},"init":{"type":"Literal","value":false}}],"kind":"var"},{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"_e"},"init":{"type":"Identifier","name":"undefined"}}],"kind":"var"},{"type":"TryStatement","block":{"type":"BlockStatement","body":[{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"_i"},"init":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"arr"},"property":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"iterator"},"computed":false},"computed":true},"arguments":[]}},{"type":"VariableDeclarator","id":{"type":"Identifier","name":"_s"},"init":null}],"kind":"var"},"test":{"type":"UnaryExpression","operator":"!","prefix":true,"argument":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"_n"},"right":{"type":"MemberExpression","object":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"_s"},"right":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"_i"},"property":{"type":"Identifier","name":"next"},"computed":false},"arguments":[]},"parenthesizedExpression":true},"property":{"type":"Identifier","name":"done"},"computed":false},"parenthesizedExpression":true}},"update":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"_n"},"right":{"type":"Literal","value":true}},"body":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"_arr"},"property":{"type":"Identifier","name":"push"},"computed":false},"arguments":[{"type":"MemberExpression","object":{"type":"Identifier","name":"_s"},"property":{"type":"Identifier","name":"value"},"computed":false}]}},{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"Identifier","name":"i"},"operator":"&&","right":{"type":"BinaryExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"_arr"},"property":{"type":"Identifier","name":"length"},"computed":false},"operator":"===","right":{"type":"Identifier","name":"i"}}},"consequent":{"type":"BreakStatement","label":null},"alternate":null}]}}]},"handler":{"type":"CatchClause","param":{"type":"Identifier","name":"err"},"body":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"_d"},"right":{"type":"Literal","value":true}}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"Identifier","name":"_e"},"right":{"type":"Identifier","name":"err"}}}]}},"guardedHandlers":[],"finalizer":{"type":"BlockStatement","body":[{"type":"TryStatement","block":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"UnaryExpression","operator":"!","prefix":true,"argument":{"type":"Identifier","name":"_n"}},"operator":"&&","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"_i"},"property":{"type":"Literal","value":"return"},"computed":true}},"consequent":{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"_i"},"property":{"type":"Literal","value":"return"},"computed":true},"arguments":[]}},"alternate":null}]},"handler":null,"guardedHandlers":[],"finalizer":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"Identifier","name":"_d"},"consequent":{"type":"ThrowStatement","argument":{"type":"Identifier","name":"_e"}},"alternate":null}]}}]}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"_arr"}}]}},{"type":"ReturnStatement","argument":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"arr"},{"type":"Identifier","name":"i"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Array"},"property":{"type":"Identifier","name":"isArray"},"computed":false},"arguments":[{"type":"Identifier","name":"arr"}]},"consequent":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"Identifier","name":"arr"}}]},"alternate":{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"Symbol"},"property":{"type":"Identifier","name":"iterator"},"computed":false},"operator":"in","right":{"type":"CallExpression","callee":{"type":"Identifier","name":"Object"},"arguments":[{"type":"Identifier","name":"arr"}]}},"consequent":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"CallExpression","callee":{"type":"Identifier","name":"sliceIterator"},"arguments":[{"type":"Identifier","name":"arr"},{"type":"Identifier","name":"i"}]}}]},"alternate":{"type":"BlockStatement","body":[{"type":"ThrowStatement","argument":{"type":"NewExpression","callee":{"type":"Identifier","name":"TypeError"},"arguments":[{"type":"Literal","value":"Invalid attempt to destructure non-iterable instance"}]}}]}}}]}}}]},"parenthesizedExpression":true},"arguments":[]}}]},"helper-tagged-template-literal-loose":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"strings"},{"type":"Identifier","name":"raw"}],"body":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"strings"},"property":{"type":"Identifier","name":"raw"},"computed":false},"right":{"type":"Identifier","name":"raw"}}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"strings"}}]},"parenthesizedExpression":true}}]},"helper-tagged-template-literal":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"strings"},{"type":"Identifier","name":"raw"}],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"freeze"},"computed":false},"arguments":[{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"defineProperties"},"computed":false},"arguments":[{"type":"Identifier","name":"strings"},{"type":"ObjectExpression","properties":[{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"raw"},"value":{"type":"ObjectExpression","properties":[{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"value"},"value":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Object"},"property":{"type":"Identifier","name":"freeze"},"computed":false},"arguments":[{"type":"Identifier","name":"raw"}]},"kind":"init"}]},"kind":"init"}]}]}]}}]},"parenthesizedExpression":true}}]},"helper-temporal-assert-defined":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"val"},{"type":"Identifier","name":"name"},{"type":"Identifier","name":"undef"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"val"},"operator":"===","right":{"type":"Identifier","name":"undef"}},"consequent":{"type":"BlockStatement","body":[{"type":"ThrowStatement","argument":{"type":"NewExpression","callee":{"type":"Identifier","name":"ReferenceError"},"arguments":[{"type":"BinaryExpression","left":{"type":"Identifier","name":"name"},"operator":"+","right":{"type":"Literal","value":" is not defined - temporal dead zone"}}]}}]},"alternate":null},{"type":"ReturnStatement","argument":{"type":"Literal","value":true}}]},"parenthesizedExpression":true}}]},"helper-temporal-undefined":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"ObjectExpression","properties":[],"parenthesizedExpression":true}}]},"helper-to-array":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"arr"}],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"ConditionalExpression","test":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Array"},"property":{"type":"Identifier","name":"isArray"},"computed":false},"arguments":[{"type":"Identifier","name":"arr"}]},"consequent":{"type":"Identifier","name":"arr"},"alternate":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Array"},"property":{"type":"Identifier","name":"from"},"computed":false},"arguments":[{"type":"Identifier","name":"arr"}]}}}]},"parenthesizedExpression":true}}]},"helper-to-consumable-array":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"arr"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Array"},"property":{"type":"Identifier","name":"isArray"},"computed":false},"arguments":[{"type":"Identifier","name":"arr"}]},"consequent":{"type":"BlockStatement","body":[{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"i"},"init":{"type":"Literal","value":0}},{"type":"VariableDeclarator","id":{"type":"Identifier","name":"arr2"},"init":{"type":"CallExpression","callee":{"type":"Identifier","name":"Array"},"arguments":[{"type":"MemberExpression","object":{"type":"Identifier","name":"arr"},"property":{"type":"Identifier","name":"length"},"computed":false}]}}],"kind":"var"},"test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"i"},"operator":"<","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"arr"},"property":{"type":"Identifier","name":"length"},"computed":false}},"update":{"type":"UpdateExpression","operator":"++","prefix":false,"argument":{"type":"Identifier","name":"i"}},"body":{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"arr2"},"property":{"type":"Identifier","name":"i"},"computed":true},"right":{"type":"MemberExpression","object":{"type":"Identifier","name":"arr"},"property":{"type":"Identifier","name":"i"},"computed":true}}}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"arr2"}}]},"alternate":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"Array"},"property":{"type":"Identifier","name":"from"},"computed":false},"arguments":[{"type":"Identifier","name":"arr"}]}}]}}]},"parenthesizedExpression":true}}]},"helper-typeof":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"obj"}],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"ConditionalExpression","test":{"type":"LogicalExpression","left":{"type":"Identifier","name":"obj"},"operator":"&&","right":{"type":"BinaryExpression","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"obj"},"property":{"type":"Identifier","name":"constructor"},"computed":false},"operator":"===","right":{"type":"Identifier","name":"Symbol"}}},"consequent":{"type":"Literal","value":"symbol"},"alternate":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"obj"}}}}]},"parenthesizedExpression":true}}]},"let-scoping-return":{"type":"Program","body":[{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"RETURN"}},"operator":"===","right":{"type":"Literal","value":"object"}},"consequent":{"type":"ReturnStatement","argument":{"type":"MemberExpression","object":{"type":"Identifier","name":"RETURN"},"property":{"type":"Identifier","name":"v"},"computed":false}},"alternate":null}]},"named-function":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"FunctionDeclaration","id":{"type":"Identifier","name":"GET_OUTER_ID"},"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"Identifier","name":"FUNCTION_ID"}}]}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"FUNCTION"}}]},"parenthesizedExpression":true},"arguments":[]}}]},"property-method-assignment-wrapper-generator":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"FUNCTION_KEY"}],"body":{"type":"BlockStatement","body":[{"type":"FunctionDeclaration","id":{"type":"Identifier","name":"FUNCTION_ID"},"generator":true,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"YieldExpression","delegate":true,"argument":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"FUNCTION_KEY"},"property":{"type":"Identifier","name":"apply"},"computed":false},"arguments":[{"type":"ThisExpression"},{"type":"Identifier","name":"arguments"}]}}}]}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"FUNCTION_ID"},"property":{"type":"Identifier","name":"toString"},"computed":false},"right":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"FUNCTION_KEY"},"property":{"type":"Identifier","name":"toString"},"computed":false},"arguments":[]}}]}}}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"FUNCTION_ID"}}]},"parenthesizedExpression":true},"arguments":[{"type":"Identifier","name":"FUNCTION"}]}}]},"property-method-assignment-wrapper":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"FUNCTION_KEY"}],"body":{"type":"BlockStatement","body":[{"type":"FunctionDeclaration","id":{"type":"Identifier","name":"FUNCTION_ID"},"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"FUNCTION_KEY"},"property":{"type":"Identifier","name":"apply"},"computed":false},"arguments":[{"type":"ThisExpression"},{"type":"Identifier","name":"arguments"}]}}]}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"FUNCTION_ID"},"property":{"type":"Identifier","name":"toString"},"computed":false},"right":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"FUNCTION_KEY"},"property":{"type":"Identifier","name":"toString"},"computed":false},"arguments":[]}}]}}}},{"type":"ReturnStatement","argument":{"type":"Identifier","name":"FUNCTION_ID"}}]},"parenthesizedExpression":true},"arguments":[{"type":"Identifier","name":"FUNCTION"}]}}]},"prototype-identifier":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"MemberExpression","object":{"type":"Identifier","name":"CLASS_NAME"},"property":{"type":"Identifier","name":"prototype"},"computed":false}}]},"require-assign-key":{"type":"Program","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"VARIABLE_NAME"},"init":{"type":"MemberExpression","object":{"type":"CallExpression","callee":{"type":"Identifier","name":"require"},"arguments":[{"type":"Identifier","name":"MODULE_NAME"}]},"property":{"type":"Identifier","name":"KEY"},"computed":false}}],"kind":"var"}]},"require":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"require"},"arguments":[{"type":"Identifier","name":"MODULE_NAME"}]}}]},"rest":{"type":"Program","body":[{"type":"ForStatement","init":{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"LEN"},"init":{"type":"MemberExpression","object":{"type":"Identifier","name":"ARGUMENTS"},"property":{"type":"Identifier","name":"length"},"computed":false}},{"type":"VariableDeclarator","id":{"type":"Identifier","name":"ARRAY"},"init":{"type":"CallExpression","callee":{"type":"Identifier","name":"Array"},"arguments":[{"type":"Identifier","name":"ARRAY_LEN"}]}},{"type":"VariableDeclarator","id":{"type":"Identifier","name":"KEY"},"init":{"type":"Identifier","name":"START"}}],"kind":"var"},"test":{"type":"BinaryExpression","left":{"type":"Identifier","name":"KEY"},"operator":"<","right":{"type":"Identifier","name":"LEN"}},"update":{"type":"UpdateExpression","operator":"++","prefix":false,"argument":{"type":"Identifier","name":"KEY"}},"body":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"ARRAY"},"property":{"type":"Identifier","name":"ARRAY_KEY"},"computed":true},"right":{"type":"MemberExpression","object":{"type":"Identifier","name":"ARGUMENTS"},"property":{"type":"Identifier","name":"KEY"},"computed":true}}}]}}]},"self-contained-helpers-head":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"exports"},"property":{"type":"Literal","value":"default"},"computed":true},"right":{"type":"Identifier","name":"HELPER"}}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"exports"},"property":{"type":"Identifier","name":"__esModule"},"computed":false},"right":{"type":"Literal","value":true}}}]},"system":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"MemberExpression","object":{"type":"Identifier","name":"System"},"property":{"type":"Identifier","name":"register"},"computed":false},"arguments":[{"type":"Identifier","name":"MODULE_NAME"},{"type":"Identifier","name":"MODULE_DEPENDENCIES"},{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"EXPORT_IDENTIFIER"}],"body":{"type":"BlockStatement","body":[{"type":"ReturnStatement","argument":{"type":"ObjectExpression","properties":[{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"setters"},"value":{"type":"Identifier","name":"SETTERS"},"kind":"init"},{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"execute"},"value":{"type":"Identifier","name":"EXECUTE"},"kind":"init"}]}}]}}]}}]},"tail-call-body":{"type":"Program","body":[{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"AGAIN_ID"},"init":{"type":"Literal","value":true}}],"kind":"var"},{"type":"LabeledStatement","body":{"type":"WhileStatement","test":{"type":"Identifier","name":"AGAIN_ID"},"body":{"type":"ExpressionStatement","expression":{"type":"Identifier","name":"BLOCK"}}},"label":{"type":"Identifier","name":"FUNCTION_ID"}}]}]},"test-exports":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"BinaryExpression","left":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"exports"}},"operator":"!==","right":{"type":"Literal","value":"undefined"}}}]},"test-module":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"BinaryExpression","left":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"module"}},"operator":"!==","right":{"type":"Literal","value":"undefined"}}}]},"umd-commonjs-strict":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"root"},{"type":"Identifier","name":"factory"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"BinaryExpression","left":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"define"}},"operator":"===","right":{"type":"Literal","value":"function"}},"operator":"&&","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"define"},"property":{"type":"Identifier","name":"amd"},"computed":false}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"define"},"arguments":[{"type":"Identifier","name":"AMD_ARGUMENTS"},{"type":"Identifier","name":"factory"}]}}]},"alternate":{"type":"IfStatement","test":{"type":"BinaryExpression","left":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"exports"}},"operator":"===","right":{"type":"Literal","value":"object"}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"factory"},"arguments":[{"type":"Identifier","name":"COMMON_ARGUMENTS"}]}}]},"alternate":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"factory"},"arguments":[{"type":"Identifier","name":"BROWSER_ARGUMENTS"}]}}]}}}]},"parenthesizedExpression":true},"arguments":[{"type":"Identifier","name":"UMD_ROOT"},{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"FACTORY_PARAMETERS"}],"body":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"Identifier","name":"FACTORY_BODY"}}]}}]}}]},"umd-runner-body":{"type":"Program","body":[{"type":"ExpressionStatement","expression":{"type":"FunctionExpression","id":null,"generator":false,"expression":false,"params":[{"type":"Identifier","name":"global"},{"type":"Identifier","name":"factory"}],"body":{"type":"BlockStatement","body":[{"type":"IfStatement","test":{"type":"LogicalExpression","left":{"type":"BinaryExpression","left":{"type":"UnaryExpression","operator":"typeof","prefix":true,"argument":{"type":"Identifier","name":"define"}},"operator":"===","right":{"type":"Literal","value":"function"}},"operator":"&&","right":{"type":"MemberExpression","object":{"type":"Identifier","name":"define"},"property":{"type":"Identifier","name":"amd"},"computed":false}},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"define"},"arguments":[{"type":"Identifier","name":"AMD_ARGUMENTS"},{"type":"Identifier","name":"factory"}]}}]},"alternate":{"type":"IfStatement","test":{"type":"Identifier","name":"COMMON_TEST"},"consequent":{"type":"BlockStatement","body":[{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"factory"},"arguments":[{"type":"Identifier","name":"COMMON_ARGUMENTS"}]}}]},"alternate":{"type":"BlockStatement","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"mod"},"init":{"type":"ObjectExpression","properties":[{"type":"Property","method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","name":"exports"},"value":{"type":"ObjectExpression","properties":[]},"kind":"init"}]}}],"kind":"var"},{"type":"ExpressionStatement","expression":{"type":"CallExpression","callee":{"type":"Identifier","name":"factory"},"arguments":[{"type":"MemberExpression","object":{"type":"Identifier","name":"mod"},"property":{"type":"Identifier","name":"exports"},"computed":false},{"type":"Identifier","name":"BROWSER_ARGUMENTS"}]}},{"type":"ExpressionStatement","expression":{"type":"AssignmentExpression","operator":"=","left":{"type":"MemberExpression","object":{"type":"Identifier","name":"global"},"property":{"type":"Identifier","name":"GLOBAL_ARG"},"computed":false},"right":{"type":"MemberExpression","object":{"type":"Identifier","name":"mod"},"property":{"type":"Identifier","name":"exports"},"computed":false}}}]}}}]},"parenthesizedExpression":true}}]}} +},{}]},{},[29])(29) }); \ No newline at end of file diff --git a/browser.min.js b/browser.min.js index 4155b15..9835ff2 100644 --- a/browser.min.js +++ b/browser.min.js @@ -1,42 +1,41 @@ -(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.babel=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){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[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o")){node.params.push(this.flow_parseTypeAnnotatableIdentifier());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");return this.finishNode(node,"TypeParameterDeclaration")};pp.flow_parseTypeParameterInstantiation=function(){var node=this.startNode(),oldInType=this.inType;node.params=[];this.inType=true;this.expectRelational("<");while(!this.isRelational(">")){node.params.push(this.flow_parseType());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");this.inType=oldInType;return this.finishNode(node,"TypeParameterInstantiation")};pp.flow_parseObjectPropertyKey=function(){return this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.flow_parseObjectTypeIndexer=function(node,isStatic){node["static"]=isStatic;this.expect(tt.bracketL);node.id=this.flow_parseObjectPropertyKey();node.key=this.flow_parseTypeInitialiser();this.expect(tt.bracketR);node.value=this.flow_parseTypeInitialiser();this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeIndexer")};pp.flow_parseObjectTypeMethodish=function(node){node.params=[];node.rest=null;node.typeParameters=null;if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}this.expect(tt.parenL);while(this.type===tt.name){node.params.push(this.flow_parseFunctionTypeParam());if(this.type!==tt.parenR){this.expect(tt.comma)}}if(this.eat(tt.ellipsis)){node.rest=this.flow_parseFunctionTypeParam()}this.expect(tt.parenR);node.returnType=this.flow_parseTypeInitialiser();return this.finishNode(node,"FunctionTypeAnnotation")};pp.flow_parseObjectTypeMethod=function(start,isStatic,key){var node=this.startNodeAt(start);node.value=this.flow_parseObjectTypeMethodish(this.startNodeAt(start));node["static"]=isStatic;node.key=key;node.optional=false;this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeProperty")};pp.flow_parseObjectTypeCallProperty=function(node,isStatic){var valueNode=this.startNode();node["static"]=isStatic;node.value=this.flow_parseObjectTypeMethodish(valueNode);this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeCallProperty")};pp.flow_parseObjectType=function(allowStatic){var nodeStart=this.startNode();var node;var optional=false;var property;var propertyKey;var propertyTypeAnnotation;var token;var isStatic;nodeStart.callProperties=[];nodeStart.properties=[];nodeStart.indexers=[];this.expect(tt.braceL);while(this.type!==tt.braceR){var start=this.markPosition();node=this.startNode();if(allowStatic&&this.isContextual("static")){this.next();isStatic=true}if(this.type===tt.bracketL){nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node,isStatic))}else if(this.type===tt.parenL||this.isRelational("<")){nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node,allowStatic))}else{if(isStatic&&this.type===tt.colon){propertyKey=this.parseIdent()}else{propertyKey=this.flow_parseObjectPropertyKey()}if(this.isRelational("<")||this.type===tt.parenL){nodeStart.properties.push(this.flow_parseObjectTypeMethod(start,isStatic,propertyKey))}else{if(this.eat(tt.question)){optional=true}node.key=propertyKey;node.value=this.flow_parseTypeInitialiser();node.optional=optional;node["static"]=isStatic;this.flow_objectTypeSemicolon();nodeStart.properties.push(this.finishNode(node,"ObjectTypeProperty"))}}}this.expect(tt.braceR);return this.finishNode(nodeStart,"ObjectTypeAnnotation")};pp.flow_objectTypeSemicolon=function(){if(!this.eat(tt.semi)&&!this.eat(tt.comma)&&this.type!==tt.braceR){this.unexpected()}};pp.flow_parseGenericType=function(start,id){var node=this.startNodeAt(start);node.typeParameters=null;node.id=id;while(this.eat(tt.dot)){var node2=this.startNodeAt(start);node2.qualification=node.id;node2.id=this.parseIdent();node.id=this.finishNode(node2,"QualifiedTypeIdentifier")}if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterInstantiation()}return this.finishNode(node,"GenericTypeAnnotation")};pp.flow_parseTypeofType=function(){var node=this.startNode();this.expect(tt._typeof);node.argument=this.flow_parsePrimaryType();return this.finishNode(node,"TypeofTypeAnnotation")};pp.flow_parseTupleType=function(){var node=this.startNode();node.types=[];this.expect(tt.bracketL);while(this.pos. It looks like "+"you are trying to write a function type, but you ended up "+"writing a grouped type followed by an =>, which is a syntax "+"error. Remember, function type parameters are named so function "+"types look like (name1: type1, name2: type2) => returnType. You "+"probably wrote (type1) => returnType")}return type}tmp=this.flow_parseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;this.expect(tt.parenR);this.expect(tt.arrow);node.returnType=this.flow_parseType();node.typeParameters=null;return this.finishNode(node,"FunctionTypeAnnotation");case tt.string:node.value=this.value;node.raw=this.input.slice(this.start,this.end);this.next();return this.finishNode(node,"StringLiteralTypeAnnotation");default:if(this.type.keyword==="typeof"){return this.flow_parseTypeofType()}}this.unexpected()};pp.flow_parsePostfixType=function(){var node=this.startNode();var type=node.elementType=this.flow_parsePrimaryType();if(this.type===tt.bracketL){this.expect(tt.bracketL);this.expect(tt.bracketR);return this.finishNode(node,"ArrayTypeAnnotation")}return type};pp.flow_parsePrefixType=function(){var node=this.startNode();if(this.eat(tt.question)){node.typeAnnotation=this.flow_parsePrefixType();return this.finishNode(node,"NullableTypeAnnotation")}return this.flow_parsePostfixType()};pp.flow_parseIntersectionType=function(){var node=this.startNode();var type=this.flow_parsePrefixType();node.types=[type];while(this.eat(tt.bitwiseAND)){node.types.push(this.flow_parsePrefixType())}return node.types.length===1?type:this.finishNode(node,"IntersectionTypeAnnotation")};pp.flow_parseUnionType=function(){var node=this.startNode();var type=this.flow_parseIntersectionType();node.types=[type];while(this.eat(tt.bitwiseOR)){node.types.push(this.flow_parseIntersectionType())}return node.types.length===1?type:this.finishNode(node,"UnionTypeAnnotation")};pp.flow_parseType=function(){var oldInType=this.inType;this.inType=true;var type=this.flow_parseUnionType();this.inType=oldInType;return type};pp.flow_parseTypeAnnotation=function(){var node=this.startNode();node.typeAnnotation=this.flow_parseTypeInitialiser();return this.finishNode(node,"TypeAnnotation")};pp.flow_parseTypeAnnotatableIdentifier=function(requireTypeAnnotation,canBeOptionalParam){var node=this.startNode();var ident=this.parseIdent();var isOptionalParam=false;if(canBeOptionalParam&&this.eat(tt.question)){this.expect(tt.question);isOptionalParam=true}if(requireTypeAnnotation||this.type===tt.colon){ident.typeAnnotation=this.flow_parseTypeAnnotation();this.finishNode(ident,ident.type)}if(isOptionalParam){ident.optional=true;this.finishNode(ident,ident.type)}return ident};acorn.plugins.flow=function(instance){instance.extend("parseFunctionBody",function(inner){return function(node,allowExpression){if(this.type===tt.colon){node.returnType=this.flow_parseTypeAnnotation()}return inner.call(this,node,allowExpression)}});instance.extend("parseStatement",function(inner){return function(declaration,topLevel){if(this.strict&&this.type===tt.name&&this.value==="interface"){var node=this.startNode();this.next();return this.flow_parseInterface(node)}else{return inner.call(this,declaration,topLevel)}}});instance.extend("parseExpressionStatement",function(inner){return function(node,expr){if(expr.type==="Identifier"){if(expr.name==="declare"){if(this.type===tt._class||this.type===tt.name||this.type===tt._function||this.type===tt._var){return this.flow_parseDeclare(node)}}else if(this.type===tt.name){if(expr.name==="interface"){return this.flow_parseInterface(node)}else if(expr.name==="type"){return this.flow_parseTypeAlias(node)}}}return inner.call(this,node,expr)}});instance.extend("shouldParseExportDeclaration",function(inner){return function(){return this.isContextual("type")||inner.call(this)}});instance.extend("parseParenItem",function(inner){return function(node,start){if(this.type===tt.colon){var typeCastNode=this.startNodeAt(start);typeCastNode.expression=node;typeCastNode.typeAnnotation=this.flow_parseTypeAnnotation();return this.finishNode(typeCastNode,"TypeCastExpression")}else{return node}}});instance.extend("parseClassId",function(inner){return function(node,isStatement){inner.call(this,node,isStatement);if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}}});instance.extend("isKeyword",function(inner){return function(name){if(this.inType&&name==="void"){return false}else{return inner.call(this,name)}}});instance.extend("readToken",function(inner){return function(code){if(this.inType&&(code===62||code===60)){return this.finishOp(tt.relational,1)}else{return inner.call(this,code)}}});instance.extend("jsx_readToken",function(inner){return function(){if(!this.inType)return inner.call(this)}});instance.extend("parseParenArrowList",function(inner){return function(start,exprList,isAsync){for(var i=0;i=6&&(prop.computed||prop.method||prop.shorthand))return;var key=prop.key,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.raise(key.start,"Redefinition of __proto__ property");propHash.proto=true}return}var other=undefined;if(_util.has(propHash,name)){other=propHash[name];var isGetSet=kind!=="init";if((this.strict||isGetSet)&&other[kind]||!(isGetSet^other.init))this.raise(key.start,"Redefinition of property")}else{other=propHash[name]={init:false,get:false,set:false}}other[kind]=true};pp.parseExpression=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeAssign(noIn,refShorthandDefaultPos);if(this.type===_tokentype.types.comma){var node=this.startNodeAt(start);node.expressions=[expr];while(this.eat(_tokentype.types.comma))node.expressions.push(this.parseMaybeAssign(noIn,refShorthandDefaultPos));return this.finishNode(node,"SequenceExpression")}return expr};pp.parseMaybeAssign=function(noIn,refShorthandDefaultPos,afterLeftParse){if(this.type==_tokentype.types._yield&&this.inGenerator)return this.parseYield();var failOnShorthandAssign=undefined;if(!refShorthandDefaultPos){refShorthandDefaultPos={start:0};failOnShorthandAssign=true}else{failOnShorthandAssign=false}var start=this.markPosition();if(this.type==_tokentype.types.parenL||this.type==_tokentype.types.name)this.potentialArrowAt=this.start;var left=this.parseMaybeConditional(noIn,refShorthandDefaultPos);if(afterLeftParse)left=afterLeftParse.call(this,left,start);if(this.type.isAssign){var node=this.startNodeAt(start);node.operator=this.value;node.left=this.type===_tokentype.types.eq?this.toAssignable(left):left;refShorthandDefaultPos.start=0;this.checkLVal(left);if(left.parenthesizedExpression){var errorMsg=undefined;if(left.type==="ObjectPattern"){errorMsg="`({a}) = 0` use `({a} = 0)`"}else if(left.type==="ArrayPattern"){errorMsg="`([a]) = 0` use `([a] = 0)`"}if(errorMsg){this.raise(left.start,"You're trying to assign to a parenthesized expression, eg. instead of "+errorMsg)}}this.next();node.right=this.parseMaybeAssign(noIn);return this.finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return left};pp.parseMaybeConditional=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;if(this.eat(_tokentype.types.question)){var node=this.startNodeAt(start);node.test=expr;node.consequent=this.parseMaybeAssign();this.expect(_tokentype.types.colon);node.alternate=this.parseMaybeAssign(noIn);return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseExprOp(expr,start,-1,noIn)};pp.parseExprOp=function(left,leftStart,minPrec,noIn){var prec=this.type.binop;if(prec!=null&&(!noIn||this.type!==_tokentype.types._in)){if(prec>minPrec){var node=this.startNodeAt(leftStart);node.left=left;node.operator=this.value;var op=this.type;this.next();var start=this.markPosition();node.right=this.parseExprOp(this.parseMaybeUnary(),start,op.rightAssociative?prec-1:prec,noIn);this.finishNode(node,op===_tokentype.types.logicalOR||op===_tokentype.types.logicalAND?"LogicalExpression":"BinaryExpression");return this.parseExprOp(node,leftStart,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){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();if(refShorthandDefaultPos&&refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(update)this.checkLVal(node.argument);else if(this.strict&&node.operator==="delete"&&node.argument.type==="Identifier")this.raise(node.start,"Deleting local variable in strict mode");return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var start=this.markPosition();var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.type.postfix&&!this.canInsertSemicolon()){var node=this.startNodeAt(start);node.operator=this.value;node.prefix=false;node.argument=expr;this.checkLVal(expr);this.next();expr=this.finishNode(node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprAtom(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseSubscripts(expr,start)};pp.parseSubscripts=function(base,start,noCalls){if(!noCalls&&this.eat(_tokentype.types.doubleColon)){var node=this.startNodeAt(start);node.object=base;node.callee=this.parseNoCallExpr();return this.parseSubscripts(this.finishNode(node,"BindExpression"),start,noCalls)}else if(this.eat(_tokentype.types.dot)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseIdent(true);node.computed=false;return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(this.eat(_tokentype.types.bracketL)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseExpression();node.computed=true;this.expect(_tokentype.types.bracketR);return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(!noCalls&&this.eat(_tokentype.types.parenL)){var node=this.startNodeAt(start);node.callee=base;node.arguments=this.parseExprList(_tokentype.types.parenR,this.options.features["es7.trailingFunctionCommas"]);return this.parseSubscripts(this.finishNode(node,"CallExpression"),start,noCalls)}else if(this.type===_tokentype.types.backQuote){var node=this.startNodeAt(start);node.tag=base;node.quasi=this.parseTemplate();return this.parseSubscripts(this.finishNode(node,"TaggedTemplateExpression"),start,noCalls)}return base};pp.parseNoCallExpr=function(){var start=this.markPosition();return this.parseSubscripts(this.parseExprAtom(),start,true)};pp.parseExprAtom=function(refShorthandDefaultPos){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._yield:if(this.inGenerator)this.unexpected();case _tokentype.types._do:if(this.options.features["es7.doExpressions"]){var _node=this.startNode();this.next();var oldInFunction=this.inFunction;var oldLabels=this.labels;this.labels=[];this.inFunction=false;_node.body=this.parseBlock();this.inFunction=oldInFunction;this.labels=oldLabels;return this.finishNode(_node,"DoExpression")}case _tokentype.types.name:var start=this.markPosition();node=this.startNode();var id=this.parseIdent(this.type!==_tokentype.types.name);if(this.options.features["es7.asyncFunctions"]){if(id.name==="async"&&!this.canInsertSemicolon()){if(this.type===_tokentype.types.parenL){var expr=this.parseParenAndDistinguishExpression(start,true,true);if(expr&&expr.type==="ArrowFunctionExpression"){return expr}else{node.callee=id;if(!expr){node.arguments=[]}else if(expr.type==="SequenceExpression"){node.arguments=expr.expressions}else{node.arguments=[expr]}return this.parseSubscripts(this.finishNode(node,"CallExpression"),start)}}else if(this.type===_tokentype.types.name){id=this.parseIdent();this.expect(_tokentype.types.arrow);return this.parseArrowExpression(node,[id],true)}if(this.type===_tokentype.types._function&&!this.canInsertSemicolon()){this.next();return this.parseFunction(node,false,false,true)}}else if(id.name==="await"){if(this.inAsync)return this.parseAwait(node)}}if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokentype.types.arrow))return this.parseArrowExpression(this.startNodeAt(start),[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(null,null,canBeArrow);case _tokentype.types.bracketL:node=this.startNode();this.next();if((this.options.ecmaVersion>=7||this.options.features["es7.comprehensions"])&&this.type===_tokentype.types._for){return this.parseComprehension(node,false)}node.elements=this.parseExprList(_tokentype.types.bracketR,true,true,refShorthandDefaultPos);return this.finishNode(node,"ArrayExpression");case _tokentype.types.braceL:return this.parseObj(false,refShorthandDefaultPos);case _tokentype.types._function:node=this.startNode();this.next();return this.parseFunction(node,false);case _tokentype.types.at:this.parseDecorators();case _tokentype.types._class:node=this.startNode();this.takeDecorators(node);return this.parseClass(node,false);case _tokentype.types._new:return this.parseNew();case _tokentype.types.backQuote:return this.parseTemplate();case _tokentype.types.doubleColon:node=this.startNode();this.next();node.object=null;var callee=node.callee=this.parseNoCallExpr();if(callee.type!=="MemberExpression")this.raise(callee.start,"Binding should be performed on object property.");return this.finishNode(node,"BindExpression");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(start,isAsync,canBeArrow){start=start||this.markPosition();var val=undefined;if(this.options.ecmaVersion>=6){this.next();if((this.options.features["es7.comprehensions"]||this.options.ecmaVersion>=7)&&this.type===_tokentype.types._for){return this.parseComprehension(this.startNodeAt(start),true)}var innerStart=this.markPosition(),exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=undefined,innerParenStart=undefined,optionalCommaStart=undefined;while(this.type!==_tokentype.types.parenR){if(first){first=false}else{this.expect(_tokentype.types.comma);if(this.type===_tokentype.types.parenR&&this.options.features["es7.trailingFunctionCommas"]){ -optionalCommaStart=this.start;break}}if(this.type===_tokentype.types.ellipsis){var spreadNodeStart=this.markPosition();spreadStart=this.start;exprList.push(this.parseParenItem(this.parseRest(),spreadNodeStart));break}else{if(this.type===_tokentype.types.parenL&&!innerParenStart){innerParenStart=this.start}exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem))}}var innerEnd=this.markPosition();this.expect(_tokentype.types.parenR);if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokentype.types.arrow)){if(innerParenStart)this.unexpected(innerParenStart);return this.parseParenArrowList(start,exprList,isAsync)}if(!exprList.length){if(isAsync){return}else{this.unexpected(this.lastTokStart)}}if(optionalCommaStart)this.unexpected(optionalCommaStart);if(spreadStart)this.unexpected(spreadStart);if(refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(exprList.length>1){val=this.startNodeAt(innerStart);val.expressions=exprList;this.finishNodeAt(val,"SequenceExpression",innerEnd)}else{val=exprList[0]}}else{val=this.parseParenExpression()}if(this.options.preserveParens){var par=this.startNodeAt(start);par.expression=val;return this.finishNode(par,"ParenthesizedExpression")}else{val.parenthesizedExpression=true;return val}};pp.parseParenArrowList=function(start,exprList,isAsync){return this.parseArrowExpression(this.startNodeAt(start),exprList,isAsync)};pp.parseParenItem=function(node,start){return node};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.raise(node.property.start,"The only valid meta property for new is new.target");return this.finishNode(node,"MetaProperty")}node.callee=this.parseNoCallExpr();if(this.eat(_tokentype.types.parenL))node.arguments=this.parseExprList(_tokentype.types.parenR,this.options.features["es7.trailingFunctionCommas"]);else node.arguments=empty;return this.finishNode(node,"NewExpression")};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")};pp.parseObj=function(isPattern,refShorthandDefaultPos){var node=this.startNode(),first=true,propHash={};node.properties=[];var decorators=[];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;while(this.type===_tokentype.types.at){decorators.push(this.parseDecorator())}var prop=this.startNode(),isGenerator=false,isAsync=false,start=undefined;if(decorators.length){prop.decorators=decorators;decorators=[]}if(this.options.features["es7.objectRestSpread"]&&this.type===_tokentype.types.ellipsis){prop=this.parseSpread();prop.type="SpreadProperty";node.properties.push(prop);continue}if(this.options.ecmaVersion>=6){prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos)start=this.markPosition();if(!isPattern)isGenerator=this.eat(_tokentype.types.star)}if(this.options.features["es7.asyncFunctions"]&&this.isContextual("async")){if(isGenerator||isPattern)this.unexpected();var asyncId=this.parseIdent();if(this.type===_tokentype.types.colon||this.type===_tokentype.types.parenL){prop.key=asyncId}else{isAsync=true;this.parsePropertyName(prop)}}else{this.parsePropertyName(prop)}this.parseObjPropValue(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos);this.checkPropClash(prop,propHash);node.properties.push(this.finishNode(prop,"Property"))}if(decorators.length){this.raise(this.start,"You have trailing decorators with no property")}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")};pp.parseObjPropValue=function(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos){if(this.eat(_tokentype.types.colon)){prop.value=isPattern?this.parseMaybeDefault():this.parseMaybeAssign(false,refShorthandDefaultPos);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,isAsync)}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||isAsync||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.raise(_start,"getter should have no params");else this.raise(_start,"setter should have exactly one param")}}else if(this.options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"){prop.kind="init";if(isPattern){if(this.isKeyword(prop.key.name)||this.strict&&(_identifier.reservedWords.strictBind(prop.key.name)||_identifier.reservedWords.strict(prop.key.name))||!this.options.allowReserved&&this.isReservedWord(prop.key.name))this.raise(prop.key.start,"Binding "+prop.key.name);prop.value=this.parseMaybeDefault(start,prop.key)}else if(this.type===_tokentype.types.eq&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start)refShorthandDefaultPos.start=this.start;prop.value=this.parseMaybeDefault(start,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)};pp.initFunction=function(node,isAsync){node.id=null;if(this.options.ecmaVersion>=6){node.generator=false;node.expression=false}if(this.options.features["es7.asyncFunctions"]){node.async=!!isAsync}};pp.parseMethod=function(isGenerator,isAsync){var node=this.startNode();this.initFunction(node,isAsync);this.expect(_tokentype.types.parenL);node.params=this.parseBindingList(_tokentype.types.parenR,false,this.options.features["es7.trailingFunctionCommas"]);if(this.options.ecmaVersion>=6){node.generator=isGenerator}this.parseFunctionBody(node);return this.finishNode(node,"FunctionExpression")};pp.parseArrowExpression=function(node,params,isAsync){this.initFunction(node,isAsync);node.params=this.toAssignableList(params,true);this.parseFunctionBody(node,true);return this.finishNode(node,"ArrowFunctionExpression")};pp.parseFunctionBody=function(node,allowExpression){var isExpression=allowExpression&&this.type!==_tokentype.types.braceL;var oldInAsync=this.inAsync;this.inAsync=node.async;if(isExpression){node.body=this.parseMaybeAssign();node.expression=true}else{var oldInFunc=this.inFunction,oldInGen=this.inGenerator,oldLabels=this.labels;this.inFunction=true;this.inGenerator=node.generator;this.labels=[];node.body=this.parseBlock(true);node.expression=false;this.inFunction=oldInFunc;this.inGenerator=oldInGen;this.labels=oldLabels}this.inAsync=oldInAsync;if(this.strict||!isExpression&&node.body.body.length&&this.isUseStrict(node.body.body[0])){var nameHash={},oldStrict=this.strict;this.strict=true;if(node.id)this.checkLVal(node.id,true);for(var i=0;i=6||this.input.slice(this.start,this.end).indexOf("\\")==-1)))this.raise(this.start,"The keyword '"+this.value+"' is reserved");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")};pp.parseAwait=function(node){if(this.eat(_tokentype.types.semi)||this.canInsertSemicolon()){this.unexpected()}node.all=this.eat(_tokentype.types.star);node.argument=this.parseMaybeUnary();return this.finishNode(node,"AwaitExpression")};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")};pp.parseComprehension=function(node,isGenerator){node.blocks=[];while(this.type===_tokentype.types._for){var block=this.startNode();this.next();this.expect(_tokentype.types.parenL);block.left=this.parseBindingAtom();this.checkLVal(block.left,true);this.expectContextual("of");block.right=this.parseExpression();this.expect(_tokentype.types.parenR);node.blocks.push(this.finishNode(block,"ComprehensionBlock"))}node.filter=this.eat(_tokentype.types._if)?this.parseParenExpression():null;node.body=this.parseExpression();this.expect(isGenerator?_tokentype.types.parenR:_tokentype.types.bracketR);node.generator=isGenerator;return this.finishNode(node,"ComprehensionExpression")}},{"./../../babel/tools/protect.js":52,"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;exports.isIdentifierStart=isIdentifierStart;exports.isIdentifierChar=isIdentifierChar;_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function makePredicate(words){words=words.split(" ");return function(str){return words.indexOf(str)>=0}}var reservedWords={3:makePredicate("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:makePredicate("class enum extends super const export import"),6:makePredicate("enum await"),strict:makePredicate("implements interface let package private protected public static yield"),strictBind:makePredicate("eval arguments")};exports.reservedWords=reservedWords;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:makePredicate(ecma5AndLessKeywords),6:makePredicate(ecma5AndLessKeywords+" let const class extends export import yield super")};exports.keywords=keywords;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;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,98,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,955,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,38,17,2,24,133,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,32,4,287,47,21,1,2,0,185,46,82,47,21,0,60,42,502,63,32,0,449,56,1288,920,104,110,2962,1070,13266,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,16355,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,16,9,83,11,168,11,6,9,8,2,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,316,19,13,9,214,6,3,8,112,16,16,9,82,12,9,9,535,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,4305,6,792618,239];function isInAstralSet(code,set){var pos=65536;for(var i=0;icode)return false;pos+=set[i+1];if(pos>=code)return true}}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<=65535)return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)}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<=65535)return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}},{"./../../babel/tools/protect.js":52}],5:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;exports.parse=parse;exports.parseExpressionAt=parseExpressionAt;exports.tokenizer=tokenizer;var _state=require("./state");var _options=require("./options");require("./parseutil");require("./statement");require("./lval");require("./expression");require("./lookahead");_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.Parser=_state.Parser;exports.plugins=_state.plugins;exports.defaultOptions=_options.defaultOptions;var _location=require("./location");exports.SourceLocation=_location.SourceLocation;exports.getLineInfo=_location.getLineInfo;var _node=require("./node");exports.Node=_node.Node;var _tokentype=require("./tokentype");exports.TokenType=_tokentype.TokenType;exports.tokTypes=_tokentype.types;var _tokencontext=require("./tokencontext");exports.TokContext=_tokencontext.TokContext;exports.tokContexts=_tokencontext.types;var _identifier=require("./identifier");exports.isIdentifierChar=_identifier.isIdentifierChar;exports.isIdentifierStart=_identifier.isIdentifierStart;var _tokenize=require("./tokenize");exports.Token=_tokenize.Token;var _whitespace=require("./whitespace");exports.isNewLine=_whitespace.isNewLine;exports.lineBreak=_whitespace.lineBreak;exports.lineBreakG=_whitespace.lineBreakG;var version="1.0.0";exports.version=version;function parse(input,options){var p=parser(options,input);var startPos=p.options.locations?[p.pos,p.curPosition()]:p.pos;p.nextToken();return p.parseTopLevel(p.options.program||p.startNodeAt(startPos))}function parseExpressionAt(input,pos,options){var p=parser(options,input,pos);p.nextToken();return p.parseExpression()}function tokenizer(input,options){return parser(options,input)}function parser(options,input){return new _state.Parser(_options.getOptions(options),String(input))}},{"./../../babel/tools/protect.js":52,"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);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 _state=require("./state");var _whitespace=require("./whitespace");_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}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};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=6&&node){switch(node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var i=0;i=6){node.sourceType=this.options.sourceType}return this.finishNode(node,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp.parseStatement=function(declaration,topLevel){if(this.type===_tokentype.types.at){this.parseDecorators(true)}var starttype=this.type,node=this.startNode();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();this.takeDecorators(node);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._let:case _tokentype.types._const:if(!declaration)this.unexpected();case _tokentype.types._var:return this.parseVarStatement(node,starttype);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);case _tokentype.types.name:if(this.options.features["es7.asyncFunctions"]&&this.value==="async"){var lookahead=this.lookahead();if(lookahead.type===_tokentype.types._function&&!this.canInsertSemicolon.call(lookahead)){this.next();this.expect(_tokentype.types._function);return this.parseFunction(node,true,false,true)}}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.takeDecorators=function(node){if(this.decorators.length){node.decorators=this.decorators;this.decorators=[]}};pp.parseDecorators=function(allowExport){while(this.type===_tokentype.types.at){this.decorators.push(this.parseDecorator())}if(allowExport&&this.type===_tokentype.types._export){return}if(this.type!==_tokentype.types._class){this.raise(this.start,"Leading decorators must be attached to a class declaration")}};pp.parseDecorator=function(allowExport){if(!this.options.features["es7.decorators"]){this.unexpected()}var node=this.startNode();this.next();node.expression=this.parseMaybeAssign();return this.finishNode(node,"Decorator")};pp.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword=="break";this.next();if(this.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()}for(var i=0;i=6)this.eat(_tokentype.types.semi);else this.semicolon();return this.finishNode(node,"DoWhileStatement")};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);if(this.type===_tokentype.types._var||this.type===_tokentype.types._let||this.type===_tokentype.types._const){var _init=this.startNode(),varKind=this.type;this.next();this.parseVar(_init,true,varKind);this.finishNode(_init,"VariableDeclaration");if((this.type===_tokentype.types._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&_init.declarations.length===1&&!(varKind!==_tokentype.types._var&&_init.declarations[0].init))return this.parseForIn(node,_init);return this.parseFor(node,_init)}var refShorthandDefaultPos={start:0};var init=this.parseExpression(true,refShorthandDefaultPos);if(this.type===_tokentype.types._in||this.options.ecmaVersion>=6&&this.isContextual("of")){this.toAssignable(init);this.checkLVal(init);return this.parseForIn(node,init)}else if(refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}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();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);for(var cur,sawDefault;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.raise(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();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")};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.guard=null;clause.body=this.parseBlock();node.handler=this.finishNode(clause,"CatchClause")}node.guardedHandlers=empty;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=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")};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")};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")};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)};pp.parseVar=function(node,isFor,kind){node.declarations=[];node.kind=kind.keyword;for(;;){var decl=this.startNode();this.parseVarHead(decl);if(this.eat(_tokentype.types.eq)){decl.init=this.parseMaybeAssign(isFor)}else if(kind===_tokentype.types._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.parseVarHead=function(decl){decl.id=this.parseBindingAtom();this.checkLVal(decl.id,true)};pp.parseFunction=function(node,isStatement,allowExpressionBody,isAsync){this.initFunction(node,isAsync);if(this.options.ecmaVersion>=6)node.generator=this.eat(_tokentype.types.star);if(isStatement||this.type===_tokentype.types.name)node.id=this.parseIdent();this.parseFunctionParams(node);this.parseFunctionBody(node,allowExpressionBody);return this.finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")};pp.parseFunctionParams=function(node){this.expect(_tokentype.types.parenL);node.params=this.parseBindingList(_tokentype.types.parenR,false,this.options.features["es7.trailingFunctionCommas"])};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);var decorators=[];while(!this.eat(_tokentype.types.braceR)){if(this.eat(_tokentype.types.semi))continue;if(this.type===_tokentype.types.at){decorators.push(this.parseDecorator());continue}var method=this.startNode();if(decorators.length){method.decorators=decorators;decorators=[]}var isMaybeStatic=this.type===_tokentype.types.name&&this.value==="static";var isGenerator=this.eat(_tokentype.types.star),isAsync=false;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)}if(!isGenerator&&method.key.type==="Identifier"&&!method.computed&&this.isClassProperty()){classBody.body.push(this.parseClassProperty(method));continue}if(this.options.features["es7.asyncFunctions"]&&this.type!==_tokentype.types.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async"){isAsync=true;this.parsePropertyName(method)}var isGetSet=false;method.kind="method";if(!method.computed){var key=method.key;if(!isAsync&&!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");if(isAsync)this.raise(key.start,"Constructor can't be an async function");method.kind="constructor";hadConstructor=true}}if(method.kind==="constructor"&&method.decorators){this.raise(method.start,"You can't attach decorators to a class constructor")}this.parseClassMethod(classBody,method,isGenerator,isAsync);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.raise(start,"getter should have no params");else this.raise(start,"setter should have exactly one param")}}}if(decorators.length){this.raise(this.start,"You have trailing decorators with no method")}node.body=this.finishNode(classBody,"ClassBody");return this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")};pp.isClassProperty=function(){return this.type===_tokentype.types.eq||(this.type===_tokentype.types.semi||this.canInsertSemicolon())};pp.parseClassProperty=function(node){if(this.type===_tokentype.types.eq){if(!this.options.features["es7.classProperties"])this.unexpected();this.next();node.value=this.parseMaybeAssign()}else{node.value=null}this.semicolon();return this.finishNode(node,"ClassProperty")};pp.parseClassMethod=function(classBody,method,isGenerator,isAsync){method.value=this.parseMethod(isGenerator,isAsync);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};pp.parseExport=function(node){this.next();if(this.type===_tokentype.types.star){var specifier=this.startNode();this.next();if(this.options.features["es7.exportExtensions"]&&this.eatContextual("as")){specifier.exported=this.parseIdent();node.specifiers=[this.finishNode(specifier,"ExportNamespaceSpecifier")];this.parseExportSpecifiersMaybe(node);this.parseExportFrom(node)}else{this.parseExportFrom(node);return this.finishNode(node,"ExportAllDeclaration")}}else if(this.options.features["es7.exportExtensions"]&&this.isExportDefaultSpecifier()){var specifier=this.startNode();specifier.exported=this.parseIdent(true);node.specifiers=[this.finishNode(specifier,"ExportDefaultSpecifier")];if(this.type===_tokentype.types.comma&&this.lookahead().type===_tokentype.types.star){this.expect(_tokentype.types.comma);var _specifier=this.startNode();this.expect(_tokentype.types.star);this.expectContextual("as");_specifier.exported=this.parseIdent();node.specifiers.push(this.finishNode(_specifier,"ExportNamespaceSpecifier"))}else{this.parseExportSpecifiersMaybe(node)}this.parseExportFrom(node)}else if(this.eat(_tokentype.types._default)){var expr=this.parseMaybeAssign();var needsSemi=true;if(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();this.checkExport(node);return this.finishNode(node,"ExportDefaultDeclaration")}else if(this.type.keyword||this.shouldParseExportDeclaration()){node.declaration=this.parseStatement(true);node.specifiers=[];node.source=null}else{node.declaration=null;node.specifiers=this.parseExportSpecifiers();if(this.eatContextual("from")){node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected()}else{node.source=null}this.semicolon()}this.checkExport(node);return this.finishNode(node,"ExportNamedDeclaration")};pp.isExportDefaultSpecifier=function(){if(this.type===_tokentype.types.name){return this.value!=="type"&&this.value!=="async"}if(this.type!==_tokentype.types._default){return false}var lookahead=this.lookahead();return lookahead.type===_tokentype.types.comma||lookahead.type===_tokentype.types.name&&lookahead.value==="from"};pp.parseExportSpecifiersMaybe=function(node){if(this.eat(_tokentype.types.comma)){node.specifiers=node.specifiers.concat(this.parseExportSpecifiers())}};pp.parseExportFrom=function(node){this.expectContextual("from");node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected();this.semicolon();this.checkExport(node)};pp.shouldParseExportDeclaration=function(){return this.options.features["es7.asyncFunctions"]&&this.isContextual("async")};pp.checkExport=function(node){if(this.decorators.length){var isClass=node.declaration&&(node.declaration.type==="ClassDeclaration"||node.declaration.type==="ClassExpression");if(!node.declaration||!isClass){this.raise(node.start,"You can only use decorators on an export when exporting a class")}this.takeDecorators(node.declaration)}};pp.parseExportSpecifiers=function(){var nodes=[],first=true;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};pp.parseImport=function(node){this.next();if(this.type===_tokentype.types.string){node.specifiers=empty;node.source=this.parseExprAtom()}else{node.specifiers=[];this.parseImportSpecifiers(node);this.expectContextual("from");node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(node,"ImportDeclaration")};pp.parseImportSpecifiers=function(node){var first=true;if(this.type===_tokentype.types.name){var start=this.markPosition();node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(),start));if(!this.eat(_tokentype.types.comma))return}if(this.type===_tokentype.types.star){var specifier=this.startNode();this.next();this.expectContextual("as");specifier.local=this.parseIdent();this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportNamespaceSpecifier"));return}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 specifier=this.startNode();specifier.imported=this.parseIdent(true);specifier.local=this.eatContextual("as")?this.parseIdent():specifier.imported;this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportSpecifier"))}};pp.parseImportSpecifierDefault=function(id,start){var node=this.startNodeAt(start);node.local=id;this.checkLVal(node.local,true);return this.finishNode(node,"ImportDefaultSpecifier")}},{"./../../babel/tools/protect.js":52,"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _state=require("./state");var _tokentype=require("./tokentype");var _whitespace=require("./whitespace");_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}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){var parent=undefined;if(prevType===_tokentype.types.colon&&(parent=this.curContext()).token=="{")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)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};_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(){};_tokentype.types._function.updateContext=function(){if(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}},{"./../../babel/tools/protect.js":52,"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _identifier=require("./identifier");var _tokentype=require("./tokentype");var _state=require("./state");var _location=require("./location");var _whitespace=require("./whitespace");_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}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 _location.SourceLocation(p,p.startLoc,p.endLoc);if(p.options.ranges)this.range=[p.start,p.end]};exports.Token=Token;var pp=_state.Parser.prototype;var isRhino=typeof Packages=="object"&&Object.prototype.toString.call(Packages)=="[object JavaPackage]";pp.next=function(){if(this.options.onToken&&!this.isLookahead)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(typeof Symbol!=="undefined")pp[Symbol.iterator]=function(){var self=this;return{next:function next(){var token=self.getToken();return{done:token.type===_tokentype.types.eof,value:token}}}};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.input.length)return this.finishToken(_tokentype.types.eof);if(curContext.override)return curContext.override(this);else this.readToken(this.fullCharCodeAtPos())};pp.readToken=function(code){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<=55295||code>=57344)return code;var next=this.input.charCodeAt(this.pos+1);return(code<<10)+next-56613888};pp.skipBlockComment=function(){var startLoc=this.options.onComment&&this.options.locations&&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.index8&&ch<14){++this.pos}else if(ch===47){var next=this.input.charCodeAt(this.pos+1);if(next===42){this.skipBlockComment()}else if(next===47){this.skipLineComment(2)}else break}else if(ch===160){++this.pos}else if(ch>=5760&&_whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))){++this.pos}else{break}}};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)};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){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=function(code){var type=code===42?_tokentype.types.star:_tokentype.types.modulo;var width=1;var next=this.input.charCodeAt(this.pos+1);if(next===42){width++;next=this.input.charCodeAt(this.pos+2);type=_tokentype.types.exponent}if(next===61){width++;type=_tokentype.types.assign}return this.finishOp(type,width)};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))){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();this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(next===61)size=this.input.charCodeAt(this.pos+2)===61?3: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){case 46:return this.readToken_dot();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:if(this.options.features["es7.functionBind"]&&this.input.charCodeAt(this.pos+1)===58)return this.finishOp(_tokentype.types.doubleColon,2);++this.pos;return this.finishToken(_tokentype.types.colon);case 63:++this.pos;return this.finishToken(_tokentype.types.question);case 64:++this.pos;return this.finishToken(_tokentype.types.at);case 96:if(this.options.ecmaVersion<6)break;++this.pos;return this.finishToken(_tokentype.types.backQuote);case 48:var next=this.input.charCodeAt(this.pos+1);if(next===120||next===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(next===111||next===79)return this.readRadixNumber(8);if(next===98||next===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(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)};var regexpUnicodeSupport=false;try{new RegExp("￿","u");regexpUnicodeSupport=true}catch(e){}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;var mods=this.readWord1();var tmp=content;if(mods){var validFlags=/^[gmsiy]*$/;if(this.options.ecmaVersion>=6)validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))this.raise(start,"Invalid regular expression flag");if(mods.indexOf("u")>=0&&!regexpUnicodeSupport){tmp=tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(match,code,offset){code=Number("0x"+code);if(code>1114111)_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")}}var value=null;if(!isRhino){try{new RegExp(tmp)}catch(e){if(e instanceof SyntaxError)this.raise(start,"Error parsing regular expression: "+e.message);this.raise(e)}try{value=new RegExp(content,mods)}catch(err){}}return this.finishToken(_tokentype.types.regexp,{pattern:content,flags:mods,value:value})};pp.readInt=function(radix,len){var start=this.pos,total=0;for(var i=0,e=len==null?Infinity:len;i=97)val=code-97+10;else if(code>=65)val=code-65+10;else if(code>=48&&code<=57)val=code-48;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;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)};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");if(this.input.charCodeAt(this.pos)===46){++this.pos;this.readInt(10);isFloat=true}var next=this.input.charCodeAt(this.pos);if(next===69||next===101){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)};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>1114111)this.raise(codePos,"Code point out of bounds")}else{code=this.readHexChar(4)}return code};function codePointToString(code){if(code<=65535)return String.fromCharCode(code);return String.fromCharCode((code-65536>>10)+55296,(code-65536&1023)+56320)}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)};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}}};pp.readEscapedChar=function(inTemplate){var ch=this.input.charCodeAt(++this.pos);++this.pos;switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return" ";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10: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(octal>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)}};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};var containsEsc;pp.readWord1=function(){containsEsc=false;var word="",first=true,chunkStart=this.pos;var astral=this.options.ecmaVersion>=6;while(this.pos=6||!containsEsc)&&this.isKeyword(word))type=_tokentype.keywords[word];return this.finishToken(type,word)}},{"./../../babel/tools/protect.js":52,"./identifier":4,"./location":6,"./state":12,"./tokentype":16,"./whitespace":18}],16:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var TokenType=function TokenType(label){var conf=arguments[1]===undefined?{}:arguments[1];_classCallCheck(this,TokenType);this.label=label;this.keyword=conf.keyword;this.beforeExpr=!!conf.beforeExpr;this.startsExpr=!!conf.startsExpr;this.rightAssociative=!!conf.rightAssociative;this.isLoop=!!conf.isLoop;this.isAssign=!!conf.isAssign;this.prefix=!!conf.prefix;this.postfix=!!conf.postfix;this.binop=conf.binop||null;this.updateContext=null};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"),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),doubleColon: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}),at:new TokenType("@"),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),exponent:new TokenType("**",{beforeExpr:true,binop:11,rightAssociative:true})};exports.types=types;var keywords={};exports.keywords=keywords;function kw(name){var options=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});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("let");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("yield",{beforeExpr:true,startsExpr:true});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})},{"./../../babel/tools/protect.js":52}],17:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;exports.isArray=isArray;exports.has=has;_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function has(obj,propName){return Object.prototype.hasOwnProperty.call(obj,propName)}},{"./../../babel/tools/protect.js":52}],18:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;exports.isNewLine=isNewLine;_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var lineBreak=/\r\n?|\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===8232||code==8233}var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;exports.nonASCIIwhitespace=nonASCIIwhitespace},{"./../../babel/tools/protect.js":52}],19:[function(require,module,exports){(function(global){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}require("./node");var transform=module.exports=require("../transformation");transform.options=require("../transformation/file/options");transform.version=require("../../../package").version;transform.transform=transform;transform.run=function(code){var opts=arguments[1]===undefined?{}:arguments[1];opts.sourceMaps="inline";return new Function(transform(code,opts).code)()};transform.load=function(url,callback,opts,hold){if(opts===undefined)opts={};opts.filename=opts.filename||url;var xhr=global.ActiveXObject?new global.ActiveXObject("Microsoft.XMLHTTP"):new global.XMLHttpRequest;xhr.open("GET",url,true);if("overrideMimeType"in xhr)xhr.overrideMimeType("text/plain");xhr.onreadystatechange=function(){if(xhr.readyState!==4)return;var status=xhr.status;if(status===0||status===200){var param=[xhr.responseText,opts];if(!hold)transform.run.apply(transform,param);if(callback)callback(param)}else{throw new Error("Could not load "+url)}};xhr.send(null)};var runScripts=function runScripts(){var scripts=[];var types=["text/ecmascript-6","text/6to5","text/babel","module"];var index=0;var exec=function exec(){var param=scripts[index];if(param instanceof Array){transform.run.apply(transform,param);index++;exec()}};var run=function run(script,i){var opts={};if(script.src){transform.load(script.src,function(param){scripts[i]=param;exec()},opts,true)}else{opts.filename="embedded";scripts[i]=[script.innerHTML,opts]}};var _scripts=global.document.getElementsByTagName("script");for(var i=0;i<_scripts.length;++i){var _script=_scripts[i];if(types.indexOf(_script.type)>=0)scripts.push(_script)}for(i in scripts){run(scripts[i],i)}exec()};if(global.addEventListener){global.addEventListener("DOMContentLoaded",runScripts,false)}else if(global.attachEvent){global.attachEvent("onload",runScripts)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../../../package":544,"../transformation":73,"../transformation/file/options":56,"./../tools/protect.js":52,"./node":20}],20:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.register=register;exports.polyfill=polyfill;exports.transformFile=transformFile;exports.transformFileSync=transformFileSync;exports.parse=parse;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashLangIsFunction=require("lodash/lang/isFunction");var _lodashLangIsFunction2=_interopRequireDefault(_lodashLangIsFunction);var _transformation=require("../transformation");var _transformation2=_interopRequireDefault(_transformation);var _acorn=require("../../acorn");var acorn=_interopRequireWildcard(_acorn);var _util=require("../util");var util=_interopRequireWildcard(_util);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.util=util;exports.acorn=acorn;exports.transform=_transformation2["default"];exports.pipeline=_transformation.pipeline;exports.canCompile=_util.canCompile;var _transformationFileOptionsConfig=require("../transformation/file/options/config");exports.options=_interopRequire(_transformationFileOptionsConfig);var _transformationPlugin=require("../transformation/plugin");exports.Plugin=_interopRequire(_transformationPlugin);var _transformationTransformer=require("../transformation/transformer");exports.Transformer=_interopRequire(_transformationTransformer);var _transformationPipeline=require("../transformation/pipeline");exports.Pipeline=_interopRequire(_transformationPipeline);var _traversal=require("../traversal");exports.traverse=_interopRequire(_traversal);var _toolsBuildExternalHelpers=require("../tools/build-external-helpers");exports.buildExternalHelpers=_interopRequire(_toolsBuildExternalHelpers);var _package=require("../../../package");exports.version=_package.version;exports.types=t;function register(opts){var callback=require("./register/node-polyfill");if(opts!=null)callback(opts);return callback}function polyfill(){require("../polyfill")}function transformFile(filename,opts,callback){if(_lodashLangIsFunction2["default"](opts)){callback=opts;opts={}}opts.filename=filename;_fs2["default"].readFile(filename,function(err,code){if(err)return callback(err);var result;try{result=_transformation2["default"](code,opts)}catch(err){return callback(err)}callback(null,result)})}function transformFileSync(filename){var opts=arguments[1]===undefined?{}:arguments[1];opts.filename=filename;return _transformation2["default"](_fs2["default"].readFileSync(filename,"utf8"),opts)}function parse(code){var opts=arguments[1]===undefined?{}:arguments[1];opts.allowHashBang=true;opts.sourceType="module";opts.ecmaVersion=Infinity;opts.plugins={jsx:true,flow:true};opts.features={};for(var key in _transformation2["default"].pipeline.transformers){opts.features[key]=true}return acorn.parse(code,opts)}},{"../../../package":544,"../../acorn":1,"../polyfill":50,"../tools/build-external-helpers":51,"../transformation":73,"../transformation/file/options/config":55,"../transformation/pipeline":86,"../transformation/plugin":88,"../transformation/transformer":89,"../traversal":149,"../types":174,"../util":178,"./../tools/protect.js":52,"./register/node-polyfill":22,fs:212,"lodash/lang/isFunction":455}],21:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;require("../../polyfill");_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]=function(){};module.exports=exports["default"]},{"../../polyfill":50,"./../../tools/protect.js":52}],22:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}require("../../polyfill");_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _node=require("./node");exports["default"]=_interopRequire(_node);module.exports=exports["default"]},{"../../polyfill":50,"./../../tools/protect.js":52,"./node":21}],23:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _trimRight=require("trim-right");var _trimRight2=_interopRequireDefault(_trimRight);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var Buffer=function(){function Buffer(position,format){_classCallCheck(this,Buffer);this.position=position;this._indent=format.indent.base;this.format=format;this.buf=""}Buffer.prototype.get=function get(){return _trimRight2["default"](this.buf)};Buffer.prototype.getIndent=function getIndent(){if(this.format.compact||this.format.concise){return""}else{return _repeating2["default"](this.format.indent.style,this._indent)}};Buffer.prototype.indentSize=function indentSize(){return this.getIndent().length};Buffer.prototype.indent=function indent(){this._indent++};Buffer.prototype.dedent=function dedent(){this._indent--};Buffer.prototype.semicolon=function semicolon(){this.push(";")};Buffer.prototype.ensureSemicolon=function ensureSemicolon(){if(!this.isLast(";"))this.semicolon()};Buffer.prototype.rightBrace=function rightBrace(){this.newline(true);this.push("}")};Buffer.prototype.keyword=function keyword(name){this.push(name);this.space()};Buffer.prototype.space=function space(force){if(!force&&this.format.compact)return;if(force||this.buf&&!this.isLast(" ")&&!this.isLast("\n")){this.push(" ")}};Buffer.prototype.removeLast=function removeLast(cha){if(this.format.compact)return;if(!this.isLast(cha))return;this.buf=this.buf.substr(0,this.buf.length-1);this.position.unshift(cha)};Buffer.prototype.newline=function newline(i,removeLast){if(this.format.compact||this.format.retainLines)return;if(this.format.concise){this.space();return}removeLast=removeLast||false;if(_lodashLangIsNumber2["default"](i)){i=Math.min(2,i);if(this.endsWith("{\n")||this.endsWith(":\n"))i--;if(i<=0)return;while(i>0){this._newline(removeLast);i--}return}if(_lodashLangIsBoolean2["default"](i)){removeLast=i}this._newline(removeLast)};Buffer.prototype._newline=function _newline(removeLast){if(this.endsWith("\n\n"))return;if(removeLast&&this.isLast("\n"))this.removeLast("\n");this.removeLast(" ");this._removeSpacesAfterLastNewline();this._push("\n")};Buffer.prototype._removeSpacesAfterLastNewline=function _removeSpacesAfterLastNewline(){var lastNewlineIndex=this.buf.lastIndexOf("\n");if(lastNewlineIndex===-1){return}var index=this.buf.length-1;while(index>lastNewlineIndex){if(this.buf[index]!==" "){break}index--}if(index===lastNewlineIndex){this.buf=this.buf.substring(0,index+1)}};Buffer.prototype.push=function push(str,noIndent){if(!this.format.compact&&this._indent&&!noIndent&&str!=="\n"){var indent=this.getIndent();str=str.replace(/\n/g,"\n"+indent);if(this.isLast("\n"))this._push(indent)}this._push(str)};Buffer.prototype._push=function _push(str){this.position.push(str);this.buf+=str};Buffer.prototype.endsWith=function endsWith(str){var buf=arguments[1]===undefined?this.buf:arguments[1];if(str.length===1){return buf[buf.length-1]===str}else{return buf.slice(-str.length)===str}};Buffer.prototype.isLast=function isLast(cha){if(this.format.compact)return false;var buf=this.buf;var last=buf[buf.length-1];if(Array.isArray(cha)){return _lodashCollectionIncludes2["default"](cha,last)}else{return cha===last}};return Buffer}();exports["default"]=Buffer;module.exports=exports["default"]},{"./../tools/protect.js":52,"lodash/collection/includes":369,"lodash/lang/isBoolean":453,"lodash/lang/isNumber":457,repeating:525,"trim-right":543}],24:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.File=File;exports.Program=Program;exports.BlockStatement=BlockStatement;exports.Noop=Noop;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function File(node,print){print.plain(node.program)}function Program(node,print){print.sequence(node.body)}function BlockStatement(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();print.sequence(node.body,{indent:true});if(!this.format.retainLines)this.removeLast("\n");this.rightBrace()}}function Noop(){}},{"./../../tools/protect.js":52}],25:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.ClassDeclaration=ClassDeclaration;exports.ClassBody=ClassBody;exports.ClassProperty=ClassProperty;exports.MethodDefinition=MethodDefinition;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function ClassDeclaration(node,print){print.list(node.decorators,{separator:""});this.push("class");if(node.id){this.push(" ");print.plain(node.id)}print.plain(node.typeParameters);if(node.superClass){this.push(" extends ");print.plain(node.superClass);print.plain(node.superTypeParameters)}if(node["implements"]){this.push(" implements ");print.join(node["implements"],{separator:", "})}this.space();print.plain(node.body)}exports.ClassExpression=ClassDeclaration;function ClassBody(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();this.indent();print.sequence(node.body);this.dedent();this.rightBrace()}}function ClassProperty(node,print){print.list(node.decorators,{separator:""});if(node["static"])this.push("static ");print.plain(node.key);print.plain(node.typeAnnotation);if(node.value){this.space();this.push("=");this.space();print.plain(node.value)}this.semicolon()}function MethodDefinition(node,print){print.list(node.decorators,{separator:""});if(node["static"]){this.push("static ")}this._method(node,print)}},{"./../../tools/protect.js":52}],26:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.ComprehensionBlock=ComprehensionBlock;exports.ComprehensionExpression=ComprehensionExpression;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function ComprehensionBlock(node,print){this.keyword("for");this.push("(");print.plain(node.left);this.push(" of ");print.plain(node.right);this.push(")")}function ComprehensionExpression(node,print){this.push(node.generator?"(":"[");print.join(node.blocks,{separator:" "});this.space();if(node.filter){this.keyword("if");this.push("(");print.plain(node.filter);this.push(")");this.space()}print.plain(node.body);this.push(node.generator?")":"]")}},{"./../../tools/protect.js":52}],27:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.UnaryExpression=UnaryExpression;exports.DoExpression=DoExpression;exports.ParenthesizedExpression=ParenthesizedExpression;exports.UpdateExpression=UpdateExpression;exports.ConditionalExpression=ConditionalExpression;exports.NewExpression=NewExpression;exports.SequenceExpression=SequenceExpression;exports.ThisExpression=ThisExpression;exports.Super=Super;exports.Decorator=Decorator;exports.CallExpression=CallExpression;exports.EmptyStatement=EmptyStatement;exports.ExpressionStatement=ExpressionStatement;exports.AssignmentPattern=AssignmentPattern;exports.AssignmentExpression=AssignmentExpression;exports.BindExpression=BindExpression;exports.MemberExpression=MemberExpression;exports.MetaProperty=MetaProperty;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function UnaryExpression(node,print){var needsSpace=/[a-z]$/.test(node.operator); -var arg=node.argument;if(t.isUpdateExpression(arg)||t.isUnaryExpression(arg)){needsSpace=true}if(t.isUnaryExpression(arg)&&arg.operator==="!"){needsSpace=false}this.push(node.operator);if(needsSpace)this.push(" ");print.plain(node.argument)}function DoExpression(node,print){this.push("do");this.space();print.plain(node.body)}function ParenthesizedExpression(node,print){this.push("(");print.plain(node.expression);this.push(")")}function UpdateExpression(node,print){if(node.prefix){this.push(node.operator);print.plain(node.argument)}else{print.plain(node.argument);this.push(node.operator)}}function ConditionalExpression(node,print){print.plain(node.test);this.space();this.push("?");this.space();print.plain(node.consequent);this.space();this.push(":");this.space();print.plain(node.alternate)}function NewExpression(node,print){this.push("new ");print.plain(node.callee);this.push("(");print.list(node.arguments);this.push(")")}function SequenceExpression(node,print){print.list(node.expressions)}function ThisExpression(){this.push("this")}function Super(){this.push("super")}function Decorator(node,print){this.push("@");print.plain(node.expression);this.newline()}function CallExpression(node,print){print.plain(node.callee);this.push("(");var isPrettyCall=node._prettyCall&&!this.format.retainLines&&!this.format.compact;var separator;if(isPrettyCall){separator=",\n";this.newline();this.indent()}print.list(node.arguments,{separator:separator});if(isPrettyCall){this.newline();this.dedent()}this.push(")")}var buildYieldAwait=function buildYieldAwait(keyword){return function(node,print){this.push(keyword);if(node.delegate||node.all){this.push("*")}if(node.argument){this.push(" ");print.plain(node.argument)}}};var YieldExpression=buildYieldAwait("yield");exports.YieldExpression=YieldExpression;var AwaitExpression=buildYieldAwait("await");exports.AwaitExpression=AwaitExpression;function EmptyStatement(){this.semicolon()}function ExpressionStatement(node,print){print.plain(node.expression);this.semicolon()}function AssignmentPattern(node,print){print.plain(node.left);this.push(" = ");print.plain(node.right)}function AssignmentExpression(node,print){print.plain(node.left);var spaces=node.operator==="in"||node.operator==="instanceof";spaces=true;this.space(spaces);this.push(node.operator);if(!spaces){spaces=node.operator==="<"&&t.isUnaryExpression(node.right,{prefix:true,operator:"!"})&&t.isUnaryExpression(node.right.argument,{prefix:true,operator:"--"})}this.space(spaces);print.plain(node.right)}function BindExpression(node,print){print.plain(node.object);this.push("::");print.plain(node.callee)}exports.BinaryExpression=AssignmentExpression;exports.LogicalExpression=AssignmentExpression;function MemberExpression(node,print){var obj=node.object;print.plain(obj);if(!node.computed&&t.isMemberExpression(node.property)){throw new TypeError("Got a MemberExpression for MemberExpression property")}var computed=node.computed;if(t.isLiteral(node.property)&&_lodashLangIsNumber2["default"](node.property.value)){computed=true}if(computed){this.push("[");print.plain(node.property);this.push("]")}else{this.push(".");print.plain(node.property)}}function MetaProperty(node,print){print.plain(node.meta);this.push(".");print.plain(node.property)}},{"../../types":174,"./../../tools/protect.js":52,"lodash/lang/isNumber":457}],28:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.AnyTypeAnnotation=AnyTypeAnnotation;exports.ArrayTypeAnnotation=ArrayTypeAnnotation;exports.BooleanTypeAnnotation=BooleanTypeAnnotation;exports.DeclareClass=DeclareClass;exports.DeclareFunction=DeclareFunction;exports.DeclareModule=DeclareModule;exports.DeclareVariable=DeclareVariable;exports.FunctionTypeAnnotation=FunctionTypeAnnotation;exports.FunctionTypeParam=FunctionTypeParam;exports.InterfaceExtends=InterfaceExtends;exports._interfaceish=_interfaceish;exports.InterfaceDeclaration=InterfaceDeclaration;exports.IntersectionTypeAnnotation=IntersectionTypeAnnotation;exports.MixedTypeAnnotation=MixedTypeAnnotation;exports.NullableTypeAnnotation=NullableTypeAnnotation;exports.NumberTypeAnnotation=NumberTypeAnnotation;exports.StringLiteralTypeAnnotation=StringLiteralTypeAnnotation;exports.StringTypeAnnotation=StringTypeAnnotation;exports.TupleTypeAnnotation=TupleTypeAnnotation;exports.TypeofTypeAnnotation=TypeofTypeAnnotation;exports.TypeAlias=TypeAlias;exports.TypeAnnotation=TypeAnnotation;exports.TypeParameterInstantiation=TypeParameterInstantiation;exports.ObjectTypeAnnotation=ObjectTypeAnnotation;exports.ObjectTypeCallProperty=ObjectTypeCallProperty;exports.ObjectTypeIndexer=ObjectTypeIndexer;exports.ObjectTypeProperty=ObjectTypeProperty;exports.QualifiedTypeIdentifier=QualifiedTypeIdentifier;exports.UnionTypeAnnotation=UnionTypeAnnotation;exports.TypeCastExpression=TypeCastExpression;exports.VoidTypeAnnotation=VoidTypeAnnotation;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function AnyTypeAnnotation(){this.push("any")}function ArrayTypeAnnotation(node,print){print.plain(node.elementType);this.push("[");this.push("]")}function BooleanTypeAnnotation(node){this.push("bool")}function DeclareClass(node,print){this.push("declare class ");this._interfaceish(node,print)}function DeclareFunction(node,print){this.push("declare function ");print.plain(node.id);print.plain(node.id.typeAnnotation.typeAnnotation);this.semicolon()}function DeclareModule(node,print){this.push("declare module ");print.plain(node.id);this.space();print.plain(node.body)}function DeclareVariable(node,print){this.push("declare var ");print.plain(node.id);print.plain(node.id.typeAnnotation);this.semicolon()}function FunctionTypeAnnotation(node,print,parent){print.plain(node.typeParameters);this.push("(");print.list(node.params);if(node.rest){if(node.params.length){this.push(",");this.space()}this.push("...");print.plain(node.rest)}this.push(")");if(parent.type==="ObjectTypeProperty"||parent.type==="ObjectTypeCallProperty"||parent.type==="DeclareFunction"){this.push(":")}else{this.space();this.push("=>")}this.space();print.plain(node.returnType)}function FunctionTypeParam(node,print){print.plain(node.name);if(node.optional)this.push("?");this.push(":");this.space();print.plain(node.typeAnnotation)}function InterfaceExtends(node,print){print.plain(node.id);print.plain(node.typeParameters)}exports.ClassImplements=InterfaceExtends;exports.GenericTypeAnnotation=InterfaceExtends;function _interfaceish(node,print){print.plain(node.id);print.plain(node.typeParameters);if(node["extends"].length){this.push(" extends ");print.join(node["extends"],{separator:", "})}this.space();print.plain(node.body)}function InterfaceDeclaration(node,print){this.push("interface ");this._interfaceish(node,print)}function IntersectionTypeAnnotation(node,print){print.join(node.types,{separator:" & "})}function MixedTypeAnnotation(){this.push("mixed")}function NullableTypeAnnotation(node,print){this.push("?");print.plain(node.typeAnnotation)}function NumberTypeAnnotation(){this.push("number")}function StringLiteralTypeAnnotation(node){this._stringLiteral(node.value)}function StringTypeAnnotation(){this.push("string")}function TupleTypeAnnotation(node,print){this.push("[");print.join(node.types,{separator:", "});this.push("]")}function TypeofTypeAnnotation(node,print){this.push("typeof ");print.plain(node.argument)}function TypeAlias(node,print){this.push("type ");print.plain(node.id);print.plain(node.typeParameters);this.space();this.push("=");this.space();print.plain(node.right);this.semicolon()}function TypeAnnotation(node,print){this.push(":");this.space();if(node.optional)this.push("?");print.plain(node.typeAnnotation)}function TypeParameterInstantiation(node,print){this.push("<");print.join(node.params,{separator:", "});this.push(">")}exports.TypeParameterDeclaration=TypeParameterInstantiation;function ObjectTypeAnnotation(node,print){var _this=this;this.push("{");var props=node.properties.concat(node.callProperties,node.indexers);if(props.length){this.space();print.list(props,{separator:false,indent:true,iterator:function iterator(){if(props.length!==1){_this.semicolon();_this.space()}}});this.space()}this.push("}")}function ObjectTypeCallProperty(node,print){if(node["static"])this.push("static ");print.plain(node.value)}function ObjectTypeIndexer(node,print){if(node["static"])this.push("static ");this.push("[");print.plain(node.id);this.push(":");this.space();print.plain(node.key);this.push("]");this.push(":");this.space();print.plain(node.value)}function ObjectTypeProperty(node,print){if(node["static"])this.push("static ");print.plain(node.key);if(node.optional)this.push("?");if(!t.isFunctionTypeAnnotation(node.value)){this.push(":");this.space()}print.plain(node.value)}function QualifiedTypeIdentifier(node,print){print.plain(node.qualification);this.push(".");print.plain(node.id)}function UnionTypeAnnotation(node,print){print.join(node.types,{separator:" | "})}function TypeCastExpression(node,print){this.push("(");print.plain(node.expression);print.plain(node.typeAnnotation);this.push(")")}function VoidTypeAnnotation(node){this.push("void")}},{"../../types":174,"./../../tools/protect.js":52}],29:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.JSXAttribute=JSXAttribute;exports.JSXIdentifier=JSXIdentifier;exports.JSXNamespacedName=JSXNamespacedName;exports.JSXMemberExpression=JSXMemberExpression;exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXExpressionContainer=JSXExpressionContainer;exports.JSXElement=JSXElement;exports.JSXOpeningElement=JSXOpeningElement;exports.JSXClosingElement=JSXClosingElement;exports.JSXEmptyExpression=JSXEmptyExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function JSXAttribute(node,print){print.plain(node.name);if(node.value){this.push("=");print.plain(node.value)}}function JSXIdentifier(node){this.push(node.name)}function JSXNamespacedName(node,print){print.plain(node.namespace);this.push(":");print.plain(node.name)}function JSXMemberExpression(node,print){print.plain(node.object);this.push(".");print.plain(node.property)}function JSXSpreadAttribute(node,print){this.push("{...");print.plain(node.argument);this.push("}")}function JSXExpressionContainer(node,print){this.push("{");print.plain(node.expression);this.push("}")}function JSXElement(node,print){var open=node.openingElement;print.plain(open);if(open.selfClosing)return;this.indent();var _arr=node.children;for(var _i=0;_i<_arr.length;_i++){var child=_arr[_i];if(t.isLiteral(child)){this.push(child.value,true)}else{print.plain(child)}}this.dedent();print.plain(node.closingElement)}function JSXOpeningElement(node,print){this.push("<");print.plain(node.name);if(node.attributes.length>0){this.push(" ");print.join(node.attributes,{separator:" "})}this.push(node.selfClosing?" />":">")}function JSXClosingElement(node,print){this.push("")}function JSXEmptyExpression(){}},{"../../types":174,"./../../tools/protect.js":52}],30:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports._params=_params;exports._method=_method;exports.FunctionExpression=FunctionExpression;exports.ArrowFunctionExpression=ArrowFunctionExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _params(node,print){var _this=this;print.plain(node.typeParameters);this.push("(");print.list(node.params,{iterator:function iterator(node){if(node.optional)_this.push("?");print.plain(node.typeAnnotation)}});this.push(")");if(node.returnType){print.plain(node.returnType)}}function _method(node,print){var value=node.value;var kind=node.kind;var key=node.key;if(kind==="method"||kind==="init"){if(value.generator){this.push("*")}}if(kind==="get"||kind==="set"){this.push(kind+" ")}if(value.async)this.push("async ");if(node.computed){this.push("[");print.plain(key);this.push("]")}else{print.plain(key)}this._params(value,print);this.space();print.plain(value.body)}function FunctionExpression(node,print){if(node.async)this.push("async ");this.push("function");if(node.generator)this.push("*");if(node.id){this.push(" ");print.plain(node.id)}else{this.space()}this._params(node,print);this.space();print.plain(node.body)}exports.FunctionDeclaration=FunctionExpression;function ArrowFunctionExpression(node,print){if(node.async)this.push("async ");if(node.params.length===1&&t.isIdentifier(node.params[0])){print.plain(node.params[0])}else{this._params(node,print)}this.push(" => ");var bodyNeedsParens=t.isObjectExpression(node.body);if(bodyNeedsParens){this.push("(")}print.plain(node.body);if(bodyNeedsParens){this.push(")")}}},{"../../types":174,"./../../tools/protect.js":52}],31:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.ImportSpecifier=ImportSpecifier;exports.ImportDefaultSpecifier=ImportDefaultSpecifier;exports.ExportDefaultSpecifier=ExportDefaultSpecifier;exports.ExportSpecifier=ExportSpecifier;exports.ExportNamespaceSpecifier=ExportNamespaceSpecifier;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ImportDeclaration=ImportDeclaration;exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function ImportSpecifier(node,print){print.plain(node.imported);if(node.local&&node.local.name!==node.imported.name){this.push(" as ");print.plain(node.local)}}function ImportDefaultSpecifier(node,print){print.plain(node.local)}function ExportDefaultSpecifier(node,print){print.plain(node.exported)}function ExportSpecifier(node,print){print.plain(node.local);if(node.exported&&node.local.name!==node.exported.name){this.push(" as ");print.plain(node.exported)}}function ExportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.exported)}function ExportAllDeclaration(node,print){this.push("export *");if(node.exported){this.push(" as ");print.plain(node.exported)}this.push(" from ");print.plain(node.source);this.semicolon()}function ExportNamedDeclaration(node,print){this.push("export ");ExportDeclaration.call(this,node,print)}function ExportDefaultDeclaration(node,print){this.push("export default ");ExportDeclaration.call(this,node,print)}function ExportDeclaration(node,print){var specifiers=node.specifiers;if(node.declaration){var declar=node.declaration;print.plain(declar);if(t.isStatement(declar)||t.isFunction(declar)||t.isClass(declar))return}else{var first=specifiers[0];var hasSpecial=false;if(t.isExportDefaultSpecifier(first)||t.isExportNamespaceSpecifier(first)){hasSpecial=true;print.plain(specifiers.shift());if(specifiers.length){this.push(", ")}}if(specifiers.length||!specifiers.length&&!hasSpecial){this.push("{");if(specifiers.length){this.space();print.join(specifiers,{separator:", "});this.space()}this.push("}")}if(node.source){this.push(" from ");print.plain(node.source)}}this.ensureSemicolon()}function ImportDeclaration(node,print){this.push("import ");if(node.isType){this.push("type ")}var specfiers=node.specifiers;if(specfiers&&specfiers.length){var first=node.specifiers[0];if(t.isImportDefaultSpecifier(first)||t.isImportNamespaceSpecifier(first)){print.plain(node.specifiers.shift());if(node.specifiers.length){this.push(", ")}}if(node.specifiers.length){this.push("{");this.space();print.join(node.specifiers,{separator:", "});this.space();this.push("}")}this.push(" from ")}print.plain(node.source);this.semicolon()}function ImportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.local)}},{"../../types":174,"./../../tools/protect.js":52}],32:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.WithStatement=WithStatement;exports.IfStatement=IfStatement;exports.ForStatement=ForStatement;exports.WhileStatement=WhileStatement;exports.DoWhileStatement=DoWhileStatement;exports.LabeledStatement=LabeledStatement;exports.TryStatement=TryStatement;exports.CatchClause=CatchClause;exports.ThrowStatement=ThrowStatement;exports.SwitchStatement=SwitchStatement;exports.SwitchCase=SwitchCase;exports.DebuggerStatement=DebuggerStatement;exports.VariableDeclaration=VariableDeclaration;exports.VariableDeclarator=VariableDeclarator;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function WithStatement(node,print){this.keyword("with");this.push("(");print.plain(node.object);this.push(")");print.block(node.body)}function IfStatement(node,print){this.keyword("if");this.push("(");print.plain(node.test);this.push(")");this.space();print.indentOnComments(node.consequent);if(node.alternate){if(this.isLast("}"))this.space();this.push("else ");print.indentOnComments(node.alternate)}}function ForStatement(node,print){this.keyword("for");this.push("(");print.plain(node.init);this.push(";");if(node.test){this.space();print.plain(node.test)}this.push(";");if(node.update){this.space();print.plain(node.update)}this.push(")");print.block(node.body)}function WhileStatement(node,print){this.keyword("while");this.push("(");print.plain(node.test);this.push(")");print.block(node.body)}var buildForXStatement=function buildForXStatement(op){return function(node,print){this.keyword("for");this.push("(");print.plain(node.left);this.push(" "+op+" ");print.plain(node.right);this.push(")");print.block(node.body)}};var ForInStatement=buildForXStatement("in");exports.ForInStatement=ForInStatement;var ForOfStatement=buildForXStatement("of");exports.ForOfStatement=ForOfStatement;function DoWhileStatement(node,print){this.push("do ");print.plain(node.body);this.space();this.keyword("while");this.push("(");print.plain(node.test);this.push(");")}var buildLabelStatement=function buildLabelStatement(prefix,key){return function(node,print){this.push(prefix);var label=node[key||"label"];if(label){this.push(" ");print.plain(label)}this.semicolon()}};var ContinueStatement=buildLabelStatement("continue");exports.ContinueStatement=ContinueStatement;var ReturnStatement=buildLabelStatement("return","argument");exports.ReturnStatement=ReturnStatement;var BreakStatement=buildLabelStatement("break");exports.BreakStatement=BreakStatement;function LabeledStatement(node,print){print.plain(node.label);this.push(": ");print.plain(node.body)}function TryStatement(node,print){this.keyword("try");print.plain(node.block);this.space();if(node.handlers){print.plain(node.handlers[0])}else{print.plain(node.handler)}if(node.finalizer){this.space();this.push("finally ");print.plain(node.finalizer)}}function CatchClause(node,print){this.keyword("catch");this.push("(");print.plain(node.param);this.push(") ");print.plain(node.body)}function ThrowStatement(node,print){this.push("throw ");print.plain(node.argument);this.semicolon()}function SwitchStatement(node,print){this.keyword("switch");this.push("(");print.plain(node.discriminant);this.push(")");this.space();this.push("{");print.sequence(node.cases,{indent:true,addNewlines:function addNewlines(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}});this.push("}")}function SwitchCase(node,print){if(node.test){this.push("case ");print.plain(node.test);this.push(":")}else{this.push("default:")}if(node.consequent.length){this.newline();print.sequence(node.consequent,{indent:true})}}function DebuggerStatement(){this.push("debugger;")}function VariableDeclaration(node,print,parent){this.push(node.kind+" ");var hasInits=false;if(!t.isFor(parent)){var _arr=node.declarations;for(var _i=0;_i<_arr.length;_i++){var declar=_arr[_i];if(declar.init){hasInits=true}}}var sep;if(!this.format.compact&&!this.format.concise&&hasInits&&!this.format.retainLines){sep=",\n"+_repeating2["default"](" ",node.kind.length+1)}print.list(node.declarations,{separator:sep});if(t.isFor(parent)){if(parent.left===node||parent.init===node)return}this.semicolon()}function VariableDeclarator(node,print){print.plain(node.id);print.plain(node.id.typeAnnotation);if(node.init){this.space();this.push("=");this.space();print.plain(node.init)}}},{"../../types":174,"./../../tools/protect.js":52,repeating:525}],33:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.TaggedTemplateExpression=TaggedTemplateExpression;exports.TemplateElement=TemplateElement;exports.TemplateLiteral=TemplateLiteral;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function TaggedTemplateExpression(node,print){print.plain(node.tag);print.plain(node.quasi)}function TemplateElement(node){this._push(node.value.raw)}function TemplateLiteral(node,print){this.push("`");var quasis=node.quasis;var len=quasis.length;for(var i=0;i0)this.space();print.plain(elem);if(i1e5;if(format.compact){console.error("[BABEL] "+messages.get("codeGeneratorDeopt",opts.filename,"100KB"))}}return format};CodeGenerator.findCommonStringDelimiter=function findCommonStringDelimiter(code,tokens){var occurences={single:0,"double":0};var checked=0;for(var i=0;i=3)break}if(occurences.single>occurences.double){return"single"}else{return"double"}};CodeGenerator.prototype.generate=function generate(){var ast=this.ast;this.print(ast);if(ast.comments){var comments=[];var _arr=ast.comments;for(var _i=0;_i<_arr.length;_i++){var comment=_arr[_i];if(!comment._displayed)comments.push(comment)}this._printComments(comments)}return{map:this.map.get(),code:this.buffer.get()}};CodeGenerator.prototype.buildPrint=function buildPrint(parent){return new _nodePrinter2["default"](this,parent)};CodeGenerator.prototype.catchUp=function catchUp(node,parent,leftParenPrinted){if(node.loc&&this.format.retainLines&&this.buffer.buf){var needsParens=false;if(!leftParenPrinted&&parent&&this.position.line","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(tier,i){_lodashCollectionEach2["default"](tier,function(op){PRECEDENCE[op]=i})});function NullableTypeAnnotation(node,parent){return t.isArrayTypeAnnotation(parent)}exports.FunctionTypeAnnotation=NullableTypeAnnotation;function UpdateExpression(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}}function ObjectExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function Binary(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node){return true}}}function BinaryExpression(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}}function SequenceExpression(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}return true}function YieldExpression(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)||t.isConditionalExpression(parent)||t.isYieldExpression(parent)}function ClassExpression(node,parent){return t.isExpressionStatement(parent)}function UnaryLike(node,parent){return t.isMemberExpression(parent)&&parent.object===node}function FunctionExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isCallExpression(parent)&&parent.callee===node){return true}}function ConditionalExpression(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isCallExpression(parent)||t.isNewExpression(parent)){if(parent.callee===node){return true}}if(t.isConditionalExpression(parent)&&parent.test===node){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function AssignmentExpression(node){if(t.isObjectPattern(node.left)){return true}else{return ConditionalExpression.apply(undefined,arguments)}}},{"../../types":174,"./../../tools/protect.js":52,"lodash/collection/each":367}],38:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var NodePrinter=function(){function NodePrinter(generator,parent){_classCallCheck(this,NodePrinter);this.generator=generator;this.parent=parent}NodePrinter.prototype.plain=function plain(node,opts){return this.generator.print(node,this.parent,opts)};NodePrinter.prototype.sequence=function sequence(nodes){var opts=arguments[1]===undefined?{}:arguments[1];opts.statement=true;return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.join=function join(nodes,opts){return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.list=function list(items){var opts=arguments[1]===undefined?{}:arguments[1];if(opts.separator==null){opts.separator=",";if(!this.generator.format.compact)opts.separator+=" "}return this.join(items,opts)};NodePrinter.prototype.block=function block(node){return this.generator.printBlock(this,node)};NodePrinter.prototype.indentOnComments=function indentOnComments(node){return this.generator.printAndIndentOnComments(this,node)};return NodePrinter}();exports["default"]=NodePrinter;module.exports=exports["default"]},{"./../../tools/protect.js":52}],39:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashCollectionMap=require("lodash/collection/map");var _lodashCollectionMap2=_interopRequireDefault(_lodashCollectionMap);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function crawl(node){var state=arguments[1]===undefined?{}:arguments[1];if(t.isMemberExpression(node)){crawl(node.object,state);if(node.computed)crawl(node.property,state)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){crawl(node.left,state);crawl(node.right,state)}else if(t.isCallExpression(node)){state.hasCall=true;crawl(node.callee,state)}else if(t.isFunction(node)){state.hasFunction=true}else if(t.isIdentifier(node)){state.hasHelper=state.hasHelper||isHelper(node.callee)}return state}function isHelper(node){if(t.isMemberExpression(node)){return isHelper(node.object)||isHelper(node.property)}else if(t.isIdentifier(node)){return node.name==="require"||node.name[0]==="_"}else if(t.isCallExpression(node)){return isHelper(node.callee)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){return t.isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)}else{return false}}function isType(node){return t.isLiteral(node)||t.isObjectExpression(node)||t.isArrayExpression(node)||t.isIdentifier(node)||t.isMemberExpression(node)}exports.nodes={AssignmentExpression:function AssignmentExpression(node){var state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction){return{before:state.hasFunction,after:true}}},SwitchCase:function SwitchCase(node,parent){return{before:node.consequent.length||parent.cases[0]===node}},LogicalExpression:function LogicalExpression(node){if(t.isFunction(node.left)||t.isFunction(node.right)){return{after:true}}},Literal:function Literal(node){if(node.value==="use strict"){return{after:true}}},CallExpression:function CallExpression(node){if(t.isFunction(node.callee)||isHelper(node)){return{before:true,after:true}}},VariableDeclaration:function VariableDeclaration(node){for(var i=0;i=max){i-=max}return i}var Whitespace=function(){function Whitespace(tokens){_classCallCheck(this,Whitespace);this.tokens=tokens;this.used={};this._lastFoundIndex=0}Whitespace.prototype.getNewlinesBefore=function getNewlinesBefore(node){var startToken;var endToken;var tokens=this.tokens;for(var j=0;j")}}).join("\n")};module.exports=exports["default"]},{"./../tools/protect.js":52,chalk:240,esutils:347,"js-tokens":358,"line-numbers":359,repeating:525}],44:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;var _lodashObjectMerge=require("lodash/object/merge");var _lodashObjectMerge2=_interopRequireDefault(_lodashObjectMerge);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]=function(dest,src){if(!dest||!src)return;return _lodashObjectMerge2["default"](dest,src,function(a,b){if(Array.isArray(a)){var c=a.slice(0);for(var _iterator=b,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var v=_ref;if(a.indexOf(v)<0){c.push(v)}}return c}})};module.exports=exports["default"]},{"./../tools/protect.js":52,"lodash/object/merge":470}],45:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]=function(ast,comments,tokens){if(ast&&ast.type==="Program"){return t.file(ast,comments||[],tokens||[])}else{throw new Error("Not a valid ast?")}};module.exports=exports["default"]},{"../types":174,"./../tools/protect.js":52}],46:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]=function(){return Object.create(null)};module.exports=exports["default"]},{"./../tools/protect.js":52}],47:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _normalizeAst=require("./normalize-ast");var _normalizeAst2=_interopRequireDefault(_normalizeAst);var _estraverse=require("estraverse");var _estraverse2=_interopRequireDefault(_estraverse);var _acorn=require("../../acorn");var acorn=_interopRequireWildcard(_acorn);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]=function(code){var opts=arguments[1]===undefined?{}:arguments[1];var commentsAndTokens=[];var comments=[];var tokens=[];var parseOpts={allowImportExportEverywhere:opts.looseModules,allowReturnOutsideFunction:opts.looseModules,allowHashBang:true,ecmaVersion:6,strictMode:opts.strictMode,sourceType:opts.sourceType,locations:true,features:opts.features||{},plugins:opts.plugins||{},onToken:tokens,ranges:true};parseOpts.onToken=function(token){tokens.push(token);commentsAndTokens.push(token)};parseOpts.onComment=function(block,text,start,end,startLoc,endLoc){var comment={type:block?"CommentBlock":"CommentLine",value:text,start:start,end:end,loc:new acorn.SourceLocation(this,startLoc,endLoc),range:[start,end]};commentsAndTokens.push(comment);comments.push(comment)};if(opts.nonStandard){parseOpts.plugins.jsx=true;parseOpts.plugins.flow=true}var ast=acorn.parse(code,parseOpts);_estraverse2["default"].attachComments(ast,comments,tokens);ast=_normalizeAst2["default"](ast,comments,commentsAndTokens);return ast};module.exports=exports["default"]},{"../../acorn":1,"./../tools/protect.js":52,"./normalize-ast":45,estraverse:342}],48:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.get=get;exports.parseArgs=parseArgs;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _util=require("util");var util=_interopRequireWildcard(_util);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned so it's probably be dereferenced so we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues", -unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this nodes position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"Must pass a scope and parentPath unless traversing a Program/File got a $1 node",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginIllegalKind:"Illegal kind $1 for plugin $2",pluginIllegalPosition:"Illegal position $1 for plugin $2",pluginKeyCollision:"The plugin $1 collides with another of the same name",pluginNotTransformer:"The plugin $1 didn't export a Plugin instance",pluginUnknown:"Unknown plugin $1",pluginNotFile:"Plugin $1 is resolving to a different Babel version to what is doing the actual transformation..."};exports.MESSAGES=MESSAGES;function get(key){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var msg=MESSAGES[key];if(!msg)throw new ReferenceError("Unknown message "+JSON.stringify(key));args=parseArgs(args);return msg.replace(/\$(\d+)/g,function(str,i){return args[--i]})}function parseArgs(args){return args.map(function(val){if(val!=null&&val.inspect){return val.inspect()}else{try{return JSON.stringify(val)||val+""}catch(e){return util.inspect(val)}}})}},{"./tools/protect.js":52,util:239}],49:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _estraverse=require("estraverse");var _estraverse2=_interopRequireDefault(_estraverse);var _lodashObjectExtend=require("lodash/object/extend");var _lodashObjectExtend2=_interopRequireDefault(_lodashObjectExtend);var _astTypes=require("ast-types");var _astTypes2=_interopRequireDefault(_astTypes);var _types=require("./types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}_lodashObjectExtend2["default"](_estraverse2["default"].VisitorKeys,t.VISITOR_KEYS);var def=_astTypes2["default"].Type.def;var or=_astTypes2["default"].Type.or;def("Noop");def("AssignmentPattern").bases("Pattern").build("left","right").field("left",def("Pattern")).field("right",def("Expression"));def("RestElement").bases("Pattern").build("argument").field("argument",def("expression"));def("DoExpression").bases("Expression").build("body").field("body",[def("Statement")]);def("Super").bases("Expression");def("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null));def("ExportNamedDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"))]).field("source",or(def("ModuleSpecifier"),null));def("ExportNamespaceSpecifier").bases("Specifier").field("exported",def("Identifier"));def("ExportDefaultSpecifier").bases("Specifier").field("exported",def("Identifier"));def("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",def("Identifier")).field("source",def("Literal"));def("BindExpression").bases("Expression").build("object","callee").field("object",or(def("Expression"),null)).field("callee",def("Expression"));_astTypes2["default"].finalize()},{"./tools/protect.js":52,"./types":174,"ast-types":194,estraverse:342,"lodash/object/extend":466}],50:[function(require,module,exports){(function(global){"use strict";var _toolsProtectJs2=require("./tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);require("core-js/shim");require("regenerator/runtime");_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}if(global._babelPolyfill){throw new Error("only one instance of babel/polyfill is allowed")}global._babelPolyfill=true}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./tools/protect.js":52,"core-js/shim":337,"regenerator/runtime":518}],51:[function(require,module,exports){"use strict";var _protectJs2=require(".//protect.js");var _protectJs3=_interopRequireDefault(_protectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _generation=require("../generation");var _generation2=_interopRequireDefault(_generation);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../util");var util=_interopRequireWildcard(_util);var _transformationFile=require("../transformation/file");var _transformationFile2=_interopRequireDefault(_transformationFile);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _types=require("../types");var t=_interopRequireWildcard(_types);_protectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function buildGlobal(namespace,builder){var body=[];var container=t.functionExpression(null,[t.identifier("global")],t.blockStatement(body));var tree=t.program([t.expressionStatement(t.callExpression(container,[util.template("helper-self-global")]))]);body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.assignmentExpression("=",t.memberExpression(t.identifier("global"),namespace),t.objectExpression([])))]));builder(body);return tree}function buildUmd(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.identifier("global"))]));builder(body);var container=util.template("umd-commonjs-strict",{FACTORY_PARAMETERS:t.identifier("global"),BROWSER_ARGUMENTS:t.assignmentExpression("=",t.memberExpression(t.identifier("root"),namespace),t.objectExpression({})),COMMON_ARGUMENTS:t.identifier("exports"),AMD_ARGUMENTS:t.arrayExpression([t.literal("exports")]),FACTORY_BODY:body,UMD_ROOT:t.identifier("this")});return t.program([container])}function buildVar(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.objectExpression({}))]));builder(body);return t.program(body)}function buildHelpers(body,namespace,whitelist){_lodashCollectionEach2["default"](_transformationFile2["default"].helpers,function(name){if(whitelist&&whitelist.indexOf(name)===-1)return;var key=t.identifier(t.toIdentifier(name));body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(namespace,key),util.template("helper-"+name))))})}exports["default"]=function(whitelist){var outputType=arguments[1]===undefined?"global":arguments[1];var namespace=t.identifier("babelHelpers");var builder=function builder(body){return buildHelpers(body,namespace,whitelist)};var tree;var build={global:buildGlobal,umd:buildUmd,"var":buildVar}[outputType];if(build){tree=build(namespace,builder)}else{throw new Error(messages.get("unsupportedOutputType",outputType))}return _generation2["default"](tree).code};module.exports=exports["default"]},{"../generation":35,"../messages":48,"../transformation/file":53,"../types":174,"../util":178,".//protect.js":52,"lodash/collection/each":367}],52:[function(require,module,exports){(function(__dirname){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _path=require("path");var _path2=_interopRequireDefault(_path);var root=_path2["default"].resolve(__dirname,"../../../");exports["default"]=function(module){if(module.parent&&module.parent.filename.indexOf(root)!==0){throw new Error("Don't hotlink internal Babel files.")}};module.exports=exports["default"]}).call(this,"/lib/babel/tools")},{path:222}],53:[function(require,module,exports){(function(process){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=0)continue;var group=pass.plugin.metadata.group;if(!pass.canTransform()||!group){stack.push(pass);continue}var mergeStack=[];var _arr4=_stack;for(var _i4=0;_i4<_arr4.length;_i4++){var _pass=_arr4[_i4];if(_pass.plugin.metadata.group===group){mergeStack.push(_pass);ignore.push(_pass)}}var visitors=[];var _arr5=mergeStack;for(var _i5=0;_i5<_arr5.length;_i5++){var _pass2=_arr5[_i5];visitors.push(_pass2.plugin.visitor)}var visitor=_traversal2["default"].visitors.merge(visitors);var mergePlugin=new _plugin2["default"](group,{visitor:visitor});stack.push(mergePlugin.buildPass(this))}return stack};File.prototype.set=function set(key,val){return this.data[key]=val};File.prototype.setDynamic=function setDynamic(key,fn){this.dynamicData[key]=fn};File.prototype.get=function get(key){var data=this.data[key];if(data){return data}else{var dynamic=this.dynamicData[key];if(dynamic){return this.set(key,dynamic())}}};File.prototype.resolveModuleSource=function resolveModuleSource(source){var resolveModuleSource=this.opts.resolveModuleSource;if(resolveModuleSource)source=resolveModuleSource(source,this.opts.filename);return source};File.prototype.addImport=function addImport(source,name,type){name=name||source;var id=this.dynamicImportIds[name];if(!id){source=this.resolveModuleSource(source);id=this.dynamicImportIds[name]=this.scope.generateUidIdentifier(name);var specifiers=[t.importDefaultSpecifier(id)];var declar=t.importDeclaration(specifiers,t.literal(source));declar._blockHoist=3;if(type){var modules=this.dynamicImportTypes[type]=this.dynamicImportTypes[type]||[];modules.push(declar)}if(this.transformers["es6.modules"].canTransform()){this.moduleFormatter.importSpecifier(specifiers[0],declar,this.dynamicImports,this.scope);this.moduleFormatter.hasLocalImports=true}else{this.dynamicImports.push(declar)}}return id};File.prototype.attachAuxiliaryComment=function attachAuxiliaryComment(node){var beforeComment=this.opts.auxiliaryCommentBefore;if(beforeComment){node.leadingComments=node.leadingComments||[];node.leadingComments.push({type:"CommentLine",value:" "+beforeComment})}var afterComment=this.opts.auxiliaryCommentAfter;if(afterComment){node.trailingComments=node.trailingComments||[];node.trailingComments.push({type:"CommentLine",value:" "+afterComment})}return node};File.prototype.addHelper=function addHelper(name){var isSolo=_lodashCollectionIncludes2["default"](File.soloHelpers,name);if(!isSolo&&!_lodashCollectionIncludes2["default"](File.helpers,name)){throw new ReferenceError("Unknown helper "+name)}var declar=this.declarations[name];if(declar)return declar;this.usedHelpers[name]=true;if(!isSolo){var generator=this.get("helperGenerator");var runtime=this.get("helpersNamespace");if(generator){return generator(name)}else if(runtime){var id=t.identifier(t.toIdentifier(name));return t.memberExpression(runtime,id)}}var ref=util.template("helper-"+name);var uid=this.declarations[name]=this.scope.generateUidIdentifier(name);if(t.isFunctionExpression(ref)&&!ref.id){ref.body._compact=true;ref._generated=true;ref.id=uid;ref.type="FunctionDeclaration";this.attachAuxiliaryComment(ref);this.path.unshiftContainer("body",ref)}else{ref._compact=true;this.scope.push({id:uid,init:ref,unique:true})}return uid};File.prototype.errorWithNode=function errorWithNode(node,msg){var Error=arguments[2]===undefined?SyntaxError:arguments[2];var err;if(node&&node.loc){var loc=node.loc.start;err=new Error("Line "+loc.line+": "+msg);err.loc=loc}else{err=new Error("There's been an error on a dynamic node. This is almost certainly an internal error. Please report it.")}return err};File.prototype.mergeSourceMap=function mergeSourceMap(map){var opts=this.opts;var inputMap=opts.inputSourceMap;if(inputMap){map.sources[0]=inputMap.file;var inputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(inputMap);var outputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(map);var outputMapGenerator=_sourceMap2["default"].SourceMapGenerator.fromSourceMap(outputMapConsumer);outputMapGenerator.applySourceMap(inputMapConsumer);var mergedMap=outputMapGenerator.toJSON();mergedMap.sources=inputMap.sources;mergedMap.file=inputMap.file;return mergedMap}return map};File.prototype.getModuleFormatter=function getModuleFormatter(type){if(_lodashLangIsFunction2["default"](type)||!_modules2["default"][type]){this.log.deprecate("Custom module formatters are deprecated and will be removed in the next major. Please use Babel plugins instead.")}var ModuleFormatter=_lodashLangIsFunction2["default"](type)?type:_modules2["default"][type];if(!ModuleFormatter){var loc=util.resolveRelative(type);if(loc)ModuleFormatter=require(loc)}if(!ModuleFormatter){throw new ReferenceError("Unknown module formatter type "+JSON.stringify(type))}return new ModuleFormatter(this)};File.prototype.parse=function parse(code){var opts=this.opts;var parseOpts={highlightCode:opts.highlightCode,nonStandard:opts.nonStandard,filename:opts.filename,plugins:{}};var features=parseOpts.features={};for(var key in this.transformers){var transformer=this.transformers[key];features[key]=transformer.canTransform()}parseOpts.looseModules=this.isLoose("es6.modules");parseOpts.strictMode=features.strict;parseOpts.sourceType="module";this.log.debug("Parse start");var tree=_helpersParse2["default"](code,parseOpts);this.log.debug("Parse stop");return tree};File.prototype._addAst=function _addAst(ast){this.path=_traversalPath2["default"].get({hub:this.hub,parentPath:null,parent:ast,container:ast,key:"program"}).setContext();this.scope=this.path.scope;this.ast=ast};File.prototype.addAst=function addAst(ast){this.log.debug("Start set AST");this._addAst(ast);this.log.debug("End set AST");this.log.debug("Start module formatter init");var modFormatter=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);if(modFormatter.init&&this.transformers["es6.modules"].canTransform()){modFormatter.init()}this.log.debug("End module formatter init")};File.prototype.transform=function transform(){this.call("pre");var _arr6=this.transformerStack;for(var _i6=0;_i6<_arr6.length;_i6++){var pass=_arr6[_i6];pass.transform()}this.call("post");return this.generate()};File.prototype.wrap=function wrap(code,callback){code=code+"";try{if(this.shouldIgnore()){return this.makeResult({code:code,ignored:true})}else{return callback()}}catch(err){if(err._babel){throw err}else{err._babel=true}var message=err.message=this.opts.filename+": "+err.message;var loc=err.loc;if(loc){err.codeFrame=_helpersCodeFrame2["default"](code,loc.line,loc.column+1,this.opts);message+="\n"+err.codeFrame}if(err.stack){var newStack=err.stack.replace(err.message,message);try{err.stack=newStack}catch(e){}}throw err}};File.prototype.addCode=function addCode(code){code=(code||"")+"";code=this.parseInputSourceMap(code);this.code=code};File.prototype.parseCode=function parseCode(){this.parseShebang();this.addAst(this.parse(this.code))};File.prototype.shouldIgnore=function shouldIgnore(){var opts=this.opts;return util.shouldIgnore(opts.filename,opts.ignore,opts.only)};File.prototype.call=function call(key){var _arr7=this.uncollapsedTransformerStack;for(var _i7=0;_i7<_arr7.length;_i7++){var pass=_arr7[_i7];var fn=pass.plugin[key];if(fn)fn(this)}};File.prototype.parseInputSourceMap=function parseInputSourceMap(code){var opts=this.opts;if(opts.inputSourceMap!==false){var inputMap=_convertSourceMap2["default"].fromSource(code);if(inputMap){opts.inputSourceMap=inputMap.toObject();code=_convertSourceMap2["default"].removeComments(code)}}return code};File.prototype.parseShebang=function parseShebang(){var shebangMatch=_shebangRegex2["default"].exec(this.code);if(shebangMatch){this.shebang=shebangMatch[0];this.code=this.code.replace(_shebangRegex2["default"],"")}};File.prototype.makeResult=function makeResult(_ref){var code=_ref.code;var _ref$map=_ref.map;var map=_ref$map===undefined?null:_ref$map;var ast=_ref.ast;var ignored=_ref.ignored;var result={metadata:null,ignored:!!ignored,code:null,ast:null,map:map};if(this.opts.code){result.code=code}if(this.opts.ast){result.ast=ast}if(this.opts.metadata){result.metadata=this.metadata;result.metadata.usedHelpers=Object.keys(this.usedHelpers)}return result};File.prototype.generate=function generate(){var opts=this.opts;var ast=this.ast;var result={ast:ast};if(!opts.code)return this.makeResult(result);this.log.debug("Generation start");var _result=_generation2["default"](ast,opts,this.code);result.code=_result.code;result.map=_result.map;this.log.debug("Generation end");if(this.shebang){result.code=this.shebang+"\n"+result.code}if(result.map){result.map=this.mergeSourceMap(result.map)}if(opts.sourceMaps==="inline"||opts.sourceMaps==="both"){result.code+="\n"+_convertSourceMap2["default"].fromObject(result.map).toComment()}if(opts.sourceMaps==="inline"){result.map=null}return this.makeResult(result)};_createClass(File,null,[{key:"helpers",value:["inherits","defaults","create-class","create-decorated-class","create-decorated-object","define-decorated-property-descriptor","tagged-template-literal","tagged-template-literal-loose","to-array","to-consumable-array","sliced-to-array","sliced-to-array-loose","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-require-wildcard","interop-require-default","typeof","extends","get","set","class-call-check","object-destructuring-empty","temporal-undefined","temporal-assert-defined","self-global","default-props","instanceof","interop-require"],enumerable:true},{key:"soloHelpers",value:[],enumerable:true},{key:"options",value:_options.config,enumerable:true}]);return File}();exports["default"]=File;module.exports=exports["default"]}).call(this,require("_process"))},{"../../generation":35,"../../helpers/code-frame":43,"../../helpers/merge":44,"../../helpers/parse":47,"../../traversal":149,"../../traversal/hub":148,"../../traversal/path":156,"../../types":174,"../../util":178,"../modules":81,"../plugin":88,"./../../tools/protect.js":52,"./logger":54,"./options":56,"./options/resolve-rc":58,"./plugin-manager":59,_process:223,"convert-source-map":248,"lodash/collection/includes":369,"lodash/lang/clone":449,"lodash/lang/isFunction":455,"lodash/object/assign":464,"lodash/object/defaults":465,path:222,"path-is-absolute":483,"shebang-regex":528,slash:529,"source-map":530}],54:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _debugNode=require("debug/node");var _debugNode2=_interopRequireDefault(_debugNode);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var verboseDebug=_debugNode2["default"]("babel:verbose");var generalDebug=_debugNode2["default"]("babel");var seenDeprecatedMessages=[];var Logger=function(){function Logger(file,filename){_classCallCheck(this,Logger);this.filename=filename;this.file=file}Logger.prototype._buildMessage=function _buildMessage(msg){var parts="[BABEL] "+this.filename;if(msg)parts+=": "+msg;return parts};Logger.prototype.warn=function warn(msg){console.warn(this._buildMessage(msg))};Logger.prototype.error=function error(msg){var Constructor=arguments[1]===undefined?Error:arguments[1];throw new Constructor(this._buildMessage(msg))};Logger.prototype.deprecate=function deprecate(msg){if(this.file.opts.suppressDeprecationMessages)return;msg=this._buildMessage(msg);if(seenDeprecatedMessages.indexOf(msg)>=0)return;seenDeprecatedMessages.push(msg);console.error(msg)};Logger.prototype.verbose=function verbose(msg){if(verboseDebug.enabled)verboseDebug(this._buildMessage(msg))};Logger.prototype.debug=function debug(msg){if(generalDebug.enabled)generalDebug(this._buildMessage(msg))};Logger.prototype.deopt=function deopt(node,msg){this.debug(msg)};return Logger}();exports["default"]=Logger;module.exports=exports["default"]},{"./../../tools/protect.js":52,"debug/node":339}],55:[function(require,module,exports){module.exports={filename:{type:"string",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:true,type:"string"},inputSourceMap:{hidden:true},extra:{hidden:true,"default":{}},env:{hidden:true,"default":{}},moduleId:{description:"specify a custom name for module ids",type:"string"},getModuleId:{hidden:true},retainLines:{type:"boolean","default":false,description:"retain line numbers - will result in really ugly code"},nonStandard:{type:"boolean","default":true,description:"enable/disable support for JSX and Flow (on by default)"},experimental:{type:"boolean",description:"allow use of experimental transformers","default":false},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean","default":true},suppressDeprecationMessages:{type:"boolean","default":false,hidden:true},resolveModuleSource:{hidden:true},stage:{description:"ECMAScript proposal stage version to allow [0-4]",shorthand:"e",type:"number","default":2},blacklist:{type:"transformerList",description:"blacklist of transformers to NOT use",shorthand:"b","default":[]},whitelist:{type:"transformerList",optional:true,description:"whitelist of transformers to ONLY use",shorthand:"l"},optional:{type:"transformerList",description:"list of optional transformers to enable","default":[]},modules:{type:"string",description:"module formatter type to use [common]","default":"common",shorthand:"m"},moduleIds:{type:"boolean","default":false,shorthand:"M",description:"insert an explicit id for modules"},loose:{type:"transformerList",description:"list of transformers to enable loose mode ON",shorthand:"L"},jsxPragma:{type:"string",description:"custom pragma to use with JSX (same functionality as @jsx comments)","default":"React.createElement",shorthand:"P"},plugins:{type:"list",description:"","default":[]},ignore:{type:"list",description:"list of glob paths to **not** compile","default":[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:true,"default":true,type:"boolean"},metadata:{hidden:true,"default":true,type:"boolean"},ast:{hidden:true,"default":true,type:"boolean"},comments:{type:"boolean","default":true,description:"strip/output comments in generated output (on by default)"},compact:{type:"booleanString","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},keepModuleIdExtensions:{type:"boolean",description:"keep extensions when generating module ids","default":false,shorthand:"k"},auxiliaryComment:{deprecated:"renamed to auxiliaryCommentBefore",shorthand:"a",alias:"auxiliaryCommentBefore"},auxiliaryCommentBefore:{type:"string","default":"",description:"attach a comment before all helper declarations and auxiliary code"},auxiliaryCommentAfter:{type:"string","default":"",description:"attach a comment after all helper declarations and auxiliary code"},externalHelpers:{type:"boolean","default":false,shorthand:"r",description:"uses a reference to `babelHelpers` instead of placing helpers at the top of your code."},metadataUsedHelpers:{deprecated:"Not required anymore as this is enabled by default",type:"boolean","default":false,hidden:true},sourceMap:{alias:"sourceMaps",hidden:true -},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":false,shorthand:"s"},sourceMapName:{alias:"sourceMapTarget",description:"DEPRECATED - Please use sourceMapTarget"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"string",description:"the root from which all sources are relative"},moduleRoot:{type:"string",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},breakConfig:{type:"boolean","default":false,hidden:true,description:"stop trying to load .babelrc files"},babelrc:{hidden:true,description:"do not load the same .babelrc file twice"}}},{}],56:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.validateOption=validateOption;exports.normaliseOptions=normaliseOptions;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _parsers=require("./parsers");var parsers=_interopRequireWildcard(_parsers);var _config=require("./config");var _config2=_interopRequireDefault(_config);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.config=_config2["default"];function validateOption(key,val,pipeline){var opt=_config2["default"][key];var parser=opt&&parsers[opt.type];if(parser&&parser.validate){return parser.validate(key,val,pipeline)}else{return val}}function normaliseOptions(){var options=arguments[0]===undefined?{}:arguments[0];for(var key in options){var val=options[key];if(val==null)continue;var opt=_config2["default"][key];if(!opt)continue;var parser=parsers[opt.type];if(parser)val=parser(val);options[key]=val}return options}},{"./../../../tools/protect.js":52,"./config":55,"./parsers":57}],57:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.transformerList=transformerList;exports.number=number;exports.boolean=boolean;exports.booleanString=booleanString;exports.list=list;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _util=require("../../../util");var util=_interopRequireWildcard(_util);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function transformerList(val){return util.arrayify(val)}transformerList.validate=function(key,val,pipeline){if(val.indexOf("all")>=0||val.indexOf(true)>=0){val=Object.keys(pipeline.transformers)}return pipeline._ensureTransformerNames(key,val)};function number(val){return+val}function boolean(val){return!!val}function booleanString(val){return util.booleanify(val)}function list(val){return util.list(val)}},{"../../../util":178,"./../../../tools/protect.js":52}],58:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;var _stripJsonComments=require("strip-json-comments");var _stripJsonComments2=_interopRequireDefault(_stripJsonComments);var _index=require("./index");var _helpersMerge=require("../../../helpers/merge");var _helpersMerge2=_interopRequireDefault(_helpersMerge);var _path=require("path");var _path2=_interopRequireDefault(_path);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _pathExists=require("path-exists");var _pathExists2=_interopRequireDefault(_pathExists);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var cache={};var jsons={};function exists(filename){var cached=cache[filename];if(cached!=null)return cached;return cache[filename]=_pathExists2["default"].sync(filename)}exports["default"]=function(loc){var opts=arguments[1]===undefined?{}:arguments[1];var rel=".babelrc";if(!opts.babelrc){opts.babelrc=[]}function find(start,rel){var file=_path2["default"].join(start,rel);if(opts.babelrc.indexOf(file)>=0){return}if(exists(file)){var content=_fs2["default"].readFileSync(file,"utf8");var json;try{json=jsons[content]=jsons[content]||JSON.parse(_stripJsonComments2["default"](content));_index.normaliseOptions(json)}catch(err){err.message=file+": "+err.message;throw err}opts.babelrc.push(file);if(json.breakConfig)return;_helpersMerge2["default"](opts,json)}var up=_path2["default"].dirname(start);if(up!==start){find(up,rel)}}if(opts.babelrc.indexOf(loc)<0&&opts.breakConfig!==true){find(loc,rel)}return opts};module.exports=exports["default"]},{"../../../helpers/merge":44,"./../../../tools/protect.js":52,"./index":56,fs:212,path:222,"path-exists":482,"strip-json-comments":541}],59:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=3){callExpr._prettyCall=true}return t.inherits(callExpr,node)}};return visitor};module.exports=exports["default"]},{"../../messages":48,"../../types":174,"./../../tools/protect.js":52,"./react":69,esutils:347,"lodash/lang/isString":461}],63:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var visitor={enter:function enter(node,parent,scope,state){if(this.isThisExpression()||this.isReferencedIdentifier({name:"arguments"})){state.found=true;this.stop()}},Function:function Function(){this.skip()}};exports["default"]=function(node,scope){var container=t.functionExpression(null,[],node.body,node.generator,node.async);var callee=container;var args=[];var state={found:false};scope.traverse(node,visitor,state);if(state.found){callee=t.memberExpression(container,t.identifier("apply"));args=[t.thisExpression(),t.identifier("arguments")]}var call=t.callExpression(callee,args);if(node.generator)call=t.yieldExpression(call,true);return t.returnStatement(call)};module.exports=exports["default"]},{"../../types":174,"./../../tools/protect.js":52}],64:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.push=push;exports.hasComputed=hasComputed;exports.toComputedObjectFromClass=toComputedObjectFromClass;exports.toClassObject=toClassObject;exports.toDefineObject=toDefineObject;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function push(mutatorMap,node,kind,file){var alias=t.toKeyAlias(node);var map={};if(_lodashObjectHas2["default"](mutatorMap,alias))map=mutatorMap[alias];mutatorMap[alias]=map;map._inherits=map._inherits||[];map._inherits.push(node);map._key=node.key;if(node.computed){map._computed=true}if(node.decorators){var decorators=map.decorators=map.decorators||t.arrayExpression([]);decorators.elements=decorators.elements.concat(node.decorators.map(function(dec){return dec.expression}).reverse())}if(map.value||map.initializer){throw file.errorWithNode(node,"Key conflict with sibling node")}if(node.value){if(node.kind==="init")kind="value";if(node.kind==="get")kind="get";if(node.kind==="set")kind="set";t.inheritsComments(node.value,node);map[kind]=node.value}return map}function hasComputed(mutatorMap){for(var key in mutatorMap){if(mutatorMap[key]._computed){return true}}return false}function toComputedObjectFromClass(obj){var objExpr=t.arrayExpression([]);for(var i=0;i=0}function pullFlag(node,flag){var flags=node.regex.flags.split("");if(node.regex.flags.indexOf(flag)<0)return;_lodashArrayPull2["default"](flags,flag);node.regex.flags=flags.join("")}},{"../../types":174,"./../../tools/protect.js":52,"lodash/array/pull":364}],71:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){ -return obj&&obj.__esModule?obj:{"default":obj}}var awaitVisitor={Function:function Function(){this.skip()},AwaitExpression:function AwaitExpression(node){node.type="YieldExpression";if(node.all){node.all=false;node.argument=t.callExpression(t.memberExpression(t.identifier("Promise"),t.identifier("all")),[node.argument])}}};var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){var name=state.id.name;if(node.name===name&&scope.bindingIdentifierEquals(name,state.id)){return state.ref=state.ref||scope.generateUidIdentifier(name)}}};exports["default"]=function(path,callId){var node=path.node;node.async=false;node.generator=true;path.traverse(awaitVisitor,state);var call=t.callExpression(callId,[node]);var id=node.id;node.id=null;if(t.isFunctionDeclaration(node)){var declar=t.variableDeclaration("let",[t.variableDeclarator(id,call)]);declar._blockHoist=true;return declar}else{if(id){var state={id:id};path.traverse(referenceVisitor,state);if(state.ref){path.scope.parent.push({id:state.ref});return t.assignmentExpression("=",state.ref,call)}}return call}};module.exports=exports["default"]},{"../../types":174,"./../../tools/protect.js":52}],72:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function isIllegalBareSuper(node,parent){if(!t.isSuper(node))return false;if(t.isMemberExpression(parent,{computed:false}))return false;if(t.isCallExpression(parent,{callee:node}))return false;return true}function isMemberExpressionSuper(node){return t.isMemberExpression(node)&&t.isSuper(node.object)}var visitor={enter:function enter(node,parent,scope,state){var topLevel=state.topLevel;var self=state.self;if(t.isFunction(node)&&!t.isArrowFunctionExpression(node)){self.traverseLevel(this,false);return this.skip()}if(t.isProperty(node,{method:true})||t.isMethodDefinition(node)){return this.skip()}var getThisReference=topLevel?t.thisExpression:self.getThisReference.bind(self);var callback=self.specHandle;if(self.isLoose)callback=self.looseHandle;var result=callback.call(self,this,getThisReference);if(result)this.hasSuper=true;if(result===true)return;return result}};var ReplaceSupers=function(){function ReplaceSupers(opts){var inClass=arguments[1]===undefined?false:arguments[1];_classCallCheck(this,ReplaceSupers);this.topLevelThisReference=opts.topLevelThisReference;this.methodPath=opts.methodPath;this.methodNode=opts.methodNode;this.superRef=opts.superRef;this.isStatic=opts.isStatic;this.hasSuper=false;this.inClass=inClass;this.isLoose=opts.isLoose;this.scope=opts.scope;this.file=opts.file;this.opts=opts}ReplaceSupers.prototype.getObjectRef=function getObjectRef(){return this.opts.objectRef||this.opts.getObjectRef()};ReplaceSupers.prototype.setSuperProperty=function setSuperProperty(property,value,isComputed,thisExpression){return t.callExpression(this.file.addHelper("set"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),value,thisExpression])};ReplaceSupers.prototype.getSuperProperty=function getSuperProperty(property,isComputed,thisExpression){return t.callExpression(this.file.addHelper("get"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),thisExpression])};ReplaceSupers.prototype.replace=function replace(){this.traverseLevel(this.methodPath.get("value"),true)};ReplaceSupers.prototype.traverseLevel=function traverseLevel(path,topLevel){var state={self:this,topLevel:topLevel};path.traverse(visitor,state)};ReplaceSupers.prototype.getThisReference=function getThisReference(){if(this.topLevelThisReference){return this.topLevelThisReference}else{var ref=this.topLevelThisReference=this.scope.generateUidIdentifier("this");this.methodNode.value.body.body.unshift(t.variableDeclaration("var",[t.variableDeclarator(this.topLevelThisReference,t.thisExpression())]));return ref}};ReplaceSupers.prototype.getLooseSuperProperty=function getLooseSuperProperty(id,parent){var methodNode=this.methodNode;var methodName=methodNode.key;var superRef=this.superRef||t.identifier("Function");if(parent.property===id){return}else if(t.isCallExpression(parent,{callee:id})){parent.arguments.unshift(t.thisExpression());if(methodName.name==="constructor"){if(parent.arguments.length===2&&t.isSpreadElement(parent.arguments[1])&&t.isIdentifier(parent.arguments[1].argument,{name:"arguments"})){parent.arguments[1]=parent.arguments[1].argument;return t.memberExpression(superRef,t.identifier("apply"))}else{return t.memberExpression(superRef,t.identifier("call"))}}else{id=superRef;if(!methodNode["static"]){id=t.memberExpression(id,t.identifier("prototype"))}id=t.memberExpression(id,methodName,methodNode.computed);return t.memberExpression(id,t.identifier("call"))}}else if(t.isMemberExpression(parent)&&!methodNode["static"]){return t.memberExpression(superRef,t.identifier("prototype"))}else{return superRef}};ReplaceSupers.prototype.looseHandle=function looseHandle(path,getThisReference){var node=path.node;if(path.isSuper()){return this.getLooseSuperProperty(node,path.parent)}else if(path.isCallExpression()){var callee=node.callee;if(!t.isMemberExpression(callee))return;if(!t.isSuper(callee.object))return;t.appendToMemberExpression(callee,t.identifier("call"));node.arguments.unshift(getThisReference());return true}};ReplaceSupers.prototype.specHandleAssignmentExpression=function specHandleAssignmentExpression(ref,path,node,getThisReference){if(node.operator==="="){return this.setSuperProperty(node.left.property,node.right,node.left.computed,getThisReference())}else{ref=ref||path.scope.generateUidIdentifier("ref");return[t.variableDeclaration("var",[t.variableDeclarator(ref,node.left)]),t.expressionStatement(t.assignmentExpression("=",node.left,t.binaryExpression(node.operator[0],ref,node.right)))]}};ReplaceSupers.prototype.specHandle=function specHandle(path,getThisReference){var methodNode=this.methodNode;var property;var computed;var args;var thisReference;var parent=path.parent;var node=path.node;if(isIllegalBareSuper(node,parent)){throw path.errorWithNode(messages.get("classesIllegalBareSuper"))}if(t.isCallExpression(node)){var callee=node.callee;if(t.isSuper(callee)){property=methodNode.key;computed=methodNode.computed;args=node.arguments;if(methodNode.key.name!=="constructor"||!this.inClass){var methodName=methodNode.key.name||"METHOD_NAME";throw this.file.errorWithNode(node,messages.get("classesIllegalSuperCall",methodName))}}else if(isMemberExpressionSuper(callee)){property=callee.property;computed=callee.computed;args=node.arguments}}else if(t.isMemberExpression(node)&&t.isSuper(node.object)){property=node.property;computed=node.computed}else if(t.isUpdateExpression(node)&&isMemberExpressionSuper(node.argument)){var binary=t.binaryExpression(node.operator[0],node.argument,t.literal(1));if(node.prefix){return this.specHandleAssignmentExpression(null,path,binary,getThisReference)}else{var ref=path.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(ref,path,binary,getThisReference).concat(t.expressionStatement(ref))}}else if(t.isAssignmentExpression(node)&&isMemberExpressionSuper(node.left)){return this.specHandleAssignmentExpression(null,path,node,getThisReference)}if(!property)return;thisReference=getThisReference();var superProperty=this.getSuperProperty(property,computed,thisReference);if(args){if(args.length===1&&t.isSpreadElement(args[0])){return t.callExpression(t.memberExpression(superProperty,t.identifier("apply")),[thisReference,args[0].argument])}else{return t.callExpression(t.memberExpression(superProperty,t.identifier("call")),[thisReference].concat(args))}}else{return superProperty}};return ReplaceSupers}();exports["default"]=ReplaceSupers;module.exports=exports["default"]},{"../../messages":48,"../../types":174,"./../../tools/protect.js":52}],73:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _pipeline=require("./pipeline");var _pipeline2=_interopRequireDefault(_pipeline);var _transformers=require("./transformers");var _transformers2=_interopRequireDefault(_transformers);var _transformersDeprecated=require("./transformers/deprecated");var _transformersDeprecated2=_interopRequireDefault(_transformersDeprecated);var _transformersAliases=require("./transformers/aliases");var _transformersAliases2=_interopRequireDefault(_transformersAliases);var _transformersFilters=require("./transformers/filters");var filters=_interopRequireWildcard(_transformersFilters);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var pipeline=new _pipeline2["default"];for(var key in _transformers2["default"]){var transformer=_transformers2["default"][key];if(typeof transformer==="object"){var metadata=transformer.metadata=transformer.metadata||{};metadata.group=metadata.group||"builtin-basic"}}pipeline.addTransformers(_transformers2["default"]);pipeline.addDeprecated(_transformersDeprecated2["default"]);pipeline.addAliases(_transformersAliases2["default"]);pipeline.addFilter(filters.internal);pipeline.addFilter(filters.blacklist);pipeline.addFilter(filters.whitelist);pipeline.addFilter(filters.stage);pipeline.addFilter(filters.optional);var transform=pipeline.transform.bind(pipeline);transform.fromAst=pipeline.transformFromAst.bind(pipeline);transform.pipeline=pipeline;exports["default"]=transform;module.exports=exports["default"]},{"./../tools/protect.js":52,"./pipeline":86,"./transformers":127,"./transformers/aliases":90,"./transformers/deprecated":91,"./transformers/filters":126}],74:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _libRemaps=require("./lib/remaps");var _libRemaps2=_interopRequireDefault(_libRemaps);var _lodashObjectExtend=require("lodash/object/extend");var _lodashObjectExtend2=_interopRequireDefault(_lodashObjectExtend);var _helpersObject=require("../../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _util=require("../../util");var util=_interopRequireWildcard(_util);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadataVisitor={ModuleDeclaration:{enter:function enter(node,parent,scope,formatter){if(node.source){node.source.value=formatter.file.resolveModuleSource(node.source.value);formatter.addScope(this)}}},ImportDeclaration:{exit:function exit(node,parent,scope,formatter){formatter.hasLocalImports=true;var specifiers=[];var imported=[];formatter.metadata.imports.push({source:node.source.value,imported:imported,specifiers:specifiers});var _arr=this.get("specifiers");for(var _i=0;_i<_arr.length;_i++){var specifier=_arr[_i];var ids=specifier.getBindingIdentifiers();_lodashObjectExtend2["default"](formatter.localImports,ids);var local=specifier.node.local.name;if(specifier.isImportDefaultSpecifier()){imported.push("default");specifiers.push({kind:"named",imported:"default",local:local})}if(specifier.isImportSpecifier()){var importedName=specifier.node.imported.name;imported.push(importedName);specifiers.push({kind:"named",imported:importedName,local:local})}if(specifier.isImportNamespaceSpecifier()){imported.push("*");specifiers.push({kind:"namespace",local:local})}}}},ExportDeclaration:function ExportDeclaration(node,parent,scope,formatter){formatter.hasLocalExports=true;var source=node.source?node.source.value:null;var exports=formatter.metadata.exports;var declar=this.get("declaration");if(declar.isStatement()){var bindings=declar.getBindingIdentifiers();for(var name in bindings){var binding=bindings[name];formatter._addExport(name,binding);exports.exported.push(name);exports.specifiers.push({kind:"local",local:name,exported:this.isExportDefaultDeclaration()?"default":name})}}if(this.isExportNamedDeclaration()&&node.specifiers){var _arr2=node.specifiers;for(var _i2=0;_i2<_arr2.length;_i2++){var specifier=_arr2[_i2];var exported=specifier.exported.name;exports.exported.push(exported);if(t.isExportDefaultSpecifier(specifier)){exports.specifiers.push({kind:"external",local:exported,exported:exported,source:source})}if(t.isExportNamespaceSpecifier(specifier)){exports.specifiers.push({kind:"external-namespace",exported:exported,source:source})}var local=specifier.local;if(!local)continue;formatter._addExport(local.name,specifier.exported);if(source){exports.specifiers.push({kind:"external",local:local.name,exported:exported,source:source})}if(!source){exports.specifiers.push({kind:"local",local:local.name,exported:exported})}}}if(this.isExportAllDeclaration()){exports.specifiers.push({kind:"external-all",source:source})}if(!t.isExportDefaultDeclaration(node)&&!declar.isTypeAlias()){var onlyDefault=node.specifiers&&node.specifiers.length===1&&t.isSpecifierDefault(node.specifiers[0]);if(!onlyDefault){formatter.hasNonDefaultExports=true}}},Scope:function Scope(node,parent,scope,formatter){if(!formatter.isLoose()){this.skip()}}};var DefaultFormatter=function(){function DefaultFormatter(file){_classCallCheck(this,DefaultFormatter);this.sourceScopes=_helpersObject2["default"]();this.defaultIds=_helpersObject2["default"]();this.ids=_helpersObject2["default"]();this.remaps=new _libRemaps2["default"](file,this);this.scope=file.scope;this.file=file;this.hasNonDefaultExports=false;this.hasLocalExports=false;this.hasLocalImports=false;this.localExports=_helpersObject2["default"]();this.localImports=_helpersObject2["default"]();this.metadata=file.metadata.modules;this.getMetadata()}DefaultFormatter.prototype.addScope=function addScope(path){var source=path.node.source&&path.node.source.value;if(!source)return;var existingScope=this.sourceScopes[source];if(existingScope&&existingScope!==path.scope){throw path.errorWithNode(messages.get("modulesDuplicateDeclarations"))}this.sourceScopes[source]=path.scope};DefaultFormatter.prototype.isModuleType=function isModuleType(node,type){var modules=this.file.dynamicImportTypes[type];return modules&&modules.indexOf(node)>=0};DefaultFormatter.prototype.transform=function transform(){this.remapAssignments()};DefaultFormatter.prototype.doDefaultExportInterop=function doDefaultExportInterop(node){return(t.isExportDefaultDeclaration(node)||t.isSpecifierDefault(node))&&!this.noInteropRequireExport&&!this.hasNonDefaultExports};DefaultFormatter.prototype.getMetadata=function getMetadata(){var has=false;var _arr3=this.file.ast.program.body;for(var _i3=0;_i3<_arr3.length;_i3++){var node=_arr3[_i3];if(t.isModuleDeclaration(node)){has=true;break}}if(has||this.isLoose()){this.file.path.traverse(metadataVisitor,this)}};DefaultFormatter.prototype.remapAssignments=function remapAssignments(){if(this.hasLocalExports||this.hasLocalImports){this.remaps.run()}};DefaultFormatter.prototype.remapExportAssignment=function remapExportAssignment(node,exported){var assign=node;for(var i=0;i=0){return}loopText=loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(state.inSwitchCase)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(this.isReturnStatement()){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);this.skip();return t.inherits(replace,node)}}};var BlockScoping=function(){function BlockScoping(loopPath,blockPath,parent,scope,file){_classCallCheck(this,BlockScoping);this.parent=parent;this.scope=scope;this.file=file;this.blockPath=blockPath;this.block=blockPath.node;this.outsideLetReferences=_helpersObject2["default"]();this.hasLetReferences=false;this.letReferences=this.block._letReferences=_helpersObject2["default"]();this.body=[];if(loopPath){this.loopParent=loopPath.parent;this.loopLabel=t.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=loopPath;this.loop=loopPath.node}}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}if(this.loopLabel&&!t.isLabeledStatement(this.loopParent)){return t.labeledStatement(this.loopLabel,this.loop)}};BlockScoping.prototype.remap=function remap(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=_helpersObject2["default"]();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loop=this.loop;if(loop){traverseReplace(loop.right,loop,scope,remaps);traverseReplace(loop.test,loop,scope,remaps);traverseReplace(loop.update,loop,scope,remaps)}this.blockPath.traverse(replaceVisitor,remaps)};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loop){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=_lodashObjectValues2["default"](outsideRefs);var args=_lodashObjectValues2["default"](outsideRefs);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn.shadow=true;this.addContinuations(fn);block.body=this.body;var ref=fn;if(this.loop){ref=this.scope.generateUidIdentifier("loop");this.loopPath.insertBefore(t.variableDeclaration("var",[t.variableDeclarator(ref,fn)]))}var call=t.callExpression(ref,args);var ret=this.scope.generateUidIdentifier("ret");var hasYield=_traversal2["default"].hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=_traversal2["default"].hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call)}this.buildClosure(ret,call)};BlockScoping.prototype.buildClosure=function buildClosure(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.addContinuations=function addContinuations(fn){var state={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(fn,continuationVisitor,state);for(var i=0;i=spreadPropIndex)break;if(t.isSpreadProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key)&&!prop.computed)key=t.literal(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef)}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[objRef])))}if(pattern.properties.length>1&&t.isMemberExpression(objRef)){var temp=this.scope.generateUidIdentifierBasedOnNode(objRef,this.file);this.nodes.push(this.buildVariableDeclaration(temp,objRef));objRef=temp}for(var i=0;iarr.elements.length)return;if(pattern.elements.length0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.literal(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)){var memo=this.scope.maybeGenerateMemoised(ref,true);if(memo){this.nodes.push(this.buildVariableDeclaration(memo,ref));ref=memo}}this.push(pattern,ref);return this.nodes};return DestructuringTransformer}()},{"../../../messages":48,"../../../types":174,"./../../../tools/protect.js":52}],100:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports._ForOfStatementArray=_ForOfStatementArray;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _messages=require("../../../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var visitor={ForOfStatement:function ForOfStatement(node,parent,scope,file){if(this.get("right").isArrayExpression()){return _ForOfStatementArray.call(this,node,scope,file)}var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,file);var declar=build.declar;var loop=build.loop;var block=loop.body;this.ensureBlock();if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);t.inherits(loop.body,node.body);if(build.replaceParent){this.parentPath.replaceWithMultiple(build.node);this.dangerouslyRemove()}else{return build.node}}};exports.visitor=visitor;function _ForOfStatementArray(node,scope,file){var nodes=[];var right=node.right;if(!t.isIdentifier(right)||!scope.hasBinding(right.name)){var uid=scope.generateUidIdentifier("arr");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,right)]));right=uid}var iterationKey=scope.generateUidIdentifier("i");var loop=util.template("for-of-array",{BODY:node.body,KEY:iterationKey,ARR:right});t.inherits(loop,node);t.ensureBlock(loop);var iterationValue=t.memberExpression(right,iterationKey,true);var left=node.left;if(t.isVariableDeclaration(left)){left.declarations[0].init=iterationValue;loop.body.body.unshift(left)}else{loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=",left,iterationValue)))}if(this.parentPath.isLabeledStatement()){loop=t.labeledStatement(this.parentPath.node.label,loop)}nodes.push(loop);return nodes}var loose=function loose(node,parent,scope,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=util.template("for-of-loose",{LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,node:loop,loop:loop}};var spec=function spec(node,parent,scope,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=util.template("for-of",{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}}},{"../../../messages":48,"../../../types":174,"../../../util":178,"./../../../tools/protect.js":52}],101:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function keepBlockHoist(node,nodes){if(node._blockHoist){for(var i=0;ilastNonDefaultParam}var lastNonDefaultParam=_helpersGetFunctionArity2["default"](node);var params=this.get("params");for(var i=0;i",len,start),t.binaryExpression("-",len,start),t.literal(0))}var loop=util.template("rest",{ARRAY_TYPE:restParam.typeAnnotation,ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});if(state.deopted){loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}else{loop._blockHoist=1;this.getEarliestCommonAncestorFrom(state.references).getStatementParent().insertBefore(loop)}}};exports.visitor=visitor},{"../../../../types":174,"../../../../util":178,"./../../../../tools/protect.js":52}],106:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function loose(node,body,objId){var _arr=node.properties;for(var _i=0;_i<_arr.length;_i++){var prop=_arr[_i];body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(objId,prop.key,prop.computed||t.isLiteral(prop.key)),prop.value)))}}function spec(node,body,objId,initProps,file){var _arr2=node.properties;for(var _i2=0;_i2<_arr2.length;_i2++){var prop=_arr2[_i2];if(t.isLiteral(t.toComputedKey(prop),{value:"__proto__"})){initProps.push(prop);continue}var key=prop.key;if(t.isIdentifier(key)&&!prop.computed){key=t.literal(key.name)}var bodyNode=t.callExpression(file.addHelper("define-property"),[objId,key,prop.value]);body.push(t.expressionStatement(bodyNode))}if(body.length===1){var first=body[0].expression;if(t.isCallExpression(first)){first.arguments[0]=t.objectExpression(initProps);return first}}}var visitor={ObjectExpression:{exit:function exit(node,parent,scope,file){var hasComputed=false;var _arr3=node.properties;for(var _i3=0;_i3<_arr3.length;_i3++){var prop=_arr3[_i3];hasComputed=t.isProperty(prop,{computed:true,kind:"init"});if(hasComputed)break}if(!hasComputed)return;var initProps=[];var stopInits=false;node.properties=node.properties.filter(function(prop){if(prop.computed){stopInits=true}if(prop.kind!=="init"||!stopInits){initProps.push(prop);return false}else{return true}});var objId=scope.generateUidIdentifierBasedOnNode(parent);var body=[];var callback=spec;if(file.isLoose("es6.properties.computed"))callback=loose;var result=callback(node,body,objId,initProps,file);if(result)return result;body.unshift(t.variableDeclaration("var",[t.variableDeclarator(objId,t.objectExpression(initProps))]));body.push(t.expressionStatement(objId));return body}}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],107:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var visitor={Property:function Property(node){if(node.method){node.method=false}if(node.shorthand){node.shorthand=false}}};exports.visitor=visitor},{"./../../../tools/protect.js":52}],108:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersRegex=require("../../helpers/regex");var regex=_interopRequireWildcard(_helpersRegex);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var visitor={Literal:function Literal(node){if(!regex.is(node,"y"))return;return t.newExpression(t.identifier("RegExp"),[t.literal(node.regex.pattern),t.literal(node.regex.flags)])}};exports.visitor=visitor},{"../../../types":174,"../../helpers/regex":70,"./../../../tools/protect.js":52}],109:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _regexpuRewritePattern=require("regexpu/rewrite-pattern");var _regexpuRewritePattern2=_interopRequireDefault(_regexpuRewritePattern);var _helpersRegex=require("../../helpers/regex");var regex=_interopRequireWildcard(_helpersRegex);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var visitor={Literal:function Literal(node){if(!regex.is(node,"u"))return;node.regex.pattern=_regexpuRewritePattern2["default"](node.regex.pattern,node.regex.flags);regex.pullFlag(node,"u")}};exports.visitor=visitor},{"../../helpers/regex":70,"./../../../tools/protect.js":52,"regexpu/rewrite-pattern":524}],110:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function buildAssert(node,file){return t.callExpression(file.addHelper("temporal-assert-defined"),[node,t.literal(node.name),file.addHelper("temporal-undefined")])}function references(node,scope,state){var declared=state.letRefs[node.name];if(!declared)return false;return scope.getBindingIdentifier(node.name)===declared}var refVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){if(t.isFor(parent)&&parent.left===node)return;if(!references(node,scope,state))return;var assert=buildAssert(node,state.file);this.skip();if(t.isUpdateExpression(parent)){if(parent._ignoreBlockScopingTDZ)return;this.parentPath.replaceWith(t.sequenceExpression([assert,parent]))}else{return t.logicalExpression("&&",assert,node)}},AssignmentExpression:{exit:function exit(node,parent,scope,state){if(node._ignoreBlockScopingTDZ)return;var nodes=[];var ids=this.getBindingIdentifiers();for(var name in ids){var id=ids[name];if(references(id,scope,state)){nodes.push(buildAssert(id,state.file))}}if(nodes.length){node._ignoreBlockScopingTDZ=true;nodes.push(node);return nodes.map(t.expressionStatement)}}}};var metadata={optional:true,group:"builtin-advanced"};exports.metadata=metadata;var visitor={"Program|Loop|BlockStatement":{exit:function exit(node,parent,scope,file){var letRefs=node._letReferences;if(!letRefs)return;this.traverse(refVisitor,{letRefs:letRefs,file:file})}}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],111:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={optional:true};exports.metadata=metadata;var visitor={UnaryExpression:function UnaryExpression(node,parent,scope,file){if(node._ignoreSpecSymbols)return;if(node.operator==="typeof"){var call=t.callExpression(file.addHelper("typeof"),[node.argument]);if(this.get("argument").isIdentifier()){var undefLiteral=t.literal("undefined");var unary=t.unaryExpression("typeof",node.argument);unary._ignoreSpecSymbols=true;return t.conditionalExpression(t.binaryExpression("===",unary,undefLiteral),undefLiteral,call)}else{return call}}},BinaryExpression:function BinaryExpression(node,parent,scope,file){ -if(node.operator==="instanceof"){return t.callExpression(file.addHelper("instanceof"),[node.left,node.right])}},"VariableDeclaration|FunctionDeclaration":function VariableDeclarationFunctionDeclaration(node){if(node._generated)this.skip()}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],112:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={optional:true,group:"builtin-pre"};exports.metadata=metadata;var visitor={TemplateLiteral:function TemplateLiteral(node,parent){if(t.isTaggedTemplateExpression(parent))return;for(var i=0;i0){var declarations=_lodashArrayFlatten2["default"](_lodashCollectionMap2["default"](this.vars,function(decl){return decl.declarations}));var assignment=_lodashCollectionReduceRight2["default"](declarations,function(expr,decl){return t.assignmentExpression("=",decl.id,expr)},t.identifier("undefined"));var statement=t.expressionStatement(assignment);statement._blockHoist=Infinity;body.unshift(statement)}var paramDecls=this.paramDecls;if(paramDecls.length>0){var paramDecl=t.variableDeclaration("var",paramDecls);paramDecl._blockHoist=Infinity;body.unshift(paramDecl)}body.unshift(t.expressionStatement(t.assignmentExpression("=",this.getAgainId(),t.literal(false))));node.body=util.template("tail-call-body",{FUNCTION_ID:this.getFunctionId(),AGAIN_ID:this.getAgainId(),BLOCK:node.body});var topVars=[];if(this.needsThis){var _arr=this.thisPaths;for(var _i=0;_i<_arr.length;_i++){var path=_arr[_i];path.replaceWith(this.getThisId())}topVars.push(t.variableDeclarator(this.getThisId(),t.thisExpression()))}if(this.needsArguments||this.setsArguments){var _arr2=this.argumentsPaths;for(var _i2=0;_i2<_arr2.length;_i2++){var _path=_arr2[_i2];_path.replaceWith(this.argumentsId)}var decl=t.variableDeclarator(this.argumentsId);if(this.argumentsId){decl.init=t.identifier("arguments");decl.init._shadowedFunctionLiteral=this.path}topVars.push(decl)}var leftId=this.leftId;if(leftId){topVars.push(t.variableDeclarator(leftId))}if(topVars.length>0){node.body.body.unshift(t.variableDeclaration("var",topVars))}};TailCallTransformer.prototype.subTransform=function subTransform(node){if(!node)return;var handler=this["subTransform"+node.type];if(handler)return handler.call(this,node)};TailCallTransformer.prototype.subTransformConditionalExpression=function subTransformConditionalExpression(node){var callConsequent=this.subTransform(node.consequent);var callAlternate=this.subTransform(node.alternate);if(!callConsequent&&!callAlternate){return}node.type="IfStatement";node.consequent=callConsequent?t.toBlock(callConsequent):returnBlock(node.consequent);if(callAlternate){node.alternate=t.isIfStatement(callAlternate)?callAlternate:t.toBlock(callAlternate)}else{node.alternate=returnBlock(node.alternate)}return[node]};TailCallTransformer.prototype.subTransformLogicalExpression=function subTransformLogicalExpression(node){var callRight=this.subTransform(node.right);if(!callRight)return;var leftId=this.getLeftId();var testExpr=t.assignmentExpression("=",leftId,node.left);if(node.operator==="&&"){testExpr=t.unaryExpression("!",testExpr)}return[t.ifStatement(testExpr,returnBlock(leftId))].concat(callRight)};TailCallTransformer.prototype.subTransformSequenceExpression=function subTransformSequenceExpression(node){var seq=node.expressions;var lastCall=this.subTransform(seq[seq.length-1]);if(!lastCall){return}if(--seq.length===1){node=seq[0]}return[t.expressionStatement(node)].concat(lastCall)};TailCallTransformer.prototype.subTransformCallExpression=function subTransformCallExpression(node){var callee=node.callee;var thisBinding,args;if(t.isMemberExpression(callee,{computed:false})&&t.isIdentifier(callee.property)){switch(callee.property.name){case"call":args=t.arrayExpression(node.arguments.slice(1));break;case"apply":args=node.arguments[1]||t.identifier("undefined");this.needsArguments=true;break;default:return}thisBinding=node.arguments[0];callee=callee.object}if(!t.isIdentifier(callee)||!this.scope.bindingIdentifierEquals(callee.name,this.ownerId)){return}this.hasTailRecursion=true;if(this.hasDeopt())return;var body=[];if(this.needsThis&&!t.isThisExpression(thisBinding)){body.push(t.expressionStatement(t.assignmentExpression("=",this.getThisId(),thisBinding||t.identifier("undefined"))))}if(!args){args=t.arrayExpression(node.arguments)}if(t.isArrayExpression(args)&&args.elements.length>this.node.params.length){this.needsArguments=true}var argumentsId=this.getArgumentsId();var params=this.getParams();if(this.needsArguments){body.push(t.expressionStatement(t.assignmentExpression("=",argumentsId,args)))}if(t.isArrayExpression(args)){var elems=args.elements;for(var i=0;i1){nodes=nodes.filter(function(n){return!t.isLiteral(n,{value:""})});if(nodes.length===1&&isString(nodes[0])){return nodes[0]}if(!isString(nodes[0])&&!isString(nodes[1])){nodes.unshift(t.literal(""))}var root=buildBinaryExpression(nodes.shift(),nodes.shift());var _arr3=nodes;for(var _i3=0;_i3<_arr3.length;_i3++){var _node=_arr3[_i3];root=buildBinaryExpression(root,_node)}this.replaceWith(root)}else{return nodes[0]}}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],116:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={stage:1};exports.metadata=metadata},{"./../../../tools/protect.js":52}],117:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={stage:0,dependencies:["es6.classes"]};exports.metadata=metadata},{"./../../../tools/protect.js":52}],118:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersBuildComprehension=require("../../helpers/build-comprehension");var _helpersBuildComprehension2=_interopRequireDefault(_helpersBuildComprehension);var _traversal=require("../../../traversal");var _traversal2=_interopRequireDefault(_traversal);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={stage:0};exports.metadata=metadata;var visitor={ComprehensionExpression:function ComprehensionExpression(node,parent,scope){var callback=array;if(node.generator)callback=generator;return callback(node,parent,scope)}};exports.visitor=visitor;function generator(node){var body=[];var container=t.functionExpression(null,[],t.blockStatement(body),true);container.shadow=true;body.push(_helpersBuildComprehension2["default"](node,function(){return t.expressionStatement(t.yieldExpression(node.body))}));return t.callExpression(container,[])}function array(node,parent,scope){var uid=scope.generateUidIdentifierBasedOnNode(parent);var container=util.template("array-comprehension-container",{KEY:uid});container.callee.shadow=true;var block=container.callee.body;var body=block.body;if(_traversal2["default"].hasType(node,scope,"YieldExpression",t.FUNCTION_TYPES)){container.callee.generator=true;container=t.yieldExpression(container,true)}var returnStatement=body.pop();body.push(_helpersBuildComprehension2["default"](node,function(){return util.template("array-push",{STATEMENT:node.body,KEY:uid},true)}));body.push(returnStatement);return container}},{"../../../traversal":149,"../../../types":174,"../../../util":178,"../../helpers/build-comprehension":61,"./../../../tools/protect.js":52}],119:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersMemoiseDecorators=require("../../helpers/memoise-decorators");var _helpersMemoiseDecorators2=_interopRequireDefault(_helpersMemoiseDecorators);var _helpersDefineMap=require("../../helpers/define-map");var defineMap=_interopRequireWildcard(_helpersDefineMap);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={dependencies:["es6.classes"],optional:true,stage:1};exports.metadata=metadata;var visitor={ObjectExpression:function ObjectExpression(node,parent,scope,file){var hasDecorators=false;for(var i=0;i=1){nodes.push(node)}return nodes}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],123:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={optional:true,stage:0};exports.metadata=metadata;function getTempId(scope){var id=scope.path.getData("functionBind");if(id)return id;id=scope.generateDeclaredUidIdentifier("context");return scope.path.setData("functionBind",id)}function getStaticContext(bind,scope){var object=bind.object||bind.callee.object;return scope.isStatic(object)&&object}function inferBindContext(bind,scope){var staticContext=getStaticContext(bind,scope);if(staticContext)return staticContext;var tempId=getTempId(scope);if(bind.object){bind.callee=t.sequenceExpression([t.assignmentExpression("=",tempId,bind.object),bind.callee])}else{bind.callee.object=t.assignmentExpression("=",tempId,bind.callee.object)}return tempId}var visitor={CallExpression:function CallExpression(node,parent,scope){var bind=node.callee;if(!t.isBindExpression(bind))return;var context=inferBindContext(bind,scope);node.callee=t.memberExpression(bind.callee,t.identifier("call"));node.arguments.unshift(context)},BindExpression:function BindExpression(node,parent,scope){var context=inferBindContext(node,scope);return t.callExpression(t.memberExpression(node.callee,t.identifier("bind")),[context])}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],124:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={stage:1,dependencies:["es6.destructuring"]};exports.metadata=metadata;var hasSpread=function hasSpread(node){for(var i=0;i=opts.stage)return true}function optional(transformer,opts){if(transformer.metadata.optional&&!_lodashCollectionIncludes2["default"](opts.optional,transformer.key))return false}},{"./../../tools/protect.js":52,"lodash/collection/includes":369}],127:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]={"minification.constantFolding":require("babel-plugin-constant-folding"),strict:require("./other/strict"),eval:require("babel-plugin-eval"),_explode:require("./internal/explode"),_validation:require("./internal/validation"),_hoistDirectives:require("./internal/hoist-directives"),"minification.removeDebugger":require("babel-plugin-remove-debugger"),"minification.removeConsole":require("babel-plugin-remove-console"),"utility.inlineEnvironmentVariables":require("babel-plugin-inline-environment-variables"),"minification.deadCodeElimination":require("babel-plugin-dead-code-elimination"),_modules:require("./internal/modules"),"react.displayName":require("babel-plugin-react-display-name"),"es6.spec.templateLiterals":require("./es6/spec.template-literals"),"es6.templateLiterals":require("./es6/template-literals"),"validation.undeclaredVariableCheck":require("babel-plugin-undeclared-variables-check"),"spec.functionName":require("./spec/function-name"),"es7.classProperties":require("./es7/class-properties"),"es7.trailingFunctionCommas":require("./es7/trailing-function-commas"),"es7.asyncFunctions":require("./es7/async-functions"),"es7.decorators":require("./es7/decorators"),"validation.react":require("./validation/react"),"es6.arrowFunctions":require("./es6/arrow-functions"),"spec.blockScopedFunctions":require("./spec/block-scoped-functions"),"optimisation.react.constantElements":require("babel-plugin-react-constant-elements"), -"optimisation.react.inlineElements":require("./optimisation/react.inline-elements"),"es7.comprehensions":require("./es7/comprehensions"),"es6.classes":require("./es6/classes"),asyncToGenerator:require("./other/async-to-generator"),bluebirdCoroutines:require("./other/bluebird-coroutines"),"es6.objectSuper":require("./es6/object-super"),"es7.objectRestSpread":require("./es7/object-rest-spread"),"es7.exponentiationOperator":require("./es7/exponentiation-operator"),"es5.properties.mutators":require("./es5/properties.mutators"),"es6.properties.shorthand":require("./es6/properties.shorthand"),"es6.properties.computed":require("./es6/properties.computed"),"optimisation.flow.forOf":require("./optimisation/flow.for-of"),"es6.forOf":require("./es6/for-of"),"es6.regex.sticky":require("./es6/regex.sticky"),"es6.regex.unicode":require("./es6/regex.unicode"),"es6.constants":require("./es6/constants"),"es7.exportExtensions":require("./es7/export-extensions"),"spec.protoToAssign":require("babel-plugin-proto-to-assign"),"es7.doExpressions":require("./es7/do-expressions"),"es6.spec.symbols":require("./es6/spec.symbols"),"es7.functionBind":require("./es7/function-bind"),"spec.undefinedToVoid":require("babel-plugin-undefined-to-void"),"es6.spread":require("./es6/spread"),"es6.parameters":require("./es6/parameters"),"es6.destructuring":require("./es6/destructuring"),"es6.blockScoping":require("./es6/block-scoping"),"es6.spec.blockScoping":require("./es6/spec.block-scoping"),reactCompat:require("./other/react-compat"),react:require("./other/react"),regenerator:require("./other/regenerator"),runtime:require("babel-plugin-runtime"),"es6.modules":require("./es6/modules"),_moduleFormatter:require("./internal/module-formatter"),"es6.tailCall":require("./es6/tail-call"),_shadowFunctions:require("./internal/shadow-functions"),"es3.propertyLiterals":require("./es3/property-literals"),"es3.memberExpressionLiterals":require("./es3/member-expression-literals"),"minification.memberExpressionLiterals":require("babel-plugin-member-expression-literals"),"minification.propertyLiterals":require("babel-plugin-property-literals"),_blockHoist:require("./internal/block-hoist"),jscript:require("babel-plugin-jscript"),flow:require("./other/flow")};module.exports=exports["default"]},{"./../../tools/protect.js":52,"./es3/member-expression-literals":92,"./es3/property-literals":93,"./es5/properties.mutators":94,"./es6/arrow-functions":95,"./es6/block-scoping":96,"./es6/classes":97,"./es6/constants":98,"./es6/destructuring":99,"./es6/for-of":100,"./es6/modules":101,"./es6/object-super":102,"./es6/parameters":104,"./es6/properties.computed":106,"./es6/properties.shorthand":107,"./es6/regex.sticky":108,"./es6/regex.unicode":109,"./es6/spec.block-scoping":110,"./es6/spec.symbols":111,"./es6/spec.template-literals":112,"./es6/spread":113,"./es6/tail-call":114,"./es6/template-literals":115,"./es7/async-functions":116,"./es7/class-properties":117,"./es7/comprehensions":118,"./es7/decorators":119,"./es7/do-expressions":120,"./es7/exponentiation-operator":121,"./es7/export-extensions":122,"./es7/function-bind":123,"./es7/object-rest-spread":124,"./es7/trailing-function-commas":125,"./internal/block-hoist":128,"./internal/explode":129,"./internal/hoist-directives":130,"./internal/module-formatter":131,"./internal/modules":132,"./internal/shadow-functions":133,"./internal/validation":134,"./optimisation/flow.for-of":135,"./optimisation/react.inline-elements":136,"./other/async-to-generator":137,"./other/bluebird-coroutines":138,"./other/flow":139,"./other/react":141,"./other/react-compat":140,"./other/regenerator":142,"./other/strict":143,"./spec/block-scoped-functions":144,"./spec/function-name":145,"./validation/react":146,"babel-plugin-constant-folding":195,"babel-plugin-dead-code-elimination":196,"babel-plugin-eval":197,"babel-plugin-inline-environment-variables":198,"babel-plugin-jscript":199,"babel-plugin-member-expression-literals":200,"babel-plugin-property-literals":201,"babel-plugin-proto-to-assign":202,"babel-plugin-react-constant-elements":203,"babel-plugin-react-display-name":204,"babel-plugin-remove-console":205,"babel-plugin-remove-debugger":206,"babel-plugin-runtime":208,"babel-plugin-undeclared-variables-check":209,"babel-plugin-undefined-to-void":211}],128:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;var _lodashCollectionSortBy=require("lodash/collection/sortBy");var _lodashCollectionSortBy2=_interopRequireDefault(_lodashCollectionSortBy);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={group:"builtin-trailing"};exports.metadata=metadata;var visitor={Block:{exit:function exit(node){var hasChange=false;for(var i=0;i0){nodePath=nodePath.get(keysAlongPath.pop())}return nodePath}},{"../../../types":174,"./../../../tools/protect.js":52,"ast-types":194,regenerator:491}],143:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={group:"builtin-pre"};exports.metadata=metadata;var THIS_BREAK_KEYS=["FunctionExpression","FunctionDeclaration","ClassExpression","ClassDeclaration"];var visitor={Program:{enter:function enter(program){var first=program.body[0];var directive;if(t.isExpressionStatement(first)&&t.isLiteral(first.expression,{value:"use strict"})){directive=first}else{directive=t.expressionStatement(t.literal("use strict"));this.unshiftContainer("body",directive);if(first){directive.leadingComments=first.leadingComments;first.leadingComments=[]}}directive._blockHoist=Infinity}},ThisExpression:function ThisExpression(){if(!this.findParent(function(path){return!path.is("shadow")&&THIS_BREAK_KEYS.indexOf(path.type)>=0})){return t.identifier("undefined")}}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],144:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function statementList(key,path){var paths=path.get(key);for(var i=0;i=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}}var _arr3=queue;for(var _i3=0;_i3<_arr3.length;_i3++){var path=_arr3[_i3];path.shiftContext()}this.queue=null;return stop};TraversalContext.prototype.visitSingle=function visitSingle(node,key){if(this.shouldVisit(node[key])){var path=this.create(node,node,key);path.visit();path.shiftContext()}};TraversalContext.prototype.visit=function visit(node,key){var nodes=node[key];if(!nodes)return;if(Array.isArray(nodes)){return this.visitMultiple(nodes,node,key)}else{return this.visitSingle(node,key)}};return TraversalContext}();exports["default"]=TraversalContext;module.exports=exports["default"]},{"../types":174,"./../tools/protect.js":52,"./path":156}],148:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var Hub=function Hub(file){_classCallCheck(this,Hub);this.file=file};exports["default"]=Hub;module.exports=exports["default"]},{"./../tools/protect.js":52}],149:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports["default"]=traverse;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _context=require("./context");var _context2=_interopRequireDefault(_context);var _visitors=require("./visitors");var visitors=_interopRequireWildcard(_visitors);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _types=require("../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function traverse(parent,opts,scope,state,parentPath){if(!parent)return;if(!opts.noScope&&!scope){if(parent.type!=="Program"&&parent.type!=="File"){throw new Error(messages.get("traverseNeedsParent",parent.type))}}if(!opts)opts={};visitors.explode(opts);if(Array.isArray(parent)){for(var i=0;icurrentKeyIndex){earliest=path}}return earliest})}function getDeepestCommonAncestorFrom(paths,filter){var _this=this;if(!paths.length){return this}if(paths.length===1){return paths[0]}var minDepth=Infinity;var lastCommonIndex,lastCommon;var ancestries=paths.map(function(path){var ancestry=[];do{ancestry.unshift(path)}while((path=path.parentPath)&&path!==_this);if(ancestry.length-1}function visit(){if(this.isBlacklisted())return false;if(this.opts.shouldSkip&&this.opts.shouldSkip(this))return false;this.call("enter");if(this.shouldSkip){return this.shouldStop}var node=this.node;var opts=this.opts;if(node){if(Array.isArray(node)){for(var i=0;i":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right}}if(path.isCallExpression()){var callee=path.get("callee");var context;var func;if(callee.isIdentifier()&&!path.scope.getBinding(callee.node.name,true)&&VALID_CALLEES.indexOf(callee.node.name)>=0){func=global[node.callee.name]}if(callee.isMemberExpression()){var object=callee.get("object");var property=callee.get("property");if(object.isIdentifier()&&property.isIdentifier()&&VALID_CALLEES.indexOf(object.node.name)>=0){context=global[object.node.name];func=context[property.node.name]}if(object.isLiteral()&&property.isIdentifier()){var type=typeof object.node.value;if(type==="string"||type==="number"){context=object.node.value;func=context[property.node.name]}}}if(func){var args=path.get("arguments").map(evaluate);if(!confident)return;return func.apply(context,args)}}confident=false}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./../../tools/protect.js":52}],155:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.getStatementParent=getStatementParent;exports.getOpposite=getOpposite;exports.getCompletionRecords=getCompletionRecords;exports.getSibling=getSibling;exports.get=get;exports._getKey=_getKey;exports._getPattern=_getPattern;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function getStatementParent(){var path=this;do{if(!path.parentPath||Array.isArray(path.container)&&path.isStatement()){break}else{path=path.parentPath}}while(path);if(path&&(path.isProgram()||path.isFile())){throw new Error("File/Program node, we can't possibly find a statement parent to this")}return path}function getOpposite(){if(this.key==="left"){return this.getSibling("right")}else if(this.key==="right"){return this.getSibling("left")}}function getCompletionRecords(){var paths=[];var add=function add(path){if(path)paths=paths.concat(path.getCompletionRecords())};if(this.isIfStatement()){add(this.get("consequent"));add(this.get("alternate"))}else if(this.isDoExpression()||this.isFor()||this.isWhile()){add(this.get("body"))}else if(this.isProgram()||this.isBlockStatement()){add(this.get("body").pop())}else if(this.isFunction()){return this.get("body").getCompletionRecords()}else{paths.push(this)}return paths}function getSibling(key){return _index2["default"].get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:key})}function get(key){var parts=key.split(".");if(parts.length===1){return this._getKey(key)}else{return this._getPattern(parts)}}function _getKey(key){var _this=this;var node=this.node;var container=node[key];if(Array.isArray(container)){return container.map(function(_,i){return _index2["default"].get({listKey:key,parentPath:_this,parent:node,container:container,key:i}).setContext()})}else{return _index2["default"].get({parentPath:this,parent:node,container:node,key:key}).setContext()}}function _getPattern(parts){var path=this;var _arr=parts;for(var _i=0;_i<_arr.length;_i++){var part=_arr[_i];if(part==="."){path=path.parentPath}else{if(Array.isArray(path)){path=path[part]}else{path=path.get(part)}}}return path}function getBindingIdentifiers(){return t.getBindingIdentifiers(this.node)}},{"../../types":174,"./../../tools/protect.js":52,"./index":156}],156:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _libVirtualTypes=require("./lib/virtual-types");var virtualTypes=_interopRequireWildcard(_libVirtualTypes);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _lodashObjectAssign=require("lodash/object/assign");var _lodashObjectAssign2=_interopRequireDefault(_lodashObjectAssign);var _scope=require("../scope");var _scope2=_interopRequireDefault(_scope);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var NodePath=function(){function NodePath(hub,parent){_classCallCheck(this,NodePath);this.contexts=[];this.parent=parent;this.data={};this.hub=hub;this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.state=null;this.opts=null;this.skipKeys=null;this.parentPath=null;this.context=null;this.container=null;this.listKey=null;this.inList=false;this.parentKey=null;this.key=null;this.node=null;this.scope=null;this.type=null;this.typeAnnotation=null}NodePath.get=function get(_ref){var hub=_ref.hub;var parentPath=_ref.parentPath;var parent=_ref.parent;var container=_ref.container;var listKey=_ref.listKey;var key=_ref.key;if(!hub&&parentPath){hub=parentPath.hub}var targetNode=container[key];var paths=parent._paths=parent._paths||[];var path;for(var i=0;i=0)continue;visitedScopes.push(violationScope);constantViolations.push(violation);if(violationScope===path.scope){constantViolations=[violation];break}}constantViolations=constantViolations.concat(functionConstantViolations);var _arr2=constantViolations;for(var _i2=0;_i2<_arr2.length;_i2++){var violation=_arr2[_i2];types.push(violation.getTypeAnnotation())}}if(types.length){return t.createUnionTypeAnnotation(types)}}function getConstantViolationsBefore(binding,path,functions){var violations=binding.constantViolations.slice();violations.unshift(binding.path);return violations.filter(function(violation){violation=violation.resolve();var status=violation._guessExecutionStatusRelativeTo(path);if(functions&&status==="function")functions.push(violation);return status==="before"})}function inferAnnotationFromBinaryExpression(name,path){ -var operator=path.node.operator;var right=path.get("right").resolve();var left=path.get("left").resolve();var target;if(left.isIdentifier({name:name})){target=right}else if(right.isIdentifier({name:name})){target=left}if(target){if(operator==="==="){return target.getTypeAnnotation()}else if(t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else{return}}else{if(operator!=="===")return}var typeofPath;var typePath;if(left.isUnaryExpression({operator:"typeof"})){typeofPath=left;typePath=right}else if(right.isUnaryExpression({operator:"typeof"})){typeofPath=right;typePath=left}if(!typePath&&!typeofPath)return;typePath=typePath.resolve();if(!typePath.isLiteral())return;var typeValue=typePath.node.value;if(typeof typeValue!=="string")return;if(!typeofPath.get("argument").isIdentifier({name:name}))return;return t.createTypeAnnotationBasedOnTypeof(typePath.node.value)}function getParentConditionalPath(path){var parentPath;while(parentPath=path.parentPath){if(parentPath.isIfStatement()||parentPath.isConditionalExpression()){if(path.key==="test"){return}else{return parentPath}}else{path=parentPath}}}function getConditionalAnnotation(path,name){var ifStatement=getParentConditionalPath(path);if(!ifStatement)return;var test=ifStatement.get("test");var paths=[test];var types=[];do{var _path=paths.shift().resolve();if(_path.isLogicalExpression()){paths.push(_path.get("left"));paths.push(_path.get("right"))}if(_path.isBinaryExpression()){var type=inferAnnotationFromBinaryExpression(name,_path);if(type)types.push(type)}}while(paths.length);if(types.length){return{typeAnnotation:t.createUnionTypeAnnotation(types),ifStatement:ifStatement}}else{return getConditionalAnnotation(ifStatement,name)}}module.exports=exports["default"]},{"../../../types":174,"./../../../tools/protect.js":52}],159:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.VariableDeclarator=VariableDeclarator;exports.TypeCastExpression=TypeCastExpression;exports.NewExpression=NewExpression;exports.TemplateLiteral=TemplateLiteral;exports.UnaryExpression=UnaryExpression;exports.BinaryExpression=BinaryExpression;exports.LogicalExpression=LogicalExpression;exports.ConditionalExpression=ConditionalExpression;exports.SequenceExpression=SequenceExpression;exports.AssignmentExpression=AssignmentExpression;exports.UpdateExpression=UpdateExpression;exports.Literal=Literal;exports.ObjectExpression=ObjectExpression;exports.ArrayExpression=ArrayExpression;exports.RestElement=RestElement;exports.CallExpression=CallExpression;exports.TaggedTemplateExpression=TaggedTemplateExpression;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _infererReference=require("./inferer-reference");exports.Identifier=_interopRequire(_infererReference);function VariableDeclarator(){var id=this.get("id");if(id.isIdentifier()){return this.get("init").getTypeAnnotation()}else{return}}function TypeCastExpression(node){return node.typeAnnotation}TypeCastExpression.validParent=true;function NewExpression(node){if(this.get("callee").isIdentifier()){return t.genericTypeAnnotation(node.callee)}}function TemplateLiteral(){return t.stringTypeAnnotation()}function UnaryExpression(node){var operator=node.operator;if(operator==="void"){return t.voidTypeAnnotation()}else if(t.NUMBER_UNARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.STRING_UNARY_OPERATORS.indexOf(operator)>=0){return t.stringTypeAnnotation()}else if(t.BOOLEAN_UNARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}}function BinaryExpression(node){var operator=node.operator;if(t.NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.BOOLEAN_BINARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}else if(operator==="+"){var right=this.get("right");var left=this.get("left");if(left.isBaseType("number")&&right.isBaseType("number")){return t.numberTypeAnnotation()}else if(left.isBaseType("string")||right.isBaseType("string")){return t.stringTypeAnnotation()}return t.unionTypeAnnotation([t.stringTypeAnnotation(),t.numberTypeAnnotation()])}}function LogicalExpression(){return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function ConditionalExpression(){return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function SequenceExpression(node){return this.get("expressions").pop().getTypeAnnotation()}function AssignmentExpression(node){return this.get("right").getTypeAnnotation()}function UpdateExpression(node){var operator=node.operator;if(operator==="++"||operator==="--"){return t.numberTypeAnnotation()}}function Literal(node){var value=node.value;if(typeof value==="string")return t.stringTypeAnnotation();if(typeof value==="number")return t.numberTypeAnnotation();if(typeof value==="boolean")return t.booleanTypeAnnotation();if(value===null)return t.voidTypeAnnotation();if(node.regex)return t.genericTypeAnnotation(t.identifier("RegExp"))}function ObjectExpression(){return t.genericTypeAnnotation(t.identifier("Object"))}function ArrayExpression(){return t.genericTypeAnnotation(t.identifier("Array"))}function RestElement(){return ArrayExpression()}RestElement.validParent=true;function Func(){return t.genericTypeAnnotation(t.identifier("Function"))}exports.Function=Func;exports.Class=Func;function CallExpression(){return resolveCall(this.get("callee"))}function TaggedTemplateExpression(){return resolveCall(this.get("tag"))}function resolveCall(callee){callee=callee.resolve();if(callee.isFunction()){if(callee.is("async")){if(callee.is("generator")){return t.genericTypeAnnotation(t.identifier("AsyncIterator"))}else{return t.genericTypeAnnotation(t.identifier("Promise"))}}else{if(callee.node.returnType){return callee.node.returnType}else{}}}}},{"../../../types":174,"./../../../tools/protect.js":52,"./inferer-reference":158}],160:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.matchesPattern=matchesPattern;exports.has=has;exports.isnt=isnt;exports.equals=equals;exports.isNodeType=isNodeType;exports.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;exports.isCompletionRecord=isCompletionRecord;exports.isDirective=isDirective;exports.isStatementOrBlock=isStatementOrBlock;exports.isUser=isUser;exports.isGenerated=isGenerated;exports.referencesImport=referencesImport;exports.getSource=getSource;exports.willIMaybeExecuteBefore=willIMaybeExecuteBefore;exports._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;exports.resolve=resolve;exports._resolve=_resolve;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function matchesPattern(pattern,allowPartial){if(!this.isMemberExpression())return false;var parts=pattern.split(".");var search=[this.node];var i=0;function matches(name){var part=parts[i];return part==="*"||name===part}while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(!matches(node.name))return false}else if(t.isLiteral(node)){if(!matches(node.value))return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.unshift(node.property);search.unshift(node.object);continue}}else if(t.isThisExpression(node)){if(!matches("this"))return false}else{return false}if(++i>parts.length){return false}}return i===parts.length}function has(key){var val=this.node[key];if(val&&Array.isArray(val)){return!!val.length}else{return!!val}}var is=has;exports.is=is;function isnt(key){return!this.has(key)}function equals(key,value){return this.node[key]===value}function isNodeType(type){return t.isType(this.type,type)}function canHaveVariableDeclarationOrExpression(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function isCompletionRecord(allowInsideFunction){var path=this;var first=true;do{var container=path.container;if(path.isFunction()&&!first){return!!allowInsideFunction}first=false;if(Array.isArray(container)&&path.key!==container.length-1){return false}}while((path=path.parentPath)&&!path.isProgram());return true}function isDirective(){if(this.isExpressionStatement()){return this.get("expression").isLiteral()}else{return this.isLiteral()&&this.parentPath.isExpressionStatement()}}function isStatementOrBlock(){if(this.parentPath.isLabeledStatement()||t.isBlockStatement(this.container)){return false}else{return _lodashCollectionIncludes2["default"](t.STATEMENT_OR_BLOCK_KEYS,this.key)}}function isUser(){return this.node&&!!this.node.loc}function isGenerated(){return!this.isUser()}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier())return false;var binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return false;var path=binding.path;if(!path.isImportDeclaration())return false;if(path.node.source.value===moduleSource){if(!importName)return true}else{return false}var _arr=path.node.specifiers;for(var _i=0;_i<_arr.length;_i++){var specifier=_arr[_i];if(t.isSpecifierDefault(specifier)&&importName==="default"){return true}if(t.isImportNamespaceSpecifier(specifier)&&importName==="*"){return true}if(t.isImportSpecifier(specifier)&&specifier.imported.name===importName){return true}}return false}function getSource(){var node=this.node;if(node.end){return this.hub.file.code.slice(node.start,node.end)}else{return""}}function willIMaybeExecuteBefore(target){return this._guessExecutionStatusRelativeTo(target)!=="after"}function _guessExecutionStatusRelativeTo(target){var targetFuncParent=target.scope.getFunctionParent();var selfFuncParent=this.scope.getFunctionParent();if(targetFuncParent!==selfFuncParent){return"function"}var targetPaths=target.getAncestry();var selfPaths=this.getAncestry();var commonPath;var targetIndex;var selfIndex;for(selfIndex=0;selfIndex=0){commonPath=selfPath;break}}if(!commonPath){return"before"}var targetRelationship=targetPaths[targetIndex-1];var selfRelationship=selfPaths[selfIndex-1];if(!targetRelationship||!selfRelationship){return"before"}if(targetRelationship.listKey&&targetRelationship.container===selfRelationship.container){return targetRelationship.key>selfRelationship.key?"before":"after"}var targetKeyPosition=t.VISITOR_KEYS[targetRelationship.type].indexOf(targetRelationship.key);var selfKeyPosition=t.VISITOR_KEYS[selfRelationship.type].indexOf(selfRelationship.key);return targetKeyPosition>selfKeyPosition?"before":"after"}function resolve(dangerous,resolved){return this._resolve(dangerous,resolved)||this}function _resolve(dangerous,resolved){if(resolved&&resolved.indexOf(this)>=0)return;resolved=resolved||[];resolved.push(this);if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve(dangerous,resolved)}else{}}else if(this.isReferencedIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding)return;if(!binding.constant)return;if(binding.kind==="module")return;if(binding.path!==this){return binding.path.resolve(dangerous,resolved)}}else if(this.isTypeCastExpression()){return this.get("expression").resolve(dangerous,resolved)}else if(dangerous&&this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){var props=target.get("properties");var _arr2=props;for(var _i2=0;_i2<_arr2.length;_i2++){var prop=_arr2[_i2];if(!prop.isProperty())continue;var key=prop.get("key");var match=prop.isnt("computed")&&key.isIdentifier({name:targetName});match=match||key.isLiteral({value:targetName});if(match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){var elems=target.get("elements");var elem=elems[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}},{"../../types":174,"./../../tools/protect.js":52,"lodash/collection/includes":369}],161:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){if(this.isJSXIdentifier()&&react.isCompatTag(node.name)){return}var binding=scope.getBinding(node.name);if(!binding)return;if(binding!==state.scope.getBinding(node.name))return;if(binding.constant){state.bindings[node.name]=binding}else{var _arr=binding.constantViolations;for(var _i=0;_i<_arr.length;_i++){var violationPath=_arr[_i];state.breakOnScopePaths.push(violationPath.scope.path)}}}};var PathHoister=function(){function PathHoister(path,scope){_classCallCheck(this,PathHoister);this.breakOnScopePaths=[];this.bindings={};this.scopes=[];this.scope=scope;this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var scope=this.path.scope;do{if(this.isCompatibleScope(scope)){this.scopes.push(scope)}else{break}if(this.breakOnScopePaths.indexOf(scope.path)>=0){break}}while(scope=scope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(!scope)return;if(scope.path.isFunction()){if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;return scope.path.get("body").get("body")[0]}else{return this.getNextScopeStatementParent()}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasOwnParamBindings=function hasOwnParamBindings(scope){for(var name in this.bindings){if(!scope.hasOwnBinding(name))continue;var binding=this.bindings[name];if(binding.kind==="param")return true}return false};PathHoister.prototype.run=function run(){var node=this.path.node;if(node._hoisted)return;node._hoisted=true;this.path.traverse(referenceVisitor,this);this.getCompatibleScopes();var path=this.getAttachmentPath();if(!path)return;var uid=path.scope.generateUidIdentifier("ref");path.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);var parent=this.path.parentPath;if(parent.isJSXElement()&&this.path.container===parent.node.children){uid=t.JSXExpressionContainer(uid)}this.path.replaceWith(uid)};return PathHoister}();exports["default"]=PathHoister;module.exports=exports["default"]},{"../../../transformation/helpers/react":69,"../../../types":174,"./../../../tools/protect.js":52}],162:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var pre=[function(self){if(self.key==="body"&&(self.isBlockStatement()||self.isClassBody())){self.node.body=[];return true}},function(self,parent){var replace=false;replace=replace||self.key==="body"&&parent.isArrowFunctionExpression();replace=replace||self.key==="argument"&&parent.isThrowStatement();if(replace){self.replaceWith(t.identifier("undefined"));return true}}];exports.pre=pre;var post=[function(self,parent){var removeParent=false;removeParent=removeParent||self.key==="test"&&(parent.isWhile()||parent.isSwitchCase());removeParent=removeParent||self.key==="declaration"&&parent.isExportDeclaration();removeParent=removeParent||self.key==="body"&&parent.isLabeledStatement();removeParent=removeParent||self.listKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===0;removeParent=removeParent||self.key==="expression"&&parent.isExpressionStatement();removeParent=removeParent||self.key==="test"&&parent.isIfStatement();if(removeParent){parent.dangerouslyRemove();return true}},function(self,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1){parent.replaceWith(parent.node.expressions[0]);return true}},function(self,parent){if(parent.isBinary()){if(self.key==="left"){parent.replaceWith(parent.node.right)}else{parent.replaceWith(parent.node.left)}return true}}];exports.post=post},{"../../../types":174,"./../../../tools/protect.js":52}],163:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function checkPath(_ref,opts){var node=_ref.node;var parent=_ref.parent;if(!t.isIdentifier(node,opts)){if(t.isJSXIdentifier(node,opts)){if(react.isCompatTag(node.name))return false}else{return false}}return t.isReferenced(node,parent)}};exports.ReferencedIdentifier=ReferencedIdentifier;var BindingIdentifier={types:["Identifier"],checkPath:function checkPath(_ref2){var node=_ref2.node;var parent=_ref2.parent;return t.isBinding(node,parent)}};exports.BindingIdentifier=BindingIdentifier;var Expression={types:["Expression"],checkPath:function checkPath(path){if(path.isIdentifier()){return path.isReferencedIdentifier()}else{return t.isExpression(path.node)}}};exports.Expression=Expression;var Scope={types:["Scopable"],checkPath:function checkPath(path){return t.isScope(path.node,path.parent)}};exports.Scope=Scope;var Referenced={checkPath:function checkPath(path){return t.isReferenced(path.node,path.parent)}};exports.Referenced=Referenced;var BlockScoped={checkPath:function checkPath(path){return t.isBlockScoped(path.node)}};exports.BlockScoped=BlockScoped;var Var={types:["VariableDeclaration"],checkPath:function checkPath(path){return t.isVar(path.node)}};exports.Var=Var},{"../../../transformation/helpers/react":69,"../../../types":174,"./../../../tools/protect.js":52}],164:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.insertBefore=insertBefore;exports._containerInsert=_containerInsert;exports._containerInsertBefore=_containerInsertBefore;exports._containerInsertAfter=_containerInsertAfter;exports._maybePopFromStatements=_maybePopFromStatements;exports.insertAfter=insertAfter;exports.updateSiblingKeys=updateSiblingKeys;exports._verifyNodeList=_verifyNodeList;exports.unshiftContainer=unshiftContainer;exports.pushContainer=pushContainer;exports.hoist=hoist;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _libHoister=require("./lib/hoister");var _libHoister2=_interopRequireDefault(_libHoister);var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function insertBefore(nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);if(this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement()){return this.parentPath.insertBefore(nodes)}else if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&this.key==="init"){if(this.node)nodes.push(this.node);this.replaceExpressionWithStatements(nodes)}else{this._maybePopFromStatements(nodes);if(Array.isArray(this.container)){return this._containerInsertBefore(nodes)}else if(this.isStatementOrBlock()){if(this.node)nodes.push(this.node);this.node=this.container[this.key]=t.blockStatement(nodes)}else{throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}return[this]}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);var paths=[];for(var i=0;i=fromIndex){path.key+=incrementBy}}}function _verifyNodeList(nodes){if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;i1)id+=i;return"_"+id};Scope.prototype.generateUidIdentifierBasedOnNode=function generateUidIdentifierBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function add(node){if(t.isModuleDeclaration(node)){if(node.source){add(node.source)}else if(node.specifiers&&node.specifiers.length){var _arr4=node.specifiers;for(var _i4=0;_i4<_arr4.length;_i4++){var specifier=_arr4[_i4];add(specifier)}}else if(node.declaration){add(node.declaration)}}else if(t.isModuleSpecifier(node)){add(node.local)}else if(t.isMemberExpression(node)){add(node.object);add(node.property)}else if(t.isIdentifier(node)){parts.push(node.name)}else if(t.isLiteral(node)){parts.push(node.value)}else if(t.isCallExpression(node)){add(node.callee)}else if(t.isObjectExpression(node)||t.isObjectPattern(node)){var _arr5=node.properties;for(var _i5=0;_i5<_arr5.length;_i5++){var prop=_arr5[_i5];add(prop.key||prop.argument)}}};add(node);var id=parts.join("$");id=id.replace(/^_/,"")||defaultName||"ref";return this.generateUidIdentifier(id)};Scope.prototype.isStatic=function isStatic(node){if(t.isThisExpression(node)||t.isSuper(node)){return true}if(t.isIdentifier(node)&&this.hasBinding(node.name)){return true}return false};Scope.prototype.maybeGenerateMemoised=function maybeGenerateMemoised(node,dontPush){if(this.isStatic(node)){return null}else{var id=this.generateUidIdentifierBasedOnNode(node);if(!dontPush)this.push({id:id});return id}};Scope.prototype.checkBlockScopedCollisions=function checkBlockScopedCollisions(local,kind,name,id){if(kind==="param")return;if(kind==="hoisted"&&local.kind==="let")return;var duplicate=false;if(!duplicate)duplicate=kind==="let"||local.kind==="let"||local.kind==="const"||local.kind==="module";if(!duplicate)duplicate=local.kind==="param"&&(kind==="let"||kind==="const");if(duplicate){throw this.hub.file.errorWithNode(id,messages.get("scopeDuplicateDeclaration",name),TypeError)}};Scope.prototype.rename=function rename(oldName,newName,block){newName=newName||this.generateUidIdentifier(oldName).name;var info=this.getBinding(oldName);if(!info)return;var state={newName:newName,oldName:oldName,binding:info.identifier,info:info};var scope=info.scope;scope.traverse(block||scope.block,renameVisitor,state);if(!block){scope.removeOwnBinding(oldName);scope.bindings[newName]=info;state.binding.name=newName}var file=this.hub.file;if(file){this._renameFromMap(file.moduleFormatter.localImports,oldName,newName,state.binding)}};Scope.prototype._renameFromMap=function _renameFromMap(map,oldName,newName,value){if(map[oldName]){map[newName]=value;map[oldName]=null}};Scope.prototype.dump=function dump(){var sep=_repeating2["default"]("-",60);console.log(sep);var scope=this;do{console.log("#",scope.block.type);for(var name in scope.bindings){var binding=scope.bindings[name];console.log(" -",name,{constant:binding.constant,references:binding.references,kind:binding.kind})}}while(scope=scope.parent);console.log(sep)};Scope.prototype.toArray=function toArray(node,i){var file=this.hub.file;if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding&&binding.constant&&binding.path.isGenericType("Array"))return node}if(t.isArrayExpression(node)){return node}if(t.isIdentifier(node,{name:"arguments"})){return t.callExpression(t.memberExpression(file.addHelper("slice"),t.identifier("call")),[node])}var helperName="to-array";var args=[node];if(i===true){helperName="to-consumable-array"}else if(i){args.push(t.literal(i));helperName="sliced-to-array";if(this.hub.file.isLoose("es6.forOf"))helperName+="-loose"}return t.callExpression(file.addHelper(helperName),args)};Scope.prototype.registerDeclaration=function registerDeclaration(path){if(path.isLabeledStatement()){this.registerBinding("label",path)}else if(path.isFunctionDeclaration()){this.registerBinding("hoisted",path)}else if(path.isVariableDeclaration()){var declarations=path.get("declarations");var _arr6=declarations;for(var _i6=0;_i6<_arr6.length;_i6++){var declar=_arr6[_i6];this.registerBinding(path.node.kind,declar)}}else if(path.isClassDeclaration()){this.registerBinding("let",path)}else if(path.isImportDeclaration()||path.isExportDeclaration()){this.registerBinding("module",path)}else if(path.isFlowDeclaration()){this.registerBinding("type",path)}else{this.registerBinding("unknown",path)}};Scope.prototype.registerConstantViolation=function registerConstantViolation(root,left,right){var ids=left.getBindingIdentifiers();for(var name in ids){var binding=this.getBinding(name);if(!binding)continue;if(right){var rightType=right.typeAnnotation;if(rightType&&binding.isCompatibleWithType(rightType))continue}binding.reassign(root,left,right)}};Scope.prototype.registerBinding=function registerBinding(kind,path){if(!kind)throw new ReferenceError("no `kind`");if(path.isVariableDeclaration()){var declarators=path.get("declarations");var _arr7=declarators;for(var _i7=0;_i7<_arr7.length;_i7++){var declar=_arr7[_i7];this.registerBinding(kind,declar)}return}var parent=this.getProgramParent();var ids=path.getBindingIdentifiers();for(var name in ids){var id=ids[name];var local=this.getOwnBinding(name);if(local){if(kind==="type")continue;if(local.identifier===id)continue;this.checkBlockScopedCollisions(local,kind,name,id)}parent.references[name]=true;this.bindings[name]=new _binding2["default"]({identifier:id,existing:local,scope:this,path:path,kind:kind})}};Scope.prototype.addGlobal=function addGlobal(node){this.globals[node.name]=node};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.uids[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasGlobal=function hasGlobal(name){var scope=this;do{if(scope.globals[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasReference=function hasReference(name){var scope=this;do{if(scope.references[name])return true}while(scope=scope.parent);return false};Scope.prototype.isPure=function isPure(node,constantsOnly){if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(!binding)return false;if(constantsOnly)return binding.constant;return true}else if(t.isClass(node)){return!node.superClass||this.isPure(node.superClass,constantsOnly)}else if(t.isBinary(node)){return this.isPure(node.left,constantsOnly)&&this.isPure(node.right,constantsOnly)}else if(t.isArrayExpression(node)){var _arr8=node.elements;for(var _i8=0;_i8<_arr8.length;_i8++){var elem=_arr8[_i8];if(!this.isPure(elem,constantsOnly))return false}return true}else if(t.isObjectExpression(node)){var _arr9=node.properties;for(var _i9=0;_i9<_arr9.length;_i9++){var prop=_arr9[_i9];if(!this.isPure(prop,constantsOnly))return false}return true}else if(t.isProperty(node)){if(node.computed&&!this.isPure(node.key,constantsOnly))return false;return this.isPure(node.value,constantsOnly)}else{return t.isPure(node)}};Scope.prototype.setData=function setData(key,val){return this.data[key]=val};Scope.prototype.getData=function getData(key){var scope=this;do{var data=scope.data[key];if(data!=null)return data}while(scope=scope.parent)};Scope.prototype.removeData=function removeData(key){var scope=this;do{var data=scope.data[key];if(data!=null)scope.data[key]=null}while(scope=scope.parent)};Scope.prototype.init=function init(){if(!this.references)this.crawl()};Scope.prototype.crawl=function crawl(){var path=this.path;var info=this.block._scopeInfo;if(info)return _lodashObjectExtend2["default"](this,info);info=this.block._scopeInfo={references:_helpersObject2["default"](),bindings:_helpersObject2["default"](),globals:_helpersObject2["default"](),uids:_helpersObject2["default"](),data:_helpersObject2["default"]()};_lodashObjectExtend2["default"](this,info);if(path.isLoop()){var _arr10=t.FOR_INIT_KEYS;for(var _i10=0;_i10<_arr10.length;_i10++){var key=_arr10[_i10];var node=path.get(key);if(node.isBlockScoped())this.registerBinding(node.node.kind,node)}}if(path.isFunctionExpression()&&path.has("id")){if(!t.isProperty(path.parent,{method:true})){this.registerBinding("var",path)}}if(path.isClassExpression()&&path.has("id")){this.registerBinding("var",path)}if(path.isFunction()){var params=path.get("params");var _arr11=params;for(var _i11=0;_i11<_arr11.length;_i11++){var param=_arr11[_i11];this.registerBinding("param",param)}}if(path.isCatchClause()){this.registerBinding("let",path)}if(path.isComprehensionExpression()){this.registerBinding("let",path)}var parent=this.getProgramParent();if(parent.crawling)return;this.crawling=true;path.traverse(collectorVisitor);this.crawling=false};Scope.prototype.push=function push(opts){var path=this.path;if(path.isSwitchStatement()){path=this.getFunctionParent().path}if(path.isLoop()||path.isCatchClause()||path.isFunction()){t.ensureBlock(path.node);path=path.get("body")}if(!path.isBlockStatement()&&!path.isProgram()){path=this.getBlockParent().path}var unique=opts.unique;var kind=opts.kind||"var";var dataKey="declaration:"+kind;var declar=!unique&&path.getData(dataKey);if(!declar){declar=t.variableDeclaration(kind,[]);declar._generated=true;declar._blockHoist=2;this.hub.file.attachAuxiliaryComment(declar);var _path$unshiftContainer=path.unshiftContainer("body",[declar]);var declarPath=_path$unshiftContainer[0];this.registerBinding(kind,declarPath);if(!unique)path.setData(dataKey,declar)}declar.declarations.push(t.variableDeclarator(opts.id,opts.init))};Scope.prototype.getProgramParent=function getProgramParent(){var scope=this;do{if(scope.path.isProgram()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getFunctionParent=function getFunctionParent(){var scope=this;do{if(scope.path.isFunctionParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getBlockParent=function getBlockParent(){var scope=this;do{if(scope.path.isBlockParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")};Scope.prototype.getAllBindings=function getAllBindings(){var ids=_helpersObject2["default"]();var scope=this;do{_lodashObjectDefaults2["default"](ids,scope.bindings);scope=scope.parent}while(scope);return ids};Scope.prototype.getAllBindingsOfKind=function getAllBindingsOfKind(){var ids=_helpersObject2["default"]();var _arr12=arguments;for(var _i12=0;_i12<_arr12.length;_i12++){var kind=_arr12[_i12];var scope=this;do{for(var name in scope.bindings){var binding=scope.bindings[name];if(binding.kind===kind)ids[name]=binding}scope=scope.parent}while(scope)}return ids};Scope.prototype.bindingIdentifierEquals=function bindingIdentifierEquals(name,node){return this.getBindingIdentifier(name)===node};Scope.prototype.getBinding=function getBinding(name){var scope=this;do{var binding=scope.getOwnBinding(name);if(binding)return binding}while(scope=scope.parent)};Scope.prototype.getOwnBinding=function getOwnBinding(name){return this.bindings[name]};Scope.prototype.getBindingIdentifier=function getBindingIdentifier(name){var info=this.getBinding(name);return info&&info.identifier};Scope.prototype.getOwnBindingIdentifier=function getOwnBindingIdentifier(name){var binding=this.bindings[name];return binding&&binding.identifier};Scope.prototype.hasOwnBinding=function hasOwnBinding(name){return!!this.getOwnBinding(name)};Scope.prototype.hasBinding=function hasBinding(name,noGlobals){if(!name)return false;if(this.hasOwnBinding(name))return true;if(this.parentHasBinding(name,noGlobals))return true;if(this.hasUid(name))return true;if(!noGlobals&&_lodashCollectionIncludes2["default"](Scope.globals,name))return true;if(!noGlobals&&_lodashCollectionIncludes2["default"](Scope.contextVariables,name))return true;return false};Scope.prototype.parentHasBinding=function parentHasBinding(name,noGlobals){return this.parent&&this.parent.hasBinding(name,noGlobals)};Scope.prototype.moveBindingTo=function moveBindingTo(name,scope){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name);info.scope=scope;scope.bindings[name]=info}};Scope.prototype.removeOwnBinding=function removeOwnBinding(name){delete this.bindings[name]};Scope.prototype.removeBinding=function removeBinding(name){var info=this.getBinding(name);if(info)info.scope.removeOwnBinding(name)};_createClass(Scope,null,[{key:"globals",value:_lodashArrayFlatten2["default"]([_globals2["default"].builtin,_globals2["default"].browser,_globals2["default"].node].map(Object.keys)),enumerable:true},{key:"contextVariables",value:["arguments","undefined","Infinity","NaN"],enumerable:true}]);return Scope}();exports["default"]=Scope;module.exports=exports["default"]},{"../../helpers/object":46,"../../messages":48,"../../types":174,"../index":149,"./../../tools/protect.js":52,"./binding":167,globals:349,"lodash/array/flatten":362,"lodash/collection/includes":369,"lodash/object/defaults":465,"lodash/object/extend":466,repeating:525}],169:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.explode=explode;exports.verify=verify;exports.merge=merge;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _pathLibVirtualTypes=require("./path/lib/virtual-types");var virtualTypes=_interopRequireWildcard(_pathLibVirtualTypes);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../types");var t=_interopRequireWildcard(_types);var _lodashLangClone=require("lodash/lang/clone");var _lodashLangClone2=_interopRequireDefault(_lodashLangClone);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function explode(visitor){if(visitor._exploded)return visitor;visitor._exploded=true;for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var parts=nodeType.split("|");if(parts.length===1)continue;var fns=visitor[nodeType];delete visitor[nodeType];var _arr=parts;for(var _i=0;_i<_arr.length;_i++){var part=_arr[_i];visitor[part]=fns}}verify(visitor);delete visitor.__esModule;ensureEntranceObjects(visitor);ensureCallbackArrays(visitor);for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var wrapper=virtualTypes[nodeType];if(!wrapper)continue;var fns=visitor[nodeType];for(var type in fns){fns[type]=wrapCheck(wrapper,fns[type])}delete visitor[nodeType];if(wrapper.types){var _arr2=wrapper.types;for(var _i2=0;_i2<_arr2.length;_i2++){var type=_arr2[_i2];if(visitor[type]){mergePair(visitor[type],fns)}else{visitor[type]=fns}}}else{mergePair(visitor,fns)}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var fns=visitor[nodeType];var aliases=t.FLIPPED_ALIAS_KEYS[nodeType];if(!aliases)continue;delete visitor[nodeType];var _arr3=aliases;for(var _i3=0;_i3<_arr3.length;_i3++){var alias=_arr3[_i3];var existing=visitor[alias];if(existing){mergePair(existing,fns)}else{visitor[alias]=_lodashLangClone2["default"](fns)}}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;ensureCallbackArrays(visitor[nodeType])}return visitor}function verify(visitor){if(visitor._verified)return;if(typeof visitor==="function"){throw new Error(messages.get("traverseVerifyRootFunction"))}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;if(t.TYPES.indexOf(nodeType)<0&&!virtualTypes[nodeType]){throw new Error(messages.get("traverseVerifyNodeType",nodeType))}var visitors=visitor[nodeType];if(typeof visitors==="object"){for(var visitorKey in visitors){if(visitorKey==="enter"||visitorKey==="exit")continue;throw new Error(messages.get("traverseVerifyVisitorProperty",nodeType,visitorKey))}}}visitor._verified=true}function merge(visitors){var rootVisitor={};var _arr4=visitors;for(var _i4=0;_i4<_arr4.length;_i4++){var visitor=_arr4[_i4];explode(visitor);for(var type in visitor){var nodeVisitor=rootVisitor[type]=rootVisitor[type]||{};mergePair(nodeVisitor,visitor[type])}}return rootVisitor}function ensureEntranceObjects(obj){for(var key in obj){if(shouldIgnoreKey(key))continue;var fns=obj[key];if(typeof fns==="function"){obj[key]={enter:fns}}}}function ensureCallbackArrays(obj){if(obj.enter&&!Array.isArray(obj.enter))obj.enter=[obj.enter];if(obj.exit&&!Array.isArray(obj.exit))obj.exit=[obj.exit]}function wrapCheck(wrapper,fn){return function(){if(wrapper.checkPath(this)){return fn.apply(this,arguments)}}}function shouldIgnoreKey(key){if(key[0]==="_")return true;if(key==="enter"||key==="exit"||key==="shouldSkip")return true;if(key==="blacklist"||key==="noScope"||key==="skipKeys")return true;return false}function mergePair(dest,src){for(var key in src){dest[key]=[].concat(dest[key]||[],src[key])}}},{"../messages":48,"../types":174,"./../tools/protect.js":52,"./path/lib/virtual-types":163,"lodash/lang/clone":449}],170:[function(require,module,exports){module.exports={ExpressionStatement:["Statement"],DebuggerStatement:["Statement"],IfStatement:["Statement"],TryStatement:["Statement"],WithStatement:["Statement"],EmptyStatement:["Statement"],LabeledStatement:["Statement"],VariableDeclaration:["Statement","Declaration"],BreakStatement:["Statement","Terminatorless","CompletionStatement"],ContinueStatement:["Statement","Terminatorless","CompletionStatement"],ReturnStatement:["Statement","Terminatorless","CompletionStatement"],ThrowStatement:["Statement","Terminatorless","CompletionStatement"],DoWhileStatement:["Statement","BlockParent","Loop","While","Scopable"],WhileStatement:["Statement","BlockParent","Loop","While","Scopable"],SwitchStatement:["Statement","BlockParent","Scopable"],ImportSpecifier:["ModuleSpecifier"],ExportSpecifier:["ModuleSpecifier"],ImportDefaultSpecifier:["ModuleSpecifier"],ExportDefaultSpecifier:["ModuleSpecifier"],ExportNamespaceSpecifier:["ModuleSpecifier"],ExportDefaultFromSpecifier:["ModuleSpecifier"],ExportAllDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ExportDefaultDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ExportNamedDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ImportDeclaration:["Statement","Declaration","ModuleDeclaration"],ArrowFunctionExpression:["Scopable","Function","Func","BlockParent","FunctionParent","Expression","Pure"],FunctionDeclaration:["Scopable","Function","Func","BlockParent","FunctionParent","Statement","Pure","Declaration"],FunctionExpression:["Scopable","Function","Func","BlockParent","FunctionParent","Expression","Pure"],BlockStatement:["Scopable","BlockParent","Block","Statement"],Program:["Scopable","BlockParent","Block","FunctionParent"],CatchClause:["Scopable"],LogicalExpression:["Binary","Expression"],BinaryExpression:["Binary","Expression"],UnaryExpression:["UnaryLike","Expression"],SpreadProperty:["UnaryLike"],SpreadElement:["UnaryLike"],ClassDeclaration:["Scopable","Class","Statement","Declaration"],ClassExpression:["Scopable","Class","Expression"],ForOfStatement:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],ForInStatement:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],ForStatement:["Scopable","Statement","For","BlockParent","Loop"],ObjectPattern:["Pattern"],ArrayPattern:["Pattern"],AssignmentPattern:["Pattern"],Property:["UserWhitespacable"],AwaitExpression:["Expression","Terminatorless"],YieldExpression:["Expression","Terminatorless"],ArrayExpression:["Expression"],AssignmentExpression:["Expression"],CallExpression:["Expression"],ComprehensionExpression:["Expression","Scopable"],ConditionalExpression:["Expression"],DoExpression:["Expression"],Identifier:["Expression"],Literal:["Expression","Pure"],MemberExpression:["Expression"],MetaProperty:["Expression"],NewExpression:["Expression"],ObjectExpression:["Expression"],ParenthesizedExpression:["Expression"],SequenceExpression:["Expression"],TaggedTemplateExpression:["Expression"],ThisExpression:["Expression"],Super:["Expression"],UpdateExpression:["Expression"],AnyTypeAnnotation:["Flow","FlowBaseAnnotation"],ArrayTypeAnnotation:["Flow"],BooleanTypeAnnotation:["Flow","FlowBaseAnnotation"],ClassImplements:["Flow"],DeclareClass:["Flow","FlowDeclaration","Statement","Declaration"],DeclareFunction:["Flow","FlowDeclaration","Statement","Declaration"],DeclareModule:["Flow","FlowDeclaration","Statement"],DeclareVariable:["Flow","FlowDeclaration","Statement","Declaration"],FunctionTypeAnnotation:["Flow"],FunctionTypeParam:["Flow"],GenericTypeAnnotation:["Flow"],InterfaceExtends:["Flow"],InterfaceDeclaration:["Flow","FlowDeclaration","Statement","Declaration"],IntersectionTypeAnnotation:["Flow"],MixedTypeAnnotation:["Flow","FlowBaseAnnotation"],NullableTypeAnnotation:["Flow"],NumberTypeAnnotation:["Flow","FlowBaseAnnotation"],StringLiteralTypeAnnotation:["Flow"],StringTypeAnnotation:["Flow","FlowBaseAnnotation"],TupleTypeAnnotation:["Flow"],TypeofTypeAnnotation:["Flow"],TypeAlias:["Flow","FlowDeclaration","Statement","Declaration"],TypeAnnotation:["Flow"],TypeCastExpression:["Flow"],TypeParameterDeclaration:["Flow"],TypeParameterInstantiation:["Flow"],ObjectTypeAnnotation:["Flow"],ObjectTypeCallProperty:["Flow","UserWhitespacable"],ObjectTypeIndexer:["Flow","UserWhitespacable"],ObjectTypeProperty:["Flow","UserWhitespacable"],QualifiedTypeIdentifier:["Flow"],UnionTypeAnnotation:["Flow"],VoidTypeAnnotation:["Flow","FlowBaseAnnotation"],JSXAttribute:["JSX","Immutable"],JSXClosingElement:["JSX","Immutable"],JSXElement:["JSX","Immutable","Expression"], -JSXEmptyExpression:["JSX","Immutable","Expression"],JSXExpressionContainer:["JSX","Immutable"],JSXIdentifier:["JSX"],JSXMemberExpression:["JSX","Expression"],JSXNamespacedName:["JSX"],JSXOpeningElement:["JSX","Immutable"],JSXSpreadAttribute:["JSX"]}},{}],171:[function(require,module,exports){module.exports={ArrayExpression:{elements:null},ArrowFunctionExpression:{params:null,body:null},AssignmentExpression:{operator:null,left:null,right:null},BinaryExpression:{operator:null,left:null,right:null},BindExpression:{object:null,callee:null},BlockStatement:{body:null},CallExpression:{callee:null,arguments:null},ConditionalExpression:{test:null,consequent:null,alternate:null},ExpressionStatement:{expression:null},File:{program:null,comments:null,tokens:null},FunctionExpression:{id:null,params:null,body:null,generator:false,async:false},FunctionDeclaration:{id:null,params:null,body:null,generator:false,async:false},GenericTypeAnnotation:{id:null,typeParameters:null},Identifier:{name:null},IfStatement:{test:null,consequent:null,alternate:null},ImportDeclaration:{specifiers:null,source:null},ImportSpecifier:{local:null,imported:null},LabeledStatement:{label:null,body:null},Literal:{value:null},LogicalExpression:{operator:null,left:null,right:null},MemberExpression:{object:null,property:null,computed:false},MethodDefinition:{key:null,value:null,kind:"method",computed:false,"static":false},NewExpression:{callee:null,arguments:null},ObjectExpression:{properties:null},Program:{body:null},Property:{kind:null,key:null,value:null,computed:false},ReturnStatement:{argument:null},SequenceExpression:{expressions:null},TemplateLiteral:{quasis:null,expressions:null},ThrowExpression:{argument:null},UnaryExpression:{operator:null,argument:null,prefix:null},VariableDeclaration:{kind:null,declarations:null},VariableDeclarator:{id:null,init:null},WithStatement:{object:null,body:null},YieldExpression:{argument:null,delegate:null}}},{}],172:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.toComputedKey=toComputedKey;exports.toSequenceExpression=toSequenceExpression;exports.toKeyAlias=toKeyAlias;exports.toIdentifier=toIdentifier;exports.toBindingIdentifierName=toBindingIdentifierName;exports.toStatement=toStatement;exports.toExpression=toExpression;exports.toBlock=toBlock;exports.valueToNode=valueToNode;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashLangIsPlainObject=require("lodash/lang/isPlainObject");var _lodashLangIsPlainObject2=_interopRequireDefault(_lodashLangIsPlainObject);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _traversal=require("../traversal");var _traversal2=_interopRequireDefault(_traversal);var _index=require("./index");var t=_interopRequireWildcard(_index);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function toComputedKey(node){var key=arguments[1]===undefined?node.key||node.property:arguments[1];return function(){if(!node.computed){if(t.isIdentifier(key))key=t.literal(key.name)}return key}()}function toSequenceExpression(nodes,scope){var declars=[];var bailed=false;var result=convert(nodes);if(bailed)return;for(var i=0;i=0){continue}if(t.isAnyTypeAnnotation(node)){return[node]}if(t.isFlowBaseAnnotation(node)){bases[node.type]=node;continue}if(t.isUnionTypeAnnotation(node)){if(typeGroups.indexOf(node.types)<0){nodes=nodes.concat(node.types);typeGroups.push(node.types)}continue}if(t.isGenericTypeAnnotation(node)){var _name=node.id.name;if(generics[_name]){var existing=generics[_name];if(existing.typeParameters){if(node.typeParameters){existing.typeParameters.params=removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params))}}else{existing=node.typeParameters}}else{generics[_name]=node}continue}types.push(node)}for(var type in bases){types.push(bases[type])}for(var _name2 in generics){types.push(generics[_name2])}return types}function createTypeAnnotationBasedOnTypeof(type){if(type==="string"){return t.stringTypeAnnotation()}else if(type==="number"){return t.numberTypeAnnotation()}else if(type==="undefined"){return t.voidTypeAnnotation()}else if(type==="boolean"){return t.booleanTypeAnnotation()}else if(type==="function"){return t.genericTypeAnnotation(t.identifier("Function"))}else if(type==="object"){return t.genericTypeAnnotation(t.identifier("Object"))}else if(type==="symbol"){return t.genericTypeAnnotation(t.identifier("Symbol"))}else{throw new Error("Invalid typeof value")}}},{"./../tools/protect.js":52,"./index":174}],174:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.is=is;exports.isType=isType;exports.shallowEqual=shallowEqual;exports.appendToMemberExpression=appendToMemberExpression;exports.prependToMemberExpression=prependToMemberExpression;exports.ensureBlock=ensureBlock;exports.clone=clone;exports.cloneDeep=cloneDeep;exports.buildMatchMemberExpression=buildMatchMemberExpression;exports.removeComments=removeComments;exports.inheritsComments=inheritsComments;exports.inherits=inherits;var _toFastProperties=require("to-fast-properties");var _toFastProperties2=_interopRequireDefault(_toFastProperties);var _lodashArrayCompact=require("lodash/array/compact");var _lodashArrayCompact2=_interopRequireDefault(_lodashArrayCompact);var _lodashObjectAssign=require("lodash/object/assign");var _lodashObjectAssign2=_interopRequireDefault(_lodashObjectAssign);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashArrayUniq=require("lodash/array/uniq");var _lodashArrayUniq2=_interopRequireDefault(_lodashArrayUniq);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var t=exports;function registerType(type,skipAliasCheck){var is=t["is"+type]=function(node,opts){return t.is(type,node,opts,skipAliasCheck)};t["assert"+type]=function(node,opts){opts=opts||{};if(!is(node,opts)){throw new Error("Expected type "+JSON.stringify(type)+" with option "+JSON.stringify(opts))}}}var STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"];exports.STATEMENT_OR_BLOCK_KEYS=STATEMENT_OR_BLOCK_KEYS;var FLATTENABLE_KEYS=["body","expressions"];exports.FLATTENABLE_KEYS=FLATTENABLE_KEYS;var FOR_INIT_KEYS=["left","init"];exports.FOR_INIT_KEYS=FOR_INIT_KEYS;var COMMENT_KEYS=["leadingComments","trailingComments"];exports.COMMENT_KEYS=COMMENT_KEYS;var BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="];exports.BOOLEAN_NUMBER_BINARY_OPERATORS=BOOLEAN_NUMBER_BINARY_OPERATORS;var COMPARISON_BINARY_OPERATORS=["==","===","!=","!==","in","instanceof"];exports.COMPARISON_BINARY_OPERATORS=COMPARISON_BINARY_OPERATORS;var BOOLEAN_BINARY_OPERATORS=[].concat(COMPARISON_BINARY_OPERATORS,BOOLEAN_NUMBER_BINARY_OPERATORS);exports.BOOLEAN_BINARY_OPERATORS=BOOLEAN_BINARY_OPERATORS;var NUMBER_BINARY_OPERATORS=["-","/","*","**","&","|",">>",">>>","<<","^"];exports.NUMBER_BINARY_OPERATORS=NUMBER_BINARY_OPERATORS;var BOOLEAN_UNARY_OPERATORS=["delete","!"];exports.BOOLEAN_UNARY_OPERATORS=BOOLEAN_UNARY_OPERATORS;var NUMBER_UNARY_OPERATORS=["+","-","++","--","~"];exports.NUMBER_UNARY_OPERATORS=NUMBER_UNARY_OPERATORS;var STRING_UNARY_OPERATORS=["typeof"];exports.STRING_UNARY_OPERATORS=STRING_UNARY_OPERATORS;var VISITOR_KEYS=require("./visitor-keys");exports.VISITOR_KEYS=VISITOR_KEYS;var BUILDER_KEYS=require("./builder-keys");exports.BUILDER_KEYS=BUILDER_KEYS;var ALIAS_KEYS=require("./alias-keys");exports.ALIAS_KEYS=ALIAS_KEYS;t.FLIPPED_ALIAS_KEYS={};_lodashCollectionEach2["default"](t.VISITOR_KEYS,function(keys,type){registerType(type,true)});_lodashCollectionEach2["default"](t.ALIAS_KEYS,function(aliases,type){_lodashCollectionEach2["default"](aliases,function(alias){var types=t.FLIPPED_ALIAS_KEYS[alias]=t.FLIPPED_ALIAS_KEYS[alias]||[];types.push(type)})});_lodashCollectionEach2["default"](t.FLIPPED_ALIAS_KEYS,function(types,type){t[type.toUpperCase()+"_TYPES"]=types;registerType(type,false)});var TYPES=Object.keys(t.VISITOR_KEYS).concat(Object.keys(t.FLIPPED_ALIAS_KEYS));exports.TYPES=TYPES;function is(type,node,opts,skipAliasCheck){if(!node)return false;var matches=isType(node.type,type);if(!matches)return false;if(typeof opts==="undefined"){return true}else{return t.shallowEqual(node,opts)}}function isType(nodeType,targetType){if(nodeType===targetType)return true;var aliases=t.FLIPPED_ALIAS_KEYS[targetType];if(aliases){if(aliases[0]===nodeType)return true;var _arr=aliases;for(var _i=0;_i<_arr.length;_i++){var alias=_arr[_i];if(nodeType===alias)return true}}return false}_lodashCollectionEach2["default"](t.VISITOR_KEYS,function(keys,type){if(t.BUILDER_KEYS[type])return;var defs={};_lodashCollectionEach2["default"](keys,function(key){defs[key]=null});t.BUILDER_KEYS[type]=defs});_lodashCollectionEach2["default"](t.BUILDER_KEYS,function(keys,type){var builder=function builder(){var node={};node.start=null;node.type=type;var i=0;for(var key in keys){var arg=arguments[i++];if(arg===undefined)arg=keys[key];node[key]=arg}return node};t[type]=builder;t[type[0].toLowerCase()+type.slice(1)]=builder});function shallowEqual(actual,expected){var keys=Object.keys(expected);var _arr2=keys;for(var _i2=0;_i2<_arr2.length;_i2++){var key=_arr2[_i2];if(actual[key]!==expected[key]){return false}}return true}function appendToMemberExpression(member,append,computed){member.object=t.memberExpression(member.object,member.property,member.computed);member.property=append;member.computed=!!computed;return member}function prependToMemberExpression(member,append){member.object=t.memberExpression(append,member.object);return member}function ensureBlock(node){var key=arguments[1]===undefined?"body":arguments[1];return node[key]=t.toBlock(node[key],node)}function clone(node){var newNode={};for(var key in node){if(key[0]==="_")continue;newNode[key]=node[key]}return newNode}function cloneDeep(node){var newNode={};for(var key in node){if(key[0]==="_")continue;var val=node[key];if(val){if(val.type){val=t.cloneDeep(val)}else if(Array.isArray(val)){val=val.map(t.cloneDeep)}}newNode[key]=val}return newNode}function buildMatchMemberExpression(match,allowPartial){var parts=match.split(".");return function(member){if(!t.isMemberExpression(member))return false;var search=[member];var i=0;while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(parts[i]!==node.name)return false}else if(t.isLiteral(node)){if(parts[i]!==node.value)return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.push(node.object);search.push(node.property);continue}}else{return false}if(++i>parts.length){return false}}return true}}function removeComments(child){var _arr3=COMMENT_KEYS;for(var _i3=0;_i3<_arr3.length;_i3++){var key=_arr3[_i3];delete child[key]}return child}function inheritsComments(child,parent){if(child&&parent){var _arr4=COMMENT_KEYS;for(var _i4=0;_i4<_arr4.length;_i4++){var key=_arr4[_i4];child[key]=_lodashArrayUniq2["default"](_lodashArrayCompact2["default"]([].concat(child[key],parent[key])))}}return child}function inherits(child,parent){if(!child||!parent)return child;child._scopeInfo=parent._scopeInfo;child._paths=parent._paths;child.range=parent.range;child.start=parent.start;child.loc=parent.loc;child.end=parent.end;child.typeAnnotation=parent.typeAnnotation;child.returnType=parent.returnType;t.inheritsComments(child,parent);return child}_toFastProperties2["default"](t);_toFastProperties2["default"](t.VISITOR_KEYS);_lodashObjectAssign2["default"](t,require("./retrievers"));_lodashObjectAssign2["default"](t,require("./validators"));_lodashObjectAssign2["default"](t,require("./converters"));_lodashObjectAssign2["default"](t,require("./flow"))},{"./../tools/protect.js":52,"./alias-keys":170,"./builder-keys":171,"./converters":172,"./flow":173,"./retrievers":175,"./validators":176,"./visitor-keys":177,"lodash/array/compact":361,"lodash/array/uniq":365,"lodash/collection/each":367,"lodash/object/assign":464,"to-fast-properties":542}],175:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersObject=require("../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _index=require("./index");var t=_interopRequireWildcard(_index);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function getBindingIdentifiers(node){var search=[].concat(node);var ids=_helpersObject2["default"]();while(search.length){var id=search.shift();if(!id)continue;var key=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){ids[id.name]=id}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(key&&id[key]){search=search.concat(id[key])}}return ids}getBindingIdentifiers.keys={DeclareClass:"id",DeclareFunction:"id",DeclareModule:"id",DeclareVariable:"id",InterfaceDeclaration:"id",TypeAlias:"id",ComprehensionExpression:"blocks",ComprehensionBlock:"left",CatchClause:"param",LabeledStatement:"label",UnaryExpression:"argument",AssignmentExpression:"left",ImportSpecifier:"local",ImportNamespaceSpecifier:"local",ImportDefaultSpecifier:"local",ImportDeclaration:"specifiers",FunctionDeclaration:"id",FunctionExpression:"id",ClassDeclaration:"id",ClassExpression:"id",SpreadElement:"argument",RestElement:"argument",UpdateExpression:"argument",SpreadProperty:"argument",Property:"value",AssignmentPattern:"left",ArrayPattern:"elements",ObjectPattern:"properties",VariableDeclaration:"declarations",VariableDeclarator:"id"}},{"../helpers/object":46,"./../tools/protect.js":52,"./index":174}],176:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.isBinding=isBinding;exports.isReferenced=isReferenced;exports.isValidIdentifier=isValidIdentifier;exports.isLet=isLet;exports.isBlockScoped=isBlockScoped;exports.isVar=isVar;exports.isSpecifierDefault=isSpecifierDefault;exports.isScope=isScope;exports.isImmutable=isImmutable;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _retrievers=require("./retrievers");var _esutils=require("esutils");var _esutils2=_interopRequireDefault(_esutils);var _index=require("./index");var t=_interopRequireWildcard(_index);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function isBinding(node,parent){var bindingKey=_retrievers.getBindingIdentifiers.keys[parent.type];if(bindingKey){return parent[bindingKey]===node}else{return false}}function isReferenced(node,parent){switch(parent.type){case"MemberExpression":case"JSXMemberExpression":if(parent.property===node&&parent.computed){return true}else if(parent.object===node){return true}else{return false}case"MetaProperty":return false;case"Property":if(parent.key===node){return parent.computed}case"VariableDeclarator":return parent.id!==node;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":var _arr=parent.params;for(var _i=0;_i<_arr.length;_i++){var param=_arr[_i];if(param===node)return false}return parent.id!==node;case"ExportSpecifier":if(parent.source){return false}else{return parent.local===node}case"JSXAttribute":return parent.name!==node;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return false;case"ClassDeclaration":case"ClassExpression":return parent.id!==node;case"MethodDefinition":return parent.key===node&&parent.computed;case"LabeledStatement":return false;case"CatchClause":return parent.param!==node;case"RestElement":return false;case"AssignmentExpression":return parent.right===node;case"AssignmentPattern":return false;case"ObjectPattern":case"ArrayPattern":return false}return true}function isValidIdentifier(name){if(typeof name!=="string"||_esutils2["default"].keyword.isReservedWordES6(name,true)){return false}else{return _esutils2["default"].keyword.isIdentifierNameES6(name)}}function isLet(node){return t.isVariableDeclaration(node)&&(node.kind!=="var"||node._let)}function isBlockScoped(node){return t.isFunctionDeclaration(node)||t.isClassDeclaration(node)||t.isLet(node)}function isVar(node){return t.isVariableDeclaration(node,{kind:"var"})&&!node._let}function isSpecifierDefault(specifier){return t.isImportDefaultSpecifier(specifier)||t.isIdentifier(specifier.imported||specifier.exported,{name:"default"})}function isScope(node,parent){if(t.isBlockStatement(node)&&t.isFunction(parent,{body:node})){return false}return t.isScopable(node)}function isImmutable(node){if(t.isType(node.type,"Immutable"))return true;if(t.isLiteral(node)){if(node.regex){return false}else{return true}}else if(t.isIdentifier(node)){if(node.name==="undefined"){return true}else{return false}}return false}},{"./../tools/protect.js":52,"./index":174,"./retrievers":175,esutils:347}],177:[function(require,module,exports){module.exports={ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation"],ArrowFunctionExpression:["params","body","returnType"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BindExpression:["object","callee"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass","typeParameters","superTypeParameters","implements","decorators"],ClassExpression:["id","body","superClass","typeParameters","superTypeParameters","implements","decorators"],ComprehensionBlock:["left","right"],ComprehensionExpression:["filter","blocks","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],Decorator:["expression"],DebuggerStatement:[],DoWhileStatement:["body","test"],DoExpression:["body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation"],IfStatement:["test","consequent","alternate"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDeclaration:["specifiers","source"],ImportSpecifier:["imported","local"],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value","decorators"],NewExpression:["callee","arguments"],Noop:[],ObjectExpression:["properties"],ObjectPattern:["properties","typeAnnotation"],ParenthesizedExpression:["expression"],Program:["body"],Property:["key","value","decorators"],RestElement:["argument","typeAnnotation"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SpreadProperty:["argument"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"],ExportAllDeclaration:["source","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportDefaultSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportSpecifier:["local","exported"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],ClassImplements:["id","typeParameters"],ClassProperty:["key","value","typeAnnotation","decorators"],DeclareClass:["id","typeParameters","extends","body"],DeclareFunction:["id"],DeclareModule:["id","body"],DeclareVariable:["id"],FunctionTypeAnnotation:["typeParameters","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberTypeAnnotation:[],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],TupleTypeAnnotation:["types"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],ObjectTypeAnnotation:["properties","indexers","callProperties"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value"],ObjectTypeProperty:["key","value"],QualifiedTypeIdentifier:["id","qualification"],UnionTypeAnnotation:["types"],VoidTypeAnnotation:[],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","closingElement","children"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXSpreadAttribute:["argument"]}},{}],178:[function(require,module,exports){(function(process,__dirname){"use strict";var _toolsProtectJs2=require("./tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.canCompile=canCompile;exports.resolve=resolve;exports.resolveRelative=resolveRelative;exports.list=list;exports.regexify=regexify;exports.arrayify=arrayify;exports.booleanify=booleanify;exports.shouldIgnore=shouldIgnore;exports.template=template;exports.parseTemplate=parseTemplate;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}require("./patch");var _lodashStringEscapeRegExp=require("lodash/string/escapeRegExp");var _lodashStringEscapeRegExp2=_interopRequireDefault(_lodashStringEscapeRegExp);var _lodashStringStartsWith=require("lodash/string/startsWith");var _lodashStringStartsWith2=_interopRequireDefault(_lodashStringStartsWith);var _lodashLangCloneDeep=require("lodash/lang/cloneDeep");var _lodashLangCloneDeep2=_interopRequireDefault(_lodashLangCloneDeep);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _messages=require("./messages");var messages=_interopRequireWildcard(_messages);var _minimatch=require("minimatch");var _minimatch2=_interopRequireDefault(_minimatch);var _lodashCollectionContains=require("lodash/collection/contains");var _lodashCollectionContains2=_interopRequireDefault(_lodashCollectionContains);var _traversal=require("./traversal");var _traversal2=_interopRequireDefault(_traversal);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _module2=require("module");var _module3=_interopRequireDefault(_module2);var _lodashLangIsEmpty=require("lodash/lang/isEmpty");var _lodashLangIsEmpty2=_interopRequireDefault(_lodashLangIsEmpty);var _helpersParse=require("./helpers/parse");var _helpersParse2=_interopRequireDefault(_helpersParse);var _path=require("path");var _path2=_interopRequireDefault(_path);var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("./types");var t=_interopRequireWildcard(_types);var _slash=require("slash");var _slash2=_interopRequireDefault(_slash);var _pathExists=require("path-exists");var _pathExists2=_interopRequireDefault(_pathExists);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _util=require("util");exports.inherits=_util.inherits;exports.inspect=_util.inspect;function canCompile(filename,altExts){var exts=altExts||canCompile.EXTENSIONS;var ext=_path2["default"].extname(filename);return _lodashCollectionContains2["default"](exts,ext)}canCompile.EXTENSIONS=[".js",".jsx",".es6",".es"];function resolve(loc){try{return require.resolve(loc)}catch(err){return null}}var relativeMod;function resolveRelative(loc){if(typeof _module3["default"]==="object")return null;if(!relativeMod){relativeMod=new _module3["default"];relativeMod.paths=_module3["default"]._nodeModulePaths(process.cwd())}try{return _module3["default"]._resolveFilename(loc,relativeMod)}catch(err){return null}}function list(val){if(!val){return[]}else if(Array.isArray(val)){return val}else if(typeof val==="string"){return val.split(",")}else{return[val]}}function regexify(val){if(!val)return new RegExp(/.^/);if(Array.isArray(val))val=new RegExp(val.map(_lodashStringEscapeRegExp2["default"]).join("|"),"i"); -if(_lodashLangIsString2["default"](val)){val=_slash2["default"](val);if(_lodashStringStartsWith2["default"](val,"./")||_lodashStringStartsWith2["default"](val,"*/"))val=val.slice(2);if(_lodashStringStartsWith2["default"](val,"**/"))val=val.slice(3);var regex=_minimatch2["default"].makeRe(val,{nocase:true});return new RegExp(regex.source.slice(1,-1),"i")}if(_lodashLangIsRegExp2["default"](val))return val;throw new TypeError("illegal type for regexify")}function arrayify(val,mapFn){if(!val)return[];if(_lodashLangIsBoolean2["default"](val))return arrayify([val],mapFn);if(_lodashLangIsString2["default"](val))return arrayify(list(val),mapFn);if(Array.isArray(val)){if(mapFn)val=val.map(mapFn);return val}return[val]}function booleanify(val){if(val==="true")return true;if(val==="false")return false;return val}function shouldIgnore(filename,ignore,only){filename=_slash2["default"](filename);if(only){var _arr=only;for(var _i=0;_i<_arr.length;_i++){var pattern=_arr[_i];if(pattern.test(filename))return false}return true}else if(ignore.length){var _arr2=ignore;for(var _i2=0;_i2<_arr2.length;_i2++){var pattern=_arr2[_i2];if(pattern.test(filename))return true}}return false}var templateVisitor={noScope:true,enter:function enter(node,parent,scope,nodes){if(t.isExpressionStatement(node)){node=node.expression}if(t.isIdentifier(node)&&_lodashObjectHas2["default"](nodes,node.name)){this.skip();this.replaceInline(nodes[node.name])}},exit:function exit(node){_traversal2["default"].clearNode(node)}};function template(name,nodes,keepExpression){var ast=exports.templates[name];if(!ast)throw new ReferenceError("unknown template "+name);if(nodes===true){keepExpression=true;nodes=null}ast=_lodashLangCloneDeep2["default"](ast);if(!_lodashLangIsEmpty2["default"](nodes)){_traversal2["default"](ast,templateVisitor,null,nodes)}if(ast.body.length>1)return ast.body;var node=ast.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}}function parseTemplate(loc,code){var ast=_helpersParse2["default"](code,{filename:loc,looseModules:true}).program;ast=_traversal2["default"].removeProperties(ast);return ast}function loadTemplates(){var templates={};var templatesLoc=_path2["default"].join(__dirname,"transformation/templates");if(!_pathExists2["default"].sync(templatesLoc)){throw new ReferenceError(messages.get("missingTemplatesDirectory"))}var _arr3=_fs2["default"].readdirSync(templatesLoc);for(var _i3=0;_i3<_arr3.length;_i3++){var name=_arr3[_i3];if(name[0]===".")return;var key=_path2["default"].basename(name,_path2["default"].extname(name));var loc=_path2["default"].join(templatesLoc,name);var code=_fs2["default"].readFileSync(loc,"utf8");templates[key]=parseTemplate(loc,code)}return templates}try{exports.templates=require("../../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}}).call(this,require("_process"),"/lib/babel")},{"../../templates.json":545,"./helpers/parse":47,"./messages":48,"./patch":49,"./tools/protect.js":52,"./traversal":149,"./types":174,_process:223,fs:212,"lodash/collection/contains":366,"lodash/lang/cloneDeep":450,"lodash/lang/isBoolean":453,"lodash/lang/isEmpty":454,"lodash/lang/isRegExp":460,"lodash/lang/isString":461,"lodash/object/has":467,"lodash/string/escapeRegExp":473,"lodash/string/startsWith":474,minimatch:478,module:212,path:222,"path-exists":482,slash:529,util:239}],179:[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("...",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);this.context.push(tc.j_oTag);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;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")}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")};pp.jsx_parseElement=function(){var start=this.markPosition();this.next();return this.jsx_parseElementAt(start)};acorn.plugins.jsx=function(instance){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;this.context.push(tc.j_cTag);this.exprAllowed=false}else{return inner.call(this,prevType)}}})};return acorn}},{"./xhtml":180}],180:[function(require,module,exports){module.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},{}],181:[function(require,module,exports){var types=require("../lib/types");var Type=types.Type;var def=Type.def;var or=Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var isRegExp=builtin.RegExp;var shared=require("../lib/shared");var defaults=shared.defaults;var geq=shared.geq;def("Printable").field("loc",or(def("SourceLocation"),null),defaults["null"],true);def("Node").bases("Printable").field("type",isString).field("comments",or([def("Comment")],null),defaults["null"],true);def("SourceLocation").build("start","end","source").field("start",def("Position")).field("end",def("Position")).field("source",or(isString,null),defaults["null"]);def("Position").build("line","column").field("line",geq(1)).field("column",geq(0));def("Program").bases("Node").build("body").field("body",[def("Statement")]);def("Function").bases("Node").field("id",or(def("Identifier"),null),defaults["null"]).field("params",[def("Pattern")]).field("body",def("BlockStatement"));def("Statement").bases("Node");def("EmptyStatement").bases("Statement").build();def("BlockStatement").bases("Statement").build("body").field("body",[def("Statement")]);def("ExpressionStatement").bases("Statement").build("expression").field("expression",def("Expression"));def("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Statement")).field("alternate",or(def("Statement"),null),defaults["null"]);def("LabeledStatement").bases("Statement").build("label","body").field("label",def("Identifier")).field("body",def("Statement"));def("BreakStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("ContinueStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("WithStatement").bases("Statement").build("object","body").field("object",def("Expression")).field("body",def("Statement"));def("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",def("Expression")).field("cases",[def("SwitchCase")]).field("lexical",isBoolean,defaults["false"]);def("ReturnStatement").bases("Statement").build("argument").field("argument",or(def("Expression"),null));def("ThrowStatement").bases("Statement").build("argument").field("argument",def("Expression"));def("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",def("BlockStatement")).field("handler",or(def("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[def("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[def("CatchClause")],defaults.emptyArray).field("finalizer",or(def("BlockStatement"),null),defaults["null"]);def("CatchClause").bases("Node").build("param","guard","body").field("param",def("Pattern")).field("guard",or(def("Expression"),null),defaults["null"]).field("body",def("BlockStatement"));def("WhileStatement").bases("Statement").build("test","body").field("test",def("Expression")).field("body",def("Statement"));def("DoWhileStatement").bases("Statement").build("body","test").field("body",def("Statement")).field("test",def("Expression"));def("ForStatement").bases("Statement").build("init","test","update","body").field("init",or(def("VariableDeclaration"),def("Expression"),null)).field("test",or(def("Expression"),null)).field("update",or(def("Expression"),null)).field("body",def("Statement"));def("ForInStatement").bases("Statement").build("left","right","body","each").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement")).field("each",isBoolean);def("DebuggerStatement").bases("Statement").build();def("Declaration").bases("Statement");def("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",def("Identifier"));def("FunctionExpression").bases("Function","Expression").build("id","params","body");def("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",or("var","let","const")).field("declarations",[or(def("VariableDeclarator"),def("Identifier"))]);def("VariableDeclarator").bases("Node").build("id","init").field("id",def("Pattern")).field("init",or(def("Expression"),null));def("Expression").bases("Node","Pattern");def("ThisExpression").bases("Expression").build();def("ArrayExpression").bases("Expression").build("elements").field("elements",[or(def("Expression"),null)]);def("ObjectExpression").bases("Expression").build("properties").field("properties",[def("Property")]);def("Property").bases("Node").build("kind","key","value").field("kind",or("init","get","set")).field("key",or(def("Literal"),def("Identifier"))).field("value",or(def("Expression"),def("Pattern")));def("SequenceExpression").bases("Expression").build("expressions").field("expressions",[def("Expression")]);var UnaryOperator=or("-","+","!","~","typeof","void","delete");def("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",UnaryOperator).field("argument",def("Expression")).field("prefix",isBoolean,defaults["true"]);var BinaryOperator=or("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");def("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",BinaryOperator).field("left",def("Expression")).field("right",def("Expression"));var AssignmentOperator=or("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");def("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",AssignmentOperator).field("left",def("Pattern")).field("right",def("Expression"));var UpdateOperator=or("++","--");def("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",UpdateOperator).field("argument",def("Expression")).field("prefix",isBoolean);var LogicalOperator=or("||","&&");def("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",LogicalOperator).field("left",def("Expression")).field("right",def("Expression"));def("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Expression")).field("alternate",def("Expression"));def("NewExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("CallExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("MemberExpression").bases("Expression").build("object","property","computed").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("Pattern").bases("Node");def("ObjectPattern").bases("Pattern").build("properties").field("properties",[or(def("PropertyPattern"),def("Property"))]);def("PropertyPattern").bases("Pattern").build("key","pattern").field("key",or(def("Literal"),def("Identifier"))).field("pattern",def("Pattern"));def("ArrayPattern").bases("Pattern").build("elements").field("elements",[or(def("Pattern"),null)]);def("SwitchCase").bases("Node").build("test","consequent").field("test",or(def("Expression"),null)).field("consequent",[def("Statement")]);def("Identifier").bases("Node","Expression","Pattern").build("name").field("name",isString);def("Literal").bases("Node","Expression").build("value").field("value",or(isString,isBoolean,null,isNumber,isRegExp)).field("regex",or({pattern:isString,flags:isString},null),function(){if(!isRegExp.check(this.value))return null;var flags="";if(this.value.ignoreCase)flags+="i";if(this.value.multiline)flags+="m";if(this.value.global)flags+="g";return{pattern:this.value.source,flags:flags}});def("Comment").bases("Printable").field("value",isString).field("leading",isBoolean,defaults["true"]).field("trailing",isBoolean,defaults["false"]);def("Block").bases("Comment").build("value","leading","trailing");def("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":192,"../lib/types":193}],182:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;def("XMLDefaultDeclaration").bases("Declaration").field("namespace",def("Expression"));def("XMLAnyName").bases("Expression");def("XMLQualifiedIdentifier").bases("Expression").field("left",or(def("Identifier"),def("XMLAnyName"))).field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLAttributeSelector").bases("Expression").field("attribute",def("Expression"));def("XMLFilterExpression").bases("Expression").field("left",def("Expression")).field("right",def("Expression"));def("XMLElement").bases("XML","Expression").field("contents",[def("XML")]);def("XMLList").bases("XML","Expression").field("contents",[def("XML")]);def("XML").bases("Node");def("XMLEscape").bases("XML").field("expression",def("Expression"));def("XMLText").bases("XML").field("text",isString);def("XMLStartTag").bases("XML").field("contents",[def("XML")]);def("XMLEndTag").bases("XML").field("contents",[def("XML")]);def("XMLPointTag").bases("XML").field("contents",[def("XML")]);def("XMLName").bases("XML").field("contents",or(isString,[def("XML")]));def("XMLAttribute").bases("XML").field("value",isString);def("XMLCdata").bases("XML").field("contents",isString);def("XMLComment").bases("XML").field("contents",isString);def("XMLProcessingInstruction").bases("XML").field("target",isString).field("contents",or(isString,null))},{"../lib/types":193,"./core":181}],183:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var isObject=builtin.object;var isString=builtin.string;var defaults=require("../lib/shared").defaults;def("Function").field("generator",isBoolean,defaults["false"]).field("expression",isBoolean,defaults["false"]).field("defaults",[or(def("Expression"),null)],defaults.emptyArray).field("rest",or(def("Identifier"),null),defaults["null"]);def("FunctionDeclaration").build("id","params","body","generator","expression");def("FunctionExpression").build("id","params","body","generator","expression");def("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,defaults["null"]).field("body",or(def("BlockStatement"),def("Expression"))).field("generator",false,defaults["false"]);def("YieldExpression").bases("Expression").build("argument","delegate").field("argument",or(def("Expression"),null)).field("delegate",isBoolean,defaults["false"]);def("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionBlock").bases("Node").build("left","right","each").field("left",def("Pattern")).field("right",def("Expression")).field("each",isBoolean);def("ModuleSpecifier").bases("Literal").build("value").field("value",isString);def("Property").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("method",isBoolean,defaults["false"]).field("shorthand",isBoolean,defaults["false"]).field("computed",isBoolean,defaults["false"]);def("PropertyPattern").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",or("init","get","set","")).field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("value",def("Function")).field("computed",isBoolean,defaults["false"]).field("static",isBoolean,defaults["false"]);def("SpreadElement").bases("Node").build("argument").field("argument",def("Expression"));def("ArrayExpression").field("elements",[or(def("Expression"),def("SpreadElement"),null)]);def("NewExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("CallExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("SpreadElementPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ArrayPattern").field("elements",[or(def("Pattern"),null,def("SpreadElement"))]);var ClassBodyElement=or(def("MethodDefinition"),def("VariableDeclarator"),def("ClassPropertyDefinition"),def("ClassProperty"));def("ClassProperty").bases("Declaration").build("key").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",ClassBodyElement);def("ClassBody").bases("Declaration").build("body").field("body",[ClassBodyElement]);def("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",or(def("Identifier"),null)).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]);def("ClassExpression").bases("Expression").build("id","body","superClass").field("id",or(def("Identifier"),null),defaults["null"]).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]).field("implements",[def("ClassImplements")],defaults.emptyArray);def("ClassImplements").bases("Node").build("id").field("id",def("Identifier")).field("superClass",or(def("Expression"),null),defaults["null"]);def("Specifier").bases("Node");def("NamedSpecifier").bases("Specifier").field("id",def("Identifier")).field("name",or(def("Identifier"),null),defaults["null"]);def("ExportSpecifier").bases("NamedSpecifier").build("id","name");def("ExportBatchSpecifier").bases("Specifier").build();def("ImportSpecifier").bases("NamedSpecifier").build("id","name");def("ImportNamespaceSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ImportDefaultSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",isBoolean).field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"),def("ExportBatchSpecifier"))],defaults.emptyArray).field("source",or(def("Literal"),def("ModuleSpecifier"),null),defaults["null"]);def("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[or(def("ImportSpecifier"),def("ImportNamespaceSpecifier"),def("ImportDefaultSpecifier"))],defaults.emptyArray).field("source",or(def("Literal"),def("ModuleSpecifier")));def("TaggedTemplateExpression").bases("Expression").field("tag",def("Expression")).field("quasi",def("TemplateLiteral"));def("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[def("TemplateElement")]).field("expressions",[def("Expression")]);def("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:isString,raw:isString}).field("tail",isBoolean)},{"../lib/shared":192,"../lib/types":193,"./core":181}],184:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("Function").field("async",isBoolean,defaults["false"]);def("SpreadProperty").bases("Node").build("argument").field("argument",def("Expression"));def("ObjectExpression").field("properties",[or(def("Property"),def("SpreadProperty"))]);def("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ObjectPattern").field("properties",[or(def("PropertyPattern"),def("SpreadPropertyPattern"),def("Property"),def("SpreadProperty"))]);def("AwaitExpression").bases("Expression").build("argument","all").field("argument",or(def("Expression"),null)).field("all",isBoolean,defaults["false"])},{"../lib/shared":192,"../lib/types":193,"./core":181}],185:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("JSXAttribute").bases("Node").build("name","value").field("name",or(def("JSXIdentifier"),def("JSXNamespacedName"))).field("value",or(def("Literal"),def("JSXExpressionContainer"),null),defaults["null"]);def("JSXIdentifier").bases("Identifier").build("name").field("name",isString);def("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",def("JSXIdentifier")).field("name",def("JSXIdentifier"));def("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",or(def("JSXIdentifier"),def("JSXMemberExpression"))).field("property",def("JSXIdentifier")).field("computed",isBoolean,defaults.false); -var JSXElementName=or(def("JSXIdentifier"),def("JSXNamespacedName"),def("JSXMemberExpression"));def("JSXSpreadAttribute").bases("Node").build("argument").field("argument",def("Expression"));var JSXAttributes=[or(def("JSXAttribute"),def("JSXSpreadAttribute"))];def("JSXExpressionContainer").bases("Expression").build("expression").field("expression",def("Expression"));def("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",def("JSXOpeningElement")).field("closingElement",or(def("JSXClosingElement"),null),defaults["null"]).field("children",[or(def("JSXElement"),def("JSXExpressionContainer"),def("JSXText"),def("Literal"))],defaults.emptyArray).field("name",JSXElementName,function(){return this.openingElement.name}).field("selfClosing",isBoolean,function(){return this.openingElement.selfClosing}).field("attributes",JSXAttributes,function(){return this.openingElement.attributes});def("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",JSXElementName).field("attributes",JSXAttributes,defaults.emptyArray).field("selfClosing",isBoolean,defaults["false"]);def("JSXClosingElement").bases("Node").build("name").field("name",JSXElementName);def("JSXText").bases("Literal").build("value").field("value",isString);def("JSXEmptyExpression").bases("Expression").build();def("Type").bases("Node");def("AnyTypeAnnotation").bases("Type");def("VoidTypeAnnotation").bases("Type");def("NumberTypeAnnotation").bases("Type");def("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",isNumber).field("raw",isString);def("StringTypeAnnotation").bases("Type");def("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",isString).field("raw",isString);def("BooleanTypeAnnotation").bases("Type");def("BooleanLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",isBoolean).field("raw",isString);def("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",def("Type"));def("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",def("Type"));def("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[def("FunctionTypeParam")]).field("returnType",def("Type")).field("rest",or(def("FunctionTypeParam"),null)).field("typeParameters",or(def("TypeParameterDeclaration"),null));def("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",def("Identifier")).field("typeAnnotation",def("Type")).field("optional",isBoolean);def("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",def("Type"));def("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[def("ObjectTypeProperty")]).field("indexers",[def("ObjectTypeIndexer")],defaults.emptyArray).field("callProperties",[def("ObjectTypeCallProperty")],defaults.emptyArray);def("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",or(def("Literal"),def("Identifier"))).field("value",def("Type")).field("optional",isBoolean);def("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",def("Identifier")).field("key",def("Type")).field("value",def("Type"));def("ObjectTypeCallProperty").bases("Node").build("value").field("value",def("FunctionTypeAnnotation")).field("static",isBoolean,false);def("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("id",def("Identifier"));def("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("MemberTypeAnnotation").bases("Type").build("object","property").field("object",def("Identifier")).field("property",or(def("MemberTypeAnnotation"),def("GenericTypeAnnotation")));def("UnionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",def("Type"));def("Identifier").field("typeAnnotation",or(def("TypeAnnotation"),null),defaults["null"]);def("TypeParameterDeclaration").bases("Node").build("params").field("params",[def("Identifier")]);def("TypeParameterInstantiation").bases("Node").build("params").field("params",[def("Type")]);def("Function").field("returnType",or(def("TypeAnnotation"),null),defaults["null"]).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]);def("ClassProperty").build("key","typeAnnotation").field("typeAnnotation",def("TypeAnnotation")).field("static",isBoolean,false);def("ClassImplements").field("typeParameters",or(def("TypeParameterInstantiation"),null),defaults["null"]);def("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]).field("body",def("ObjectTypeAnnotation")).field("extends",[def("InterfaceExtends")]);def("InterfaceExtends").bases("Node").build("id").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null)).field("right",def("Type"));def("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",def("Expression")).field("typeAnnotation",def("TypeAnnotation"));def("TupleTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("DeclareVariable").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareFunction").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareClass").bases("InterfaceDeclaration").build("id");def("DeclareModule").bases("Statement").build("id","body").field("id",or(def("Identifier"),def("Literal"))).field("body",def("BlockStatement"))},{"../lib/shared":192,"../lib/types":193,"./core":181}],186:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var geq=require("../lib/shared").geq;def("Function").field("body",or(def("BlockStatement"),def("Expression")));def("ForOfStatement").bases("Statement").build("left","right","body").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement"));def("LetStatement").bases("Statement").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Statement"));def("LetExpression").bases("Expression").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Expression"));def("GraphExpression").bases("Expression").build("index","expression").field("index",geq(0)).field("expression",def("Literal"));def("GraphIndexExpression").bases("Expression").build("index").field("index",geq(0))},{"../lib/shared":192,"../lib/types":193,"./core":181}],187:[function(require,module,exports){var assert=require("assert");var types=require("../main");var getFieldNames=types.getFieldNames;var getFieldValue=types.getFieldValue;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isDate=types.builtInTypes.Date;var isRegExp=types.builtInTypes.RegExp;var hasOwn=Object.prototype.hasOwnProperty;function astNodesAreEquivalent(a,b,problemPath){if(isArray.check(problemPath)){problemPath.length=0}else{problemPath=null}return areEquivalent(a,b,problemPath)}astNodesAreEquivalent.assert=function(a,b){var problemPath=[];if(!astNodesAreEquivalent(a,b,problemPath)){if(problemPath.length===0){assert.strictEqual(a,b)}else{assert.ok(false,"Nodes differ in the following path: "+problemPath.map(subscriptForProperty).join(""))}}};function subscriptForProperty(property){if(/[_$a-z][_$a-z0-9]*/i.test(property)){return"."+property}return"["+JSON.stringify(property)+"]"}function areEquivalent(a,b,problemPath){if(a===b){return true}if(isArray.check(a)){return arraysAreEquivalent(a,b,problemPath)}if(isObject.check(a)){return objectsAreEquivalent(a,b,problemPath)}if(isDate.check(a)){return isDate.check(b)&&+a===+b}if(isRegExp.check(a)){return isRegExp.check(b)&&(a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.ignoreCase===b.ignoreCase)}return a==b}function arraysAreEquivalent(a,b,problemPath){isArray.assert(a);var aLength=a.length;if(!isArray.check(b)||b.length!==aLength){if(problemPath){problemPath.push("length")}return false}for(var i=0;inp){return true}if(pp===np&&this.name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&this.name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&parent.callee===node;case"ConditionalExpression":return this.name==="test"&&parent.test===node;case"MemberExpression":return this.name==="object"&&parent.object===node;default:return false}default:if(parent.type==="NewExpression"&&this.name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}NPp.canBeFirstInStatement=function(){var node=this.node;return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};NPp.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(path){for(var node,parent;path.parent;path=path.parent){node=path.node;parent=path.parent.node;if(n.BlockStatement.check(parent)&&path.parent.name==="body"&&path.name===0){assert.strictEqual(parent.body[0],node);return true}if(n.ExpressionStatement.check(parent)&&path.name==="expression"){assert.strictEqual(parent.expression,node);return true}if(n.SequenceExpression.check(parent)&&path.parent.name==="expressions"&&path.name===0){assert.strictEqual(parent.expressions[0],node);continue}if(n.CallExpression.check(parent)&&path.name==="callee"){assert.strictEqual(parent.callee,node);continue}if(n.MemberExpression.check(parent)&&path.name==="object"){assert.strictEqual(parent.object,node);continue}if(n.ConditionalExpression.check(parent)&&path.name==="test"){assert.strictEqual(parent.test,node);continue}if(isBinary(parent)&&path.name==="left"){assert.strictEqual(parent.left,node);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&path.name==="argument"){assert.strictEqual(parent.argument,node);continue}return false}return true}function cleanUpNodesAfterPrune(remainingNodePath){if(n.VariableDeclaration.check(remainingNodePath.node)){var declarations=remainingNodePath.get("declarations").value;if(!declarations||declarations.length===0){return remainingNodePath.prune()}}else if(n.ExpressionStatement.check(remainingNodePath.node)){if(!remainingNodePath.get("expression").value){return remainingNodePath.prune()}}else if(n.IfStatement.check(remainingNodePath.node)){cleanUpIfStatementAfterPrune(remainingNodePath)}return remainingNodePath}function cleanUpIfStatementAfterPrune(ifStatement){var testExpression=ifStatement.get("test").value;var alternate=ifStatement.get("alternate").value;var consequent=ifStatement.get("consequent").value;if(!consequent&&!alternate){var testExpressionStatement=b.expressionStatement(testExpression);ifStatement.replace(testExpressionStatement)}else if(!consequent&&alternate){var negatedTestExpression=b.unaryExpression("!",testExpression,true);if(n.UnaryExpression.check(testExpression)&&testExpression.operator==="!"){negatedTestExpression=testExpression.argument}ifStatement.get("test").replace(negatedTestExpression);ifStatement.get("consequent").replace(alternate);ifStatement.get("alternate").replace()}}module.exports=NodePath},{"./path":190,"./scope":191,"./types":193,assert:213,util:239}],189:[function(require,module,exports){var assert=require("assert");var types=require("./types");var NodePath=require("./node-path");var Printable=types.namedTypes.Printable;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isFunction=types.builtInTypes.function;var hasOwn=Object.prototype.hasOwnProperty;var undefined;function PathVisitor(){assert.ok(this instanceof PathVisitor);this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this._shouldVisitComments=hasOwn.call(this._methodNameTable,"Block")||hasOwn.call(this._methodNameTable,"Line");this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false}function computeMethodNameTable(visitor){var typeNames=Object.create(null);for(var methodName in visitor){if(/^visit[A-Z]/.test(methodName)){typeNames[methodName.slice("visit".length)]=true}}var supertypeTable=types.computeSupertypeLookupTable(typeNames);var methodNameTable=Object.create(null);var typeNames=Object.keys(supertypeTable);var typeNameCount=typeNames.length;for(var i=0;i=0){parentCache[path.name=i]=path}}else{parentValue[path.name]=path.value;parentCache[path.name]=path}assert.strictEqual(parentValue[path.name],path.value);assert.strictEqual(path.parentPath.get(path.name),path);return path}Pp.replace=function replace(replacement){var results=[];var parentValue=this.parentPath.value;var parentCache=getChildCache(this.parentPath);var count=arguments.length;repairRelationshipWithParent(this);if(isArray.check(parentValue)){var originalLength=parentValue.length;var move=getMoves(this.parentPath,count-1,this.name+1);var spliceArgs=[this.name,1];for(var i=0;i=than},isNumber+" >= "+than)};exports.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return false},"true":function(){return true},undefined:function(){}};var naiveIsPrimitive=Type.or(builtin.string,builtin.number,builtin.boolean,builtin.null,builtin.undefined);exports.isPrimitive=new Type(function(value){if(value===null)return true;var type=typeof value;return!(type==="object"||type==="function")},naiveIsPrimitive.toString())},{"../lib/types":193}],193:[function(require,module,exports){var assert=require("assert");var Ap=Array.prototype;var slice=Ap.slice;var map=Ap.map;var each=Ap.forEach;var Op=Object.prototype;var objToStr=Op.toString;var funObjStr=objToStr.call(function(){});var strObjStr=objToStr.call("");var hasOwn=Op.hasOwnProperty;function Type(check,name){var self=this;assert.ok(self instanceof Type,self);assert.strictEqual(objToStr.call(check),funObjStr,check+" is not a function");var nameObjStr=objToStr.call(name);assert.ok(nameObjStr===funObjStr||nameObjStr===strObjStr,name+" is neither a function nor a string");Object.defineProperties(self,{name:{value:name},check:{value:function(value,deep){var result=check.call(self,value,deep);if(!result&&deep&&objToStr.call(deep)===funObjStr)deep(self,value);return result}}})}var Tp=Type.prototype;exports.Type=Type;Tp.assert=function(value,deep){if(!this.check(value,deep)){var str=shallowStringify(value);assert.ok(false,str+" does not match type "+this);return false}return true};function shallowStringify(value){if(isObject.check(value))return"{"+Object.keys(value).map(function(key){return key+": "+value[key]}).join(", ")+"}";if(isArray.check(value))return"["+value.map(shallowStringify).join(", ")+"]";return JSON.stringify(value)}Tp.toString=function(){var name=this.name;if(isString.check(name))return name;if(isFunction.check(name))return name.call(this)+"";return name+" type"};var builtInTypes={};exports.builtInTypes=builtInTypes;function defBuiltInType(example,name){var objStr=objToStr.call(example);Object.defineProperty(builtInTypes,name,{enumerable:true,value:new Type(function(value){return objToStr.call(value)===objStr},name)});return builtInTypes[name]}var isString=defBuiltInType("","string");var isFunction=defBuiltInType(function(){},"function");var isArray=defBuiltInType([],"array");var isObject=defBuiltInType({},"object");var isRegExp=defBuiltInType(/./,"RegExp");var isDate=defBuiltInType(new Date,"Date");var isNumber=defBuiltInType(3,"number");var isBoolean=defBuiltInType(true,"boolean");var isNull=defBuiltInType(null,"null");var isUndefined=defBuiltInType(void 0,"undefined");function toType(from,name){if(from instanceof Type)return from;if(from instanceof Def)return from.type;if(isArray.check(from))return Type.fromArray(from);if(isObject.check(from))return Type.fromObject(from);if(isFunction.check(from))return new Type(from,name);return new Type(function(value){return value===from},isUndefined.check(name)?function(){return from+""}:name)}Type.or=function(){var types=[];var len=arguments.length;for(var i=0;i=0){wrapExpressionBuilderWithStatement(this.typeName)}}};function wrapExpressionBuilderWithStatement(typeName){var wrapperName=getStatementBuilderName(typeName);if(builders[wrapperName])return;var wrapped=builders[getBuilderName(typeName)];if(!wrapped)return;builders[wrapperName]=function(){return builders.expressionStatement(wrapped.apply(builders,arguments))}}function populateSupertypeList(typeName,list){list.length=0;list.push(typeName);var lastSeen=Object.create(null);for(var pos=0;pos1||!binding.constant)return;if(binding.kind==="param"||binding.kind==="module")return;var replacement=binding.path.node;if(t.isVariableDeclarator(replacement)){replacement=replacement.init}if(!replacement)return;if(!scope.isPure(replacement,true))return;if(t.isClass(replacement)||t.isFunction(replacement)){if(binding.path.scope.parent!==scope)return}if(this.findParent(function(path){return path.node===replacement})){return}t.toExpression(replacement);scope.removeBinding(node.name);binding.path.dangerouslyRemove();return replacement},"ClassDeclaration|FunctionDeclaration":function ClassDeclarationFunctionDeclaration(node,parent,scope){var binding=scope.getBinding(node.id.name);if(binding&&!binding.referenced){this.dangerouslyRemove()}},VariableDeclarator:function VariableDeclarator(node,parent,scope){if(!t.isIdentifier(node.id)||!scope.isPure(node.init,true))return;visitor["ClassDeclaration|FunctionDeclaration"].apply(this,arguments)},ConditionalExpression:function ConditionalExpression(node){var evaluateTest=this.get("test").evaluateTruthy();if(evaluateTest===true){return node.consequent}else if(evaluateTest===false){return node.alternate}},BlockStatement:function BlockStatement(){var paths=this.get("body");var purge=false;for(var i=0;i3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}var msg;if(closest){msg=messages.get("undeclaredVariableSuggestion",node.name,closest)}else{msg=messages.get("undeclaredVariable",node.name)}throw this.errorWithNode(msg,ReferenceError)}}})};module.exports=exports["default"]},{leven:210}],210:[function(require,module,exports){"use strict";var arr=[];var charCodeCache=[];module.exports=function(a,b){if(a===b){return 0}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen}if(bLen===0){return aLen}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(iret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2}}return ret}},{}],211:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=function(_ref){var Plugin=_ref.Plugin;var t=_ref.types;return new Plugin("undefined-to-void",{metadata:{group:"builtin-basic"},visitor:{ReferencedIdentifier:function ReferencedIdentifier(node,parent){if(node.name==="undefined"){return t.unaryExpression("void",t.literal(0),true)}}}})};module.exports=exports["default"]},{}],212:[function(require,module,exports){},{}],213:[function(require,module,exports){var util=require("util/");var pSlice=Array.prototype.slice;var hasOwn=Object.prototype.hasOwnProperty;var assert=module.exports=ok;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{var err=new Error;if(err.stack){var out=err.stack;var fn_name=stackStartFunction.name;var idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};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=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};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}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,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/":239}],214:[function(require,module,exports){arguments[4][212][0].apply(exports,arguments)},{dup:212}],215:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var kMaxLength=1073741823;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return arr.foo()===42&&typeof arr.subarray==="function"&&new Uint8Array(1).subarray(1,1).byteLength===0}catch(e){return false}}();function Buffer(arg){if(!(this instanceof Buffer)){if(arguments.length>1)return new Buffer(arg,arguments[1]);return new Buffer(arg)}this.length=0;this.parent=undefined;if(typeof arg==="number"){return fromNumber(this,arg)}if(typeof arg==="string"){return fromString(this,arg,arguments.length>1?arguments[1]:"utf8")}return fromObject(this,arg)}function fromNumber(that,length){that=allocate(that,length<0?0:checked(length)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i>>1;if(fromPool)that.parent=rootParent;return that}function checked(length){if(length>=kMaxLength){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength.toString(16)+" bytes")}return length|0}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;var i=0;var len=Math.min(x,y);while(i>>1;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"base64":return base64ToBytes(string).length;default:return string.length}}Buffer.byteLength=byteLength;Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined;Buffer.prototype.toString=function toString(encoding,start,end){var loweredCase=false;start=start|0;end=end===undefined||end===Infinity?this.length:end|0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val)){return arrayIndexOf(this,val,byteOffset)}if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,val,byteOffset)}return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;for(var i=0;byteOffset+iremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"binary":return binaryWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end);for(var i=start;ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||valuebuf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648); -if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||valuebuf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":216,ieee754:217,"is-array":218}],216:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],217:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],218:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],219:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;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(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i0&&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"){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};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;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}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{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.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};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}},{}],220:[function(require,module,exports){if(typeof Object.create==="function"){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{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],221:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],222:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(isNaN(n)||util.isNull(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else return state.length}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(!util.isNumber(n)||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(util.isNull(ret)){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(!util.isNull(ret))this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(function(){maybeReadMore_(stream,state)})}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;process.nextTick(function(){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}})}}function forEach(xs,f){for(var i=0,l=xs.length;i1){var cbs=[];for(var c=0;c=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:215}],237:[function(require,module,exports){exports.isatty=function(){return false};function ReadStream(){throw new Error("tty.ReadStream is not implemented")}exports.ReadStream=ReadStream;function WriteStream(){throw new Error("tty.ReadStream is not implemented")}exports.WriteStream=WriteStream},{}],238:[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"}},{}],239:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;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=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}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;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]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+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){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}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=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}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");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-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]}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"||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"];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(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){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":238,_process:223,inherits:220}],240:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(process.platform==="win32"){ansiStyles.blue.open=""}function build(_styles){var builder=function builder(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a0;i--){line=lines[i];if(~line.indexOf("sourceMappingURL=data:"))return exports.fromComment(line)}}Converter.prototype.toJSON=function(space){return JSON.stringify(this.sourcemap,null,space)};Converter.prototype.toBase64=function(){var json=this.toJSON();return new Buffer(json).toString("base64")};Converter.prototype.toComment=function(options){var base64=this.toBase64();var data="sourceMappingURL=data:application/json;base64,"+base64;return options&&options.multiline?"/*# "+data+" */":"//# "+data};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(key,value){if(this.sourcemap.hasOwnProperty(key))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(key,value)};Converter.prototype.setProperty=function(key,value){this.sourcemap[key]=value;return this};Converter.prototype.getProperty=function(key){return this.sourcemap[key]};exports.fromObject=function(obj){return new Converter(obj)};exports.fromJSON=function(json){return new Converter(json,{isJSON:true})};exports.fromBase64=function(base64){return new Converter(base64,{isEncoded:true})};exports.fromComment=function(comment){comment=comment.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(comment,{isEncoded:true,hasComment:true})};exports.fromMapFileComment=function(comment,dir){return new Converter(comment,{commentFileDir:dir,isFileComment:true,isJSON:true})};exports.fromSource=function(content,largeSource){if(largeSource)return convertFromLargeSource(content);var m=content.match(commentRx);commentRx.lastIndex=0;return m?exports.fromComment(m.pop()):null};exports.fromMapFileSource=function(content,dir){var m=content.match(mapFileCommentRx);mapFileCommentRx.lastIndex=0;return m?exports.fromMapFileComment(m.pop(),dir):null};exports.removeComments=function(src){commentRx.lastIndex=0;return src.replace(commentRx,"")};exports.removeMapFileComments=function(src){mapFileCommentRx.lastIndex=0;return src.replace(mapFileCommentRx,"")};Object.defineProperty(exports,"commentRegex",{get:function getCommentRegex(){commentRx.lastIndex=0;return commentRx}});Object.defineProperty(exports,"mapFileCommentRegex",{get:function getMapFileCommentRegex(){mapFileCommentRx.lastIndex=0;return mapFileCommentRx}})}).call(this,require("buffer").Buffer)},{buffer:215,fs:212,path:222}],249:[function(require,module,exports){var $=require("./$");module.exports=function(IS_INCLUDES){return function($this,el,fromIndex){var O=$.toObject($this),length=$.toLength(O.length),index=$.toIndex(fromIndex,length),value;if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$":270}],250:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function($this,callbackfn,that){var O=Object($.assertDefined($this)),self=$.ES5Object(O),f=ctx(callbackfn,that,3),length=$.toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$":270,"./$.ctx":258}],251:[function(require,module,exports){var $=require("./$");function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}assert.def=$.assertDefined;assert.fn=function(it){if(!$.isFunction(it))throw TypeError(it+" is not a function!");return it};assert.obj=function(it){if(!$.isObject(it))throw TypeError(it+" is not an object!");return it};assert.inst=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it};module.exports=assert},{"./$":270}],252:[function(require,module,exports){var $=require("./$"),enumKeys=require("./$.enum-keys");module.exports=Object.assign||function assign(target,source){var T=Object($.assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=$.ES5Object(arguments[i++]),keys=enumKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$":270,"./$.enum-keys":261}],253:[function(require,module,exports){var $=require("./$"),TAG=require("./$.wks")("toStringTag"),toString={}.toString;function cof(it){return toString.call(it).slice(8,-1)}cof.classof=function(it){var O,T;return it==undefined?it===undefined?"Undefined":"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:cof(O)};cof.set=function(it,tag,stat){if(it&&!$.has(it=stat?it:it.prototype,TAG))$.hide(it,TAG,tag)};module.exports=cof},{"./$":270,"./$.wks":288}],254:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),step=require("./$.iter").step,$has=$.has,set=$.set,isObject=$.isObject,hide=$.hide,isExtensible=Object.isExtensible||isObject,ID=safe("id"),O1=safe("O1"),LAST=safe("last"),FIRST=safe("first"),ITER=safe("iter"),SIZE=$.DESC?safe("size"):"size",id=0;function fastKey(it,create){if(!isObject(it))return typeof it=="symbol"?it:(typeof it=="string"?"S":"P")+it;if(!$has(it,ID)){if(!isExtensible(it))return"F";if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!=="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){assert.inst(that,C,NAME);set(that,O1,$.create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});require("./$.mix")(C.prototype,{clear:function clear(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function forEach(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function has(key){return!!getEntry(this,key)}});if($.DESC)$.setDesc(C.prototype,"size",{get:function(){return assert.def(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!=="F")that[O1][index]=entry}return that},getEntry:getEntry,setIter:function(C,NAME,IS_MAP){require("./$.iter-define")(C,NAME,function(iterated,kind){set(this,ITER,{o:iterated,k:kind})},function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){iter.o=undefined;return step(1)}if(kind=="keys")return step(0,entry.k);if(kind=="values")return step(0,entry.v);return step(0,[entry.k,entry.v])},IS_MAP?"entries":"values",!IS_MAP,true)}}},{"./$":270,"./$.assert":251,"./$.ctx":258,"./$.for-of":262,"./$.iter":269,"./$.iter-define":267,"./$.mix":272,"./$.uid":286}],255:[function(require,module,exports){var $def=require("./$.def"),forOf=require("./$.for-of");module.exports=function(NAME){$def($def.P,NAME,{toJSON:function toJSON(){var arr=[];forOf(this,false,arr.push,arr);return arr}})}},{"./$.def":259,"./$.for-of":262}],256:[function(require,module,exports){"use strict";var $=require("./$"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),$has=$.has,isObject=$.isObject,hide=$.hide,isExtensible=Object.isExtensible||isObject,id=0,ID=safe("id"),WEAK=safe("weak"),LEAK=safe("leak"),method=require("./$.array-methods"),find=method(5),findIndex=method(6);function findFrozen(store,key){return find(store.array,function(it){return it[0]===key})}function leakStore(that){return that[LEAK]||hide(that,LEAK,{array:[],get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.array.push([key,value])},"delete":function(key){var index=findIndex(this.array,function(it){return it[0]===key});if(~index)this.array.splice(index,1);return!!~index}})[LEAK]}module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){$.set(assert.inst(that,C,NAME),ID,id++);if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});require("./$.mix")(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(!isExtensible(key))return leakStore(this)["delete"](key);return $has(key,WEAK)&&$has(key[WEAK],this[ID])&&delete key[WEAK][this[ID]]},has:function has(key){if(!isObject(key))return false;if(!isExtensible(key))return leakStore(this).has(key);return $has(key,WEAK)&&$has(key[WEAK],this[ID])}});return C},def:function(that,key,value){if(!isExtensible(assert.obj(key))){leakStore(that).set(key,value)}else{$has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that[ID]]=value}return that},leakStore:leakStore,WEAK:WEAK,ID:ID}},{"./$":270,"./$.array-methods":250,"./$.assert":251,"./$.for-of":262,"./$.mix":272,"./$.uid":286}],257:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),BUGGY=require("./$.iter").BUGGY,forOf=require("./$.for-of"),species=require("./$.species"),assertInstance=require("./$.assert").inst;module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=$.g[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};function fixMethod(KEY){var fn=proto[KEY];require("./$.redef")(proto,KEY,KEY=="delete"?function(a){return fn.call(this,a===0?0:a)}:KEY=="has"?function has(a){return fn.call(this,a===0?0:a)}:KEY=="get"?function get(a){return fn.call(this,a===0?0:a)}:KEY=="add"?function add(a){fn.call(this,a===0?0:a);return this}:function set(a,b){fn.call(this,a===0?0:a,b);return this})}if(!$.isFunction(C)||!(IS_WEAK||!BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER);require("./$.mix")(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](IS_WEAK?{}:-0,1),buggyZero;if(!require("./$.iter-detect")(function(iter){new C(iter)})){C=wrapper(function(target,iterable){assertInstance(target,C,NAME);var that=new Base;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that);return that});C.prototype=proto;proto.constructor=C}IS_WEAK||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER)}require("./$.cof").set(C,NAME);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);species(C);species($.core[NAME]);if(!IS_WEAK)common.setIter(C,NAME,IS_MAP);return C}},{"./$":270,"./$.assert":251,"./$.cof":253,"./$.def":259,"./$.for-of":262,"./$.iter":269,"./$.iter-detect":268,"./$.mix":272,"./$.redef":275,"./$.species":280}],258:[function(require,module,exports){var assertFunction=require("./$.assert").fn;module.exports=function(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.assert":251}],259:[function(require,module,exports){var $=require("./$"),global=$.g,core=$.core,isFunction=$.isFunction,$redef=require("./$.redef");function ctx(fn,that){return function(){return fn.apply(that,arguments)}}global.core=core;$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;function $def(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,isProto=type&$def.P,target=isGlobal?global:type&$def.S?global[name]:(global[name]||{}).prototype,exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;out=(own?target:source)[key];if(type&$def.B&&own)exp=ctx(out,global);else exp=isProto&&isFunction(out)?ctx(Function.call,out):out;if(target&&!own)$redef(target,key,out);if(exports[key]!=out)$.hide(exports,key,exp);if(isProto)(exports.prototype||(exports.prototype={}))[key]=out}}module.exports=$def},{"./$":270,"./$.redef":275}],260:[function(require,module,exports){var $=require("./$"),document=$.g.document,isObject=$.isObject,is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{}}},{"./$":270}],261:[function(require,module,exports){var $=require("./$");module.exports=function(it){var keys=$.getKeys(it),getDesc=$.getDesc,getSymbols=$.getSymbols;if(getSymbols)$.each.call(getSymbols(it),function(key){if(getDesc(it,key).enumerable)keys.push(key)});return keys}},{"./$":270}],262:[function(require,module,exports){var ctx=require("./$.ctx"),get=require("./$.iter").get,call=require("./$.iter-call");module.exports=function(iterable,entries,fn,that){var iterator=get(iterable),f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done){if(call(iterator,f,step.value,entries)===false){return call.close(iterator)}}}},{"./$.ctx":258,"./$.iter":269,"./$.iter-call":266}],263:[function(require,module,exports){module.exports=function($){$.FW=true;$.path=$.g;return $}},{}],264:[function(require,module,exports){var $=require("./$"),toString={}.toString,getNames=$.getNames;var windowNames=typeof window=="object"&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];function getWindowNames(it){try{return getNames(it)}catch(e){return windowNames.slice()}}module.exports.get=function getOwnPropertyNames(it){if(windowNames&&toString.call(it)=="[object Window]")return getWindowNames(it);return getNames($.toObject(it))}},{"./$":270}],265:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}},{}],266:[function(require,module,exports){var assertObject=require("./$.assert").obj;function close(iterator){var ret=iterator["return"];if(ret!==undefined)assertObject(ret.call(iterator))}function call(iterator,fn,value,entries){try{return entries?fn(assertObject(value)[0],value[1]):fn(value)}catch(e){close(iterator);throw e}}call.close=close;module.exports=call},{"./$.assert":251}],267:[function(require,module,exports){var $def=require("./$.def"),$redef=require("./$.redef"),$=require("./$"),cof=require("./$.cof"),$iter=require("./$.iter"),SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values",Iterators=$iter.Iterators;module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){$iter.create(Constructor,NAME,next);function createMethod(kind){function $$(that){return new Constructor(that,kind)}switch(kind){case KEYS:return function keys(){return $$(this)};case VALUES:return function values(){return $$(this)}}return function entries(){return $$(this)}}var TAG=NAME+" Iterator",proto=Base.prototype,_native=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],_default=_native||createMethod(DEFAULT),methods,key;if(_native){var IteratorPrototype=$.getProto(_default.call(new Base));cof.set(IteratorPrototype,TAG,true);if($.FW&&$.has(proto,FF_ITERATOR))$iter.set(IteratorPrototype,$.that)}if($.FW||FORCE)$iter.set(proto,_default);Iterators[NAME]=_default;Iterators[TAG]=$.that;if(DEFAULT){methods={keys:IS_SET?_default:createMethod(KEYS),values:DEFAULT==VALUES?_default:createMethod(VALUES),entries:DEFAULT!=VALUES?_default:createMethod("entries")};if(FORCE)for(key in methods){if(!(key in proto))$redef(proto,key,methods[key])}else $def($def.P+$def.F*$iter.BUGGY,NAME,methods)}}},{"./$":270,"./$.cof":253,"./$.def":259,"./$.iter":269,"./$.redef":275,"./$.wks":288}],268:[function(require,module,exports){var SYMBOL_ITERATOR=require("./$.wks")("iterator"),SAFE_CLOSING=false;try{var riter=[7][SYMBOL_ITERATOR]();riter["return"]=function(){SAFE_CLOSING=true};Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec){if(!SAFE_CLOSING)return false;var safe=false;try{var arr=[7],iter=arr[SYMBOL_ITERATOR]();iter.next=function(){safe=true};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return safe}},{"./$.wks":288}],269:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),classof=cof.classof,assert=require("./$.assert"),assertObject=assert.obj,SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",Iterators=require("./$.shared")("iterators"),IteratorPrototype={};setIterator(IteratorPrototype,$.that);function setIterator(O,value){$.hide(O,SYMBOL_ITERATOR,value);if(FF_ITERATOR in[])$.hide(O,FF_ITERATOR,value)}module.exports={BUGGY:"keys"in[]&&!("next"in[].keys()),Iterators:Iterators,step:function(done,value){return{value:value,done:!!done}},is:function(it){var O=Object(it),Symbol=$.g.Symbol;return(Symbol&&Symbol.iterator||FF_ITERATOR)in O||SYMBOL_ITERATOR in O||$.has(Iterators,classof(O))},get:function(it){var Symbol=$.g.Symbol,getIter;if(it!=undefined){getIter=it[Symbol&&Symbol.iterator||FF_ITERATOR]||it[SYMBOL_ITERATOR]||Iterators[classof(it)]}assert($.isFunction(getIter),it," is not iterable!");return assertObject(getIter.call(it))},set:setIterator,create:function(Constructor,NAME,next,proto){Constructor.prototype=$.create(proto||IteratorPrototype,{next:$.desc(1,next)});cof.set(Constructor,NAME+" Iterator")}}},{"./$":270,"./$.assert":251,"./$.cof":253,"./$.shared":279,"./$.wks":288}],270:[function(require,module,exports){"use strict";var global=typeof self!="undefined"?self:Function("return this")(),core={},defineProperty=Object.defineProperty,hasOwnProperty={}.hasOwnProperty,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min;var DESC=!!function(){try{return defineProperty({},"a",{get:function(){return 2}}).a==2}catch(e){}}();var hide=createDefiner(1);function toInteger(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}function desc(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return $.setDesc(object,key,desc(bitmap,value))}:simpleSet}function isObject(it){return it!==null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}function assertDefined(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}var $=module.exports=require("./$.fw")({g:global,core:core,html:global.document&&document.documentElement,isObject:isObject,isFunction:isFunction,that:function(){return this},toInteger:toInteger,toLength:function(it){return it>0?min(toInteger(it),9007199254740991):0},toIndex:function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)},has:function(it,key){return hasOwnProperty.call(it,key)},create:Object.create,getProto:Object.getPrototypeOf,DESC:DESC,desc:desc,getDesc:Object.getOwnPropertyDescriptor,setDesc:defineProperty,setDescs:Object.defineProperties,getKeys:Object.keys,getNames:Object.getOwnPropertyNames,getSymbols:Object.getOwnPropertySymbols,assertDefined:assertDefined,ES5Object:Object,toObject:function(it){return $.ES5Object(assertDefined(it))},hide:hide,def:createDefiner(0),set:global.Symbol?simpleSet:hide,each:[].forEach});if(typeof __e!="undefined")__e=core;if(typeof __g!="undefined")__g=global},{"./$.fw":263}],271:[function(require,module,exports){var $=require("./$");module.exports=function(object,el){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":270}],272:[function(require,module,exports){var $redef=require("./$.redef");module.exports=function(target,src){for(var key in src)$redef(target,key,src[key]);return target}},{"./$.redef":275}],273:[function(require,module,exports){var $=require("./$"),assertObject=require("./$.assert").obj;module.exports=function ownKeys(it){assertObject(it);var keys=$.getNames(it),getSymbols=$.getSymbols;return getSymbols?keys.concat(getSymbols(it)):keys}},{"./$":270,"./$.assert":251}],274:[function(require,module,exports){"use strict";var $=require("./$"),invoke=require("./$.invoke"),assertFunction=require("./$.assert").fn;module.exports=function(){var fn=assertFunction(this),length=arguments.length,pargs=Array(length),i=0,_=$.path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$":270,"./$.assert":251,"./$.invoke":265}],275:[function(require,module,exports){var $=require("./$"),tpl=String({}.hasOwnProperty),SRC=require("./$.uid").safe("src"),_toString=Function.toString;function $redef(O,key,val,safe){if($.isFunction(val)){var base=O[key];$.hide(val,SRC,base?String(base):tpl.replace(/hasOwnProperty/,String(key)));if(!("name"in val))val.name=key}if(O===$.g){O[key]=val}else{if(!safe)delete O[key];$.hide(O,key,val)}}$redef(Function.prototype,"toString",function toString(){return $.has(this,SRC)?this[SRC]:_toString.call(this)});$.core.inspectSource=function(it){return _toString.call(it)};module.exports=$redef},{"./$":270,"./$.uid":286}],276:[function(require,module,exports){"use strict";module.exports=function(regExp,replace,isStatic){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}},{}],277:[function(require,module,exports){module.exports=Object.is||function is(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}},{}],278:[function(require,module,exports){var $=require("./$"),assert=require("./$.assert");function check(O,proto){assert.obj(O);assert(proto===null||$.isObject(proto),proto,": can't set as prototype!")}module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,$.getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined),check:check}},{"./$":270,"./$.assert":251,"./$.ctx":258}],279:[function(require,module,exports){var $=require("./$"),SHARED="__core-js_shared__",store=$.g[SHARED]||($.g[SHARED]={});module.exports=function(key){return store[key]||(store[key]={})}},{"./$":270}],280:[function(require,module,exports){var $=require("./$"),SPECIES=require("./$.wks")("species");module.exports=function(C){if($.DESC&&!(SPECIES in C))$.setDesc(C,SPECIES,{configurable:true,get:$.that})}},{"./$":270,"./$.wks":288}],281:[function(require,module,exports){var $=require("./$");module.exports=function(TO_STRING){return function(that,pos){var s=String($.assertDefined(that)),i=$.toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$":270}],282:[function(require,module,exports){var $=require("./$"),repeat=require("./$.string-repeat");module.exports=function(that,minLength,fillChar,left){var S=String($.assertDefined(that));if(minLength===undefined)return S;var intMinLength=$.toInteger(minLength);var fillLen=intMinLength-S.length;if(fillLen<0||fillLen===Infinity){throw new RangeError("Cannot satisfy string length "+minLength+" for string: "+S)}var sFillStr=fillChar===undefined?" ":String(fillChar);var sFillVal=repeat.call(sFillStr,Math.ceil(fillLen/sFillStr.length));if(sFillVal.length>fillLen)sFillVal=left?sFillVal.slice(sFillVal.length-fillLen):sFillVal.slice(0,fillLen);return left?sFillVal.concat(S):S.concat(sFillVal)}},{"./$":270,"./$.string-repeat":283}],283:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function repeat(count){var str=String($.assertDefined(this)),res="",n=$.toInteger(count);if(n<0||n==Infinity)throw RangeError("Count can't be negative");for(;n>0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}},{"./$":270}],284:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),invoke=require("./$.invoke"),cel=require("./$.dom-create"),global=$.g,isFunction=$.isFunction,html=$.html,process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;function run(){var id=+this;if($.has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run.call(event.data)}if(!isFunction(setTask)||!isFunction(clearTask)){setTask=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearTask=function(id){delete queue[id]};if(cof(process)=="process"){defer=function(id){process.nextTick(ctx(run,id,1))}}else if(global.addEventListener&&isFunction(global.postMessage)&&!global.importScripts){defer=function(id){global.postMessage(id,"*")};global.addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if(ONREADYSTATECHANGE in cel("script")){defer=function(id){html.appendChild(cel("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$":270,"./$.cof":253,"./$.ctx":258,"./$.dom-create":260,"./$.invoke":265}],285:[function(require,module,exports){module.exports=function(exec){try{exec();return false}catch(e){return true}}},{}],286:[function(require,module,exports){var sid=0;function uid(key){return"Symbol(".concat(key===undefined?"":key,")_",(++sid+Math.random()).toString(36))}uid.safe=require("./$").g.Symbol||uid;module.exports=uid},{"./$":270}],287:[function(require,module,exports){var UNSCOPABLES=require("./$.wks")("unscopables");if(!(UNSCOPABLES in[]))require("./$").hide(Array.prototype,UNSCOPABLES,{});module.exports=function(key){[][UNSCOPABLES][key]=true}},{"./$":270,"./$.wks":288}],288:[function(require,module,exports){var global=require("./$").g,store=require("./$.shared")("wks");module.exports=function(name){return store[name]||(store[name]=global.Symbol&&global.Symbol[name]||require("./$.uid").safe("Symbol."+name))}},{"./$":270,"./$.shared":279,"./$.uid":286}],289:[function(require,module,exports){var $=require("./$"),cel=require("./$.dom-create"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid").safe("__proto__"),assert=require("./$.assert"),assertObject=assert.obj,ObjectProto=Object.prototype,html=$.html,A=[],_slice=A.slice,_join=A.join,classof=cof.classof,has=$.has,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,defineProperties=$.setDescs,isFunction=$.isFunction,isObject=$.isObject,toObject=$.toObject,toLength=$.toLength,toIndex=$.toIndex,IE8_DOM_DEFINE=false,$indexOf=require("./$.array-includes")(false),$forEach=arrayMethod(0),$map=arrayMethod(1),$filter=arrayMethod(2),$some=arrayMethod(3),$every=arrayMethod(4);if(!$.DESC){try{IE8_DOM_DEFINE=defineProperty(cel("div"),"x",{get:function(){return 8}}).x==8}catch(e){}$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)assertObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};$.setDescs=defineProperties=function(O,Properties){ -assertObject(O);var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!$.DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=cel("iframe"),i=keysLen1,gt=">",iframeDocument;iframe.style.display="none";html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write("